WP_Network::__get()
Getter.
Allows current multisite naming conventions when getting properties.
Method of the class: WP_Network{}
No Hooks.
Return
Mixed
. Value of the property. Null if not available.
Usage
$WP_Network = new WP_Network(); $WP_Network->__get( $key );
- $key(string) (required)
- Property to get.
Changelog
Since 4.6.0 | Introduced. |
WP_Network::__get() WP Network:: get code WP 6.7.2
public function __get( $key ) { switch ( $key ) { case 'id': return (int) $this->id; case 'blog_id': return (string) $this->get_main_site_id(); case 'site_id': return $this->get_main_site_id(); } return null; }