Site Health: Simplify the checks for constants that are always defined by default.

Props xkon.
Fixes #46738.
Built from https://develop.svn.wordpress.org/trunk@45078


git-svn-id: http://core.svn.wordpress.org/trunk@44887 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2019-04-01 00:10:53 +00:00
parent 63d0abd5ff
commit c241c16846
2 changed files with 10 additions and 10 deletions

View File

@ -156,11 +156,11 @@ class WP_Debug_Data {
), ),
'wp-constants' => array( 'wp-constants' => array(
'label' => __( 'WordPress Constants' ), 'label' => __( 'WordPress Constants' ),
'description' => __( 'These settings are defined in your wp-config.php file, and alter where and how parts of WordPress are loaded.' ), 'description' => __( 'These settings alter where and how parts of WordPress are loaded.' ),
'fields' => array( 'fields' => array(
'ABSPATH' => array( 'ABSPATH' => array(
'label' => 'ABSPATH', 'label' => 'ABSPATH',
'value' => ( ! defined( 'ABSPATH' ) ? __( 'Undefined' ) : ABSPATH ), 'value' => ABSPATH,
'private' => true, 'private' => true,
), ),
'WP_HOME' => array( 'WP_HOME' => array(
@ -173,23 +173,23 @@ class WP_Debug_Data {
), ),
'WP_CONTENT_DIR' => array( 'WP_CONTENT_DIR' => array(
'label' => 'WP_CONTENT_DIR', 'label' => 'WP_CONTENT_DIR',
'value' => ( ! defined( 'WP_CONTENT_DIR' ) ? __( 'Undefined' ) : WP_CONTENT_DIR ), 'value' => WP_CONTENT_DIR,
), ),
'WP_PLUGIN_DIR' => array( 'WP_PLUGIN_DIR' => array(
'label' => 'WP_PLUGIN_DIR', 'label' => 'WP_PLUGIN_DIR',
'value' => ( ! defined( 'WP_PLUGIN_DIR' ) ? __( 'Undefined' ) : WP_PLUGIN_DIR ), 'value' => WP_PLUGIN_DIR,
), ),
'WP_DEBUG' => array( 'WP_DEBUG' => array(
'label' => 'WP_DEBUG', 'label' => 'WP_DEBUG',
'value' => ( ! defined( 'WP_DEBUG' ) ? __( 'Undefined' ) : ( WP_DEBUG ? __( 'Enabled' ) : __( 'Disabled' ) ) ), 'value' => WP_DEBUG ? __( 'Enabled' ) : __( 'Disabled' ),
), ),
'WP_MAX_MEMORY_LIMIT' => array( 'WP_MAX_MEMORY_LIMIT' => array(
'label' => 'WP_MAX_MEMORY_LIMIT', 'label' => 'WP_MAX_MEMORY_LIMIT',
'value' => ( ! defined( 'WP_MAX_MEMORY_LIMIT' ) ? __( 'Undefined' ) : WP_MAX_MEMORY_LIMIT ), 'value' => WP_MAX_MEMORY_LIMIT,
), ),
'WP_DEBUG_DISPLAY' => array( 'WP_DEBUG_DISPLAY' => array(
'label' => 'WP_DEBUG_DISPLAY', 'label' => 'WP_DEBUG_DISPLAY',
'value' => ( ! defined( 'WP_DEBUG_DISPLAY' ) ? __( 'Undefined' ) : ( WP_DEBUG_DISPLAY ? __( 'Enabled' ) : __( 'Disabled' ) ) ), 'value' => WP_DEBUG_DISPLAY ? __( 'Enabled' ) : __( 'Disabled' ),
), ),
'WP_DEBUG_LOG' => array( 'WP_DEBUG_LOG' => array(
'label' => 'WP_DEBUG_LOG', 'label' => 'WP_DEBUG_LOG',
@ -197,11 +197,11 @@ class WP_Debug_Data {
), ),
'SCRIPT_DEBUG' => array( 'SCRIPT_DEBUG' => array(
'label' => 'SCRIPT_DEBUG', 'label' => 'SCRIPT_DEBUG',
'value' => ( ! defined( 'SCRIPT_DEBUG' ) ? __( 'Undefined' ) : ( SCRIPT_DEBUG ? __( 'Enabled' ) : __( 'Disabled' ) ) ), 'value' => SCRIPT_DEBUG ? __( 'Enabled' ) : __( 'Disabled' ),
), ),
'WP_CACHE' => array( 'WP_CACHE' => array(
'label' => 'WP_CACHE', 'label' => 'WP_CACHE',
'value' => ( ! defined( 'WP_CACHE' ) ? __( 'Undefined' ) : ( WP_CACHE ? __( 'Enabled' ) : __( 'Disabled' ) ) ), 'value' => WP_CACHE ? __( 'Enabled' ) : __( 'Disabled' ),
), ),
'CONCATENATE_SCRIPTS' => array( 'CONCATENATE_SCRIPTS' => array(
'label' => 'CONCATENATE_SCRIPTS', 'label' => 'CONCATENATE_SCRIPTS',

View File

@ -13,7 +13,7 @@
* *
* @global string $wp_version * @global string $wp_version
*/ */
$wp_version = '5.2-beta1-45077'; $wp_version = '5.2-beta1-45078';
/** /**
* 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.