SHARE
TWEET

--recycle-saved

selnomeria Jan 21st, 2020 66 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.     public function WP_debug_tests(){
  2.         if (isset($_GET['WP_DEBUG']))   {
  3.             $val = sanitize_key($_GET['WP_DEBUG']);
  4.             setcookie('site_debug_enabled', $val, time() + ($val==0 ? -1000000 : 1000000000), "/");
  5.             header("location: ". str_replace('?debug='.$val,'' ,$_SERVER['REQUEST_URI'])) ; exit;
  6.         }
  7.         if (isset($_COOKIE['site_debug_enabled']))  {
  8.             define("WP_DEBUG",true);  
  9.             define("WP_DEBUG_LOG",true);  
  10.             define("WP_DEBUG_DISPLAY",true);  
  11.         }
  12.         else {
  13.             define('WP_DEBUG', false);
  14.             define('WP_DEBUG_LOG', false);
  15.             define('WP_DEBUG_DISPLAY', false);
  16.         }
  17.     }
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