WP RSS Aggregator - Version 4.5.2

Version Description

(2014-09-09) = * Enhanced: Optimized plugin for WordPress 4.0. * Enhanced: Improved template and added filters for add-on hooking. * Fixed bug: Editor toolbar visible over the WP RSS shortcode dialog.

Download this release

Release Info

Developer Mekku
Plugin Icon 128x128 WP RSS Aggregator
Version 4.5.2
Comparing to
See all releases

Code changes from version 4.5.1 to 4.5.2

changelog.txt CHANGED
@@ -1,3 +1,8 @@
 
 
 
 
 
1
  4.5.1 (2014-08-26)
2
  Fixed bug: Last import feed item count stays at zero.
3
  Fixed bug: Datetime::setTimestamp error when using PHP 5.2 or earlier.
1
+ 4.5.2 (2014-09-09)
2
+ Enhanced: Optimized plugin for WordPress 4.0.
3
+ Enhanced: Improved template and added filters for add-on hooking.
4
+ Fixed bug: Editor toolbar visible over the WP RSS shortcode dialog.
5
+
6
  4.5.1 (2014-08-26)
7
  Fixed bug: Last import feed item count stays at zero.
8
  Fixed bug: Datetime::setTimestamp error when using PHP 5.2 or earlier.
css/admin-editor.css CHANGED
@@ -7,7 +7,7 @@
7
  right: 0;
8
  bottom: 0;
9
  background: rgba(0,0,0,0.6);
10
- z-index: 999;
11
  }
12
 
13
  #wprss-editor-dialog {
7
  right: 0;
8
  bottom: 0;
9
  background: rgba(0,0,0,0.6);
10
+ z-index: 1000;
11
  }
12
 
13
  #wprss-editor-dialog {
includes/feed-display.php CHANGED
@@ -166,6 +166,8 @@
166
  $general_settings = get_option( 'wprss_settings_general' );
167
  $excerpts_settings = get_option( 'wprss_settings_excerpts' );
168
  $thumbnails_settings = get_option( 'wprss_settings_thumbnails' );
 
 
169
 
170
  // Normalize the source_link option
171
  $source_link = isset( $general_settings['source_link'] )? $general_settings['source_link'] : 0;
@@ -213,6 +215,9 @@
213
  $text_preceding_date = ltrim( $text_preceding_date . ' ' );
214
 
215
  do_action( 'wprss_get_post_data' );
 
 
 
216
 
217
  ///////////////////////////////////////////////////////////////
218
  // BEGIN TEMPLATE
@@ -223,22 +228,30 @@
223
  echo $link_before;
224
 
225
  // The Title
226
- echo wprss_link_display( $feed_item_title_link, $feed_item_title, wprss_get_general_setting('title_link') );
 
 
227
 
 
 
228
  // FEED ITEM META ?>
229
  <div class='wprss-feed-meta'>
230
 
231
  <!-- SOURCE -->
232
  <?php if ( wprss_get_general_setting('source_enable') == 1 ) : ?>
233
  <span class='feed-source'>
234
- <?php echo $text_preceding_source . wprss_link_display( $source_url, $source_name, $source_link ); ?>
 
 
235
  </span>
236
  <?php endif; ?>
237
 
238
  <!-- DATE -->
239
  <?php if ( wprss_get_general_setting('date_enable') == 1 ) : ?>
240
  <span class='feed-date'>
241
- <?php echo $text_preceding_date . $date; ?>
 
 
242
  </span>
243
  <?php endif; ?>
244
 
@@ -246,7 +259,8 @@
246
  <?php $author = get_post_meta( get_the_ID(), 'wprss_item_author', TRUE );
247
  if ( wprss_get_general_setting('authors_enable') == 1 && $author !== NULL && is_string( $author ) && $author !== '' ) : ?>
248
  <span class="feed-author">
249
- By <?php echo $author; ?>
 
250
  </span>
251
  <?php endif; ?>
252
 
@@ -256,14 +270,15 @@
256
  if ( wprss_get_general_setting('date_enable') == 1 && wprss_get_general_setting('time_ago_format_enable') == 1 ) {
257
  $time_ago = human_time_diff( $timestamp, time() ); ?>
258
  <div class="wprss-time-ago">
259
- <?php echo $time_ago; ?> ago
 
260
  </div>
261
  <?php
262
  }
263
 
264
  // END TEMPLATE - Retrieve buffered output
265
  $output .= ob_get_clean();
266
- $output = apply_filters( 'wprss_single_feed_output', $output );
267
  $output .= "$link_after";
268
 
269
  }
166
  $general_settings = get_option( 'wprss_settings_general' );
167
  $excerpts_settings = get_option( 'wprss_settings_excerpts' );
168
  $thumbnails_settings = get_option( 'wprss_settings_thumbnails' );
169
+
170
+ $extra_options = apply_filters( 'wprss_template_extra_options', array(), $args );
171
 
172
  // Normalize the source_link option
173
  $source_link = isset( $general_settings['source_link'] )? $general_settings['source_link'] : 0;
215
  $text_preceding_date = ltrim( $text_preceding_date . ' ' );
216
 
217
  do_action( 'wprss_get_post_data' );
218
+
219
+ $meta = $extra_options;
220
+ $extra_meta = apply_filters( 'wprss_template_extra_meta', $meta, $args, get_the_ID() );
221
 
222
  ///////////////////////////////////////////////////////////////
223
  // BEGIN TEMPLATE
228
  echo $link_before;
229
 
230
  // The Title
231
+ $item_title = wprss_link_display( $feed_item_title_link, $feed_item_title, wprss_get_general_setting('title_link') );
232
+ $item_title = apply_filters('wprss_item_title', $item_title, $feed_item_title_link, $feed_item_title, wprss_get_general_setting('title_link'));
233
+ echo $item_title;
234
 
235
+ do_action( 'wprss_after_feed_item_title', $extra_meta, $display_settings, get_the_ID() );
236
+
237
  // FEED ITEM META ?>
238
  <div class='wprss-feed-meta'>
239
 
240
  <!-- SOURCE -->
241
  <?php if ( wprss_get_general_setting('source_enable') == 1 ) : ?>
242
  <span class='feed-source'>
243
+ <?php $source_link_text = apply_filters('wprss_item_source_link', wprss_link_display( $source_url, $source_name, $source_link )) ?>
244
+ <?php $source_link_text = $text_preceding_source . $source_link_text ?>
245
+ <?php echo $source_link_text ?>
246
  </span>
247
  <?php endif; ?>
248
 
249
  <!-- DATE -->
250
  <?php if ( wprss_get_general_setting('date_enable') == 1 ) : ?>
251
  <span class='feed-date'>
252
+ <?php $date_text = apply_filters('wprss_item_date', $date) ?>
253
+ <?php $date_text = $text_preceding_date . $date_text; ?>
254
+ <?php echo $date_text; ?>
255
  </span>
256
  <?php endif; ?>
257
 
259
  <?php $author = get_post_meta( get_the_ID(), 'wprss_item_author', TRUE );
260
  if ( wprss_get_general_setting('authors_enable') == 1 && $author !== NULL && is_string( $author ) && $author !== '' ) : ?>
261
  <span class="feed-author">
262
+ <?php $author_text = apply_filters('wprss_item_author', $author) ?>
263
+ By <?php echo $author_text; ?>
264
  </span>
265
  <?php endif; ?>
266
 
270
  if ( wprss_get_general_setting('date_enable') == 1 && wprss_get_general_setting('time_ago_format_enable') == 1 ) {
271
  $time_ago = human_time_diff( $timestamp, time() ); ?>
272
  <div class="wprss-time-ago">
273
+ <?php $time_ago_text = apply_filters('wprss_item_time_ago', $time_ago) ?>
274
+ <?php echo $time_ago_text; ?> ago
275
  </div>
276
  <?php
277
  }
278
 
279
  // END TEMPLATE - Retrieve buffered output
280
  $output .= ob_get_clean();
281
+ $output = apply_filters( 'wprss_single_feed_output', $output, $permalink );
282
  $output .= "$link_after";
283
 
284
  }
includes/libraries/EDD_licensing/EDD_SL_Plugin_Updater.php ADDED
@@ -0,0 +1,144 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ // uncomment this line for testing
4
+ //set_site_transient( 'update_plugins', null );
5
+
6
+ /**
7
+ * Allows plugins to use their own update API.
8
+ *
9
+ * @author Pippin Williamson
10
+ * @version 1.1
11
+ */
12
+ class EDD_SL_Plugin_Updater {
13
+ private $api_url = '';
14
+ private $api_data = array();
15
+ private $name = '';
16
+ private $slug = '';
17
+
18
+ /**
19
+ * Class constructor.
20
+ *
21
+ * @uses plugin_basename()
22
+ * @uses hook()
23
+ *
24
+ * @param string $_api_url The URL pointing to the custom API endpoint.
25
+ * @param string $_plugin_file Path to the plugin file.
26
+ * @param array $_api_data Optional data to send with API calls.
27
+ * @return void
28
+ */
29
+ function __construct( $_api_url, $_plugin_file, $_api_data = null ) {
30
+ $this->api_url = trailingslashit( $_api_url );
31
+ $this->api_data = urlencode_deep( $_api_data );
32
+ $this->name = plugin_basename( $_plugin_file );
33
+ $this->slug = basename( $_plugin_file, '.php');
34
+ $this->version = $_api_data['version'];
35
+
36
+ // Set up hooks.
37
+ $this->hook();
38
+ }
39
+
40
+ /**
41
+ * Set up Wordpress filters to hook into WP's update process.
42
+ *
43
+ * @uses add_filter()
44
+ *
45
+ * @return void
46
+ */
47
+ private function hook() {
48
+ add_filter( 'pre_set_site_transient_update_plugins', array( $this, 'pre_set_site_transient_update_plugins_filter' ) );
49
+ add_filter( 'plugins_api', array( $this, 'plugins_api_filter' ), 10, 3 );
50
+ }
51
+
52
+ /**
53
+ * Check for Updates at the defined API endpoint and modify the update array.
54
+ *
55
+ * This function dives into the update api just when Wordpress creates its update array,
56
+ * then adds a custom API call and injects the custom plugin data retrieved from the API.
57
+ * It is reassembled from parts of the native Wordpress plugin update code.
58
+ * See wp-includes/update.php line 121 for the original wp_update_plugins() function.
59
+ *
60
+ * @uses api_request()
61
+ *
62
+ * @param array $_transient_data Update array build by Wordpress.
63
+ * @return array Modified update array with custom plugin data.
64
+ */
65
+ function pre_set_site_transient_update_plugins_filter( $_transient_data ) {
66
+
67
+
68
+ if( empty( $_transient_data ) ) return $_transient_data;
69
+
70
+ $to_send = array( 'slug' => $this->slug );
71
+
72
+ $api_response = $this->api_request( 'plugin_latest_version', $to_send );
73
+
74
+ if( false !== $api_response && is_object( $api_response ) && isset( $api_response->new_version ) ) {
75
+ if( version_compare( $this->version, $api_response->new_version, '<' ) )
76
+ $_transient_data->response[$this->name] = $api_response;
77
+ }
78
+ return $_transient_data;
79
+ }
80
+
81
+
82
+ /**
83
+ * Updates information on the "View version x.x details" page with custom data.
84
+ *
85
+ * @uses api_request()
86
+ *
87
+ * @param mixed $_data
88
+ * @param string $_action
89
+ * @param object $_args
90
+ * @return object $_data
91
+ */
92
+ function plugins_api_filter( $_data, $_action = '', $_args = null ) {
93
+ if ( ( $_action != 'plugin_information' ) || !isset( $_args->slug ) || ( $_args->slug != $this->slug ) ) return $_data;
94
+
95
+ $to_send = array( 'slug' => $this->slug );
96
+
97
+ $api_response = $this->api_request( 'plugin_information', $to_send );
98
+ if ( false !== $api_response ) $_data = $api_response;
99
+
100
+ return $_data;
101
+ }
102
+
103
+ /**
104
+ * Calls the API and, if successfull, returns the object delivered by the API.
105
+ *
106
+ * @uses get_bloginfo()
107
+ * @uses wp_remote_post()
108
+ * @uses is_wp_error()
109
+ *
110
+ * @param string $_action The requested action.
111
+ * @param array $_data Parameters for the API action.
112
+ * @return false||object
113
+ */
114
+ private function api_request( $_action, $_data ) {
115
+
116
+ global $wp_version;
117
+
118
+ $data = array_merge( $this->api_data, $_data );
119
+
120
+ if( $data['slug'] != $this->slug )
121
+ return;
122
+
123
+ if( empty( $data['license'] ) )
124
+ return;
125
+
126
+ $api_params = array(
127
+ 'edd_action' => 'get_version',
128
+ 'license' => $data['license'],
129
+ 'name' => $data['item_name'],
130
+ 'slug' => $this->slug,
131
+ 'author' => $data['author']
132
+ );
133
+ $request = wp_remote_post( $this->api_url, array( 'timeout' => 15, 'sslverify' => false, 'body' => $api_params ) );
134
+
135
+ if ( ! is_wp_error( $request ) ):
136
+ $request = json_decode( wp_remote_retrieve_body( $request ) );
137
+ if( $request && isset( $request->sections ) )
138
+ $request->sections = maybe_unserialize( $request->sections );
139
+ return $request;
140
+ else:
141
+ return false;
142
+ endif;
143
+ }
144
+ }
includes/licensing.php CHANGED
@@ -283,3 +283,34 @@ function wprss_process_addon_license() {
283
  }
284
  }
285
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
283
  }
284
  }
285
  }
286
+
287
+
288
+ ///////////////////////////////////////\\
289
+ //// SET UP UPDATERS \\
290
+ //////////////////////////////////////////
291
+ $addons = wprss_get_addons();
292
+ // retrieve our license key from the DB
293
+ $licenses = get_option( 'wprss_settings_license_keys' );
294
+
295
+ // setup the updater
296
+ if ( !class_exists( 'EDD_SL_Plugin_Updater' ) ) {
297
+ // load our custom updater
298
+ include ( WPRSS_INC . 'libraries/EDD_licensing/EDD_SL_Plugin_Updater.php' );
299
+ }
300
+
301
+ // Iterate the addons
302
+ foreach( $addons as $id => $name ) {
303
+ // Prepare the data
304
+ $license = wprss_get_license_key( $id );
305
+ $uid = strtoupper( $id );
306
+ $name = constant("WPRSS_{$uid}_SL_ITEM_NAME");
307
+ $version = constant("WPRSS_{$uid}_VERSION");
308
+ $path = constant("WPRSS_{$uid}_PATH");
309
+ // Set up an updater
310
+ $edd_updater = new EDD_SL_Plugin_Updater( WPRSS_SL_STORE_URL, $path, array(
311
+ 'version' => $version, // current version number
312
+ 'license' => $license, // license key (used get_option above to retrieve from DB)
313
+ 'item_name' => $name, // name of this plugin
314
+ 'author' => 'Jean Galea' // author of this plugin
315
+ ));
316
+ }
readme.txt CHANGED
@@ -1,11 +1,11 @@
1
  === WP RSS Aggregator ===
2
- Contributors: jeangalea, Mekku, xedin.unknown, mrkzahra
3
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=X9GP6BL4BLXBJ
4
  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: 4.0
8
- Stable tag: 4.5.1
9
  License: GPLv2 or later
10
  The no.1 RSS feed importer for WordPress. Premium add-ons available for more functionality.
11
 
@@ -154,15 +154,22 @@ The full documentation section can be found on the [WP RSS Aggregator website](w
154
 
155
  2. The output from the aggregator with the [Excerpts & Thumbnails](http://www.wprssaggregator.com/extensions/excerpts-thumbnails) add-on installed.
156
 
157
- 3. Adding a new feed source.
158
 
159
- 4. Imported feeds.
160
 
161
- 5. Plugin settings page.
 
 
162
 
163
 
164
  == Changelog ==
165
 
 
 
 
 
 
166
  = 4.5.1 (2014-08-26) =
167
  * Fixed bug: Last import feed item count stays at zero.
168
  * Fixed bug: Datetime::setTimestamp error when using PHP 5.2 or earlier.
1
  === WP RSS Aggregator ===
2
+ Contributors: jeangalea, Mekku, xedin.unknown, markzahra
3
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=X9GP6BL4BLXBJ
4
  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: 4.0
8
+ Stable tag: 4.5.2
9
  License: GPLv2 or later
10
  The no.1 RSS feed importer for WordPress. Premium add-ons available for more functionality.
11
 
154
 
155
  2. The output from the aggregator with the [Excerpts & Thumbnails](http://www.wprssaggregator.com/extensions/excerpts-thumbnails) add-on installed.
156
 
157
+ 3. Adding/Editing a feed source.
158
 
159
+ 4. The feed sources.
160
 
161
+ 5. The imported feeds items.
162
+
163
+ 6. Plugin settings page.
164
 
165
 
166
  == Changelog ==
167
 
168
+ = 4.5.2 (2014-09-09) =
169
+ * Enhanced: Optimized plugin for WordPress 4.0.
170
+ * Enhanced: Improved template and added filters for add-on hooking.
171
+ * Fixed bug: Editor toolbar visible over the WP RSS shortcode dialog.
172
+
173
  = 4.5.1 (2014-08-26) =
174
  * Fixed bug: Last import feed item count stays at zero.
175
  * Fixed bug: Datetime::setTimestamp error when using PHP 5.2 or earlier.
wp-rss-aggregator.php CHANGED
@@ -2,8 +2,8 @@
2
  /*
3
  Plugin Name: WP RSS Aggregator
4
  Plugin URI: http://www.wprssaggregator.com
5
- Description: The no.1 RSS feed importer for WordPress. Premium add-ons available for more functionality.
6
- Version: 4.5.1
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.5.1
33
  * @since 1.0
34
  * @author Jean Galea <info@wprssaggregator.com>
35
  * @copyright Copyright (c) 2012-2014, Jean Galea
@@ -43,7 +43,7 @@
43
 
44
  // Set the version number of the plugin.
45
  if( !defined( 'WPRSS_VERSION' ) )
46
- define( 'WPRSS_VERSION', '4.5.1', true );
47
 
48
  // Set the database version number of the plugin.
49
  if( !defined( 'WPRSS_DB_VERSION' ) )
@@ -90,6 +90,9 @@
90
  if( !defined( 'WPRSS_LOG_FILE_EXT' ) )
91
  define( 'WPRSS_LOG_FILE_EXT', '.txt', true );
92
 
 
 
 
93
 
94
  /**
95
  * Load required files.
2
  /*
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.5.2
7
  Author: Jean Galea
8
  Author URI: http://www.wprssaggregator.com
9
  License: GPLv2
29
 
30
  /**
31
  * @package WPRSSAggregator
32
+ * @version 4.5.2
33
  * @since 1.0
34
  * @author Jean Galea <info@wprssaggregator.com>
35
  * @copyright Copyright (c) 2012-2014, Jean Galea
43
 
44
  // Set the version number of the plugin.
45
  if( !defined( 'WPRSS_VERSION' ) )
46
+ define( 'WPRSS_VERSION', '4.5.2', true );
47
 
48
  // Set the database version number of the plugin.
49
  if( !defined( 'WPRSS_DB_VERSION' ) )
90
  if( !defined( 'WPRSS_LOG_FILE_EXT' ) )
91
  define( 'WPRSS_LOG_FILE_EXT', '.txt', true );
92
 
93
+ if ( !defined('WPRSS_SL_STORE_URL') ) {
94
+ define( 'WPRSS_SL_STORE_URL', 'http://www.wprssaggregator.com', TRUE );
95
+ }
96
 
97
  /**
98
  * Load required files.