From d19ad477d21a9117a4bd5f09d1d4e3ada05ed463 Mon Sep 17 00:00:00 2001 From: Jb Audras Date: Tue, 27 Sep 2022 10:15:40 +0000 Subject: [PATCH] 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 --- .../includes/class-wp-site-health-auto-updates.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/wp-admin/includes/class-wp-site-health-auto-updates.php b/src/wp-admin/includes/class-wp-site-health-auto-updates.php index fdf02496b7..f6fb7d79b9 100644 --- a/src/wp-admin/includes/class-wp-site-health-auto-updates.php +++ b/src/wp-admin/includes/class-wp-site-health-auto-updates.php @@ -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.' ), - "$constant" + /* translators: 1: Name of the constant used. 2: Value of the constant used. */ + __( 'The %1$s constant is defined as %2$s' ), + "$constant", + '' . esc_html( var_export( constant( $constant ), true ) ) . '' ), 'severity' => 'fail', );