Opened 7 years ago
Last modified 6 years ago
#43885 new enhancement
WP_Role and WP_Roles::get_role() missing Display Name
Reported by: | garrett-eclipse | Owned by: | |
---|---|---|---|
Milestone: | Awaiting Review | Priority: | normal |
Severity: | normal | Version: | |
Component: | Role/Capability | Keywords: | dev-feedback has-patch |
Focuses: | Cc: |
Description
Hello,
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;
<?php $wp_roles->roles[$role]['name'];
Attachments (1)
Change History (3)
Note: See
TracTickets for help on using
tickets.
Add $display_name property to WP_Role class