A WordPress-centric search engine for devs and theme authors



wp_script_is ›

Since2.8.0
Deprecatedn/a
wp_script_is ( $handle, $list = 'enqueued' )
Parameters: (2)
  • (string) $handle Name of the script.
    Required: Yes
  • (string) $list Optional. Status of the script to check. Default 'enqueued'. Accepts 'enqueued', 'registered', 'queue', 'to_do', and 'done'.
    Required: No
    Default: 'enqueued'
Returns:
  • (bool) Whether the script is queued.
Defined at:
Codex:
Change Log:
  • 3.5.0

Check whether a script has been added to the queue.



Source

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

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