[wp-trac] [WordPress Trac] #63255: WP_Query normalization can break plugin filters comparing query variables.

WordPress Trac noreply at wordpress.org
Mon Apr 14 02:04:58 UTC 2025


#63255: WP_Query normalization can break plugin filters comparing query variables.
--------------------------------------+------------------------
 Reporter:  peterwilsoncc             |       Owner:  joemcgill
     Type:  defect (bug)              |      Status:  reviewing
 Priority:  normal                    |   Milestone:  6.8.1
Component:  Query                     |     Version:
 Severity:  normal                    |  Resolution:
 Keywords:  has-patch has-unit-tests  |     Focuses:
--------------------------------------+------------------------

Comment (by peterwilsoncc):

 > Standardization happens after `pre_get_posts` but any modifications on
 the SQL clauses' filters will not be standardized by core and will need to
 be handled by plugins.

 This was incorrect, trunk has a few additional items standardized prior to
 `pre_get_posts` that doesn't exist in 6.7 or earlier.
 [https://github.com/WordPress/wordpress-develop/pull/8685 PR#8685] moves
 the new standardization until after the hook fires.

 Items that had existing standardization are not modified, if it happened
 prior to `pre_get_posts` in 6.7 the behavior is retained.

 There are changes for the form of `$query` passed to the SQL clauses but I
 think that's acceptable as they are very low level filters that require
 care when implementing.

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


More information about the wp-trac mailing list