Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Tribe_Fix_25231
- {
- protected static $restore = false;
- public static function run() {
- add_action( 'parse_query', array( __CLASS__, 'check' ), 40 );
- add_action( 'parse_query', array( __CLASS__, 'amend' ), 60 );
- }
- public static function check( $query ) {
- if ( ! $query->is_main_query() && is_home() ) self::$restore = true;
- }
- public static function amend( $query ) {
- if ( self::$restore ) $query->is_home = true;
- }
- }
- Tribe_Fix_25231::run();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement