Site Health: Adjust display of the `DB_COLLATE` and `WP_ENVIRONMENT_TYPE` constants.
Includes: * Simplifying the logic and bringing some consistency to how the values are checked and displayed. * Correcting the debug value for `DB_COLLATE`. This should be the actual contents of the constant, and empty if it is indeed empty, as the debug data that's copied and shared should represent the raw value, and does not need to be in a user-readable format. Follow-up to [45782], [52021], [54239], [59147]. Props Clorith, SergeyBiryukov. See #58265. Built from https://develop.svn.wordpress.org/trunk@59155 git-svn-id: http://core.svn.wordpress.org/trunk@58550 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
18f992af83
commit
46b25e1302
|
@ -1332,19 +1332,21 @@ class WP_Debug_Data {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check WP_ENVIRONMENT_TYPE.
|
// Check WP_ENVIRONMENT_TYPE.
|
||||||
if ( defined( 'WP_ENVIRONMENT_TYPE' ) && WP_ENVIRONMENT_TYPE ) {
|
if ( defined( 'WP_ENVIRONMENT_TYPE' ) ) {
|
||||||
$wp_environment_type = WP_ENVIRONMENT_TYPE;
|
$wp_environment_type = WP_ENVIRONMENT_TYPE ? WP_ENVIRONMENT_TYPE : __( 'Empty value' );
|
||||||
|
$wp_environment_type_debug = WP_ENVIRONMENT_TYPE;
|
||||||
} else {
|
} else {
|
||||||
$wp_environment_type = __( 'Undefined' );
|
$wp_environment_type = __( 'Undefined' );
|
||||||
|
$wp_environment_type_debug = 'undefined';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check DB_COLLATE.
|
// Check DB_COLLATE.
|
||||||
if ( defined( 'DB_COLLATE' ) && DB_COLLATE ) {
|
if ( defined( 'DB_COLLATE' ) ) {
|
||||||
$wp_db_collate = DB_COLLATE;
|
$db_collate = DB_COLLATE ? DB_COLLATE : __( 'Empty value' );
|
||||||
} elseif ( defined( 'DB_COLLATE' ) && empty( DB_COLLATE ) ) {
|
$db_collate_debug = DB_COLLATE;
|
||||||
$wp_db_collate = __( 'Defined, but empty' );
|
|
||||||
} else {
|
} else {
|
||||||
$wp_db_collate = __( 'Undefined' );
|
$db_collate = __( 'Undefined' );
|
||||||
|
$db_collate_debug = 'undefined';
|
||||||
}
|
}
|
||||||
|
|
||||||
$fields = array(
|
$fields = array(
|
||||||
|
@ -1422,7 +1424,7 @@ class WP_Debug_Data {
|
||||||
'WP_ENVIRONMENT_TYPE' => array(
|
'WP_ENVIRONMENT_TYPE' => array(
|
||||||
'label' => 'WP_ENVIRONMENT_TYPE',
|
'label' => 'WP_ENVIRONMENT_TYPE',
|
||||||
'value' => $wp_environment_type,
|
'value' => $wp_environment_type,
|
||||||
'debug' => $wp_environment_type,
|
'debug' => $wp_environment_type_debug,
|
||||||
),
|
),
|
||||||
'WP_DEVELOPMENT_MODE' => array(
|
'WP_DEVELOPMENT_MODE' => array(
|
||||||
'label' => 'WP_DEVELOPMENT_MODE',
|
'label' => 'WP_DEVELOPMENT_MODE',
|
||||||
|
@ -1436,8 +1438,8 @@ class WP_Debug_Data {
|
||||||
),
|
),
|
||||||
'DB_COLLATE' => array(
|
'DB_COLLATE' => array(
|
||||||
'label' => 'DB_COLLATE',
|
'label' => 'DB_COLLATE',
|
||||||
'value' => $wp_db_collate,
|
'value' => $db_collate,
|
||||||
'debug' => $wp_db_collate,
|
'debug' => $db_collate_debug,
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '6.7-beta1-59154';
|
$wp_version = '6.7-beta1-59155';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
|
Loading…
Reference in New Issue