public function widget($args, $instance = array()) { $instance = array_merge($this->defaults, $instance); // allow developers to filter ALL widget options $instance = apply_filters('rfbp_widget_options', $instance); // allow developer to filter the widget title $title = apply_filters('widget_title', $instance['title']); echo $args['before_widget']; if (!empty($title)) { echo $args['before_title'] . $title . $args['after_title']; } recent_facebook_posts(array('origin' => 'widget', 'number' => $instance['number_of_posts'], 'likes' => $instance['show_like_count'], 'comments' => $instance['show_comment_count'], 'excerpt_length' => $instance['excerpt_length'], 'el' => apply_filters('rfbp_widget_element', 'div'), 'show_page_link' => $instance['show_page_link'], 'show_link_previews' => $instance['show_link_previews'])); echo $args['after_widget']; }
public function widget($args, $instance = array()) { $instance = array_merge($this->defaults, $instance); extract($instance); extract($args); $title = apply_filters('widget_title', $instance['title']); echo $before_widget; if (!empty($title)) { echo $before_title . $title . $after_title; } recent_facebook_posts(array('origin' => 'widget', 'number' => $number_of_posts, 'likes' => $show_like_count, 'comments' => $show_comment_count, 'excerpt_length' => $excerpt_length, 'el' => apply_filters('rfbp_widget_element', 'div'), 'show_page_link' => $show_page_link, 'show_link_previews' => $show_link_previews)); echo $after_widget; }