Skip to content

Commit

Permalink
Sync with core PR
Browse files Browse the repository at this point in the history
  • Loading branch information
cbravobernal committed Feb 8, 2024
1 parent da60a8a commit 5c1a8f5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
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 @@ -121,7 +121,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

0 comments on commit 5c1a8f5

Please sign in to comment.