'layout-section3', 'description' => esc_html__( 'Display Mixed List Style Widget.', 'buzz-magazine' ), 'customize_selective_refresh' => true, ); parent::__construct( 'buzz_magazine_grid_style', esc_html__( 'Buzz Magazine: Grid Style', 'buzz-magazine' ), $widget_ops ); } function form( $instance ) { $instance = wp_parse_args( (array) $instance, array( 'title' => esc_html__( 'Tech', 'buzz-magazine' ), 'category' => '', 'display_per_posts' => 4, 'icon' => 'fa-laptop', 'display_date' => true, 'display_category' => false, 'view_all_title' => esc_html__( 'View All', 'buzz-magazine' ), ) ); $title = isset( $instance['title'] ) ? esc_html( $instance['title'] ) : esc_html__( 'Tech', 'buzz-magazine' ); $icon = isset( $instance['icon'] ) ? esc_html( $instance['icon'] ) : esc_html('fa-laptop'); $category = isset( $instance['category'] ) ? absint( $instance['category'] ) : 0; $display_per_posts = isset( $instance['display_per_posts'] ) ? absint( $instance['display_per_posts'] ) : 4; $display_content = isset( $instance['display_content'] ) ? (bool) $instance['display_content'] : true; $display_category = isset( $instance['display_category'] ) ? (bool) $instance['display_category'] : false; $display_date = isset( $instance['display_date'] ) ? (bool) $instance['display_date'] : true; $view_all_title = isset( $instance['view_all_title'] ) ? esc_html( $instance['view_all_title'] ) : esc_html__( 'View All', 'buzz-magazine' ); ?>
get_field_name('icon'); buzz_magazine_get_icon_table( $name, $icon ); ?>
'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( 'display_content' )); ?>" name="get_field_name( 'display_content' )); ?>" />
id="get_field_id( 'display_date' )); ?>" name="get_field_name( 'display_date' )); ?>" />
0 ) { $button_link = get_category_link( $category ); } echo $before_widget; ?> absint( $display_per_posts ), 'post_type' => 'post', 'post_status' => 'publish', 'post__not_in' => get_option( 'sticky_posts' ), ); if ( absint( $category ) > 0 ) { $args['cat'] = absint( $category ); } $grid_style_query = new WP_Query( $args ); if ($grid_style_query->have_posts()) : $count= 0; ?>