diff --git a/wp-includes/load.php b/wp-includes/load.php index 3fc74006a0..8cc14e06db 100644 --- a/wp-includes/load.php +++ b/wp-includes/load.php @@ -138,7 +138,8 @@ function wp_check_php_mysql_versions() { * If not set, the type defaults to 'production'. * * @since 5.5.0 - * @since 5.5.1 The 'local' type was added. + * @since 5.5.1 Added the 'local' type. + * @since 5.5.1 Removed the ability to alter the list of types. * * @return string The current environment type. */ @@ -156,17 +157,20 @@ function wp_get_environment_type() { 'production', ); - // Check if the environment variable has been set, if `getenv` is available on the system. - if ( function_exists( 'getenv' ) ) { - $has_env = getenv( 'WP_ENVIRONMENT_TYPES' ); - if ( false !== $has_env ) { - $wp_environments = explode( ',', $has_env ); + // Add a note about the deprecated WP_ENVIRONMENT_TYPES constant. + if ( defined( 'WP_ENVIRONMENT_TYPES' ) && function_exists( '_deprecated_argument' ) ) { + if ( function_exists( '__' ) ) { + /* translators: %s: WP_ENVIRONMENT_TYPES */ + $message = sprintf( __( 'The %s constant is no longer supported.' ), 'WP_ENVIRONMENT_TYPES' ); + } else { + $message = sprintf( 'The %s constant is no longer supported.', 'WP_ENVIRONMENT_TYPES' ); } - } - // Fetch the environment types from a constant, this overrides the global system variable. - if ( defined( 'WP_ENVIRONMENT_TYPES' ) ) { - $wp_environments = WP_ENVIRONMENT_TYPES; + _deprecated_argument( + 'define()', + '5.5.1', + $message + ); } // Check if the environment variable has been set, if `getenv` is available on the system. diff --git a/wp-includes/version.php b/wp-includes/version.php index 6bac2d9b0d..8ae614d98d 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.5.1-alpha-48893'; +$wp_version = '5.5.1-alpha-48896'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.