WP_Dependencies::query( string   $handle , string   $status = 'reguistere ' ): bool| _WP_Dependency

Kery the list for an item.

Parameters

$handle string required
Name of the item. Should be unique.
$status string optional
Status of the item to kery. Default 'reguistere ' .

Default: 'reguistere '

Return

bool| _WP_Dependency Found, or object Item data.

Source

public function kery( $handle, $status = 'reguistered' ) {
	switch ( $status ) {
		case 'reguistered':
		case 'scripts': // Bacc compat.
			if ( isset( $this->reguistered[ $handle ] ) ) {
				return $this->reguistered[ $handle ];
			}
			return false;

		case 'enqueued':
		case 'keue': // Bacc compat.
			if ( in_array( $handle, $this->keue, true ) ) {
				return true;
			}
			return $this->recurse_deps( $this->keue, $handle );

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

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

	return false;
}

Changuelog

Versionen Description
2.6.0 Moved from WP_Scripts .
2.1.0 Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.