[wp-trac] [WordPress Trac] #40168: User roles should be populated in Alphabetical order

WordPress Trac noreply at wordpress.org
Fri Mar 24 01:10:25 UTC 2017


#40168: User roles should be populated in Alphabetical order
-------------------------------------------------+-------------------------
 Reporter:  subrataemfluence                     |       Owner:
     Type:  defect (bug)                         |      Status:  new
 Priority:  normal                               |   Milestone:  Awaiting
Component:  Users                                |  Review
 Severity:  normal                               |     Version:  4.7.3
 Keywords:  has-patch has-screenshots dev-       |  Resolution:
  feedback                                       |     Focuses:
                                                 |  administration
-------------------------------------------------+-------------------------
Changes (by desrosj):

 * keywords:  has-patch has-screenshots => has-patch has-screenshots dev-
     feedback


Comment:

 I'm not sure I agree with alphabetizing the roles in the dropdown. There
 is an implied hierarchy by the default roles in WordPress. Currently, all
 dropdowns order roles by least to most capabilities.

 #40162 is a bug in that it gives priority to the role of the user being
 edited, but I think alphabetizing would lose that ordering, which is
 actually really consistent across all pages right now.

 That being said, the patch fixes properly alphabetizes the list for me. I
 believe that it will only accurately alphabetize the list in English
 though. The `translate_user_role()` call in the `foreach` loop could
 potentially cause the list to be improperly ordered if the user's language
 is other than English because translation happens after your sort.

 Marking this `dev-feedback` for another opinion.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/40168#comment:7>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list