esc_html__( 'Displays Slider in Top and Bottom Area"', 'blogzine' ) ); parent::__construct( 'featured_slider_widget_three', esc_html__( 'Blogzine: 3 Column Slider Widget ', 'blogzine' ), $opts ); } function widget( $args, $instance ) { $title = apply_filters( 'widget_title', ! empty( $instance['title'] ) ? $instance['title'] : '', $instance, $this->id_base ); $cat = ! empty( $instance[ 'cat' ] ) ? $instance[ 'cat' ] : 0; $post_no = ! empty( $instance[ 'post_no' ] ) ? $instance[ 'post_no' ] : 5; echo $args[ 'before_widget' ]; echo $args[ 'before_title' ]; echo esc_html( $title ); echo $args[ 'after_title' ]; $arguments = array( 'cat' => absint( $cat ), 'posts_per_page' => absint( $post_no ), ); $query = new WP_Query( $arguments ); if( $query->have_posts() ) : ?>

'name', 'hide_empty' => 0, 'id' => $this->get_field_id( 'cat' ), 'name' => $this->get_field_name( 'cat' ), 'class' => 'widefat', 'taxonomy' => 'category', 'selected' => absint( $cat ), 'show_option_all' => esc_html__( 'Show Recent Posts', 'blogzine' ) ); wp_dropdown_categories( $cat_args ); ?>