WP_SITE
Less than 1 minute
Syntax
${WP_SITE.<property>}
Definition
Get any property of the currently viewed blog. This marker use's WordPress core function get_blog_details to obtain an instance of WP_Site that holds all the necessary information about a blog.
In the example below, we are going to restrict access to any subsite whose pathname
starts with site
.
{
"Statement": [
{
"Effect": "deny",
"Resource": "Site:${WP_SITE.blog_id}",
"Condition": {
"Like": {
"${CALLBACK.path}": "/site*"
}
}
}
]
}