Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public function WP_debug_tests(){
- if (isset($_GET['WP_DEBUG'])) {
- $val = sanitize_key($_GET['WP_DEBUG']);
- setcookie('site_debug_enabled', $val, time() + ($val==0 ? -1000000 : 1000000000), "/");
- header("location: ". str_replace('?debug='.$val,'' ,$_SERVER['REQUEST_URI'])) ; exit;
- }
- if (isset($_COOKIE['site_debug_enabled'])) {
- define("WP_DEBUG",true);
- define("WP_DEBUG_LOG",true);
- define("WP_DEBUG_DISPLAY",true);
- }
- else {
- define('WP_DEBUG', false);
- define('WP_DEBUG_LOG', false);
- define('WP_DEBUG_DISPLAY', false);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement