aam_get_preference_filter
Purpose
Supply a custom preference object for an access level.
Callback
- Type: Filter.
- Arguments:
$preference,$access_level,$preference_type. - Return: the filtered first argument.
Example
add_filter('aam_get_preference_filter', function ($preference, $access_level, $preference_type) {
if (defined('WP_DEBUG') && WP_DEBUG) {
error_log('aam_get_preference_filter ran');
}
return $preference;
}, 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.