-
-
Save cliffordp/48bc70ec229e09b1dccff1ab006c511a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// From https://theeventscalendar.com/knowledgebase/change-the-text-for-ical-and-google-calendar-export-buttons/ | |
// Changes the text labels for Google Calendar and iCal buttons on a single event page | |
add_action( 'init', 'tribe_really_remove_action_single_event_links' ); | |
function tribe_really_remove_action_single_event_links() { | |
remove_action( 'tribe_events_single_event_after_the_content', array( 'Tribe__Events__iCal', '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 -->'; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment