mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-03-31 18:54:29 +00:00
Script Modules API: Add deregister module function
It was impossible to deregister a script module. It is changing to avoid problems for extenders that want to override any Core script module. Fixes #60463. Props cbravobernal, gziolo, mukesh27, youknowriad. git-svn-id: https://develop.svn.wordpress.org/trunk@57593 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -112,3 +112,14 @@ function wp_enqueue_script_module( string $id, string $src = '', array $deps = a
|
||||
function wp_dequeue_script_module( string $id ) {
|
||||
wp_script_modules()->dequeue( $id );
|
||||
}
|
||||
|
||||
/**
|
||||
* Deregisters the script module.
|
||||
*
|
||||
* @since 6.5.0
|
||||
*
|
||||
* @param string $id The identifier of the script module.
|
||||
*/
|
||||
function wp_deregister_script_module( string $id ) {
|
||||
wp_script_modules()->deregister( $id );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user