diff --git a/lib/compat/wordpress-6.5/class-wp-script-modules.php b/lib/compat/wordpress-6.5/class-wp-script-modules.php index 205b50cd532596..4d3280f1db0b97 100644 --- a/lib/compat/wordpress-6.5/class-wp-script-modules.php +++ b/lib/compat/wordpress-6.5/class-wp-script-modules.php @@ -152,6 +152,18 @@ public function dequeue( string $id ) { unset( $this->enqueued_before_registered[ $id ] ); } + /** + * Removes a registered script module. + * + * @since 6.5.0 + * + * @param string $id The identifier of the script module. + */ + public function deregister( string $id ) { + unset( $this->registered[ $id ] ); + unset( $this->enqueued_before_registered[ $id ] ); + } + /** * Adds the hooks to print the import map, enqueued script modules and script * module preloads. diff --git a/lib/compat/wordpress-6.5/scripts-modules.php b/lib/compat/wordpress-6.5/scripts-modules.php index 8fd8978d9e8f5d..c4a1690b6986f0 100644 --- a/lib/compat/wordpress-6.5/scripts-modules.php +++ b/lib/compat/wordpress-6.5/scripts-modules.php @@ -207,3 +207,16 @@ function wp_dequeue_script_module( string $id ) { wp_script_modules()->dequeue( $id ); } } + +if ( ! function_exists( 'wp_deregister_script_module' ) ) { + /** + * 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 ); + } +} diff --git a/lib/experimental/interactivity-api.php b/lib/experimental/interactivity-api.php deleted file mode 100644 index 5d0f694dca3692..00000000000000 --- a/lib/experimental/interactivity-api.php +++ /dev/null @@ -1,22 +0,0 @@ -