WP_Network::__get() public WP 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 Network:: get WP 5.6.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;
}