Skip to content
Commit a518375f authored by Weston Ruter's avatar Weston Ruter
Browse files

Widgets: Set global `$post` to current queried object instead of nullifying...

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.

Built from https://develop.svn.wordpress.org/trunk@42185


git-svn-id: https://core.svn.wordpress.org/trunk@42015 1a063a9b-81f0-0310-95a4-ce76da25c4cd
parent 176ba25c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment