Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
* Convert organizer emails into live "mailto:" links that users can click on.
<?php
/**
* Convert organizer emails into live "mailto:" links that users can click on.
*
* @param $email
* @return string
*/
function organizer_live_email_link( $email ) {
if ( ! is_email( $email ) || ! is_singular( Tribe__Events__Main::POSTTYPE ) ) return $email;
return '<a href="mailto:' . esc_attr( $email ) . '">' . esc_html( $email ) . '</a>';
}
add_filter( 'tribe_get_organizer_email', 'organizer_live_email_link' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment