'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' ] = sanitize_text_field( $new_instance['title'] ); $instance[ 'urls' ] = sanitize_textarea_field( $new_instance['urls'] ) ; $instance[ 'tab_titles' ] = wp_kses_post( $new_instance['tab_titles'] ); $instance[ 'count' ] = intval( $new_instance['count'] ); $instance[ 'show_title' ] = intval( isset( $new_instance['show_title'] ) ? $new_instance['show_title'] : 0 ); $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[ 'offset' ] = intval( $new_instance['offset'] ); $instance[ 'date_format' ] = sanitize_text_field( $new_instance['date_format'] ); $instance[ 'date_timezone' ] = sanitize_text_field( $new_instance['date_timezone'] ); $instance[ 'order_by' ] = sanitize_text_field( $new_instance['order_by'] ); $instance[ 'read_more' ] = sanitize_text_field( $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[ 'link_desc' ] = intval( isset( $new_instance['link_desc'] ) ? $new_instance['link_desc'] : 0 ); $instance[ 'desc_type' ] = sanitize_text_field( $new_instance['desc_type'] ); $instance[ 'thumbnail_position' ] = sanitize_text_field( $new_instance['thumbnail_position'] ); $instance[ 'thumbnail_size' ] = sanitize_text_field( $new_instance['thumbnail_size'] ); $instance[ 'thumbnail_default' ] = sanitize_text_field( $new_instance['thumbnail_default'] ); $instance[ 'thumbnail_type' ] = sanitize_text_field( $new_instance['thumbnail_type'] ); $instance[ 'no_feed_text' ] = wp_kses_post( $new_instance['no_feed_text'] ); $instance[ 'color_style' ] = sanitize_text_field( $new_instance['color_style']); $instance[ 'display_type' ] = sanitize_text_field( $new_instance['display_type']); $instance[ 'visible_items' ] = intval( $new_instance['visible_items'] ); $instance[ 'ticker_speed' ] = intval( $new_instance['ticker_speed'] ); $instance[ 'scroll_height' ] = sanitize_text_field( $new_instance['scroll_height'] ); return $instance; } // Widget form public function form( $instance ){ $instance = wp_parse_args( (array) $instance, SRR_Options::defaults() ); $title = isset( $instance['title'] ) ? $instance[ 'title' ] : ''; $urls = $instance['urls']; $tab_titles = $instance['tab_titles']; $count = $instance['count']; $show_title = $instance['show_title']; $show_date = $instance['show_date']; $show_desc = $instance['show_desc']; $show_author = $instance['show_author']; $show_thumb = $instance['show_thumb']; $open_newtab = $instance['open_newtab']; $add_nofollow = $instance['add_nofollow']; $strip_desc = $instance['strip_desc']; $strip_title = $instance['strip_title']; $offset = $instance['offset']; $date_format = $instance['date_format']; $date_timezone = $instance['date_timezone']; $order_by = $instance['order_by']; $read_more = $instance['read_more']; $rich_desc = $instance['rich_desc']; $desc_type = $instance['desc_type']; $link_desc = $instance['link_desc']; $thumbnail_position = $instance['thumbnail_position']; $thumbnail_size = $instance['thumbnail_size']; $thumbnail_default = $instance['thumbnail_default']; $thumbnail_type = $instance['thumbnail_type']; $no_feed_text = $instance['no_feed_text']; $color_style = $instance['color_style']; $display_type = $instance['display_type']; $visible_items = $instance['visible_items']; $ticker_speed = $instance['ticker_speed']; $scroll_height = $instance['scroll_height']; $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 number of RSS feed items to skip from the top', '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( __( 'The format of the feed item date.', 'super-rss-reader' ) ); ?>
j F Y or type relative for relative format (example 2 days ago)', 'super-rss-reader' ), array( 'code' => array() ) ); ?>

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="' . esc_attr( $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' ) ); ?>
tt( __( 'Wrap the description text with the link of the RSS feed item. Works only when rich description is disabled.', 'super-rss-reader' ) ); ?>
/>
/>

get_field_name('thumbnail_position') ) . '" id="' . esc_attr( $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( __( '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' ) ); ?>
PRO
tt( __( 'If the feed contains both thumbnail and full-size images, choose which image size to use.', 'super-rss-reader' ) ); ?>
get_field_name('thumbnail_type') ) . '" id="' . esc_attr( $this->get_field_id('thumbnail_type') ) . '">'; foreach( $option_lists[ 'thumbnail_type' ] as $k => $v ){ echo ''; } echo ''; ?>
tt( __( 'The URL of the default thumbnail image if not present. Leave empty to skip thumbnail if not present.', 'super-rss-reader' ) ); ?>

tt( __( 'The timezone of the feed item date.', 'super-rss-reader' ) ); ?>
. Asia/Taipei UTC
tt( __( 'Text to display when there are no feed items', 'super-rss-reader' ) ); ?>
get_field_name('color_style') ) . '" id="' . esc_attr( $this->get_field_id('color_style') ) . '">'; foreach( $option_lists[ 'color_style' ] as $k => $v ){ echo ''; } echo ''; ?>
get_field_name('display_type') ) . '" id="' . esc_attr( $this->get_field_id('display_type') ) . '">'; foreach( $option_lists[ 'display_type' ] as $k => $v ){ echo ''; } echo ''; ?>

seconds



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, Pagination and more !

Get PRO version More information

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

' . esc_html( $text ) . ''; } } ?>