-
-
Save theeventscalendar/5e0c589f8f9f16dddbe6 to your computer and use it in GitHub Desktop.
Make venue and organizer phone numbers into callable links
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
// Link the Venue Phone Number | |
add_filter( 'tribe_get_phone', 'filter_link_the_phone' ); | |
function filter_link_the_phone( $phone ) { | |
return '<a href="tel:' . $phone . '">' . $phone . '</a>'; | |
} | |
// Link the Organizer Phone Number | |
add_filter( 'tribe_get_organizer_phone', 'filter_link_the_organizer_phone' ); | |
function filter_link_the_organizer_phone( $phone ) { | |
return '<a href="tel:' . $phone . '">' . $phone . '</a>'; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This ends up escaping the HTML for the link tags since the functions
tribe_get_phone
andtribe_get_organizer_phone
escape the output.