Skip to:
Content
Pages
Categories
Search
Top
Bottom

Change user role text color

  • @jbdizzle

    Participant

    So I changed the names of the user roles. I would like to change the text color of each role. Here is the code that I am using to change the name. Could I just wrap the role name in a color code?

    add_filter( 'bbp_get_dynamic_roles', 'my_bbp_custom_role_names');
    
    function my_bbp_custom_role_names(){
     return array(
    
            // Keymaster
            bbp_get_keymaster_role() => array(
                'name'         => __( 'The Dragon Born', 'bbpress' ),
                'capabilities' => bbp_get_caps_for_role( bbp_get_keymaster_role() )
            ),
    
            // Moderator
            bbp_get_moderator_role() => array(
                'name'         => __( 'Moderator', 'bbpress' ),
                'capabilities' => bbp_get_caps_for_role( bbp_get_moderator_role() )
            ),
    
            // Participant
            bbp_get_participant_role() => array(
                'name'         => __( 'Legionnaire', 'bbpress' ),
                'capabilities' => bbp_get_caps_for_role( bbp_get_participant_role() )
            ),
    
            // Spectator
            bbp_get_spectator_role() => array(
                'name'         => __( 'Spectator', 'bbpress' ),
                'capabilities' => bbp_get_caps_for_role( bbp_get_spectator_role() )
            ),
    
            // Blocked
            bbp_get_blocked_role() => array(
                'name'         => __( 'Blocked', 'bbpress' ),
                'capabilities' => bbp_get_caps_for_role( bbp_get_blocked_role() )
            )
        );
    }

    p.s. Is there a way to change what each of these roles have access to?

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.
Skip to toolbar