WordPress.org

Make WordPress Core

Changeset 13176


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

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

Location:
trunk/wp-includes
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/default-constants.php

    r13062 r13176  
    88/**
    99 * Defines initial WordPress constants
    10  *
     10 *
     11 * @see wp_debug_mode()
     12 *
    1113 * @since 3.0.0
    1214 */
     
    4446        define( 'WP_DEBUG', false );
    4547
    46     // 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
     48    // 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.
    4749    if ( !defined('WP_DEBUG_DISPLAY') )
    4850        define( 'WP_DEBUG_DISPLAY', true );
    4951
    50     // Add define('WP_DEBUG_LOG', true); to enable php debug logging to WP_CONTENT_DIR/debug.log
     52    // Add define('WP_DEBUG_LOG', true); to enable error logging to wp-content/debug.log.
    5153    if ( !defined('WP_DEBUG_LOG') )
    5254        define('WP_DEBUG_LOG', false);
  • 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.