WordPress.org

Make WordPress Core


Ignore:
Timestamp:
02/17/2010 01:14:45 PM (12 years ago)
Author:
nacin
Message:

Better inline documentation for WP_DEBUG, WP_DEBUG_DISPLAY, and WP_DEBUG_LOG. Fixes #11987

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/load.php

    r13066 r13176  
    209209
    210210/**
    211  * Sets PHP error handling.
    212  *
    213  * Add <code>define('WP_DEBUG', true);</code> to wp-config.php to enable
    214  * the reporting of notices during development.
    215  *
    216  * Add <code>define('WP_DEBUG_DISPLAY', false);</code> to wp-config.php to
    217  * disable the display of errors.
    218  *
    219  * Add <code>define('WP_DEBUG_LOG', true);</code> to wp-config.php to log
    220  * eerrors to debug.log in the wp-content directory.
     211 * Sets PHP error handling and handles WordPress debug mode.
     212 *
     213 * Uses three constants: WP_DEBUG, WP_DEBUG_DISPLAY, and WP_DEBUG_LOG. All three can be
     214 * defined in wp-config.php. Example: <code> define( 'WP_DEBUG', true ); </code>
     215 *
     216 * WP_DEBUG_DISPLAY and WP_DEBUG_LOG perform no function unless WP_DEBUG is true.
     217 * WP_DEBUG defaults defaults to false.
     218 *
     219 * When WP_DEBUG is true, all PHP notices are reported. WordPress will also display
     220 * notices, including one when a deprecated WordPress function, function argument,
     221 * or file is used. Deprecated code may be removed from a later version.
     222 *
     223 * It is strongly recommended that plugin and theme authors use WP_DEBUG for their
     224 * development environments.
     225 *
     226 * When WP_DEBUG_DISPLAY is true, WordPress will force errors to be displayed.
     227 * WP_DEBUG_DISPLAY defaults to true. Defining it as false prevents WordPress from
     228 * changing the global configuration setting. (Defining WP_DEBUG_DISPLAY as false
     229 * will never force errors to be hidden.)
     230 *
     231 * When WP_DEBUG_LOG is true, errors will be logged to wp-content/debug.log.
     232 * WP_DEBUG_LOG defaults to false.
    221233 *
    222234 * @access private
Note: See TracChangeset for help on using the changeset viewer.