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

In this article

Setter.

Description

Allows current multisite naming conventions while setting properties.

Parameters

$keystringrequired
Property to set.
$valuemixedrequired
Value to assign to the property.

Source

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

Changelog

VersionDescription
4.6.0Introduced.

User Contributed Notes

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