WP_Network::__construct()publicWP 4.4.0

Creates a new WP_Network object.

Will populate object properties from the object provided and assign other default properties based on that information.

Method of the class: WP_Network{}

No Hooks.

Return

null. Nothing (null).

Usage

$WP_Network = new WP_Network();
$WP_Network->__construct( $network );
$network(WP_Network|object) (required)
A network object.

Changelog

Since 4.4.0 Introduced.

WP_Network::__construct() code WP 6.4.3

public function __construct( $network ) {
	foreach ( get_object_vars( $network ) as $key => $value ) {
		$this->$key = $value;
	}

	$this->_set_site_name();
	$this->_set_cookie_domain();
}