Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function fix_25806_listen() {
- $comment_squashing = ! ( tribe_get_option('tribeEventsTemplate', 'default') == '' );
- $non_event_page = ! tribe_is_event_query();
- if ( $non_event_page && $comment_squashing ) {
- add_filter( 'comments_template', 'fix_25806_catch', 5 );
- add_filter( 'comments_template', 'fix_25806_reinstate', 25 );
- }
- }
- function fix_25806_store( $template = null ) {
- static $tpl = '';
- if ( null === $template ) return $tpl;
- $tpl = $template;
- }
- function fix_25806_catch( $template ) {
- fix_25806_store( $template );
- }
- function fix_25806_reinstate() {
- return fix_25806_store();
- }
- add_action( 'pre_get_posts', 'fix_25806_listen' );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement