+
+/**
+ * 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' ) ) {
+ if ( ! did_action( 'init' ) )
+ _doing_it_wrong( __FUNCTION__, sprintf( __( 'Scripts and styles should not be registered or enqueued until the %1$s, %2$s, or %3$s hooks.' ),
+ '<code>wp_enqueue_scripts</code>', '<code>admin_enqueue_scripts</code>', '<code>login_enqueue_scripts</code>' ), '3.3' );
+ $wp_scripts = new WP_Scripts();
+ }
+
+ $wp_scripts->dequeue( $handle );
+}
+
+/**
+ * Check whether script has been added to WordPress Scripts.
+ *
+ * By default, checks if the script has been enqueued. You can also
+ * pass 'registered' to $list, to see if the script is registered,
+ * and you can check processing statuses with 'to_do' and 'done'.
+ *
+ * @since WP unknown; BP unknown
+ *
+ * @param string $handle Name of the script.
+ * @param string $list Optional. Defaults to 'enqueued'. Values are
+ * 'registered', 'enqueued' (or 'queue'), 'to_do', and 'done'.
+ * @return bool Whether script is in the list.
+ */
+function wp_script_is( $handle, $list = 'enqueued' ) {
+ global $wp_scripts;
+ if ( ! is_a( $wp_scripts, 'WP_Scripts' ) ) {
+ if ( ! did_action( 'init' ) )
+ _doing_it_wrong( __FUNCTION__, sprintf( __( 'Scripts and styles should not be registered or enqueued until the %1$s, %2$s, or %3$s hooks.' ),
+ '<code>wp_enqueue_scripts</code>', '<code>admin_enqueue_scripts</code>', '<code>login_enqueue_scripts</code>' ), '3.3' );
+ $wp_scripts = new WP_Scripts();
+ }
+
+ return (bool) $wp_scripts->query( $handle, $list );
+}