[wp-trac] [WordPress Trac] #35476: Allow posts to be filtered before return when `fields` parameter is used with `WP_Query`

WordPress Trac noreply at wordpress.org
Fri Jan 15 16:47:01 UTC 2016


#35476: Allow posts to be filtered before return when `fields` parameter is used
with `WP_Query`
-------------------------+-----------------------------
 Reporter:  tlovett1     |      Owner:
     Type:  enhancement  |     Status:  new
 Priority:  normal       |  Milestone:  Awaiting Review
Component:  Query        |    Version:  trunk
 Severity:  normal       |   Keywords:
  Focuses:               |
-------------------------+-----------------------------
 Right now, when the '''fields''' parameter is used with '''WP_Query'''
 ("ids" or "id=>parent"), the returned posts are not filterable at all.
 Later in WP_Query, the_posts can be used to filter returned posts. This
 functionality should be mimicked with fields queries.

 The use case for this is in plugins that bypass MySQL in WP Query
 (Elasticsearch). Fields queries right now can not be bypassed.

 Patch attached.

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


More information about the wp-trac mailing list