Version Description
- Improve author name fetching
- Better HTML marckup
- Fix PHP warning within the widget
- Fix CSS on IE when displaying images as a fallback
- CSS stylesheet update
- New hook: feedzy_item_attributes
Download this release
Release Info
| Developer | briKou |
| Plugin | |
| Version | 2.5 |
| Comparing to | |
| See all releases | |
Code changes from version 2.4.4 to 2.5
- css/feedzy-rss-feeds.css +7 -0
- feedzy-rss-feed.php +16 -1
- feedzy-rss-feeds-functions.php +18 -5
- feedzy-rss-feeds-shortcode.php +19 -9
- feedzy-rss-feeds-widget.php +1 -1
- readme.txt +9 -4
css/feedzy-rss-feeds.css
CHANGED
|
@@ -3,7 +3,12 @@
|
|
| 3 |
* Plugin URI: http://b-website.com/
|
| 4 |
* Author: Brice CAPOBIANCO
|
| 5 |
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
| 6 |
.feedzy-rss .rss_item {
|
|
|
|
| 7 |
border-bottom: 1px solid #eee;
|
| 8 |
}
|
| 9 |
.feedzy-rss .rss_item .title {
|
|
@@ -18,11 +23,13 @@
|
|
| 18 |
float: left;
|
| 19 |
text-decoration: none;
|
| 20 |
border: none;
|
|
|
|
| 21 |
}
|
| 22 |
.feedzy-rss .rss_item .rss_image span{
|
| 23 |
display:inline-block;
|
| 24 |
background-size: cover;
|
| 25 |
background-position: 50%;
|
|
|
|
| 26 |
}
|
| 27 |
.feedzy-rss .rss_item .rss_image {
|
| 28 |
margin: 0.3em 1em 0 0;
|
| 3 |
* Plugin URI: http://b-website.com/
|
| 4 |
* Author: Brice CAPOBIANCO
|
| 5 |
*/
|
| 6 |
+
.feedzy-rss > ul {
|
| 7 |
+
margin: 0;
|
| 8 |
+
padding: 0;
|
| 9 |
+
}
|
| 10 |
.feedzy-rss .rss_item {
|
| 11 |
+
list-style: none;
|
| 12 |
border-bottom: 1px solid #eee;
|
| 13 |
}
|
| 14 |
.feedzy-rss .rss_item .title {
|
| 23 |
float: left;
|
| 24 |
text-decoration: none;
|
| 25 |
border: none;
|
| 26 |
+
position:relative;
|
| 27 |
}
|
| 28 |
.feedzy-rss .rss_item .rss_image span{
|
| 29 |
display:inline-block;
|
| 30 |
background-size: cover;
|
| 31 |
background-position: 50%;
|
| 32 |
+
position: absolute;
|
| 33 |
}
|
| 34 |
.feedzy-rss .rss_item .rss_image {
|
| 35 |
margin: 0.3em 1em 0 0;
|
feedzy-rss-feed.php
CHANGED
|
@@ -5,11 +5,26 @@
|
|
| 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.
|
| 9 |
* Text Domain: feedzy_rss_translate
|
| 10 |
* Domain Path: /langs
|
| 11 |
*/
|
| 12 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 13 |
|
| 14 |
/***************************************************************
|
| 15 |
* SECURITY : Exit if accessed directly
|
| 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.5
|
| 9 |
* Text Domain: feedzy_rss_translate
|
| 10 |
* Domain Path: /langs
|
| 11 |
*/
|
| 12 |
|
| 13 |
+
/* Copyright 2015 Brice CAPOBIANCO (contact : http://b-website.com/contact)
|
| 14 |
+
|
| 15 |
+
This program is free software; you can redistribute it and/or modify
|
| 16 |
+
it under the terms of the GNU General Public License, version 2, as
|
| 17 |
+
published by the Free Software Foundation.
|
| 18 |
+
|
| 19 |
+
This program is distributed in the hope that it will be useful,
|
| 20 |
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
| 21 |
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
| 22 |
+
GNU General Public License for more details.
|
| 23 |
+
|
| 24 |
+
You should have received a copy of the GNU General Public License
|
| 25 |
+
along with this program; if not, write to the Free Software
|
| 26 |
+
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
| 27 |
+
*/
|
| 28 |
|
| 29 |
/***************************************************************
|
| 30 |
* SECURITY : Exit if accessed directly
|
feedzy-rss-feeds-functions.php
CHANGED
|
@@ -1,7 +1,7 @@
|
|
| 1 |
<?php
|
| 2 |
/***************************************************************
|
| 3 |
* SECURITY : Exit if accessed directly
|
| 4 |
-
***************************************************************/
|
| 5 |
if ( !defined( 'ABSPATH' ) ) {
|
| 6 |
die( 'Direct access not allowed!' );
|
| 7 |
}
|
|
@@ -11,7 +11,7 @@ if ( !defined( 'ABSPATH' ) ) {
|
|
| 11 |
* Enqueue feedzy CSS
|
| 12 |
***************************************************************/
|
| 13 |
function feedzy_register_custom_style() {
|
| 14 |
-
wp_register_style( 'feedzy-style', plugins_url('css/feedzy-rss-feeds.css', __FILE__ ), NULL, NULL );
|
| 15 |
}
|
| 16 |
function feedzy_print_custom_style() {
|
| 17 |
global $feedzyStyle;
|
|
@@ -24,15 +24,28 @@ add_action( 'init', 'feedzy_register_custom_style' );
|
|
| 24 |
add_action( 'wp_footer', 'feedzy_print_custom_style' );
|
| 25 |
|
| 26 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 27 |
/***************************************************************
|
| 28 |
* Feed item container class
|
| 29 |
***************************************************************/
|
| 30 |
-
function feedzy_classes_item(){
|
| 31 |
$classes = array( 'rss_item' );
|
| 32 |
$classes = apply_filters( 'feedzy_add_classes_item', $classes );
|
| 33 |
-
$classes = implode( ' ', $classes );
|
| 34 |
-
return $classes;
|
| 35 |
}
|
|
|
|
| 36 |
|
| 37 |
|
| 38 |
/***************************************************************
|
| 1 |
<?php
|
| 2 |
/***************************************************************
|
| 3 |
* SECURITY : Exit if accessed directly
|
| 4 |
+
***************************************************************/
|
| 5 |
if ( !defined( 'ABSPATH' ) ) {
|
| 6 |
die( 'Direct access not allowed!' );
|
| 7 |
}
|
| 11 |
* Enqueue feedzy CSS
|
| 12 |
***************************************************************/
|
| 13 |
function feedzy_register_custom_style() {
|
| 14 |
+
wp_register_style( 'feedzy-style', plugins_url( 'css/feedzy-rss-feeds.css', __FILE__ ), NULL, NULL );
|
| 15 |
}
|
| 16 |
function feedzy_print_custom_style() {
|
| 17 |
global $feedzyStyle;
|
| 24 |
add_action( 'wp_footer', 'feedzy_print_custom_style' );
|
| 25 |
|
| 26 |
|
| 27 |
+
/***************************************************************
|
| 28 |
+
* Padding ratio based on image size
|
| 29 |
+
***************************************************************/
|
| 30 |
+
function feedzy_add_item_padding( $itemAttr, $sizes ){
|
| 31 |
+
$paddinTop = number_format( (15 / 150) * $sizes['height'], 0 );
|
| 32 |
+
$paddinBottom = number_format( (25 / 150) * $sizes['height'], 0 );
|
| 33 |
+
$stylePadding = ' style="padding: ' . $paddinTop . 'px 0 ' . $paddinBottom . 'px"';
|
| 34 |
+
return $itemAttr . $stylePadding;
|
| 35 |
+
}
|
| 36 |
+
add_filter( 'feedzy_item_attributes', 'feedzy_add_item_padding', 10, 2 );
|
| 37 |
+
|
| 38 |
+
|
| 39 |
/***************************************************************
|
| 40 |
* Feed item container class
|
| 41 |
***************************************************************/
|
| 42 |
+
function feedzy_classes_item( $itemAttr ){
|
| 43 |
$classes = array( 'rss_item' );
|
| 44 |
$classes = apply_filters( 'feedzy_add_classes_item', $classes );
|
| 45 |
+
$classes = ' class="' . implode( ' ', $classes ) . '"';
|
| 46 |
+
return $itemAttr . $classes;
|
| 47 |
}
|
| 48 |
+
add_filter( 'feedzy_item_attributes', 'feedzy_classes_item' );
|
| 49 |
|
| 50 |
|
| 51 |
/***************************************************************
|
feedzy-rss-feeds-shortcode.php
CHANGED
|
@@ -38,7 +38,7 @@ function feedzy_rss( $atts, $content = '' ) {
|
|
| 38 |
), $atts ) );
|
| 39 |
|
| 40 |
if ( !empty( $feeds ) ) {
|
| 41 |
-
|
| 42 |
$feedURL = explode( ',', $feeds );
|
| 43 |
|
| 44 |
if ( count( $feedURL ) === 1 ) {
|
|
@@ -64,6 +64,7 @@ function feedzy_rss( $atts, $content = '' ) {
|
|
| 64 |
}
|
| 65 |
|
| 66 |
if ( !empty($keywords_title)){
|
|
|
|
| 67 |
$keywords_title = array_map( 'trim', explode( ',', $keywords_title ) );
|
| 68 |
}
|
| 69 |
|
|
@@ -108,6 +109,8 @@ function feedzy_rss( $atts, $content = '' ) {
|
|
| 108 |
|
| 109 |
}
|
| 110 |
|
|
|
|
|
|
|
| 111 |
//Loop through RSS feed
|
| 112 |
$items = apply_filters( 'feedzy_feed_items', $feed->get_items(), $feedURL );
|
| 113 |
foreach ( (array) $items as $item ) {
|
|
@@ -127,12 +130,11 @@ function feedzy_rss( $atts, $content = '' ) {
|
|
| 127 |
$thethumbnail = feedzy_retrieve_image( $item );
|
| 128 |
}
|
| 129 |
|
| 130 |
-
|
| 131 |
-
$
|
| 132 |
-
$paddinBottom = number_format( (25 / 150) * $sizes['height'], 0 );
|
| 133 |
|
| 134 |
//Build element DOM
|
| 135 |
-
$content .= '<
|
| 136 |
|
| 137 |
if ( $thumb == 'yes' || $thumb == 'auto' ) {
|
| 138 |
|
|
@@ -146,7 +148,8 @@ function feedzy_rss( $atts, $content = '' ) {
|
|
| 146 |
if ( !empty( $thethumbnail )) {
|
| 147 |
|
| 148 |
$thethumbnail = feedzy_image_encode( $thethumbnail );
|
| 149 |
-
$contentThumb .= '<span style="width:' . $sizes['width'] . 'px; height:' . $sizes['height'] . 'px; background-image:
|
|
|
|
| 150 |
|
| 151 |
} else if ( empty( $thethumbnail ) && $thumb == 'yes' ) {
|
| 152 |
|
|
@@ -204,8 +207,14 @@ function feedzy_rss( $atts, $content = '' ) {
|
|
| 204 |
if ( $item->get_author() && $metaArgs[ 'author' ] ) {
|
| 205 |
|
| 206 |
$author = $item->get_author();
|
| 207 |
-
|
| 208 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 209 |
|
| 210 |
}
|
| 211 |
|
|
@@ -246,12 +255,13 @@ function feedzy_rss( $atts, $content = '' ) {
|
|
| 246 |
}
|
| 247 |
|
| 248 |
$content .= '</div>';
|
| 249 |
-
$content .= '</
|
| 250 |
|
| 251 |
} //endContinue
|
| 252 |
|
| 253 |
} //endforeach
|
| 254 |
|
|
|
|
| 255 |
$content .= '</div>';
|
| 256 |
return apply_filters( 'feedzy_global_output', $content, $feedURL );
|
| 257 |
|
| 38 |
), $atts ) );
|
| 39 |
|
| 40 |
if ( !empty( $feeds ) ) {
|
| 41 |
+
$feeds = rtrim( $feeds, ',' );
|
| 42 |
$feedURL = explode( ',', $feeds );
|
| 43 |
|
| 44 |
if ( count( $feedURL ) === 1 ) {
|
| 64 |
}
|
| 65 |
|
| 66 |
if ( !empty($keywords_title)){
|
| 67 |
+
$keywords_title = rtrim( $keywords_title, ',' );
|
| 68 |
$keywords_title = array_map( 'trim', explode( ',', $keywords_title ) );
|
| 69 |
}
|
| 70 |
|
| 109 |
|
| 110 |
}
|
| 111 |
|
| 112 |
+
$content .= '<ul>';
|
| 113 |
+
|
| 114 |
//Loop through RSS feed
|
| 115 |
$items = apply_filters( 'feedzy_feed_items', $feed->get_items(), $feedURL );
|
| 116 |
foreach ( (array) $items as $item ) {
|
| 130 |
$thethumbnail = feedzy_retrieve_image( $item );
|
| 131 |
}
|
| 132 |
|
| 133 |
+
|
| 134 |
+
$itemAttr = apply_filters( 'feedzy_item_attributes', $itemAttr = '', $sizes, $item, $feedURL );
|
|
|
|
| 135 |
|
| 136 |
//Build element DOM
|
| 137 |
+
$content .= '<li ' . $itemAttr . '>';
|
| 138 |
|
| 139 |
if ( $thumb == 'yes' || $thumb == 'auto' ) {
|
| 140 |
|
| 148 |
if ( !empty( $thethumbnail )) {
|
| 149 |
|
| 150 |
$thethumbnail = feedzy_image_encode( $thethumbnail );
|
| 151 |
+
$contentThumb .= '<span class="default" style="width:' . $sizes['width'] . 'px; height:' . $sizes['height'] . 'px; background-image: url(' . $default . ');" alt="' . $item->get_title() . '"></span/>';
|
| 152 |
+
$contentThumb .= '<span class="fetched" style="width:' . $sizes['width'] . 'px; height:' . $sizes['height'] . 'px; background-image: url(' . $thethumbnail . ');" alt="' . $item->get_title() . '"></span/>';
|
| 153 |
|
| 154 |
} else if ( empty( $thethumbnail ) && $thumb == 'yes' ) {
|
| 155 |
|
| 207 |
if ( $item->get_author() && $metaArgs[ 'author' ] ) {
|
| 208 |
|
| 209 |
$author = $item->get_author();
|
| 210 |
+
if ( !$authorName = $author->get_name() ){
|
| 211 |
+
$authorName = $author->get_email();
|
| 212 |
+
}
|
| 213 |
+
|
| 214 |
+
if( $authorName ){
|
| 215 |
+
$domain = parse_url( $item->get_permalink() );
|
| 216 |
+
$contentMeta .= __( 'by', 'feedzy_rss_translate' ) . ' <a href="http://' . $domain[ 'host' ] . '" target="' . $target . '" title="' . $domain[ 'host' ] . '" >' . $authorName . '</a> ';
|
| 217 |
+
}
|
| 218 |
|
| 219 |
}
|
| 220 |
|
| 255 |
}
|
| 256 |
|
| 257 |
$content .= '</div>';
|
| 258 |
+
$content .= '</li>';
|
| 259 |
|
| 260 |
} //endContinue
|
| 261 |
|
| 262 |
} //endforeach
|
| 263 |
|
| 264 |
+
$content .= '</ul>';
|
| 265 |
$content .= '</div>';
|
| 266 |
return apply_filters( 'feedzy_global_output', $content, $feedURL );
|
| 267 |
|
feedzy-rss-feeds-widget.php
CHANGED
|
@@ -192,7 +192,7 @@ class feedzy_wp_widget extends WP_Widget {
|
|
| 192 |
//Fix for versions before 2.3.1
|
| 193 |
if ( $instance['thumb'] == '1' ){
|
| 194 |
$instance['thumb'] = 'yes';
|
| 195 |
-
} else if ( $thumb == '0' ) {
|
| 196 |
$instance['thumb'] = 'no';
|
| 197 |
}
|
| 198 |
|
| 192 |
//Fix for versions before 2.3.1
|
| 193 |
if ( $instance['thumb'] == '1' ){
|
| 194 |
$instance['thumb'] = 'yes';
|
| 195 |
+
} else if ( $instance['thumb'] == '0' ) {
|
| 196 |
$instance['thumb'] = 'no';
|
| 197 |
}
|
| 198 |
|
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, widget, importer, XML, ATOM, API, parser
|
| 5 |
Requires at least: 3.7
|
| 6 |
Tested up to: 4.2
|
| 7 |
-
Stable tag: 2.4.
|
| 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_feed_items
|
| 64 |
* feedzy_item_keyword
|
|
|
|
| 65 |
* feedzy_thumb_output
|
| 66 |
* feedzy_title_output
|
| 67 |
* feedzy_meta_args
|
|
@@ -105,9 +106,13 @@ Yes it is.
|
|
| 105 |
|
| 106 |
== Changelog ==
|
| 107 |
|
| 108 |
-
= 2.
|
| 109 |
-
*
|
| 110 |
-
*
|
|
|
|
|
|
|
|
|
|
|
|
|
| 111 |
|
| 112 |
= 2.4.3 =
|
| 113 |
* Improve image fetching (again...)
|
| 4 |
Tags: RSS, SimplePie, shortcode, feed, thumbnail, image, rss feeds, aggregator, tinyMCE, WYSIWYG, MCE, UI, flux, plugin, WordPress, widget, importer, XML, ATOM, API, parser
|
| 5 |
Requires at least: 3.7
|
| 6 |
Tested up to: 4.2
|
| 7 |
+
Stable tag: 2.4.5
|
| 8 |
License: GPLv2 or later
|
| 9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
| 10 |
|
| 62 |
|
| 63 |
* feedzy_feed_items
|
| 64 |
* feedzy_item_keyword
|
| 65 |
+
* feedzy_item_attributes
|
| 66 |
* feedzy_thumb_output
|
| 67 |
* feedzy_title_output
|
| 68 |
* feedzy_meta_args
|
| 106 |
|
| 107 |
== Changelog ==
|
| 108 |
|
| 109 |
+
= 2.5 =
|
| 110 |
+
* Improve author name fetching
|
| 111 |
+
* Better HTML marckup
|
| 112 |
+
* Fix PHP warning within the widget
|
| 113 |
+
* Fix CSS on IE when displaying images as a fallback
|
| 114 |
+
* CSS stylesheet update
|
| 115 |
+
* New hook: feedzy_item_attributes
|
| 116 |
|
| 117 |
= 2.4.3 =
|
| 118 |
* Improve image fetching (again...)
|
