'', 'title' => esc_html__('Our Feature', 'business-uncode'), 'image' => '', ); return $defaults; } public function __construct() { parent::__construct( 'construction-feature-widget', esc_html__('BU: Feature Widget', 'business-uncode'), array('description' => esc_html__('Construction Feature Section', 'business-uncode')) ); } public function form( $instance ) { $instance = wp_parse_args( (array ) $instance, $this->defaults() ); $themesdivine_page_items = $instance['themesdivine_page_items']; $title = apply_filters('widget_title', !empty($instance['title']) ? esc_html($instance['title']) : '', $instance, $this->id_base); $image = esc_url( $instance['image'] ); ?>



get_field_id( 'themesdivine_page_items') .$total_repeater.'page_id'; $repeater_name = $this->get_field_name( 'themesdivine_page_items' ).'['.$total_repeater.']['.'page_id'.']'; ?>

get_field_id( 'themesdivine_page_items') .$structure_repeater_depth.'page_id'; $repeater_name = $this->get_field_name( 'themesdivine_page_items' ).'['.$structure_repeater_depth.']['.'page_id'.']'; ?> '; $add_field = __('Add Item', 'business-uncode'); echo ''.$add_field.'
'; ?>



'; endif; ?>

0 && is_array($themesdivine_page_items) ){ foreach ($themesdivine_page_items as $key=>$about ){ $page_ids[$key]['page_id'] = absint( $about['page_id'] ); } } } $instance['themesdivine_page_items'] = $page_ids; return $instance; } public function widget($args, $instance) { if (!empty($instance)) { $instance = wp_parse_args((array )$instance, $this->defaults()); $title = apply_filters('widget_title', !empty($instance['title']) ? esc_html($instance['title']) : '', $instance, $this->id_base); $image = $instance['image'] ; $themesdivine_page_items = $instance['themesdivine_page_items']; echo $args['before_widget']; ?>

0 && is_array($themesdivine_page_items) ){ foreach ( $themesdivine_page_items as $our_feature ){ if( isset( $our_feature['page_id'] ) && !empty( $our_feature['page_id'] ) ){ $post_in[] = $our_feature['page_id']; } } } if( !empty( $post_in )) : $our_feature_page_args = array( 'post__in' => $post_in, 'orderby' => 'post__in', 'posts_per_page' => count( $post_in ), 'post_type' => 'page', 'no_found_rows' => true, 'post_status' => 'publish' ); $our_feature_query = new WP_Query( $our_feature_page_args ); /*The Loop*/ if ( $our_feature_query->have_posts() ): $i = 1; while ( $our_feature_query->have_posts() ):$our_feature_query->the_post(); $icon = get_post_meta(get_the_ID(), 'business_uncode_icon', true); $idvalue[] = get_the_ID(); ?>