[wp-trac] [WordPress Trac] #28007: any post_status blocks others
WordPress Trac
noreply at wordpress.org
Thu May 29 20:00:36 UTC 2014
#28007: any post_status blocks others
--------------------------+------------------
Reporter: zugort | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 4.0
Component: Query | Version: 3.8
Severity: normal | Resolution:
Keywords: has-patch | Focuses:
--------------------------+------------------
Changes (by wonderboymusic):
* keywords: needs-patch needs-unit-tests => has-patch
* milestone: Future Release => 4.0
Comment:
`'post_status' => 'any'` is an alias for`get_post_stati( array(
'exclude_from_search' => true ) )`
This does not include statuses in the query SQL, it just excludes some
statuses.
However, if you pass:
`'post_status' => 'any, auto-draft'` or `'post_status' => array( 'any',
'auto-draft' )`
... they should be combined. They aren't really combined, what happens:
when the 'any' logic is deciding to exclude statuses, it should make sure
they aren't also in the passed `post_status` array.
I think that this wasn't considered when `any` was implemented for
`post_status`. I wouldn't say this way is suggested, but it also isn't
wholly invalid.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/28007#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list