WordPress at Your Fingertips

wp_script_is() WP 1.0

Check whether a script has been added to the queue.

For more information on this and similar theme functions, check out the Conditional Tags article in the Theme Developer Handbook.

1 time — 0.000026 sec (very fast) | 50000 times — 0.09 sec (speed of light) | PHP 7.0.5, WP 4.5.2

No Hooks.


true|false. Whether the script is queued.


wp_script_is( $handle, $list );
$handle(string) (required)
Name of the script.
Status of the script to check. Accepts 'enqueued', 'registered', 'queue', 'to_do', and 'done'.
Default: 'enqueued'


Since 2.8.0 Introduced.
Since 3.5.0 'enqueued' added as an alias of the 'queue' list.

Code of wp_script_is() WP 5.8.1

function wp_script_is( $handle, $list = 'enqueued' ) {
	_wp_scripts_maybe_doing_it_wrong( __FUNCTION__, $handle );

	return (bool) wp_scripts()->query( $handle, $list );


Conditional tags (all)

Scripts and Styles

No comments
    Log In