Make WordPress Core

Opened 6 years ago

Last modified 5 years ago

#43885 new enhancement

WP_Role and WP_Roles::get_role() missing Display Name

Reported by: garrett-eclipse's profile garrett-eclipse Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version:
Component: Role/Capability Keywords: dev-feedback has-patch
Focuses: Cc:



While working with roles I found it odd that you can add a Display Name for a role but the WP_Role class and the WP_Roles function get_role don't provide this information.

Please add $display_name as a public attribute of WP_Role so it's available on that object and would be returned in the get_role function.

Thank you
P.S. Currently to access this information you have to use the WP_Roles as follows;


Attachments (1)

43885.patch (705 bytes) - added by keraweb 5 years ago.
Add $display_name property to WP_Role class

Download all attachments as: .zip

Change History (3)

5 years ago

Add $display_name property to WP_Role class

#1 @keraweb
5 years ago

  • Keywords dev-feedback has-patch added

#2 @keraweb
5 years ago

Similar issue with different solution:

Note: See TracTickets for help on using tickets.