Skip to content
Snippets Groups Projects
Commit 9c0ff185 authored by ale's avatar ale
Browse files

Make WP_DEBUG globally configurable (better)

parent 0085f236
No related branches found
No related tags found
Loading
Checking pipeline status
...@@ -192,7 +192,10 @@ define('R2DB_FLEXIHASH_REPLICAS', 128); ...@@ -192,7 +192,10 @@ define('R2DB_FLEXIHASH_REPLICAS', 128);
/* /*
* A/I Patch: print debug info on demand when the debug cookie is set. * A/I Patch: print debug info on demand when the debug cookie is set.
*/ */
if (array_key_exists('debug_cookie_name', $noblogs_config) && if (array_key_exists('debug', $noblogs_config) && $noblogs_config['debug']) {
define('WP_DEBUG', true);
define('WP_DEBUG_DISPLAY', false);
} elseif (array_key_exists('debug_cookie_name', $noblogs_config) &&
!empty($_COOKIE[$noblogs_config['debug_cookie_name']])) { !empty($_COOKIE[$noblogs_config['debug_cookie_name']])) {
define('WP_DEBUG', true); define('WP_DEBUG', true);
define('WP_DEBUG_DISPLAY', false); define('WP_DEBUG_DISPLAY', false);
...@@ -207,10 +210,6 @@ if (array_key_exists('debug_cookie_name', $noblogs_config) && ...@@ -207,10 +210,6 @@ if (array_key_exists('debug_cookie_name', $noblogs_config) &&
} }
return false; return false;
}); });
} elseif (array_key_exists('debug', $noblogs_config) && $noblogs_config['debug']) {
define('WP_DEBUG', true);
define('WP_DEBUG_DISPLAY', false);
} else { } else {
define('WP_DEBUG', false); define('WP_DEBUG', false);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment