WP RSS Aggregator - Version 4.6.13

Version Description

(2015-03-20) = * Fixed bug: The "Force feed" option wasn't being correctly used.

Download this release

Release Info

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

Code changes from version 4.6.12 to 4.6.13

css/admin-styles.css CHANGED
@@ -55,6 +55,9 @@ body.post-type-wprss_feed #titlediv div.inside { display: none !important; }
55
  #misc-publishing-actions,
56
  #minor-publishing-actions { display: none; }
57
 
 
 
 
58
 
59
 
60
  /* FORM TABLES */
55
  #misc-publishing-actions,
56
  #minor-publishing-actions { display: none; }
57
 
58
+ div#force-feed-container {
59
+ border-top: 1px solid #ddd;
60
+ }
61
 
62
 
63
  /* FORM TABLES */
includes/admin-import-export.php CHANGED
@@ -18,6 +18,8 @@
18
  if ( !empty( $_POST['bulk-feeds'] ) ) {
19
  // Check nonce
20
  check_admin_referer('wprss-bulk-import', 'wprss-bulk-import');
 
 
21
  // Get the text
22
  $bulk_feeds = $_POST['bulk-feeds'];
23
  // Split by lines
@@ -39,7 +41,8 @@
39
  $feed = array(
40
  'post_title' => $name,
41
  'post_status' => 'publish',
42
- 'post_type' => 'wprss_feed'
 
43
  );
44
  // Insert the feed into the DB
45
  $inserted_id = wp_insert_post( $feed );
18
  if ( !empty( $_POST['bulk-feeds'] ) ) {
19
  // Check nonce
20
  check_admin_referer('wprss-bulk-import', 'wprss-bulk-import');
21
+ // Get the site which we should post to
22
+ $post_site = is_multisite() ? get_current_blog_id() : '';
23
  // Get the text
24
  $bulk_feeds = $_POST['bulk-feeds'];
25
  // Split by lines
41
  $feed = array(
42
  'post_title' => $name,
43
  'post_status' => 'publish',
44
+ 'post_type' => 'wprss_feed',
45
+ 'post_site' => $post_site
46
  );
47
  // Insert the feed into the DB
48
  $inserted_id = wp_insert_post( $feed );
includes/admin-metaboxes.php CHANGED
@@ -370,6 +370,8 @@
370
  $help = WPRSS_Help::get_instance();
371
  /* @var $help WPRSS_Help */
372
 
 
 
373
  if ( ! empty( $feed_url ) ) {
374
  $feed = wprss_fetch_feed( $feed_url, $post->ID );
375
  if ( ! is_wp_error( $feed ) ) {
@@ -418,11 +420,16 @@
418
  <?php
419
  echo wpautop( sprintf( __( 'Not sure where to find the RSS feed on a website? <a target="_blank" href="%1$s">Click here</a> for a visual guide. ', WPRSS_TEXT_DOMAIN ), 'http://webtrends.about.com/od/webfeedsyndicationrss/ss/rss_howto.htm' ) );
420
  }
421
-
422
- wprss_render_force_feed_option( $post->ID, TRUE );
 
 
423
  }
 
424
 
425
- else _e( 'No feed URL defined yet', WPRSS_TEXT_DOMAIN );
 
 
426
  }
427
 
428
 
@@ -440,7 +447,6 @@
440
  function wprss_render_force_feed_option( $feed_source_id = NULL, $echo = FALSE ) {
441
  if ( ! $echo ) ob_start();
442
  $force_feed = $feed_source_id === NULL ? '' : get_post_meta( $feed_source_id, 'wprss_force_feed', TRUE ); ?>
443
- <hr/>
444
  <p>
445
  <label for="wprss-force-feed"><?php _e('Force the feed') ?></label>
446
  <input type="hidden" name="wprss_force_feed" value="false" />
370
  $help = WPRSS_Help::get_instance();
371
  /* @var $help WPRSS_Help */
372
 
373
+ echo '<div id="feed-preview-container">';
374
+
375
  if ( ! empty( $feed_url ) ) {
376
  $feed = wprss_fetch_feed( $feed_url, $post->ID );
377
  if ( ! is_wp_error( $feed ) ) {
420
  <?php
421
  echo wpautop( sprintf( __( 'Not sure where to find the RSS feed on a website? <a target="_blank" href="%1$s">Click here</a> for a visual guide. ', WPRSS_TEXT_DOMAIN ), 'http://webtrends.about.com/od/webfeedsyndicationrss/ss/rss_howto.htm' ) );
422
  }
423
+
424
+ }
425
+ else {
426
+ echo '<p>' . __( 'No feed URL defined yet', WPRSS_TEXT_DOMAIN ) . '</p>';
427
  }
428
+ echo '</div>';
429
 
430
+ echo '<div id="force-feed-container">';
431
+ wprss_render_force_feed_option( $post->ID, TRUE );
432
+ echo '</div>';
433
  }
434
 
435
 
447
  function wprss_render_force_feed_option( $feed_source_id = NULL, $echo = FALSE ) {
448
  if ( ! $echo ) ob_start();
449
  $force_feed = $feed_source_id === NULL ? '' : get_post_meta( $feed_source_id, 'wprss_force_feed', TRUE ); ?>
 
450
  <p>
451
  <label for="wprss-force-feed"><?php _e('Force the feed') ?></label>
452
  <input type="hidden" name="wprss_force_feed" value="false" />
includes/feed-importing.php CHANGED
@@ -185,13 +185,13 @@
185
  *
186
  * @since 3.0
187
  */
188
- function wprss_get_feed_items( $feed_url, $source ) {
189
  // Add filters and actions prior to fetching the feed items
190
  add_filter( 'wp_feed_cache_transient_lifetime' , 'wprss_feed_cache_lifetime' );
191
  add_action( 'wp_feed_options', 'wprss_do_not_cache_feeds' );
192
 
193
  /* Fetch the feed from the soure URL specified */
194
- $feed = wprss_fetch_feed( $feed_url, $source );
195
 
196
  // Remove previously added filters and actions
197
  remove_action( 'wp_feed_options', 'wprss_do_not_cache_feeds' );
@@ -215,7 +215,7 @@
215
  *
216
  * @since 3.5
217
  */
218
- function wprss_fetch_feed( $url, $source = NULL ) {
219
  // Import SimplePie
220
  require_once ( ABSPATH . WPINC . '/class-feed.php' );
221
 
@@ -231,11 +231,11 @@
231
  $feed->set_autodiscovery_level( SIMPLEPIE_LOCATOR_ALL );
232
 
233
  // If a feed source was passed
234
- if ( $source !== NULL ) {
235
  // Get the force feed option for the feed source
236
  $force_feed = get_post_meta( $source, 'wprss_force_feed', TRUE );
237
  // If turned on, force the feed
238
- if ( $force_feed == 'true' ) {
239
  $feed->force_feed( TRUE );
240
  }
241
  }
185
  *
186
  * @since 3.0
187
  */
188
+ function wprss_get_feed_items( $feed_url, $source, $force_feed = FALSE ) {
189
  // Add filters and actions prior to fetching the feed items
190
  add_filter( 'wp_feed_cache_transient_lifetime' , 'wprss_feed_cache_lifetime' );
191
  add_action( 'wp_feed_options', 'wprss_do_not_cache_feeds' );
192
 
193
  /* Fetch the feed from the soure URL specified */
194
+ $feed = wprss_fetch_feed( $feed_url, $source, $force_feed );
195
 
196
  // Remove previously added filters and actions
197
  remove_action( 'wp_feed_options', 'wprss_do_not_cache_feeds' );
215
  *
216
  * @since 3.5
217
  */
218
+ function wprss_fetch_feed( $url, $source = NULL, $param_force_feed = FALSE ) {
219
  // Import SimplePie
220
  require_once ( ABSPATH . WPINC . '/class-feed.php' );
221
 
231
  $feed->set_autodiscovery_level( SIMPLEPIE_LOCATOR_ALL );
232
 
233
  // If a feed source was passed
234
+ if ( $source !== NULL || $param_force_feed ) {
235
  // Get the force feed option for the feed source
236
  $force_feed = get_post_meta( $source, 'wprss_force_feed', TRUE );
237
  // If turned on, force the feed
238
+ if ( $force_feed == 'true' || $param_force_feed ) {
239
  $feed->force_feed( TRUE );
240
  }
241
  }
includes/feed-processing.php CHANGED
@@ -500,41 +500,41 @@
500
  * @since 3.8
501
  */
502
  function wprss_truncate_posts() {
 
503
  $general_settings = get_option( 'wprss_settings_general' );
504
-
505
  // Get all feed sources
506
  $feed_sources = wprss_get_all_feed_sources();
507
 
508
-
509
  if( $feed_sources->have_posts() ) {
510
-
511
  // FOR EACH FEED SOURCE
512
  while ( $feed_sources->have_posts() ) {
513
  $feed_sources->the_post();
514
-
515
  // Get the max age setting for this feed source
516
  $max_age = wprss_get_max_age_for_feed_source( get_the_ID() );
517
 
518
  // If the data is empty, do not delete
519
- if ( $max_age !== FALSE ) {
520
-
521
- // Get all feed items for this source
522
- $feed_items = wprss_get_feed_items_for_source( get_the_ID() );
523
-
524
- // FOR EACH FEED ITEM
525
- if ( $feed_items-> have_posts() ) {
526
- while ( $feed_items->have_posts() ) {
527
- $feed_items->the_post();
528
- // If the post is older than the maximum age
529
- if ( wprss_is_feed_item_older_than( get_the_ID(), $max_age ) === TRUE ){
530
- // Delete the post
531
- wp_delete_post( get_the_ID(), true );
532
- }
533
- }
534
- // Reset feed items query data
535
- wp_reset_postdata();
 
536
  }
537
-
 
538
  }
539
  }
540
  // Reset feed sources query data
500
  * @since 3.8
501
  */
502
  function wprss_truncate_posts() {
503
+ // Get general settings
504
  $general_settings = get_option( 'wprss_settings_general' );
 
505
  // Get all feed sources
506
  $feed_sources = wprss_get_all_feed_sources();
507
 
508
+ // Check if there are feed sources
509
  if( $feed_sources->have_posts() ) {
 
510
  // FOR EACH FEED SOURCE
511
  while ( $feed_sources->have_posts() ) {
512
  $feed_sources->the_post();
 
513
  // Get the max age setting for this feed source
514
  $max_age = wprss_get_max_age_for_feed_source( get_the_ID() );
515
 
516
  // If the data is empty, do not delete
517
+ if ( $max_age === FALSE ) continue;
518
+
519
+ // Get all feed items for this source
520
+ $feed_items = wprss_get_feed_items_for_source( get_the_ID() );
521
+ // If there are feed items
522
+ if ( $feed_items-> have_posts() ) {
523
+ // Extend the timeout time limit for the deletion of the feed items
524
+ $time_limit = wprss_get_item_import_time_limit();
525
+ wprss_log( "Extended execution time limit by {$time_limit}s for imported items truncation.", null, WPRSS_LOG_LEVEL_INFO );
526
+ set_time_limit( $time_limit );
527
+ // For each feed item
528
+ while ( $feed_items->have_posts() ) {
529
+ $feed_items->the_post();
530
+ // If the post is older than the maximum age
531
+ if ( wprss_is_feed_item_older_than( get_the_ID(), $max_age ) === TRUE ){
532
+ // Delete the post
533
+ wp_delete_post( get_the_ID(), true );
534
+ }
535
  }
536
+ // Reset feed items query data
537
+ wp_reset_postdata();
538
  }
539
  }
540
  // Reset feed sources query data
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, 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
6
  Requires at least: 3.3
7
  Tested up to: 4.1
8
- Stable tag: 4.6.12
9
  License: GPLv2 or later
10
  The no.1 RSS feed importer for WordPress. Premium add-ons available for more functionality.
11
 
@@ -66,6 +66,7 @@ The core plugin can be seen in use on the [demo page](http://www.wprssaggregator
66
  Instructions for plugin usage are available on the plugin's [documentation page](http://www.wprssaggregator.com/documentation/).
67
 
68
  = As featured on =
 
69
  * [WP Beginner](http://www.wpbeginner.com/plugins/how-to-fetch-feeds-in-wordpress-using-wp-rss-aggregator/)
70
  * [WPEXplorer](http://www.wpexplorer.com/custom-rss-aggregator-plugin/)
71
  * [WP Kube](http://www.wpkube.com/wp-rss-aggregator-wordpress-review/)
@@ -169,6 +170,9 @@ The full documentation section can be found on the [WP RSS Aggregator website](w
169
 
170
  == Changelog ==
171
 
 
 
 
172
  = 4.6.12 (2015-03-09) =
173
  * Fixed bug: The "Force feed" option was being removed by the Feed to Post add-on.
174
 
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, 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
6
  Requires at least: 3.3
7
  Tested up to: 4.1
8
+ Stable tag: 4.6.13
9
  License: GPLv2 or later
10
  The no.1 RSS feed importer for WordPress. Premium add-ons available for more functionality.
11
 
66
  Instructions for plugin usage are available on the plugin's [documentation page](http://www.wprssaggregator.com/documentation/).
67
 
68
  = As featured on =
69
+ * [Latest WP](http://www.latestwp.com/2015/03/15/wp-rss-aggregator-plugin-review/)
70
  * [WP Beginner](http://www.wpbeginner.com/plugins/how-to-fetch-feeds-in-wordpress-using-wp-rss-aggregator/)
71
  * [WPEXplorer](http://www.wpexplorer.com/custom-rss-aggregator-plugin/)
72
  * [WP Kube](http://www.wpkube.com/wp-rss-aggregator-wordpress-review/)
170
 
171
  == Changelog ==
172
 
173
+ = 4.6.13 (2015-03-20) =
174
+ * Fixed bug: The "Force feed" option wasn't being correctly used.
175
+
176
  = 4.6.12 (2015-03-09) =
177
  * Fixed bug: The "Force feed" option was being removed by the Feed to Post add-on.
178
 
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.6.12
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.6.12
33
  * @since 1.0
34
  * @author Jean Galea <info@wprssaggregator.com>
35
  * @copyright Copyright (c) 2012-2015, 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.6.12', true );
47
 
48
  // Set the database version number of the plugin.
49
  if( !defined( 'WPRSS_DB_VERSION' ) )
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.6.13
7
  Author: Jean Galea
8
  Author URI: http://www.wprssaggregator.com
9
  License: GPLv2
29
 
30
  /**
31
  * @package WPRSSAggregator
32
+ * @version 4.6.13
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.6.13', true );
47
 
48
  // Set the database version number of the plugin.
49
  if( !defined( 'WPRSS_DB_VERSION' ) )