class My_RSS_Widget extends WP_Widget { function My_RSS_Widget() { $widget_ops = array('classname' => 'widget_rss_links', 'description' => 'A list with your feeds links' ); $this->WP_Widget('rss_links', 'Feed links', $widget_ops); } function widget($args, $instance) { extract($args, EXTR_SKIP); echo $before_widget; $title = empty($instance['title']) ? ' ' : apply_filters('widget_title', $instance['title']); $entry_title = empty($instance['entry_title']) ? ' ' : apply_filters('widget_entry_title', $instance['entry_title']); $comments_title = empty($instance['comments_title']) ? ' ' : apply_filters('widget_comments_title', $instance['comments_title']); if ( !empty( $title ) ) { echo $before_title . $title . $after_title; }; echo ''; echo $after_widget; } function update($new_instance, $old_instance) { $instance = $old_instance; $instance['title'] = strip_tags($new_instance['title']); $instance['entry_title'] = strip_tags($new_instance['entry_title']); $instance['comments_title'] = strip_tags($new_instance['comments_title']); return $instance; } function form($instance) { $instance = wp_parse_args( (array) $instance, array( 'title' => '', 'entry_title' => '', 'comments_title' => '' ) ); $title = strip_tags($instance['title']); $entry_title = strip_tags($instance['entry_title']); $comments_title = strip_tags($instance['comments_title']); ?>