WP RSS Aggregator - Version 4.7.5

Version Description

(2015-09-02) = * Usage tracking now disabled. * Fixed bug: error related to undefined ajaxurl JS variable gone from frontend. * Enhanced: Licensing errors will be output to debug log. * Enhanced: Improved compatibility with plugins that allow AJAX searching in the backend.

Download this release

Release Info

Developer markzahra
Plugin Icon 128x128 WP RSS Aggregator
Version 4.7.5
Comparing to
See all releases

Code changes from version 4.7.4 to 4.7.5

includes/admin-ajax-notice.php CHANGED
@@ -411,8 +411,9 @@ class WPRSS_Admin_Notices {
411
  * - If 'nonce' is not passed, a nonce will be auto-generated based on the ID.
412
  * - A 'condition' is one or more callbacks. If none are passed, the notice will be displayed on all admin pages.
413
  * - A 'condition_type' is one of the CONDITION_TYPE_* class constants. By default, all conditions have to be true.
414
- * - The 'class' index determinces what type of notice it is. Currently, the valid values are 'updated', 'error' and 'update-nag'. See https://codex.wordpress.org/Plugin_API/Action_Reference/admin_notices
415
- * - The 'content index is the literal content of the notice.
 
416
  * - If 'btn_close_id' is not passed, it will be auto-generated based on the ID.
417
  * - The 'btn_close_class' index determines the class that the close button will have, in addition to the default 'btn-close'.
418
  * - The 'btn_close_content' index determines the literal content of the element of the close button. HTML allowed.
@@ -519,7 +520,7 @@ class WPRSS_Admin_Notices {
519
  *
520
  * @since 4.7.4
521
  * @uses-filter admin_notice_remove_before To modify the notice ID that will be removed. Returning falsy value prevents removal.
522
- * @uses-action admin_notice_remove_before To expose notice ID after removal.
523
  * @param array|int $notice A notice, or notice ID.
524
  * @return \WPRSS_Admin_Notices This instance.
525
  */
@@ -537,7 +538,7 @@ class WPRSS_Admin_Notices {
537
  if( !$notice ) return $this;
538
 
539
  $this->_remove_notice ( $notice, $this->_notices);
540
- do_action( $this->prefix( 'admin_notice_remove_before' ), $notice, $this );
541
 
542
  return $this;
543
  }
@@ -797,7 +798,8 @@ class WPRSS_Admin_Notices {
797
  */
798
  public function evaluate_conditions( $conditions, $condition_type = self::CONDITION_TYPE_ALL, $args = array() ) {
799
  $event_name = $this->prefix( 'admin_notice_conditions_evaluated' );
800
- if ( empty( $conditions ) ) return apply_filters ( $event_name, true, $condition_type, $this ); // Unconditional ;)
 
801
  if ( !is_array( $conditions ) ) $conditions = (array)$conditions; // Normalizing
802
 
803
  foreach ( $conditions as $_idx => $_condition ) {
@@ -1128,14 +1130,14 @@ add_action( 'init', 'wprss_admin_notice_get_collection', 9 );
1128
  * @uses-filter wprss_admin_notice_collection_before_enqueue_scripts To modify list of script handles to enqueue.
1129
  * @uses-action wprss_admin_notice_collection_after_enqueue_scripts To access list of enqueued script handles.
1130
  * @uses-filter wprss_admin_notice_collection_before_localize_vars To modify list of vars to expose to the frontend.
1131
- * @uses-action wprss_admin_notice_collection_before_localize_vars To access list of vars exposed to the frontend.
1132
  * @staticvar WPRSS_Admin_Notices $collection The singleton instance.
1133
- * @return \WPRSS_Admin_Notices The singleton instance.
1134
  */
1135
  function wprss_admin_notice_get_collection() {
1136
  static $collection = null;
1137
 
1138
- if ( is_null( $collection ) ) {
1139
  // Initialize collection
1140
  $collection = new WPRSS_Admin_Notices(array(
1141
  'setting_code' => 'wprss_admin_notices',
@@ -1158,7 +1160,7 @@ function wprss_admin_notice_get_collection() {
1158
  'action_code' => wprss_admin_notice_get_action_code()
1159
  ), $collection );
1160
  wp_localize_script( 'aventura', 'adminNoticeGlobalVars', $settings);
1161
- do_action( 'wprss_admin_notice_collection_before_localize_vars', $settings, $collection );
1162
  }
1163
 
1164
  return $collection;
@@ -1184,11 +1186,14 @@ function wprss_admin_notice_get_action_code() {
1184
  *
1185
  * @since 4.7.4
1186
  * @param array $notice Data of the notice
1187
- * @return bool|WP_Error True if notice added, or WP_Error if something went wrong.
1188
  */
1189
  function wprss_admin_notice_add( $notice ) {
1190
  try {
1191
- wprss_admin_notice_get_collection()->add_notice( $notice );
 
 
 
1192
  } catch ( Exception $e ) {
1193
  return new WP_Error( 'could_not_add_admin_notice', $e->getMessage() );
1194
  }
411
  * - If 'nonce' is not passed, a nonce will be auto-generated based on the ID.
412
  * - A 'condition' is one or more callbacks. If none are passed, the notice will be displayed on all admin pages.
413
  * - A 'condition_type' is one of the CONDITION_TYPE_* class constants. By default, all conditions have to be true.
414
+ * - The 'class' index determinces what type of notice it is. Currently, the valid values are 'updated', 'error' and 'update-nag'.
415
+ * See https://codex.wordpress.org/Plugin_API/Action_Reference/admin_notices
416
+ * - The 'content' index is the literal content of the notice.
417
  * - If 'btn_close_id' is not passed, it will be auto-generated based on the ID.
418
  * - The 'btn_close_class' index determines the class that the close button will have, in addition to the default 'btn-close'.
419
  * - The 'btn_close_content' index determines the literal content of the element of the close button. HTML allowed.
520
  *
521
  * @since 4.7.4
522
  * @uses-filter admin_notice_remove_before To modify the notice ID that will be removed. Returning falsy value prevents removal.
523
+ * @uses-action admin_notice_remove_after To expose notice ID after removal.
524
  * @param array|int $notice A notice, or notice ID.
525
  * @return \WPRSS_Admin_Notices This instance.
526
  */
538
  if( !$notice ) return $this;
539
 
540
  $this->_remove_notice ( $notice, $this->_notices);
541
+ do_action( $this->prefix( 'admin_notice_remove_after' ), $notice, $this );
542
 
543
  return $this;
544
  }
798
  */
799
  public function evaluate_conditions( $conditions, $condition_type = self::CONDITION_TYPE_ALL, $args = array() ) {
800
  $event_name = $this->prefix( 'admin_notice_conditions_evaluated' );
801
+ $result = true; // By default, evaluation passes
802
+ if ( empty( $conditions ) ) return apply_filters ( $event_name, $result, $condition_type, $this ); // Unconditional ;)
803
  if ( !is_array( $conditions ) ) $conditions = (array)$conditions; // Normalizing
804
 
805
  foreach ( $conditions as $_idx => $_condition ) {
1130
  * @uses-filter wprss_admin_notice_collection_before_enqueue_scripts To modify list of script handles to enqueue.
1131
  * @uses-action wprss_admin_notice_collection_after_enqueue_scripts To access list of enqueued script handles.
1132
  * @uses-filter wprss_admin_notice_collection_before_localize_vars To modify list of vars to expose to the frontend.
1133
+ * @uses-action wprss_admin_notice_collection_after_localize_vars To access list of vars exposed to the frontend.
1134
  * @staticvar WPRSS_Admin_Notices $collection The singleton instance.
1135
+ * @return \WPRSS_Admin_Notices|null The singleton instance of notice collection, or null if it is unavailable.
1136
  */
1137
  function wprss_admin_notice_get_collection() {
1138
  static $collection = null;
1139
 
1140
+ if ( is_null( $collection ) && is_admin() ) {
1141
  // Initialize collection
1142
  $collection = new WPRSS_Admin_Notices(array(
1143
  'setting_code' => 'wprss_admin_notices',
1160
  'action_code' => wprss_admin_notice_get_action_code()
1161
  ), $collection );
1162
  wp_localize_script( 'aventura', 'adminNoticeGlobalVars', $settings);
1163
+ do_action( 'wprss_admin_notice_collection_after_localize_vars', $settings, $collection );
1164
  }
1165
 
1166
  return $collection;
1186
  *
1187
  * @since 4.7.4
1188
  * @param array $notice Data of the notice
1189
+ * @return bool|WP_Error True if notice added, false if collection unavailable, or WP_Error if something went wrong.
1190
  */
1191
  function wprss_admin_notice_add( $notice ) {
1192
  try {
1193
+ if ( !($collection = wprss_admin_notice_get_collection()) )
1194
+ return false;
1195
+
1196
+ $collection->add_notice( $notice );
1197
  } catch ( Exception $e ) {
1198
  return new WP_Error( 'could_not_add_admin_notice', $e->getMessage() );
1199
  }
includes/admin-options.php CHANGED
@@ -98,10 +98,10 @@
98
  'label' => __( 'Custom feed limit', WPRSS_TEXT_DOMAIN ),
99
  'callback' => 'wprss_setings_custom_feed_limit_callback'
100
  ),
101
- 'tracking' => array(
102
- 'label' => __( 'Anonymous tracking', WPRSS_TEXT_DOMAIN ),
103
- 'callback' => 'wprss_tracking_callback',
104
- )
105
  ),
106
 
107
  'display' => array(
98
  'label' => __( 'Custom feed limit', WPRSS_TEXT_DOMAIN ),
99
  'callback' => 'wprss_setings_custom_feed_limit_callback'
100
  ),
101
+ // 'tracking' => array(
102
+ // 'label' => __( 'Anonymous tracking', WPRSS_TEXT_DOMAIN ),
103
+ // 'callback' => 'wprss_tracking_callback',
104
+ // )
105
  ),
106
 
107
  'display' => array(
includes/licensing.php CHANGED
@@ -58,11 +58,18 @@ function wprss_edd_licensing_api( $addon, $license_key = NULL, $action = 'check_
58
 
59
  // If the response is an error, return the value in the DB
60
  if ( is_wp_error( $response ) ) {
 
61
  return $license_status;
62
  }
63
 
64
  // decode the license data
65
  $license_data = json_decode( wp_remote_retrieve_body( $response ) );
 
 
 
 
 
 
66
 
67
  // Update the DB option
68
  $license_statuses = get_option( 'wprss_settings_license_statuses' );
@@ -74,7 +81,7 @@ function wprss_edd_licensing_api( $addon, $license_key = NULL, $action = 'check_
74
  if ( strtoupper( $return ) === 'ALL' ) {
75
  return $license_data;
76
  } else {
77
- return $license_data->$return;
78
  }
79
  }
80
 
58
 
59
  // If the response is an error, return the value in the DB
60
  if ( is_wp_error( $response ) ) {
61
+ wprss_log( sprintf( 'Licensing API request failed: %1$s', $response->get_error_message() ), __FUNCTION__, WPRSS_LOG_LEVEL_WARNING );
62
  return $license_status;
63
  }
64
 
65
  // decode the license data
66
  $license_data = json_decode( wp_remote_retrieve_body( $response ) );
67
+
68
+ // Could not decode response JSON
69
+ if ( is_null( $license_data ) ) {
70
+ wprss_log( sprintf( 'Licensing API: Failed to decode response JSON' ), __FUNCTION__, WPRSS_LOG_LEVEL_WARNING );
71
+ return $license_status;
72
+ }
73
 
74
  // Update the DB option
75
  $license_statuses = get_option( 'wprss_settings_license_statuses' );
81
  if ( strtoupper( $return ) === 'ALL' ) {
82
  return $license_data;
83
  } else {
84
+ return isset( $license_data->{$return} ) ? $license_data->{$return} : null;
85
  }
86
  }
87
 
includes/scripts.php CHANGED
@@ -13,7 +13,7 @@
13
  wp_register_script( 'aventura', wprss_get_script_url( 'aventura' ), array('wprss-xdn-lib') );
14
 
15
  // This handles the client side for WPRSS_Admin_Notices
16
- wp_register_script( 'wprss-admin-notifications', wprss_get_script_url( 'admin-notifications' ), array('aventura'), false, true );
17
  }
18
 
19
 
13
  wp_register_script( 'aventura', wprss_get_script_url( 'aventura' ), array('wprss-xdn-lib') );
14
 
15
  // This handles the client side for WPRSS_Admin_Notices
16
+ wp_register_script( 'wprss-admin-notifications', wprss_get_script_url( 'admin-notifications' ), array('aventura'), false, true );
17
  }
18
 
19
 
includes/update.php CHANGED
@@ -100,6 +100,11 @@
100
  update_option( 'wprss_db_version', WPRSS_DB_VERSION );
101
  // Initialize settings
102
  wprss_settings_initialize();
 
 
 
 
 
103
  }
104
 
105
 
100
  update_option( 'wprss_db_version', WPRSS_DB_VERSION );
101
  // Initialize settings
102
  wprss_settings_initialize();
103
+
104
+ // At version 4.7.5 tracking was disabled
105
+ $settings = get_option( 'wprss_settings_general' );
106
+ $settings['tracking'] = '0';
107
+ update_option( 'wprss_settings_general', $settings );
108
  }
109
 
110
 
js/admin-custom.js CHANGED
@@ -116,7 +116,7 @@ jQuery(window).load( function(){
116
  }
117
  );
118
 
119
- jQuery('.wprss_ajax_action').click( fetch_items_row_action_callback );
120
 
121
  // Make the number rollers change their value to empty string when value is 0, making
122
  // them use the placeholder.
116
  }
117
  );
118
 
119
+ jQuery('.wp-list-table').on( 'click', '.wprss_ajax_action', fetch_items_row_action_callback );
120
 
121
  // Make the number rollers change their value to empty string when value is 0, making
122
  // them use the placeholder.
readme.txt CHANGED
@@ -4,7 +4,7 @@ Plugin URI: http://www.wprssaggregator.com
4
  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, rss feeder, rss post importer, autoblog aggregator, autoblog, autopost, content curation, feedwordpress, wp rss multi import, hungryfeed, wp-o-matic, rss feed, rss feed to post, rss retriever, syndication
5
  Requires at least: 4.0
6
  Tested up to: 4.2.3
7
- Stable tag: 4.7.4
8
  License: GPLv2 or later
9
  The no.1 RSS feed importer for WordPress. Premium add-ons available for more functionality.
10
 
@@ -169,7 +169,13 @@ The full documentation section can be found on the [WP RSS Aggregator website](w
169
 
170
  == Changelog ==
171
 
172
- = 4.7.4 (2015-08-19)
 
 
 
 
 
 
173
  * Requirement: WordPress 4.0 or greater now required.
174
  * Fixed bug in image caching
175
  * Fixed bug in admin interface due to incorrectly translated IDs
4
  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, rss feeder, rss post importer, autoblog aggregator, autoblog, autopost, content curation, feedwordpress, wp rss multi import, hungryfeed, wp-o-matic, rss feed, rss feed to post, rss retriever, syndication
5
  Requires at least: 4.0
6
  Tested up to: 4.2.3
7
+ Stable tag: 4.7.5
8
  License: GPLv2 or later
9
  The no.1 RSS feed importer for WordPress. Premium add-ons available for more functionality.
10
 
169
 
170
  == Changelog ==
171
 
172
+ = 4.7.5 (2015-09-02) =
173
+ * Usage tracking now disabled.
174
+ * Fixed bug: error related to undefined `ajaxurl` JS variable gone from frontend.
175
+ * Enhanced: Licensing errors will be output to debug log.
176
+ * Enhanced: Improved compatibility with plugins that allow AJAX searching in the backend.
177
+
178
+ = 4.7.4 (2015-08-20) =
179
  * Requirement: WordPress 4.0 or greater now required.
180
  * Fixed bug in image caching
181
  * Fixed bug in admin interface due to incorrectly translated IDs
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.7.4
7
  Author: Jean Galea
8
  Author URI: http://www.wprssaggregator.com
9
  License: GPLv2
@@ -29,7 +29,7 @@
29
 
30
  /**
31
  * @package WPRSSAggregator
32
- * @version 4.7.4
33
  * @since 1.0
34
  * @author Jean Galea <info@wprssaggregator.com>
35
  * @copyright Copyright (c) 2012-2015, Jean Galea
@@ -43,14 +43,14 @@
43
 
44
  // Set the version number of the plugin.
45
  if( !defined( 'WPRSS_VERSION' ) )
46
- define( 'WPRSS_VERSION', '4.7.4', true );
47
 
48
  if( !defined( 'WPRSS_WP_MIN_VERSION' ) )
49
  define( 'WPRSS_WP_MIN_VERSION', '4.0', true );
50
 
51
  // Set the database version number of the plugin.
52
  if( !defined( 'WPRSS_DB_VERSION' ) )
53
- define( 'WPRSS_DB_VERSION', 13 );
54
 
55
  // Set the plugin prefix
56
  if( !defined( 'WPRSS_PREFIX' ) )
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.7.5
7
  Author: Jean Galea
8
  Author URI: http://www.wprssaggregator.com
9
  License: GPLv2
29
 
30
  /**
31
  * @package WPRSSAggregator
32
+ * @version 4.7.5
33
  * @since 1.0
34
  * @author Jean Galea <info@wprssaggregator.com>
35
  * @copyright Copyright (c) 2012-2015, Jean Galea
43
 
44
  // Set the version number of the plugin.
45
  if( !defined( 'WPRSS_VERSION' ) )
46
+ define( 'WPRSS_VERSION', '4.7.5', true );
47
 
48
  if( !defined( 'WPRSS_WP_MIN_VERSION' ) )
49
  define( 'WPRSS_WP_MIN_VERSION', '4.0', true );
50
 
51
  // Set the database version number of the plugin.
52
  if( !defined( 'WPRSS_DB_VERSION' ) )
53
+ define( 'WPRSS_DB_VERSION', 14 );
54
 
55
  // Set the plugin prefix
56
  if( !defined( 'WPRSS_PREFIX' ) )