Opened 15 years ago
Closed 15 years ago
#12132 closed enhancement (fixed)
wp_dropdown_users() needs an 'id' parameter to allow it to work with the widgets API
Reported by: | johnbillion | Owned by: | nacin |
---|---|---|---|
Milestone: | 3.0 | Priority: | normal |
Severity: | minor | Version: | 2.9.1 |
Component: | Users | Keywords: | wp_dropdown_users widgets has-patch |
Focuses: | Cc: |
Description
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.
Attachments (2)
Change History (8)
Note: See
TracTickets for help on using
tickets.
Adds an 'id' parameter to wp_dropdown_users()