/** * Front end display of widget * * @see WP_Widget::widget() * * @param array $args Widget arguments * @param array $instance Saved values from database * @return null */ function widget($args, $instance) { if ($instance['no_display_in_home'] && is_home()) { return false; } echo $args['before_widget']; if (!empty($instance['title'])) { echo $args['before_title'] . apply_filters('widget_title', $instance['title']) . $args['after_title']; } arras_widgets_post_loop('featured-stories', array('list' => $instance['featured_cat'], 'show_thumbs' => $instance['show_thumbs'], 'show_excerpt' => $instance['show_excerpts'], 'query' => array('posts_per_page' => $instance['postcount']))); echo $args['after_widget']; }
function widget($args, $instance) { global $wpdb; extract($args, EXTR_SKIP); if ($instance['no_display_in_home'] && is_home()) { return false; } $title = apply_filters('widget_title', $instance['title']); echo $before_widget; echo $before_title . $title . $after_title; arras_widgets_post_loop('featured-stories', array('list' => $instance['featured_cat'], 'show_thumbs' => $instance['show_thumbs'], 'show_excerpt' => $instance['show_excerpts'], 'query' => array('posts_per_page' => $instance['postcount']))); echo $after_widget; }