%PDF- %PDF-
Direktori : /var/www/html/higroup/wp-content/themes/evenex/template-parts/eventin/ |
Current File : /var/www/html/higroup/wp-content/themes/evenex/template-parts/eventin/single-schedule.php |
<?php use \Etn\Utils\Helper; $event_options = get_option("etn_event_options"); $data = Helper::post_data_query( 'etn-schedule' , 5 , $order , null , null ); $i = -1; ?> <!-- schedule tab start --> <div class="schedule-tab-wrapper"> <?php if(count($data) > 1) : ?> <ul class="nav nav-tabs" id="myTab" role="tablist"> <?php $i = -1; foreach ($data as $key => $post) { $i++; $schedule_meta = get_post_meta($post->ID); $schedule_date = strtotime($schedule_meta['etn_schedule_date'][0]); $schedule_date = date("d M", $schedule_date); $active_class = (($i == 0) ? 'active' : ' '); ?> <li class="nav-item"> <a class="nav-link <?php echo esc_attr($active_class); ?>" id="xs-tab-<?php echo '1' . "-" . $i; ?>" data-toggle="tab" href="#xs-<?php echo '1' . "-" . $i; ?>" role="tab" aria-controls="home" aria-selected="true"> <span class='etn-date'><?php echo esc_html($schedule_date); ?></span> <span class=etn-day><?php echo esc_html($post->post_title); ?></span> </a> </li> <?php } ?> </ul> <?php endif; ?> <div class='etn-tab-content clearfix etn-schedule-wrap'> <div class="tab-content" id="myTabContent"> <?php $event_options["time_format"] == '' ? $event_options["time_format"] = '12' : $event_options["time_format"]; $etn_sched_time_format = $event_options["time_format"] == '24' ? "H:i" : "h:i a"; $j = -1; foreach ($data as $post) { $j++; $schedule_meta = get_post_meta($post->ID); $schedule_date = strtotime($schedule_meta['etn_schedule_date'][0]); $schedule_topics = unserialize($schedule_meta['etn_schedule_topics'][0]); $schedule_date = date("d M", $schedule_date); $active_class = (($j == 0) ? 'tab-active' : ' '); ?> <!-- start repeatable item --> <div class="tab-pane fade show active" id="xs-<?php echo '1' . "-" . $j; ?>" role="tabpanel" aria-labelledby="xs-tab-<?php echo '1' . "-" . $j; ?>"> <div class="xs-accordion-wrap"> <?php foreach ($schedule_topics as $key => $topic) { $etn_schedule_topic = (isset($topic['etn_schedule_topic']) ? $topic['etn_schedule_topic'] : ''); $etn_schedule_start_time = date($etn_sched_time_format, strtotime($topic['etn_shedule_start_time'])); $etn_schedule_end_time = date($etn_sched_time_format, strtotime($topic['etn_shedule_end_time'])); $etn_schedule_room = (isset($topic['etn_shedule_room']) ? $topic['etn_shedule_room'] : ''); $etn_schedule_objective = (isset($topic['etn_shedule_objective']) ? $topic['etn_shedule_objective'] : ''); $etn_schedule_speaker = (isset($topic['etn_shedule_speaker']) ? $topic['etn_shedule_speaker'] : []); $acc_class = ($key == 0) ? 'active' : ''; ?> <div class="card"> <div class="card-header" id="headingOne"> <h5 class="mb-0"> <button class="xs-event-acordion-heading <?php echo $j != 0 ? 'collapsed' : ''; ?>" data-toggle="collapse" data-target="#<?php echo $j.$key; ?>-collapseOne" aria-controls="<?php echo $j.$key; ?>-collapseOne" aria-expanded="<?php echo $key == 0 ? 'false' : ''; ?>"> <ul> <li> <span class='etn-date'><?php echo esc_html($schedule_date); ?></span> </li> <li> <span class='etn-schedule-time'><?php echo esc_html($etn_schedule_start_time) . " - " . esc_html($etn_schedule_end_time); ?></span> </li> </ul> <h4 class='etn-title <?php echo esc_attr($acc_class); ?>'> <?php echo esc_html($etn_schedule_topic); ?> </h4> <i class="fa fa-plus"></i> </button> </h5> </div> <div id="<?php echo $j.$key; ?>-collapseOne" class="collapse <?php echo $j == 0 ? 'show' : ''; ?>" aria-labelledby="headingOne" data-parent=".xs-accordion-wrap"> <div class="card-body"> <p> <?php echo Helper::render($etn_schedule_objective); ?> </p> <div class='etn-schedule-speaker-item'> <?php $speaker_avatar = apply_filters("etn/speakers/avatar", ETN_ASSETS . "images/avatar.jpg"); if (count($etn_schedule_speaker) > 0 && is_array($etn_schedule_speaker)) { foreach ($etn_schedule_speaker as $key => $value) { $speaker_thumbnail = !empty( get_the_post_thumbnail_url($value) ) ? get_the_post_thumbnail_url($value) : $speaker_avatar; $etn_schedule_single_speaker = get_post($value); $speaker_designation = get_post_meta($etn_schedule_single_speaker->ID, 'etn_speaker_designation', true); $etn_speaker_permalink = get_post_permalink($value); $speaker_title = $etn_schedule_single_speaker->post_title; ?> <div class='etn-schedule-single-speaker'> <a href='<?php echo esc_url($etn_speaker_permalink); ?>'> <img src='<?php echo esc_url($speaker_thumbnail); ?>' alt='<?php echo esc_html($speaker_title); ?>'> </a> <div class="xs-speaker-bio"> <span class='etn-schedule-speaker-title'><?php echo esc_html($speaker_title); ?></span> <span class='etn-schedule-speaker-designation'><?php echo Helper::kses($speaker_designation); ?></span> </div> </div> <?php } } ?> </div> </div> </div> </div> <?php } ?> </div> </div> <!-- end repeatable item --> <?php } ?> </div> </div> </div> <!-- schedule tab end -->