_WP_Dependency::__construct() WordPress Method

The __construct() method is the class constructor for the WP_Dependency class. It initializes the class properties and sets up the class instance.

_WP_Dependency::__construct( mixed $args ) #

Setup dependencies.


Parameters

$args

(mixed)(Required)Dependency information.


Top ↑

Source

File: wp-includes/class-wp-dependency.php

	public function __construct( ...$args ) {
		list( $this->handle, $this->src, $this->deps, $this->ver, $this->args ) = $args;
		if ( ! is_array( $this->deps ) ) {
			$this->deps = array();
		}
	}


Top ↑

Changelog

Changelog
VersionDescription
5.3.0Formalized the existing ...$args parameter by adding it to the function signature.
2.6.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.