diff --git a/src/wp-admin/includes/class-wp-debug-data.php b/src/wp-admin/includes/class-wp-debug-data.php
index d83c873768..45bf609614 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". |
| | 25 | * If the constant is not defined, it will return "Undefined" |
| | 26 | */ |
| | 27 | private static function get_define_info( $constant_name ) { |
| | 28 | // Check WP_ENVIRONMENT_TYPE. |
| | 29 | if ( defined( $constant_name ) ) { |
| | 30 | $value = constant( $constant_name ); |
| | 31 | if( !$value ) { |
| | 32 | $value = __( 'Defined as empty or as false' ); |
| | 33 | } |
| | 34 | } else { |
| | 35 | $value = __( 'Undefined' ); |
| | 36 | } |
| | 37 | return $value; |
| | 38 | } |
| | 39 | |
| 23 | 40 | /** |
| 24 | 41 | * Static function for generating site debug data when required. |
| 25 | 42 | * |
| … |
… |
class WP_Debug_Data { |
| 236 | 253 | $compress_css_debug = 'undefined'; |
| 237 | 254 | } |
| 238 | 255 | |
| 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 | 256 | $info['wp-constants'] = array( |
| 247 | 257 | 'label' => __( 'WordPress Constants' ), |
| 248 | 258 | 'description' => __( 'These settings alter where and how parts of WordPress are loaded.' ), |
| … |
… |
class WP_Debug_Data { |
| 254 | 264 | ), |
| 255 | 265 | 'WP_HOME' => array( |
| 256 | 266 | 'label' => 'WP_HOME', |
| 257 | | 'value' => ( defined( 'WP_HOME' ) ? WP_HOME : __( 'Undefined' ) ), |
| 258 | | 'debug' => ( defined( 'WP_HOME' ) ? WP_HOME : 'undefined' ), |
| | 267 | 'value' => self::get_define_info( 'WP_HOME' ), |
| | 268 | 'debug' => self::get_define_info( 'WP_HOME' ), |
| 259 | 269 | ), |
| 260 | 270 | 'WP_SITEURL' => array( |
| 261 | 271 | 'label' => 'WP_SITEURL', |
| 262 | | 'value' => ( defined( 'WP_SITEURL' ) ? WP_SITEURL : __( 'Undefined' ) ), |
| 263 | | 'debug' => ( defined( 'WP_SITEURL' ) ? WP_SITEURL : 'undefined' ), |
| | 272 | 'value' => self::get_define_info( 'WP_SITEURL' ), |
| | 273 | 'debug' => self::get_define_info( 'WP_SITEURL' ), |
| 264 | 274 | ), |
| 265 | 275 | 'WP_CONTENT_DIR' => array( |
| 266 | 276 | 'label' => 'WP_CONTENT_DIR', |
| … |
… |
class WP_Debug_Data { |
| 330 | 340 | ), |
| 331 | 341 | 'DB_CHARSET' => array( |
| 332 | 342 | 'label' => 'DB_CHARSET', |
| 333 | | 'value' => ( defined( 'DB_CHARSET' ) ? DB_CHARSET : __( 'Undefined' ) ), |
| 334 | | 'debug' => ( defined( 'DB_CHARSET' ) ? DB_CHARSET : 'undefined' ), |
| | 343 | 'value' => self::get_define_info( 'DB_CHARSET' ), |
| | 344 | 'debug' => self::get_define_info( 'DB_CHARSET' ), |
| 335 | 345 | ), |
| 336 | 346 | 'DB_COLLATE' => array( |
| 337 | 347 | 'label' => 'DB_COLLATE', |
| 338 | | 'value' => ( defined( 'DB_COLLATE' ) ? DB_COLLATE : __( 'Undefined' ) ), |
| 339 | | 'debug' => ( defined( 'DB_COLLATE' ) ? DB_COLLATE : 'undefined' ), |
| | 348 | 'value' => self::get_define_info( 'DB_COLLATE' ), |
| | 349 | 'debug' => self::get_define_info( 'DB_COLLATE' ), |
| 340 | 350 | ), |
| 341 | 351 | ), |
| 342 | 352 | ); |