aam_rest_get_access_level_filter
Purpose
Provide an access level to premium REST handlers. Premium.
Callback
- Type: Filter.
- Arguments:
$access_level,$request. - Return: the filtered first argument.
Example
add_filter('aam_rest_get_access_level_filter', function ($access_level, $request) {
if (defined('WP_DEBUG') && WP_DEBUG) {
error_log('aam_rest_get_access_level_filter ran');
}
return $access_level;
}, 10, 2);
Shows when this filter runs during debugging and preserves the incoming value. Replace the diagnostic with a narrowly scoped change to the returned value.
See the complete hook list.