[wp-trac] [WordPress Trac] #59521: Issue with update_post_thumbnail_cache if using get_posts

WordPress Trac noreply at wordpress.org
Tue Sep 17 18:36:33 UTC 2024


#59521: Issue with update_post_thumbnail_cache if using get_posts
-------------------------------------------------+-------------------------
 Reporter:  Xendo                                |       Owner:  antpb
     Type:  defect (bug)                         |      Status:  accepted
 Priority:  normal                               |   Milestone:  6.7
Component:  Media                                |     Version:  6.3.1
 Severity:  normal                               |  Resolution:
 Keywords:  has-patch has-unit-tests needs-      |     Focuses:
  testing                                        |
-------------------------------------------------+-------------------------

Comment (by LinSoftware):

 I attempted to reproduce the PHP warning, but the example code didn't
 trigger the function `update_post_thumbnail_cache` to run. Can additional
 example code be provided?

 It looks like `update_post_thumbnail_cache` only runs in the loop context
 or in the admin. I agree that performing an individual query for each post
 is a performance issue.

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


More information about the wp-trac mailing list