Site Health: Fix incorrect message about the status of `WP_AUTO_UPDATE_CORE`.

Previously, the Site Health message said "The WP_AUTO_UPDATE_CORE constant is defined and enabled" when in fact the constant was defined and disabled using `define( 'WP_AUTO_UPDATE_CORE', false );`.

This changeset improves the message by providing the value of the constant. For example: "The WP_AUTO_UPDATE_CORE constant is defined as false".

Props johnbillion, chrisbudd1, robinwpdeveloper, audrasjb, Clorith.
Fixes #51041.

Built from https://develop.svn.wordpress.org/trunk@54325


git-svn-id: http://core.svn.wordpress.org/trunk@53884 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
audrasjb 2022-09-27 10:18:12 +00:00
parent 32cefdce56
commit 2c8c3fed63
2 changed files with 5 additions and 4 deletions

View File

@ -74,9 +74,10 @@ class WP_Site_Health_Auto_Updates {
if ( defined( $constant ) && ! in_array( constant( $constant ), $acceptable_values, true ) ) {
return array(
'description' => sprintf(
/* translators: %s: Name of the constant used. */
__( 'The %s constant is defined and enabled.' ),
"<code>$constant</code>"
/* translators: 1: Name of the constant used. 2: Value of the constant used. */
__( 'The %1$s constant is defined as %2$s' ),
"<code>$constant</code>",
'<code>' . esc_html( var_export( constant( $constant ), true ) ) . '</code>'
),
'severity' => 'fail',
);

View File

@ -16,7 +16,7 @@
*
* @global string $wp_version
*/
$wp_version = '6.1-beta1-54324';
$wp_version = '6.1-beta1-54325';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.