[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
Wed Jan 6 18:40:29 UTC 2021


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

 * keywords:  dev-feedback has-patch has-unit-tests needs-dev-note =>
     dev-feedback has-patch has-unit-tests needs-dev-note reporter-feedback
     needs-refresh
 * milestone:  5.7 => Awaiting Review


Comment:

 @welcher or @tlovett1 - is this filter still needed? Since we added
 `posts_pre_query` in WP4.6, plugins like Elasticpress can filter even
 `fields` queries effectively as far as I can tell.

 Can you let me know if this is still needed?

  * If so, it looks like the code needs to get moved to `src/wp-includes
 /class-wp-query.php` now (and I guess tests would move as well).
  * If not, let's closed this ticket.

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


More information about the wp-trac mailing list