WordPress.org

Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #41287, comment 5


Ignore:
Timestamp:
07/12/2017 09:49:57 AM (2 years ago)
Author:
jnylen0
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #41287, comment 5

    initial v1  
    33Having said that, adding an AND query mode would be a nice enhancement.  The solution will likely look similar to the approach discussed in #39494.
    44
    5 For now, it should be possible to use the `rest_{$this->post_type}_query` [filter https://developer.wordpress.org/reference/hooks/rest_this-post_type_query/] combined with `register_rest_field` ([docs https://developer.wordpress.org/rest-api/extending-the-rest-api/modifying-responses/]) to make this functionality work in a plugin.
     5For now, it should be possible to use the `rest_{$this->post_type}_query` [https://developer.wordpress.org/reference/hooks/rest_this-post_type_query/ filter] -- possibly combined with `register_rest_field` ([https://developer.wordpress.org/rest-api/extending-the-rest-api/modifying-responses/ docs]) -- to make this functionality work in a plugin.