wp_dequeue_script() WordPress Function
The wp_dequeue_script() function allows you to remove a registered script from the queue. This can be useful if you want to dequeue a script that is not needed on the current page.
wp_dequeue_script( string $handle ) #
Remove a previously enqueued script.
Description
See also
Parameters
- $handle
(string)(Required)Name of the script to be removed.
Source
File: wp-includes/functions.wp-scripts.php
function wp_dequeue_script( $handle ) { _wp_scripts_maybe_doing_it_wrong( __FUNCTION__, $handle ); wp_scripts()->dequeue( $handle ); }
Expand full source codeCollapse full source codeView on TracView on GitHub
Changelog
Version | Description |
---|---|
3.1.0 | Introduced. |