FEEDZY RSS Feeds Lite - Version 3.2.8

Version Description

  • 2018-02-20
Download this release

Release Info

Developer codeinwp
Plugin Icon 128x128 FEEDZY RSS Feeds Lite
Version 3.2.8
Comparing to
See all releases

Code changes from version 3.2.7 to 3.2.8

CHANGELOG.md CHANGED
@@ -1,7 +1,9 @@
1
 
2
- ### v3.2.7 - 2018-02-20
3
  **Changes:**
4
- * debug being printed on the site
 
 
5
 
6
  ### v3.2.7 - 2018-01-05
7
  **Changes:**
1
 
2
+ ### v3.2.8 - 2018-02-20
3
  **Changes:**
4
+ * Fix issue with medium feeds.
5
+ * Improves extensibility using various hooks.
6
+ * Fix feeds without schema protocol.
7
 
8
  ### v3.2.7 - 2018-01-05
9
  **Changes:**
css/feedzy-rss-feeds.css CHANGED
@@ -2,7 +2,7 @@
2
  * feedzy-rss-feeds.css
3
  * Feedzy RSS Feed
4
  * Copyright: (c) 2016 Themeisle, themeisle.com
5
- * Version: 3.2.7
6
  * Plugin Name: FEEDZY RSS Feeds
7
  * Plugin URI: http://themeisle.com/plugins/feedzy-rss-feeds/
8
  * Author: Themeisle
2
  * feedzy-rss-feeds.css
3
  * Feedzy RSS Feed
4
  * Copyright: (c) 2016 Themeisle, themeisle.com
5
+ * Version: 3.2.8
6
  * Plugin Name: FEEDZY RSS Feeds
7
  * Plugin URI: http://themeisle.com/plugins/feedzy-rss-feeds/
8
  * Author: Themeisle
feedzy-rss-feed.php CHANGED
@@ -15,7 +15,7 @@
15
  * Plugin Name: Feedzy RSS Feeds Lite
16
  * Plugin URI: https://themeisle.com/plugins/feedzy-rss-feeds-lite/
17
  * Description: A small and lightweight RSS aggregator plugin. Fast and very easy to use, it allows you to aggregate multiple RSS feeds into your WordPress site through fully customizable shortcodes & widgets.
18
- * Version: 3.2.7
19
  * Author: Themeisle
20
  * Author URI: http://themeisle.com
21
  * License: GPL-2.0+
@@ -103,6 +103,8 @@ function run_feedzy_rss_feeds() {
103
  define( 'FEEDZY_ABSPATH', dirname( __FILE__ ) );
104
  define( 'FEEDZY_UPSELL_LINK', 'https://themeisle.com/plugins/feedzy-rss-feeds/' );
105
  define( 'FEEDZY_NAME', 'Feedzy RSS Feeds' );
 
 
106
 
107
  // always make this true before testing
108
  define( 'FEEDZY_DISABLE_CACHE_FOR_TESTING', false );
15
  * Plugin Name: Feedzy RSS Feeds Lite
16
  * Plugin URI: https://themeisle.com/plugins/feedzy-rss-feeds-lite/
17
  * Description: A small and lightweight RSS aggregator plugin. Fast and very easy to use, it allows you to aggregate multiple RSS feeds into your WordPress site through fully customizable shortcodes & widgets.
18
+ * Version: 3.2.8
19
  * Author: Themeisle
20
  * Author URI: http://themeisle.com
21
  * License: GPL-2.0+
103
  define( 'FEEDZY_ABSPATH', dirname( __FILE__ ) );
104
  define( 'FEEDZY_UPSELL_LINK', 'https://themeisle.com/plugins/feedzy-rss-feeds/' );
105
  define( 'FEEDZY_NAME', 'Feedzy RSS Feeds' );
106
+ define( 'FEEDZY_USER_AGENT', 'Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2228.0 Safari/537.36' );
107
+ define( 'FEEDZY_ALLOW_HTTPS', true );
108
 
109
  // always make this true before testing
110
  define( 'FEEDZY_DISABLE_CACHE_FOR_TESTING', false );
includes/abstract/feedzy-rss-feeds-admin-abstract.php CHANGED
@@ -393,19 +393,43 @@ abstract class Feedzy_Rss_Feeds_Admin_Abstract {
393
 
394
  $feed = new SimplePie();
395
  $feed->set_file_class( 'WP_SimplePie_File' );
396
- $feed->set_useragent( apply_filters( 'http_headers_useragent', SIMPLEPIE_USERAGENT ) );
 
397
  if ( ! FEEDZY_DISABLE_CACHE_FOR_TESTING ) {
398
  $feed->set_cache_class( 'WP_Feed_Cache' );
399
  $feed->set_cache_duration( apply_filters( 'wp_feed_cache_transient_lifetime', $cache_time, $feedURL ) );
400
  }
401
  $feed->set_feed_url( $feedURL );
402
- $feed->init();
403
  $feed->force_feed( true );
 
 
404
  $feed->handle_content_type();
405
 
406
  return $feed;
407
  }
408
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
409
  /**
410
  * Returns only valid URLs for fetching.
411
  *
@@ -603,7 +627,15 @@ abstract class Feedzy_Rss_Feeds_Admin_Abstract {
603
  $feedURL = array();
604
  // Remove SSL from HTTP request to prevent fetching errors
605
  foreach ( $feeds as $feed ) {
606
- $feedURL[] = preg_replace( '/^https:/i', 'http:', $feed );
 
 
 
 
 
 
 
 
607
  }
608
  if ( count( $feedURL ) === 1 ) {
609
  $feedURL = $feedURL[0];
@@ -843,8 +875,8 @@ abstract class Feedzy_Rss_Feeds_Admin_Abstract {
843
  $image = null;
844
  if ( isset( $matches[0] ) ) {
845
  foreach ( $matches[0] as $match ) {
846
- $link = $this->feedzy_scrape_image( $match );
847
- $blacklist = $this->feedzy_blacklist_images();
848
  $is_blacklist = false;
849
  foreach ( $blacklist as $string ) {
850
  if ( strpos( (string) $link, $string ) !== false ) {
393
 
394
  $feed = new SimplePie();
395
  $feed->set_file_class( 'WP_SimplePie_File' );
396
+ $default_agent = $this->get_default_user_agent( $feedURL );
397
+ $feed->set_useragent( apply_filters( 'http_headers_useragent', $default_agent ) );
398
  if ( ! FEEDZY_DISABLE_CACHE_FOR_TESTING ) {
399
  $feed->set_cache_class( 'WP_Feed_Cache' );
400
  $feed->set_cache_duration( apply_filters( 'wp_feed_cache_transient_lifetime', $cache_time, $feedURL ) );
401
  }
402
  $feed->set_feed_url( $feedURL );
 
403
  $feed->force_feed( true );
404
+ do_action( 'feedzy_modify_feed_config', $feed );
405
+ $feed->init();
406
  $feed->handle_content_type();
407
 
408
  return $feed;
409
  }
410
 
411
+ /**
412
+ * Change the default user agent based on the feed url.
413
+ *
414
+ * @param string|array $urls Feed urls.
415
+ *
416
+ * @return string Optimal User Agent
417
+ */
418
+ private function get_default_user_agent( $urls ) {
419
+
420
+ $set = array();
421
+ if ( ! is_array( $urls ) ) {
422
+ $set[] = $urls;
423
+ }
424
+ foreach ( $set as $url ) {
425
+ if ( strpos( $url, 'medium.com' ) !== false ) {
426
+ return FEEDZY_USER_AGENT;
427
+ }
428
+ }
429
+
430
+ return SIMPLEPIE_USERAGENT;
431
+ }
432
+
433
  /**
434
  * Returns only valid URLs for fetching.
435
  *
627
  $feedURL = array();
628
  // Remove SSL from HTTP request to prevent fetching errors
629
  foreach ( $feeds as $feed ) {
630
+ if ( FEEDZY_ALLOW_HTTPS ) {
631
+ $feedURL[] = $feed;
632
+ } else {
633
+ $feedURL[] = preg_replace( '/^https:/i', 'http:', $feed );
634
+ }
635
+ // scheme-less URLs.
636
+ if ( strpos( $feed, 'http' ) !== 0 ) {
637
+ $feed = 'http://' . $feed;
638
+ }
639
  }
640
  if ( count( $feedURL ) === 1 ) {
641
  $feedURL = $feedURL[0];
875
  $image = null;
876
  if ( isset( $matches[0] ) ) {
877
  foreach ( $matches[0] as $match ) {
878
+ $link = $this->feedzy_scrape_image( $match );
879
+ $blacklist = $this->feedzy_blacklist_images();
880
  $is_blacklist = false;
881
  foreach ( $blacklist as $string ) {
882
  if ( strpos( (string) $link, $string ) !== false ) {
includes/admin/feedzy-rss-feeds-admin.php CHANGED
@@ -479,6 +479,8 @@ class Feedzy_Rss_Feeds_Admin extends Feedzy_Rss_Feeds_Admin_Abstract {
479
  public function http_request_args( $args ) {
480
  // allow private IPs.
481
  $args['reject_unsafe_urls'] = false;
 
 
482
 
483
  return $args;
484
  }
479
  public function http_request_args( $args ) {
480
  // allow private IPs.
481
  $args['reject_unsafe_urls'] = false;
482
+ // allow SSLs to go through without certificate verification.
483
+ $args['sslverify'] = false;
484
 
485
  return $args;
486
  }
includes/admin/feedzy-wp-widget.php CHANGED
@@ -80,7 +80,7 @@ class feedzy_wp_widget extends WP_Widget {
80
  public function form( $instance ) {
81
  $screen = get_current_screen();
82
  // to prevent conflicts with plugins such as siteorigin page builder that call this function from outside of the 'widgets' screen.
83
- if ( 'widgets' !== $screen->id ) {
84
  return;
85
  }
86
  $instance = wp_parse_args( $instance, $this->get_widget_defaults() );
80
  public function form( $instance ) {
81
  $screen = get_current_screen();
82
  // to prevent conflicts with plugins such as siteorigin page builder that call this function from outside of the 'widgets' screen.
83
+ if ( ! empty( $screen ) && 'widgets' !== $screen->id ) {
84
  return;
85
  }
86
  $instance = wp_parse_args( $instance, $this->get_widget_defaults() );
includes/feedzy-rss-feeds.php CHANGED
@@ -104,7 +104,7 @@ class Feedzy_Rss_Feeds {
104
  */
105
  public function init() {
106
  self::$plugin_name = 'feedzy-rss-feeds';
107
- self::$version = '3.2.7';
108
  self::$instance->load_dependencies();
109
  self::$instance->set_locale();
110
  self::$instance->define_admin_hooks();
104
  */
105
  public function init() {
106
  self::$plugin_name = 'feedzy-rss-feeds';
107
+ self::$version = '3.2.8';
108
  self::$instance->load_dependencies();
109
  self::$instance->set_locale();
110
  self::$instance->define_admin_hooks();
readme.md CHANGED
@@ -253,6 +253,13 @@ You have to check first if your feed is valid. Please test it here: https://vali
253
 
254
 
255
  ## Changelog ##
 
 
 
 
 
 
 
256
  ### 3.2.7 - 2018-01-05 ###
257
 
258
  * Fix compatibility with SiteOrigin Page Builder.
253
 
254
 
255
  ## Changelog ##
256
+ ### 3.2.8 - 2018-02-20 ###
257
+
258
+ * Fix issue with medium feeds.
259
+ * Improves extensibility using various hooks.
260
+ * Fix feeds without schema protocol.
261
+
262
+
263
  ### 3.2.7 - 2018-01-05 ###
264
 
265
  * Fix compatibility with SiteOrigin Page Builder.
readme.txt CHANGED
@@ -290,12 +290,12 @@ You have to check first if your feed is valid. Please test it here: https://vali
290
  = How to move Feedzy templates to your theme =
291
  [https://docs.themeisle.com/article/573-how-to-move-feedzy-templates-to-your-theme](https://docs.themeisle.com/article/573-how-to-move-feedzy-templates-to-your-theme)
292
 
293
- = How to remove time from publication date =
294
- [https://docs.themeisle.com/article/553-how-to-remove-time-from-publication-date](https://docs.themeisle.com/article/553-how-to-remove-time-from-publication-date)
295
-
296
  = How to remove plugin css =
297
  [https://docs.themeisle.com/article/545-how-to-remove-plugin-css](https://docs.themeisle.com/article/545-how-to-remove-plugin-css)
298
 
 
 
 
299
  = How to remove the end hellip =
300
  [https://docs.themeisle.com/article/543-how-to-remove-the-end-hellip](https://docs.themeisle.com/article/543-how-to-remove-the-end-hellip)
301
 
@@ -347,6 +347,13 @@ You have to check first if your feed is valid. Please test it here: https://vali
347
 
348
 
349
  == Changelog ==
 
 
 
 
 
 
 
350
  = 3.2.7 - 2018-01-05 =
351
 
352
  * Fix compatibility with SiteOrigin Page Builder.
290
  = How to move Feedzy templates to your theme =
291
  [https://docs.themeisle.com/article/573-how-to-move-feedzy-templates-to-your-theme](https://docs.themeisle.com/article/573-how-to-move-feedzy-templates-to-your-theme)
292
 
 
 
 
293
  = How to remove plugin css =
294
  [https://docs.themeisle.com/article/545-how-to-remove-plugin-css](https://docs.themeisle.com/article/545-how-to-remove-plugin-css)
295
 
296
+ = How to remove time from publication date =
297
+ [https://docs.themeisle.com/article/553-how-to-remove-time-from-publication-date](https://docs.themeisle.com/article/553-how-to-remove-time-from-publication-date)
298
+
299
  = How to remove the end hellip =
300
  [https://docs.themeisle.com/article/543-how-to-remove-the-end-hellip](https://docs.themeisle.com/article/543-how-to-remove-the-end-hellip)
301
 
347
 
348
 
349
  == Changelog ==
350
+ = 3.2.8 - 2018-02-20 =
351
+
352
+ * Fix issue with medium feeds.
353
+ * Improves extensibility using various hooks.
354
+ * Fix feeds without schema protocol.
355
+
356
+
357
  = 3.2.7 - 2018-01-05 =
358
 
359
  * Fix compatibility with SiteOrigin Page Builder.
themeisle-hash.json CHANGED
@@ -1 +1 @@
1
- {"feedzy-rss-feed.php":"1c7cbe7208bf1abab30466c491afe9ae","index.php":"71c0755260138a4b7b2182c3c61179f6","uninstall.php":"0ef18b49fd2c8fa27b1c1ee8fe679428"}
1
+ {"feedzy-rss-feed.php":"871f391203be4b3215c67f34c24457bd","index.php":"71c0755260138a4b7b2182c3c61179f6","uninstall.php":"0ef18b49fd2c8fa27b1c1ee8fe679428"}
vendor/autoload.php CHANGED
@@ -4,4 +4,4 @@
4
 
5
  require_once __DIR__ . '/composer' . '/autoload_real.php';
6
 
7
- return ComposerAutoloaderInitfe5ae92a3fab081fcfe3c82ee105d10e::getLoader();
4
 
5
  require_once __DIR__ . '/composer' . '/autoload_real.php';
6
 
7
+ return ComposerAutoloaderInit212b29e3da67136f583159d4b9963f90::getLoader();
vendor/autoload_52.php CHANGED
@@ -4,4 +4,4 @@
4
 
5
  require_once dirname(__FILE__) . '/composer'.'/autoload_real_52.php';
6
 
7
- return ComposerAutoloaderInit8af7adeba1b95861ad18dfa88d59ccdf::getLoader();
4
 
5
  require_once dirname(__FILE__) . '/composer'.'/autoload_real_52.php';
6
 
7
+ return ComposerAutoloaderInitc774f8e0c560afb062142e1f04264361::getLoader();
vendor/composer/autoload_real.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
- class ComposerAutoloaderInitfe5ae92a3fab081fcfe3c82ee105d10e
6
  {
7
  private static $loader;
8
 
@@ -19,9 +19,9 @@ class ComposerAutoloaderInitfe5ae92a3fab081fcfe3c82ee105d10e
19
  return self::$loader;
20
  }
21
 
22
- spl_autoload_register(array('ComposerAutoloaderInitfe5ae92a3fab081fcfe3c82ee105d10e', 'loadClassLoader'), true, true);
23
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
24
- spl_autoload_unregister(array('ComposerAutoloaderInitfe5ae92a3fab081fcfe3c82ee105d10e', 'loadClassLoader'));
25
 
26
  $map = require __DIR__ . '/autoload_namespaces.php';
27
  foreach ($map as $namespace => $path) {
@@ -42,14 +42,14 @@ class ComposerAutoloaderInitfe5ae92a3fab081fcfe3c82ee105d10e
42
 
43
  $includeFiles = require __DIR__ . '/autoload_files.php';
44
  foreach ($includeFiles as $fileIdentifier => $file) {
45
- composerRequirefe5ae92a3fab081fcfe3c82ee105d10e($fileIdentifier, $file);
46
  }
47
 
48
  return $loader;
49
  }
50
  }
51
 
52
- function composerRequirefe5ae92a3fab081fcfe3c82ee105d10e($fileIdentifier, $file)
53
  {
54
  if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
55
  require $file;
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
+ class ComposerAutoloaderInit212b29e3da67136f583159d4b9963f90
6
  {
7
  private static $loader;
8
 
19
  return self::$loader;
20
  }
21
 
22
+ spl_autoload_register(array('ComposerAutoloaderInit212b29e3da67136f583159d4b9963f90', 'loadClassLoader'), true, true);
23
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
24
+ spl_autoload_unregister(array('ComposerAutoloaderInit212b29e3da67136f583159d4b9963f90', 'loadClassLoader'));
25
 
26
  $map = require __DIR__ . '/autoload_namespaces.php';
27
  foreach ($map as $namespace => $path) {
42
 
43
  $includeFiles = require __DIR__ . '/autoload_files.php';
44
  foreach ($includeFiles as $fileIdentifier => $file) {
45
+ composerRequire212b29e3da67136f583159d4b9963f90($fileIdentifier, $file);
46
  }
47
 
48
  return $loader;
49
  }
50
  }
51
 
52
+ function composerRequire212b29e3da67136f583159d4b9963f90($fileIdentifier, $file)
53
  {
54
  if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
55
  require $file;
vendor/composer/autoload_real_52.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  // autoload_real_52.php generated by xrstf/composer-php52
4
 
5
- class ComposerAutoloaderInit8af7adeba1b95861ad18dfa88d59ccdf {
6
  private static $loader;
7
 
8
  public static function loadClassLoader($class) {
@@ -19,9 +19,9 @@ class ComposerAutoloaderInit8af7adeba1b95861ad18dfa88d59ccdf {
19
  return self::$loader;
20
  }
21
 
22
- spl_autoload_register(array('ComposerAutoloaderInit8af7adeba1b95861ad18dfa88d59ccdf', 'loadClassLoader'), true /*, true */);
23
  self::$loader = $loader = new xrstf_Composer52_ClassLoader();
24
- spl_autoload_unregister(array('ComposerAutoloaderInit8af7adeba1b95861ad18dfa88d59ccdf', 'loadClassLoader'));
25
 
26
  $vendorDir = dirname(dirname(__FILE__));
27
  $baseDir = dirname($vendorDir);
2
 
3
  // autoload_real_52.php generated by xrstf/composer-php52
4
 
5
+ class ComposerAutoloaderInitc774f8e0c560afb062142e1f04264361 {
6
  private static $loader;
7
 
8
  public static function loadClassLoader($class) {
19
  return self::$loader;
20
  }
21
 
22
+ spl_autoload_register(array('ComposerAutoloaderInitc774f8e0c560afb062142e1f04264361', 'loadClassLoader'), true /*, true */);
23
  self::$loader = $loader = new xrstf_Composer52_ClassLoader();
24
+ spl_autoload_unregister(array('ComposerAutoloaderInitc774f8e0c560afb062142e1f04264361', 'loadClassLoader'));
25
 
26
  $vendorDir = dirname(dirname(__FILE__));
27
  $baseDir = dirname($vendorDir);