[wp-trac] [WordPress Trac] #33791: WP Query 'Publish' Only by Default

WordPress Trac noreply at wordpress.org
Wed Sep 9 15:54:59 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 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

--
Ticket URL: <https://core.trac.wordpress.org/ticket/33791#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list