Created
March 30, 2015 20:55
-
-
Save anonymous/8687fa4dd802bf8a7cfb to your computer and use it in GitHub Desktop.
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
// Whenever The Events Calendar displays a link to month/list view, we need to | |
// update it in respect of our new slug | |
add_filter( 'tribe_events_getLink', 'modify_month_list_link_urls', 10, 2 ); | |
function modify_month_list_link_urls( $url, $type ) { | |
if ( 'month' === $type ) return str_replace( 'month', 'calendar', $url ); | |
if ( 'list' === $type ) return str_replace( 'list', 'all-events', $url ); | |
return $url; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment