diff --git a/src/wp-admin/includes/class-wp-debug-data.php b/src/wp-admin/includes/class-wp-debug-data.php
index d83c873768..063859857a 100644
|
a
|
b
|
class WP_Debug_Data { |
| 20 | 20 | wp_update_themes(); |
| 21 | 21 | } |
| 22 | 22 | |
| | 23 | /* |
| | 24 | * Returns the value of a defined constant. If the constant is defined as empty, it will return "Defined as empty (string)". |
| | 25 | * If the constant is a boolean (false) it will return "Defined as false (boolan)" |
| | 26 | * If the constant is not defined, it will return "Undefined" |
| | 27 | */ |
| | 28 | private static function get_define_info( $constant_name ) { |
| | 29 | // Check WP_ENVIRONMENT_TYPE. |
| | 30 | if ( defined( $constant_name ) ) { |
| | 31 | $value = constant( $constant_name ); |
| | 32 | if ( !$value ) { |
| | 33 | // Strict check for boolean equals (bool)false first |
| | 34 | if ( $value === false ) { |
| | 35 | $value = __( 'Defined as false (boolan)' ); |
| | 36 | } else { |
| | 37 | $value = __( 'Defined as empty (string)' ); |
| | 38 | } |
| | 39 | } |
| | 40 | } else { |
| | 41 | $value = __( 'Undefined' ); |
| | 42 | } |
| | 43 | return $value; |
| | 44 | } |
| | 45 | |
| 23 | 46 | /** |
| 24 | 47 | * Static function for generating site debug data when required. |
| 25 | 48 | * |
| … |
… |
class WP_Debug_Data { |
| 236 | 259 | $compress_css_debug = 'undefined'; |
| 237 | 260 | } |
| 238 | 261 | |
| 239 | | // Check WP_ENVIRONMENT_TYPE. |
| 240 | | if ( defined( 'WP_ENVIRONMENT_TYPE' ) && WP_ENVIRONMENT_TYPE ) { |
| 241 | | $wp_environment_type = WP_ENVIRONMENT_TYPE; |
| 242 | | } else { |
| 243 | | $wp_environment_type = __( 'Undefined' ); |
| 244 | | } |
| 245 | | |
| 246 | 262 | $info['wp-constants'] = array( |
| 247 | 263 | 'label' => __( 'WordPress Constants' ), |
| 248 | 264 | 'description' => __( 'These settings alter where and how parts of WordPress are loaded.' ), |
| … |
… |
class WP_Debug_Data { |
| 254 | 270 | ), |
| 255 | 271 | 'WP_HOME' => array( |
| 256 | 272 | 'label' => 'WP_HOME', |
| 257 | | 'value' => ( defined( 'WP_HOME' ) ? WP_HOME : __( 'Undefined' ) ), |
| 258 | | 'debug' => ( defined( 'WP_HOME' ) ? WP_HOME : 'undefined' ), |
| | 273 | 'value' => self::get_define_info( 'WP_HOME' ), |
| | 274 | 'debug' => self::get_define_info( 'WP_HOME' ), |
| 259 | 275 | ), |
| 260 | 276 | 'WP_SITEURL' => array( |
| 261 | 277 | 'label' => 'WP_SITEURL', |
| 262 | | 'value' => ( defined( 'WP_SITEURL' ) ? WP_SITEURL : __( 'Undefined' ) ), |
| 263 | | 'debug' => ( defined( 'WP_SITEURL' ) ? WP_SITEURL : 'undefined' ), |
| | 278 | 'value' => self::get_define_info( 'WP_SITEURL' ), |
| | 279 | 'debug' => self::get_define_info( 'WP_SITEURL' ), |
| 264 | 280 | ), |
| 265 | 281 | 'WP_CONTENT_DIR' => array( |
| 266 | 282 | 'label' => 'WP_CONTENT_DIR', |
| … |
… |
class WP_Debug_Data { |
| 330 | 346 | ), |
| 331 | 347 | 'DB_CHARSET' => array( |
| 332 | 348 | 'label' => 'DB_CHARSET', |
| 333 | | 'value' => ( defined( 'DB_CHARSET' ) ? DB_CHARSET : __( 'Undefined' ) ), |
| 334 | | 'debug' => ( defined( 'DB_CHARSET' ) ? DB_CHARSET : 'undefined' ), |
| | 349 | 'value' => self::get_define_info( 'DB_CHARSET' ), |
| | 350 | 'debug' => self::get_define_info( 'DB_CHARSET' ), |
| 335 | 351 | ), |
| 336 | 352 | 'DB_COLLATE' => array( |
| 337 | 353 | 'label' => 'DB_COLLATE', |
| 338 | | 'value' => ( defined( 'DB_COLLATE' ) ? DB_COLLATE : __( 'Undefined' ) ), |
| 339 | | 'debug' => ( defined( 'DB_COLLATE' ) ? DB_COLLATE : 'undefined' ), |
| | 354 | 'value' => self::get_define_info( 'DB_COLLATE' ), |
| | 355 | 'debug' => self::get_define_info( 'DB_COLLATE' ), |
| 340 | 356 | ), |
| 341 | 357 | ), |
| 342 | 358 | ); |