summaryrefslogtreecommitdiffstats
path: root/wp-includes/class-wp-script-modules.php
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-09-19 04:51:22 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-09-19 04:51:22 +0000
commitfc0a79914946dac00ccd51b1aacffe267de7210e (patch)
tree1403384efbfe8f8776ff60aaa40f7d535c02c822 /wp-includes/class-wp-script-modules.php
parentReleasing progress-linux version 6.5.5+dfsg1-1~progress7.99u1. (diff)
downloadwordpress-fc0a79914946dac00ccd51b1aacffe267de7210e.tar.xz
wordpress-fc0a79914946dac00ccd51b1aacffe267de7210e.zip
Merging upstream version 6.6.1+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'wp-includes/class-wp-script-modules.php')
-rw-r--r--wp-includes/class-wp-script-modules.php15
1 files changed, 9 insertions, 6 deletions
diff --git a/wp-includes/class-wp-script-modules.php b/wp-includes/class-wp-script-modules.php
index 89d12a6..b7e843e 100644
--- a/wp-includes/class-wp-script-modules.php
+++ b/wp-includes/class-wp-script-modules.php
@@ -18,7 +18,7 @@ class WP_Script_Modules {
* Holds the registered script modules, keyed by script module identifier.
*
* @since 6.5.0
- * @var array
+ * @var array[]
*/
private $registered = array();
@@ -178,6 +178,10 @@ class WP_Script_Modules {
add_action( $position, array( $this, 'print_import_map' ) );
add_action( $position, array( $this, 'print_enqueued_script_modules' ) );
add_action( $position, array( $this, 'print_script_module_preloads' ) );
+
+ add_action( 'admin_print_footer_scripts', array( $this, 'print_import_map' ) );
+ add_action( 'admin_print_footer_scripts', array( $this, 'print_enqueued_script_modules' ) );
+ add_action( 'admin_print_footer_scripts', array( $this, 'print_script_module_preloads' ) );
}
/**
@@ -274,7 +278,7 @@ class WP_Script_Modules {
*
* @since 6.5.0
*
- * @return array Script modules marked for enqueue, keyed by script module identifier.
+ * @return array[] Script modules marked for enqueue, keyed by script module identifier.
*/
private function get_marked_for_enqueue(): array {
$enqueued = array();
@@ -296,11 +300,10 @@ class WP_Script_Modules {
*
* @since 6.5.0
*
-
* @param string[] $ids The identifiers of the script modules for which to gather dependencies.
- * @param array $import_types Optional. Import types of dependencies to retrieve: 'static', 'dynamic', or both.
+ * @param string[] $import_types Optional. Import types of dependencies to retrieve: 'static', 'dynamic', or both.
* Default is both.
- * @return array List of dependencies, keyed by script module identifier.
+ * @return array[] List of dependencies, keyed by script module identifier.
*/
private function get_dependencies( array $ids, array $import_types = array( 'static', 'dynamic' ) ) {
return array_reduce(
@@ -353,7 +356,7 @@ class WP_Script_Modules {
*
* @since 6.5.0
*
- * @param string $src Module source url.
+ * @param string $src Module source URL.
* @param string $id Module identifier.
*/
$src = apply_filters( 'script_module_loader_src', $src, $id );