WP_Site::__construct( WP_Site|object $site )

Creates a new WP_Site object.


Description Description

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


Parameters Parameters

$site

(WP_Site|object) (Required) A site object.


Top ↑

Source Source

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

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

Top ↑

Changelog Changelog

Changelog
Version Description
4.5.0 Introduced.


Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.