WP_Dependencies::recurse_deps( string[] $queue, string $handle )

Recursively search the passed dependency tree for $handle


Description Description


Parameters Parameters

$queue

(string[]) (Required) An array of queued _WP_Dependency handles.

$handle

(string) (Required) Name of the item. Should be unique.


Top ↑

Return Return

(bool) Whether the handle is found after recursively searching the dependency tree.


Top ↑

Source Source

File: wp-includes/class.wp-dependencies.php

	protected function recurse_deps( $queue, $handle ) {
		foreach ( $queue as $queued ) {
			if ( ! isset( $this->registered[ $queued ] ) ) {
				continue;
			}

			if ( in_array( $handle, $this->registered[ $queued ]->deps ) ) {
				return true;
			} elseif ( $this->recurse_deps( $this->registered[ $queued ]->deps, $handle ) ) {
				return true;
			}
		}

		return false;
	}

Top ↑

Changelog Changelog

Changelog
Version Description
4.0.0 Introduced.


Top ↑

User Contributed Notes User Contributed Notes

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