Skip to content

Instantly share code, notes, and snippets.

@jesseeproductions
Created June 22, 2015 15:09
Show Gist options
  • Save jesseeproductions/9d1c1cb91fc636c8b7a3 to your computer and use it in GitHub Desktop.
Save jesseeproductions/9d1c1cb91fc636c8b7a3 to your computer and use it in GitHub Desktop.
The Events Calendar Open gCal Links in New Windows
/*
* 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