[wp-trac] [WordPress Trac] #15791: wp_dropdown_users ignores defaults
WordPress Trac
wp-trac at lists.automattic.com
Mon Dec 13 11:24:09 UTC 2010
#15791: wp_dropdown_users ignores defaults
--------------------------+-------------------------------------------------
Reporter: duck_ | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 3.1
Component: General | Version: 3.1
Severity: normal | Keywords: has-patch
--------------------------+-------------------------------------------------
`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).
--
Ticket URL: <http://core.trac.wordpress.org/ticket/15791>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list