WP_Network::__get()publicWP 4.6.0

Getter.

Allows current multisite naming conventions when getting properties.

Метод класса: WP_Network{}

Хуков нет.

Возвращает

Разное. Value of the property. Null if not available.

Использование

$WP_Network = new WP_Network();
$WP_Network->__get( $key );
$key(строка) (обязательный)
Property to get.

Список изменений

С версии 4.6.0 Введена.

Код WP_Network::__get() WP 6.5.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;
}