From 0dd560ac3f80347096051a5297ae221e1834c5b3 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Mon, 24 Aug 2020 22:32:20 +0000 Subject: [PATCH] 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. Merges [48856] to the 5.5 branch. Fixes #51064. git-svn-id: https://develop.svn.wordpress.org/branches/5.5@48857 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/load.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/wp-includes/load.php b/src/wp-includes/load.php index 82e92082be..3fc74006a0 100644 --- a/src/wp-includes/load.php +++ b/src/wp-includes/load.php @@ -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',