Skip to content

Commit

Permalink
Update function name, add deprecation note
Browse files Browse the repository at this point in the history
  • Loading branch information
sirreal committed Sep 19, 2024
1 parent 62c105e commit 079cf23
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
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

0 comments on commit 079cf23

Please sign in to comment.