function file update
This commit is contained in:
parent
6893782d91
commit
4bda9c74ca
|
@ -3433,26 +3433,24 @@ function mep_event_list_upcoming_date_li($event_id,$type='grid'){
|
|||
$event_start_datetime = get_post_meta($event_id,'event_start_datetime',true);
|
||||
$event_end_datetime = get_post_meta($event_id,'event_end_datetime',true);
|
||||
$event_multidate = get_post_meta($event_id,'mep_event_more_date',true) ? get_post_meta($event_id,'mep_event_more_date',true) : [];
|
||||
|
||||
|
||||
$event_std[] = array(
|
||||
'event_std' => $event_start_datetime
|
||||
);
|
||||
|
||||
$event_std[] = array(
|
||||
'event_std' => $event_start_datetime,
|
||||
'event_etd' => $event_end_datetime
|
||||
);
|
||||
$a = 1;
|
||||
if(sizeof($event_multidate) > 0){
|
||||
foreach($event_multidate as $event_mdt){
|
||||
$event_std[]['event_std'] = $event_mdt['event_more_start_date'].' '.$event_mdt['event_more_start_time'];
|
||||
$event_std[]['event_etd'] = $event_mdt['event_more_end_date'].' '.$event_mdt['event_more_end_time'];
|
||||
}
|
||||
$event_std[$a]['event_std'] = $event_mdt['event_more_start_date'].' '.$event_mdt['event_more_start_time'];
|
||||
$event_std[$a]['event_etd'] = $event_mdt['event_more_end_date'].' '.$event_mdt['event_more_end_time'];
|
||||
$a++;
|
||||
}
|
||||
}
|
||||
// print_r($event_std);
|
||||
$cn = 0;
|
||||
foreach($event_std as $_event_std){
|
||||
// print_r($_event_std);
|
||||
$std = $_event_std['event_std'];
|
||||
$std = $_event_std['event_std'];
|
||||
$start_date = date('Y-m-d',strtotime($_event_std['event_std']));
|
||||
$end_date = date('Y-m-d',strtotime($_event_std['event_etd']));
|
||||
if (strtotime(current_time('Y-m-d H:i')) < strtotime($std) && $cn == 0) {
|
||||
if($type == 'grid'){
|
||||
?>
|
||||
|
@ -3461,16 +3459,15 @@ if (strtotime(current_time('Y-m-d H:i')) < strtotime($std) && $cn == 0) {
|
|||
<div class="evl-cc">
|
||||
<h5>
|
||||
<?php echo get_mep_datetime($std, 'date-text'); ?>
|
||||
<?php echo mep_get_option('mep_time_text', 'label_setting_sec') ? mep_get_option('mep_time_text', 'label_setting_sec') : _e('Time:', 'mage-eventpress'); ?>
|
||||
</h5>
|
||||
<h6><?php echo get_mep_datetime($_event_std['event_std'], 'time');
|
||||
if ($hide_only_end_time_list == 'no') { ?> - <?php echo get_mep_datetime($_event_std['event_etd'], 'date-time-text'); } ?></h6>
|
||||
<h5><?php echo get_mep_datetime($_event_std['event_std'], 'time');
|
||||
if ($hide_only_end_time_list == 'no') { ?> - <?php if($start_date == $end_date){ echo get_mep_datetime($_event_std['event_etd'], 'time'); }else{ echo get_mep_datetime($_event_std['event_etd'], 'date-time-text'); } } ?></h5>
|
||||
</div>
|
||||
</li>
|
||||
<?php
|
||||
}elseif($type == 'minimal'){
|
||||
?>
|
||||
<span class='mep_minimal_list_date'><i class="fa fa-calendar"></i> <?php echo get_mep_datetime($std, 'date-text').' '; echo get_mep_datetime($_event_std['event_std'], 'time'); if ($hide_only_end_time_list == 'no') { ?> - <?php echo get_mep_datetime($_event_std['event_etd'], 'date-time-text'); } ?></span>
|
||||
<span class='mep_minimal_list_date'><i class="fa fa-calendar"></i> <?php echo get_mep_datetime($std, 'date-text').' '; echo get_mep_datetime($_event_std['event_std'], 'time'); if ($hide_only_end_time_list == 'no') { ?> - <?php if($start_date == $end_date){ echo get_mep_datetime($_event_std['event_etd'], 'time'); }else{ echo get_mep_datetime($_event_std['event_etd'], 'date-time-text'); } } ?></span>
|
||||
<?php
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue