WP RSS Aggregator - Version 4.4.1

Version Description

(2014-08-18) = * Enhanced: Various improvements to the plugin interface and texts. * Enhanced: Moved the restore default settings button farther down the Debugging page, to avoid confusion with the delete button. * Fixed bug: Feed item dates were not being adjusted to the timezone when using a GMT offset. * Fixed bug: Feed item dates are now adjusted according to daylight savings time.

Download this release

Release Info

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

Code changes from version 4.4 to 4.4.1

changelog.txt CHANGED
@@ -1,3 +1,9 @@
 
 
 
 
 
 
1
  4.4 (2014-08-11)
2
  New Feature: Blacklist - delete items and blacklist them to never import them again.
3
  Enhanced: Added a button in the Debugging page to reset the plugin settings to default.
1
+ 4.4.1 (2014-08-18)
2
+ Enhanced: Various improvements to the plugin interface and texts.
3
+ Enhanced: Moved the restore default settings button farther down the Debugging page, to avoid confusion with the delete button.
4
+ Fixed bug: Feed item dates were not being adjusted to the timezone when using a GMT offset.
5
+ Fixed bug: Feed item dates are now adjusted according to daylight savings time.
6
+
7
  4.4 (2014-08-11)
8
  New Feature: Blacklist - delete items and blacklist them to never import them again.
9
  Enhanced: Added a button in the Debugging page to reset the plugin settings to default.
includes/admin-debugging.php CHANGED
@@ -41,13 +41,7 @@
41
  'redirect' => 'edit.php?post_type=wprss_feed&page=wprss-debugging&debug_message=2',
42
  'render' => 'wprss_debug_reimport_feeds',
43
  ),
44
-
45
- 'reset-settings' => array(
46
- 'nonce' => 'wprss-reset-settings',
47
- 'run' => 'wprss_reset_settings',
48
- 'redirect' => 'edit.php?post_type=wprss_feed&page=wprss-debugging&debug_message=4',
49
- 'render' => 'wprss_debug_reset_settings',
50
- ),
51
  )
52
  );
53
 
@@ -61,6 +55,17 @@
61
  )
62
  );
63
 
 
 
 
 
 
 
 
 
 
 
 
64
  return $operations;
65
  }
66
 
@@ -96,7 +101,7 @@
96
  function wprss_debug_update_feeds() {
97
  ?>
98
  <h3><?php _e( 'Update All Feeds Now', 'wprss' ); ?></h3>
99
- <p><?php _e( 'Click the blue button to update all feed items now. This will check all feed sources for any new feed items.', 'wprss' ); ?>
100
  <br><?php _e( 'Existing feed items will not be modified.', 'wprss' ); ?>
101
  </p>
102
  <p><?php _e( '<strong>Note:</strong> This might take more than a few seconds if you have many feed sources.', 'wprss' ); ?></p>
@@ -133,20 +138,20 @@
133
 
134
 
135
  /**
136
- * Render the reset settings button
137
  *
138
  * @since 4.4
139
  */
140
- function wprss_debug_reset_settings() {
141
  ?>
142
- <h3><?php _e( 'Reset Default Settings', 'wprss' ); ?></h3>
143
  <p><?php _e( 'Click the red button to reset the plugin settings to default.', 'wprss' ); ?></p>
144
  <p><?php _e( '<em><strong>Note:</strong> This cannot be undone. Once the settings have been reset, your old settings cannot be restored.</em>', 'wprss' ); ?></p>
145
 
146
  <form action="edit.php?post_type=wprss_feed&page=wprss-debugging" method="post">
147
 
148
- <?php wp_nonce_field( 'wprss-reset-settings' );
149
- submit_button( __( 'Reset Default Settings', 'wprss' ), 'button-red', 'reset-settings', true ); ?>
150
 
151
  </form>
152
  <?php
@@ -209,15 +214,30 @@
209
 
210
  do_action( 'wprss_debugging_before' );
211
 
 
212
  $debug_operations = wprss_get_debug_operations();
213
  foreach( $debug_operations as $id => $data ) {
214
- if ( isset( $data['render'] ) )
 
 
215
  call_user_func( $data['render'] );
 
 
 
216
  }
217
 
218
  do_action( 'wprss_debugging_after' );
219
 
220
- wprss_system_info(); ?>
 
 
 
 
 
 
 
 
 
221
  </div>
222
  <?php
223
  }
@@ -258,7 +278,7 @@
258
  * @since 4.4
259
  */
260
  function wprss_debugging_admin_notice_reset_settings() {
261
- echo '<div class="updated"><p>The plugin settings have been reset.</p></div>';
262
  }
263
 
264
 
@@ -267,13 +287,13 @@
267
  *
268
  * @since 4.4
269
  */
270
- function wprss_reset_settings() {
271
  // Action Hook
272
- do_action( 'wprss_before_reset_settings' );
273
 
274
  // Prepare the settings to reset
275
- $settings_to_reset = apply_filters(
276
- 'wprss_settings_to_reset',
277
  array(
278
  'wprss_settings_general',
279
  'wprss_settings_notices',
@@ -283,10 +303,10 @@
283
  )
284
  );
285
  // Delete the settings
286
- foreach( $settings_to_reset as $setting ) {
287
  delete_option( $setting );
288
  }
289
 
290
  // Action Hook
291
- do_action( 'wprss_after_reset_settings' );
292
- }
41
  'redirect' => 'edit.php?post_type=wprss_feed&page=wprss-debugging&debug_message=2',
42
  'render' => 'wprss_debug_reimport_feeds',
43
  ),
44
+
 
 
 
 
 
 
45
  )
46
  );
47
 
55
  )
56
  );
57
 
58
+ $operations ['restore-settings'] = apply_filters(
59
+ 'wprss_debug_restore_settings_operation',
60
+ array(
61
+ 'nonce' => 'wprss-restore-settings',
62
+ 'run' => 'wprss_restore_settings',
63
+ 'redirect' => 'edit.php?post_type=wprss_feed&page=wprss-debugging&debug_message=4',
64
+ 'render' => 'wprss_debug_restore_settings',
65
+ 'pos' => 'bottom'
66
+ )
67
+ );
68
+
69
  return $operations;
70
  }
71
 
101
  function wprss_debug_update_feeds() {
102
  ?>
103
  <h3><?php _e( 'Update All Feeds Now', 'wprss' ); ?></h3>
104
+ <p><?php _e( 'Click the blue button to update all active feed items now. This will check all feed sources for any new feed items.', 'wprss' ); ?>
105
  <br><?php _e( 'Existing feed items will not be modified.', 'wprss' ); ?>
106
  </p>
107
  <p><?php _e( '<strong>Note:</strong> This might take more than a few seconds if you have many feed sources.', 'wprss' ); ?></p>
138
 
139
 
140
  /**
141
+ * Render the restore settings button
142
  *
143
  * @since 4.4
144
  */
145
+ function wprss_debug_restore_settings() {
146
  ?>
147
+ <h3><?php _e( 'Restore Default Settings', 'wprss' ); ?></h3>
148
  <p><?php _e( 'Click the red button to reset the plugin settings to default.', 'wprss' ); ?></p>
149
  <p><?php _e( '<em><strong>Note:</strong> This cannot be undone. Once the settings have been reset, your old settings cannot be restored.</em>', 'wprss' ); ?></p>
150
 
151
  <form action="edit.php?post_type=wprss_feed&page=wprss-debugging" method="post">
152
 
153
+ <?php wp_nonce_field( 'wprss-restore-settings' );
154
+ submit_button( __( 'Restore Default Settings', 'wprss' ), 'button-red', 'restore-settings', true ); ?>
155
 
156
  </form>
157
  <?php
214
 
215
  do_action( 'wprss_debugging_before' );
216
 
217
+ $bottom = array();
218
  $debug_operations = wprss_get_debug_operations();
219
  foreach( $debug_operations as $id => $data ) {
220
+ if ( !isset( $data['render'] ) ) continue;
221
+ $pos = isset( $data['pos'] ) ? $data['pos'] : 'normal';
222
+ if ( $pos == 'normal' ) {
223
  call_user_func( $data['render'] );
224
+ } elseif( $pos == 'bottom' ) {
225
+ $bottom[$id] = $data;
226
+ }
227
  }
228
 
229
  do_action( 'wprss_debugging_after' );
230
 
231
+ wprss_system_info();
232
+
233
+ if ( count($bottom) > 0 ) {
234
+ foreach( $bottom as $id => $data ) {
235
+ if ( !isset( $data['render'] ) ) continue;
236
+ call_user_func( $data['render'] );
237
+ }
238
+ }
239
+
240
+ ?>
241
  </div>
242
  <?php
243
  }
278
  * @since 4.4
279
  */
280
  function wprss_debugging_admin_notice_reset_settings() {
281
+ echo '<div class="updated"><p>The plugin settings have been reset to default.</p></div>';
282
  }
283
 
284
 
287
  *
288
  * @since 4.4
289
  */
290
+ function wprss_restore_settings() {
291
  // Action Hook
292
+ do_action( 'wprss_before_restore_settings' );
293
 
294
  // Prepare the settings to reset
295
+ $settings_to_restore = apply_filters(
296
+ 'wprss_settings_to_restore',
297
  array(
298
  'wprss_settings_general',
299
  'wprss_settings_notices',
303
  )
304
  );
305
  // Delete the settings
306
+ foreach( $settings_to_restore as $setting ) {
307
  delete_option( $setting );
308
  }
309
 
310
  // Action Hook
311
+ do_action( 'wprss_after_restore_settings' );
312
+ }
includes/admin-display.php CHANGED
@@ -444,7 +444,7 @@
444
  wp_unschedule_event( $next_scheduled, 'wprss_fetch_single_feed_hook', $schedule_args );
445
 
446
  // Get the interval option for the feed source
447
- $interval = get_post_meta( $feed_id, 'wprss_update_interval', TRUE );
448
  // if the feed source uses its own interval
449
  if ( $interval !== '' && $interval !== wprss_get_default_feed_source_update_interval() ) {
450
  // Add meta in feed source. This is used to notify the source that it needs to reschedule it
444
  wp_unschedule_event( $next_scheduled, 'wprss_fetch_single_feed_hook', $schedule_args );
445
 
446
  // Get the interval option for the feed source
447
+ $interval = get_post_meta( $id, 'wprss_update_interval', TRUE );
448
  // if the feed source uses its own interval
449
  if ( $interval !== '' && $interval !== wprss_get_default_feed_source_update_interval() ) {
450
  // Add meta in feed source. This is used to notify the source that it needs to reschedule it
includes/admin-metaboxes.php CHANGED
@@ -3,9 +3,9 @@
3
  add_action( 'add_meta_boxes', 'wprss_add_meta_boxes');
4
  /**
5
  * Set up the input boxes for the wprss_feed post type
6
- *
7
  * @since 2.0
8
- */
9
  function wprss_add_meta_boxes() {
10
  global $wprss_meta_fields;
11
 
@@ -14,7 +14,7 @@
14
 
15
  add_meta_box(
16
  'submitdiv', // $id
17
- __( 'Save Feed Source', 'wprss' ), // $title
18
  'post_submit_meta_box', // $callback
19
  'wprss_feed', // $page
20
  'side', // $context
@@ -22,23 +22,24 @@
22
  );
23
 
24
  add_meta_box(
25
- 'preview_meta_box',
26
- __( 'Feed Preview', 'wprss' ),
27
- 'wprss_preview_meta_box_callback',
28
- 'wprss_feed',
29
- 'side',
30
  'high'
31
  );
32
 
33
  add_meta_box(
34
- 'wprss-feed-processing-meta',
35
- __( 'Feed Processing', 'wprss' ),
36
- 'wprss_feed_processing_meta_box_callback',
37
- 'wprss_feed',
38
- 'side',
39
  'high'
40
  );
41
 
 
42
  add_meta_box(
43
  'wprss-help-meta',
44
  __( 'WP RSS Aggregator Help', 'wprss' ),
@@ -46,17 +47,21 @@
46
  'wprss_feed',
47
  'side',
48
  'low'
49
- );
50
-
51
- add_meta_box(
52
- 'wprss-like-meta',
53
- __( 'Like This Plugin?', 'wprss' ),
54
- 'wprss_like_meta_box_callback',
55
- 'wprss_feed',
56
- 'side',
57
- 'low'
58
- );
 
 
 
59
 
 
60
  add_meta_box(
61
  'wprss-follow-meta',
62
  __( 'Follow Us', 'wprss' ),
@@ -64,20 +69,21 @@
64
  'wprss_feed',
65
  'side',
66
  'low'
67
- );
 
68
 
69
 
70
  add_meta_box(
71
- 'custom_meta_box',
72
- __( 'Feed Source Details', 'wprss' ),
73
- 'wprss_show_meta_box_callback',
74
- 'wprss_feed',
75
- 'normal',
76
  'high'
77
  );
78
 
79
 
80
- }
81
 
82
 
83
  /**
3
  add_action( 'add_meta_boxes', 'wprss_add_meta_boxes');
4
  /**
5
  * Set up the input boxes for the wprss_feed post type
6
+ *
7
  * @since 2.0
8
+ */
9
  function wprss_add_meta_boxes() {
10
  global $wprss_meta_fields;
11
 
14
 
15
  add_meta_box(
16
  'submitdiv', // $id
17
+ __( 'Save Feed Source', 'wprss' ), // $title
18
  'post_submit_meta_box', // $callback
19
  'wprss_feed', // $page
20
  'side', // $context
22
  );
23
 
24
  add_meta_box(
25
+ 'preview_meta_box',
26
+ __( 'Feed Preview', 'wprss' ),
27
+ 'wprss_preview_meta_box_callback',
28
+ 'wprss_feed',
29
+ 'side',
30
  'high'
31
  );
32
 
33
  add_meta_box(
34
+ 'wprss-feed-processing-meta',
35
+ __( 'Feed Processing', 'wprss' ),
36
+ 'wprss_feed_processing_meta_box_callback',
37
+ 'wprss_feed',
38
+ 'side',
39
  'high'
40
  );
41
 
42
+ /*
43
  add_meta_box(
44
  'wprss-help-meta',
45
  __( 'WP RSS Aggregator Help', 'wprss' ),
47
  'wprss_feed',
48
  'side',
49
  'low'
50
+ );
51
+ */
52
+
53
+ if ( !defined('WPRSS_FTP_VERSION') ) {
54
+ add_meta_box(
55
+ 'wprss-like-meta',
56
+ __( 'Like This Plugin?', 'wprss' ),
57
+ 'wprss_like_meta_box_callback',
58
+ 'wprss_feed',
59
+ 'side',
60
+ 'low'
61
+ );
62
+ }
63
 
64
+ /*
65
  add_meta_box(
66
  'wprss-follow-meta',
67
  __( 'Follow Us', 'wprss' ),
69
  'wprss_feed',
70
  'side',
71
  'low'
72
+ );
73
+ */
74
 
75
 
76
  add_meta_box(
77
+ 'custom_meta_box',
78
+ __( 'Feed Source Details', 'wprss' ),
79
+ 'wprss_show_meta_box_callback',
80
+ 'wprss_feed',
81
+ 'normal',
82
  'high'
83
  );
84
 
85
 
86
+ }
87
 
88
 
89
  /**
includes/admin-welcome.php CHANGED
@@ -8,30 +8,48 @@
8
  if ( ! defined( 'ABSPATH' ) ) exit;
9
 
10
 
 
 
 
 
 
 
11
  function wprss_parse_changelog() {
 
12
  $contents = file_get_contents( WPRSS_DIR . 'changelog.txt' );
 
13
  $lines = explode( "\n", $contents );
14
  unset($lines[0]);
15
 
 
16
  $chosen = array();
 
17
  foreach( $lines as $line ) {
 
18
  if ( trim($line) == '' ) {
19
  break;
20
  }
 
21
  $chosen[] = $line;
22
  }
23
 
24
  $final = array();
 
25
  foreach( $chosen as $line ) {
 
26
  $colon = strpos( $line, ":" );
27
- $key = trim( substr( $line, 0, $colon ) );
28
- $val = trim( substr( $line, $colon + 1 ) );
 
 
 
29
  $final[] = array(
30
- 'type' => $key,
31
- 'desc' => $val
32
  );
33
  }
34
 
 
35
  return $final;
36
  }
37
 
8
  if ( ! defined( 'ABSPATH' ) ) exit;
9
 
10
 
11
+ /**
12
+ * Parses the changelog, and returns an array of the last version entry.
13
+ *
14
+ * @since 4.4
15
+ * @return array
16
+ */
17
  function wprss_parse_changelog() {
18
+ // Read changelog file
19
  $contents = file_get_contents( WPRSS_DIR . 'changelog.txt' );
20
+ // Split into lines and remove first line
21
  $lines = explode( "\n", $contents );
22
  unset($lines[0]);
23
 
24
+ // Lines chosen for last changelog entry i.e. lines until an empty line is encountered
25
  $chosen = array();
26
+ // Iterate the lines
27
  foreach( $lines as $line ) {
28
+ // if the line is empty, stop iterating
29
  if ( trim($line) == '' ) {
30
  break;
31
  }
32
+ // otherwise, add it to chosen
33
  $chosen[] = $line;
34
  }
35
 
36
  $final = array();
37
+ // Iterate lines
38
  foreach( $chosen as $line ) {
39
+ // Split by colon
40
  $colon = strpos( $line, ":" );
41
+ // Get the type (New Feature, Enhanced, Fixed Bug)
42
+ $type = trim( substr( $line, 0, $colon ) );
43
+ // Get the description
44
+ $desc = trim( substr( $line, $colon + 1 ) );
45
+ // Add it to the final array
46
  $final[] = array(
47
+ 'type' => $type,
48
+ 'desc' => $desc
49
  );
50
  }
51
 
52
+ // Return the final array
53
  return $final;
54
  }
55
 
includes/custom-post-types.php CHANGED
@@ -19,7 +19,7 @@
19
  'wprss_feed_post_type_labels',
20
  array(
21
  'name' => __( 'Feed Sources', 'wprss' ),
22
- 'singular_name' => __( 'Feed', 'wprss' ),
23
  'add_new' => __( 'Add New', 'wprss' ),
24
  'all_items' => __( 'All Feed Sources', 'wprss' ),
25
  'add_new_item' => __( 'Add New Feed Source', 'wprss' ),
@@ -68,13 +68,13 @@
68
  $labels = apply_filters(
69
  'wprss_feed_item_post_type_labels',
70
  array(
71
- 'name' => __( 'Imported Feeds', 'wprss' ),
72
- 'singular_name' => __( 'Imported Feed', 'wprss' ),
73
- 'all_items' => __( 'Imported Feeds', 'wprss' ),
74
- 'view_item' => __( 'View Imported Feed', 'wprss' ),
75
- 'search_items' => __( 'Search Imported Feeds', 'wprss' ),
76
- 'not_found' => __( 'No Imported Feeds Found', 'wprss' ),
77
- 'not_found_in_trash' => __( 'No Imported Feeds Found In Trash', 'wprss' )
78
  )
79
  );
80
 
@@ -127,4 +127,4 @@
127
 
128
  return $query;
129
  }
130
- add_filter( 'wp_link_query_args', 'wprss_modify_link_builder_query' );
19
  'wprss_feed_post_type_labels',
20
  array(
21
  'name' => __( 'Feed Sources', 'wprss' ),
22
+ 'singular_name' => __( 'Feed Source', 'wprss' ),
23
  'add_new' => __( 'Add New', 'wprss' ),
24
  'all_items' => __( 'All Feed Sources', 'wprss' ),
25
  'add_new_item' => __( 'Add New Feed Source', 'wprss' ),
68
  $labels = apply_filters(
69
  'wprss_feed_item_post_type_labels',
70
  array(
71
+ 'name' => __( 'Feed Items', 'wprss' ),
72
+ 'singular_name' => __( 'Feed Item', 'wprss' ),
73
+ 'all_items' => __( 'Feed Items', 'wprss' ),
74
+ 'view_item' => __( 'View Feed Items', 'wprss' ),
75
+ 'search_items' => __( 'Search Feed Items', 'wprss' ),
76
+ 'not_found' => __( 'No Feed Items Found', 'wprss' ),
77
+ 'not_found_in_trash' => __( 'No Feed Items Found In Trash', 'wprss' )
78
  )
79
  );
80
 
127
 
128
  return $query;
129
  }
130
+ add_filter( 'wp_link_query_args', 'wprss_modify_link_builder_query' );
includes/feed-display.php CHANGED
@@ -195,7 +195,7 @@
195
  // Fallback for feeds created with older versions of the plugin
196
  if ( $source_url === '' ) $source_url = get_post_meta( $feed_source_id, 'wprss_url', true );
197
  // convert from Unix timestamp
198
- $date = date_i18n( wprss_get_general_setting('date_format'), $timestamp );
199
 
200
  // Prepare the title
201
  $feed_item_title = get_the_title();
195
  // Fallback for feeds created with older versions of the plugin
196
  if ( $source_url === '' ) $source_url = get_post_meta( $feed_source_id, 'wprss_url', true );
197
  // convert from Unix timestamp
198
+ $date = wprss_date_i18n( $timestamp );
199
 
200
  // Prepare the title
201
  $feed_item_title = get_the_title();
readme.txt CHANGED
@@ -1,11 +1,11 @@
1
  === WP RSS Aggregator ===
2
- Contributors: jeangalea, wprssaggregator, mekku, xedin.unknown
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: 3.9.1
8
- Stable tag: 4.4
9
  License: GPLv2 or later
10
  Imports and aggregates multiple RSS Feeds using SimplePie. Outputs feeds sorted by date (latest first).
11
 
@@ -51,7 +51,8 @@ Add-Ons that add more functionality to the core plugin are [available for purcha
51
  * [Keyword Filtering](http://www.wprssaggregator.com/extensions/keyword-filtering) - filter imported feeds based on keywords, so you only get items you're interested in.
52
  * [Excerpts & Thumbnails](http://www.wprssaggregator.com/extensions/excerpts-thumbnails) - display excerpts and thumbnails together with the title, date and source.
53
  * [Categories](http://www.wprssaggregator.com/extensions/categories) - categorise your feed sources and display items from a particular category at will within your site.
54
- * [WordAi](http://www.wprssaggregator.com/extension/wordai/) - WordAi allows users to take an RSS feed and turn it into new content that is both completely unique and completely readable..
 
55
 
56
  = Demo =
57
  The core plugin can be seen in use on the [demo page](http://www.wprssaggregator.com/demo/).
@@ -162,6 +163,12 @@ The full documentation section can be found on the [WP RSS Aggregator website](w
162
 
163
  == Changelog ==
164
 
 
 
 
 
 
 
165
  = 4.4 (2014-08-11) =
166
  * New Feature: Blacklist - delete items and blacklist them to never import them again.
167
  * Enhanced: Added a button in the Debugging page to reset the plugin settings to default.
1
  === WP RSS Aggregator ===
2
+ Contributors: jeangalea, wprssaggregator, Mekku, xedin.unknown
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: 3.9.1
8
+ Stable tag: 4.4.1
9
  License: GPLv2 or later
10
  Imports and aggregates multiple RSS Feeds using SimplePie. Outputs feeds sorted by date (latest first).
11
 
51
  * [Keyword Filtering](http://www.wprssaggregator.com/extensions/keyword-filtering) - filter imported feeds based on keywords, so you only get items you're interested in.
52
  * [Excerpts & Thumbnails](http://www.wprssaggregator.com/extensions/excerpts-thumbnails) - display excerpts and thumbnails together with the title, date and source.
53
  * [Categories](http://www.wprssaggregator.com/extensions/categories) - categorise your feed sources and display items from a particular category at will within your site.
54
+ * [WordAi](http://www.wprssaggregator.com/extension/wordai/) - WordAi allows users to take an RSS feed and turn it into new content that is both completely unique and completely readable.
55
+ * [Full Text RSS Feeds](http://www.wprssaggregator.com/extension/full-text-rss-feeds/) - connectivity to our Full Text Premium service, which gives you unlimited feed items returned per feed source.
56
 
57
  = Demo =
58
  The core plugin can be seen in use on the [demo page](http://www.wprssaggregator.com/demo/).
163
 
164
  == Changelog ==
165
 
166
+ = 4.4.1 (2014-08-18) =
167
+ * Enhanced: Various improvements to the plugin interface and texts.
168
+ * Enhanced: Moved the restore default settings button farther down the Debugging page, to avoid confusion with the delete button.
169
+ * Fixed bug: Feed item dates were not being adjusted to the timezone when using a GMT offset.
170
+ * Fixed bug: Feed item dates are now adjusted according to daylight savings time.
171
+
172
  = 4.4 (2014-08-11) =
173
  * New Feature: Blacklist - delete items and blacklist them to never import them again.
174
  * Enhanced: Added a button in the Debugging page to reset the plugin settings to default.
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.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.4
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.4', true );
47
 
48
  // Set the database version number of the plugin.
49
  if( !defined( 'WPRSS_DB_VERSION' ) )
@@ -499,3 +499,66 @@
499
  function wprss_disable() {
500
  return FALSE;
501
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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.4.1
7
  Author: Jean Galea
8
  Author URI: http://www.wprssaggregator.com
9
  License: GPLv2
29
 
30
  /**
31
  * @package WPRSSAggregator
32
+ * @version 4.4.1
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.4.1', true );
47
 
48
  // Set the database version number of the plugin.
49
  if( !defined( 'WPRSS_DB_VERSION' ) )
499
  function wprss_disable() {
500
  return FALSE;
501
  }
502
+
503
+ /**
504
+ * Gets the timezone string that corresponds to the timezone set for
505
+ * this site. If the timezone is a UTC offset, or if it is not set, still
506
+ * returns a valid timezone string.
507
+ * However, if no actual zone exists in the configured offset, the result
508
+ * may be rounded up, or failure.
509
+ *
510
+ * @see http://pl1.php.net/manual/en/function.timezone-name-from-abbr.php
511
+ * @return string A valid timezone string, or false on failure.
512
+ */
513
+ function wprss_get_timezone_string() {
514
+ $tzstring = get_option( 'timezone_string' );
515
+
516
+ if ( empty($tzstring) ) {
517
+ $offset = (int)get_option( 'gmt_offset' );
518
+ $tzstring = timezone_name_from_abbr( '', $offset * 60 * 60, 1 );
519
+ }
520
+
521
+ return $tzstring;
522
+ }
523
+
524
+ /**
525
+ * @see http://wordpress.stackexchange.com/questions/94755/converting-timestamps-to-local-time-with-date-l18n#135049
526
+ * @param string|null $format Format to use. Default: Wordpress date and time format.
527
+ * @param int|null $timestamp The timestamp to localize. Default: time().
528
+ * @return string The formatted datetime, localized and offset for local timezone.
529
+ */
530
+ function wprss_local_date_i18n($timestamp = null, $format = null) {
531
+ $format = is_null($format) ? get_option('date_format') . ' ' . get_option('time_format') : $format;
532
+ $timestamp = $timestamp ?: time();
533
+
534
+ $timezone_str = wprss_get_timezone_string() ?: 'UTC';
535
+ $timezone = new \DateTimeZone($timezone_str);
536
+
537
+ // The date in the local timezone.
538
+ $date = new \DateTime(null, $timezone);
539
+ $date->setTimestamp($timestamp);
540
+ $date_str = $date->format('Y-m-d H:i:s');
541
+
542
+ // Pretend the local date is UTC to get the timestamp
543
+ // to pass to date_i18n().
544
+ $utc_timezone = new \DateTimeZone('UTC');
545
+ $utc_date = new \DateTime($date_str, $utc_timezone);
546
+ $timestamp = $utc_date->getTimestamp();
547
+
548
+ return date_i18n($format, $timestamp, true);
549
+ }
550
+
551
+ /**
552
+ * Gets an internationalized and localized datetime string, defaulting
553
+ * to WP RSS format.
554
+ *
555
+ * @see wprss_local_date_i18n;
556
+ * @param string|null $format Format to use. Default: Wordpress date and time format.
557
+ * @param int|null $timestamp The timestamp to localize. Default: time().
558
+ * @return string The formatted datetime, localized and offset for local timezone.
559
+ */
560
+ function wprss_date_i18n($timestamp = null, $format = null) {
561
+ $format = is_null($format) ? wprss_get_general_setting('date_format') : $format;
562
+
563
+ return wprss_local_date_i18n($timestamp, $format);
564
+ }