aam_rest_ability_access_list_filter
Purpose
Change the REST ability access list response.
Callback
- Type: Filter.
- Arguments:
$items,$access_level. - Return: the filtered first argument.
Example
add_filter('aam_rest_ability_access_list_filter', function ($items, $access_level) {
return array_values(array_filter($items, function ($item) {
return $item['name'] !== 'myapp/internal';
}));
}, 10, 2);
Hides one ability from this REST list. It does not change the underlying permission decision.
See the complete hook list.