'featured-slider', 'description' => esc_html__( 'Displays latest posts or posts from a choosen category.', 'blog-personal' ), ); parent::__construct( 'Blog_Personal_Featured_Slider',esc_html__( 'Blog: Featured Slider', 'blog-personal' ), $widget_ops, $control_ops ); } function form( $instance ) { $defaults[ 'show_post_meta' ] = true; $defaults[ 'category' ] = ''; $defaults[ 'number' ] = 4; $instance = wp_parse_args( (array) $instance, $defaults ); $number = isset( $instance['number'] ) ? absint( $instance['number'] ) : 4; $category = isset( $instance['category'] ) ? absint( $instance['category'] ) : 0; $show_post_meta = isset( $instance['show_post_meta'] ) ? (bool) $instance['show_post_meta'] : true; ?>
id="get_field_id( 'show_post_meta' )); ?>" name="get_field_name( 'show_post_meta' )); ?>" />
'name', 'hide_empty' => 0, 'class' => 'widefat', 'show_option_none' => '', 'show_option_all' => esc_html__('— Select —','blog-personal'), 'name' => esc_attr($this->get_field_name( 'category' )), 'selected' => absint( $category ), ) ); ?>