WordPress at a glance
function is not described

WP_Network::__get() public WP 4.6.0

Getter.

Allows current multisite naming conventions when getting properties.

{} It's a 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.

Code of WP_Network::__get() WP 5.7

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