'', 'bg_image' => '', ); return $defaults; } public function __construct() { parent::__construct( 'nexas-testimonial-widget', esc_html__( 'Nexas Testimonial Widget', 'nexas' ), array('description' => esc_html__( 'Nexas Testimonial Section', 'nexas' ) ) ); } public function widget($args, $instance) { if (!empty($instance)) { $instance = wp_parse_args((array )$instance, $this->defaults()); $testimonials_page_items = $instance['testimonials_page_items']; $bg_image = esc_url($instance['bg_image']); echo $args['before_widget']; ?>
0 && is_array($testimonials_page_items) ){ foreach ($testimonials_page_items as $key=>$about ){ $page_ids[$key]['page_id'] = absint( $about['page_id'] ); } } } $instance['testimonials_page_items'] = $page_ids; return $instance; } public function form( $instance ) { $instance = wp_parse_args( (array )$instance, $this->defaults() ); $testimonials_page_items = $instance['testimonials_page_items']; $bgimage = esc_url( $instance['bg_image'] ); ?>


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

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




'; endif; ?>