Use the below example code to rename user role name without plugin.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | function change_role_name() { global $wp_roles; if ( ! isset( $wp_roles ) ) $wp_roles = new WP_Roles(); //You can list all currently available roles like this... //$roles = $wp_roles->get_names(); //print_r($roles); //You can replace "administrator" with any other role "editor", "author", "contributor" or "subscriber"... $wp_roles->roles['administrator']['name'] = 'Owner'; $wp_roles->role_names['administrator'] = 'Owner'; } add_action('init', 'change_role_name'); |
If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.