Opened 5 years ago
#49924 assigned enhancement
Support for Multiple selected options in wp_dropdown_roles() function
Reported by: | abdulawal39 | Owned by: | |
---|---|---|---|
Milestone: | Awaiting Review | Priority: | normal |
Severity: | normal | Version: | 5.4 |
Component: | Users | Keywords: | has-patch |
Focuses: | administration | Cc: |
Description
Currently wp_dropdown_roles() function accepts $selected parameter as string which is perfect for select tags but in some cases we may need to use this function with multi select tags.
To solve this, I've slightly modified the function to accept both string and array for selected items. User may now pass one or more role names separated by comma or an array of role names.
Going to submit patch for this.
Attachments (1)
Note: See
TracTickets for help on using
tickets.
Updated function code