__('(Recent Post) Displays latest posts or posts from a choosen category. ', 'blogs-up'), 'customize_selective_refresh' => true, ) ); } /** * Display Widget * * @param $args * @param $instance */ function widget($args, $instance) { extract($args); $number_posts = (!empty($instance['number_posts'])) ? absint($instance['number_posts']) : 4; if (!$number_posts) { $number_posts = 4; } $sticky_posts = isset($instance['sticky_posts']) ? $instance['sticky_posts'] : false; $category = (isset($instance['category'])) ? absint($instance['category']) : ''; echo $before_widget; ?>
'Show all posts', 'orderby' => 'ID', 'order' => 'ASC', 'show_count' => 1, 'hide_empty' => 1, 'selected' => $instance['category'], 'hierarchical' => 0, 'name' => $this->get_field_name('category'), 'taxonomy' => 'category', 'value_field' => 'term_id', ); ?>
id="get_field_id('sticky_posts'); ?>" name="get_field_name('sticky_posts'); ?>" />