[wp-trac] [WordPress Trac] #44119: WP API post status queries don't work with custom public post stati

WordPress Trac noreply at wordpress.org
Tue Jun 18 18:42:57 UTC 2019


#44119: WP API post status queries don't work with custom public post stati
-------------------------+---------------------
 Reporter:  hurtige      |       Owner:  (none)
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:
Component:  REST API     |     Version:  4.9.5
 Severity:  normal       |  Resolution:
 Keywords:  close        |     Focuses:
-------------------------+---------------------
Changes (by TimothyBlynJacobs):

 * keywords:   => close
 * milestone:  Awaiting Review =>


Comment:

 Hi @hurtige,

 Sorry for the delay in providing a response to your ticket.

 At the moment, the REST API doesn't really support custom post statuses at
 all. For a bit of background see, https://github.com/WP-API/WP-
 API/issues/1820

 I think it is unlikely that adjustments will be made to this area on an
 ad-hoc basis. As such, I'd currently recommend trying to override the
 sanitize function using the `rest_{$this->post_type}_collection_params`
 filter to support your use case.

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


More information about the wp-trac mailing list