WP RSS Aggregator - Version 4.1.2

Version Description

(2014-04-22) = * Enhanced: Improved the custom feed, by allowing a custom title. * Enhanced: Improved shortcode, by adding the "pagination" parameter. * Enhanced: Modified a filter to fix some bugs in the add-ons.

Download this release

Release Info

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

Code changes from version 4.1.1 to 4.1.2

changelog.txt CHANGED
@@ -1,3 +1,8 @@
 
 
 
 
 
1
  4.1.1 (2014-04-09)
2
  Enhanced: Tracking notices only appear for admin users.
3
  Fixed bug: Auto Feed Discovery was not working.
1
+ 4.1.2 (2014-04-22)
2
+ Enhanced: Improved the custom feed, by allowing a custom title.
3
+ Enhanced: Improved shortcode, by adding the "pagination" parameter.
4
+ Enhanced: Modified a filter to fix some bugs in the add-ons.
5
+
6
  4.1.1 (2014-04-09)
7
  Enhanced: Tracking notices only appear for admin users.
8
  Fixed bug: Auto Feed Discovery was not working.
css/admin-styles.css CHANGED
@@ -186,6 +186,12 @@ input#thumbnails-width {
186
  }
187
 
188
 
 
 
 
 
 
 
189
  /* Number Roller for Feed Source Limit */
190
  .wprss-number-roller {
191
  width: 120px;
186
  }
187
 
188
 
189
+ @media screen and (min-width: 782px) {
190
+ #custom_feed_title {
191
+ width: 400px;
192
+ }
193
+ }
194
+
195
  /* Number Roller for Feed Source Limit */
196
  .wprss-number-roller {
197
  width: 120px;
includes/admin-metaboxes.php CHANGED
@@ -278,7 +278,7 @@
278
  // loop through fields and save the data
279
  foreach ( $meta_fields as $field ) {
280
  $old = get_post_meta( $post_id, $field[ 'id' ], true );
281
- $new = $_POST[ $field[ 'id' ] ];
282
  if ( $new && $new != $old ) {
283
  update_post_meta( $post_id, $field[ 'id' ], $new );
284
  } elseif ( '' == $new && $old ) {
278
  // loop through fields and save the data
279
  foreach ( $meta_fields as $field ) {
280
  $old = get_post_meta( $post_id, $field[ 'id' ], true );
281
+ $new = trim( $_POST[ $field[ 'id' ] ] );
282
  if ( $new && $new != $old ) {
283
  update_post_meta( $post_id, $field[ 'id' ], $new );
284
  } elseif ( '' == $new && $old ) {
includes/admin-options.php CHANGED
@@ -82,7 +82,11 @@
82
  ),
83
  'custom-feed-url' => array(
84
  'label' => __( 'Custom feed URL', 'wprss' ),
85
- 'callback' => 'wprss_setings_custom_feed_url_callback'
 
 
 
 
86
  ),
87
  'custom-feed-limit' => array(
88
  'label' => __( 'Custom feed limit', 'wprss' ),
@@ -587,10 +591,20 @@
587
  * Sets the custom feed URL
588
  * @since 3.3
589
  */
590
- function wprss_setings_custom_feed_url_callback() {
591
  $custom_feed_url = wprss_get_general_setting( 'custom_feed_url' );
592
  echo "<input id='custom_feed_url' name='wprss_settings_general[custom_feed_url]' type='text' value='$custom_feed_url' />";
593
- echo "<label class='description' for='custom_feed_url'>" . __( 'Custom feed URL', 'wprss' ) . "</label>";
 
 
 
 
 
 
 
 
 
 
594
  }
595
 
596
  /**
82
  ),
83
  'custom-feed-url' => array(
84
  'label' => __( 'Custom feed URL', 'wprss' ),
85
+ 'callback' => 'wprss_settings_custom_feed_url_callback'
86
+ ),
87
+ 'custom-feed-title' => array(
88
+ 'label' => __( 'Custom feed Title', 'wprss' ),
89
+ 'callback' => 'wprss_settings_custom_feed_title_callback'
90
  ),
91
  'custom-feed-limit' => array(
92
  'label' => __( 'Custom feed limit', 'wprss' ),
591
  * Sets the custom feed URL
592
  * @since 3.3
593
  */
594
+ function wprss_settings_custom_feed_url_callback() {
595
  $custom_feed_url = wprss_get_general_setting( 'custom_feed_url' );
596
  echo "<input id='custom_feed_url' name='wprss_settings_general[custom_feed_url]' type='text' value='$custom_feed_url' />";
597
+ echo "<label class='description' for='custom_feed_url'>" . __( 'The URL of the custom feed. This might require you to re-save your Permalink settings for the custom feed to work.', 'wprss' ) . "</label>";
598
+ }
599
+
600
+ /**
601
+ * Sets the custom feed title
602
+ * @since 4.1.2
603
+ */
604
+ function wprss_settings_custom_feed_title_callback() {
605
+ $custom_feed_title = wprss_get_general_setting( 'custom_feed_title' );
606
+ echo "<input id='custom_feed_title' name='wprss_settings_general[custom_feed_title]' type='text' value='$custom_feed_title' />";
607
+ echo "<label class='description' for='custom_feed_title'>" . __( 'The title of the custom feed', 'wprss' ) . "</label>";
608
  }
609
 
610
  /**
includes/admin-welcome.php CHANGED
@@ -74,8 +74,9 @@
74
 
75
  <h3>Changelog for v<?php echo WPRSS_VERSION; ?></h3>
76
  <ul>
77
- <li><strong>Enhanced:</strong> Tracking notices only appear for admin users.</li>
78
- <li><strong>Fixed bug:</strong> Auto Feed Discovery was not working.</li>
 
79
  </ul>
80
 
81
 
74
 
75
  <h3>Changelog for v<?php echo WPRSS_VERSION; ?></h3>
76
  <ul>
77
+ <li><strong>Enhanced:</strong> Improved the custom feed, by allowing a custom title.</li>
78
+ <li><strong>Enhanced:</strong> Improved shortcode, by adding the "pagination" parameter.</li>
79
+ <li><strong>Enhanced:</strong> Modified a filter to fix some bugs in the add-ons.</li>
80
  </ul>
81
 
82
 
includes/custom-feed.php CHANGED
@@ -102,6 +102,8 @@
102
  // Submit the query to get latest feed items
103
  query_posts( $wprss_custom_feed_query );
104
 
 
 
105
  // Send content header and start ATOM output
106
  header('Content-Type: text/xml');
107
  // Disabling caching
@@ -111,7 +113,7 @@
111
  echo '<?xml version="1.0" encoding="' . get_option('blog_charset') . '"?' . '>';
112
  ?>
113
  <feed xmlns="http://www.w3.org/2005/Atom" xmlns:media="http://search.yahoo.com/mrss/" >
114
- <title type="text">Latest imported feed items on <?php bloginfo_rss('name'); ?></title>
115
  <?php
116
  // Start the Loop
117
  while ( have_posts() ) : the_post();
102
  // Submit the query to get latest feed items
103
  query_posts( $wprss_custom_feed_query );
104
 
105
+ $custom_feed_title = wprss_get_general_setting( 'custom_feed_title' );
106
+
107
  // Send content header and start ATOM output
108
  header('Content-Type: text/xml');
109
  // Disabling caching
113
  echo '<?xml version="1.0" encoding="' . get_option('blog_charset') . '"?' . '>';
114
  ?>
115
  <feed xmlns="http://www.w3.org/2005/Atom" xmlns:media="http://search.yahoo.com/mrss/" >
116
+ <title type="text"><?php echo $custom_feed_title; ?></title>
117
  <?php
118
  // Start the Loop
119
  while ( have_posts() ) : the_post();
includes/feed-display.php CHANGED
@@ -104,6 +104,13 @@
104
  'suppress_filters' => true
105
  );
106
 
 
 
 
 
 
 
 
107
  if ( isset( $settings['no-paged'] ) && $settings['no-paged'] === TRUE ) {
108
  unset( $feed_items_args['no-paged'] );
109
  }
@@ -243,7 +250,9 @@
243
  }
244
  $output .= "$links_after";
245
 
246
- $output = apply_filters( 'wprss_pagination', $output );
 
 
247
 
248
  $output = apply_filters( 'feed_output', $output );
249
 
@@ -318,6 +327,10 @@
318
  ) );
319
  }
320
 
 
 
 
 
321
  if ( isset( $args['source'] ) ) {
322
  $query_args['source'] = $args['source'];
323
  }
104
  'suppress_filters' => true
105
  );
106
 
107
+ if ( isset($settings['pagination']) ) {
108
+ $pagination = strtolower( $settings['pagination'] );
109
+ if ( in_array($pagination, array('false','off','0',0)) ) {
110
+ unset( $feed_items_args['paged'] );
111
+ }
112
+ }
113
+
114
  if ( isset( $settings['no-paged'] ) && $settings['no-paged'] === TRUE ) {
115
  unset( $feed_items_args['no-paged'] );
116
  }
250
  }
251
  $output .= "$links_after";
252
 
253
+ if ( !isset( $args['pagination'] ) || !in_array( $args['pagination'], array('off','false','0',0) ) ) {
254
+ $output = apply_filters( 'wprss_pagination', $output );
255
+ }
256
 
257
  $output = apply_filters( 'feed_output', $output );
258
 
327
  ) );
328
  }
329
 
330
+ if ( isset( $args['pagination'] ) ) {
331
+ $query_args['pagination'] = $args['pagination'];
332
+ }
333
+
334
  if ( isset( $args['source'] ) ) {
335
  $query_args['source'] = $args['source'];
336
  }
includes/feed-importing.php CHANGED
@@ -166,6 +166,9 @@
166
  function wprss_fetch_feed( $url, $source = NULL ) {
167
  require_once ( ABSPATH . WPINC . '/class-feed.php' );
168
 
 
 
 
169
  $feed = new SimplePie();
170
 
171
  // Commented out Sanitization, due to a conflict with google RSS image URLS.
166
  function wprss_fetch_feed( $url, $source = NULL ) {
167
  require_once ( ABSPATH . WPINC . '/class-feed.php' );
168
 
169
+ // Trim the URL
170
+ $url = trim( $url );
171
+
172
  $feed = new SimplePie();
173
 
174
  // Commented out Sanitization, due to a conflict with google RSS image URLS.
includes/feed-processing.php CHANGED
@@ -89,7 +89,7 @@
89
  'compare' => 'LIKE',
90
  ),
91
  )
92
- )
93
  );
94
  return new WP_Query( $args );
95
  }
89
  'compare' => 'LIKE',
90
  ),
91
  )
92
+ ), $source_id
93
  );
94
  return new WP_Query( $args );
95
  }
includes/update.php CHANGED
@@ -230,6 +230,9 @@
230
 
231
  // tracking
232
  'tracking' => 0,
 
 
 
233
  )
234
  );
235
 
230
 
231
  // tracking
232
  'tracking' => 0,
233
+
234
+ // from version 4.1.2
235
+ 'custom_feed_title' => 'Latest imported feed items on ' . get_bloginfo('name'),
236
  )
237
  );
238
 
readme.txt CHANGED
@@ -5,7 +5,7 @@ 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.1.1
9
  License: GPLv2 or later
10
  Imports and aggregates multiple RSS Feeds using SimplePie. Outputs feeds sorted by date (latest first).
11
 
@@ -161,6 +161,11 @@ The full documentation section can be found on the [WP RSS Aggregator website](w
161
 
162
  == Changelog ==
163
 
 
 
 
 
 
164
  = 4.1.1 (2014-04-09) =
165
  * Enhanced: Tracking notices only appear for admin users.
166
  * Fixed bug: Auto Feed Discovery was not working.
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.1.2
9
  License: GPLv2 or later
10
  Imports and aggregates multiple RSS Feeds using SimplePie. Outputs feeds sorted by date (latest first).
11
 
161
 
162
  == Changelog ==
163
 
164
+ = 4.1.2 (2014-04-22) =
165
+ * Enhanced: Improved the custom feed, by allowing a custom title.
166
+ * Enhanced: Improved shortcode, by adding the "pagination" parameter.
167
+ * Enhanced: Modified a filter to fix some bugs in the add-ons.
168
+
169
  = 4.1.1 (2014-04-09) =
170
  * Enhanced: Tracking notices only appear for admin users.
171
  * Fixed bug: Auto Feed Discovery was not working.
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.1.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.1.1
33
  * @since 1.0
34
  * @author Jean Galea <info@jeangalea.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.1.1', 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.1.2
7
  Author: Jean Galea
8
  Author URI: http://www.wprssaggregator.com
9
  License: GPLv2
29
 
30
  /**
31
  * @package WPRSSAggregator
32
+ * @version 4.1.2
33
  * @since 1.0
34
  * @author Jean Galea <info@jeangalea.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.1.2', true );
47
 
48
  // Set the database version number of the plugin.
49
  if( !defined( 'WPRSS_DB_VERSION' ) )