diff options
Diffstat (limited to 'wp-includes/class-wp-script-modules.php')
-rw-r--r-- | wp-includes/class-wp-script-modules.php | 15 |
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 ); |