WP_Network::__construct() WordPress Method

The WP_Network::__construct() function is used to create a new WP_Network object. This function takes two arguments: an ID and a name. The ID is used to identify the network, and the name is used to identify the network's name.

WP_Network::__construct( WP_Network|object $network ) #

Create a new WP_Network object.


Description

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


Top ↑

Parameters

$network

(WP_Network|object)(Required)A network object.


Top ↑

Source

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

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

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


Top ↑

Changelog

Changelog
VersionDescription
4.4.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.