wppaste
WordPress

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 · 9

$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.
$argsarraypublic
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_depsarrayprivate
Cached lookup array of flattened queued items and dependencies.
$queued_before_registerarrayprivate
List of assets enqueued before details were registered.

Methods · 13

Source code

#[AllowDynamicProperties]class WP_Dependencies {	/**	 * An array of all registered dependencies keyed by handle.	 *	 * @since 2.6.8	 *	 * @var _WP_Dependency[]	 */	public $registered = array(); 	/**	 * An array of handles of queued dependencies.	 *	 * @since 2.6.8	 *	 * @var string[]	 */	public $queue = array(); 	/**	 * An array of handles of dependencies to queue.	 *	 * @since 2.6.0	 *	 * @var string[]	 */	public $to_do = array(); 	/**	 * An array of handles of dependencies already queued.	 *	 * @since 2.6.0	 *	 * @var string[]	 */	public $done = array(); 	/**	 * An array of additional arguments passed when a handle is registered.	 *	 * Arguments are appended to the item query string.	 *	 * @since 2.6.0	 *	 * @var array	 */	public $args = array(); 	/**	 * An array of dependency groups to enqueue.	 *	 * Each entry is keyed by handle and represents the integer group level or boolean	 * false if the handle has no group.	 *	 * @since 2.8.0	 *	 * @var (int|false)[]	 */	public $groups = array(); 	/**	 * A handle group to enqueue.	 *	 * @since 2.8.0	 *	 * @deprecated 4.5.0	 * @var int	 */	public $group = 0; 	/**	 * Cached lookup array of flattened queued items and dependencies.	 *	 * @since 5.4.0	 *	 * @var array	 */	private $all_queued_deps;

Changelog

Introduced in 2.6.0. One change between 6.7.7 and 7.1.0.

  1. 6.7.7
  2. 6.8.8
  3. 6.9.7
  4. 7.0.4
  5. 7.1.0

Signature, return type and hooks compared across 5 parsed releases.

6.9.7
Method get_dependency_warning_message() added.verified against source
2.6.0
Introduced.from the docblock

About this page

Parsed data
Generated from the wordpress-develop 6.7.7 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.