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

WordPress Trac noreply at wordpress.org
Wed Sep 9 15:40:53 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       |   Keywords:
  Focuses:               |
-------------------------+-----------------------------
 Hi,

 Currently, a query will bring back all posts relating to the arguments,
 regardless of whether they're published, draft, pending, etc, by default.

 This is not expected user behaviour.

 On default WordPress themes, it displays only published posts by default -
 so when a user is adding in a query, they expect it to only pull back
 published posts.

 What I suggest is that, rather than including arguments to only include
 published posts, we instead do the opposite, and have published posts show
 by default, and have arguments for including other post status'.

 This is, admittedly, quite a huge change, and backwards compatibility
 would be an issue, therefore, this would need to be completed during a
 major version.

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


More information about the wp-trac mailing list