'', 'title' => '', 'at_all_page_items' => '', 'column_number' => 4, 'background_options' => 'gray' ); function __construct() { parent::__construct( /*Base ID of your widget*/ 'event_star_team', /*Widget name will appear in UI*/ esc_html__('AT Team/Speakers Section', 'event-star'), /*Widget description*/ array( 'description' => esc_html__( 'Show Team 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' ] ); $title = esc_attr( $instance[ 'title' ] ); $at_all_page_items = $instance['at_all_page_items']; $column_number = absint( $instance[ 'column_number' ] ); $background_options = esc_attr( $instance['background_options'] ); ?>



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; $event_star_widget_column_number = event_star_widget_column_number(); $instance[ 'column_number' ] = event_star_sanitize_choice_options( $new_instance[ 'column_number' ], $event_star_widget_column_number, 4 ); $event_star_widget_background_options = event_star_background_options(); $instance[ 'background_options' ] = event_star_sanitize_choice_options( $new_instance[ 'background_options' ], $event_star_widget_background_options, 'default' ); 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 ); $title = apply_filters( 'widget_title', !empty( $instance['title'] ) ? $instance['title'] : '', $instance, $this->id_base ); $at_all_page_items = $instance['at_all_page_items']; $column_number = absint( $instance[ 'column_number' ] ); $background_options = esc_attr( $instance['background_options'] ); $bg_gray_class = $background_options == 'gray'?'at-gray-bg':''; echo $args['before_widget']; ?>
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' ); $team_query = new WP_Query( $event_star_post_in_page_args ); /*The Loop*/ if ( $team_query->have_posts() ): $i = 1; while( $team_query->have_posts() ):$team_query->the_post(); if( 1 == $column_number ){ $b_col = " col-sm-12"; } elseif( 2 == $column_number ){ $b_col = " col-sm-6"; } elseif( 3 == $column_number ){ $b_col = " col-sm-12 col-md-4"; } else{ $b_col = " col-sm-12 col-md-3"; } $animation1 = "init-animate zoomIn"; ?>
"; } $i++; endwhile; endif; wp_reset_postdata(); endif; ?>