Created
April 24, 2017 16:04
-
-
Save elimn/dd7de019f478bd151ca14cafe7d284f1 to your computer and use it in GitHub Desktop.
MT | ET | Add a + Google Calendar link to each ticket in the 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 | |
/** | |
* Adds a + Google Calendar link to each ticket in the tickets email | |
*/ | |
function tribe_add_gcal_to_email( $event ) { | |
printf( | |
'<a class="tribe-events-gcal tribe-events-button" href="%1$s" title="%2$s">%3$s</a>', | |
Tribe__Events__Main::instance()->esc_gcal_url( tribe_get_gcal_link( $event ) ), | |
esc_attr__( 'Add to Google Calendar', 'the-events-calendar' ), | |
esc_html__( 'Add to Google Calendar', 'the-events-calendar' ) | |
); | |
} | |
add_action ( 'tribe_tickets_ticket_email_ticket_bottom', 'tribe_add_gcal_to_email', 101, 1 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment