[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 17:39:25 UTC 2015
#22212: WP_User_Query( array('role' => $role) ) should accept array or not return
anything if array
--------------------------------------+---------------------------
Reporter: thomask | Owner: boonebgorges
Type: enhancement | Status: closed
Priority: normal | Milestone: 4.4
Component: Users | Version:
Severity: normal | Resolution: fixed
Keywords: has-patch has-unit-tests | Focuses:
--------------------------------------+---------------------------
Changes (by boonebgorges):
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"34875"]:
{{{
#!CommitTicketReference repository="" revision="34875"
Improve role-related arguments in `WP_User_Query`.
* 'role' now accepts an array or comma-separated list of role names. When
passing multiple values for 'role', `WP_User_Query` will only match users
that have all of the specified roles.
* 'role__in' accepts an array of role names, and allow the filtering of
matched users to those with at least one of the specified roles.
* 'role__not_in' accepts an array of role names, and allows the filtering
of matched users to those who have none of the specified roles.
Props swissspidy, mordauk, barrykooij, sirbrillig.
Fixes #22212.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/22212#comment:50>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list