WP RSS Aggregator - Version 4.0.4

Version Description

(2014-02-17) = * Enhanced: Added Activate/Pause bulk actions in the Feed Sources page. * Enhanced: Feed Sources page table has been re-designed. * Enhanced: Logging is now site dependant on multisite. * Fixed bug: Undefined display settings where appearing on the front end.

Download this release

Release Info

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

Code changes from version 4.0.3 to 4.0.4

changelog.txt CHANGED
@@ -1,3 +1,9 @@
 
 
 
 
 
 
1
  4.0.3 (2014-02-12)
2
  Fixed bug: The general setting for deleting feed items by age was not working.
3
 
1
+ 4.0.4 (2014-02-22)
2
+ Enhanced: Added Activate/Pause bulk actions in the Feed Sources page.
3
+ Enhanced: Feed Sources page table has been re-designed.
4
+ Enhanced: Logging is now site dependant on multisite.
5
+ Fixed bug: Undefined display settings where appearing on the front end.
6
+
7
  4.0.3 (2014-02-12)
8
  Fixed bug: The general setting for deleting feed items by age was not working.
9
 
css/admin-styles.css CHANGED
@@ -286,12 +286,42 @@ div.inside .wprss-meta-side-setting:last-child {
286
  }
287
 
288
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
289
  .column-title { text-align: left; width:20% !important; overflow:hidden }
290
  .column-url { text-align: left; width:40% !important; overflow:hidden }
291
  .column-category { text-align: left; width:15% !important; overflow:hidden }
292
  .column-id { text-align: left; width:5% !important; overflow:hidden }
293
  .column-next-update { text-align: left; width:10% !important; overflow:hidden }
294
  .column-state { text-align: left; width:10% !important; overflow:hidden }
 
295
 
296
 
297
  /* Log textarea styles */
286
  }
287
 
288
 
289
+ /******************************
290
+ * FEED SOURCES PAGE COLUMNS
291
+ */
292
+ body.post-type-wprss_feed.edit-php table.wp-list-table.posts thead th {
293
+ text-align: left;
294
+ overflow: hidden;
295
+ }
296
+ /* ID */
297
+ body.post-type-wprss_feed.edit-php table.wp-list-table.posts thead th#id {
298
+ width: 50px !important;
299
+ }
300
+ /* NEXT UPDATE */
301
+ body.post-type-wprss_feed.edit-php table.wp-list-table.posts thead th#next-update {
302
+ width: 120px !important;
303
+ }
304
+ /* STATE */
305
+ body.post-type-wprss_feed.edit-php table.wp-list-table.posts thead th#state {
306
+ width: 100px !important;
307
+ }
308
+ /* FEED COUNT */
309
+ body.post-type-wprss_feed.edit-php table.wp-list-table.posts thead th#feed-count {
310
+ width: 120px !important;
311
+ }
312
+ /* CATEGORIES */
313
+ body.post-type-wprss_feed.edit-php table.wp-list-table.posts thead th#category {
314
+ width: 120px !important;
315
+ }
316
+
317
+ /*
318
  .column-title { text-align: left; width:20% !important; overflow:hidden }
319
  .column-url { text-align: left; width:40% !important; overflow:hidden }
320
  .column-category { text-align: left; width:15% !important; overflow:hidden }
321
  .column-id { text-align: left; width:5% !important; overflow:hidden }
322
  .column-next-update { text-align: left; width:10% !important; overflow:hidden }
323
  .column-state { text-align: left; width:10% !important; overflow:hidden }
324
+ */
325
 
326
 
327
  /* Log textarea styles */
includes/admin-debugging.php CHANGED
@@ -150,7 +150,7 @@
150
  *
151
  * @since 3.0
152
  */
153
- function wprss_debugging_page_display() {
154
  $debug_messages = apply_filters(
155
  'wprss_debug_messages',
156
  array(
150
  *
151
  * @since 3.0
152
  */
153
+ function wprss_debugging_page_display() {
154
  $debug_messages = apply_filters(
155
  'wprss_debug_messages',
156
  array(
includes/admin-display.php CHANGED
@@ -15,19 +15,19 @@
15
  function wprss_set_feed_custom_columns( $columns ) {
16
 
17
  $columns = array(
18
- 'cb' => '<input type="checkbox" />',
19
- 'title' => __( 'Name', 'wprss' ),
20
- 'url' => __( 'URL', 'wprss' ),
21
- // 'description' => __( 'Description', 'wprss' )
 
22
  );
23
 
24
  $columns = apply_filters( 'wprss_set_feed_custom_columns', $columns );
25
- $columns['id'] = __( 'ID', 'wprss' );
26
 
27
  // Columns to add when feed is not trashed
28
  if ( !isset( $_GET['post_status'] ) || $_GET['post_status'] !== 'trash' ) {
29
- $columns['next-update'] = __( 'Next Update', 'wprss' );
30
  $columns['state'] = __( 'State', 'wprss' );
 
31
  $columns['feed-count'] = __( apply_filters( 'wprss_feed_items_count_column', 'Imported items' ), 'wprss' );
32
  }
33
 
15
  function wprss_set_feed_custom_columns( $columns ) {
16
 
17
  $columns = array(
18
+ 'cb' => '<input type="checkbox" />',
19
+ 'title' => __( 'Name', 'wprss' ),
20
+ 'id' => __( 'ID', 'wprss' ),
21
+ // 'url' => __( 'URL', 'wprss' ),
22
+ // 'description' => __( 'Description', 'wprss' )
23
  );
24
 
25
  $columns = apply_filters( 'wprss_set_feed_custom_columns', $columns );
 
26
 
27
  // Columns to add when feed is not trashed
28
  if ( !isset( $_GET['post_status'] ) || $_GET['post_status'] !== 'trash' ) {
 
29
  $columns['state'] = __( 'State', 'wprss' );
30
+ $columns['next-update'] = __( 'Next Update', 'wprss' );
31
  $columns['feed-count'] = __( apply_filters( 'wprss_feed_items_count_column', 'Imported items' ), 'wprss' );
32
  }
33
 
includes/admin-log.php CHANGED
@@ -1,13 +1,23 @@
1
  <?php
2
 
3
 
 
 
 
 
 
 
 
 
 
 
4
  /**
5
  * Clears the log file.
6
  *
7
  * @since 3.9.6
8
  */
9
  function wprss_clear_log() {
10
- file_put_contents( WPRSS_LOG_FILE, '' );
11
  }
12
 
13
 
@@ -37,7 +47,7 @@
37
  $str = "[$date] $source:\n";
38
  $str .= str_repeat(' ', strlen( strval( $date ) ) + 3 );
39
  $str .= "$message\n";
40
- file_put_contents( WPRSS_LOG_FILE , $str, FILE_APPEND );
41
 
42
  add_action( 'shutdown', 'wprss_log_separator' );
43
  }
@@ -58,14 +68,14 @@
58
  * @since 3.9.6
59
  */
60
  function wprss_get_log() {
61
- if ( !file_exists( WPRSS_LOG_FILE ) ) {
62
  wprss_clear_log();
63
  }
64
- $contents = file_get_contents( WPRSS_LOG_FILE , '' );
65
  // Trim the log file to a fixed number of chars
66
  $limit = 10000;
67
  if ( strlen( $contents ) > $limit ) {
68
- file_put_contents( WPRSS_LOG_FILE, substr( $contents, 0, $limit ) );
69
  return wprss_get_log();
70
  } else {
71
  return $contents;
@@ -82,5 +92,5 @@
82
  * @since 3.9.6
83
  */
84
  function wprss_log_separator() {
85
- file_put_contents( WPRSS_LOG_FILE, "\n", FILE_APPEND );
86
  }
1
  <?php
2
 
3
 
4
+ /**
5
+ * Returns the log file path.
6
+ *
7
+ * @since 4.0.4
8
+ */
9
+ function wprss_log_file() {
10
+ return WPRSS_LOG_FILE . '-' . get_current_blog_id() . WPRSS_LOG_FILE_EXT;
11
+ }
12
+
13
+
14
  /**
15
  * Clears the log file.
16
  *
17
  * @since 3.9.6
18
  */
19
  function wprss_clear_log() {
20
+ file_put_contents( wprss_log_file(), '' );
21
  }
22
 
23
 
47
  $str = "[$date] $source:\n";
48
  $str .= str_repeat(' ', strlen( strval( $date ) ) + 3 );
49
  $str .= "$message\n";
50
+ file_put_contents( wprss_log_file() , $str, FILE_APPEND );
51
 
52
  add_action( 'shutdown', 'wprss_log_separator' );
53
  }
68
  * @since 3.9.6
69
  */
70
  function wprss_get_log() {
71
+ if ( !file_exists( wprss_log_file() ) ) {
72
  wprss_clear_log();
73
  }
74
+ $contents = file_get_contents( wprss_log_file() , '' );
75
  // Trim the log file to a fixed number of chars
76
  $limit = 10000;
77
  if ( strlen( $contents ) > $limit ) {
78
+ file_put_contents( wprss_log_file(), substr( $contents, 0, $limit ) );
79
  return wprss_get_log();
80
  } else {
81
  return $contents;
92
  * @since 3.9.6
93
  */
94
  function wprss_log_separator() {
95
+ file_put_contents( wprss_log_file(), "\n", FILE_APPEND );
96
  }
includes/admin-options.php CHANGED
@@ -136,6 +136,10 @@
136
  'label' => __( 'Date format', 'wprss' ),
137
  'callback' => 'wprss_setting_date_format_callback'
138
  ),
 
 
 
 
139
  'text-preceding-date' => array(
140
  'label' => __( 'Text preceding date', 'wprss' ),
141
  'callback' => 'wprss_setting_text_preceding_date_callback'
@@ -345,7 +349,7 @@
345
  echo "<input type='hidden' name='wprss_settings_general[follow_dd]' value='follow'>";
346
  echo "<input type='checkbox' id='follow-dd' name='wprss_settings_general[follow_dd]' value='no_follow' $checked_attr>";
347
 
348
- echo '<label class="description" id="follow-dd">';
349
  echo '"Nofollow" provides a way for webmasters to tell search engines "Don\'t follow links on this page" or "Don\'t follow this specific link."';
350
  echo '</label>';
351
  }
@@ -658,6 +662,16 @@
658
  echo "<p class='description'>No sensitive data will be sent.</p>";
659
  }
660
 
 
 
 
 
 
 
 
 
 
 
661
 
662
  /**
663
  * Pretty-prints the difference in two times.
@@ -810,6 +824,10 @@
810
  function wprss_settings_license_keys_validate( $input ) {
811
  // Get the current licenses option
812
  $licenses = get_option( 'wprss_settings_license_keys' );
 
 
 
 
813
  // For each entry in the received input
814
  foreach ( $input as $addon => $license_code ) {
815
  // If the entry does not exist OR the code is different
136
  'label' => __( 'Date format', 'wprss' ),
137
  'callback' => 'wprss_setting_date_format_callback'
138
  ),
139
+ 'time-ago-format-enable' => array(
140
+ 'label' => __( 'Time ago format', 'wprss' ),
141
+ 'callback' => 'wprss_setting_time_ago_format_enable_callback'
142
+ ),
143
  'text-preceding-date' => array(
144
  'label' => __( 'Text preceding date', 'wprss' ),
145
  'callback' => 'wprss_setting_text_preceding_date_callback'
349
  echo "<input type='hidden' name='wprss_settings_general[follow_dd]' value='follow'>";
350
  echo "<input type='checkbox' id='follow-dd' name='wprss_settings_general[follow_dd]' value='no_follow' $checked_attr>";
351
 
352
+ echo '<label class="description" for="follow-dd">';
353
  echo '"Nofollow" provides a way for webmasters to tell search engines "Don\'t follow links on this page" or "Don\'t follow this specific link."';
354
  echo '</label>';
355
  }
662
  echo "<p class='description'>No sensitive data will be sent.</p>";
663
  }
664
 
665
+ /**
666
+ * Time ago format checkbox
667
+ * @since 4.2
668
+ */
669
+ function wprss_setting_time_ago_format_enable_callback() {
670
+ $time_ago_format = wprss_get_general_setting( 'time_ago_format_enable' );
671
+ echo "<input type='checkbox' id='time-ago-format' name='wprss_settings_general[time_ago_format_enable]' value='1' " . checked( 1, $time_ago_format, false ) . " />";
672
+ echo "<label class='description' for='time-ago-format'>Check this box to show time since update e.g.: 2 hours ago.</label>";
673
+ }
674
+
675
 
676
  /**
677
  * Pretty-prints the difference in two times.
824
  function wprss_settings_license_keys_validate( $input ) {
825
  // Get the current licenses option
826
  $licenses = get_option( 'wprss_settings_license_keys' );
827
+ // If no licenses have been defined yet, create an empty array
828
+ if ( !is_array( $licenses ) ) {
829
+ $licenses = array();
830
+ }
831
  // For each entry in the received input
832
  foreach ( $input as $addon => $license_code ) {
833
  // If the entry does not exist OR the code is different
includes/admin-welcome.php CHANGED
@@ -74,7 +74,10 @@
74
 
75
  <h3>Changelog for v<?php echo WPRSS_VERSION; ?></h3>
76
  <ul>
77
- <li><b>Fixed bug:</b> The general setting for deleting feed items by age was not working.</li>
 
 
 
78
  </ul>
79
 
80
 
74
 
75
  <h3>Changelog for v<?php echo WPRSS_VERSION; ?></h3>
76
  <ul>
77
+ <li><b>Enhanced:</b> Added Activate/Pause bulk actions in the Feed Sources page.</li>
78
+ <li><b>Enhanced:</b> Feed Sources page table has been re-designed.</li>
79
+ <li><b>Enhanced:</b> Logging is now site dependant on multisite.</li>
80
+ <li><b>Fixed bug:</b> Undefined display settings where appearing on the front end.</li>
81
  </ul>
82
 
83
 
includes/cron-jobs.php CHANGED
@@ -6,6 +6,11 @@
6
  */
7
 
8
 
 
 
 
 
 
9
  add_action( 'init', 'wprss_schedule_fetch_all_feeds_cron' );
10
  /**
11
  * Creates the cron to fetch feeds every hour
@@ -140,38 +145,6 @@
140
  }
141
 
142
 
143
- add_action( 'wprss_activate_feed_schedule_hook', 'wprss_activate_feed_source', 10, 1 );
144
- /**
145
- * Activates the feed source. Runs on a schedule.
146
- *
147
- * @param $feed_id The of of the wprss_feed
148
- * @since 3.7
149
- */
150
- function wprss_activate_feed_source( $feed_id ) {
151
- update_post_meta( $feed_id, 'wprss_state', 'active' );
152
- update_post_meta( $feed_id, 'wprss_activate_feed', '' );
153
-
154
- // Add an action hook, so functions can be run when a feed source is activated
155
- do_action( 'wprss_on_feed_source_activated', $feed_id );
156
- }
157
-
158
-
159
- add_action( 'wprss_pause_feed_schedule_hook', 'wprss_pause_feed_source', 10 , 1 );
160
- /**
161
- * Pauses the feed source. Runs on a schedule.
162
- *
163
- * @param $feed_id The of of the wprss_feed
164
- * @since 3.7
165
- */
166
- function wprss_pause_feed_source( $feed_id ) {
167
- update_post_meta( $feed_id, 'wprss_state', 'paused' );
168
- update_post_meta( $feed_id, 'wprss_pause_feed', '' );
169
-
170
- // Add an action hook, so functions can be run when a feed source is paused
171
- do_action( 'wprss_on_feed_source_paused', $feed_id );
172
- }
173
-
174
-
175
  add_action( 'wprss_on_feed_source_activated', 'wprss_feed_source_update_start_schedule' );
176
  /**
177
  * Starts the looping schedule for a feed source. Runs on a schedule
6
  */
7
 
8
 
9
+ // CRON HOOKS TO ACTIVATE/PAUSE FEED SOURCES
10
+ add_action( 'wprss_activate_feed_schedule_hook', 'wprss_activate_feed_source', 10, 1 );
11
+ add_action( 'wprss_pause_feed_schedule_hook', 'wprss_pause_feed_source', 10 , 1 );
12
+
13
+
14
  add_action( 'init', 'wprss_schedule_fetch_all_feeds_cron' );
15
  /**
16
  * Creates the cron to fetch feeds every hour
145
  }
146
 
147
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
148
  add_action( 'wprss_on_feed_source_activated', 'wprss_feed_source_update_start_schedule' );
149
  /**
150
  * Starts the looping schedule for a feed source. Runs on a schedule
includes/feed-display.php CHANGED
@@ -13,12 +13,20 @@
13
  */
14
  function wprss_get_display_settings( $settings ) {
15
 
 
 
 
 
 
 
 
 
16
  $display_settings = array(
17
  'open' => '',
18
  'follow' => ''
19
  );
20
 
21
- switch ( $settings['open_dd'] ) {
22
 
23
  case 'Lightbox' :
24
  $display_settings['open'] = 'class="colorbox"';
@@ -29,7 +37,7 @@
29
  break;
30
  }
31
 
32
- switch ( $settings['follow_dd'] ) {
33
 
34
  case 'no_follow' :
35
  $display_settings['follow'] = 'rel="nofollow"';
@@ -218,6 +226,10 @@
218
 
219
  // No source, no date
220
  else { $output .= "$link_after"; }
 
 
 
 
221
 
222
 
223
  }
@@ -307,6 +319,11 @@
307
  $query_args['exclude'] = $args['exclude'];
308
  }
309
 
 
 
 
 
 
310
  $feed_items = wprss_get_feed_items_query( $query_args );
311
 
312
  do_action( 'wprss_display_template', $display_settings, $args, $feed_items );
13
  */
14
  function wprss_get_display_settings( $settings ) {
15
 
16
+ $args = wp_parse_args(
17
+ $settings,
18
+ array(
19
+ 'open_dd' => 'New Window',
20
+ 'follow_dd' => '',
21
+ )
22
+ );
23
+
24
  $display_settings = array(
25
  'open' => '',
26
  'follow' => ''
27
  );
28
 
29
+ switch ( $args['open_dd'] ) {
30
 
31
  case 'Lightbox' :
32
  $display_settings['open'] = 'class="colorbox"';
37
  break;
38
  }
39
 
40
+ switch ( $args['follow_dd'] ) {
41
 
42
  case 'no_follow' :
43
  $display_settings['follow'] = 'rel="nofollow"';
226
 
227
  // No source, no date
228
  else { $output .= "$link_after"; }
229
+
230
+ if ( $general_settings['time_ago_format_enable'] == 1 ) {
231
+ $output .= '<div class="time-ago">' . human_time_diff( $timestamp, time() ) . ' ago</div>';
232
+ }
233
 
234
 
235
  }
319
  $query_args['exclude'] = $args['exclude'];
320
  }
321
 
322
+ if ( $display_settings['time_ago_format_enable'] === 1 ) {
323
+
324
+ }
325
+
326
+
327
  $feed_items = wprss_get_feed_items_query( $query_args );
328
 
329
  do_action( 'wprss_display_template', $display_settings, $args, $feed_items );
includes/feed-importing.php CHANGED
@@ -145,7 +145,7 @@
145
  }
146
 
147
  else {
148
- wprss_log( 'Failed to fetch feed "' . $url . '"' );
149
  return;
150
  }
151
  }
145
  }
146
 
147
  else {
148
+ wprss_log( 'Failed to fetch feed "' . $feed_url . '". ' . $feed->get_error_message() );
149
  return;
150
  }
151
  }
includes/feed-states.php CHANGED
@@ -32,6 +32,139 @@
32
  }
33
 
34
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
35
  /**
36
  * Returns whether or not a feed source is active.
37
  *
32
  }
33
 
34
 
35
+
36
+
37
+ add_action( 'init', 'wprss_bulk_change_state', 2 );
38
+ /**
39
+ * Changes the state of feed sources selected from the table bulk actions.
40
+ *
41
+ * @since 4.1
42
+ */
43
+ function wprss_bulk_change_state() {
44
+ // If the id and state are in POST data
45
+ if ( isset( $_GET['post_type'] ) && isset( $_GET['action'] ) && isset( $_GET['post'] ) ) {
46
+ // Get the action and post ids from GET request
47
+ $action = $_GET['action'];
48
+ $post_ids = $_GET['post'];
49
+
50
+ // check the action
51
+ switch ( $action ) {
52
+ // Activate all feed sources in $post_ids
53
+ case 'activate':
54
+ foreach( $post_ids as $post_id ) {
55
+ wprss_activate_feed_source( $post_id );
56
+ }
57
+ // Set a transient to show the admin notice, after redirection
58
+ set_transient( 'wprss_notify_bulk_change_state', 'activated', 0 );
59
+ break;
60
+
61
+ // Pause all feed sources in $post_ids
62
+ case 'pause':
63
+ foreach( $post_ids as $post_id ) {
64
+ wprss_pause_feed_source( $post_id );
65
+ }
66
+ // Set a transient to show the admin notice, after redirection
67
+ set_transient( 'wprss_notify_bulk_change_state', 'paused', 0 );
68
+ break;
69
+ }
70
+
71
+ /* Note:
72
+ * Transients are used since bulk actions will, after processing, case a redirect to the same page.
73
+ * Thus, using add_action( 'all_admin_notices', ... ) will result in the notice appearing on the first request,
74
+ * and not be shown after redirection.
75
+ * The transient is set to show the notification AFTER redirection.
76
+ */
77
+ }
78
+ }
79
+
80
+
81
+
82
+ add_action( 'init', 'check_for_state_notice_after_redirect', 1 );
83
+ /**
84
+ * Checks if the 'wprss_notify_bulk_change_state' transient is set.
85
+ * If it is, it will show the appropriate admin notice
86
+ *
87
+ * @since 4.1
88
+ */
89
+ function check_for_state_notice_after_redirect() {
90
+ $transient = get_transient( 'wprss_notify_bulk_change_state' );
91
+ if ( $transient !== FALSE ) {
92
+ switch ( $transient ) {
93
+ case 'activated': add_action( 'all_admin_notices', 'wprss_notify_feed_sources_activated' ); break;
94
+ case 'paused': add_action( 'all_admin_notices', 'wprss_notify_feed_sources_paused' ); break;
95
+ }
96
+ delete_transient( 'wprss_notify_bulk_change_state' );
97
+ }
98
+ }
99
+
100
+
101
+
102
+ /**
103
+ * Shows an admin notice to notify that feed sources have been activated.
104
+ *
105
+ * @since 4.1
106
+ */
107
+ function wprss_notify_feed_sources_activated() {
108
+ ?>
109
+ <div class="updated">
110
+ <p>The feed sources have been activated!</p>
111
+ </div>
112
+ <?php
113
+ }
114
+
115
+
116
+ /**
117
+ * Shows an admin notice to notify that feed sources have been activated.
118
+ *
119
+ * @since 4.1
120
+ */
121
+ function wprss_notify_feed_sources_paused() {
122
+ ?>
123
+ <div class="updated">
124
+ <p>The feed sources have been paused!</p>
125
+ </div>
126
+ <?php
127
+ }
128
+
129
+
130
+
131
+
132
+
133
+
134
+ /**
135
+ * Activates the feed source. Runs on a schedule.
136
+ *
137
+ * @param $feed_id The of of the wprss_feed
138
+ * @since 3.7
139
+ */
140
+ function wprss_activate_feed_source( $feed_id ) {
141
+ update_post_meta( $feed_id, 'wprss_state', 'active' );
142
+ update_post_meta( $feed_id, 'wprss_activate_feed', '' );
143
+
144
+ // Add an action hook, so functions can be run when a feed source is activated
145
+ do_action( 'wprss_on_feed_source_activated', $feed_id );
146
+ }
147
+
148
+
149
+ /**
150
+ * Pauses the feed source. Runs on a schedule.
151
+ *
152
+ * @param $feed_id The of of the wprss_feed
153
+ * @since 3.7
154
+ */
155
+ function wprss_pause_feed_source( $feed_id ) {
156
+ update_post_meta( $feed_id, 'wprss_state', 'paused' );
157
+ update_post_meta( $feed_id, 'wprss_pause_feed', '' );
158
+
159
+ // Add an action hook, so functions can be run when a feed source is paused
160
+ do_action( 'wprss_on_feed_source_paused', $feed_id );
161
+ }
162
+
163
+
164
+
165
+
166
+
167
+
168
  /**
169
  * Returns whether or not a feed source is active.
170
  *
includes/scripts.php CHANGED
@@ -31,6 +31,7 @@
31
  ( $_GET['page'] == 'wprss-aggregator-settings' ) ) ) {
32
  wp_enqueue_style( 'wprss-admin-styles', WPRSS_CSS . 'admin-styles.css' );
33
  wp_enqueue_style( 'wprss-fa', WPRSS_CSS . 'font-awesome.min.css' );
 
34
  wp_enqueue_script( 'wprss-admin-custom', WPRSS_JS .'admin-custom.js', array('jquery','jquery-ui-datepicker','jquery-ui-slider') );
35
  wp_enqueue_script( 'jquery-ui-timepicker-addon', WPRSS_JS .'jquery-ui-timepicker-addon.js', array('jquery','jquery-ui-datepicker') );
36
  wp_enqueue_style( 'jquery-style', 'http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.2/themes/smoothness/jquery-ui.css' );
31
  ( $_GET['page'] == 'wprss-aggregator-settings' ) ) ) {
32
  wp_enqueue_style( 'wprss-admin-styles', WPRSS_CSS . 'admin-styles.css' );
33
  wp_enqueue_style( 'wprss-fa', WPRSS_CSS . 'font-awesome.min.css' );
34
+ wp_enqueue_script( 'wprss-custom-bulk-actions', WPRSS_JS . 'admin-custom-bulk-actions.js', array( 'jquery' ) );
35
  wp_enqueue_script( 'wprss-admin-custom', WPRSS_JS .'admin-custom.js', array('jquery','jquery-ui-datepicker','jquery-ui-slider') );
36
  wp_enqueue_script( 'jquery-ui-timepicker-addon', WPRSS_JS .'jquery-ui-timepicker-addon.js', array('jquery','jquery-ui-datepicker') );
37
  wp_enqueue_style( 'jquery-style', 'http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.2/themes/smoothness/jquery-ui.css' );
js/admin-custom-bulk-actions.js ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * Adds and manages custom bulk actions for the Feed Sources page.
3
+ *
4
+ * @since 2.5
5
+ */
6
+ (function($){
7
+
8
+ $(document).ready( function(){
9
+ var bulk_actions_select = $( 'select[name="action"]' );
10
+ var bulk_actions_trash = bulk_actions_select.find( "option[value='trash']" );
11
+
12
+ $( '<option>' ).attr( 'value', 'activate' ).text( 'Activate' ).insertBefore( bulk_actions_trash );
13
+ $( '<option>' ).attr( 'value', 'pause' ).text( 'Pause' ).insertBefore( bulk_actions_trash );
14
+ });
15
+
16
+
17
+ })(jQuery);
log.txt DELETED
@@ -1,18 +0,0 @@
1
- [12-02-2014 20:52:50] WPRSS > wprss_get_feed_items:
2
- Failed to fetch feed ""
3
-
4
- [12-02-2014 21:47:51] WPRSS > image_obeys_minimum_size:
5
- Failed to get image dimensions. Image may not exist at http://distilleryimage6.ak.instagram.com/44286a44942f11e3be190a8fc0c85626_8.jpg
6
- [12-02-2014 22:08:26] WPRSS > image_obeys_minimum_size:
7
- Failed to get image dimensions. Image may not exist at http://i.imgur.com/lJDfUrJ.png
8
- [12-02-2014 22:08:26] WPRSS > image_obeys_minimum_size:
9
- Failed to get image dimensions. Image may not exist at http://freelance-coding.com/themes/glamour-nightclub/glamour_nightclub.png
10
- [12-02-2014 22:08:26] WPRSS > image_obeys_minimum_size:
11
- Failed to get image dimensions. Image may not exist at http://freelance-coding.com/themes/glamour-nightclub/features.png
12
- [12-02-2014 22:08:26] WPRSS > image_obeys_minimum_size:
13
- Failed to get image dimensions. Image may not exist at http://1.s3.envato.com/files/62014681/PRINTSCREENS/02_HOME-sidebar.jpg
14
- [12-02-2014 22:08:26] WPRSS > image_obeys_minimum_size:
15
- Failed to get image dimensions. Image may not exist at http://1.s3.envato.com/files/62014681/PRINTSCREENS/04_EVENT-list.jpg
16
- [12-02-2014 22:08:26] WPRSS > image_obeys_minimum_size:
17
- Failed to get image dimensions. Image may not exist at http://2.s3.envato.com/files/62014681/PRINTSCREENS/06_EVENT.jpg
18
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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.0.3
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.3 (2014-02-12) =
149
  * Fixed bug: The general setting for deleting feed items by age was not working.
150
 
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.4
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.4 (2014-02-17) =
149
+ * Enhanced: Added Activate/Pause bulk actions in the Feed Sources page.
150
+ * Enhanced: Feed Sources page table has been re-designed.
151
+ * Enhanced: Logging is now site dependant on multisite.
152
+ * Fixed bug: Undefined display settings where appearing on the front end.
153
+
154
  = 4.0.3 (2014-02-12) =
155
  * Fixed bug: The general setting for deleting feed items by age was not working.
156
 
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.3
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.3
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.3', true );
47
 
48
  // Set the database version number of the plugin.
49
  if( !defined( 'WPRSS_DB_VERSION' ) )
@@ -83,7 +83,9 @@
83
 
84
  // Set the constant path to the plugin's log file.
85
  if( !defined( 'WPRSS_LOG_FILE' ) )
86
- define( 'WPRSS_LOG_FILE', WPRSS_DIR . 'log.txt', true );
 
 
87
 
88
 
89
  /**
@@ -179,14 +181,19 @@
179
  register_deactivation_hook( __FILE__ , 'wprss_deactivate' );
180
 
181
 
182
- add_action( 'init', 'wprss_init' );
183
  /**
184
  * Initialise the plugin
185
  *
186
  * @since 1.0
187
  * @return void
188
  */
189
- function wprss_init() {
 
 
 
 
 
190
  do_action( 'wprss_init' );
191
  }
192
 
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.4
7
  Author: Jean Galea
8
  Author URI: http://www.wprssaggregator.com
9
  License: GPLv2
29
 
30
  /**
31
  * @package WPRSSAggregator
32
+ * @version 4.0.4
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.4', true );
47
 
48
  // Set the database version number of the plugin.
49
  if( !defined( 'WPRSS_DB_VERSION' ) )
83
 
84
  // Set the constant path to the plugin's log file.
85
  if( !defined( 'WPRSS_LOG_FILE' ) )
86
+ define( 'WPRSS_LOG_FILE', WPRSS_DIR . 'log', true );
87
+ if( !defined( 'WPRSS_LOG_FILE_EXT' ) )
88
+ define( 'WPRSS_LOG_FILE_EXT', '.txt', true );
89
 
90
 
91
  /**
181
  register_deactivation_hook( __FILE__ , 'wprss_deactivate' );
182
 
183
 
184
+ add_action( 'init', 'wprss_init' );
185
  /**
186
  * Initialise the plugin
187
  *
188
  * @since 1.0
189
  * @return void
190
  */
191
+ function wprss_init() {
192
+ //If user requested to download system info, generate the download.
193
+ if ( isset( $_POST['wprss-sysinfo'] ) ) {
194
+ do_action( 'wprss_download_sysinfo' );
195
+ }
196
+
197
  do_action( 'wprss_init' );
198
  }
199