Skip to content

Commit d19ad47

Browse files
committed
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. git-svn-id: https://develop.svn.wordpress.org/trunk@54325 602fd350-edb4-49c9-b593-d223f7449a82
1 parent 8fc905d commit d19ad47

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/wp-admin/includes/class-wp-site-health-auto-updates.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,10 @@ public function test_constants( $constant, $value ) {
7474
if ( defined( $constant ) && ! in_array( constant( $constant ), $acceptable_values, true ) ) {
7575
return array(
7676
'description' => sprintf(
77-
/* translators: %s: Name of the constant used. */
78-
__( 'The %s constant is defined and enabled.' ),
79-
"<code>$constant</code>"
77+
/* translators: 1: Name of the constant used. 2: Value of the constant used. */
78+
__( 'The %1$s constant is defined as %2$s' ),
79+
"<code>$constant</code>",
80+
'<code>' . esc_html( var_export( constant( $constant ), true ) ) . '</code>'
8081
),
8182
'severity' => 'fail',
8283
);

0 commit comments

Comments
 (0)