WP_Site::__construct

Advertisement

Summery Summery

Creates a new WP_Site object.

Syntax Syntax

WP_Site::__construct( WP_Site|object $site )

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.

Source Source

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

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

Advertisement

Changelog Changelog

Changelog
Version Description
4.5.0 Introduced.

Advertisement

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.