Skip to content

Instantly share code, notes, and snippets.

@cliffordp
Last active October 27, 2017 19:36
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cliffordp/7b48b2e6a0562709cf9d069f38cfdcee to your computer and use it in GitHub Desktop.
Save cliffordp/7b48b2e6a0562709cf9d069f38cfdcee to your computer and use it in GitHub Desktop.
The Events Calendar PRO: Make tribe_is_week() return TRUE even for tribe_events shortcode.
<?php
/**
* The Events Calendar PRO: Make tribe_is_week() return TRUE even for
* tribe_events shortcode.
*
* @link https://gist.github.com/cliffordp/7b48b2e6a0562709cf9d069f38cfdcee
* @link https://gist.github.com/GeoffEW/dff981933c950aebc3045b827eddc101 or something like it could be used alongside this snippet.
* @link https://central.tri.be/issues/91891
*/
add_action ('tribe_events_pro_tribe_events_shortcode_prepare_week', function() {
add_filter( 'tribe_is_week', function() {
return true;
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment