aam_ability_is_denied_filter
Purpose
Override the final deny result for a registered ability.
Callback
- Type: Filter.
- Arguments:
$result,$identifier,$resource. - Return: the filtered first argument.
Example
add_filter('aam_ability_is_denied_filter', function ($result, $identifier, $resource) {
return $identifier === 'myapp.private' ? true : $result;
}, 10, 3);
Denies the exact myapp.private identifier and keeps AAM’s decision for every other resource.
See the complete hook list.