esc_html__( 'Displays posts in style.', 'pridmag' ), ) // Args ); } /** * Back-end widget form. * * @see WP_Widget::form() * * @param array $instance Previously saved values from database. */ public function form( $instance ) { $defaults = array( 'category' => 'all' ); $instance = wp_parse_args( (array) $instance, $defaults ); ?>
$this->get_field_name('category'), 'selected' => $instance['category'], 'show_option_all' => esc_html__( 'Show latest posts', 'pridmag' ), 'class' => 'widefat' ) ); ?>
$category, 'ignore_sticky_posts' => true, 'posts_per_page' => 5, 'post_status' => 'publish' ) ); echo $before_widget; ?>