Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Add Script Module hooks registration on admin_footer
  • Loading branch information
sirreal committed Apr 26, 2024
commit 1c40732aafd8773d19bc9469a12ae33bb1355914
4 changes: 4 additions & 0 deletions src/wp-includes/class-wp-script-modules.php
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,10 @@ public function add_hooks() {
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_footer', array( $this, 'print_import_map' ) );
add_action( 'admin_footer', array( $this, 'print_enqueued_script_modules' ) );
add_action( 'admin_footer', array( $this, 'print_script_module_preloads' ) );
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just like in #6453, we can use admin_print_footer_scripts which is a bit later and probably more appropriate.

}

/**
Expand Down