[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
Mon May 28 07:58:28 UTC 2018
#28568: Can't get private posts/pages via WP_Query when not logged in as
administrator
--------------------------+----------------------
Reporter: mklusak | Owner: (none)
Type: defect (bug) | Status: closed
Priority: normal | Milestone:
Component: Query | Version: 3.9
Severity: normal | Resolution: invalid
Keywords: | Focuses:
--------------------------+----------------------
Comment (by marco.marsala):
I noticed that you can't get a private post by id if not logged, but it
works if you remove 'page_id' argument; specifying only 'post_status' =
'private' without 'page_id', you'll get all posts including private ones.
Feature or (security) bug?
--
Ticket URL: <https://core.trac.wordpress.org/ticket/28568#comment:6>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list