Default

Overview

Default is the baseline access level. Roles and visitors inherit from it, and users inherit it through their role. A rule here has broad reach, so test it with each audience your site supports.

Methods

Use AAM::api()->default(), all(), any(), anyone(), or everyone(). Each returns AAM_Framework_AccessLevel_Default. A service can also take default, all, anyone, or everyone as its access-level string. any() is a gateway method only. Shared methods are in the access-level reference. get_parent() and get_id() return null.

Example

$default = AAM::api()->default();
$default->urls()->deny('/private/');
// Equivalent: AAM::api()->urls('default')->deny('/private/');

The URL rule is saved at the default level, so roles and visitors can inherit it. Check a specific role or visitor before relying on the result in your application.

Developer notes