[wp-trac] [WordPress Trac] #27088: Allow per-query filtering of post status objects

WordPress Trac noreply at wordpress.org
Tue Feb 11 05:32:33 UTC 2014


#27088: Allow per-query filtering of post status objects
-------------------------+-----------------------------
 Reporter:  ericmann     |      Owner:
     Type:  enhancement  |     Status:  new
 Priority:  normal       |  Milestone:  Awaiting Review
Component:  Query        |    Version:  3.8.1
 Severity:  normal       |   Keywords:
  Focuses:               |
-------------------------+-----------------------------
 There comes a time where queries need to pull in posts (or CPTs) that have
 a non-public post status.  Unfortunately, there are no filters on
 `get_post_status()` or `get_post_status_object()` to allow this kind of
 atomic control within `WP_Query::get_posts()`.

 To rectify this, we should add (at a minimum) filters on:
 - `get_post_status()`
 - `get_post_status_object()`

 Additionally, a filter within `WP_Query::get_posts()` (on the return of
 `get_post_status_object()` with the query passed along for context) will
 allow per-query filtering of the status object if it needs to be
 overridden for specific reasons.

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


More information about the wp-trac mailing list