-1 ); return $defaults; } public function __construct() { parent::__construct( 'nexas-feature-widget', esc_html__('Nexas Feature Widget', 'nexas'), array('description' => esc_html__('Nexas Feature Section', 'nexas')) ); } public function widget( $args, $instance ) { if ( !empty( $instance ) ) { $instance = wp_parse_args( (array) $instance, $this->defaults() ); /*default values*/ $catid = absint( $instance[ 'cat_id' ] ); echo $args['before_widget']; ?>
true, 'post__not_in' => $sticky, 'cat' => $catid, 'posts_per_page' => 3 ); $home_feature_section_query = new WP_Query( $home_feature_section ); if ( $home_feature_section_query->have_posts() ) { while ($home_feature_section_query->have_posts()) { $home_feature_section_query->the_post(); $icon = get_post_meta( get_the_ID(), 'nexas_icon', true ); ?>

defaults() ); /*default values*/ $nexas_selected_cat = absint( $instance[ 'cat_id' ] ); ?>


esc_html__('Select Category', 'nexas'), 'orderby' => 'name', 'order' => 'asc', 'show_count' => 1, 'hide_empty' => 1, 'echo' => 1, 'selected' => $nexas_selected_cat, 'hierarchical' => 1, 'name' => esc_attr( $this->get_field_name('cat_id') ), 'id' => esc_attr( $this->get_field_name('cat_id') ), 'class' => 'widefat', 'taxonomy' => 'category', 'hide_if_empty' => false, ); wp_dropdown_categories( $nexas_dropown_cat ); ?>