'widget popular-posts', 'description' => esc_html__( 'Display Popular Style Widget.', 'buzz-magazine' ), 'customize_selective_refresh' => true, ); parent::__construct( 'buzz_magazine_popular', esc_html__( 'Buzz Magazine Sidebar: Popular', 'buzz-magazine' ), $widget_ops, $control_ops ); } function form( $instance ) { $instance = wp_parse_args( (array) $instance, array( 'title' => esc_html__( 'Popular', 'buzz-magazine' ), 'category' => '', 'number' => 4, 'show_post_meta' => true, 'display_category' => true, 'display_content' => true, ) ); $title = isset( $instance['title'] ) ? esc_html( $instance['title'] ) : esc_html__( 'Feature Slider', 'buzz-magazine' ); $category = isset( $instance['category'] ) ? absint( $instance['category'] ) : 0; $number = isset( $instance['number'] ) ? absint( $instance['number'] ) : 4; $display_category = isset( $instance['display_category'] ) ? (bool) $instance['display_category'] : true; $show_post_meta = isset( $instance['show_post_meta'] ) ? (bool) $instance['show_post_meta'] : true; $display_content = isset( $instance['display_content'] ) ? (bool) $instance['display_content'] : true; ?>
'widefat', 'show_option_all' => esc_html__('From Recent Post','buzz-magazine'), 'name' => esc_attr($this->get_field_name( 'category' )), 'selected' => absint( $category ), ) ); ?>
id="get_field_id( 'display_category' )); ?>" name="get_field_name( 'display_category' )); ?>" />
id="get_field_id( 'show_post_meta' )); ?>" name="get_field_name( 'show_post_meta' )); ?>" />
id="get_field_id( 'display_content' )); ?>" name="get_field_name( 'display_content' )); ?>" />