[wp-trac] [WordPress Trac] #50521: comments_pre_query doesn't align with other pre_query filters

WordPress Trac noreply at wordpress.org
Mon Sep 14 22:06:16 UTC 2020

#50521: comments_pre_query doesn't align with other pre_query filters
 Reporter:  dinhtungdu             |       Owner:  imath
     Type:  defect (bug)           |      Status:  assigned
 Priority:  normal                 |   Milestone:  5.6
Component:  Comments               |     Version:  5.3
 Severity:  normal                 |  Resolution:
 Keywords:  has-patch 2nd-opinion  |     Focuses:
Changes (by imath):

 * keywords:  has-patch needs-testing => has-patch 2nd-opinion
 * version:   => 5.3
 * milestone:  Awaiting Review => 5.6


 @dinhtungdu thanks for updating your PR.

 I've just tested it and I confirm it work as expected. 50521.diff is a
 patch I made out of your PR. 50521.test.diff is the test checking the
 comments property of the comment's query is set with the array containing
 the object to override the db query.

 I've also tested it using the filter into WordPress admin. I believe like
 @adamsilverstein that this change shouldn't break anything for existing
 uses so we should be safe to add this in next release.

 Can you confirm @davidbaumwald?

Ticket URL: <https://core.trac.wordpress.org/ticket/50521#comment:14>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform

More information about the wp-trac mailing list