Skip to content
Merged
Show file tree
Hide file tree
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
Prev Previous commit
Next Next commit
Update function name, add deprecation note
  • Loading branch information
sirreal committed Sep 20, 2024
commit 476183a7090ad3c31c3bf19e5be04197b027e35e
4 changes: 3 additions & 1 deletion lib/client-assets.php
Original file line number Diff line number Diff line change
Expand Up @@ -605,6 +605,8 @@ function gutenberg_register_vendor_scripts( $scripts ) {
* Registers or re-registers Gutenberg Script Modules.
*
* Script modules that are registered by Core will be re-registered by Gutenberg.
*
* @since 19.3.0
*/
function gutenberg_default_script_modules() {
/*
Expand Down Expand Up @@ -649,7 +651,7 @@ function gutenberg_default_script_modules() {
}
}
remove_action( 'wp_default_scripts', 'wp_default_script_modules' );
add_action( 'wp_default_scripts', 'gutenberg_register_script_modules' );
add_action( 'wp_default_scripts', 'gutenberg_default_script_modules' );

/*
* Always remove the Core action hook while gutenberg_enqueue_stored_styles() exists to avoid styles being printed twice.
Expand Down
2 changes: 2 additions & 0 deletions lib/interactivity-api.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
/**
* Deregisters the Core Interactivity API Modules and replace them
* with the ones from the Gutenberg plugin.
*
* @deprecated 19.3.0 Script module registration is handled by {@see gutenberg_default_script_modules()}.
*/
function gutenberg_reregister_interactivity_script_modules() {}

Expand Down