diff --git a/wp-includes/default-constants.php b/wp-includes/default-constants.php
index d6dc5a1e1f..2a07c1d4f0 100644
--- a/wp-includes/default-constants.php
+++ b/wp-includes/default-constants.php
@@ -7,7 +7,9 @@
/**
* Defines initial WordPress constants
- *
+ *
+ * @see wp_debug_mode()
+ *
* @since 3.0.0
*/
function wp_initial_constants( ) {
@@ -43,11 +45,11 @@ function wp_initial_constants( ) {
if ( !defined('WP_DEBUG') )
define( 'WP_DEBUG', false );
- // Add define('WP_DEBUG_DISPLAY', false); to wp-config.php to use the globally configured setting for display_errors and not force it to On
+ // Add define('WP_DEBUG_DISPLAY', false); to wp-config.php use the globally configured setting for display_errors and not force errors to be displayed.
if ( !defined('WP_DEBUG_DISPLAY') )
define( 'WP_DEBUG_DISPLAY', true );
- // Add define('WP_DEBUG_LOG', true); to enable php debug logging to WP_CONTENT_DIR/debug.log
+ // Add define('WP_DEBUG_LOG', true); to enable error logging to wp-content/debug.log.
if ( !defined('WP_DEBUG_LOG') )
define('WP_DEBUG_LOG', false);
diff --git a/wp-includes/load.php b/wp-includes/load.php
index 0640fde78c..0993a1468a 100644
--- a/wp-includes/load.php
+++ b/wp-includes/load.php
@@ -208,16 +208,28 @@ function timer_stop( $display = 0, $precision = 3 ) { // if called like timer_st
}
/**
- * Sets PHP error handling.
+ * Sets PHP error handling and handles WordPress debug mode.
*
- * Add define('WP_DEBUG', true);
to wp-config.php to enable
- * the reporting of notices during development.
+ * Uses three constants: WP_DEBUG, WP_DEBUG_DISPLAY, and WP_DEBUG_LOG. All three can be
+ * defined in wp-config.php. Example: define( 'WP_DEBUG', true );
*
- * Add define('WP_DEBUG_DISPLAY', false);
to wp-config.php to
- * disable the display of errors.
+ * WP_DEBUG_DISPLAY and WP_DEBUG_LOG perform no function unless WP_DEBUG is true.
+ * WP_DEBUG defaults defaults to false.
*
- * Add define('WP_DEBUG_LOG', true);
to wp-config.php to log
- * eerrors to debug.log in the wp-content directory.
+ * When WP_DEBUG is true, all PHP notices are reported. WordPress will also display
+ * notices, including one when a deprecated WordPress function, function argument,
+ * or file is used. Deprecated code may be removed from a later version.
+ *
+ * It is strongly recommended that plugin and theme authors use WP_DEBUG for their
+ * development environments.
+ *
+ * When WP_DEBUG_DISPLAY is true, WordPress will force errors to be displayed.
+ * WP_DEBUG_DISPLAY defaults to true. Defining it as false prevents WordPress from
+ * changing the global configuration setting. (Defining WP_DEBUG_DISPLAY as false
+ * will never force errors to be hidden.)
+ *
+ * When WP_DEBUG_LOG is true, errors will be logged to wp-content/debug.log.
+ * WP_DEBUG_LOG defaults to false.
*
* @access private
* @since 3.0.0