[wp-trac] [WordPress Trac] #37312: Invalid call to wp_reset_postdata inside Recent Posts widget

WordPress Trac noreply at wordpress.org
Tue Oct 17 20:35:33 UTC 2017


#37312: Invalid call to wp_reset_postdata inside Recent Posts widget
---------------------------+------------------------------
 Reporter:  peterwilsoncc  |       Owner:
     Type:  defect (bug)   |      Status:  new
 Priority:  normal         |   Milestone:  Awaiting Review
Component:  Widgets        |     Version:
 Severity:  normal         |  Resolution:
 Keywords:  has-patch      |     Focuses:
---------------------------+------------------------------
Changes (by welcher):

 * keywords:   => has-patch


Comment:

 Changing the loop to a `foreach` negates the need to call `the_post()` or
 `wp_reset_postdata`.

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


More information about the wp-trac mailing list