Uses
Uses | Description |
---|---|
wp-includes/class.wp-dependencies.php: WP_Dependencies::all_deps() | Determines dependencies. |
wp-includes/class.wp-dependencies.php: WP_Dependencies::do_item() | Processes a dependency. |
Processes the items and dependencies.
Processes the items passed to it or the queue, and their dependencies.
(string|string[]|false) (Optional) Items to be processed: queue (false), single item (string), or multiple items (array of strings).
Default value: false
(int|false) (Optional) Group level: level (int), no groups (false).
Default value: false
(string[]) Array of handles of items that have been processed.
File: wp-includes/class.wp-dependencies.php
public function do_items( $handles = false, $group = false ) { /* * If nothing is passed, print the queue. If a string is passed, * print that item. If an array is passed, print those items. */ $handles = false === $handles ? $this->queue : (array) $handles; $this->all_deps( $handles ); foreach ( $this->to_do as $key => $handle ) { if ( ! in_array( $handle, $this->done, true ) && isset( $this->registered[ $handle ] ) ) { /* * Attempt to process the item. If successful, * add the handle to the done array. * * Unset the item from the to_do array. */ if ( $this->do_item( $handle, $group ) ) { $this->done[] = $handle; } unset( $this->to_do[ $key ] ); } } return $this->done; }
Version | Description |
---|---|
2.8.0 | Added the $group parameter. |
2.6.0 | Introduced. |
© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/wp_dependencies/do_items