'widget_super_rss_reader', 'description' => __( 'An RSS feed reader widget with advanced features', 'super-rss-reader' ) ); $control_ops = array( 'width' => 500, 'height' => 500 ); parent::__construct( 'super_rss_reader', 'Super RSS Reader', $widget_ops, $control_ops ); } // Display the Widget public function widget( $args, $instance ){ extract( $args ); if( empty( $instance[ 'title' ] ) ){ $title = ''; }else{ $title = $before_title . apply_filters( 'widget_title', $instance['title'], $instance, $this->id_base ) . $after_title; } echo $before_widget . $title; echo '
'; SRR_Widget::render_feed( $instance ); echo '
'; echo $after_widget; } // Save settings public function update( $new_instance, $old_instance ){ $instance = $old_instance; $instance[ 'title' ] = stripslashes( $new_instance['title'] ); $instance[ 'urls' ] = stripslashes( $new_instance['urls']) ; $instance[ 'tab_titles' ] = stripslashes( $new_instance['tab_titles'] ); $instance[ 'count' ] = intval( $new_instance['count'] ); $instance[ 'show_date' ] = intval( isset( $new_instance['show_date'] ) ? $new_instance['show_date'] : 0 ); $instance[ 'show_desc' ] = intval( isset( $new_instance['show_desc'] ) ? $new_instance['show_desc'] : 0 ); $instance[ 'show_author' ] = intval( isset( $new_instance['show_author'] ) ? $new_instance['show_author'] : 0 ); $instance[ 'show_thumb' ] = intval( isset( $new_instance['show_thumb'] ) ? $new_instance['show_thumb'] : 0 ); $instance[ 'strip_desc' ] = intval( $new_instance['strip_desc'] ); $instance[ 'strip_title' ] = intval( $new_instance['strip_title'] ); $instance[ 'date_format' ] = stripslashes( $new_instance['date_format'] ); $instance[ 'order_by' ] = stripslashes( $new_instance['order_by'] ); $instance[ 'read_more' ] = stripslashes( $new_instance['read_more'] ); $instance[ 'add_nofollow' ] = intval( isset( $new_instance['add_nofollow'] ) ? $new_instance['add_nofollow'] : 0 ); $instance[ 'open_newtab' ] = intval( isset( $new_instance['open_newtab'] ) ? $new_instance['open_newtab'] : 0 ); $instance[ 'rich_desc' ] = intval( isset( $new_instance['rich_desc'] ) ? $new_instance['rich_desc'] : 0 ); $instance[ 'desc_type' ] = stripslashes( $new_instance['desc_type'] ); $instance[ 'thumbnail_position' ] = stripslashes( $new_instance['thumbnail_position'] ); $instance[ 'thumbnail_size' ] = stripslashes( $new_instance['thumbnail_size'] ); $instance[ 'thumbnail_default' ] = stripslashes( $new_instance['thumbnail_default'] ); $instance[ 'no_feed_text' ] = stripslashes( $new_instance['no_feed_text'] ); $instance[ 'color_style' ] = stripslashes( $new_instance['color_style']); $instance[ 'display_type' ] = stripslashes( $new_instance['display_type']); $instance[ 'visible_items' ] = intval( $new_instance['visible_items']); $instance[ 'ticker_speed' ] = intval( $new_instance['ticker_speed']); return $instance; } // Widget form public function form( $instance ){ $instance = wp_parse_args( (array) $instance, SRR_Options::defaults() ); $title = htmlspecialchars( isset( $instance['title'] ) ? $instance[ 'title' ] : '' ); $urls = htmlspecialchars($instance['urls']); $tab_titles = htmlspecialchars($instance['tab_titles']); $count = intval($instance['count']); $show_date = intval($instance['show_date']); $show_desc = intval($instance['show_desc']); $show_author = intval($instance['show_author']); $show_thumb = intval($instance['show_thumb']); $open_newtab = intval($instance['open_newtab']); $add_nofollow = intval($instance['add_nofollow']); $strip_desc = intval($instance['strip_desc']); $strip_title = intval($instance['strip_title']); $date_format = htmlspecialchars($instance['date_format']); $order_by = htmlspecialchars($instance['order_by']); $read_more = htmlspecialchars($instance['read_more']); $rich_desc = intval($instance['rich_desc']); $desc_type = htmlspecialchars($instance['desc_type']); $thumbnail_position = htmlspecialchars($instance['thumbnail_position']); $thumbnail_size = htmlspecialchars($instance['thumbnail_size']); $thumbnail_default = htmlspecialchars($instance['thumbnail_default']); $no_feed_text = htmlspecialchars($instance['no_feed_text']); $color_style = stripslashes($instance['color_style']); $display_type = stripslashes($instance['display_type']); $visible_items = intval($instance['visible_items']); $ticker_speed = intval($instance['ticker_speed']); $option_lists = SRR_Options::select_options(); // Replacing commas with new lines $urls = str_replace( ',', "\n", $urls ); $tab_titles = str_replace( ',', "\n", $tab_titles ); ?>
tt( __( 'Number of feed items to be displayed', 'super-rss-reader' ) ); ?>
/>
/>
/>
/>
/>
/>
tt( __( 'The number of words to be displayed. Use 0 to disable trimming', 'super-rss-reader' ) ); ?>
tt( __( 'The format of the feed item date.', 'super-rss-reader' ) ); ?>
get_field_name('order_by') . '" id="' . $this->get_field_id('order_by') . '">'; foreach( $option_lists[ 'order_by' ] as $k => $v ){ echo ''; } echo ''; ?>

tt( __( 'Sometimes feed items have both summary and the full post content. Select the type to prefer.', 'super-rss-reader' ) ); ?>
get_field_name('desc_type') . '" id="' . $this->get_field_id('desc_type') . '">'; foreach( $option_lists[ 'desc_type' ] as $k => $v ){ echo ''; } echo ''; ?>
tt( __( 'The number of words to be displayed. Use 0 to disable trimming', 'super-rss-reader' ) ); ?>
tt( __( 'Leave blank to hide read more text', 'super-rss-reader' ) ); ?>
/>

get_field_name('thumbnail_position') . '" id="' . $this->get_field_id('thumbnail_position') . '">'; foreach( $option_lists[ 'thumbnail_position' ] as $k => $v ){ echo ''; } echo ''; ?>
tt( __( 'The size of the thumbnail including the units. Example 64px, 10%', 'super-rss-reader' ) ); ?>
tt( __( 'The URL of the default thumbnail image if not present. Leave empty to skip thumbnail if not present.', 'super-rss-reader' ) ); ?>

tt( __( 'Text to display when there are no feed items', 'super-rss-reader' ) ); ?>
get_field_name('color_style') . '" id="' . $this->get_field_id('color_style') . '">'; foreach( $option_lists[ 'color_style' ] as $k => $v ){ echo ''; } echo ''; ?>
get_field_name('display_type') . '" id="' . $this->get_field_id('display_type') . '">'; foreach( $option_lists[ 'display_type' ] as $k => $v ){ echo ''; } echo ''; ?>
seconds

5 items', 'super-rss-reader' ); ?>
400 px', 'super-rss-reader' ); ?>

You can build rules to show/hide feed items based on feed title, URL and description. This feature is available in the PRO version.

'; echo ''; echo ''; ?>
tt( __( 'The rules for the keyword filters', 'super-rss-reader' ) ); ?>
PRO

Get the PRO version to enjoy more features like
Shortcode, Grid display, Filter by keyword and more !

Get PRO version More information

Docs | Report issue | Rate 5 stars & review | v

' . $text . ''; } } ?>