Skip to main content
2 of 2
updated wp_debug_mode() link to developer docs
butlerblog
  • 5.1k
  • 3
  • 26
  • 42

WordPress logic forces WP_DEBUG to be defined to something, even if it's omitted it will be set to false in wp_initial_constants() during load.

However "background" (that is not when it is checked explicitly) function of WP_DEBUG is to be a flag for how PHP error reporting should be configured on runtime. That configuration is performed by wp_debug_mode() and at any point after that can be changed by your plugin's code if necessary.

Rarst
  • 99.9k
  • 10
  • 161
  • 298