Get List of User Roles

<?php
function bena_get_roles() {
    $editable_roles = get_editable_roles();
    foreach ($editable_roles as $role => $details) {
        $sub['role'] = esc_attr($role);
        $sub['name'] = translate_user_role($details['name']);
        $roles[] = $sub;
    } ?>
    <pre><?php echo print_r($roles)?></pre><?php
}

//Get List
bena_get_roles();
[instagram-feed feed=1]
© 2024 BenaDigital Limited | All Rights Reserved
magnifiercrosschevron-down