Changeset 48894
- Timestamp:
- 08/27/2020 09:30:33 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/load.php
r48856 r48894 139 139 * 140 140 * @since 5.5.0 141 * @since 5.5.1 The 'local' type was added. 141 * @since 5.5.1 Added the 'local' type. 142 * @since 5.5.1 Removed the ability to alter the list of types. 142 143 * 143 144 * @return string The current environment type. … … 157 158 ); 158 159 159 // Check if the environment variable has been set, if `getenv` is available on the system. 160 if ( function_exists( 'getenv' ) ) { 161 $has_env = getenv( 'WP_ENVIRONMENT_TYPES' ); 162 if ( false !== $has_env ) { 163 $wp_environments = explode( ',', $has_env ); 164 } 165 } 166 167 // Fetch the environment types from a constant, this overrides the global system variable. 168 if ( defined( 'WP_ENVIRONMENT_TYPES' ) ) { 169 $wp_environments = WP_ENVIRONMENT_TYPES; 160 // Add a note about the deprecated WP_ENVIRONMENT_TYPES constant. 161 if ( defined( 'WP_ENVIRONMENT_TYPES' ) && function_exists( '_deprecated_argument' ) ) { 162 _deprecated_argument( 163 'define()', 164 '5.5.1', 165 /* translators: %s: WP_ENVIRONMENT_TYPES */ 166 sprintf( __( 'The %s constant is no longer supported.' ), 'WP_ENVIRONMENT_TYPES' ) 167 ); 170 168 } 171 169
Note: See TracChangeset
for help on using the changeset viewer.