Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * Removes the Google Calendar and iCal single event links
- */
- add_action('tribe_events_single_event_before_the_content', 'tribe_remove_single_event_links');
- function tribe_remove_single_event_links () {
- remove_action( 'tribe_events_single_event_after_the_content', array( 'TribeiCal', 'single_event_links' ) );
- }
- /*
- * Uncomment the following action to add the Google Calendar Link
- */
- //add_action('tribe_events_single_event_after_the_content', 'tribe_add_gcal_link');
- function tribe_add_gcal_link() {
- // don't show on password protected posts
- if (is_single() && !post_password_required()) {
- 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' ) . '">+ ' . __( 'Google Calendar', 'tribe-events-calendar-pro' ) . '</a>';
- echo '</div><!-- .tribe-events-cal-links -->';
- }
- }
- /*
- * Uncomment the following action to add the iCal Link
- */
- //add_action('tribe_events_single_event_after_the_content', 'tribe_add_ical_link');
- function tribe_add_ical_link() {
- // don't show on password protected posts
- if (is_single() && !post_password_required()) {
- echo '<div class="tribe-events-cal-links">';
- echo '<a class="tribe-events-ical tribe-events-button" href="' . tribe_get_single_ical_link() . '">+ ' . __( 'iCal Import', 'tribe-events-calendar' ) . '</a>';
- echo '</div><!-- .tribe-events-cal-links -->';
- }
- }
Add Comment
Please, Sign In to add comment