Bootstrap/Load: Add local environment type to wp_get_environment_type().

This gives developers a better control over their existing development workflow and ensures that `local` is not the exact same as `development` if it does not need to be.

Props claytoncollie, johnbillion, jeremyfelt, kreppar, dushakov, TimothyBlynJacobs, Ipstenu, khag7, knutsp, Clorith, markjaquith, joostdevalk, SergeyBiryukov.
Fixes #51064.

git-svn-id: https://develop.svn.wordpress.org/trunk@48856 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov 2020-08-24 22:30:36 +00:00
parent 8e7e3c5b72
commit 25c9718a1e

View File

@ -134,10 +134,11 @@ function wp_check_php_mysql_versions() {
* The type can be set via the `WP_ENVIRONMENT_TYPE` global system variable,
* or a constant of the same name.
*
* Possible values include 'development', 'staging', 'production'. If not set,
* the type defaults to 'production'.
* Possible values include 'local', 'development', 'staging', 'production'.
* If not set, the type defaults to 'production'.
*
* @since 5.5.0
* @since 5.5.1 The 'local' type was added.
*
* @return string The current environment type.
*/
@ -149,6 +150,7 @@ function wp_get_environment_type() {
}
$wp_environments = array(
'local',
'development',
'staging',
'production',