W3cubDocs

/WordPress

WP_Network::__construct( WP_Network|object $network )

Creates a new WP_Network object.

Description

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

Parameters

$networkWP_Network|objectrequired
A network object.

Source

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

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

Changelog

Version Description
4.4.0 Introduced.

© 2003–2024 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/wp_network/__construct