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

WordPress Trac noreply at wordpress.org
Mon Nov 20 22:55:33 UTC 2017


#37312: Invalid call to wp_reset_postdata inside Recent Posts widget
------------------------------+--------------------------
 Reporter:  peterwilsoncc     |       Owner:  westonruter
     Type:  defect (bug)      |      Status:  closed
 Priority:  normal            |   Milestone:  4.9
Component:  Widgets           |     Version:  3.0
 Severity:  normal            |  Resolution:  fixed
 Keywords:  has-patch commit  |     Focuses:
------------------------------+--------------------------

Comment (by westonruter):

 If the jQuery Archive List Widget was relying on a global `$post` to be
 set then it was not correct as this is not reliable. It should instead be
 checking if `is_singular()` and if so, then grabbing the post ID from
 `get_queried_object_id()`.

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


More information about the wp-trac mailing list