'', 'title' => esc_html__('Our Services','nexas'), 'sub_title' => esc_html__('Check Our All Services','nexas') ); return $defaults; } public function __construct() { parent::__construct( /*Base ID of your widget*/ 'nexas-service-widget', /*Widget name will appear in UI*/ esc_html__( 'Nexas Service Widget', 'nexas' ), /*Widget description*/ array( 'description' => esc_html__( 'Nexas Service Section', 'nexas' ) ) ); } /** * Function to Creating widget front-end. This is where the action happens * * @access public * @since 1.0 * * @param array $args widget setting * @param array $instance saved values * * @return void * */ 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); $subtitle = esc_html( $instance['sub_title'] ); $services_page_items = $instance['services_page_items']; echo $args['before_widget']; ?>


0 && is_array($services_page_items) ){ foreach ( $services_page_items as $features ){ if( isset( $features['page_id'] ) && !empty( $features['page_id'] ) ){ $post_in[] = $features['page_id']; } } } if( !empty( $post_in )) : $services_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' ); $services_query = new WP_Query( $services_page_args ); /*The Loop*/ if ( $services_query->have_posts() ): $i = 1; while ( $services_query->have_posts() ):$services_query->the_post(); $icon = get_post_meta( get_the_ID(), 'nexas_icon', true ); $idvalue[] = get_the_ID(); ?>

0 && is_array($services_page_items) ){ foreach ($services_page_items as $key=>$about ){ $page_ids[$key]['page_id'] = absint( $about['page_id'] ); } } } $instance['services_page_items'] = $page_ids; return $instance; } public function form($instance) { $instance = wp_parse_args( (array ) $instance, $this->defaults() ); $title = esc_attr( $instance['title'] ); $subtitle = esc_attr( $instance['sub_title'] ); $services_page_items = $instance['services_page_items']; ?>




0 && is_array($services_page_items) ){ foreach ($services_page_items as $about){ $repeater_id = $this->get_field_id( 'services_page_items') .$total_repeater.'page_id'; $repeater_name = $this->get_field_name( 'services_page_items' ).'['.$total_repeater.']['.'page_id'.']'; ?>

get_field_id( 'services_page_items') .$coder_repeater_depth.'page_id'; $repeater_name = $this->get_field_name( 'services_page_items' ).'['.$coder_repeater_depth.']['.'page_id'.']'; ?> '; $add_field = __('Add Item', 'nexas'); echo ''.$add_field.'
'; ?>