The members members sanitize role hook.
Published Date - July 31, 2023
return apply_filters( 'members_sanitize_role', str_replace( ' ', '_', $_role ), $role );
$str_replace
$role
The following example is for adding a hook callback.
// define the members_sanitize_role callback
function custom_members_sanitize_role( $str_replace, $role ){
//custom code here
return $str_replace
}
//add the action
add_filter('members_sanitize_role', 'custom_members_sanitize_role', 10, 2)
The filter is defined in the following location(s).
members/inc/functions-roles.php
return apply_filters( 'members_sanitize_role', str_replace( ' ', '_', $_role ), $role );