boolean

Syntax

(*bool)
(*boolean)

Examples

Definition

Convert any value to a boolean true or false. When converting to boolean, the following values are considered as false:

FYI! For more in-depth detail, refer to the official PHP documentation.

The following policy is designed for a multisite network setup. When there is a need to restrict access to other sites the user does not belong to, you can apply this policy.

If a user is not a member of a site, the access will be denied and handled as defined with the Access Denied Redirect rule (by default “Access Denied” message will be printed).

{
    "Version": "1.0.0",
    "Dependency": {
        "wordpress": ">=5.0.0",
        "advanced-access-manager": ">=6.5.0"
    },
    "Statement": {
        "Effect": "deny",
        "Resource": "Site:${WP_SITE.blog_id}",
        "Condition": {
            "Equals": {
                "(*boolean)${CALLBACK.is_user_member_of_blog}": false
            }
        }
    }
}