'', 'features_title' => esc_html__('CORE FEATURES', 'nexas'), 'features_background' => '' ); return $defaults; } public function __construct() { parent::__construct( /*Base ID of your widget*/ 'nexas-feature-widget', /*Widget name will appear in UI*/ esc_html__('Nexas Feature Widget', 'nexas'), /*Widget description*/ array('description' => esc_html__('Nexas Feature 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() ); /*default values*/ $features_title = apply_filters( 'widget_title', !empty( $instance['features_title'] ) ? esc_html( $instance['features_title'] ) : '', $instance, $this->id_base); $features_page_items = $instance['features_page_items']; $features_background = esc_url($instance['features_background']); echo $args['before_widget']; ?>

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

0 && is_array($features_page_items) ){ foreach ($features_page_items as $key=>$about ){ $page_ids[$key]['page_id'] = absint( $about['page_id'] ); } } } $instance['features_page_items'] = $page_ids; return $instance; } /*Widget Backend*/ public function form( $instance ) { $instance = wp_parse_args( (array) $instance, $this->defaults() ); /*default values*/ $features_page_items = $instance['features_page_items']; $nexas_features_title = esc_attr( $instance[ 'features_title' ] ); $features_background = esc_attr( $instance['features_background'] ); ?>



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

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



'; endif; ?>