Determines 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.
$handlestringrequired
$statusstringoptional
'enqueued'.'enqueued', 'registered', 'queue', 'to_do', and 'done'.Default:'enqueued'
function wp_script_is( $handle, $status = 'enqueued' ) {
_wp_scripts_maybe_doing_it_wrong( __FUNCTION__, $handle );
return (bool) wp_scripts()->query( $handle, $status );
}
© 2003–2024 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/wp_script_is