How To Change Default WordPress User Role Names in Wilcity?

To change Admin, Editor, Author, Contributor and/or Subscriber, just had the following snippet to Wilcity-Childtheme‘s functions.php file:

function wilcity_change_role_name() {
    global $wp_roles;
    if ( ! isset( $wp_roles ) ){
       $wp_roles = new WP_Roles();
    $wp_roles->roles['contributor']['name'] = 'Owner';
    $wp_roles->role_names['contributor'] = 'Owner';
    $wp_roles->roles['administrator']['name'] = 'Boss';
    $wp_roles->role_names['administrator'] = 'Boss';
add_action('init', 'wilcity_change_role_name');

Default Role Keys:
admin: Administrator
editor: Editor
author: Author
subscriber: Subscriber
contributor: Contributor

Leave A Comment?