[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
Tue Jan 19 03:16:45 UTC 2016


#35476: Allow posts to be filtered before return when `fields` parameter is used
with `WP_Query`
-------------------------------------------------+-------------------------
 Reporter:  tlovett1                             |       Owner:
     Type:  enhancement                          |  adamsilverstein
 Priority:  normal                               |      Status:  accepted
Component:  Query                                |   Milestone:  Awaiting
 Severity:  normal                               |  Review
 Keywords:  dev-feedback has-patch needs-unit-   |     Version:  trunk
  tests                                          |  Resolution:
                                                 |     Focuses:
-------------------------------------------------+-------------------------

Comment (by adamsilverstein):

 [attachment:35476.2.diff] is a more concise patch: if the filter returns
 anything but false we return that, otherwise behavior is unchanged. Also,
 the `test_query_fields_integers` test now passes.

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


More information about the wp-trac mailing list