'post-blog-section', 'description' => esc_html__( 'Displays latest posts or posts from a choosen category.', 'blog-personal' ), ); parent::__construct( 'Blog_Personal_Two_Column',esc_html__( 'Blog: Two Column', 'blog-personal' ), $widget_ops, $control_ops ); } function form( $instance ) { $defaults[ 'title' ] = esc_html__( 'Trending', 'blog-personal' ); $defaults[ 'show_post_meta' ] = true; $defaults[ 'category' ] = ''; $defaults[ 'number' ] = 5; $instance = wp_parse_args( (array) $instance, $defaults ); $title = isset( $instance['title'] ) ? esc_attr( $instance['title'] ) : esc_html__( 'Trending', 'blog-personal' ); $number = isset( $instance['number'] ) ? absint( $instance['number'] ) : 5; $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 ), ) ); ?>