Tribe__Events__Main::display_rich_snippets_helper( $post_id )
Display a helper for the user, about the location and microdata for rich snippets
Contents
Parameters
- $postId
-
(int) (Required) the event ID to see if the helper is needed
Source
File: src/Tribe/Main.php
public function display_rich_snippets_helper( $post_id ) { // Avoid showing this message if we are on the Front End if ( ! is_admin() ) { return; } $venue_id = get_post_meta( $post_id, '_EventVenueID', true ); if ( ( ! $post_id || get_post_status( $post_id ) == 'auto-draft' ) && ! $venue_id && tribe_is_community_edit_event_page() ) { $venue_id = $this->defaults()->venue_id(); } $venue_id = apply_filters( 'tribe_display_event_venue_dropdown_id', $venue_id ); // If there is a Venue of some sorts, don't display this message if ( $venue_id ) { return; } ?> <tr class="tribe-rich-snippet-notice"> <td colspan="2"><?php printf( esc_html__( 'Without a defined location your event will not display a %sGoogle Rich Snippet%s on the search results.', 'the-events-calendar' ), '<a href="https://support.google.com/webmasters/answer/164506" target="_blank">', '</a>' ) ?></td> </tr> <?php }