Created
February 8, 2018 00:56
-
-
Save GeoffEW/4ccef04ab841c0be2e1083b0733057cd to your computer and use it in GitHub Desktop.
* Convert organizer emails into live "mailto:" links that users can click on.
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 | |
/** | |
* 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