echo the_event_start_date(); ?> </td> </tr> <tr> <td class="tec-event-meta-desc"><?php _e('End:', $spEvents->pluginDomain); ?> </td> <td class="tec-event-meta-value"><?php echo the_event_end_date(); ?> </td> </tr> <?php $venue = the_event_venue(); if (!empty($venue)) { ?> <tr> <td class="tec-event-meta-desc"><?php _e('Venue:', $spEvents->pluginDomain); ?> </td> <td class="tec-event-meta-value"><?php echo $venue; ?> </td> </tr> <?php } ?>
<?php if (the_event_start_date() !== the_event_end_date()) { ?> <li><span class="meta">End:</span> <?php echo the_event_end_date(); ?> </li> <?php } ?> <?php if (the_event_venue()) { ?> <li><span class="meta"><?php echo the_event_venue(); ?> </span></li> <?php } ?> <?php if (the_event_phone()) { ?> <li><span class="meta">Phone:</span> <?php echo the_event_phone(); ?> </li> <?php }
/** * @return string formatted event address */ function tec_get_event_address($postId = null, $includeVenue = false) { if ($postId === null || !is_numeric($postId)) { global $post; $postId = $post->ID; } $address = ''; if ($includeVenue) { $address .= the_event_venue($postId); } if (the_event_address($postId)) { if ($address) { $address .= ', '; } $address .= the_event_address($postId); } if (the_event_city($postId)) { if ($address) { $address .= ', '; } $address .= the_event_city($postId); } if (the_event_region($postId)) { if ($address) { $address .= ', '; } $address .= the_event_region($postId); } if (the_event_country($postId)) { if ($address) { $address .= ', '; } $address .= the_event_country($postId); } if (the_event_zip($postId)) { if ($address) { $address .= ', '; } $address .= the_event_zip($postId); } $address = str_replace(' ,', ',', $address); return $address; }