esc_html__('Our Testimonials', 'business-form'), 'sub-title' => '', 'resources' => '', 'features_background' => '', 'section-id' =>'', ); return $defaults; } public function __construct() { parent::__construct( 'business_testimonials_widget', esc_html__('AT : Testimonials Widget', 'business-form'), array('description' => esc_html__('Business Testimonials Section', 'business-form')) ); } public function form( $instance ) { $instance = wp_parse_args( (array ) $instance, $this->defaults() ); $title = esc_attr( $instance['title'] ); $resources = ( ! empty( $instance['resources'] ) ) ? $instance['resources'] : array(); $features_background = esc_url( $instance['features_background'] ); $section_id= esc_attr( $instance['section-id'] ); ?>




= 1 && is_array( $resources ) ) { $selected = $resources['main']; } else { $selected = ""; } $repeater_id = $this->get_field_id( 'resources' ).'-main'; $repeater_name = $this->get_field_name( 'resources'). '[main]'; $args = array( 'selected' => $selected, 'name' => $repeater_name, 'id' => $repeater_id, 'class' => 'widefat pt-select', 'show_option_none' => __( 'Select Page', 'business-form'), 'option_none_value' => 0 // string ); wp_dropdown_pages( $args ); ?> 0 ) { foreach( $resources as $resource ) { if ( isset( $resource['page_ids'] ) ) { ?>
get_field_id( 'resources' ) .'-'. $counter.'-page_ids'; $repeater_name = $this->get_field_name( 'resources' ) . '['.$counter.'][page_ids]'; $args = array( 'selected' => $resource['page_ids'], 'name' => $repeater_name, 'id' => $repeater_id, 'class' => 'widefat pt-select', 'show_option_none' => __( 'Select Page', 'business-form'), 'option_none_value' => 0 // string ); wp_dropdown_pages( $args ); ?>


style="display:none;" > <?php esc_attr_e( 'Image preview', 'business-form' ); ?>

defaults()); $title = apply_filters('widget_title', !empty($instance['title']) ? esc_html($instance['title']) : '', $instance, $this->id_base); $resources = (!empty($instance['resources'])) ? $instance['resources'] : array(); $features_background = esc_url($instance['features_background']); $section_id = esc_attr($instance['section-id']); echo $args['before_widget']; ?>