aam_apply_policy_filter
Purpose
Merge policy-derived permissions into a resource or preference.
Callback
- Type: Filter.
- Arguments:
$permissions,$resource_or_preference. - Return: the filtered first argument.
Example
add_filter('aam_apply_policy_filter', function ($permissions, $resource_or_preference) {
if (defined('WP_DEBUG') && WP_DEBUG) {
error_log('aam_apply_policy_filter ran');
}
return $permissions;
}, 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.