WordPress/wp-includes/widgets
Weston Ruter 84d2c51153 Widgets: Add shortcode support inside Text widgets.
* Used now in core to facilitate displaying inserted media. See #40854.
* The `[embed]` shortcode is not supported because there is no post context for caching oEmbed responses. This depends on #34115.
* Add `do_shortcode()` to the `widget_text_content` filter in the same way it is added for `the_content` at priority 11, with `shortcode_unautop()` called at priority 10 after `wpautop()`.
* For Text widget in legacy mode, manually apply `do_shortcode()` (and `shortcode_unautop()` if auto-paragraph checked) if the core-added `widget_text_content` filter remains, unless a plugin added `do_shortcode()` to `widget_text` to prevent applying shortcodes twice.
* Ensure that global `$post` is `null` while filters apply in the Text widget so shortcode handlers won't run with unexpected contexts.

Props westonruter, nacin, aaroncampbell.
See #40854, #34115.
Fixes #10457.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41194 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-10 06:33:44 +00:00
..
class-wp-nav-menu-widget.php Docs: Remove `@access` notations from method DocBlocks in wp-includes/* classes. 2017-07-27 00:41:44 +00:00
class-wp-widget-archives.php Docs: Remove `@access` notations from method DocBlocks in wp-includes/* classes. 2017-07-27 00:41:44 +00:00
class-wp-widget-calendar.php Docs: Remove `@access` notations from method DocBlocks in wp-includes/* classes. 2017-07-27 00:41:44 +00:00
class-wp-widget-categories.php Docs: Add a `@staticvar` entry for `$first_dropdown` in `WP_Widget_Categories::widget()`. 2017-07-28 14:25:42 +00:00
class-wp-widget-custom-html.php Widgets: Rename Text widget's `legacy` mode to non-`visual` mode, restore boolean `filter` prop, and improve compatibility for `widget_text` filters applied in Custom HTML widget. 2017-07-24 22:46:42 +00:00
class-wp-widget-links.php Docs: Remove `@access` notations from method DocBlocks in wp-includes/* classes. 2017-07-27 00:41:44 +00:00
class-wp-widget-media-audio.php Docs: Remove `@access` notations from method DocBlocks in wp-includes/* classes. 2017-07-27 00:41:44 +00:00
class-wp-widget-media-image.php Widgets: Expose link URL input field in Image widget to avoid having to open media modal to discover. 2017-08-14 17:56:42 +00:00
class-wp-widget-media-video.php Media: Upgrade MediaElement.js from 2.22.0 to 4.2.3. 2017-08-01 04:43:51 +00:00
class-wp-widget-media.php Widgets: Expose link URL input field in Image widget to avoid having to open media modal to discover. 2017-08-14 17:56:42 +00:00
class-wp-widget-meta.php Docs: Remove `@access` notations from method DocBlocks in wp-includes/* classes. 2017-07-27 00:41:44 +00:00
class-wp-widget-pages.php Docs: Remove `@access` notations from method DocBlocks in wp-includes/* classes. 2017-07-27 00:41:44 +00:00
class-wp-widget-recent-comments.php Docs: Remove `@access` notations from method DocBlocks in wp-includes/* classes. 2017-07-27 00:41:44 +00:00
class-wp-widget-recent-posts.php Docs: Remove `@access` notations from method DocBlocks in wp-includes/* classes. 2017-07-27 00:41:44 +00:00
class-wp-widget-rss.php Docs: Remove `@access` notations from method DocBlocks in wp-includes/* classes. 2017-07-27 00:41:44 +00:00
class-wp-widget-search.php Docs: Remove `@access` notations from method DocBlocks in wp-includes/* classes. 2017-07-27 00:41:44 +00:00
class-wp-widget-tag-cloud.php Docs: Remove `@access` notations from method DocBlocks in wp-includes/* classes. 2017-07-27 00:41:44 +00:00
class-wp-widget-text.php Widgets: Add shortcode support inside Text widgets. 2017-09-10 06:33:44 +00:00