WP_Site::__set

Advertisement

Summery Summery

Setter.

Syntax Syntax

WP_Site::__set( string $key, mixed $value )

Description Description

Allows current multisite naming conventions while setting properties.

Parameters Parameters

$key

(string) (Required) Property to set.

$value

(mixed) (Required) Value to assign to the property.

Source Source

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

	public function __set( $key, $value ) {
		switch ( $key ) {
			case 'id':
				$this->blog_id = (string) $value;
				break;
			case 'network_id':
				$this->site_id = (string) $value;
				break;
			default:
				$this->$key = $value;
		}
	}

Advertisement

Changelog Changelog

Changelog
Version Description
4.6.0 Introduced.

Advertisement

Leave a Reply

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