wp_script_is() – Function | Developer.WordPress.org

Determines whether a script has been added to the queue.

Description

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

Parameters

$handlestringrequired

Name of the script.

$statusstringoptional

Status of the script to check. Default 'enqueued'.
Accepts 'enqueued', 'registered', 'queue', 'to_do', and 'done'.

Return

bool Whether the script is queued.

Source

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

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

View all references View on Trac View on GitHub

Changelog

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