Tribe__Events__Pro__Geo_Loc::setup_overwrite_geoloc( $post )
Source
File: src/Tribe/Geo_Loc.php
public function setup_overwrite_geoloc( $post ) {
if ( $post->post_type != Tribe__Events__Main::VENUE_POST_TYPE ) {
return;
}
$overwrite_coords = (bool) get_post_meta( $post->ID, self::OVERWRITE, true );
$_lat = get_post_meta( $post->ID, self::LAT, true );
$_lng = get_post_meta( $post->ID, self::LNG, true );
?>
<tr id="overwrite_coordinates">
<td class="tribe-table-field-label"><?php esc_attr_e( 'Use latitude + longitude', 'tribe-events-calendar-pro' ); ?>:</td>
<td>
<input
tabindex="<?php tribe_events_tab_index(); ?>"
type="checkbox"
id="VenueOverwriteCoords"
name="venue[OverwriteCoords]"
value="true"
<?php checked( $overwrite_coords ); ?>
/>
<input class=" " disabled title='<?php esc_attr_e( 'Latitude', 'tribe-events-calendar-pro' ) ?>' placeholder='<?php esc_attr_e( 'Latitude', 'tribe-events-calendar-pro' ) ?>' tabindex="<?php tribe_events_tab_index(); ?>" type="text" id="VenueLatitude" name="venue[Lat]" value="<?php echo esc_attr( is_numeric( $_lat ) ? (float) $_lat : '' ); ?>" />
<input class=" " disabled title='<?php esc_attr_e( 'Longitude', 'tribe-events-calendar-pro' ) ?>' placeholder='<?php esc_attr_e( 'Longitude', 'tribe-events-calendar-pro' ) ?>' tabindex="<?php tribe_events_tab_index(); ?>" type="text" id="VenueLongitude" name="venue[Lng]" value="<?php echo esc_attr( is_numeric( $_lng ) ? (float) $_lng : '' ); ?>" />
</td>
</tr>
<?php
// Some helper text explaining the limitations of this field without a custom Google Maps API key.
if ( tribe_is_using_basic_gmaps_api() ) : ?>
<?php $apis_page_url = admin_url( sprintf( 'edit.php?page=tribe-common&tab=addons&post_type=%1$s', Tribe__Events__Main::POSTTYPE ) ); ?>
<tr>
<td class="tribe-table-field-label"></td>
<td>
<p class="description">
<?php
printf(
'<a href="%1$s" target="_blank">%2$s</a> %3$s',
esc_url( $apis_page_url ),
esc_html__( 'Enter a custom Google Maps API key', 'tribe-events-calendar-pro' ),
esc_html__( 'for latitude and longitude to be auto-generated; otherwise, you\'ll only be able to enter the values manually.', 'tribe-events-calendar-pro' )
);
?>
</td>
</tr>
<?php endif; ?>
<?php
}