tribe_get_gcal_link( int $post_id = null )
Google Calendar Link
Contents
Returns an "Add to Google Calendar" link for a single event.
Parameters
- $post_id
-
(int) (Optional) (optional) Function must be used in the loop if empty.
Default value: null
Return
(string) URL for Google Calendar.
Source
File: src/functions/template-tags/ical.php
function tribe_get_gcal_link( $postId = null ) {
$postId = Tribe__Events__Main::postIdHelper( $postId );
$output = Tribe__Events__Main::instance()->googleCalendarLink( $postId );
/**
* Filters the Google Calendar gcal link
*
* @param string $output Gcal link
* @param int $postId WP Post ID of an event
*/
return apply_filters( 'tribe_get_gcal_link', $output, $postId );
}