From 70e7eec1751a6aca14b4853c10e0d961e2baddf1 Mon Sep 17 00:00:00 2001 From: Peter Wilson Date: Sun, 8 May 2022 23:59:11 +0000 Subject: [PATCH] Script Loader: Explain why i18n prevents concatenation. Add inline comment to `WP_Scripts::do_item()` explaining why the definition of a text domain prevents concatenation. Follow up to [53360]. Fixes #55628. Props SergeyBiryukov. Built from https://develop.svn.wordpress.org/trunk@53366 git-svn-id: http://core.svn.wordpress.org/trunk@52955 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/class.wp-scripts.php | 4 ++++ wp-includes/version.php | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/wp-includes/class.wp-scripts.php b/wp-includes/class.wp-scripts.php index 246d1fe6a2..649f086d60 100644 --- a/wp-includes/class.wp-scripts.php +++ b/wp-includes/class.wp-scripts.php @@ -311,6 +311,10 @@ 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 ); diff --git a/wp-includes/version.php b/wp-includes/version.php index 5e7a201144..dac5b8a708 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.1-alpha-53365'; +$wp_version = '6.1-alpha-53366'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.