From 6ee99a9005cf8adf6f20ebe2285a3048c44386d4 Mon Sep 17 00:00:00 2001 From: haritpanchal Date: Fri, 11 Sep 2026 15:42:21 +0530 Subject: [PATCH] Site Health: Remove COMPRESS_SCRIPTS and COMPRESS_CSS from WordPress Constants --- src/wp-admin/includes/class-wp-debug-data.php | 31 ++----------------- 1 file changed, 3 insertions(+), 28 deletions(-) diff --git a/src/wp-admin/includes/class-wp-debug-data.php b/src/wp-admin/includes/class-wp-debug-data.php index aada2f88dfaa6..7e131863955d9 100644 --- a/src/wp-admin/includes/class-wp-debug-data.php +++ b/src/wp-admin/includes/class-wp-debug-data.php @@ -1495,6 +1495,9 @@ private static function get_wp_themes_inactive(): array { * Gets the WordPress constants section of the debug data. * * @since 6.7.0 + * @since 7.2.0 Removed the `COMPRESS_SCRIPTS` and `COMPRESS_CSS` constants, which no longer have + * any practical effect on most hosts and are being phased out along with the rest of + * the wp-admin script/style concatenation feature. * * @return array The WordPress constants debug data. */ @@ -1516,24 +1519,6 @@ private static function get_wp_constants(): array { $concatenate_scripts_debug = 'undefined'; } - // Check COMPRESS_SCRIPTS. - if ( defined( 'COMPRESS_SCRIPTS' ) ) { - $compress_scripts = COMPRESS_SCRIPTS ? __( 'Enabled' ) : __( 'Disabled' ); - $compress_scripts_debug = COMPRESS_SCRIPTS ? 'true' : 'false'; - } else { - $compress_scripts = __( 'Undefined' ); - $compress_scripts_debug = 'undefined'; - } - - // Check COMPRESS_CSS. - if ( defined( 'COMPRESS_CSS' ) ) { - $compress_css = COMPRESS_CSS ? __( 'Enabled' ) : __( 'Disabled' ); - $compress_css_debug = COMPRESS_CSS ? 'true' : 'false'; - } else { - $compress_css = __( 'Undefined' ); - $compress_css_debug = 'undefined'; - } - // Check WP_ENVIRONMENT_TYPE. if ( defined( 'WP_ENVIRONMENT_TYPE' ) ) { $wp_environment_type = WP_ENVIRONMENT_TYPE ? WP_ENVIRONMENT_TYPE : __( 'Empty value' ); @@ -1614,16 +1599,6 @@ private static function get_wp_constants(): array { 'value' => $concatenate_scripts, 'debug' => $concatenate_scripts_debug, ), - 'COMPRESS_SCRIPTS' => array( - 'label' => 'COMPRESS_SCRIPTS', - 'value' => $compress_scripts, - 'debug' => $compress_scripts_debug, - ), - 'COMPRESS_CSS' => array( - 'label' => 'COMPRESS_CSS', - 'value' => $compress_css, - 'debug' => $compress_css_debug, - ), 'WP_ENVIRONMENT_TYPE' => array( 'label' => 'WP_ENVIRONMENT_TYPE', 'value' => $wp_environment_type,