[wp-trac] [WordPress Trac] #50463: Don't call WP_Query::get_posts() directly

WordPress Trac noreply at wordpress.org
Fri Jul 3 12:02:01 UTC 2020

#50463: Don't call WP_Query::get_posts() directly
 Reporter:  Chouby        |       Owner:  swissspidy
     Type:  defect (bug)  |      Status:  closed
 Priority:  normal        |   Milestone:  5.5
Component:  Sitemaps      |     Version:  trunk
 Severity:  normal        |  Resolution:  fixed
 Keywords:  has-patch     |     Focuses:
Changes (by swissspidy):

 * status:  accepted => closed
 * resolution:   => fixed


 In [changeset:"48282" 48282]:
 #!CommitTicketReference repository="" revision="48282"
 Sitemaps: Do not unnecessarily call `WP_Query::get_posts()` in posts

 The posts have already been fetched at this point, no need to do it again.

 Props Chouby.
 Fixes #50463.

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

More information about the wp-trac mailing list