'block-layout-a', 'description' => esc_html__( 'News Block Layout Six. Place it within "Frontpage News Layouts Area"', 'best-news' ) ); parent::__construct( 'news-block-layout-six', esc_html__( 'Bnews: News Block Layout 6', 'best-news' ), $opts ); } function form( $instance ) { $title = ! empty( $instance[ 'title' ] ) ? $instance[ 'title' ] : __('Layout 6','best-news'); $cat = ! empty( $instance[ 'cat' ] ) ? $instance[ 'cat' ] : 0; $post_no = ! empty( $instance[ 'post_no' ] ) ? $instance[ 'post_no' ] : 3; $layout_enable = ! empty( $instance[ 'layout_enable' ] ) ? $instance[ 'layout_enable' ] : 'off'; $author_1 = ! empty( $instance[ 'author_1' ] ) ? $instance[ 'author_1' ] : 0; $orderby = ! empty( $instance[ 'orderby' ] ) ? $instance[ 'orderby' ] : 'date'; ?>

id="get_field_id( 'layout_enable' )); ?>" name="get_field_name( 'layout_enable' ) ); ?>" />


__('All author ','best-news'), 'hide_if_only_one_author' => null, // string 'orderby' => 'display_name', 'order' => 'ASC', 'include' => null, // string 'exclude' => null, // string 'multi' => false, 'show' => 'display_name', 'echo' => true, 'selected' => $author_1, 'include_selected' => false, 'name' => esc_html( $this->get_field_name('author_1') ), 'id' => absint( $this->get_field_id('author_1') ), 'class' => null, // string 'blog_id' => $GLOBALS['blog_id'], 'who' => null, // string, 'role' => null, // string|array, 'role__in' => null, // array 'role__not_in' => null, // array ); wp_dropdown_users($author_args_1); ?>
'name', 'hide_empty' => 1, 'show_count' => 1, 'hierarchical' => 1, 'id' => $this->get_field_id( 'cat' ), 'name' => $this->get_field_name( 'cat' ), 'class' => 'widefat', 'taxonomy' => 'category', 'selected' => absint( $cat ), 'show_option_all' => esc_html__( 'All category', 'best-news' ) ); wp_dropdown_categories( $cat_args ); ?>

id_base ); $post_no = ! empty( $instance[ 'post_no' ] ) ? $instance[ 'post_no' ] : 3; $layout_enable_check = isset( $instance['layout_enable'] ) ? esc_attr( $instance['layout_enable'] ) : ''; $layout_enable = $layout_enable_check ? 'true' : 'false'; echo $args[ 'before_widget' ]; if($layout_enable =='true'): ?>