Version Description
- New hook: feedzy_meta_args
Download this release
Release Info
Developer | briKou |
Plugin | FEEDZY RSS Feeds Lite |
Version | 2.2.2 |
Comparing to | |
See all releases |
Code changes from version 2.2.1 to 2.2.2
- feedzy-rss-feed.php +1 -1
- feedzy-rss-feeds-shortcode.php +26 -10
- readme.txt +5 -1
feedzy-rss-feed.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
* Description: FEEDZY RSS Feeds is a small and lightweight plugin. Fast and easy to use, it aggregates RSS feeds into your WordPress site through simple shortcodes.
|
6 |
* Author: Brice CAPOBIANCO
|
7 |
* Author URI: http://b-website.com/
|
8 |
-
* Version: 2.2.
|
9 |
* Text Domain: feedzy_rss_translate
|
10 |
* Domain Path: /langs
|
11 |
*/
|
5 |
* Description: FEEDZY RSS Feeds is a small and lightweight plugin. Fast and easy to use, it aggregates RSS feeds into your WordPress site through simple shortcodes.
|
6 |
* Author: Brice CAPOBIANCO
|
7 |
* Author URI: http://b-website.com/
|
8 |
+
* Version: 2.2.2
|
9 |
* Text Domain: feedzy_rss_translate
|
10 |
* Domain Path: /langs
|
11 |
*/
|
feedzy-rss-feeds-shortcode.php
CHANGED
@@ -34,14 +34,14 @@ function feedzy_scrapeImage($text) {
|
|
34 |
/***************************************************************
|
35 |
* Main shortcode function
|
36 |
***************************************************************/
|
37 |
-
function feedzy_rss($atts, $content =
|
38 |
|
39 |
global $feedzyStyle;
|
40 |
$feedzyStyle = true;
|
41 |
$count = 0;
|
42 |
|
43 |
//Retrieve & extract shorcode parameters
|
44 |
-
extract(shortcode_atts(array(
|
45 |
"feeds" => '', //comma separated feeds url
|
46 |
"max" => '5', //number of feeds items (0 for unlimited)
|
47 |
"feed_title" => 'yes', //display feed title yes/no
|
@@ -54,7 +54,7 @@ function feedzy_rss($atts, $content = "") {
|
|
54 |
"default" => '', //default thumb URL if no image found (only if thumb is set to yes)
|
55 |
"size" => '', //thumbs pixel size
|
56 |
"keywords_title" => '' //only display item if title contains specific keywords (comma-separated list/case sensitive)
|
57 |
-
), $atts));
|
58 |
|
59 |
if ( $max == '0' ) {
|
60 |
$max = '999';
|
@@ -82,13 +82,13 @@ function feedzy_rss($atts, $content = "") {
|
|
82 |
$default = $default;
|
83 |
|
84 |
} else {
|
85 |
-
$default = plugins_url('img/feedzy-default.jpg', __FILE__);
|
86 |
}
|
87 |
|
88 |
|
89 |
|
90 |
if ( !class_exists( 'SimplePie' ) ){
|
91 |
-
require_once(ABSPATH . WPINC . '/class-feed.php');
|
92 |
}
|
93 |
|
94 |
if ( !empty( $feeds ) ) {
|
@@ -283,19 +283,35 @@ function feedzy_rss($atts, $content = "") {
|
|
283 |
|
284 |
$content .= '<div class="rss_content">';
|
285 |
|
286 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
287 |
|
288 |
$contentMeta = '';
|
289 |
$contentMeta .= '<small>' . __( 'Posted', 'feedzy_rss_translate' ) . ' ';
|
290 |
|
291 |
-
if ( $
|
292 |
-
|
|
|
293 |
$domain = parse_url( $item->get_permalink() );
|
294 |
-
$contentMeta .= __( 'by', 'feedzy_rss_translate' ) . ' <a href="http://' . $domain['host'] . '" target="' . $target . '" title="' . $domain['host'] . '" >' . $author->get_name() . '</a> ';
|
295 |
|
296 |
}
|
297 |
|
298 |
-
|
|
|
|
|
|
|
299 |
$contentMeta .= '</small>';
|
300 |
|
301 |
//Filter: feedzy_meta_output
|
34 |
/***************************************************************
|
35 |
* Main shortcode function
|
36 |
***************************************************************/
|
37 |
+
function feedzy_rss( $atts, $content = '' ) {
|
38 |
|
39 |
global $feedzyStyle;
|
40 |
$feedzyStyle = true;
|
41 |
$count = 0;
|
42 |
|
43 |
//Retrieve & extract shorcode parameters
|
44 |
+
extract( shortcode_atts( array(
|
45 |
"feeds" => '', //comma separated feeds url
|
46 |
"max" => '5', //number of feeds items (0 for unlimited)
|
47 |
"feed_title" => 'yes', //display feed title yes/no
|
54 |
"default" => '', //default thumb URL if no image found (only if thumb is set to yes)
|
55 |
"size" => '', //thumbs pixel size
|
56 |
"keywords_title" => '' //only display item if title contains specific keywords (comma-separated list/case sensitive)
|
57 |
+
), $atts ) );
|
58 |
|
59 |
if ( $max == '0' ) {
|
60 |
$max = '999';
|
82 |
$default = $default;
|
83 |
|
84 |
} else {
|
85 |
+
$default = plugins_url( 'img/feedzy-default.jpg', __FILE__ );
|
86 |
}
|
87 |
|
88 |
|
89 |
|
90 |
if ( !class_exists( 'SimplePie' ) ){
|
91 |
+
require_once( ABSPATH . WPINC . '/class-feed.php' );
|
92 |
}
|
93 |
|
94 |
if ( !empty( $feeds ) ) {
|
283 |
|
284 |
$content .= '<div class="rss_content">';
|
285 |
|
286 |
+
|
287 |
+
//Define Meta args
|
288 |
+
$metaArgs = array(
|
289 |
+
'author' => true,
|
290 |
+
'date' => true,
|
291 |
+
'date_format' => get_option( 'date_format' ),
|
292 |
+
'time_format' => get_option( 'time_format' )
|
293 |
+
);
|
294 |
+
|
295 |
+
//Filter: feedzy_meta_args
|
296 |
+
$metaArgs = apply_filters( 'feedzy_meta_args', $metaArgs, $feedURL );
|
297 |
+
|
298 |
+
if ( $meta == 'yes' && ( $metaArgs[ 'author' ] || $metaArgs[ 'date' ] ) ) {
|
299 |
|
300 |
$contentMeta = '';
|
301 |
$contentMeta .= '<small>' . __( 'Posted', 'feedzy_rss_translate' ) . ' ';
|
302 |
|
303 |
+
if ( $item->get_author() && $metaArgs[ 'author' ] ) {
|
304 |
+
|
305 |
+
$author = $item->get_author();
|
306 |
$domain = parse_url( $item->get_permalink() );
|
307 |
+
$contentMeta .= __( 'by', 'feedzy_rss_translate' ) . ' <a href="http://' . $domain[ 'host' ] . '" target="' . $target . '" title="' . $domain[ 'host' ] . '" >' . $author->get_name() . '</a> ';
|
308 |
|
309 |
}
|
310 |
|
311 |
+
if ( $metaArgs[ 'date' ] ) {
|
312 |
+
$contentMeta .= __( 'on', 'feedzy_rss_translate') . ' ' . date_i18n( $metaArgs[ 'date_format' ], $item->get_date( 'U' ) ) . ' ' . __( 'at', 'feedzy_rss_translate' ) . ' ' . date_i18n( $metaArgs[ 'time_format' ], $item->get_date( 'U' ) );
|
313 |
+
}
|
314 |
+
|
315 |
$contentMeta .= '</small>';
|
316 |
|
317 |
//Filter: feedzy_meta_output
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_i
|
|
4 |
Tags: RSS, SimplePie, shortcode, feed, thumbnail, image, rss feeds, aggregator, tinyMCE, WYSIWYG, MCE, UI, flux, plugin, WordPress
|
5 |
Requires at least: 3.7
|
6 |
Tested up to: 4.1
|
7 |
-
Stable tag: 2.2.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -62,6 +62,7 @@ By activating this plugin, your cover picture will be inserted into your RSS fee
|
|
62 |
|
63 |
* feedzy_thumb_output
|
64 |
* feedzy_title_output
|
|
|
65 |
* feedzy_meta_output
|
66 |
* feedzy_summary_input
|
67 |
* feedzy_summary_output
|
@@ -101,6 +102,9 @@ Yes it is.
|
|
101 |
|
102 |
== Changelog ==
|
103 |
|
|
|
|
|
|
|
104 |
= 2.2.1 =
|
105 |
* Minor security improvements
|
106 |
* Better WordPress coding standard respect
|
4 |
Tags: RSS, SimplePie, shortcode, feed, thumbnail, image, rss feeds, aggregator, tinyMCE, WYSIWYG, MCE, UI, flux, plugin, WordPress
|
5 |
Requires at least: 3.7
|
6 |
Tested up to: 4.1
|
7 |
+
Stable tag: 2.2.2
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
62 |
|
63 |
* feedzy_thumb_output
|
64 |
* feedzy_title_output
|
65 |
+
* feedzy_meta_args
|
66 |
* feedzy_meta_output
|
67 |
* feedzy_summary_input
|
68 |
* feedzy_summary_output
|
102 |
|
103 |
== Changelog ==
|
104 |
|
105 |
+
= 2.2.2 =
|
106 |
+
* New hook: feedzy_meta_args
|
107 |
+
|
108 |
= 2.2.1 =
|
109 |
* Minor security improvements
|
110 |
* Better WordPress coding standard respect
|