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.



git-svn-id: https://develop.svn.wordpress.org/trunk@53366 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Peter Wilson 2022-05-08 23:57:19 +00:00
parent 91fe405d61
commit d8ef0cd52e

View File

@ -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 );