Skip to:
Content
Pages
Categories
Search
Top
Bottom

Custom Role showing as ‘Member’ in author_role on Topics and Replies


  • jbjorgaard
    Participant

    @jbjorgaard

    Using the following code, when I select Outfit Leader as the bbpress role, it displays ‘Member’ where it used to say ‘Keymaster’ on a forums post under the bbp-author-role class tag.

    	function add_custom_role( $bbp_roles ) {
     
    	$bbp_roles['my_custom_role1'] = array(
    	'name' => 'Outfit Leader',
    	'capabilities' => bbp_get_caps_for_role( bbp_get_keymaster_role() )
    	);
    	$bbp_roles['my_custom_role2'] = array(
    	'name' => 'Chief of Staff',
    	'capabilities' => bbp_get_caps_for_role( bbp_get_keymaster_role() ) 
    	);
    	$bbp_roles['my_custom_role3'] = array(
    	'name' => 'Executive Officer',
    	'capabilities' => bbp_get_caps_for_role( bbp_get_keymaster_role() ) 
    	);
    	return $bbp_roles;
    	}
    	add_filter( 'bbp_get_dynamic_roles', 'add_custom_role', 1 );

    Expected functionality: Custom Roles would replace the name of the role they are getting capabilities from. So in this case each forums topic by this user would have their avatar, name below that, role name below that, and finally IP address below that.

  • You must be logged in to reply to this topic.
Skip to toolbar