Forked from theeventscalendar/Event Website link
Last active
December 11, 2015 22:38
-
-
Save barryhughes/5855543159384d568295 to your computer and use it in GitHub Desktop.
Make an Event Website a link instead of showing the text url
This file contains hidden or 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_filter( 'tribe_get_event_website_link_label', 'tribe_get_event_website_link_label_default' ); | |
function tribe_get_event_website_link_label_default( $label ) { | |
if ( $label === tribe_get_event_website_url() ) { | |
$label = "Visit Website »"; | |
} | |
return '<a href="' . tribe_get_event_website_url() . '" target="_blank">' . $label . '</a>'; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment