WP_Site::__set()
Setter.
Allows current multisite naming conventions while setting properties.
Method of the class: WP_Site{}
No Hooks.
Return
null
. Nothing (null).
Usage
$WP_Site = new WP_Site(); $WP_Site->__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_Site::__set() WP Site:: set code WP 6.7.2
public function __set( $key, $value ) { switch ( $key ) { case 'id': $this->blog_id = (string) $value; break; case 'network_id': $this->site_id = (string) $value; break; default: $this->$key = $value; } }