eo_get_add_to_google_link
since 2.3
eo_get_add_to_google_link( $event_id, $occurrence_id )
Returns a the url which adds a particular occurrence of an event to a google calendar.
Returns an url which adds a particular occurrence of an event to a Google calendar. This function can only be used inside the loop.
An entire series cannot be added to a Google calendar - however users can subscribe to your events. Please note that, unlike
subscribing to events, changes made to an event will not be reflected on an event added to the Google calendar.
Examples
Add a 'add this event to Google' link:
<?php
$url = eo_get_add_to_google_link();
echo '<a href="'.esc_url($url).'"> Add to Google </a>';
?>
Parameters
|
$event_id |
|
int
|
$occurrence_id |
The occurrence ID.
|
Return value
string
|
Url which adds event to a google calendar
|
Hooks
Changelog