aam_resource_get_permissions_filter

Purpose

Supply permissions from an external resource store.

Callback

Example

add_filter('aam_resource_get_permissions_filter', function ($permissions, $resource_identifier, $resource) {
    if (defined('WP_DEBUG') && WP_DEBUG) {
        error_log('aam_resource_get_permissions_filter ran');
    }
    return $permissions;
}, 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.