WP_Network::__set() public WP 4.6.0
Setter.
Allows current multisite naming conventions while setting properties.
{} It's a method of the class: WP_Network{}
No Hooks.
Return
null
. Null. Nothing.
Usage
$WP_Network = new WP_Network(); $WP_Network->__set( $key, $value );
- $key(string) (required)
- Property to set.
- $value(mixed) (required)
- Value to assign to the property.
Changelog
Since 4.6.0 | Introduced. |
Code of WP_Network::__set() WP Network:: set WP 5.7.1
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;
}
}