bbPress

Simple, Fast, Elegant

bbPress support forums » Troubleshooting

Change the default 'Member' role title?

(5 posts)
  • Started 1 year ago by M
  • Latest reply from livibetter
  • This topic is resolved

Tags:

  1. Just looking to change the default 'Member' forum role title to something more appropriate for my forum. What file would that be contained in?

    Posted 1 year ago #
  2. Changing the 'name' value (line 125) from your bb-includes/capabilities.php file would be enough

    Posted 1 year ago #
  3. Worked like a charm, thanks so much.

    Posted 1 year ago #
  4. No need to change core files. Just make a file called user_types.php with the following code in it and put it in your my-plugins/ folder.

    <?php
    /*
    Plugin Name: Change 'Member' Label
    Plugin URI: http://bbpress.org/forums/topic/503
    */
    function change_user_type_labels( $label, $type ) {
    if ( 'member' == $type )
    return 'Kazoo Corps Draftee';
    return $label;
    }
    add_filter( 'get_user_type_label', 'change_user_type_labels', 10, 2 );
    ?>

    Posted 1 year ago #
  5. I made another approach to fit this need and used it on my forum.

    function ChangeRoleDisplayName() {
        global $bb_roles;
        $bb_roles->role_names['keymaster'] = "Toilet Cleaner";
        [...]
        }
    
    add_action('bb_got_roles', 'ChangeRoleDisplayName', 10, 0);
    ?>

    The complete code is in role-display-name.php.

    Posted 1 year ago #

RSS feed for this topic

Reply

You must log in to post.

Code is Poetry.