[wp-trac] [WordPress Trac] #59442: Duplicate query in WP_Query

WordPress Trac noreply at wordpress.org
Fri Jan 26 00:51:55 UTC 2024


#59442: Duplicate query in WP_Query
-------------------------------------------------+-------------------------
 Reporter:  spacedmonkey                         |       Owner:  joemcgill
     Type:  defect (bug)                         |      Status:  assigned
 Priority:  normal                               |   Milestone:  6.5
Component:  Query                                |     Version:  6.2
 Severity:  normal                               |  Resolution:
 Keywords:  has-patch dev-feedback commit early  |     Focuses:
  changes-requested                              |  performance
-------------------------------------------------+-------------------------

Comment (by peterwilsoncc):

 As the `$post_type` is defined only where the `WHERE` clause is set to a
 single post type, I don't think it's a problem for this ticket which
 should allow some variation of the simpler patch to be used.

 `update_post_caches()` is only called if `$this->posts` matches the
 unfiltered value. If the posts have been modified then
 `_prime_post_caches()` is used which allows for any post type to be
 primed.

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


More information about the wp-trac mailing list