WordPress and buddypress programming

How To Change Default WordPress User Role Names

Viewing 0 reply threads
  • Author
    Posts
    • #3758
      michael mc
      Keymaster
      @michael
      function wps_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';           
      }
      add_action('init', 'wps_change_role_name');

      All you have to do is add this code to your theme’s functions.php

Viewing 0 reply threads
  • You must be logged in to reply to this topic.