Make WordPress Core

Ticket #51857: pr-2225.diff

File pr-2225.diff, 6.5 KB (added by pbiron, 3 years ago)
  • src/wp-admin/includes/class-wp-site-health.php

    From fb70bb9355a22e52b13d1357936ee2303710ed01 Mon Sep 17 00:00:00 2001
    From: Paul Biron <paul@sparrowhawkcomputing.com>
    Date: Sun, 6 Mar 2022 07:50:33 -0700
    Subject: [PATCH] Fix HTML errors in the
     get_test_available_updates_disk_space() and
     get_test_update_temp_backup_writable() site health tests (closing P tags were
     missing).
    
    ---
     src/wp-admin/includes/class-wp-site-health.php | 4 ++--
     1 file changed, 2 insertions(+), 2 deletions(-)
    
    diff --git a/src/wp-admin/includes/class-wp-site-health.php b/src/wp-admin/includes/class-wp-site-health.php
    index e8aacf55a4..43be605322 100644
    a b class WP_Site_Health { 
    19051905                        ),
    19061906                        'description' => sprintf(
    19071907                                /* translators: %s: Available disk space in MB or GB. */
    1908                                 '<p>' . __( '%s available disk space was detected, update routines can be performed safely.' ),
     1908                                '<p>' . __( '%s available disk space was detected, update routines can be performed safely.' ) . '</p>',
    19091909                                size_format( $available_space )
    19101910                        ),
    19111911                        'actions'     => '',
    class WP_Site_Health { 
    19551955                        ),
    19561956                        'description' => sprintf(
    19571957                                /* translators: %s: wp-content/upgrade/temp-backup */
    1958                                 '<p>' . __( 'The %s directory used to improve the stability of plugin and theme updates is writable.' ),
     1958                                '<p>' . __( 'The %s directory used to improve the stability of plugin and theme updates is writable.' ) . '</p>',
    19591959                                '<code>wp-content/upgrade/temp-backup</code>'
    19601960                        ),
    19611961                        'actions'     => '',
  • src/wp-admin/includes/class-wp-debug-data.php

    -- 
    2.30.2.windows.1
    
    From 2c4e7209f4f5ba2f7684bced5c54ade64db0cec7 Mon Sep 17 00:00:00 2001
    From: Paul Biron <paul@sparrowhawkcomputing.com>
    Date: Sun, 6 Mar 2022 08:37:19 -0700
    Subject: [PATCH] Add `WP_RUNTIME_ENVIRONMENT` to the `WordPress Contents`
     section of the site health debug data.
    
    ---
     src/wp-admin/includes/class-wp-debug-data.php | 48 ++++++++++++-------
     1 file changed, 30 insertions(+), 18 deletions(-)
    
    diff --git a/src/wp-admin/includes/class-wp-debug-data.php b/src/wp-admin/includes/class-wp-debug-data.php
    index 3bc30ea212..6486daff82 100644
    a b class WP_Debug_Data { 
    241241                        $wp_environment_type = __( 'Undefined' );
    242242                }
    243243
     244                // Check WP_RUNTIME_ENVIRONMENT.
     245                if ( defined( 'WP_RUNTIME_ENVIRONMENT' ) ) {
     246                        $wp_runtime_environment = WP_RUNTIME_ENVIRONMENT;
     247                } else {
     248                        $wp_runtime_environment = __( 'Undefined' );
     249                }
     250
    244251                $info['wp-constants'] = array(
    245252                        'label'       => __( 'WordPress Constants' ),
    246253                        'description' => __( 'These settings alter where and how parts of WordPress are loaded.' ),
    247254                        'fields'      => array(
    248                                 'ABSPATH'             => array(
     255                                'ABSPATH'                => array(
    249256                                        'label'   => 'ABSPATH',
    250257                                        'value'   => ABSPATH,
    251258                                        'private' => true,
    252259                                ),
    253                                 'WP_HOME'             => array(
     260                                'WP_HOME'                => array(
    254261                                        'label' => 'WP_HOME',
    255262                                        'value' => ( defined( 'WP_HOME' ) ? WP_HOME : __( 'Undefined' ) ),
    256263                                        'debug' => ( defined( 'WP_HOME' ) ? WP_HOME : 'undefined' ),
    257264                                ),
    258                                 'WP_SITEURL'          => array(
     265                                'WP_SITEURL'             => array(
    259266                                        'label' => 'WP_SITEURL',
    260267                                        'value' => ( defined( 'WP_SITEURL' ) ? WP_SITEURL : __( 'Undefined' ) ),
    261268                                        'debug' => ( defined( 'WP_SITEURL' ) ? WP_SITEURL : 'undefined' ),
    262269                                ),
    263                                 'WP_CONTENT_DIR'      => array(
     270                                'WP_CONTENT_DIR'         => array(
    264271                                        'label' => 'WP_CONTENT_DIR',
    265272                                        'value' => WP_CONTENT_DIR,
    266273                                ),
    267                                 'WP_PLUGIN_DIR'       => array(
     274                                'WP_PLUGIN_DIR'          => array(
    268275                                        'label' => 'WP_PLUGIN_DIR',
    269276                                        'value' => WP_PLUGIN_DIR,
    270277                                ),
    271                                 'WP_MEMORY_LIMIT'     => array(
     278                                'WP_MEMORY_LIMIT'        => array(
    272279                                        'label' => 'WP_MEMORY_LIMIT',
    273280                                        'value' => WP_MEMORY_LIMIT,
    274281                                ),
    275                                 'WP_MAX_MEMORY_LIMIT' => array(
     282                                'WP_MAX_MEMORY_LIMIT'    => array(
    276283                                        'label' => 'WP_MAX_MEMORY_LIMIT',
    277284                                        'value' => WP_MAX_MEMORY_LIMIT,
    278285                                ),
    279                                 'WP_DEBUG'            => array(
     286                                'WP_DEBUG'               => array(
    280287                                        'label' => 'WP_DEBUG',
    281288                                        'value' => WP_DEBUG ? __( 'Enabled' ) : __( 'Disabled' ),
    282289                                        'debug' => WP_DEBUG,
    283290                                ),
    284                                 'WP_DEBUG_DISPLAY'    => array(
     291                                'WP_DEBUG_DISPLAY'       => array(
    285292                                        'label' => 'WP_DEBUG_DISPLAY',
    286293                                        'value' => WP_DEBUG_DISPLAY ? __( 'Enabled' ) : __( 'Disabled' ),
    287294                                        'debug' => WP_DEBUG_DISPLAY,
    288295                                ),
    289                                 'WP_DEBUG_LOG'        => array(
     296                                'WP_DEBUG_LOG'           => array(
    290297                                        'label' => 'WP_DEBUG_LOG',
    291298                                        'value' => $wp_debug_log_value,
    292299                                        'debug' => WP_DEBUG_LOG,
    293300                                ),
    294                                 'SCRIPT_DEBUG'        => array(
     301                                'SCRIPT_DEBUG'           => array(
    295302                                        'label' => 'SCRIPT_DEBUG',
    296303                                        'value' => SCRIPT_DEBUG ? __( 'Enabled' ) : __( 'Disabled' ),
    297304                                        'debug' => SCRIPT_DEBUG,
    298305                                ),
    299                                 'WP_CACHE'            => array(
     306                                'WP_CACHE'               => array(
    300307                                        'label' => 'WP_CACHE',
    301308                                        'value' => WP_CACHE ? __( 'Enabled' ) : __( 'Disabled' ),
    302309                                        'debug' => WP_CACHE,
    303310                                ),
    304                                 'CONCATENATE_SCRIPTS' => array(
     311                                'CONCATENATE_SCRIPTS'    => array(
    305312                                        'label' => 'CONCATENATE_SCRIPTS',
    306313                                        'value' => $concatenate_scripts,
    307314                                        'debug' => $concatenate_scripts_debug,
    308315                                ),
    309                                 'COMPRESS_SCRIPTS'    => array(
     316                                'COMPRESS_SCRIPTS'       => array(
    310317                                        'label' => 'COMPRESS_SCRIPTS',
    311318                                        'value' => $compress_scripts,
    312319                                        'debug' => $compress_scripts_debug,
    313320                                ),
    314                                 'COMPRESS_CSS'        => array(
     321                                'COMPRESS_CSS'           => array(
    315322                                        'label' => 'COMPRESS_CSS',
    316323                                        'value' => $compress_css,
    317324                                        'debug' => $compress_css_debug,
    318325                                ),
    319                                 'WP_ENVIRONMENT_TYPE' => array(
     326                                'WP_ENVIRONMENT_TYPE'    => array(
    320327                                        'label' => 'WP_ENVIRONMENT_TYPE',
    321328                                        'value' => $wp_environment_type,
    322329                                        'debug' => $wp_environment_type,
    323330                                ),
    324                                 'DB_CHARSET'          => array(
     331                                'WP_RUNTIME_ENVIRONMENT' => array(
     332                                        'label' => 'WP_RUNTIME_ENVIRONMENT',
     333                                        'value' => $wp_runtime_environment,
     334                                        'debug' => $wp_runtime_environment,
     335                                ),
     336                                'DB_CHARSET'             => array(
    325337                                        'label' => 'DB_CHARSET',
    326338                                        'value' => ( defined( 'DB_CHARSET' ) ? DB_CHARSET : __( 'Undefined' ) ),
    327339                                        'debug' => ( defined( 'DB_CHARSET' ) ? DB_CHARSET : 'undefined' ),
    328340                                ),
    329                                 'DB_COLLATE'          => array(
     341                                'DB_COLLATE'             => array(
    330342                                        'label' => 'DB_COLLATE',
    331343                                        'value' => ( defined( 'DB_COLLATE' ) ? DB_COLLATE : __( 'Undefined' ) ),
    332344                                        'debug' => ( defined( 'DB_COLLATE' ) ? DB_COLLATE : 'undefined' ),