[wp-trac] [WordPress Trac] #42548: Widgets: Populate global $post with queried object on singular queries instead of nullifying it

WordPress Trac noreply at wordpress.org
Tue Nov 14 19:57:17 UTC 2017


#42548: Widgets: Populate global $post with queried object on singular queries
instead of nullifying it
-------------------------------------+------------------
 Reporter:  westonruter              |       Owner:
     Type:  defect (bug)             |      Status:  new
 Priority:  normal                   |   Milestone:  4.9
Component:  Widgets                  |     Version:  4.9
 Severity:  normal                   |  Resolution:
 Keywords:  has-patch needs-testing  |     Focuses:
-------------------------------------+------------------

Comment (by bobbingwide):

 Unless I've applied the patch incorrectly my tests indicate that
 gallery_shortcode needs changing to test if the $id is not empty.

 Without this test, when viewing an archive, the [gallery] shortcode will
 still produce a display of all the unattached images. This applies to both
 Custom HTML widgets and Text widgets.

 I've developed an additional patch that caters for this problem.
 It also allows [gallery id=0] to display all the unattached images.

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


More information about the wp-trac mailing list