WP_Dependencies
- Since
- 2.6.0
- Source
wp-includes/class-wp-dependencies.php:18
Core base class extended to register items.
Compatibility
- WordPress
- since 2.6.0
- 6.7.7
- 6.8.8
- 6.9.7
- 7.0.4
- 7.1.0
Present in every tracked release (6.7.7 to 7.1.0).
Properties · 10
$registered_WP_Dependency[]public- An array of all registered dependencies keyed by handle.
$queuestring[]public- An array of handles of queued dependencies.
$to_dostring[]public- An array of handles of dependencies to queue.
$donestring[]public- An array of handles of dependencies already queued.
$argsarray<string,public- An array of additional arguments passed when a handle is registered.
$groups(int|false)[]public- An array of dependency groups to enqueue.
$groupintpublic- A handle group to enqueue.
$all_queued_deps?array<string,private- Cached lookup array of flattened queued items and dependencies.
$queued_before_registerarray<string,private- List of assets enqueued before details were registered.
$dependencies_with_missing_dependenciesstring[]private- List of handles for dependencies encountered which themselves have missing dependencies.
Methods · 14
- do_items()Processes the items and dependencies.
- do_item()Processes a dependency.
- all_deps()Determines dependencies.
- add()Register an item.
- add_data()Add extra item data.
- get_data()Get extra item data.
- remove()Un-register an item or items.
- enqueue()Queue an item or items.
- dequeue()Dequeue an item or items.
- recurse_deps()Recursively search the passed dependency tree for a handle.
- query()Query the list for an item.
- set_group()Set item group, unless already in a lower group.
- get_etag()Get etag header for cache validation.
- get_dependency_warning_message()Gets a dependency warning message for a handle.
Changelog
Introduced in 2.6.0. One change between 6.7.7 and 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
6.9.7
Method
get_dependency_warning_message() added.verified against source2.6.0
Introduced.from the docblock
About this page
- Parsed data
- Generated from the wordpress-develop 7.1.0 tag, from
src/wp-includes/class-wp-dependencies.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it. - Corrections
- Something wrong on this page? Report it and it gets fixed in the next regeneration.