Changes between Initial Version and Version 1 of Ticket #42548
- Timestamp:
- 11/14/2017 06:03:25 PM (7 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #42548 – Description
initial v1 8 8 I think we can fix both of these issues simply by checking if `is_singular()` and if so, set the `$post` to the current queried object (`get_queried_object()`). This will ensure that the global `$post` isn't coming from an unpredictable source (such as a previous query that failed to call `wp_reset_postdata()`), which was a primary motivator for nullifying the global `$post` to begin with. 9 9 10 This same approach can be done for the Custom HTML widget, which currently doesn't nullify `$post` even though it does apply `widget_text` filters (though not for shortcodes in core). 10 This same approach can be done for the Custom HTML widget, which currently doesn't nullify `$post` even though it does apply `widget_text` filters (though not for shortcodes in core). This would close #42547.