bbp_get_dynamic_role_name

Gets a translated role name from a role ID.

Description

(string) bbp_get_dynamic_role_name( (string) $role_id = '' ); 

Returns (string)

Translated role name

Parameters (1)

0. $role_id — Optional. (string) => ''
The role id.

Usage

  1. if ( !function_exists( 'bbp_get_dynamic_role_name' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'bbpress/includes/core/capabilities.php'; 
  3.  
  4. // The role id. 
  5. $role_id = ''; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = bbp_get_dynamic_role_name($role_id); 
  9.  

Defined (1)

The function is defined in the following location(s).

/includes/core/capabilities.php  
  1. function bbp_get_dynamic_role_name( $role_id = '' ) { 
  2. $roles = bbp_get_dynamic_roles(); 
  3. $role = isset( $roles[$role_id] ) ? $roles[$role_id]['name'] : ''; 
  4.  
  5. return apply_filters( 'bbp_get_dynamic_role_name', $role, $role_id, $roles );