WP_Network::__set

Advertisement

Summery Summery

Setter.

Syntax Syntax

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

Description Description

Allows current multisite naming conventions while setting properties.

Parameters Parameters

$key

(Required) Property to set.

$value

(Required) Value to assign to the property.

Source Source

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

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

Advertisement

Changelog Changelog

Changelog
Version Description
4.6.0 Introduced.

Advertisement

Leave a Reply