WordPress.org

Make WordPress Core

Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#14813 closed defect (bug) (invalid)

wp_dropdown_roles should use names from $wp_roles->role_names

Reported by: joehoyle Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: General Keywords:
Focuses: Cc:

Description

Currently wp_dropdown_roles() uses the name of the roles from $details->name, shouldn't it instead get the name from $wp_roles->role_names[$role] array?

See http://core.trac.wordpress.org/browser/trunk/wp-admin/includes/template.php#L721 for where I mean.

Change History (4)

comment:1 t31os_4 years ago

See where get_editable_roles gets it's data from.

http://core.trac.wordpress.org/browser/trunk/wp-admin/includes/user.php#L207

That's exactly where the data is coming from already... ;)

comment:2 joehoyle4 years ago

Ahh makes sense - I was just updating the $role_names[] array on global $wp_roles; Should that not be supported? Seems funny to have the nicenames in an array - then also in the Role array

comment:3 t31os_4 years ago

  • Resolution set to invalid
  • Status changed from new to closed

I'm not sure i follow your question joe, can you clarify?

Closing the ticket as i think i've addressed your initial concern/question.. :)

comment:4 scribu4 years ago

  • Milestone Awaiting Review deleted
Note: See TracTickets for help on using tickets.