Created
June 22, 2015 15:09
-
-
Save jesseeproductions/9d1c1cb91fc636c8b7a3 to your computer and use it in GitHub Desktop.
The Events Calendar Open gCal Links in New Windows
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
/* | |
* The Events Calendar Open gCal Links in New Windows | |
* @version 3.10 | |
*/ | |
add_action( 'tribe_events_single_event_after_the_meta', 'tribe_open_gcal_new_tab' ); | |
function tribe_open_gcal_new_tab() { | |
echo '<script> | |
/* Open gCal Links in New Windows */ | |
jQuery("a.tribe-events-gcal") | |
.addClass("external") | |
.click( function() { | |
window.open(this.href); | |
return false; | |
}); | |
</script>'; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment