wrong “past-event” class
-
I’m using My Calendar 2.5.6 and found that the future event container tag sometimes has “past-event” class.
I investigate the code and found that mc_event_classes() function in my-calendar-output.php adds class names.
$ts = $event->ts_occur_begin; $end = $event->ts_occur_end; $now = current_time( 'timestamp' ); if ( $ts < $now && $end > $now ) { $date_relation = 'on-now'; } else if ( $now < $ts ) { $date_relation = 'future-event'; } else if ( $now > $ts ) { $date_relation = 'past-event'; }I think
$event->ts_occur_beginand$event->ts_occur_endare GMT, butcurrent_time('timestamp')returns local time, so it should becurrent_time('timestamp', 1).
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
The topic ‘wrong “past-event” class’ is closed to new replies.