WP_Screen::in_admin
Indicates whether the screen is in a particular admin.
Метод класса: WP_Screen{}
Хуков нет.
Возвращает
bool. True if the screen is in the indicated admin, false otherwise.
Использование
$WP_Screen = new WP_Screen(); $WP_Screen->in_admin( $admin );
- $admin(строка)
- The admin to check against (network | user | site). If empty any of the three admins will result in true.
По умолчанию:null
Список изменений
| С версии 3.5.0 | Введена. |
Код WP_Screen::in_admin() WP Screen::in admin WP 7.1.2
public function in_admin( $admin = null ) {
if ( empty( $admin ) ) {
return (bool) $this->in_admin;
}
return ( $admin === $this->in_admin );
}