Make WordPress Core

Changeset 45078


Ignore:
Timestamp:
04/01/2019 12:09:09 AM (7 years ago)
Author:
SergeyBiryukov
Message:

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

Props xkon.
Fixes #46738.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/class-wp-debug-data.php

    r45044 r45078  
    157157                        'wp-constants'        => array(
    158158                                'label'       => __( 'WordPress Constants' ),
    159                                 'description' => __( 'These settings are defined in your wp-config.php file, and alter where and how parts of WordPress are loaded.' ),
     159                                'description' => __( 'These settings alter where and how parts of WordPress are loaded.' ),
    160160                                'fields'      => array(
    161161                                        'ABSPATH'             => array(
    162162                                                'label'   => 'ABSPATH',
    163                                                 'value'   => ( ! defined( 'ABSPATH' ) ? __( 'Undefined' ) : ABSPATH ),
     163                                                'value'   => ABSPATH,
    164164                                                'private' => true,
    165165                                        ),
     
    174174                                        'WP_CONTENT_DIR'      => array(
    175175                                                'label' => 'WP_CONTENT_DIR',
    176                                                 'value' => ( ! defined( 'WP_CONTENT_DIR' ) ? __( 'Undefined' ) : WP_CONTENT_DIR ),
     176                                                'value' => WP_CONTENT_DIR,
    177177                                        ),
    178178                                        'WP_PLUGIN_DIR'       => array(
    179179                                                'label' => 'WP_PLUGIN_DIR',
    180                                                 'value' => ( ! defined( 'WP_PLUGIN_DIR' ) ? __( 'Undefined' ) : WP_PLUGIN_DIR ),
     180                                                'value' => WP_PLUGIN_DIR,
    181181                                        ),
    182182                                        'WP_DEBUG'            => array(
    183183                                                'label' => 'WP_DEBUG',
    184                                                 'value' => ( ! defined( 'WP_DEBUG' ) ? __( 'Undefined' ) : ( WP_DEBUG ? __( 'Enabled' ) : __( 'Disabled' ) ) ),
     184                                                'value' => WP_DEBUG ? __( 'Enabled' ) : __( 'Disabled' ),
    185185                                        ),
    186186                                        'WP_MAX_MEMORY_LIMIT' => array(
    187187                                                'label' => 'WP_MAX_MEMORY_LIMIT',
    188                                                 'value' => ( ! defined( 'WP_MAX_MEMORY_LIMIT' ) ? __( 'Undefined' ) : WP_MAX_MEMORY_LIMIT ),
     188                                                'value' => WP_MAX_MEMORY_LIMIT,
    189189                                        ),
    190190                                        'WP_DEBUG_DISPLAY'    => array(
    191191                                                'label' => 'WP_DEBUG_DISPLAY',
    192                                                 'value' => ( ! defined( 'WP_DEBUG_DISPLAY' ) ? __( 'Undefined' ) : ( WP_DEBUG_DISPLAY ? __( 'Enabled' ) : __( 'Disabled' ) ) ),
     192                                                'value' => WP_DEBUG_DISPLAY ? __( 'Enabled' ) : __( 'Disabled' ),
    193193                                        ),
    194194                                        'WP_DEBUG_LOG'        => array(
     
    198198                                        'SCRIPT_DEBUG'        => array(
    199199                                                'label' => 'SCRIPT_DEBUG',
    200                                                 'value' => ( ! defined( 'SCRIPT_DEBUG' ) ? __( 'Undefined' ) : ( SCRIPT_DEBUG ? __( 'Enabled' ) : __( 'Disabled' ) ) ),
     200                                                'value' => SCRIPT_DEBUG ? __( 'Enabled' ) : __( 'Disabled' ),
    201201                                        ),
    202202                                        'WP_CACHE'            => array(
    203203                                                'label' => 'WP_CACHE',
    204                                                 'value' => ( ! defined( 'WP_CACHE' ) ? __( 'Undefined' ) : ( WP_CACHE ? __( 'Enabled' ) : __( 'Disabled' ) ) ),
     204                                                'value' => WP_CACHE ? __( 'Enabled' ) : __( 'Disabled' ),
    205205                                        ),
    206206                                        'CONCATENATE_SCRIPTS' => array(
Note: See TracChangeset for help on using the changeset viewer.