[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 21:26:03 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 2nd-opinion | Focuses:
-------------------------------------------------+------------------
Comment (by westonruter):
[attachment:42548.4.diff] ensures that the original `$post->ID` is
supplied in the call to `shortcode_atts` so that it is available for
`shortcode_atts_gallery` filters. But instead of passing `0` when there is
no `$post` it instead passes `null`. If the `null` is then what gets
returned, the `gallery_shortcode()` function will then short-circuit if no
`ids` are supplied either.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/42548#comment:9>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list