SHARE
TWEET

Pos temp fix for Woo/Sealight slider

BakerMan Jan 15th, 2014 98 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. class Tribe_Fix_25231
  2. {
  3.         protected static $restore = false;
  4.  
  5.  
  6.         public static function run() {
  7.                 add_action( 'parse_query', array( __CLASS__, 'check' ), 40 );
  8.                 add_action( 'parse_query', array( __CLASS__, 'amend' ), 60 );
  9.         }
  10.  
  11.         public static function check( $query ) {
  12.                 if ( ! $query->is_main_query() && is_home() ) self::$restore = true;
  13.         }
  14.  
  15.         public static function amend( $query ) {
  16.                 if ( self::$restore ) $query->is_home = true;
  17.         }
  18. }
  19.  
  20. Tribe_Fix_25231::run();
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top