[wp-trac] [WordPress Trac] #28568: Can't get private posts/pages via WP_Query when not logged in as administrator
WordPress Trac
noreply at wordpress.org
Tue Jun 17 20:31:49 UTC 2014
#28568: Can't get private posts/pages via WP_Query when not logged in as
administrator
--------------------------+------------------------------
Reporter: mklusak | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Query | Version: 3.9
Severity: normal | Resolution:
Keywords: close | Focuses:
--------------------------+------------------------------
Comment (by SergeyBiryukov):
Replying to [comment:2 mklusak]:
> If this is a feature, then it should be mentioned in Codex: "You can't
use post_status => private on front-end, it works only for logged in
users".
It is a feature, see the code in `WP_Query`: [source:tags/3.9.1/src/wp-
includes/query.php#L3307].
And it's actually mentioned in
[http://codex.wordpress.org/Class_Reference/WP_Query#Status_Parameters
WP_Query docs]: ('private' – not visible to users who are not logged in).
--
Ticket URL: <https://core.trac.wordpress.org/ticket/28568#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list