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
Sync with core PR
  • Loading branch information
cbravobernal committed Feb 15, 2024
commit 1d71612cec431f7d62c2da49a20dbd2a743a131e
6 changes: 2 additions & 4 deletions lib/compat/wordpress-6.5/class-wp-script-modules.php
Original file line number Diff line number Diff line change
Expand Up @@ -153,16 +153,14 @@ public function dequeue( string $id ) {
}

/**
* Deregister the script module so it will no longer be registered.
* Removes a registered script module.
*
* @since 6.5.0
*
* @param string $id The identifier of the script module.
*/
public function deregister( string $id ) {
if ( isset( $this->registered[ $id ] ) ) {
unset( $this->registered[ $id ] );
}
unset( $this->registered[ $id ] );
unset( $this->enqueued_before_registered[ $id ] );
}

Expand Down
2 changes: 1 addition & 1 deletion lib/compat/wordpress-6.5/scripts-modules.php
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ function wp_dequeue_script_module( string $id ) {

if ( ! function_exists( 'wp_deregister_script_module' ) ) {
/**
* Unregisters the script module.
* Deregisters the script module.
*
* @since 6.5.0
*
Expand Down