diff --git a/src/wp-includes/class-wp-role.php b/src/wp-includes/class-wp-role.php
index b9884f2065..71d2719942 100644
|
a
|
b
|
class WP_Role { |
| 22 | 22 | */ |
| 23 | 23 | public $name; |
| 24 | 24 | |
| | 25 | /** |
| | 26 | * Role display name. |
| | 27 | * |
| | 28 | * @since 6.x |
| | 29 | * @var string |
| | 30 | */ |
| | 31 | public $display_name; |
| | 32 | |
| 25 | 33 | /** |
| 26 | 34 | * List of capabilities the role contains. |
| 27 | 35 | * |
| … |
… |
class WP_Role { |
| 46 | 54 | public function __construct( $role, $capabilities ) { |
| 47 | 55 | $this->name = $role; |
| 48 | 56 | $this->capabilities = $capabilities; |
| | 57 | |
| | 58 | global $wp_roles; |
| | 59 | |
| | 60 | if (isset($wp_roles->role_names[$role])) { |
| | 61 | $this->display_name = $wp_roles->role_names[$role]; |
| | 62 | } else { |
| | 63 | $this->display_name = null; |
| | 64 | } |
| 49 | 65 | } |
| 50 | 66 | |
| 51 | 67 | /** |