WP_Dependencies::recurse_deps( array $queue, string $handle )
Recursively search the passed dependency tree for $handle
Parameters
- $queue
-
(Required) An array of queued _WP_Dependency handle objects.
- $handle
-
(Required) Name of the item. Should be unique.
Return
(bool) Whether the handle is found after recursively searching the dependency tree.
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;
}
Changelog
Version | Description |
---|---|
WP-4.0.0 | Introduced. |