aam_get_access_level_filter
Purpose
Override access-level resolution.
Callback
- Type: Filter.
- Arguments:
$level,$type,$identifier. - Return: the filtered first argument.
Example
add_filter('aam_get_access_level_filter', function ($level, $type, $identifier) {
if (defined('WP_DEBUG') && WP_DEBUG) {
error_log('aam_get_access_level_filter ran');
}
return $level;
}, 10, 3);
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.