WordPress at a glance
function is not described

WP_Dependencies::query() public WP 2.1.0

Query list for an item.

{} It's a method of the class: WP_Dependencies{}

No Hooks.

Return

true|false|_WP_Dependency. Found, or object Item data.

Usage

$WP_Dependencies = new WP_Dependencies();
$WP_Dependencies->query( $handle, $list );
$handle(string) (required)
Name of the item. Should be unique.
$list(string)
Property name of list array.
Default: 'registered'

Changelog

Since 2.1.0 Introduced.
Since 2.6.0 Moved from WP_Scripts.

Code of WP_Dependencies::query() WP 5.7

<?php
public function query( $handle, $list = 'registered' ) {
	switch ( $list ) {
		case 'registered':
		case 'scripts': // Back compat.
			if ( isset( $this->registered[ $handle ] ) ) {
				return $this->registered[ $handle ];
			}
			return false;

		case 'enqueued':
		case 'queue':
			if ( in_array( $handle, $this->queue, true ) ) {
				return true;
			}
			return $this->recurse_deps( $this->queue, $handle );

		case 'to_do':
		case 'to_print': // Back compat.
			return in_array( $handle, $this->to_do, true );

		case 'done':
		case 'printed': // Back compat.
			return in_array( $handle, $this->done, true );
	}
	return false;
}