WP RSS Aggregator - Version 4.4.4

Version Description

(2014-08-19) = * Fixed bug: More fatal errors when using PHP version 5.3 or lower.

Download this release

Release Info

Developer jeangalea
Plugin Icon 128x128 WP RSS Aggregator
Version 4.4.4
Comparing to
See all releases

Code changes from version 4.4.3 to 4.4.4

changelog.txt CHANGED
@@ -1,3 +1,6 @@
 
 
 
1
  4.4.3 (2014-08-19)
2
  Fixed bug: Fatal error when using PHP version 5.3 or lower.
3
 
1
+ 4.4.4 (2014-08-19)
2
+ Fixed bug: More fatal errors when using PHP version 5.3 or lower.
3
+
4
  4.4.3 (2014-08-19)
5
  Fixed bug: Fatal error when using PHP version 5.3 or lower.
6
 
includes/admin-metaboxes.php CHANGED
@@ -140,6 +140,9 @@
140
 
141
  // Use nonce for verification
142
  wp_nonce_field( basename( __FILE__ ), 'wprss_meta_box_nonce' );
 
 
 
143
 
144
  // Begin the field table and loop
145
  echo '<table class="form-table wprss-form-table">';
140
 
141
  // Use nonce for verification
142
  wp_nonce_field( basename( __FILE__ ), 'wprss_meta_box_nonce' );
143
+
144
+ // Fix for WordpRess SEO JS issue
145
+ echo '<input type="hidden" id="content" value="" />';
146
 
147
  // Begin the field table and loop
148
  echo '<table class="form-table wprss-form-table">';
readme.txt CHANGED
@@ -5,7 +5,7 @@ Plugin URI: http://www.wprssaggregator.com
5
  Tags: rss, feeds, aggregation, rss to post, autoblog aggregator, rss import, feed aggregator, rss aggregator, multiple rss feeds, multi rss feeds, rss multi importer, feed import, feed import, multiple feed import, feed aggregation, rss feader, feed reader, feed to post, multiple feeds, multi feed importer, multi feed import, multi import, autoblogging, autoblogger
6
  Requires at least: 3.3
7
  Tested up to: 3.9.1
8
- Stable tag: 4.4.3
9
  License: GPLv2 or later
10
  Imports and aggregates multiple RSS Feeds using SimplePie. Outputs feeds sorted by date (latest first).
11
 
@@ -163,6 +163,9 @@ The full documentation section can be found on the [WP RSS Aggregator website](w
163
 
164
  == Changelog ==
165
 
 
 
 
166
  = 4.4.3 (2014-08-19) =
167
  * Fixed bug: Fatal error when using PHP version 5.3 or lower.
168
 
5
  Tags: rss, feeds, aggregation, rss to post, autoblog aggregator, rss import, feed aggregator, rss aggregator, multiple rss feeds, multi rss feeds, rss multi importer, feed import, feed import, multiple feed import, feed aggregation, rss feader, feed reader, feed to post, multiple feeds, multi feed importer, multi feed import, multi import, autoblogging, autoblogger
6
  Requires at least: 3.3
7
  Tested up to: 3.9.1
8
+ Stable tag: 4.4.4
9
  License: GPLv2 or later
10
  Imports and aggregates multiple RSS Feeds using SimplePie. Outputs feeds sorted by date (latest first).
11
 
163
 
164
  == Changelog ==
165
 
166
+ = 4.4.4 (2014-08-19) =
167
+ * Fixed bug: More fatal errors when using PHP version 5.3 or lower.
168
+
169
  = 4.4.3 (2014-08-19) =
170
  * Fixed bug: Fatal error when using PHP version 5.3 or lower.
171
 
wp-rss-aggregator.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: WP RSS Aggregator
4
  Plugin URI: http://www.wprssaggregator.com
5
  Description: Imports and aggregates multiple RSS Feeds using SimplePie
6
- Version: 4.4.3
7
  Author: Jean Galea
8
  Author URI: http://www.wprssaggregator.com
9
  License: GPLv2
@@ -29,11 +29,11 @@
29
 
30
  /**
31
  * @package WPRSSAggregator
32
- * @version 4.4.3
33
  * @since 1.0
34
- * @author Jean Galea <info@jeangalea.com>
35
  * @copyright Copyright (c) 2012-2014, Jean Galea
36
- * @link http://www.wpmayor.com/
37
  * @license http://www.gnu.org/licenses/gpl.html
38
  */
39
 
@@ -43,7 +43,7 @@
43
 
44
  // Set the version number of the plugin.
45
  if( !defined( 'WPRSS_VERSION' ) )
46
- define( 'WPRSS_VERSION', '4.4.3', true );
47
 
48
  // Set the database version number of the plugin.
49
  if( !defined( 'WPRSS_DB_VERSION' ) )
@@ -213,7 +213,6 @@
213
  }
214
 
215
 
216
-
217
  add_filter( 'wprss_admin_pointers', 'wprss_check_tracking_notice' );
218
  /**
219
  * Сhecks the tracking option and if not set, shows a pointer with opt in and out options.
@@ -250,7 +249,6 @@
250
  }
251
 
252
 
253
-
254
  add_action( 'admin_enqueue_scripts', 'wprss_prepare_pointers', 1000 );
255
  /**
256
  * Prepare the admin pointers
@@ -380,9 +378,9 @@
380
  }
381
 
382
  include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
383
- // check for plugin using plugin name
384
  if ( is_plugin_active( 'wordpress-seo/wp-seo.php' ) ) {
385
- $wpseo_titles = get_option('wpseo_titles', array());
386
  if ( isset( $wpseo_titles['hideeditbox-wprss_feed'] ) ) {
387
  $wpseo_titles['hideeditbox-wprss_feed'] = TRUE;
388
  $wpseo_titles['hideeditbox-wprss_feed_item'] = TRUE;
@@ -398,7 +396,7 @@
398
  * @since 1.0
399
  */
400
  function wprss_deactivate() {
401
- // on deactivation remove the cron job
402
  if ( wp_next_scheduled( 'wprss_fetch_all_feeds_hook' ) ) {
403
  wp_clear_scheduled_hook( 'wprss_fetch_all_feeds_hook' );
404
  }
@@ -416,70 +414,6 @@
416
  function wprss_load_textdomain() {
417
  load_plugin_textdomain( 'wprss', false, WPRSS_LANG );
418
  }
419
-
420
-
421
- // PressTrends WordPress Action
422
- add_action( 'admin_init', 'wprss_presstrends_plugin' );
423
- /**
424
- * Track plugin usage using PressTrends
425
- *
426
- * @since 3.5
427
- * @return void
428
- */
429
- function wprss_presstrends_plugin() {
430
- $settings = get_option( 'wprss_settings_general' );
431
- if ( ! isset( $settings['tracking'] ) || $settings['tracking'] != 1 ) return;
432
-
433
- // PressTrends Account API Key
434
- $api_key = 'znggu7vk7x2ddsiigkerzsca9q22xu1j53hp';
435
- $auth = 'd8giw5yyux4noasmo8gua98n7fv2hrl11';
436
- // Start of Metrics
437
- global $wpdb;
438
- $data = get_transient( 'presstrends_cache_data' );
439
- if ( !$data || $data == '' ) {
440
- $api_base = 'http://api.presstrends.io/index.php/api/pluginsites/update?auth=';
441
- $url = $api_base . $auth . '&api=' . $api_key . '';
442
- $count_posts = wp_count_posts();
443
- $count_pages = wp_count_posts( 'page' );
444
- $comments_count = wp_count_comments();
445
- if ( function_exists( 'wp_get_theme' ) ) {
446
- $theme_data = wp_get_theme();
447
- $theme_name = urlencode( $theme_data->Name );
448
- } else {
449
- $theme_data = get_theme_data( get_stylesheet_directory() . '/style.css' );
450
- $theme_name = $theme_data['Name'];
451
- }
452
- $plugin_name = '&';
453
- foreach ( get_plugins() as $plugin_info ) {
454
- $plugin_name .= $plugin_info['Name'] . '&';
455
- }
456
- // CHANGE __FILE__ PATH IF LOCATED OUTSIDE MAIN PLUGIN FILE
457
- $plugin_data = get_plugin_data( __FILE__ );
458
- $posts_with_comments = $wpdb->get_var( "SELECT COUNT(*) FROM $wpdb->posts WHERE post_type='post' AND comment_count > 0" );
459
- $data = array(
460
- 'url' => base64_encode(site_url()),
461
- 'posts' => $count_posts->publish,
462
- 'pages' => $count_pages->publish,
463
- 'comments' => $comments_count->total_comments,
464
- 'approved' => $comments_count->approved,
465
- 'spam' => $comments_count->spam,
466
- 'pingbacks' => $wpdb->get_var( "SELECT COUNT(comment_ID) FROM $wpdb->comments WHERE comment_type = 'pingback'" ),
467
- 'post_conversion' => ( $count_posts->publish > 0 && $posts_with_comments > 0 ) ? number_format( ( $posts_with_comments / $count_posts->publish ) * 100, 0, '.', '' ) : 0,
468
- 'theme_version' => $plugin_data['Version'],
469
- 'theme_name' => $theme_name,
470
- 'site_name' => str_replace( ' ', '', get_bloginfo( 'name' ) ),
471
- 'plugins' => count( get_option( 'active_plugins' ) ),
472
- 'plugin' => urlencode( $plugin_name ),
473
- 'wpversion' => get_bloginfo( 'version' ),
474
- );
475
- foreach ( $data as $k => $v ) {
476
- $url .= '&' . $k . '=' . $v . '';
477
- }
478
- wp_remote_get( $url );
479
- set_transient( 'presstrends_cache_data', $data, 60 * 60 * 24 );
480
- }
481
- }
482
-
483
 
484
 
485
  /**
@@ -491,6 +425,7 @@
491
  return TRUE;
492
  }
493
 
 
494
  /**
495
  * Utility filter function that returns FALSE;
496
  *
@@ -514,40 +449,42 @@
514
  $tzstring = get_option( 'timezone_string' );
515
 
516
  if ( empty($tzstring) ) {
517
- $offset = (int)get_option( 'gmt_offset' );
518
  $tzstring = timezone_name_from_abbr( '', $offset * 60 * 60, 1 );
519
  }
520
 
521
  return $tzstring;
522
  }
523
 
 
524
  /**
525
  * @see http://wordpress.stackexchange.com/questions/94755/converting-timestamps-to-local-time-with-date-l18n#135049
526
  * @param string|null $format Format to use. Default: Wordpress date and time format.
527
  * @param int|null $timestamp The timestamp to localize. Default: time().
528
  * @return string The formatted datetime, localized and offset for local timezone.
529
  */
530
- function wprss_local_date_i18n($timestamp = null, $format = null) {
531
- $format = is_null($format) ? get_option('date_format') . ' ' . get_option('time_format') : $format;
532
  $timestamp = $timestamp ? $timestamp : time();
533
 
534
  $timezone_str = wprss_get_timezone_string() ? wprss_get_timezone_string() : 'UTC';
535
- $timezone = new DateTimeZone($timezone_str);
536
 
537
  // The date in the local timezone.
538
- $date = new DateTime(null, $timezone);
539
- $date->setTimestamp($timestamp);
540
- $date_str = $date->format('Y-m-d H:i:s');
541
 
542
  // Pretend the local date is UTC to get the timestamp
543
  // to pass to date_i18n().
544
- $utc_timezone = new DateTimeZone('UTC');
545
- $utc_date = new DateTime($date_str, $utc_timezone);
546
  $timestamp = $utc_date->getTimestamp();
547
 
548
- return date_i18n($format, $timestamp, true);
549
  }
550
 
 
551
  /**
552
  * Gets an internationalized and localized datetime string, defaulting
553
  * to WP RSS format.
@@ -557,8 +494,8 @@
557
  * @param int|null $timestamp The timestamp to localize. Default: time().
558
  * @return string The formatted datetime, localized and offset for local timezone.
559
  */
560
- function wprss_date_i18n($timestamp = null, $format = null) {
561
- $format = is_null($format) ? wprss_get_general_setting('date_format') : $format;
562
 
563
- return wprss_local_date_i18n($timestamp, $format);
564
  }
3
  Plugin Name: WP RSS Aggregator
4
  Plugin URI: http://www.wprssaggregator.com
5
  Description: Imports and aggregates multiple RSS Feeds using SimplePie
6
+ Version: 4.4.4
7
  Author: Jean Galea
8
  Author URI: http://www.wprssaggregator.com
9
  License: GPLv2
29
 
30
  /**
31
  * @package WPRSSAggregator
32
+ * @version 4.4.4
33
  * @since 1.0
34
+ * @author Jean Galea <info@wprssaggregator.com>
35
  * @copyright Copyright (c) 2012-2014, Jean Galea
36
+ * @link http://www.wprssaggregator.com/
37
  * @license http://www.gnu.org/licenses/gpl.html
38
  */
39
 
43
 
44
  // Set the version number of the plugin.
45
  if( !defined( 'WPRSS_VERSION' ) )
46
+ define( 'WPRSS_VERSION', '4.4.4', true );
47
 
48
  // Set the database version number of the plugin.
49
  if( !defined( 'WPRSS_DB_VERSION' ) )
213
  }
214
 
215
 
 
216
  add_filter( 'wprss_admin_pointers', 'wprss_check_tracking_notice' );
217
  /**
218
  * Сhecks the tracking option and if not set, shows a pointer with opt in and out options.
249
  }
250
 
251
 
 
252
  add_action( 'admin_enqueue_scripts', 'wprss_prepare_pointers', 1000 );
253
  /**
254
  * Prepare the admin pointers
378
  }
379
 
380
  include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
381
+ // Check if WordPress SEO is activate, if yes set its options for hiding the metaboxes on the wprss_feed and wprss_feed_item screens
382
  if ( is_plugin_active( 'wordpress-seo/wp-seo.php' ) ) {
383
+ $wpseo_titles = get_option( 'wpseo_titles', array() );
384
  if ( isset( $wpseo_titles['hideeditbox-wprss_feed'] ) ) {
385
  $wpseo_titles['hideeditbox-wprss_feed'] = TRUE;
386
  $wpseo_titles['hideeditbox-wprss_feed_item'] = TRUE;
396
  * @since 1.0
397
  */
398
  function wprss_deactivate() {
399
+ // On deactivation remove the cron job
400
  if ( wp_next_scheduled( 'wprss_fetch_all_feeds_hook' ) ) {
401
  wp_clear_scheduled_hook( 'wprss_fetch_all_feeds_hook' );
402
  }
414
  function wprss_load_textdomain() {
415
  load_plugin_textdomain( 'wprss', false, WPRSS_LANG );
416
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
417
 
418
 
419
  /**
425
  return TRUE;
426
  }
427
 
428
+
429
  /**
430
  * Utility filter function that returns FALSE;
431
  *
449
  $tzstring = get_option( 'timezone_string' );
450
 
451
  if ( empty($tzstring) ) {
452
+ $offset = ( int )get_option( 'gmt_offset' );
453
  $tzstring = timezone_name_from_abbr( '', $offset * 60 * 60, 1 );
454
  }
455
 
456
  return $tzstring;
457
  }
458
 
459
+
460
  /**
461
  * @see http://wordpress.stackexchange.com/questions/94755/converting-timestamps-to-local-time-with-date-l18n#135049
462
  * @param string|null $format Format to use. Default: Wordpress date and time format.
463
  * @param int|null $timestamp The timestamp to localize. Default: time().
464
  * @return string The formatted datetime, localized and offset for local timezone.
465
  */
466
+ function wprss_local_date_i18n( $timestamp = null, $format = null ) {
467
+ $format = is_null( $format ) ? get_option( 'date_format' ) . ' ' . get_option( 'time_format' ) : $format;
468
  $timestamp = $timestamp ? $timestamp : time();
469
 
470
  $timezone_str = wprss_get_timezone_string() ? wprss_get_timezone_string() : 'UTC';
471
+ $timezone = new DateTimeZone( $timezone_str );
472
 
473
  // The date in the local timezone.
474
+ $date = new DateTime( null, $timezone );
475
+ $date->setTimestamp( $timestamp );
476
+ $date_str = $date->format( 'Y-m-d H:i:s' );
477
 
478
  // Pretend the local date is UTC to get the timestamp
479
  // to pass to date_i18n().
480
+ $utc_timezone = new DateTimeZone( 'UTC' );
481
+ $utc_date = new DateTime( $date_str, $utc_timezone );
482
  $timestamp = $utc_date->getTimestamp();
483
 
484
+ return date_i18n( $format, $timestamp, true );
485
  }
486
 
487
+
488
  /**
489
  * Gets an internationalized and localized datetime string, defaulting
490
  * to WP RSS format.
494
  * @param int|null $timestamp The timestamp to localize. Default: time().
495
  * @return string The formatted datetime, localized and offset for local timezone.
496
  */
497
+ function wprss_date_i18n( $timestamp = null, $format = null ) {
498
+ $format = is_null( $format ) ? wprss_get_general_setting( 'date_format' ) : $format;
499
 
500
+ return wprss_local_date_i18n( $timestamp, $format );
501
  }