The members app()->namespace . '/role has access' hook.
Published Date - July 31, 2023
return apply_filters(
app()->namespace . '/role_has_access',
in_array( $role, get_roles_with_access() ),
$role
);
$in_array)
$role
The following example is for adding a hook callback.
// define the app()->namespace . '/role_has_access' callback
function custom_app()->namespace . '_role_has_access'( $in_array), $role ){
//custom code here
return $in_array)
}
//add the action
add_filter('app()->namespace . '/role_has_access'', 'custom_app()->namespace . '/role_has_access'', 10, 2)
The filter is defined in the following location(s).
members/addons/members-admin-access/app/functions.php
return apply_filters(
app()->namespace . '/role_has_access',
in_array( $role, get_roles_with_access() ),
$role
);