Commit a6610190ff for wordpress.org

commit a6610190ff33be7bf4b812b93705c837da477edd
Author: westonruter <westonruter@git.wordpress.org>
Date:   Mon Oct 19 22:46:54 2026 +0000

    Script Loader: Retire script and style concatenation.

    Scripts and styles in the admin and on the login screen are no longer concatenated through `load-scripts.php` and `load-styles.php`. Concatenation paid off when browsers opened few connections per host over HTTP/1.1, but it has long been a source of bugs: dependencies outside the default directories were not honored, `SCRIPT_DEBUG` and the `script_loader_src` and `style_loader_src` filters were ignored, inline styles could be duplicated, and code run by the loaders without WordPress loaded caused fatal errors. It was turned off by default in r64320, once the assets of the next admin screen began to be prefetched in r64120, and this removes what remains.

    Every item is now printed as its own tag, and what remains of the concatenation API is deprecated or removed:
    * The properties of `WP_Scripts` and `WP_Styles` that held items back for concatenation are deprecated but still declared, so plugins reading or setting them keep working. The `do_item()` methods no longer check `do_concat`.
    * The `_print_scripts()`, `_print_styles()`, `script_concat_settings()`, `in_default_dir()` and `WP_Dependencies::get_etag()` functions are deprecated.
    * The `print_head_scripts`, `print_footer_scripts`, `print_admin_styles` and `print_late_styles` filters only decided whether held markup was printed, so they are applied with `apply_filters_deprecated()` and their return values are ignored.
    * The `CONCATENATE_SCRIPTS` constant is no longer read.
    * The `wp_should_concatenate_admin_scripts()` function and its filter, added in r64120 for the transition and never released, are removed.

    The loaders now respond with 410 Gone and a one-line plain text explanation, without loading WordPress, so that requests from bots and stale links cost next to nothing. Code written to run inside them without WordPress loaded, such as `wp_theme_has_theme_json()`, now uses the functions it had avoided, and `wp-admin/includes/noop.php` no longer defines its stub functions.

    Developed in https://github.com/WordPress/wordpress-develop/pull/14463.
    Follow-up to r10357, r43580, r60719, r62657, r64120, r64320, r64485.

    Props westonruter, jonsurrell, peterwilsoncc, azaozz, markhowellsmead, sergiomdgomes, jerclarke, adamsilverstein, sukhendu2002, adnan007, momo360modena, desrosj, welcher.
    See #15833, #36448, #36449, #36779, #43825, #45008, #47322, #52879, #63908, #64087, #65515.
    Fixes #57548.

    Built from https://develop.svn.wordpress.org/trunk@64585


    git-svn-id: http://core.svn.wordpress.org/trunk@63735 1a063a9b-81f0-0310-95a4-ce76da25c4cd

diff --git a/wp-admin/includes/class-wp-debug-data.php b/wp-admin/includes/class-wp-debug-data.php
index 88028d0598..ca85f0ebec 100644
--- a/wp-admin/includes/class-wp-debug-data.php
+++ b/wp-admin/includes/class-wp-debug-data.php
@@ -1509,15 +1509,6 @@ class WP_Debug_Data {
 			$wp_debug_log_value = __( 'Enabled' );
 		}

-		// Check CONCATENATE_SCRIPTS.
-		if ( defined( 'CONCATENATE_SCRIPTS' ) ) {
-			$concatenate_scripts       = CONCATENATE_SCRIPTS ? __( 'Enabled' ) : __( 'Disabled' );
-			$concatenate_scripts_debug = CONCATENATE_SCRIPTS ? 'true' : 'false';
-		} else {
-			$concatenate_scripts       = __( 'Undefined' );
-			$concatenate_scripts_debug = 'undefined';
-		}
-
 		// Check WP_ENVIRONMENT_TYPE.
 		if ( defined( 'WP_ENVIRONMENT_TYPE' ) ) {
 			$wp_environment_type       = WP_ENVIRONMENT_TYPE ? WP_ENVIRONMENT_TYPE : __( 'Empty value' );
@@ -1593,11 +1584,6 @@ class WP_Debug_Data {
 				'value' => WP_CACHE ? __( 'Enabled' ) : __( 'Disabled' ),
 				'debug' => WP_CACHE,
 			),
-			'CONCATENATE_SCRIPTS' => array(
-				'label' => 'CONCATENATE_SCRIPTS',
-				'value' => $concatenate_scripts,
-				'debug' => $concatenate_scripts_debug,
-			),
 			'WP_ENVIRONMENT_TYPE' => array(
 				'label' => 'WP_ENVIRONMENT_TYPE',
 				'value' => $wp_environment_type,
diff --git a/wp-admin/includes/noop.php b/wp-admin/includes/noop.php
index 39dc9702c1..a355c2e928 100644
--- a/wp-admin/includes/noop.php
+++ b/wp-admin/includes/noop.php
@@ -1,113 +1,16 @@
 <?php
 /**
- * Noop functions for load-scripts.php and load-styles.php.
+ * Formerly defined noop functions for load-scripts.php and load-styles.php.
+ *
+ * Scripts and styles are no longer concatenated, so those files no longer load WordPress without
+ * its functions, and these noop functions are no longer defined.
  *
  * @package WordPress
  * @subpackage Administration
  * @since 4.4.0
+ * @deprecated 7.2.0 Scripts and styles are no longer concatenated.
  */

-/**
- * @ignore
- */
-function __() {}
-
-/**
- * @ignore
- */
-function _x() {}
-
-/**
- * @ignore
- */
-function add_filter() {}
-
-/**
- * @ignore
- */
-function has_filter() {
-	return false;
-}
-
-/**
- * @ignore
- */
-function esc_attr() {}
-
-/**
- * @ignore
- */
-function apply_filters() {}
-
-/**
- * @ignore
- */
-function get_option() {}
-
-/**
- * @ignore
- */
-function is_lighttpd_before_150() {}
-
-/**
- * @ignore
- */
-function add_action() {}
-
-/**
- * @ignore
- */
-function did_action() {}
-
-/**
- * @ignore
- */
-function do_action_ref_array() {}
-
-/**
- * @ignore
- */
-function get_bloginfo() {}
-
-/**
- * @ignore
- */
-function is_admin() {
-	return true;
-}
-
-/**
- * @ignore
- */
-function site_url() {}
-
-/**
- * @ignore
- */
-function admin_url() {}
-
-/**
- * @ignore
- */
-function home_url() {}
-
-/**
- * @ignore
- */
-function includes_url() {}
-
-/**
- * @ignore
- */
-function wp_guess_url() {}
-
-function get_file( $path ) {
-
-	$path = realpath( $path );
-
-	if ( ! $path || ! @is_file( $path ) ) {
-		return '';
-	}
-
-	return @file_get_contents( $path );
+if ( function_exists( '_deprecated_file' ) ) {
+	_deprecated_file( basename( __FILE__ ), '7.2.0' );
 }
diff --git a/wp-admin/load-scripts.php b/wp-admin/load-scripts.php
index e4b6a1ee5b..2a8688e19f 100644
--- a/wp-admin/load-scripts.php
+++ b/wp-admin/load-scripts.php
@@ -1,77 +1,17 @@
 <?php
-
-/*
- * The error_reporting() function can be disabled in php.ini. On systems where that is the case,
- * it's best to add a dummy function to the wp-config.php file, but as this call to the function
- * is run prior to wp-config.php loading, it is wrapped in a function_exists() check.
+/**
+ * Formerly concatenated the core scripts named in the `load` query parameter.
+ *
+ * Scripts are no longer concatenated, so this file now only responds with 410 Gone, for code
+ * that still links to it directly. WordPress is not loaded, so that requests from bots and stale
+ * links cost next to nothing and do not trigger deprecation notices.
+ *
+ * @package WordPress
+ * @subpackage Administration
+ * @deprecated 7.2.0 Scripts are no longer concatenated.
  */
-if ( function_exists( 'error_reporting' ) ) {
-	/*
-	 * Disable error reporting.
-	 *
-	 * Set this to error_reporting( -1 ) for debugging.
-	 */
-	error_reporting( 0 );
-}
-
-// Set ABSPATH for execution.
-if ( ! defined( 'ABSPATH' ) ) {
-	define( 'ABSPATH', dirname( __DIR__ ) . '/' );
-}
-
-define( 'WPINC', 'wp-includes' );
-
-$protocol = $_SERVER['SERVER_PROTOCOL'];
-if ( ! in_array( $protocol, array( 'HTTP/1.1', 'HTTP/2', 'HTTP/2.0', 'HTTP/3' ), true ) ) {
-	$protocol = 'HTTP/1.0';
-}
-
-$load = $_GET['load'];
-if ( is_array( $load ) ) {
-	ksort( $load );
-	$load = implode( '', $load );
-}
-
-$load = preg_replace( '/[^a-z0-9,_-]+/i', '', $load );
-$load = array_unique( explode( ',', $load ) );
-
-if ( empty( $load ) ) {
-	header( "$protocol 400 Bad Request" );
-	exit;
-}
-
-require ABSPATH . 'wp-admin/includes/noop.php';
-require ABSPATH . WPINC . '/script-loader.php';
-require ABSPATH . WPINC . '/version.php';
-
-$expires_offset = 31536000; // 1 year.
-$out            = '';
-
-$wp_scripts = new WP_Scripts();
-wp_default_scripts( $wp_scripts );
-wp_default_packages_vendor( $wp_scripts );
-wp_default_packages_scripts( $wp_scripts );
-
-$etag = $wp_scripts->get_etag( $load );
-
-if ( isset( $_SERVER['HTTP_IF_NONE_MATCH'] ) && stripslashes( $_SERVER['HTTP_IF_NONE_MATCH'] ) === $etag ) {
-	header( "$protocol 304 Not Modified" );
-	exit;
-}
-
-foreach ( $load as $handle ) {
-	if ( ! array_key_exists( $handle, $wp_scripts->registered ) ) {
-		continue;
-	}
-
-	$path = ABSPATH . $wp_scripts->registered[ $handle ]->src;
-	$out .= get_file( $path ) . "\n";
-}
-
-header( "Etag: $etag" );
-header( 'Content-Type: application/javascript; charset=UTF-8' );
-header( 'Expires: ' . gmdate( 'D, d M Y H:i:s', time() + $expires_offset ) . ' GMT' );
-header( "Cache-Control: public, max-age=$expires_offset" );

-echo $out;
+http_response_code( 410 );
+header( 'Content-Type: text/plain; charset=UTF-8' );
+echo 'Scripts are no longer concatenated.';
 exit;
diff --git a/wp-admin/load-styles.php b/wp-admin/load-styles.php
index 3bdfcc7a22..3be85a99fe 100644
--- a/wp-admin/load-styles.php
+++ b/wp-admin/load-styles.php
@@ -1,102 +1,17 @@
 <?php
-
-/*
- * The error_reporting() function can be disabled in php.ini. On systems where that is the case,
- * it's best to add a dummy function to the wp-config.php file, but as this call to the function
- * is run prior to wp-config.php loading, it is wrapped in a function_exists() check.
+/**
+ * Formerly concatenated the core styles named in the `load` query parameter.
+ *
+ * Styles are no longer concatenated, so this file now only responds with 410 Gone, for code
+ * that still links to it directly. WordPress is not loaded, so that requests from bots and stale
+ * links cost next to nothing and do not trigger deprecation notices.
+ *
+ * @package WordPress
+ * @subpackage Administration
+ * @deprecated 7.2.0 Styles are no longer concatenated.
  */
-if ( function_exists( 'error_reporting' ) ) {
-	/*
-	 * Disable error reporting.
-	 *
-	 * Set this to error_reporting( -1 ) for debugging.
-	 */
-	error_reporting( 0 );
-}
-
-// Set ABSPATH for execution.
-if ( ! defined( 'ABSPATH' ) ) {
-	define( 'ABSPATH', dirname( __DIR__ ) . '/' );
-}
-
-define( 'WPINC', 'wp-includes' );
-define( 'WP_CONTENT_DIR', ABSPATH . 'wp-content' );
-
-require ABSPATH . 'wp-admin/includes/noop.php';
-require ABSPATH . WPINC . '/theme.php';
-require ABSPATH . WPINC . '/class-wp-theme-json-resolver.php';
-require ABSPATH . WPINC . '/global-styles-and-settings.php';
-require ABSPATH . WPINC . '/script-loader.php';
-require ABSPATH . WPINC . '/version.php';
-
-$protocol = $_SERVER['SERVER_PROTOCOL'];
-if ( ! in_array( $protocol, array( 'HTTP/1.1', 'HTTP/2', 'HTTP/2.0', 'HTTP/3' ), true ) ) {
-	$protocol = 'HTTP/1.0';
-}
-
-$load = $_GET['load'];
-if ( is_array( $load ) ) {
-	ksort( $load );
-	$load = implode( '', $load );
-}
-
-$load = preg_replace( '/[^a-z0-9,_-]+/i', '', $load );
-$load = array_unique( explode( ',', $load ) );
-
-if ( empty( $load ) ) {
-	header( "$protocol 400 Bad Request" );
-	exit;
-}
-
-$rtl            = ( isset( $_GET['dir'] ) && 'rtl' === $_GET['dir'] );
-$expires_offset = 31536000; // 1 year.
-$out            = '';
-
-$wp_styles = new WP_Styles();
-wp_default_styles( $wp_styles );
-
-$etag = $wp_styles->get_etag( $load );
-
-if ( isset( $_SERVER['HTTP_IF_NONE_MATCH'] ) && stripslashes( $_SERVER['HTTP_IF_NONE_MATCH'] ) === $etag ) {
-	header( "$protocol 304 Not Modified" );
-	exit;
-}
-
-foreach ( $load as $handle ) {
-	if ( ! array_key_exists( $handle, $wp_styles->registered ) ) {
-		continue;
-	}
-
-	$style = $wp_styles->registered[ $handle ];
-
-	if ( empty( $style->src ) ) {
-		continue;
-	}
-
-	$path = ABSPATH . $style->src;
-
-	if ( $rtl && ! empty( $style->extra['rtl'] ) ) {
-		// All default styles have fully independent RTL files.
-		$path = str_replace( '.min.css', '-rtl.min.css', $path );
-	}
-
-	$content = get_file( $path ) . "\n";
-
-	// Note: str_starts_with() is not used here, as wp-includes/compat.php is not loaded in this file.
-	if ( 0 === strpos( $style->src, '/' . WPINC . '/css/' ) ) {
-		$content = str_replace( '../images/', '../' . WPINC . '/images/', $content );
-		$content = str_replace( '../js/tinymce/', '../' . WPINC . '/js/tinymce/', $content );
-		$content = str_replace( '../fonts/', '../' . WPINC . '/fonts/', $content );
-		$out    .= $content;
-	} else {
-		$out .= str_replace( '../images/', 'images/', $content );
-	}
-}
-
-header( "Etag: $etag" );
-header( 'Content-Type: text/css; charset=UTF-8' );
-header( 'Expires: ' . gmdate( 'D, d M Y H:i:s', time() + $expires_offset ) . ' GMT' );
-header( "Cache-Control: public, max-age=$expires_offset" );

-echo $out;
+http_response_code( 410 );
+header( 'Content-Type: text/plain; charset=UTF-8' );
+echo 'Styles are no longer concatenated.';
 exit;
diff --git a/wp-includes/class-wp-dependencies.php b/wp-includes/class-wp-dependencies.php
index 9aef3af3ef..f9aa688cca 100644
--- a/wp-includes/class-wp-dependencies.php
+++ b/wp-includes/class-wp-dependencies.php
@@ -534,6 +534,7 @@ class WP_Dependencies {
 	 * Get etag header for cache validation.
 	 *
 	 * @since 6.7.0
+	 * @deprecated 7.2.0 Scripts and styles are no longer concatenated by load-scripts.php or load-styles.php.
 	 *
 	 * @global string $wp_version The WordPress version string.
 	 *
@@ -543,13 +544,10 @@ class WP_Dependencies {
 	 * @phpstan-return non-falsy-string
 	 */
 	public function get_etag( $load ) {
-		/*
-		 * Note: wp_get_wp_version() is not used here, as this file can be included
-		 * via wp-admin/load-scripts.php or wp-admin/load-styles.php, in which case
-		 * wp-includes/functions.php is not loaded.
-		 */
 		global $wp_version;

+		_deprecated_function( __METHOD__, '7.2.0' );
+
 		$etag = "WP:{$wp_version};";

 		foreach ( $load as $handle ) {
diff --git a/wp-includes/class-wp-editor.php b/wp-includes/class-wp-editor.php
index 981d29379f..cda28aa94c 100644
--- a/wp-includes/class-wp-editor.php
+++ b/wp-includes/class-wp-editor.php
@@ -1519,9 +1519,10 @@ final class _WP_Editors {
 	/**
 	 * Force uncompressed TinyMCE when a custom theme has been defined.
 	 *
-	 * The compressed TinyMCE file cannot deal with custom themes, so this makes
-	 * sure that WordPress uses the uncompressed TinyMCE file if a theme is defined.
-	 * Even if the website is running on a production environment.
+	 * The `wp-tinymce.js` bundle cannot deal with custom themes. Core registers
+	 * the separate TinyMCE files, but a site can still register the bundle under
+	 * the `wp-tinymce` handle, so this makes sure that the separate files are used
+	 * if a theme is defined.
 	 *
 	 * @since 5.0.0
 	 */
@@ -1548,22 +1549,14 @@ final class _WP_Editors {
 	 * Print (output) the main TinyMCE scripts.
 	 *
 	 * @since 4.8.0
-	 *
-	 * @global bool $concatenate_scripts
 	 */
 	public static function print_tinymce_scripts() {
-		global $concatenate_scripts;
-
 		if ( self::$tinymce_scripts_printed ) {
 			return;
 		}

 		self::$tinymce_scripts_printed = true;

-		if ( ! isset( $concatenate_scripts ) ) {
-			script_concat_settings();
-		}
-
 		wp_print_scripts( array( 'wp-tinymce' ) );

 		echo "<script>\n" . self::wp_mce_translation() . "</script>\n";
diff --git a/wp-includes/class-wp-scripts.php b/wp-includes/class-wp-scripts.php
index 9104a81531..2a74bff8f6 100644
--- a/wp-includes/class-wp-scripts.php
+++ b/wp-includes/class-wp-scripts.php
@@ -57,6 +57,7 @@ class WP_Scripts extends WP_Dependencies {
 	 * Holds a list of script handles which will be concatenated.
 	 *
 	 * @since 2.8.0
+	 * @deprecated 7.2.0 Scripts are no longer concatenated.
 	 * @var string
 	 */
 	public $concat = '';
@@ -74,6 +75,7 @@ class WP_Scripts extends WP_Dependencies {
 	 * Whether to perform concatenation.
 	 *
 	 * @since 2.8.0
+	 * @deprecated 7.2.0 Scripts are no longer concatenated.
 	 * @var bool
 	 */
 	public $do_concat = false;
@@ -83,6 +85,7 @@ class WP_Scripts extends WP_Dependencies {
 	 * is enabled.
 	 *
 	 * @since 2.8.0
+	 * @deprecated 7.2.0 Scripts are no longer concatenated.
 	 * @var string
 	 */
 	public $print_html = '';
@@ -91,6 +94,7 @@ class WP_Scripts extends WP_Dependencies {
 	 * Holds inline code if concatenation is enabled.
 	 *
 	 * @since 2.8.0
+	 * @deprecated 7.2.0 Scripts are no longer concatenated.
 	 * @var string
 	 */
 	public $print_code = '';
@@ -102,6 +106,7 @@ class WP_Scripts extends WP_Dependencies {
 	 * Unused in core.
 	 *
 	 * @since 2.8.0
+	 * @deprecated 7.2.0 Scripts are no longer concatenated.
 	 * @var string
 	 */
 	public $ext_handles = '';
@@ -113,6 +118,7 @@ class WP_Scripts extends WP_Dependencies {
 	 * Unused in core.
 	 *
 	 * @since 2.8.0
+	 * @deprecated 7.2.0 Scripts are no longer concatenated.
 	 * @var string
 	 */
 	public $ext_version = '';
@@ -120,7 +126,12 @@ class WP_Scripts extends WP_Dependencies {
 	/**
 	 * List of default directories.
 	 *
+	 * Only the deprecated {@see WP_Scripts::in_default_dir()} reads this, but
+	 * {@see wp_default_scripts()} still sets it for plugins that read it.
+	 *
 	 * @since 2.8.0
+	 * @deprecated 7.2.0 Scripts are no longer concatenated.
+	 * @see WP_Scripts::in_default_dir()
 	 * @see wp_default_scripts()
 	 * @var string[]|null
 	 */
@@ -224,23 +235,14 @@ class WP_Scripts extends WP_Dependencies {
 	 */
 	public function print_extra_script( $handle, $display = true ) {
 		$output = $this->get_data( $handle, 'data' );
-		if ( ! $output ) {
+		if ( ! is_string( $output ) || ! $output ) {
 			return null;
 		}

-		/*
-		 * Do not print a sourceURL comment if concatenation is enabled.
-		 *
-		 * Extra scripts may be concatenated into a single script.
-		 * The line-based sourceURL comments may break concatenated scripts
-		 * and do not make sense when multiple scripts are joined together.
-		 */
-		if ( ! $this->do_concat ) {
-			$output .= sprintf(
-				"\n//# sourceURL=%s",
-				rawurlencode( "{$handle}-js-extra" )
-			);
-		}
+		$output .= sprintf(
+			"\n//# sourceURL=%s",
+			rawurlencode( "{$handle}-js-extra" )
+		);

 		if ( ! $display ) {
 			return $output;
@@ -302,16 +304,6 @@ class WP_Scripts extends WP_Dependencies {
 			return false;
 		}

-		if ( null === $obj->ver ) {
-			$ver = '';
-		} else {
-			$ver = $obj->ver ? $obj->ver : $this->default_version;
-		}
-
-		if ( isset( $this->args[ $handle ] ) ) {
-			$ver = $ver ? $ver . '&amp;' . $this->args[ $handle ] : $this->args[ $handle ];
-		}
-
 		$src               = $obj->src;
 		$strategy          = $this->get_eligible_loading_strategy( $handle );
 		$intended_strategy = (string) $this->get_data( $handle, 'strategy' );
@@ -348,12 +340,6 @@ class WP_Scripts extends WP_Dependencies {
 			$inline_script_tag = '';
 		}

-		/*
-		 * Prevent concatenation of scripts if the text domain is defined
-		 * to ensure the dependency order is respected.
-		 */
-		$translations_stop_concat = ! empty( $obj->textdomain );
-
 		$translations = $this->print_translations( $handle, false );
 		if ( $translations ) {
 			/*
@@ -368,48 +354,12 @@ class WP_Scripts extends WP_Dependencies {
 			$translations  = wp_get_inline_script_tag( $translations, array( 'id' => "{$handle}-js-translations" ) );
 		}

-		if ( $this->do_concat ) {
-			/**
-			 * Filters the script loader source.
-			 *
-			 * @since 2.2.0
-			 *
-			 * @param string $src    Script loader source path.
-			 * @param string $handle Script handle.
-			 */
-			$filtered_src = apply_filters( 'script_loader_src', $src, $handle );
-
-			if (
-				is_string( $filtered_src )
-				&& $this->in_default_dir( $filtered_src )
-				&& ( $before_script || $after_script || $translations_stop_concat || $this->is_delayed_strategy( $strategy ) )
-			) {
-				$this->do_concat = false;
-
-				// Have to print the so-far concatenated scripts right away to maintain the right order.
-				_print_scripts();
-				$this->reset();
-			} elseif ( $this->in_default_dir( $filtered_src ) ) {
-				$this->print_code     .= $this->print_extra_script( $handle, false );
-				$this->concat         .= "$handle,";
-				$this->concat_version .= "$handle$ver";
-				return true;
-			} else {
-				$this->ext_handles .= "$handle,";
-				$this->ext_version .= "$handle$ver";
-			}
-		}
-
 		$this->print_extra_script( $handle );

 		// A single item may alias a set of items, by having dependencies, but no source.
 		if ( ! $src ) {
 			if ( $inline_script_tag ) {
-				if ( $this->do_concat ) {
-					$this->print_html .= $inline_script_tag;
-				} else {
-					echo $inline_script_tag;
-				}
+				echo $inline_script_tag;
 			}

 			return true;
@@ -465,11 +415,7 @@ class WP_Scripts extends WP_Dependencies {
 		 */
 		$tag = apply_filters( 'script_loader_tag', $tag, $handle, $src );

-		if ( $this->do_concat ) {
-			$this->print_html .= $tag;
-		} else {
-			echo $tag;
-		}
+		echo $tag;

 		return true;
 	}
@@ -531,7 +477,14 @@ class WP_Scripts extends WP_Dependencies {
 			}
 		}

-		/** This filter is documented in wp-includes/class-wp-scripts.php */
+		/**
+		 * Filters the script loader source.
+		 *
+		 * @since 2.2.0
+		 *
+		 * @param string $src    Script loader source path.
+		 * @param string $handle Script handle.
+		 */
 		$src = apply_filters( 'script_loader_src', $src, $handle );

 		return is_string( $src ) ? $src : '';
@@ -610,12 +563,6 @@ class WP_Scripts extends WP_Dependencies {
 			return '';
 		}

-		/*
-		 * Print sourceURL comment regardless of concatenation.
-		 *
-		 * Inline scripts prevent scripts from being concatenated, so
-		 * sourceURL comments are safe to print for inline scripts.
-		 */
 		$data[] = sprintf(
 			'//# sourceURL=%s',
 			rawurlencode( "{$handle}-js-{$position}" )
@@ -871,11 +818,14 @@ JS;
 	 * Whether a handle's source is in a default directory.
 	 *
 	 * @since 2.8.0
+	 * @deprecated 7.2.0 Scripts are no longer concatenated.
 	 *
 	 * @param string $src The source of the enqueued script.
 	 * @return bool True if found, false if not.
 	 */
 	public function in_default_dir( $src ) {
+		_deprecated_function( __METHOD__, '7.2.0' );
+
 		if ( ! $this->default_dirs ) {
 			return true;
 		}
diff --git a/wp-includes/class-wp-styles.php b/wp-includes/class-wp-styles.php
index 32fc8878b6..39e18f7dd6 100644
--- a/wp-includes/class-wp-styles.php
+++ b/wp-includes/class-wp-styles.php
@@ -58,6 +58,7 @@ class WP_Styles extends WP_Dependencies {
 	 * Holds a list of style handles which will be concatenated.
 	 *
 	 * @since 2.8.0
+	 * @deprecated 7.2.0 Styles are no longer concatenated.
 	 * @var string
 	 */
 	public $concat = '';
@@ -75,6 +76,7 @@ class WP_Styles extends WP_Dependencies {
 	 * Whether to perform concatenation.
 	 *
 	 * @since 2.8.0
+	 * @deprecated 7.2.0 Styles are no longer concatenated.
 	 * @var bool
 	 */
 	public $do_concat = false;
@@ -84,6 +86,7 @@ class WP_Styles extends WP_Dependencies {
 	 * is enabled.
 	 *
 	 * @since 2.8.0
+	 * @deprecated 7.2.0 Styles are no longer concatenated.
 	 * @var string
 	 */
 	public $print_html = '';
@@ -92,6 +95,7 @@ class WP_Styles extends WP_Dependencies {
 	 * Holds inline styles if concatenation is enabled.
 	 *
 	 * @since 3.3.0
+	 * @deprecated 7.2.0 Styles are no longer concatenated.
 	 * @var string
 	 */
 	public $print_code = '';
@@ -99,7 +103,12 @@ class WP_Styles extends WP_Dependencies {
 	/**
 	 * List of default directories.
 	 *
+	 * Only the deprecated {@see WP_Styles::in_default_dir()} reads this, but
+	 * {@see wp_default_styles()} still sets it for plugins that read it.
+	 *
 	 * @since 2.8.0
+	 * @deprecated 7.2.0 Styles are no longer concatenated.
+	 * @see WP_Styles::in_default_dir()
 	 * @see wp_default_styles()
 	 * @var string[]|null
 	 */
@@ -144,15 +153,6 @@ class WP_Styles extends WP_Dependencies {

 			return false;
 		}
-		if ( null === $obj->ver ) {
-			$ver = '';
-		} else {
-			$ver = $obj->ver ? $obj->ver : $this->default_version;
-		}
-
-		if ( isset( $this->args[ $handle ] ) ) {
-			$ver = $ver ? $ver . '&amp;' . $this->args[ $handle ] : $this->args[ $handle ];
-		}

 		$src          = $obj->src;
 		$inline_style = $this->print_inline_style( $handle, false );
@@ -167,27 +167,12 @@ class WP_Styles extends WP_Dependencies {
 			$inline_style_tag = '';
 		}

-		if ( $this->do_concat ) {
-			if ( is_string( $src ) && $this->in_default_dir( $src ) && ! isset( $obj->extra['alt'] ) ) {
-				$this->concat         .= "$handle,";
-				$this->concat_version .= "$handle$ver";
-
-				$this->print_code .= $inline_style;
-
-				return true;
-			}
-		}
-
 		$media = $obj->args ?? 'all';

 		// A single item may alias a set of items, by having dependencies, but no source.
 		if ( ! $src ) {
 			if ( $inline_style_tag ) {
-				if ( $this->do_concat ) {
-					$this->print_html .= $inline_style_tag;
-				} else {
-					echo $inline_style_tag;
-				}
+				echo $inline_style_tag;
 			}

 			return true;
@@ -247,15 +232,8 @@ class WP_Styles extends WP_Dependencies {
 			}
 		}

-		if ( $this->do_concat ) {
-			$this->print_html .= $tag;
-			if ( $inline_style_tag ) {
-				$this->print_html .= $inline_style_tag;
-			}
-		} else {
-			echo $tag;
-			$this->print_inline_style( $handle );
-		}
+		echo $tag;
+		echo $inline_style_tag;

 		return true;
 	}
@@ -350,26 +328,23 @@ class WP_Styles extends WP_Dependencies {
 			return false;
 		}

-		if ( ! $this->do_concat ) {
-
-			// Obtain the original `src` for a stylesheet possibly inlined by wp_maybe_inline_styles().
-			$inlined_src = $this->get_data( $handle, 'inlined_src' );
-
-			// If there's only one `after` inline style, and that inline style had been inlined, then use the $inlined_src
-			// as the sourceURL. Otherwise, if there is more than one inline `after` style associated with the handle,
-			// then resort to using the handle to construct the sourceURL since there isn't a single source.
-			if ( count( $output ) === 1 && is_string( $inlined_src ) && strlen( $inlined_src ) > 0 ) {
-				$source_url = esc_url_raw( $inlined_src );
-			} else {
-				$source_url = rawurlencode( "{$handle}-inline-css" );
-			}
+		// Obtain the original `src` for a stylesheet possibly inlined by wp_maybe_inline_styles().
+		$inlined_src = $this->get_data( $handle, 'inlined_src' );

-			$output[] = sprintf(
-				'/*# sourceURL=%s */',
-				$source_url
-			);
+		// If there's only one `after` inline style, and that inline style had been inlined, then use the $inlined_src
+		// as the sourceURL. Otherwise, if there is more than one inline `after` style associated with the handle,
+		// then resort to using the handle to construct the sourceURL since there isn't a single source.
+		if ( count( $output ) === 1 && is_string( $inlined_src ) && strlen( $inlined_src ) > 0 ) {
+			$source_url = esc_url_raw( $inlined_src );
+		} else {
+			$source_url = rawurlencode( "{$handle}-inline-css" );
 		}

+		$output[] = sprintf(
+			'/*# sourceURL=%s */',
+			$source_url
+		);
+
 		$output = implode( "\n", $output );

 		if ( ! $display ) {
@@ -552,11 +527,14 @@ class WP_Styles extends WP_Dependencies {
 	 * Whether a handle's source is in a default directory.
 	 *
 	 * @since 2.8.0
+	 * @deprecated 7.2.0 Styles are no longer concatenated.
 	 *
 	 * @param string $src The source of the enqueued style.
 	 * @return bool True if found, false if not.
 	 */
 	public function in_default_dir( $src ) {
+		_deprecated_function( __METHOD__, '7.2.0' );
+
 		if ( ! $this->default_dirs ) {
 			return true;
 		}
diff --git a/wp-includes/default-constants.php b/wp-includes/default-constants.php
index 54d77d0e98..d4c669ff4c 100644
--- a/wp-includes/default-constants.php
+++ b/wp-includes/default-constants.php
@@ -115,8 +115,8 @@ function wp_initial_constants() {
 	}

 	/*
-	 * Add define( 'SCRIPT_DEBUG', true ); to wp-config.php to enable loading of non-minified,
-	 * non-concatenated scripts and stylesheets.
+	 * Add define( 'SCRIPT_DEBUG', true ); to wp-config.php to enable loading of non-minified
+	 * scripts and stylesheets.
 	 */
 	if ( ! defined( 'SCRIPT_DEBUG' ) ) {
 		if ( ! empty( $wp_version ) ) {
diff --git a/wp-includes/deprecated.php b/wp-includes/deprecated.php
index 48aad4751a..1eac319870 100644
--- a/wp-includes/deprecated.php
+++ b/wp-includes/deprecated.php
@@ -6601,6 +6601,77 @@ function _truncate_post_slug( $slug, $length = 200 ) {
 	return wp_truncate_slug( $slug, $length );
 }

+/**
+ * Determines the concatenation settings for scripts and styles.
+ *
+ * Scripts and styles are no longer concatenated, so this only gives the `$concatenate_scripts`,
+ * `$compress_scripts`, and `$compress_css` globals a value of false when they are not already set,
+ * for code that still reads them.
+ *
+ * @since 2.8.0
+ * @since 7.2.0 The `$compress_scripts` and `$compress_css` globals default to false, as PHP compression
+ *              of scripts and styles was removed in 4.9.9.
+ * @deprecated 7.2.0 Scripts and styles are no longer concatenated.
+ *
+ * @global bool $concatenate_scripts
+ * @global bool $compress_scripts
+ * @global bool $compress_css
+ */
+function script_concat_settings(): void {
+	global $concatenate_scripts, $compress_scripts, $compress_css;
+
+	_deprecated_function( __FUNCTION__, '7.2.0' );
+
+	if ( ! isset( $concatenate_scripts ) ) {
+		$concatenate_scripts = false;
+	}
+
+	if ( ! isset( $compress_scripts ) ) {
+		$compress_scripts = false;
+	}
+
+	if ( ! isset( $compress_css ) ) {
+		$compress_css = false;
+	}
+}
+
+/**
+ * Prints scripts (internal use only)
+ *
+ * @since 2.8.0
+ * @deprecated 7.2.0 Scripts are no longer concatenated.
+ *
+ * @ignore
+ *
+ * @global WP_Scripts $wp_scripts
+ */
+function _print_scripts(): void {
+	global $wp_scripts;
+
+	_deprecated_function( __FUNCTION__, '7.2.0' );
+
+	if ( ! empty( $wp_scripts->print_html ) ) {
+		echo $wp_scripts->print_html;
+	}
+}
+
+/**
+ * Prints styles (internal use only).
+ *
+ * @ignore
+ * @since 3.3.0
+ * @deprecated 7.2.0 Styles are no longer concatenated.
+ */
+function _print_styles(): void {
+	_deprecated_function( __FUNCTION__, '7.2.0' );
+
+	$wp_styles = wp_styles();
+
+	if ( ! empty( $wp_styles->print_html ) ) {
+		echo $wp_styles->print_html;
+	}
+}
+
 /**
  * Starts an output buffer that sends the Document-Isolation-Policy header
  * and adds crossorigin="anonymous" to cross-origin resources.
diff --git a/wp-includes/global-styles-and-settings.php b/wp-includes/global-styles-and-settings.php
index efa1c08d07..77fa77e34a 100644
--- a/wp-includes/global-styles-and-settings.php
+++ b/wp-includes/global-styles-and-settings.php
@@ -387,18 +387,7 @@ function wp_theme_has_theme_json() {
 		return $theme_has_support[ $stylesheet ];
 	}

-	$stylesheet_directory = get_stylesheet_directory();
-	$template_directory   = get_template_directory();
-
-	// This is the same as get_theme_file_path(), which isn't available in load-styles.php context
-	if ( $stylesheet_directory !== $template_directory && file_exists( $stylesheet_directory . '/theme.json' ) ) {
-		$path = $stylesheet_directory . '/theme.json';
-	} else {
-		$path = $template_directory . '/theme.json';
-	}
-
-	/** This filter is documented in wp-includes/link-template.php */
-	$path = apply_filters( 'theme_file_path', $path, 'theme.json' );
+	$path = get_theme_file_path( 'theme.json' );

 	$theme_has_support[ $stylesheet ] = file_exists( $path );

diff --git a/wp-includes/script-loader.php b/wp-includes/script-loader.php
index 6bd1b22c6d..2c09f84bbc 100644
--- a/wp-includes/script-loader.php
+++ b/wp-includes/script-loader.php
@@ -2,11 +2,8 @@
 /**
  * WordPress scripts and styles default loader.
  *
- * These constants are used to manage the loading and concatenating of scripts and CSS:
- * define('SCRIPT_DEBUG', true); loads the development (non-minified) versions of all scripts and CSS, and disables concatenation,
- * define('CONCATENATE_SCRIPTS', true); enables concatenation of scripts and CSS in the admin and on the login screen (disabled by default).
- *
- * The global $concatenate_scripts can be set by plugins to temporarily override the above settings.
+ * This constant is used to manage the loading of scripts and CSS:
+ * define('SCRIPT_DEBUG', true); loads the development (non-minified) versions of all scripts and CSS.
  *
  * @package WordPress
  */
@@ -59,12 +56,6 @@ function wp_register_tinymce_scripts( $scripts, $deprecated = false ): void {
 	$suffix     = wp_scripts_get_suffix();
 	$dev_suffix = wp_scripts_get_suffix( 'dev' );

-	/*
-	 * This no longer depends on the concatenation settings, but it is where an admin screen has
-	 * settled them until now, which the 'wp_should_concatenate_admin_scripts' filter documents.
-	 */
-	script_concat_settings();
-
 	// Load tinymce.js when running from /src, otherwise tinymce.min.js.
 	$scripts->add( 'wp-tinymce-root', includes_url( 'js/tinymce/' ) . "tinymce$dev_suffix.js", array(), $tinymce_version );
 	$scripts->add( 'wp-tinymce', includes_url( 'js/tinymce/' ) . "plugins/compat3x/plugin$dev_suffix.js", array( 'wp-tinymce-root' ), $tinymce_version );
@@ -692,21 +683,7 @@ function wp_scripts_get_suffix( $type = '' ) {
 	static $suffixes;

 	if ( null === $suffixes ) {
-		/*
-		 * Include an unmodified $wp_version.
-		 *
-		 * Note: wp_get_wp_version() is not used here, as this file can be included
-		 * via wp-admin/load-scripts.php or wp-admin/load-styles.php, in which case
-		 * wp-includes/functions.php is not loaded.
-		 */
-		require ABSPATH . WPINC . '/version.php';
-
-		/*
-		 * Note: str_contains() is not used here, as this file can be included
-		 * via wp-admin/load-scripts.php or wp-admin/load-styles.php, in which case
-		 * the polyfills from wp-includes/compat.php are not loaded.
-		 */
-		$develop_src = false !== strpos( $wp_version, '-src' );
+		$develop_src = str_contains( wp_get_wp_version(), '-src' );

 		if ( ! defined( 'SCRIPT_DEBUG' ) ) {
 			define( 'SCRIPT_DEBUG', $develop_src );
@@ -751,7 +728,7 @@ function wp_default_scripts( $scripts ) {
 	$scripts->base_url        = $guessurl;
 	$scripts->content_url     = defined( 'WP_CONTENT_URL' ) ? WP_CONTENT_URL : '';
 	$scripts->default_version = get_bloginfo( 'version' );
-	$scripts->default_dirs    = array( '/wp-admin/js/', '/wp-includes/js/' );
+	$scripts->default_dirs    = array( '/wp-admin/js/', '/wp-includes/js/' ); // Deprecated, but still set for plugins that read it.

 	$scripts->add( 'utils', "/wp-includes/js/utils$suffix.js" );
 	did_action( 'init' ) && $scripts->localize(
@@ -1559,24 +1536,6 @@ function wp_default_scripts( $scripts ) {
 function wp_default_styles( $styles ) {
 	global $editor_styles;

-	/*
-	 * Include an unmodified $wp_version.
-	 *
-	 * Note: wp_get_wp_version() is not used here, as this file can be included
-	 * via wp-admin/load-scripts.php or wp-admin/load-styles.php, in which case
-	 * wp-includes/functions.php is not loaded.
-	 */
-	require ABSPATH . WPINC . '/version.php';
-
-	if ( ! defined( 'SCRIPT_DEBUG' ) ) {
-		/*
-		 * Note: str_contains() is not used here, as this file can be included
-		 * via wp-admin/load-scripts.php or wp-admin/load-styles.php, in which case
-		 * the polyfills from wp-includes/compat.php are not loaded.
-		 */
-		define( 'SCRIPT_DEBUG', false !== strpos( $wp_version, '-src' ) );
-	}
-
 	$guessurl = site_url();

 	if ( ! $guessurl ) {
@@ -1586,8 +1545,8 @@ function wp_default_styles( $styles ) {
 	$styles->base_url        = $guessurl;
 	$styles->content_url     = defined( 'WP_CONTENT_URL' ) ? WP_CONTENT_URL : '';
 	$styles->default_version = get_bloginfo( 'version' );
-	$styles->text_direction  = function_exists( 'is_rtl' ) && is_rtl() ? 'rtl' : 'ltr';
-	$styles->default_dirs    = array( '/wp-admin/', '/wp-includes/css/' );
+	$styles->text_direction  = is_rtl() ? 'rtl' : 'ltr';
+	$styles->default_dirs    = array( '/wp-admin/', '/wp-includes/css/' ); // Deprecated, but still set for plugins that read it.

 	// Open Sans is no longer used by core, but may be relied upon by themes and plugins.
 	$open_sans_font_url = '';
@@ -1620,7 +1579,7 @@ function wp_default_styles( $styles ) {
 	// Register a stylesheet for the selected admin color scheme.
 	$styles->add( 'colors', true, array( 'wp-admin', 'buttons' ) );

-	$suffix = SCRIPT_DEBUG ? '' : '.min';
+	$suffix = wp_scripts_get_suffix();

 	// Admin CSS.
 	$styles->add( 'wp-tooltip', "/wp-admin/css/wp-tooltip$suffix.css", array( 'dashicons' ) );
@@ -2157,34 +2116,26 @@ function wp_style_loader_src( $src, $handle ) {
  *
  * @see wp_print_scripts()
  *
- * @global bool $concatenate_scripts
- *
  * @return string[] Handles of the scripts that were printed.
  */
 function print_head_scripts() {
-	global $concatenate_scripts;
-
 	if ( ! did_action( 'wp_print_scripts' ) ) {
 		/** This action is documented in wp-includes/functions.wp-scripts.php */
 		do_action( 'wp_print_scripts' );
 	}

 	$wp_scripts = wp_scripts();
-
-	script_concat_settings();
-	$wp_scripts->do_concat = $concatenate_scripts;
 	$wp_scripts->do_head_items();

 	/**
 	 * Filters whether to print the head scripts.
 	 *
 	 * @since 2.8.0
+	 * @deprecated 7.2.0 Scripts are no longer concatenated, so there is nothing for this filter to control.
 	 *
 	 * @param bool $print Whether to print the head scripts. Default true.
 	 */
-	if ( apply_filters( 'print_head_scripts', true ) ) {
-		_print_scripts();
-	}
+	apply_filters_deprecated( 'print_head_scripts', array( true ), '7.2.0' );

 	$wp_scripts->reset();
 	return $wp_scripts->done;
@@ -2196,70 +2147,31 @@ function print_head_scripts() {
  * @since 2.8.0
  *
  * @global WP_Scripts $wp_scripts
- * @global bool       $concatenate_scripts
  *
  * @return string[] Handles of the scripts that were printed.
  */
 function print_footer_scripts() {
-	global $wp_scripts, $concatenate_scripts;
+	global $wp_scripts;

 	if ( ! ( $wp_scripts instanceof WP_Scripts ) ) {
 		return array(); // No need to run if not instantiated.
 	}
-	script_concat_settings();
-	$wp_scripts->do_concat = $concatenate_scripts;
 	$wp_scripts->do_footer_items();

 	/**
 	 * Filters whether to print the footer scripts.
 	 *
 	 * @since 2.8.0
+	 * @deprecated 7.2.0 Scripts are no longer concatenated, so there is nothing for this filter to control.
 	 *
 	 * @param bool $print Whether to print the footer scripts. Default true.
 	 */
-	if ( apply_filters( 'print_footer_scripts', true ) ) {
-		_print_scripts();
-	}
+	apply_filters_deprecated( 'print_footer_scripts', array( true ), '7.2.0' );

 	$wp_scripts->reset();
 	return $wp_scripts->done;
 }

-/**
- * Prints scripts (internal use only)
- *
- * @since 2.8.0
- *
- * @ignore
- *
- * @global WP_Scripts $wp_scripts
- */
-function _print_scripts() {
-	global $wp_scripts;
-
-	$concat = trim( $wp_scripts->concat, ', ' );
-
-	if ( $concat ) {
-		if ( ! empty( $wp_scripts->print_code ) ) {
-			wp_print_inline_script_tag( $wp_scripts->print_code . "\n//# sourceURL=" . rawurlencode( 'js-inline-concat-' . $concat ) );
-		}
-
-		$concat       = str_split( $concat, 128 );
-		$concatenated = '';
-
-		foreach ( $concat as $key => $chunk ) {
-			$concatenated .= "&load%5Bchunk_{$key}%5D={$chunk}";
-		}
-
-		$src = $wp_scripts->base_url . '/wp-admin/load-scripts.php?' . ltrim( $concatenated, '&' ) . '&ver=' . $wp_scripts->default_version;
-		wp_print_script_tag( array( 'src' => $src ) );
-	}
-
-	if ( ! empty( $wp_scripts->print_html ) ) {
-		echo $wp_scripts->print_html;
-	}
-}
-
 /**
  * Prints the script queue in the HTML head on the front end.
  *
@@ -2342,29 +2254,21 @@ function wp_enqueue_scripts() {
  *
  * @since 2.8.0
  *
- * @global bool $concatenate_scripts
- *
  * @return string[] Handles of the styles that were printed.
  */
 function print_admin_styles() {
-	global $concatenate_scripts;
-
 	$wp_styles = wp_styles();
-
-	script_concat_settings();
-	$wp_styles->do_concat = $concatenate_scripts;
 	$wp_styles->do_items( false );

 	/**
 	 * Filters whether to print the admin styles.
 	 *
 	 * @since 2.8.0
+	 * @deprecated 7.2.0 Styles are no longer concatenated, so there is nothing for this filter to control.
 	 *
 	 * @param bool $print Whether to print the admin styles. Default true.
 	 */
-	if ( apply_filters( 'print_admin_styles', true ) ) {
-		_print_styles();
-	}
+	apply_filters_deprecated( 'print_admin_styles', array( true ), '7.2.0' );

 	$wp_styles->reset();
 	return $wp_styles->done;
@@ -2376,158 +2280,43 @@ function print_admin_styles() {
  * @since 3.3.0
  *
  * @global WP_Styles $wp_styles
- * @global bool      $concatenate_scripts
  *
  * @return string[]|null
  */
 function print_late_styles() {
-	global $wp_styles, $concatenate_scripts;
+	global $wp_styles;

 	if ( ! ( $wp_styles instanceof WP_Styles ) ) {
 		return null;
 	}

-	script_concat_settings();
-	$wp_styles->do_concat = $concatenate_scripts;
 	$wp_styles->do_footer_items();

 	/**
 	 * Filters whether to print the styles queued too late for the HTML head.
 	 *
 	 * @since 3.3.0
+	 * @deprecated 7.2.0 Styles are no longer concatenated, so there is nothing for this filter to control.
 	 *
 	 * @param bool $print Whether to print the 'late' styles. Default true.
 	 */
-	if ( apply_filters( 'print_late_styles', true ) ) {
-		_print_styles();
-	}
+	apply_filters_deprecated( 'print_late_styles', array( true ), '7.2.0' );

 	$wp_styles->reset();
 	return $wp_styles->done;
 }

-/**
- * Prints styles (internal use only).
- *
- * @ignore
- * @since 3.3.0
- */
-function _print_styles() {
-	$wp_styles = wp_styles();
-
-	$concat = trim( $wp_styles->concat, ', ' );
-
-	if ( $concat ) {
-		$dir = $wp_styles->text_direction;
-		$ver = $wp_styles->default_version;
-
-		$concat_source_url = 'css-inline-concat-' . $concat;
-		$concat            = str_split( $concat, 128 );
-		$concatenated      = '';
-
-		foreach ( $concat as $key => $chunk ) {
-			$concatenated .= "&load%5Bchunk_{$key}%5D={$chunk}";
-		}
-
-		$href = $wp_styles->base_url . "/wp-admin/load-styles.php?dir={$dir}" . $concatenated . '&ver=' . $ver;
-		echo "<link rel='stylesheet' href='" . esc_attr( $href ) . "' media='all' />\n";
-
-		if ( ! empty( $wp_styles->print_code ) ) {
-			$processor = new WP_HTML_Tag_Processor( '<style></style>' );
-			$processor->next_tag();
-			$style_tag_contents = "\n{$wp_styles->print_code}\n"
-				. sprintf( "/*# sourceURL=%s */\n", rawurlencode( $concat_source_url ) );
-			$processor->set_modifiable_text( $style_tag_contents );
-			echo "{$processor->get_updated_html()}\n";
-		}
-	}
-
-	if ( ! empty( $wp_styles->print_html ) ) {
-		echo $wp_styles->print_html;
-	}
-}
-
-/**
- * Determines the concatenation settings for scripts and styles.
- *
- * @since 2.8.0
- * @since 7.2.0 The `$compress_scripts` and `$compress_css` globals default to false, as PHP compression
- *              of scripts and styles was removed in 4.9.9.
- *
- * @global bool $concatenate_scripts
- * @global bool $compress_scripts
- * @global bool $compress_css
- */
-function script_concat_settings() {
-	global $concatenate_scripts, $compress_scripts, $compress_css;
-
-	if ( ! isset( $concatenate_scripts ) ) {
-		$concatenate_scripts = ( is_admin() || did_action( 'login_init' ) ) && wp_should_concatenate_admin_scripts();
-	}
-
-	if ( ! isset( $compress_scripts ) ) {
-		$compress_scripts = false;
-	}
-
-	if ( ! isset( $compress_css ) ) {
-		$compress_css = false;
-	}
-}
-
-/**
- * Determines whether scripts and styles are concatenated on admin screens and the login screen.
- *
- * Concatenation is off unless the `CONCATENATE_SCRIPTS` constant turns it on, and `SCRIPT_DEBUG`
- * turns it off regardless. Scripts and styles are never concatenated elsewhere.
- *
- * This is the default that script_concat_settings() gives the `$concatenate_scripts` global when
- * the global has not already been set. It is also how wp_prefetch_admin_assets() predicts, from the
- * login screen, what the admin screen the login leads to will do.
- *
- * This function and its filter are intended to be removed before 7.2-beta1. They exist only while
- * concatenation is still an option, and once concatenation is retired, there is nothing left for
- * them to decide. Do not rely on them; setting the `$concatenate_scripts` global remains the way
- * to override concatenation on a request.
- *
- * @since 7.2.0
- *
- * @return bool Whether scripts and styles are concatenated on admin screens and the login screen.
- */
-function wp_should_concatenate_admin_scripts(): bool {
-	$concatenate = ( defined( 'CONCATENATE_SCRIPTS' ) ? (bool) CONCATENATE_SCRIPTS : false )
-		&& ! ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG );
-
-	/**
-	 * Filters whether scripts and styles are concatenated on admin screens and the login screen.
-	 *
-	 * Setting the `$concatenate_scripts` global directly still takes precedence over this filter on
-	 * the request where it is set.
-	 *
-	 * An admin screen settles the global the first time scripts are registered, when the
-	 * {@see 'wp_default_scripts'} action registers TinyMCE. That can be as early as while plugins
-	 * load, before the theme's functions.php, whereas the login screen reads this filter only when
-	 * it prints, to predict what the admin will do. So add a callback when a plugin loads, rather
-	 * than from a theme or on a later hook, or the admin may not see it while the login screen does.
-	 *
-	 * @since 7.2.0
-	 *
-	 * @param bool $concatenate Whether scripts and styles are concatenated. Default false, unless the
-	 *                          `CONCATENATE_SCRIPTS` constant is true and `SCRIPT_DEBUG` is not.
-	 */
-	return (bool) apply_filters( 'wp_should_concatenate_admin_scripts', $concatenate );
-}
-
 /**
  * Prints prefetch links for the assets of the screen the user is most likely to open next.
  *
  * Runs wherever the next screen can be predicted with confidence, and prefetches only what that
  * screen is certain to need. Two cases qualify today:
  *
- * - The login screen, which is followed by an admin screen. With concatenation disabled that
- *   screen downloads each core script and stylesheet separately, which is what makes an uncached
- *   admin load slower than a concatenated one. Requesting the ones that block its first paint
- *   while the login form is on screen puts them in the HTTP cache during the time the user spends
- *   typing credentials, so the redirect that follows finds them already there.
+ * - The login screen, which is followed by an admin screen. That screen downloads each core script
+ *   and stylesheet separately, which is what makes an uncached admin load slow. Requesting the
+ *   ones that block its first paint while the login form is on screen puts them in the HTTP cache
+ *   during the time the user spends typing credentials, so the redirect that follows finds them
+ *   already there.
  * - The Dashboard and the post list tables, from which the editor is the usual next stop. Only the
  *   editor's stylesheets are prefetched, not its scripts: the scripts run to well over a megabyte
  *   compressed, which is far too much to spend on a screen the user may never open, whereas the
@@ -2559,42 +2348,25 @@ function wp_should_concatenate_admin_scripts(): bool {
  * page, such as the password reset form, since those mostly lead to the admin as well. Nothing is
  * printed at all when `redirect_to` points outside this site's admin.
  *
- * Nothing is printed when the next screen will concatenate its assets, since `load-scripts.php`
- * and `load-styles.php` already collapse these handles into a handful of requests.
- *
  * @since 7.2.0
  *
  * @see wp_preload_resources()
- * @see wp_should_concatenate_admin_scripts()
  *
- * @global bool           $concatenate_scripts Whether scripts and styles are concatenated.
- * @global WP_Screen|null $current_screen      The current admin screen, if any.
+ * @global WP_Screen|null $current_screen The current admin screen, if any.
  */
 function wp_prefetch_admin_assets(): void {
-	global $concatenate_scripts, $current_screen;
+	global $current_screen;

 	/*
 	 * The context is told apart by the request rather than by the hook this runs on, so it works
 	 * from whichever hook it is added to. The 'login_init' action is fired by wp-login.php however
-	 * it is reached, which is also how script_concat_settings() recognizes it. The is_login()
-	 * function would not do: it compares the login URL with the script handling the request, and a
-	 * plugin serving the login screen at a URL of its own runs wp-login.php from another script,
-	 * such as index.php.
+	 * it is reached. The is_login() function would not do: it compares the login URL with the
+	 * script handling the request, and a plugin serving the login screen at a URL of its own runs
+	 * wp-login.php from another script, such as index.php.
 	 */
 	$on_login = (bool) did_action( 'login_init' );

-	if ( $on_login ) {
-		/*
-		 * Deliberately not the $concatenate_scripts global: script_concat_settings() often runs on a
-		 * login request before 'login_init' fires — anything registering a script on 'init' is enough
-		 * to trigger it — and at that point it evaluates is_admin() as false and settles the global on
-		 * false whatever the constant says. What matters here is what the admin screen this login
-		 * leads to will do, which is what wp_should_concatenate_admin_scripts() predicts.
-		 */
-		if ( wp_should_concatenate_admin_scripts() ) {
-			return;
-		}
-	} else {
+	if ( ! $on_login ) {
 		/*
 		 * From the Dashboard and the post list tables, the editor is the usual next stop. Anywhere
 		 * else in the admin there is no destination worth guessing at.
@@ -2606,16 +2378,6 @@ function wp_prefetch_admin_assets(): void {
 		if ( ! $current_screen instanceof WP_Screen || ! in_array( $current_screen->base, array( 'dashboard', 'edit' ), true ) ) {
 			return;
 		}
-
-		/*
-		 * On an admin screen the global has settled by the time its head is printed, and the editor
-		 * will be served the same way.
-		 */
-		script_concat_settings();
-
-		if ( $concatenate_scripts ) {
-			return;
-		}
 	}

 	$script_roots = array();
diff --git a/wp-includes/version.php b/wp-includes/version.php
index 4f5813bd55..0741962c27 100644
--- a/wp-includes/version.php
+++ b/wp-includes/version.php
@@ -16,7 +16,7 @@
  *
  * @global string $wp_version
  */
-$wp_version = '7.2-alpha-64584';
+$wp_version = '7.2-alpha-64585';

 /**
  * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.