tribe_get_map_link_html( int $postId = null )
Returns a formed HTML link to Google Maps for the given event.
Contents
Parameters
- $postId
-
(int) (Optional) The event post ID.
Default value: null
Return
(string) A fully qualified link to <a href="https://maps.google.com/">https://maps.google.com/</a> for this event.
Source
File: src/functions/template-tags/google-map.php
function tribe_get_map_link_html( $postId = null ) {
$map_link = esc_url( tribe_get_map_link( $postId ) );
$link = '';
if ( ! empty( $map_link ) ) {
$link = sprintf(
'<a class="tribe-events-gmap" href="%s" title="%s" target="_blank">%s</a>',
$map_link,
esc_html__( 'Click to view a Google Map', 'the-events-calendar' ),
esc_html__( '+ Google Map', 'the-events-calendar' )
);
}
return apply_filters( 'tribe_get_map_link_html', $link );
}
Changelog
| Version | Description |
|---|---|
| 4.6.24 | Introduced. |