WP RSS Aggregator - Version 4.0.2

Version Description

(2014-02-10) = * Enhanced: Added a filter to change the html tags allowed in feed item content.

Download this release

Release Info

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

Code changes from version 4.0 to 4.0.2

changelog.txt CHANGED
@@ -1,3 +1,9 @@
 
 
 
 
 
 
1
  4.0 (2014-02-04)
2
  Enhanced: Improved some internal queries, for better performance.
3
  Fixed bug: Feed limits were not working properly.
1
+ 4.0.2 (2014-02-10)
2
+ Enhanced: Added a filter to change the html tags allowed in feed item content.
3
+
4
+ 4.0.1 (2014-02-08)
5
+ Fixed bug: Empty array of feed items bug caused importing problems.
6
+
7
  4.0 (2014-02-04)
8
  Enhanced: Improved some internal queries, for better performance.
9
  Fixed bug: Feed limits were not working properly.
includes/admin-welcome.php CHANGED
@@ -74,8 +74,7 @@
74
 
75
  <h3>Changelog for v<?php echo WPRSS_VERSION; ?></h3>
76
  <ul>
77
- <li><b>Enhanced:</b> Improved some internal queries, for better performance.</li>
78
- <li><b>Fixed bug:</b> Feed limits were not working properly.</li>
79
  </ul>
80
 
81
 
74
 
75
  <h3>Changelog for v<?php echo WPRSS_VERSION; ?></h3>
76
  <ul>
77
+ <li><b>Enhanced:</b> Added a filter to change the html tags allowed in feed item content.</li>
 
78
  </ul>
79
 
80
 
includes/deprecated-functions.php CHANGED
@@ -30,7 +30,7 @@
30
 
31
  add_filter( 'wp_feed_cache_transient_lifetime' , 'wprss_return_7200' );
32
  //$feed = fetch_feed( $feed_url );
33
- $feed = wprss_fetch_feed( $feed_url );
34
  remove_filter( 'wp_feed_cache_transient_lifetime' , 'wprss_return_7200' );
35
 
36
  // $feed->strip_htmltags( array_merge( $feed->strip_htmltags, array('h1', 'a', 'img') ) );
30
 
31
  add_filter( 'wp_feed_cache_transient_lifetime' , 'wprss_return_7200' );
32
  //$feed = fetch_feed( $feed_url );
33
+ $feed = wprss_fetch_feed( $feed_url, $feed_ID );
34
  remove_filter( 'wp_feed_cache_transient_lifetime' , 'wprss_return_7200' );
35
 
36
  // $feed->strip_htmltags( array_merge( $feed->strip_htmltags, array('h1', 'a', 'img') ) );
includes/feed-importing.php CHANGED
@@ -39,7 +39,7 @@
39
  // Filter the URL for validaty
40
  if ( filter_var( $feed_url, FILTER_VALIDATE_URL ) ) {
41
  // Get the feed items from the source
42
- $items = wprss_get_feed_items( $feed_url );
43
  // If got NULL, convert to an empty array
44
  if ( $items === NULL ) $items = array();
45
 
@@ -59,6 +59,9 @@
59
  foreach( $items as $item ) {
60
  $permalink = $item->get_permalink();
61
  if ( !in_array( $permalink, $existing_permalinks ) ) {
 
 
 
62
  $new_items = array_push( $new_items, $item );
63
  }
64
  }
@@ -107,7 +110,7 @@
107
  *
108
  * @since 3.0
109
  */
110
- function wprss_get_feed_items( $feed_url ) {
111
  $general_settings = get_option( 'wprss_settings_general' );
112
  $feed_item_limit = $general_settings['limit_feed_items_imported'];
113
 
@@ -119,7 +122,7 @@
119
  /* Disable caching of feeds */
120
  add_action( 'wp_feed_options', 'wprss_do_not_cache_feeds' );
121
  /* Fetch the feed from the soure URL specified */
122
- $feed = wprss_fetch_feed( $feed_url );
123
  //$feed = new SimplePie();
124
  //$feed->set_feed_url( $feed_url );
125
  //$feed->init();
@@ -160,7 +163,7 @@
160
  *
161
  * @since 3.5
162
  */
163
- function wprss_fetch_feed( $url ) {
164
  require_once ( ABSPATH . WPINC . '/class-feed.php' );
165
 
166
  $feed = new SimplePie();
@@ -178,8 +181,13 @@
178
 
179
  $feed->set_feed_url( $url );
180
 
181
- $feed->set_cache_duration( apply_filters( 'wp_feed_cache_transient_lifetime', 12 * HOUR_IN_SECONDS, $url ) );
 
182
  do_action_ref_array( 'wp_feed_options', array( &$feed, $url ) );
 
 
 
 
183
  $feed->init();
184
  $feed->handle_content_type();
185
 
39
  // Filter the URL for validaty
40
  if ( filter_var( $feed_url, FILTER_VALIDATE_URL ) ) {
41
  // Get the feed items from the source
42
+ $items = wprss_get_feed_items( $feed_url, $feed_ID );
43
  // If got NULL, convert to an empty array
44
  if ( $items === NULL ) $items = array();
45
 
59
  foreach( $items as $item ) {
60
  $permalink = $item->get_permalink();
61
  if ( !in_array( $permalink, $existing_permalinks ) ) {
62
+ if ( ! is_array( $new_items ) ) {
63
+ $new_items = array();
64
+ }
65
  $new_items = array_push( $new_items, $item );
66
  }
67
  }
110
  *
111
  * @since 3.0
112
  */
113
+ function wprss_get_feed_items( $feed_url, $source ) {
114
  $general_settings = get_option( 'wprss_settings_general' );
115
  $feed_item_limit = $general_settings['limit_feed_items_imported'];
116
 
122
  /* Disable caching of feeds */
123
  add_action( 'wp_feed_options', 'wprss_do_not_cache_feeds' );
124
  /* Fetch the feed from the soure URL specified */
125
+ $feed = wprss_fetch_feed( $feed_url, $source );
126
  //$feed = new SimplePie();
127
  //$feed->set_feed_url( $feed_url );
128
  //$feed->init();
163
  *
164
  * @since 3.5
165
  */
166
+ function wprss_fetch_feed( $url, $source = NULL ) {
167
  require_once ( ABSPATH . WPINC . '/class-feed.php' );
168
 
169
  $feed = new SimplePie();
181
 
182
  $feed->set_feed_url( $url );
183
 
184
+ //$feed->set_cache_duration( apply_filters( 'wp_feed_cache_transient_lifetime', 12 * HOUR_IN_SECONDS, $url ) );
185
+ $feed->enable_cache( FALSE );
186
  do_action_ref_array( 'wp_feed_options', array( &$feed, $url ) );
187
+
188
+ $tags_to_strip = apply_filters( 'wprss_feed_tags_to_strip', $feed->strip_htmltags, $source );
189
+ $feed->strip_htmltags( $tags_to_strip );
190
+
191
  $feed->init();
192
  $feed->handle_content_type();
193
 
js/admin-custom.js CHANGED
@@ -4,6 +4,30 @@ function fetch_items_row_action_callback(){
4
  var original_text = link.text();
5
  var id = link.attr('pid');
6
  var url = link.attr('purl');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7
  jQuery.post(
8
  url,
9
  {
@@ -16,7 +40,7 @@ function fetch_items_row_action_callback(){
16
  link.text( original_text ).click( fetch_items_row_action_callback );
17
  }, 3500 );
18
  }
19
- );
20
  link.text('Please wait ...');
21
  link.unbind('click');
22
  };
4
  var original_text = link.text();
5
  var id = link.attr('pid');
6
  var url = link.attr('purl');
7
+
8
+ jQuery.ajax({
9
+ url: url,
10
+ type: 'POST',
11
+ data: {
12
+ 'action': 'wprss_fetch_feeds_row_action',
13
+ 'id': id
14
+ },
15
+ success: function( response, status, jqXHR ){
16
+ console.log( jqXHR );
17
+ link.text( 'Feed items imported!' );
18
+ setTimeout( function(){
19
+ link.text( original_text ).click( fetch_items_row_action_callback );
20
+ }, 3500 );
21
+ },
22
+ error: function( response ){
23
+ link.text( 'Failed to import: ' + response );
24
+ setTimeout( function(){
25
+ link.text( original_text ).click( fetch_items_row_action_callback );
26
+ }, 3500 );
27
+ },
28
+ timeout: 60000 // set timeout to 1 minute
29
+ });
30
+ /*
31
  jQuery.post(
32
  url,
33
  {
40
  link.text( original_text ).click( fetch_items_row_action_callback );
41
  }, 3500 );
42
  }
43
+ );*/
44
  link.text('Please wait ...');
45
  link.unbind('click');
46
  };
readme.txt CHANGED
@@ -4,8 +4,8 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_i
4
  Plugin URI: http://www.wprssaggregator.com
5
  Tags: rss, feeds, aggregation, 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.8
8
- Stable tag: 4.0
9
  License: GPLv2 or later
10
  Imports and aggregates multiple RSS Feeds using SimplePie. Outputs feeds sorted by date (latest first).
11
 
@@ -145,6 +145,12 @@ Yes, within the [Feed to Post](http://www.wprssaggregator.com/extensions/feed-to
145
 
146
  == Changelog ==
147
 
 
 
 
 
 
 
148
  = 4.0 (2014-02-04) =
149
  * Enhanced: Improved some internal queries, for better performance.
150
  * Fixed bug: Feed limits were not working properly.
4
  Plugin URI: http://www.wprssaggregator.com
5
  Tags: rss, feeds, aggregation, 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.8.1
8
+ Stable tag: 4.0.2
9
  License: GPLv2 or later
10
  Imports and aggregates multiple RSS Feeds using SimplePie. Outputs feeds sorted by date (latest first).
11
 
145
 
146
  == Changelog ==
147
 
148
+ = 4.0.2 (2014-02-10) =
149
+ * Enhanced: Added a filter to change the html tags allowed in feed item content.
150
+
151
+ = 4.0.1 (2014-02-08) =
152
+ * Fixed bug: Empty array of feed items bug caused importing problems.
153
+
154
  = 4.0 (2014-02-04) =
155
  * Enhanced: Improved some internal queries, for better performance.
156
  * Fixed bug: Feed limits were not working properly.
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.0
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.0
33
  * @since 1.0
34
  * @author Jean Galea <info@jeangalea.com>
35
  * @copyright Copyright (c) 2012-2013, 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.0', 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.0.2
7
  Author: Jean Galea
8
  Author URI: http://www.wprssaggregator.com
9
  License: GPLv2
29
 
30
  /**
31
  * @package WPRSSAggregator
32
+ * @version 4.0.2
33
  * @since 1.0
34
  * @author Jean Galea <info@jeangalea.com>
35
  * @copyright Copyright (c) 2012-2013, Jean Galea
43
 
44
  // Set the version number of the plugin.
45
  if( !defined( 'WPRSS_VERSION' ) )
46
+ define( 'WPRSS_VERSION', '4.0.2', true );
47
 
48
  // Set the database version number of the plugin.
49
  if( !defined( 'WPRSS_DB_VERSION' ) )