Used By
Used By | Description |
---|---|
wp-includes/class.wp-dependencies.php: WP_Dependencies::query() | Query list for an item. |
Recursively search the passed dependency tree for $handle.
(string[]) (Required) An array of queued _WP_Dependency handles.
(string) (Required) Name of the item. Should be unique.
(bool) Whether the handle is found after recursively searching the dependency tree.
File: wp-includes/class.wp-dependencies.php
protected function recurse_deps( $queue, $handle ) { if ( isset( $this->all_queued_deps ) ) { return isset( $this->all_queued_deps[ $handle ] ); } $all_deps = array_fill_keys( $queue, true ); $queues = array(); $done = array(); while ( $queue ) { foreach ( $queue as $queued ) { if ( ! isset( $done[ $queued ] ) && isset( $this->registered[ $queued ] ) ) { $deps = $this->registered[ $queued ]->deps; if ( $deps ) { $all_deps += array_fill_keys( $deps, true ); array_push( $queues, $deps ); } $done[ $queued ] = true; } } $queue = array_pop( $queues ); } $this->all_queued_deps = $all_deps; return isset( $this->all_queued_deps[ $handle ] ); }
Version | Description |
---|---|
4.0.0 | Introduced. |
© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/wp_dependencies/recurse_deps