Last active
February 11, 2016 03:27
-
-
Save cliffordp/0add8931e1c6422a7b4c to your computer and use it in GitHub Desktop.
Override the "Export Month's Events" sort of button link
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 | |
// From https://gist.github.com/cliffordp/0add8931e1c6422a7b4c/ | |
// Might go well with https://gist.github.com/cliffordp/ab1f7c4d95723ee6f892/ | |
// | |
// Override the "Export Month's Events" sort of button link | |
// | |
// Technically works but /wp-content/plugins/the-events-calendar/src/resources/js/tribe-events.min.js?ver=4.0.5 overwrites it! | |
// | |
// See /wp-content/plugins/the-events-calendar/src/functions/template-tags/ical.php for the filter | |
add_filter( 'tribe_get_ical_link', 'cliff_tribe_ical_export_custom_link' ); | |
function cliff_tribe_ical_export_custom_link() { | |
return esc_url( home_url( '/events/?ical=1&year-feed' ) ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment