[wp-trac] [WordPress Trac] #12132: wp_dropdown_users() needs an 'id' parameter to allow it to work with the widgets API

WordPress Trac wp-trac at lists.automattic.com
Fri Feb 5 02:06:42 UTC 2010


#12132: wp_dropdown_users() needs an 'id' parameter to allow it to work with the
widgets API
-------------------------+--------------------------------------------------
 Reporter:  johnbillion  |       Owner:                           
     Type:  enhancement  |      Status:  new                      
 Priority:  normal       |   Milestone:  Unassigned               
Component:  Users        |     Version:                           
 Severity:  minor        |    Keywords:  wp_dropdown_users widgets
-------------------------+--------------------------------------------------
 It's not possible to use `wp_dropdown_users()` to display a dropdown of
 users on a widget administration screen (ie. in the `form()` function of
 the widget). The reason is that you cannot explicitly pass an 'id'
 parameter to the dropdown, which is a requirement of the AJAX
 functionality of the widget admin screen.

 The problem is that `wp_dropdown_users()` uses the value of the 'name'
 parameter to populate both the name and the id of the dropdown. The AJAX
 functionality of the widget admin screen requires that the ID and name use
 explicit values from `get_field_id()` and `get_field_name()` respectively.

 Patch coming up when I get a chance. There may also be other API functions
 that have the same problem.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/12132>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list