[wp-trac] [WordPress Trac] #33065: Allow for querying by `post_name__in`
WordPress Trac
noreply at wordpress.org
Thu Jul 23 09:10:38 UTC 2015
#33065: Allow for querying by `post_name__in`
-------------------------------------------------+-------------------------
Reporter: dd32 | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Future
Component: Query | Release
Severity: normal | Version:
Keywords: good-first-bug needs-patch needs- | Resolution:
unit-tests | Focuses:
-------------------------------------------------+-------------------------
Changes (by boonebgorges):
* keywords: good-first-bug needs-patch => good-first-bug needs-patch
needs-unit-tests
* milestone: Awaiting Review => Future Release
Comment:
Thanks, enshrined. This is a helpful start. Some notes on the patch:
* `array_map()` doesn't operate on an array in place - you need to grab
the return value. Ie `$post_name__in = array_map(
'sanitize_title_for_query', $q['post_name__in'] )`
* In the documentation, it looks like you're chopping up the
`$posts_per_archive_page` lines :)
* I'd suggest moving the new block so that it's near the existing parsing
for 'name' and 'pagename', perhaps even making it into an `elseif`
condition alongside the name/pagename checks. This would make it clearer
how the 'post_name__in' interacts with the existing parameters (which
would be especially important if we introduced 'post_name__not_in').
--
Ticket URL: <https://core.trac.wordpress.org/ticket/33065#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list