Super RSS Reader - Version 4.6

Version Description

Download this release

Release Info

Developer vaakash
Plugin Icon 128x128 Super RSS Reader
Version 4.6
Comparing to
See all releases

Code changes from version 4.5 to 4.6

admin/css/style-widget.css CHANGED
@@ -217,6 +217,17 @@
217
  margin: 0 0 0 5px;
218
  border-radius: 3px;
219
  }
 
 
 
 
 
 
 
 
 
 
 
220
 
221
  .srr_pro_sec > p{
222
  font-size: 12px;
217
  margin: 0 0 0 5px;
218
  border-radius: 3px;
219
  }
220
+ .srr_row .srr_pro_tag {
221
+ background: gold;
222
+ color: #011936;
223
+ font-weight: bold;
224
+ font-style: italic;
225
+ text-decoration: none;
226
+ }
227
+ .srr_row .srr_pro_tag:hover {
228
+ background: rgb(116, 98, 0);
229
+ color: #fff;
230
+ }
231
 
232
  .srr_pro_sec > p{
233
  font-size: 12px;
includes/feed.php CHANGED
@@ -31,6 +31,7 @@ class SRR_Feed{
31
  $strip_desc = intval( $this->options['strip_desc'] );
32
  $strip_title = intval( $this->options['strip_title'] );
33
  $date_format = htmlspecialchars( $this->options['date_format'] );
 
34
  $order_by = htmlspecialchars( $this->options['order_by'] );
35
  $read_more = htmlspecialchars( $this->options['read_more'] );
36
  $rich_desc = intval( $this->options['rich_desc'] );
@@ -158,6 +159,11 @@ class SRR_Feed{
158
  // Add no follow attribute
159
  $no_follow = $add_nofollow ? ' rel="nofollow noopener noreferrer"' : '';
160
 
 
 
 
 
 
161
  // Date
162
  $date = '';
163
  $date_full = esc_attr( $item->get_date() );
@@ -170,7 +176,7 @@ class SRR_Feed{
170
  $date = __( 'Today' );
171
  }
172
  }else{
173
- $date = date_i18n( $date_format, $item->get_date( 'U' ) );
174
  }
175
 
176
  // Thumbnail
@@ -196,7 +202,7 @@ class SRR_Feed{
196
  if( $show_desc ){
197
  $desc_content = ( $desc_type == 'summary' ) ? $item->get_description() : $item->get_content();
198
  if( $rich_desc ){
199
- $desc = strip_tags( $desc_content, '<p><a><img><em><strong><font><strike><s><u><i>' );
200
  }else{
201
 
202
  $desc = str_replace( array( "\n", "\r" ), ' ', esc_attr( strip_tags( @html_entity_decode( $desc_content, ENT_QUOTES, get_option('blog_charset') ) ) ) );
31
  $strip_desc = intval( $this->options['strip_desc'] );
32
  $strip_title = intval( $this->options['strip_title'] );
33
  $date_format = htmlspecialchars( $this->options['date_format'] );
34
+ $date_timezone = htmlspecialchars( $this->options['date_timezone'] );
35
  $order_by = htmlspecialchars( $this->options['order_by'] );
36
  $read_more = htmlspecialchars( $this->options['read_more'] );
37
  $rich_desc = intval( $this->options['rich_desc'] );
159
  // Add no follow attribute
160
  $no_follow = $add_nofollow ? ' rel="nofollow noopener noreferrer"' : '';
161
 
162
+ if( empty( $link ) ){
163
+ $link = '#';
164
+ $new_tab = '';
165
+ }
166
+
167
  // Date
168
  $date = '';
169
  $date_full = esc_attr( $item->get_date() );
176
  $date = __( 'Today' );
177
  }
178
  }else{
179
+ $date = SRR_Utilities::date_i18n( $date_format, $item->get_date( 'U' ), $date_timezone );
180
  }
181
 
182
  // Thumbnail
202
  if( $show_desc ){
203
  $desc_content = ( $desc_type == 'summary' ) ? $item->get_description() : $item->get_content();
204
  if( $rich_desc ){
205
+ $desc = strip_tags( $desc_content, '<p><a><img><em><strong><font><strike><s><u><i><br>' );
206
  }else{
207
 
208
  $desc = str_replace( array( "\n", "\r" ), ' ', esc_attr( strip_tags( @html_entity_decode( $desc_content, ENT_QUOTES, get_option('blog_charset') ) ) ) );
includes/options.php CHANGED
@@ -67,6 +67,10 @@ class SRR_Options{
67
  'default' => 'j F Y',
68
  'description' => __( 'The format of the feed item date.', 'super-rss-reader' )
69
  ),
 
 
 
 
70
  'order_by' => array(
71
  'default' => 'default',
72
  'description' => __( 'The order of the feed', 'super-rss-reader' ),
67
  'default' => 'j F Y',
68
  'description' => __( 'The format of the feed item date.', 'super-rss-reader' )
69
  ),
70
+ 'date_timezone' => array(
71
+ 'default' => 'UTC',
72
+ 'description' => __( 'The timezone of the feed item date.', 'super-rss-reader' )
73
+ ),
74
  'order_by' => array(
75
  'default' => 'default',
76
  'description' => __( 'The order of the feed', 'super-rss-reader' ),
includes/utilities.php CHANGED
@@ -29,6 +29,20 @@ class SRR_Utilities{
29
 
30
  }
31
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
32
  }
33
 
34
  SRR_Utilities::init();
29
 
30
  }
31
 
32
+ public static function date_i18n( $format, $timestamp, $timezone ){
33
+
34
+ try{
35
+ $timezone = new DateTimeZone( trim( $timezone ) );
36
+ }catch( Exception $e ) {
37
+ $timezone = new DateTimeZone( 'UTC' );
38
+ }
39
+
40
+ $date = wp_date( $format, $timestamp, $timezone );
41
+
42
+ return $date;
43
+
44
+ }
45
+
46
  }
47
 
48
  SRR_Utilities::init();
includes/widget-admin.php CHANGED
@@ -57,6 +57,7 @@ class super_rss_reader_widget extends WP_Widget{
57
  $instance[ 'strip_desc' ] = intval( $new_instance['strip_desc'] );
58
  $instance[ 'strip_title' ] = intval( $new_instance['strip_title'] );
59
  $instance[ 'date_format' ] = stripslashes( $new_instance['date_format'] );
 
60
  $instance[ 'order_by' ] = stripslashes( $new_instance['order_by'] );
61
  $instance[ 'read_more' ] = stripslashes( $new_instance['read_more'] );
62
  $instance[ 'add_nofollow' ] = intval( isset( $new_instance['add_nofollow'] ) ? $new_instance['add_nofollow'] : 0 );
@@ -95,6 +96,7 @@ class super_rss_reader_widget extends WP_Widget{
95
  $strip_desc = intval($instance['strip_desc']);
96
  $strip_title = intval($instance['strip_title']);
97
  $date_format = htmlspecialchars($instance['date_format']);
 
98
  $order_by = htmlspecialchars($instance['order_by']);
99
  $read_more = htmlspecialchars($instance['read_more']);
100
  $rich_desc = intval($instance['rich_desc']);
@@ -262,6 +264,18 @@ class super_rss_reader_widget extends WP_Widget{
262
  <div class="srr_field"><input id="<?php echo $this->get_field_id('thumbnail_size');?>" name="<?php echo $this->get_field_name('thumbnail_size'); ?>" type="text" value="<?php echo $thumbnail_size; ?>" class="widefat" /></div>
263
  </div>
264
 
 
 
 
 
 
 
 
 
 
 
 
 
265
  <div class="srr_row">
266
  <div class="srr_label"><label for="<?php echo $this->get_field_id('thumbnail_default'); ?>"><?php _e( 'Default thumbnail image', 'super-rss-reader' ); ?></label><?php $this->tt( __( 'The URL of the default thumbnail image if not present. Leave empty to skip thumbnail if not present.', 'super-rss-reader' ) ); ?></div>
267
  <div class="srr_field"><input id="<?php echo $this->get_field_id('thumbnail_default');?>" name="<?php echo $this->get_field_name('thumbnail_default'); ?>" type="text" value="<?php echo $thumbnail_default; ?>" class="widefat" /></div>
@@ -269,6 +283,13 @@ class super_rss_reader_widget extends WP_Widget{
269
 
270
  <h4><?php _e( 'Misc', 'super-rss-reader' ); ?></h4>
271
 
 
 
 
 
 
 
 
272
  <div class="srr_row">
273
  <div class="srr_label"><label for="<?php echo $this->get_field_id('no_feed_text'); ?>"><?php _e( 'No feed items text', 'super-rss-reader' ); ?></label><?php $this->tt( __( 'Text to display when there are no feed items', 'super-rss-reader' ) ); ?></div>
274
  <div class="srr_field"><input id="<?php echo $this->get_field_id('no_feed_text');?>" name="<?php echo $this->get_field_name('no_feed_text'); ?>" type="text" value="<?php echo $no_feed_text; ?>" class="widefat" /></div>
@@ -358,6 +379,7 @@ class super_rss_reader_widget extends WP_Widget{
358
  <li>Grid display - <span>Display feed item in rows and columns</span></li>
359
  <li>Filter by keyword - <span>Show/hide feed items based on keyword</span></li>
360
  <li>Custom template - <span>Change order of feed item content, add HTML</span></li>
 
361
  <li>4+ new color themes</li>
362
  <li>Updates and support for 1 year</li>
363
  </ul>
57
  $instance[ 'strip_desc' ] = intval( $new_instance['strip_desc'] );
58
  $instance[ 'strip_title' ] = intval( $new_instance['strip_title'] );
59
  $instance[ 'date_format' ] = stripslashes( $new_instance['date_format'] );
60
+ $instance[ 'date_timezone' ] = stripslashes( $new_instance['date_timezone'] );
61
  $instance[ 'order_by' ] = stripslashes( $new_instance['order_by'] );
62
  $instance[ 'read_more' ] = stripslashes( $new_instance['read_more'] );
63
  $instance[ 'add_nofollow' ] = intval( isset( $new_instance['add_nofollow'] ) ? $new_instance['add_nofollow'] : 0 );
96
  $strip_desc = intval($instance['strip_desc']);
97
  $strip_title = intval($instance['strip_title']);
98
  $date_format = htmlspecialchars($instance['date_format']);
99
+ $date_timezone = htmlspecialchars($instance['date_timezone']);
100
  $order_by = htmlspecialchars($instance['order_by']);
101
  $read_more = htmlspecialchars($instance['read_more']);
102
  $rich_desc = intval($instance['rich_desc']);
264
  <div class="srr_field"><input id="<?php echo $this->get_field_id('thumbnail_size');?>" name="<?php echo $this->get_field_name('thumbnail_size'); ?>" type="text" value="<?php echo $thumbnail_size; ?>" class="widefat" /></div>
265
  </div>
266
 
267
+ <div class="srr_row">
268
+ <div class="srr_label"><label for="<?php echo $this->get_field_id('thumbnail_force');?>"><?php _e( 'Fetch thumbnail from the page (feed URL) directly if not available.', 'super-rss-reader' ); ?></label><?php $this->tt( __( 'If feed item does not have an image, then fetch it from the page directly. This feature is available in the PRO version', 'super-rss-reader' ) ); ?></div>
269
+ <div class="srr_field">
270
+ <select>
271
+ <option disabled selected>No</option>
272
+ <option disabled>When absent in feed item</option>
273
+ <option disabled>Always</option>
274
+ </select>
275
+ <a class="srr_pro_tag" href="https://www.aakashweb.com/wordpress-plugins/super-rss-reader/?utm_source=admin&utm_medium=thumbnail&utm_campaign=srr-pro#pro" target="_blank" title="Upgrade to PRO version">PRO</a>
276
+ </div>
277
+ </div>
278
+
279
  <div class="srr_row">
280
  <div class="srr_label"><label for="<?php echo $this->get_field_id('thumbnail_default'); ?>"><?php _e( 'Default thumbnail image', 'super-rss-reader' ); ?></label><?php $this->tt( __( 'The URL of the default thumbnail image if not present. Leave empty to skip thumbnail if not present.', 'super-rss-reader' ) ); ?></div>
281
  <div class="srr_field"><input id="<?php echo $this->get_field_id('thumbnail_default');?>" name="<?php echo $this->get_field_name('thumbnail_default'); ?>" type="text" value="<?php echo $thumbnail_default; ?>" class="widefat" /></div>
283
 
284
  <h4><?php _e( 'Misc', 'super-rss-reader' ); ?></h4>
285
 
286
+ <div class="srr_row">
287
+ <div class="srr_label"><label for="<?php echo $this->get_field_id('date_timezone'); ?>"><?php _e( 'Date timezone', 'super-rss-reader' ); ?></label><?php $this->tt( __( 'The timezone of the feed item date.', 'super-rss-reader' ) ); ?></div>
288
+ <div class="srr_field"><input id="<?php echo $this->get_field_id('date_timezone');?>" name="<?php echo $this->get_field_name('date_timezone'); ?>" type="text" value="<?php echo $date_timezone; ?>" class="widefat" />
289
+ <small class="srr_small_text"><a href="https://en.wikipedia.org/wiki/List_of_tz_database_time_zones" target="_blank"><?php _e( 'Refer timezone name here', 'super-rss-reader' ); ?>.</a> <?php _e( 'Example: ', 'super-rss-reader' ); ?> <code>Asia/Taipei</code> <?php _e( 'Default: ', 'super-rss-reader' ); ?> <code>UTC</code></small>
290
+ </div>
291
+ </div>
292
+
293
  <div class="srr_row">
294
  <div class="srr_label"><label for="<?php echo $this->get_field_id('no_feed_text'); ?>"><?php _e( 'No feed items text', 'super-rss-reader' ); ?></label><?php $this->tt( __( 'Text to display when there are no feed items', 'super-rss-reader' ) ); ?></div>
295
  <div class="srr_field"><input id="<?php echo $this->get_field_id('no_feed_text');?>" name="<?php echo $this->get_field_name('no_feed_text'); ?>" type="text" value="<?php echo $no_feed_text; ?>" class="widefat" /></div>
379
  <li>Grid display - <span>Display feed item in rows and columns</span></li>
380
  <li>Filter by keyword - <span>Show/hide feed items based on keyword</span></li>
381
  <li>Custom template - <span>Change order of feed item content, add HTML</span></li>
382
+ <li>Fetch thumbnail - <span>Forcefully fetches the thumbnail from feed URL.</span></li>
383
  <li>4+ new color themes</li>
384
  <li>Updates and support for 1 year</li>
385
  </ul>
readme.txt CHANGED
@@ -7,8 +7,8 @@ License: GPLv2 or later
7
  Donate Link: https://www.paypal.me/vaakash
8
  Requires at least: 2.8
9
  Requires PHP: 5.3
10
- Tested up to: 5.9.3
11
- Stable tag: 4.5
12
 
13
  Display any RSS feed(s) in widget with news ticker effect in multiple tabs, thumbnails, customizable color themes and more.
14
 
@@ -50,6 +50,7 @@ Super RSS reader has a PRO version which has more features to further enhance an
50
  * **Grid display** - Display feed item in rows and columns
51
  * **Filter by keyword** - Show/hide feed items based on keyword
52
  * **Custom feed item template** - Change order of feed item content, add HTML
 
53
  * **4 new** color themes
54
 
55
  [**More information**](https://www.aakashweb.com/wordpress-plugins/super-rss-reader/?utm_source=readme&utm_medium=description&utm_campaign=srr-pro) - [Live demo](https://wpdemos.aakashweb.com/super-rss-reader/?utm_source=readme&utm_medium=description&utm_campaign=srr-pro)
@@ -129,6 +130,11 @@ The additional effect needs only 2.5 KB of additional JavaScript file which is v
129
 
130
  ## Changelog
131
 
 
 
 
 
 
132
  ### 4.5
133
  * New: Display feed item date in relative format.
134
  * Fix: Minor enhancements to widget admin UI.
7
  Donate Link: https://www.paypal.me/vaakash
8
  Requires at least: 2.8
9
  Requires PHP: 5.3
10
+ Tested up to: 6.0
11
+ Stable tag: 4.6
12
 
13
  Display any RSS feed(s) in widget with news ticker effect in multiple tabs, thumbnails, customizable color themes and more.
14
 
50
  * **Grid display** - Display feed item in rows and columns
51
  * **Filter by keyword** - Show/hide feed items based on keyword
52
  * **Custom feed item template** - Change order of feed item content, add HTML
53
+ * **Fetch thumbnail** - Forcefully fetches the thumbnail from feed URL
54
  * **4 new** color themes
55
 
56
  [**More information**](https://www.aakashweb.com/wordpress-plugins/super-rss-reader/?utm_source=readme&utm_medium=description&utm_campaign=srr-pro) - [Live demo](https://wpdemos.aakashweb.com/super-rss-reader/?utm_source=readme&utm_medium=description&utm_campaign=srr-pro)
130
 
131
  ## Changelog
132
 
133
+ ### 4.6
134
+ * New: Option to choose timezone for the date of feed items.
135
+ * Fix: Set default link URL when feed item has no link.
136
+ * Fix: Break tags are retained in the feed description.
137
+
138
  ### 4.5
139
  * New: Display feed item date in relative format.
140
  * Fix: Minor enhancements to widget admin UI.
super-rss-reader.php CHANGED
@@ -5,12 +5,12 @@
5
  * Description: Display any RSS feed(s) in widget with news ticker effect in multiple tabs, thumbnails, customizable color themes and more.
6
  * Author: Aakash Chakravarthy
7
  * Author URI: https://www.aakashweb.com/
8
- * Version: 4.5
9
  * Text Domain: super-rss-reader
10
  * Domain Path: /languages
11
  */
12
 
13
- define( 'SRR_VERSION', '4.5' );
14
  define( 'SRR_PATH', plugin_dir_path( __FILE__ ) ); // All have trailing slash
15
  define( 'SRR_URL', plugin_dir_url( __FILE__ ) );
16
  define( 'SRR_BASE_NAME', plugin_basename( __FILE__ ) );
5
  * Description: Display any RSS feed(s) in widget with news ticker effect in multiple tabs, thumbnails, customizable color themes and more.
6
  * Author: Aakash Chakravarthy
7
  * Author URI: https://www.aakashweb.com/
8
+ * Version: 4.6
9
  * Text Domain: super-rss-reader
10
  * Domain Path: /languages
11
  */
12
 
13
+ define( 'SRR_VERSION', '4.6' );
14
  define( 'SRR_PATH', plugin_dir_path( __FILE__ ) ); // All have trailing slash
15
  define( 'SRR_URL', plugin_dir_url( __FILE__ ) );
16
  define( 'SRR_BASE_NAME', plugin_basename( __FILE__ ) );