Test to see if jQuery or Prototype is queued by another plugin?

Use wp_script_is() to check if a script is in the queue.

function add_my_scripts() {
    $doing_jquery = wp_script_is('jquery', 'queue');
    $doing_prototype = wp_script_is('prototype', 'queue');

    var_dump($doing_jquery, $doing_prototype);
}
add_action('wp_print_scripts', 'add_my_scripts');

Leave a Comment