FEEDZY RSS Feeds Lite - Version 1.6

Version Description

  • Minor CSS fix
  • Add actions: add_action('rss_item', 'feedzy_include_thumbnail_RSS'); & add_action('rss2_item', 'feedzy_include_thumbnail_RSS')
Download this release

Release Info

Developer briKou
Plugin Icon 128x128 FEEDZY RSS Feeds Lite
Version 1.6
Comparing to
See all releases

Code changes from version 1.5.4 to 1.6

Files changed (3) hide show
  1. css/feedzy-rss-feeds.css +1 -1
  2. feedzy-rss-feed.php +35 -15
  3. readme.txt +9 -1
css/feedzy-rss-feeds.css CHANGED
@@ -25,7 +25,7 @@
25
  background-position: 50%;
26
  }
27
  .feedzy-rss .rss_item .rss_image {
28
- padding: 0.3em 1em 0 0;
29
  }
30
  .feedzy-rss .rss_item .rss_content small {
31
  display: block;
25
  background-position: 50%;
26
  }
27
  .feedzy-rss .rss_item .rss_image {
28
+ margin: 0.3em 1em 0 0;
29
  }
30
  .feedzy-rss .rss_item .rss_content small {
31
  display: block;
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: 1.5.4
9
  * Text Domain: feedzy_rss_translate
10
  * Domain Path: /langs
11
  */
@@ -308,13 +308,13 @@ if (!function_exists('feedzy_rss')) {
308
  if(!empty($thethumbnail)){
309
 
310
  $content .= '<a href="'.$item->get_permalink().'" class="rss_image" target="'. $target .'" style="width:'. $size .'px; height:'. $size .'px;" title="'.$item->get_title().'" >';
311
- $content .= '<span style="width:'. $size .'px; height:'. $size .'px; background-image: none, url('.$thethumbnail.'), url('.$default.');" alt="'.$item->get_title().'"></span/>';
312
  $content .= '</a>';
313
 
314
  } else if(empty($thethumbnail)){
315
 
316
  $content .= '<a href="'.$item->get_permalink().'" class="rss_image" target="'. $target .'" style="width:'. $size .'px; height:'. $size .'px;" title="'.$item->get_title().'" >';
317
- $content .= '<span style="width:'. $size .'px; height:'. $size .'px; background-image:url('.$default.');" alt="'.$item->get_title().'"></span/>';
318
  $content .= '</a>';
319
 
320
  }
@@ -381,18 +381,38 @@ if (!function_exists('feedzy_rss')) {
381
 
382
 
383
  /***************************************************************
384
- * Insert cover picture to main rss feed
385
  ***************************************************************/
386
- if (!function_exists('feedzy_insert_thumbnail_RSS')) {
387
- function feedzy_insert_thumbnail_RSS($content) {
388
- global $post;
389
-
390
- if ( has_post_thumbnail( $post->ID ) ){
391
- $content = '' . get_the_post_thumbnail( $post->ID, 'thumbnail' ) . '' . $content;
392
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
393
 
394
- return $content;
 
 
 
 
 
 
395
  }
396
- add_filter('the_excerpt_rss', 'feedzy_insert_thumbnail_RSS');
397
- add_filter('the_content_feed', 'feedzy_insert_thumbnail_RSS');
398
- }
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: 1.6
9
  * Text Domain: feedzy_rss_translate
10
  * Domain Path: /langs
11
  */
308
  if(!empty($thethumbnail)){
309
 
310
  $content .= '<a href="'.$item->get_permalink().'" class="rss_image" target="'. $target .'" style="width:'. $size .'px; height:'. $size .'px;" title="'.$item->get_title().'" >';
311
+ $content .= '<span style="width:'. $size .'px; height:'. $size .'px; background-image: none, url('.$thethumbnail.'), url('.$default.');" alt="'.$item->get_title().'"></span/>';
312
  $content .= '</a>';
313
 
314
  } else if(empty($thethumbnail)){
315
 
316
  $content .= '<a href="'.$item->get_permalink().'" class="rss_image" target="'. $target .'" style="width:'. $size .'px; height:'. $size .'px;" title="'.$item->get_title().'" >';
317
+ $content .= '<span style="width:'. $size .'px; height:'. $size .'px; background-image:url('.$default.');" alt="'.$item->get_title().'"></span/>';
318
  $content .= '</a>';
319
 
320
  }
381
 
382
 
383
  /***************************************************************
384
+ * Insert cover picture to main rss feed content
385
  ***************************************************************/
386
+ function feedzy_insert_thumbnail_RSS($content) {
387
+ global $post;
388
+
389
+ if ( has_post_thumbnail( $post->ID ) ){
390
+ $content = '' . get_the_post_thumbnail( $post->ID, 'thumbnail' ) . '' . $content;
391
+ }
392
+
393
+ return $content;
394
+ }
395
+ add_filter('the_excerpt_rss', 'feedzy_insert_thumbnail_RSS');
396
+ add_filter('the_content_feed', 'feedzy_insert_thumbnail_RSS');
397
+
398
+
399
+ /***************************************************************
400
+ * Include cover picture (medium) to rss feed enclosure
401
+ * and media:content
402
+ ***************************************************************/
403
+ function feedzy_include_thumbnail_RSS (){
404
+ global $post;
405
+
406
+ if ( has_post_thumbnail( $post->ID ) ){
407
 
408
+ $postThumbnailId = get_post_thumbnail_id( $post->ID );
409
+ $attachmentMeta = wp_get_attachment_metadata( $postThumbnailId );
410
+ $imageUrl = wp_get_attachment_image_src( $postThumbnailId, 'medium');
411
+
412
+ echo '<enclosure url="' . $imageUrl[0] . '" length="' . filesize( get_attached_file( $postThumbnailId ) ) . '" type="image/jpg" />';
413
+ echo '<media:content url="' . $imageUrl[0] . '" width="' . $attachmentMeta['sizes']['medium']['width'] . '" height="' . $attachmentMeta['sizes']['medium']['height'] . '" medium="image" type="' . $attachmentMeta['sizes']['medium']['mime-type'] . '" />';
414
+
415
  }
416
+ }
417
+ //add_action('rss_item', 'feedzy_include_thumbnail_RSS');
418
+ //add_action('rss2_item', 'feedzy_include_thumbnail_RSS');
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.0
7
- Stable tag: 1.5.4
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -23,6 +23,10 @@ You may use this plugin in your widgets and your pages and reuse the shortcode s
23
 
24
  By activating this plugin, your cover picture will be inserted into your RSS feeds. By doing so, you'll make it will easier for external sites to retrieve images from your feeds.
25
 
 
 
 
 
26
  Plugin is now using the TinyMCE API to improve UI and makes it easy to insert shortcodes!
27
 
28
 
@@ -84,6 +88,10 @@ Yes it is.
84
  == Changelog ==
85
 
86
 
 
 
 
 
87
  = 1.5.4 =
88
  * Plugin meta translation
89
  * Remove unnecessary spaces
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.0
7
+ Stable tag: 1.6
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
23
 
24
  By activating this plugin, your cover picture will be inserted into your RSS feeds. By doing so, you'll make it will easier for external sites to retrieve images from your feeds.
25
 
26
+ BETA - need your feed back ;)
27
+ add_action('rss_item', 'feedzy_include_thumbnail_RSS');
28
+ add_action('rss2_item', 'feedzy_include_thumbnail_RSS')
29
+
30
  Plugin is now using the TinyMCE API to improve UI and makes it easy to insert shortcodes!
31
 
32
 
88
  == Changelog ==
89
 
90
 
91
+ = 1.6 =
92
+ * Minor CSS fix
93
+ * Add actions: add_action('rss_item', 'feedzy_include_thumbnail_RSS'); & add_action('rss2_item', 'feedzy_include_thumbnail_RSS')
94
+
95
  = 1.5.4 =
96
  * Plugin meta translation
97
  * Remove unnecessary spaces