Indicates whether the screen is in a particular admin.
Parameters
$admin
stringoptional- The admin to check against (network | user | site).
If empty any of the three admins will result in true.Default:
null
Source
public function in_admin( $admin = null ) {
if ( empty( $admin ) ) {
return (bool) $this->in_admin;
}
return ( $admin === $this->in_admin );
}
Changelog
Version | Description |
---|---|
3.5.0 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.