Languages: English • 日本語 (Add your language)
Remove an enqueued script.
To be dequeued, the script must have been enqueued. Attempting to dequeue a script before the script is enqueued will have no effect.
<?php wp_dequeue_script( $handle ); ?>
Dequeue a script.
/**
* Dequeue the jQuery UI script.
*
* Hooked to the wp_print_scripts action, with a late priority (100),
* so that it is after the script was enqueued.
*/
function wpdocs_dequeue_script() {
wp_dequeue_script( 'jquery-ui-core' );
}
add_action( 'wp_print_scripts', 'wpdocs_dequeue_script', 100 );
Since: 3.1
wp_dequeue_script() is located in wp-includes/functions.wp-scripts.php
Enqueue Styles
Enqueue Scripts
Front-End Hooks
Admin Hooks
Login Hooks