WordPress at a glance
function is not described

WP_Site::__construct() public WP 4.5.0

Creates a new WP_Site object.

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

{} It's a method of the class: WP_Site{}

No Hooks.

Return

null. Nothing.

Usage

$WP_Site = new WP_Site();
$WP_Site->__construct( $site );
$site(WP_Site|object) (required)
A site object.

Changelog

Since 4.5.0 Introduced.

Code of WP_Site::__construct() WP 5.7.2

<?php
public function __construct( $site ) {
	foreach ( get_object_vars( $site ) as $key => $value ) {
		$this->$key = $value;
	}
}