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.
Built from https://develop.svn.wordpress.org/trunk@56231


git-svn-id: http://core.svn.wordpress.org/trunk@55743 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2023-07-14 14:10:26 +00:00
parent fc6f16bd57
commit f82f8a7a98
3 changed files with 14 additions and 12 deletions

View File

@ -78,8 +78,8 @@ function wp_initial_constants() {
}
/*
* Add define( 'WP_DEVELOPMENT_MODE', 'core' ) or define( 'WP_DEVELOPMENT_MODE', 'plugin' ) or
* define( 'WP_DEVELOPMENT_MODE', 'theme' ) or define( 'WP_DEVELOPMENT_MODE', 'all' ) to wp-config.php
* Add define( 'WP_DEVELOPMENT_MODE', 'core' ), or define( 'WP_DEVELOPMENT_MODE', 'plugin' ), or
* define( 'WP_DEVELOPMENT_MODE', 'theme' ), or define( 'WP_DEVELOPMENT_MODE', 'all' ) to wp-config.php
* to signify development mode for WordPress core, a plugin, a theme, or all three types respectively.
*/
if ( ! defined( 'WP_DEVELOPMENT_MODE' ) ) {

View File

@ -268,17 +268,19 @@ function wp_get_environment_type() {
/**
* Retrieves the current development mode.
*
* The development mode affects how certain parts of the WordPress application behave, which is relevant when
* developing for WordPress.
* The development mode affects how certain parts of the WordPress application behave,
* which is relevant when developing for WordPress.
*
* Valid development modes are 'core', 'plugin', 'theme', 'all', or an empty string to disable development mode.
* 'all' is a special value to signify that all three development modes 'core', 'plugin', and 'theme' are enabled.
* Development mode can be set via the `WP_DEVELOPMENT_MODE` constant in `wp-config.php`.
* Possible values are 'core', 'plugin', 'theme', 'all', or an empty string to disable
* development mode. 'all' is a special value to signify that all three development modes
* ('core', 'plugin', and 'theme') are enabled.
*
* Developer mode is considered separately from `WP_DEBUG` and {@see wp_get_environment_type()}. It does not affect
* debugging output, but rather functional nuances in WordPress.
* Developer mode is considered separately from `WP_DEBUG` and wp_get_environment_type().
* It does not affect debugging output, but rather functional nuances in WordPress.
*
* This function controls the currently set development mode value. To check for whether a specific development mode is
* enabled, use wp_in_development_mode().
* This function retrieves the currently set development mode value. To check whether
* a specific development mode is enabled, use wp_in_development_mode().
*
* @since 6.3.0
*
@ -293,7 +295,7 @@ function wp_get_development_mode() {
$development_mode = WP_DEVELOPMENT_MODE;
// Exclusively for core tests, rely on a global `$_wp_tests_development_mode`.
// Exclusively for core tests, rely on the `$_wp_tests_development_mode` global.
if ( defined( 'WP_RUN_CORE_TESTS' ) && isset( $GLOBALS['_wp_tests_development_mode'] ) ) {
$development_mode = $GLOBALS['_wp_tests_development_mode'];
}

View File

@ -16,7 +16,7 @@
*
* @global string $wp_version
*/
$wp_version = '6.3-beta4-56230';
$wp_version = '6.3-beta4-56231';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.