[wp-trac] [WordPress Trac] #33791: WP Query 'Publish' Only by Default
WordPress Trac
noreply at wordpress.org
Wed Sep 9 15:58:36 UTC 2015
#33791: WP Query 'Publish' Only by Default
-------------------------+------------------------------
Reporter: atomicjack | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Query | Version: trunk
Severity: normal | Resolution:
Keywords: | Focuses:
-------------------------+------------------------------
Comment (by atomicjack):
Replying to [comment:1 SergeyBiryukov]:
> > Currently, a query will bring back all posts relating to the
arguments, regardless of whether they're published, draft, pending, etc,
by default.
>
> It should only happen in admin context, as documented in Codex:
> https://codex.wordpress.org/Class_Reference/WP_Query#Status_Parameters
Will need to test more, but in a query I recently wrote, it was pulling
draft status' too, where the codex states that for logged-in users, only
'publish' and 'private' should.
Think this area needs reviewing a little.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/33791#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list