</td> <td> <input tabindex="<?php tribe_events_tab_index(); ?> " type="checkbox" id="EventShowMapLink" name="venue[EventShowMapLink]" value="1" <?php checked($google_map_link_toggle); ?> /> </td> </tr> <?php } else { if (tribe_get_option('embedGoogleMaps', true)) { // Only show if embed option selected $google_map_toggle = tribe_embed_google_map($postId) || get_post_status($postId) == 'auto-draft' ? true : false; ?> <tr id="google_map_toggle"> <td><?php _e('Show Google Map:', 'tribe-events-calendar'); ?> </td> <td> <input tabindex="<?php tribe_events_tab_index(); ?> " type="checkbox" id="VenueShowMap" name="venue[ShowMap]" value="true" <?php checked($google_map_toggle); ?> /> </td>
</td> <td> <input tabindex="<?php tribe_events_tab_index(); ?> " type="checkbox" id="EventShowMapLink" name="venue[EventShowMapLink]" value="1" <?php checked($google_map_link_toggle); ?> /> </td> </tr> <?php } else { if (tribe_get_option('embedGoogleMaps', true)) { // Only show if embed option selected $google_map_toggle = tribe_embed_google_map($event->ID) || get_post_status($event->ID) == 'auto-draft' ? true : false; ?> <tr id="google_map_toggle"> <td class='tribe-table-field-label'><?php esc_html_e('Show Google Map:', 'the-events-calendar'); ?> </td> <td> <input tabindex="<?php tribe_events_tab_index(); ?> " type="checkbox" id="VenueShowMap" name="venue[ShowMap]" value="true" <?php checked($google_map_toggle); ?> /> </td>
?> <div class="tribe-events-venue"> <p class="tribe-events-back"><a href="<?php echo tribe_get_events_link(); ?> " rel="bookmark"><?php _e('← Back to Events', 'tribe-events-calendar-pro'); ?> </a></p> <div class="tribe-events-venue-meta vcard tribe-clearfix"> <?php if (tribe_embed_google_map()) { ?> <!-- Venue Map --> <div class="tribe-events-map-wrap"> <?php echo tribe_get_embedded_map($venue_id, '350px', '200px'); ?> </div><!-- .tribe-events-map-wrap --> <?php } ?> <!-- Venue Title --> <?php do_action('tribe_events_single_venue_before_title'); ?>
<div class="tribe-events-venue"> <p class="tribe-events-back"> <a href="<?php echo esc_url(tribe_get_events_link()); ?> " rel="bookmark"><?php printf(__('← Back to %s', 'tribe-events-calendar-pro'), tribe_get_event_label_plural()); ?> </a> </p> <div class="tribe-events-venue-meta vcard tribe-clearfix"> <?php if (tribe_embed_google_map() && tribe_address_exists()) { ?> <!-- Venue Map --> <div class="tribe-events-map-wrap"> <?php echo tribe_get_embedded_map($venue_id, '100%', '200px'); ?> </div><!-- .tribe-events-map-wrap --> <?php } ?> <!-- Venue Title --> <?php do_action('tribe_events_single_venue_before_title'); ?>
if (function_exists('sharethis_button')) { sharethis_button(); } ?> </div><!-- end .social-wrapper --> <div class="tribe-events-schedule updated published tribe-clearfix"> <?php echo tribe_events_event_recurring_info_tooltip(); ?> </div> <!-- Google Map --> <?php if (tribe_embed_google_map(get_the_ID())) { ?> <?php if (tribe_address_exists(get_the_ID())) { ?> <div class="map-wrapper"><?php tribe_the_embedded_map(); ?> </div> <?php } ?> <?php } ?>
<?php if ($not_skeleton) { ?> <div class="tribe-events-single-section tribe-events-event-meta primary tribe-clearfix"> <?php } ?> <?php do_action('tribe_events_single_event_meta_primary_section_start'); // Always include the main event details in this first section tribe_get_template_part('modules/meta/details'); // If we have no map to embed and no need to keep the venue separate... if (!$set_venue_apart && !tribe_embed_google_map()) { tribe_get_template_part('modules/meta/venue'); } elseif (!$set_venue_apart && !tribe_has_organizer() && tribe_embed_google_map()) { // If we have no organizer, no need to separate the venue but we have a map to embed... tribe_get_template_part('modules/meta/venue'); echo '<div class="tribe-events-meta-group tribe-events-meta-group-gmap">'; tribe_get_template_part('modules/meta/map'); echo '</div>'; } else { // If the venue meta has not already been displayed then it will be printed separately by default $set_venue_apart = true; } // Include organizer meta if appropriate if (tribe_has_organizer()) { tribe_get_template_part('modules/meta/organizer'); } do_action('tribe_events_single_event_meta_primary_section_end'); ?>
/** * Return the single event meta * * @deprecated since 3.6 * @todo remove in 3.9 * @return string **/ function tribe_events_single_event_meta() { // Use the new template driven approach to rendering meta data unless the user opts to use the old system if (!apply_filters('tribe_events_single_event_meta_legacy_mode', false)) { tribe_get_template_part('modules/meta'); return ''; } // For users using the meta factory ("legacy mode")... $event_id = get_the_ID(); $skeleton_mode = apply_filters('tribe_events_single_event_the_meta_skeleton', false, $event_id); $group_venue = apply_filters('tribe_events_single_event_the_meta_group_venue', false, $event_id); $html = ''; if ($skeleton_mode) { // show all visible meta_groups in skeleton view $html .= tribe_get_the_event_meta(); } else { $html .= '<div class="tribe-events-single-section tribe-events-event-meta tribe-clearfix">'; // Event Details $html .= tribe_get_meta_group('tribe_event_details'); // When there is no map show the venue info up top if (!$group_venue && !tribe_embed_google_map($event_id)) { // Venue Details $html .= tribe_get_meta_group('tribe_event_venue'); $group_venue = false; } else { if (!$group_venue && !tribe_has_organizer($event_id) && tribe_address_exists($event_id) && tribe_embed_google_map($event_id)) { $html .= sprintf('%s<div class="tribe-events-meta-group tribe-events-meta-group-gmap">%s</div>', tribe_get_meta_group('tribe_event_venue'), tribe_get_meta('tribe_venue_map')); $group_venue = false; } else { $group_venue = true; } } // Organizer Details if (tribe_has_organizer($event_id)) { $html .= tribe_get_meta_group('tribe_event_organizer'); } $html .= apply_filters('tribe_events_single_event_the_meta_addon', '', $event_id); $html .= '</div>'; } if (!$skeleton_mode && $group_venue) { // If there's a venue map and custom fields or organizer, show venue details in this seperate section $venue_details = tribe_get_meta_group('tribe_event_venue') . tribe_get_meta('tribe_venue_map'); if (!empty($venue_details)) { $html .= apply_filters('tribe_events_single_event_the_meta_venue_row', sprintf('<div class="tribe-events-single-section tribe-events-event-meta tribe-clearfix">%s</div>', $venue_details)); } } return apply_filters('tribe_events_single_event_meta', $html); }
<?php if (tribe_get_option('embedGoogleMaps', true)) { ?> <tr id="google_map_toggle"> <td> <label for="EventShowMap"> <?php _e('Show Google Map', 'tribe-events-community'); ?> : </label> </td> <td> <input type="checkbox" id="EventShowMap" name="EventShowMap" value="1" <?php checked(tribe_embed_google_map($event)); ?> /> </td> </tr><!-- #google_map_toggle --> <?php } ?> <?php } // if ( tribe_community_events_is_venue_edit_screen() ) ?> </table><!-- #event_venue -->
/> </td> </tr> <?php if (tribe_get_option('embedGoogleMaps')) { ?> <tr id="google_map_toggle"> <td><?php _e('Show Google Map:', 'tribe-events-calendar'); ?> </td> <td><input tabindex="<?php $this->tabIndex(); ?> " type="checkbox" id="EventShowMap" name="EventShowMap" value="1" <?php checked(tribe_embed_google_map($postId)); ?> /></td> </tr> <?php } ?> </table> </div> <?php do_action('tribe_after_location_details', $postId); ?> <table id="event_organizer" class="eventtable"> <tr> <td colspan="2" class="tribe_sectionheader"><h4><?php _e('Event Organizer Details', 'tribe-events-calendar');
/** * Return the single event meta * * @return string * @since 3.0 * @author Jessica Yazbek **/ function tribe_events_single_event_meta() { $event_id = get_the_ID(); $skeleton_mode = apply_filters('tribe_events_single_event_the_meta_skeleton', false, $event_id); $group_venue = apply_filters('tribe_events_single_event_the_meta_group_venue', false, $event_id); $html = ''; if ($skeleton_mode) { // show all visible meta_groups in skeleton view $html .= tribe_get_the_event_meta(); } else { $html .= '<div class="tribe-events-single-section tribe-events-event-meta tribe-clearfix">'; // Event Details $html .= tribe_get_meta_group('tribe_event_details'); // When there is no map show the venue info up top if (!$group_venue && !tribe_embed_google_map($event_id)) { // Venue Details $html .= tribe_get_meta_group('tribe_event_venue'); $group_venue = false; } else { if (!$group_venue && !tribe_has_organizer($event_id) && tribe_address_exists($event_id) && tribe_embed_google_map($event_id)) { $html .= sprintf('%s<div class="tribe-events-meta-group">%s</div>', tribe_get_meta_group('tribe_event_venue'), tribe_get_meta('tribe_venue_map')); $group_venue = false; } else { $group_venue = true; } } // Organizer Details if (tribe_has_organizer($event_id)) { $html .= tribe_get_meta_group('tribe_event_organizer'); } $html .= apply_filters('tribe_events_single_event_the_meta_addon', '', $event_id); $html .= '</div>'; } if (!$skeleton_mode && $group_venue) { // If there's a venue map and custom fields or organizer, show venue details in this seperate section $venue_details = tribe_get_meta_group('tribe_event_venue') . tribe_get_meta('tribe_venue_map'); if (!empty($venue_details)) { $html .= apply_filters('tribe_events_single_event_the_meta_venue_row', sprintf('<div class="tribe-events-single-section tribe-events-event-meta tribe-clearfix">%s</div>', $venue_details)); } } return apply_filters('tribe_events_single_event_meta', $html); }
public function add_google_map_preview($postId) { if (!$postId) { return; } if (tribe_get_option('embedGoogleMaps')) { $display = tribe_embed_google_map($postId) ? 'block' : 'none'; ?> <div style="float:right; display:<?php echo $display; ?> ;"> <?php echo tribe_get_embedded_map($postId, 200, 200, true); ?> </div> <?php } ?> <div style="clear:both"></div> <?php }