Changeset 48896 for branches/5.5/src/wp-includes/load.php
- Timestamp:
- 08/27/2020 09:44:10 PM (4 years ago)
- Location:
- branches/5.5
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/5.5
- Property svn:mergeinfo changed
/trunk merged: 48894-48895
- Property svn:mergeinfo changed
-
branches/5.5/src/wp-includes/load.php
r48857 r48896 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 if ( function_exists( '__' ) ) { 163 /* translators: %s: WP_ENVIRONMENT_TYPES */ 164 $message = sprintf( __( 'The %s constant is no longer supported.' ), 'WP_ENVIRONMENT_TYPES' ); 165 } else { 166 $message = sprintf( 'The %s constant is no longer supported.', 'WP_ENVIRONMENT_TYPES' ); 167 } 168 169 _deprecated_argument( 170 'define()', 171 '5.5.1', 172 $message 173 ); 170 174 } 171 175
Note: See TracChangeset
for help on using the changeset viewer.