[wp-trac] [WordPress Trac] #42547: Widgets: Nullify $post global in Custom HTML widget

WordPress Trac noreply at wordpress.org
Wed Nov 15 02:27:00 UTC 2017


#42547: Widgets: Nullify $post global in Custom HTML widget
-------------------------------------------+--------------------------
 Reporter:  westonruter                    |       Owner:  westonruter
     Type:  defect (bug)                   |      Status:  closed
 Priority:  normal                         |   Milestone:  4.9.1
Component:  Widgets                        |     Version:  4.9
 Severity:  normal                         |  Resolution:  fixed
 Keywords:  has-patch commit dev-reviewed  |     Focuses:
-------------------------------------------+--------------------------
Changes (by westonruter):

 * owner:   => westonruter
 * status:  new => closed
 * resolution:   => fixed


Comment:

 In [changeset:"42185"]:
 {{{
 #!CommitTicketReference repository="" revision="42185"
 Widgets: Set global `$post` to current queried object instead of
 nullifying when `is_singular()` while applying filters (and shortcodes) in
 Text widget and (via plugin) Custom HTML widget.

 Also prevent `[gallery]` shortcode from dumping out every attachment on
 the site when a containing Text widget is shown on an archive template.

 Props westonruter, bobbingwide, joemcgill for testing.
 See #10457.
 Fixes #42548, #42547 for trunk.
 }}}

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


More information about the wp-trac mailing list