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:18 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-09-19 04:51:18 +0000
commit0e41b5d52fdc6af6442816b5f465c9db9f84e126 (patch)
treee139a90049b158d4eed892d1662ee7f5c358fa31 /wp-includes/class-wp-script-modules.php
parentAdding upstream version 6.5.5+dfsg1. (diff)
downloadwordpress-0e41b5d52fdc6af6442816b5f465c9db9f84e126.tar.xz
wordpress-0e41b5d52fdc6af6442816b5f465c9db9f84e126.zip
Adding upstream version 6.6.1+dfsg1.upstream/6.6.1+dfsg1upstream
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 );