[wp-trac] [WordPress Trac] #22212: WP_User_Query( array('role' => $role) ) should accept array or not return anything if array
WordPress Trac
noreply at wordpress.org
Tue Oct 6 13:54:24 UTC 2015
#22212: WP_User_Query( array('role' => $role) ) should accept array or not return
anything if array
--------------------------------------+-----------------------
Reporter: thomask | Owner:
Type: enhancement | Status: reopened
Priority: normal | Milestone: 4.4
Component: Users | Version:
Severity: normal | Resolution:
Keywords: has-patch has-unit-tests | Focuses:
--------------------------------------+-----------------------
Changes (by swissspidy):
* keywords: needs-patch => has-patch has-unit-tests
* milestone: Future Release => 4.4
Comment:
[attachment:22212.4.patch 22212.4.patch] uses the already existing meta
query structure and does the following:
* Allows multiple roles to be passed for `role`, either as a comma-
separated string or as an array. (`AND` relation)
* `WP_User_Query` now takes a `role__in` array. (`OR` relation)
* Also takes a `role__not_in` array. (`AND` relation)
* Adds unit tests
It'd be great if this could be considered for 4.4.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/22212#comment:45>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list