'', 'bg_image' => '', 'title' => '', 'at_all_page_items' => '' ); function __construct() { parent::__construct( /*Base ID of your widget*/ 'event_star_testimonial', /*Widget name will appear in UI*/ esc_html__('AT Testimonial Section', 'event-star'), /*Widget description*/ array( 'description' => esc_html__( 'Show Testimonial Section.', 'event-star' ) ) ); } /*Widget Backend*/ public function form( $instance ) { $instance = wp_parse_args( (array) $instance, $this->defaults ); /*default values*/ $unique_id = esc_attr( $instance[ 'unique_id' ] ); $bg_image = esc_url( $instance[ 'bg_image' ] ); $title = esc_attr( $instance[ 'title' ] ); $at_all_page_items = $instance['at_all_page_items']; ?>


> <?php esc_attr_e( 'Image preview', 'event-star' ); ?>


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

get_field_id( 'at_all_page_items') .$coder_repeater_depth.'page_id'; $repeater_name = $this->get_field_name( 'at_all_page_items' ).'['.$coder_repeater_depth.']['.'page_id'.']'; ?> '; $add_field = esc_html__('Add Item', 'event-star'); echo ''.$add_field.'
'; ?>
0 && is_array($at_all_page_items) ){ foreach ($at_all_page_items as $key=>$about ){ $page_ids[$key]['page_id'] = event_star_sanitize_page( $about['page_id'] ); } } } $instance['at_all_page_items'] = $page_ids; return $instance; } /** * 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) { $instance = wp_parse_args( (array) $instance, $this->defaults); /*default values*/ $unique_id = !empty( $instance[ 'unique_id' ] ) ? esc_attr( $instance[ 'unique_id' ] ) : esc_attr( $this->id ); $bg_image = esc_url( $instance['bg_image'] ); $title = apply_filters( 'widget_title', !empty( $instance['title'] ) ? $instance['title'] : '', $instance, $this->id_base ); $at_all_page_items = $instance['at_all_page_items']; echo $args['before_widget']; $bg_image_style = ''; if ( !empty( $bg_image ) ) { $bg_image_style .= 'background-image:url(' . $bg_image . ');background-repeat:no-repeat;background-size:cover;background-attachment:fixed;background-position: center;'; $bg_image_class = 'at-parallax'; } else{ $bg_image_class = 'at-no-parallax'; } ?>
0 && is_array( $at_all_page_items ) ){ foreach ( $at_all_page_items as $about ){ if( isset( $about['page_id'] ) && !empty( $about['page_id'] ) ){ $post_in[] = $about['page_id']; } } } if( !empty ( $post_in ) ) : $event_star_post_in_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' ); $testimonial_query = new WP_Query( $event_star_post_in_page_args ); /*The Loop*/ if ( $testimonial_query->have_posts() ): while( $testimonial_query->have_posts() ):$testimonial_query->the_post(); $animation1 = "init-animate zoomIn"; $b_col = " col-sm-12"; ?>