Last active
April 6, 2023 13:11
-
-
Save cliffordp/3584b8aee70cde484700 to your computer and use it in GitHub Desktop.
Open Event Website, Organizer, and Venue links in new window
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 | |
/** | |
* The Events Calendar: Open event website, organizer, and venue links in new window. | |
* | |
* Filters are found in these files: | |
* /wp-content/plugins/the-events-calendar/src/functions/template-tags/link.php | |
* /wp-content/plugins/events-calendar-pro/src/functions/template-tags/general.php | |
* /wp-content/plugins/the-events-calendar/src/functions/template-tags/organizer.php | |
* /wp-content/plugins/the-events-calendar/src/functions/template-tags/venue.php | |
* | |
* @link https://gist.github.com/cliffordp/3584b8aee70cde484700 | |
* | |
* @return string | |
*/ | |
add_filter( 'tribe_get_event_website_link_target', 'cliff_blank_target_for_new_window' ); | |
add_filter( 'tribe_get_organizer_website_link_target', 'cliff_blank_target_for_new_window' ); | |
add_filter( 'tribe_get_venue_website_link_target', 'cliff_blank_target_for_new_window' ); | |
function cliff_blank_target_for_new_window() { | |
return '_blank'; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks, still works!