wp_dropdown_users ignores defaults
|Reported by:||duck_||Owned by:|
wp_dropdown_users no longer orders results by display_name by default, because only the $args array passed to the function is used to determine which users to include.
Steps to reproduce
Have two users:
User 1: login = aaaa, display name = zzzz User 2: login = zzzz, display name = aaaa
Call wp_dropdown_users. Expect User 2 to be displayed first, but actually ordered by login.
Two patches attached, use $r in get_users call and either set default to name or allow display_name in WP_User_Query. v2 is probably more backwards compatible (raises the question of backwards compatibility of other orderby values, e.g. just "email" now instead of "user_email". Also, the codex suggests "user_nicename" as a valid orderby value, but it looks like this, or "nicename", doesn't even work with WP_User_Query).