Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- // Get the start date and end date
- $date_output = tribe_get_start_date(null, false);
- $end_date = tribe_get_end_date(null, false);
- // Only show the end date if it is different to the start date
- if ($date_output !== $end_date) $date_output .= " – $end_date";
- // If it is an all day event then say so
- if (tribe_get_all_day()) $time_output = '(All day event)';
- // Otherwise show the start-end times
- else $time_output = tribe_get_start_date(null, false, get_option('time_format')).' – '
- .tribe_get_end_date(null, false, get_option('time_format'));
- ?>
- <tr>
- <td class="tribe-events-event-meta-desc"><?php _e('Date:', 'tribe-events-calendar') ?></td>
- <td class="tribe-events-event-meta-value"><?php esc_html_e($date_output) ?></td>
- </tr>
- <tr>
- <td class="tribe-events-event-meta-desc"><?php _e('Time:', 'tribe-events-calendar') ?></td>
- <td class="tribe-events-event-meta-value"><?php esc_html_e($time_output) ?></td>
- </tr>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement