Make WordPress Core

Changeset 56231


Ignore:
Timestamp:
07/14/2023 02:08:04 PM (22 months ago)
Author:
SergeyBiryukov
Message:

Docs: Clarify where the wp_get_development_mode() value is retrieved from.

Includes:

  • Adding a mention of the WP_DEVELOPMENT_MODE constant.
  • Minor DocBlock formatting adjustments.

Follow-up to [56042], [56223].

See #57487, #57840.

Location:
trunk/src/wp-includes
Files:
2 edited

Legend:

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

    r56223 r56231  
    7979
    8080    /*
    81      * Add define( 'WP_DEVELOPMENT_MODE', 'core' ) or define( 'WP_DEVELOPMENT_MODE', 'plugin' ) or
    82      * define( 'WP_DEVELOPMENT_MODE', 'theme' ) or define( 'WP_DEVELOPMENT_MODE', 'all' ) to wp-config.php
     81     * Add define( 'WP_DEVELOPMENT_MODE', 'core' ), or define( 'WP_DEVELOPMENT_MODE', 'plugin' ), or
     82     * define( 'WP_DEVELOPMENT_MODE', 'theme' ), or define( 'WP_DEVELOPMENT_MODE', 'all' ) to wp-config.php
    8383     * to signify development mode for WordPress core, a plugin, a theme, or all three types respectively.
    8484     */
  • trunk/src/wp-includes/load.php

    r56223 r56231  
    269269 * Retrieves the current development mode.
    270270 *
    271  * The development mode affects how certain parts of the WordPress application behave, which is relevant when
    272  * developing for WordPress.
    273  *
    274  * Valid development modes are 'core', 'plugin', 'theme', 'all', or an empty string to disable development mode.
    275  * 'all' is a special value to signify that all three development modes 'core', 'plugin', and 'theme' are enabled.
    276  *
    277  * Developer mode is considered separately from `WP_DEBUG` and {@see wp_get_environment_type()}. It does not affect
    278  * debugging output, but rather functional nuances in WordPress.
    279  *
    280  * This function controls the currently set development mode value. To check for whether a specific development mode is
    281  * enabled, use wp_in_development_mode().
     271 * The development mode affects how certain parts of the WordPress application behave,
     272 * which is relevant when developing for WordPress.
     273 *
     274 * Development mode can be set via the `WP_DEVELOPMENT_MODE` constant in `wp-config.php`.
     275 * Possible values are 'core', 'plugin', 'theme', 'all', or an empty string to disable
     276 * development mode. 'all' is a special value to signify that all three development modes
     277 * ('core', 'plugin', and 'theme') are enabled.
     278 *
     279 * Developer mode is considered separately from `WP_DEBUG` and wp_get_environment_type().
     280 * It does not affect debugging output, but rather functional nuances in WordPress.
     281 *
     282 * This function retrieves the currently set development mode value. To check whether
     283 * a specific development mode is enabled, use wp_in_development_mode().
    282284 *
    283285 * @since 6.3.0
     
    294296    $development_mode = WP_DEVELOPMENT_MODE;
    295297
    296     // Exclusively for core tests, rely on a global `$_wp_tests_development_mode`.
     298    // Exclusively for core tests, rely on the `$_wp_tests_development_mode` global.
    297299    if ( defined( 'WP_RUN_CORE_TESTS' ) && isset( $GLOBALS['_wp_tests_development_mode'] ) ) {
    298300        $development_mode = $GLOBALS['_wp_tests_development_mode'];
Note: See TracChangeset for help on using the changeset viewer.