bbp_get_dynamic_role_name( string $role_id = '' )

Gets a translated role name from a role ID

Description

Parameters

$role_id

(Optional)

Default value: ''

Return

(string) Translated role name

Source

File: bp-forums/core/capabilities.php

function bbp_get_dynamic_role_name( $role_id = '' ) {
	$roles = bbp_get_dynamic_roles();
	$role  = isset( $roles[$role_id] ) ? bbp_translate_user_role( $roles[$role_id]['name'] ) : '';

	return apply_filters( 'bbp_get_dynamic_role_name', $role, $role_id, $roles );
}

Changelog

Changelog
Version Description
bbPress (r4792) Introduced.

Questions?

We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.