Last active
April 20, 2017 22:16
-
-
Save cliffordp/f6b4669f2d1059f288d0583cc50a2944 to your computer and use it in GitHub Desktop.
Add single event iCal/.ics link to bottom of tickets email
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 | |
/** | |
* Add single event iCal/.ics link to bottom of tickets email | |
* | |
* From https://gist.github.com/cliffordp/f6b4669f2d1059f288d0583cc50a2944 | |
* Alternative if you want both Google Calendar link and iCal/.ics file link: https://gist.github.com/cliffordp/f9dfbb225d79fddd7154fa33ba25166a | |
**/ | |
add_action( 'tribe_tickets_ticket_email_ticket_bottom', 'cliff_ical_link_on_ticket_emails', 50 ); | |
function cliff_ical_link_on_ticket_emails() { | |
if( ! function_exists( 'tribe_get_single_ical_link' ) ) { | |
return; | |
} | |
echo '<a class="tribe-events-ical tribe-events-button" href="' . esc_url( tribe_get_single_ical_link() ) . '" title="' . esc_attr__( 'Download .ics file', 'the-events-calendar' ) . '" >+ ' . esc_html__( 'iCal Export', 'the-events-calendar' ) . '</a>'; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment