Skip to content

Instantly share code, notes, and snippets.

@geoffgraham
Last active September 25, 2020 08:56
Show Gist options
  • Save geoffgraham/cdc5ba8b4b7864aaf5c7 to your computer and use it in GitHub Desktop.
Save geoffgraham/cdc5ba8b4b7864aaf5c7 to your computer and use it in GitHub Desktop.
The Events Calendar - Change Google Calendar and iCal button labels
<?php // Changes the text labels for Google Calendar and iCal buttons on a single event page
remove_action('tribe_events_single_event_after_the_content', array('TribeiCal', 'single_event_links'));
add_action('tribe_events_single_event_after_the_content', 'customized_tribe_single_event_links');
function customized_tribe_single_event_links() {
if (is_single() && post_password_required()) {
return;
}
echo '<div class="tribe-events-cal-links">';
echo '<a class="tribe-events-gcal tribe-events-button" href="' . tribe_get_gcal_link() . '" title="' . __( 'Add to Google Calendar', 'tribe-events-calendar-pro' ) . '">+ Export the Map </a>';
echo '<a class="tribe-events-ical tribe-events-button" href="' . tribe_get_single_ical_link() . '">+ Export to Calendar </a>';
echo '</div><!-- .tribe-events-cal-links -->';
}
@jagsbyteinception
Copy link

jagsbyteinception commented Aug 10, 2020

Thanks for your code.
I had to modify it slightly and this worked for version I got:
remove_action('tribe_events_single_event_after_the_content', array(tribe('tec.iCal'), 'single_event_links'));

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment