[wp-trac] [WordPress Trac] #36624: Add nicename__in and nicename__not_in to WP_User_Query
WordPress Trac
noreply at wordpress.org
Sat Oct 1 03:05:32 UTC 2016
#36624: Add nicename__in and nicename__not_in to WP_User_Query
----------------------------------------+-----------------------
Reporter: johnjamesjacoby | Owner: ryanplas
Type: enhancement | Status: assigned
Priority: normal | Milestone: 4.7
Component: Users | Version:
Severity: normal | Resolution:
Keywords: has-unit-tests needs-patch | Focuses:
----------------------------------------+-----------------------
Changes (by boonebgorges):
* keywords: good-first-bug has-patch has-unit-tests => has-unit-tests
needs-patch
* owner: johnjamesjacoby => ryanplas
* milestone: Future Release => 4.7
Comment:
> Took a stab at it. This is my first patch with real code and unit tests,
so let me know if I missed something.
Wow, this is a great first patch! Thanks, @ryanplas! A few small things:
- We'll need a `@since` annotation for the new
`WP_User_Query::prepare_query()` parameters.
- "Matched users must have at least one..." is a weird thing to say about
logins or nicenames, since users can only have one :) Maybe find a better
way to phrase it.
- The `__in` and `__not_in` clauses need to have their values sanitized.
Something like this should work: `array_map( 'esc_sql',
$qv['nicename__in'] )` ...
--
Ticket URL: <https://core.trac.wordpress.org/ticket/36624#comment:9>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list