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

Setter.


Description Description

Allows current multisite naming conventions while setting properties.


Top ↑

Parameters Parameters

$key

(string) (Required) Property to set.

$value

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


Top ↑

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;
		}
	}

Top ↑

Changelog Changelog

Changelog
Version Description
4.6.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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