The members app()->namespace . '/get roles with access' hook.
Published Date - July 31, 2023
$roles = (array) apply_filters( app()->namespace . '/get_roles_with_access', get_setting( 'roles' ) );
$get_setting
The following example is for adding a hook callback.
// define the app()->namespace . '/get_roles_with_access' callback
function custom_app()->namespace . '_get_roles_with_access'( $get_setting ){
//custom code here
return $get_setting
}
//add the action
add_filter('app()->namespace . '/get_roles_with_access'', 'custom_app()->namespace . '/get_roles_with_access'', 10, 1)
The filter is defined in the following location(s).
members/addons/members-admin-access/app/functions.php
$roles = (array) apply_filters( app()->namespace . '/get_roles_with_access', get_setting( 'roles' ) );