The site I’m working on will have a very large number of unique user roles via a members plugin. Because of that, I’d like to have the Role drop-down selection on the Add New User page to display roles alphabetically, rather than descending order of creation.
Is there any way to do this?
Almost the same approach One Trick Pony has chosen, but I am using translated names and
uasort()
(to preserve the keys):As a plugin on GitHub.
Apparently there’s a filter that you can use in the
get_editable_roles
function (which is called in that page):