W3cubDocs

/WordPress

WP_Script_Modules::dequeue( string $id )

Unmarks the script module so it will no longer be enqueued in the page.

Parameters

$idstringrequired
The identifier of the script module.

Source

public function dequeue( string $id ) {
	if ( isset( $this->registered[ $id ] ) ) {
		$this->registered[ $id ]['enqueue'] = false;
	}
	unset( $this->enqueued_before_registered[ $id ] );
}

Changelog

Version Description
6.5.0 Introduced.

© 2003–2024 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/wp_script_modules/dequeue