* @param string $src Script url
* @param array $deps (optional) Array of script names on which this script depends
* @param string|bool $ver (optional) Script version (used for cache busting), set to NULL to disable
- * @param bool (optional) Wether to enqueue the script before </head> or before </body>
+ * @param bool $in_footer (optional) Whether to enqueue the script before </head> or before </body>
* @return null
*/
function wp_register_script( $handle, $src, $deps = array(), $ver = false, $in_footer = false ) {
$wp_scripts->enqueue( $handle );
}
+/**
+ * Remove an enqueued script.
+ *
+ * @since WP 3.1
+ * @see WP_Scripts::dequeue() For parameter information.
+ */
+function wp_dequeue_script( $handle ) {
+ global $wp_scripts;
+ if ( !is_a($wp_scripts, 'WP_Scripts') )
+ $wp_scripts = new WP_Scripts();
+
+ $wp_scripts->dequeue( $handle );
+}
+
/**
* Check whether script has been added to WordPress Scripts.
*