WP_Network::__set()
Setter.
Allows current multisite naming conventions while setting properties.
Method of the class: WP_Network{}
No Hooks.
Return
null
. Nothing (null).
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. |
WP_Network::__set() WP Network:: set code WP 6.7.2
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; } }