Skip to content

Instantly share code, notes, and snippets.

@cliffordp
Last active February 11, 2016 03:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cliffordp/0add8931e1c6422a7b4c to your computer and use it in GitHub Desktop.
Save cliffordp/0add8931e1c6422a7b4c to your computer and use it in GitHub Desktop.
Override the "Export Month's Events" sort of button link
<?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