Make WordPress Core

Ticket #54340: 54340.diff

File 54340.diff, 1.5 KB (added by sabbirshouvo, 4 years ago)

@Clorith I've added this patch for WP_LOCAL_DEV to WP_ENVIRONMENT_TYPE migration.

  • src/wp-admin/includes/class-wp-debug-data.php

    diff --git a/src/wp-admin/includes/class-wp-debug-data.php b/src/wp-admin/includes/class-wp-debug-data.php
    index 91c6b837c1..6b33921db9 100644
    a b class WP_Debug_Data { 
    234234                        $compress_css_debug = 'undefined';
    235235                }
    236236
    237                 // Check WP_LOCAL_DEV.
    238                 if ( defined( 'WP_LOCAL_DEV' ) ) {
    239                         $wp_local_dev       = WP_LOCAL_DEV ? __( 'Enabled' ) : __( 'Disabled' );
    240                         $wp_local_dev_debug = WP_LOCAL_DEV ? 'true' : 'false';
     237                // Check WP_ENVIRONMENT_TYPE.
     238                if ( defined( 'WP_ENVIRONMENT_TYPE' ) ) {
     239                        $wp_environment_type       = WP_ENVIRONMENT_TYPE ? __( 'Enabled' ) : __( 'Disabled' );
     240                        $wp_environment_type_debug = WP_ENVIRONMENT_TYPE ? 'true' : 'false';
    241241                } else {
    242                         $wp_local_dev       = __( 'Undefined' );
    243                         $wp_local_dev_debug = 'undefined';
     242                        $wp_environment_type       = __( 'Undefined' );
     243                        $wp_environment_type_debug = 'undefined';
    244244                }
    245245
    246246                $info['wp-constants'] = array(
    class WP_Debug_Data { 
    318318                                        'value' => $compress_css,
    319319                                        'debug' => $compress_css_debug,
    320320                                ),
    321                                 'WP_LOCAL_DEV'        => array(
    322                                         'label' => 'WP_LOCAL_DEV',
    323                                         'value' => $wp_local_dev,
    324                                         'debug' => $wp_local_dev_debug,
     321                                'WP_ENVIRONMENT_TYPE'        => array(
     322                                        'label' => 'WP_ENVIRONMENT_TYPE',
     323                                        'value' => $wp_environment_type,
     324                                        'debug' => $wp_environment_type_debug,
    325325                                ),
    326326                                'DB_CHARSET'          => array(
    327327                                        'label' => 'DB_CHARSET',