Make WordPress Core


Ignore:
Timestamp:
09/27/2022 10:15:40 AM (2 years ago)
Author:
audrasjb
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/class-wp-site-health-auto-updates.php

    r54324 r54325  
    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',
Note: See TracChangeset for help on using the changeset viewer.