[wp-trac] [WordPress Trac] #49924: Support for Multiple selected options in wp_dropdown_roles() function
WordPress Trac
noreply at wordpress.org
Thu Apr 16 14:18:09 UTC 2020
#49924: Support for Multiple selected options in wp_dropdown_roles() function
----------------------------+-----------------------------
Reporter: abdulawal39 | Owner: (none)
Type: enhancement | Status: assigned
Priority: normal | Milestone: Awaiting Review
Component: Users | Version: 5.4
Severity: normal | Keywords: has-patch
Focuses: administration |
----------------------------+-----------------------------
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.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/49924>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list