aam_rest_mcp_resource_access_list_filter
Purpose
Change the REST MCP resource access list.
Callback
- Type: Filter.
- Arguments:
$items,$access_level. - Return: the filtered first argument.
Example
add_filter('aam_rest_mcp_resource_access_list_filter', function ($items, $access_level) {
return array_values(array_filter($items, function ($item) {
return $item['name'] !== 'myapp/internal';
}));
}, 10, 2);
Hides one named MCP entry from this REST list. Permission checks still run independently.
See the complete hook list.