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
..
2017-08-19 20:10:47 +00:00
2017-09-09 13:53:42 +00:00
2017-07-31 19:50:45 +00:00
2017-09-09 14:49:44 +00:00
2017-09-09 13:49:43 +00:00
2017-09-10 06:33:44 +00:00
2017-07-26 16:45:44 +00:00
2017-06-26 18:24:40 +00:00
2017-07-27 00:41:44 +00:00
2017-08-16 21:11:43 +00:00
2017-08-29 16:43:47 +00:00
2017-08-03 16:13:44 +00:00
2017-08-03 15:24:44 +00:00
2017-09-08 15:01:44 +00:00
2017-07-27 00:41:44 +00:00
2017-07-27 00:41:44 +00:00
2017-07-27 00:41:44 +00:00
2017-07-27 00:41:44 +00:00
2017-07-27 00:41:44 +00:00
2017-07-27 00:41:44 +00:00
2017-07-27 00:41:44 +00:00
2017-07-27 00:41:44 +00:00
2017-08-21 15:35:46 +00:00
2017-07-27 00:41:44 +00:00
2017-07-27 00:41:44 +00:00
2017-09-09 13:53:42 +00:00
2017-09-09 13:19:45 +00:00
2017-07-27 00:41:44 +00:00
2017-07-27 00:41:44 +00:00
2017-07-27 00:41:44 +00:00
2017-08-02 05:35:41 +00:00
2017-07-27 00:41:44 +00:00
2017-09-08 14:03:44 +00:00
2017-07-27 00:41:44 +00:00
2017-07-27 00:41:44 +00:00
2017-07-27 00:41:44 +00:00
2017-07-27 00:41:44 +00:00
2017-07-27 00:41:44 +00:00
2017-07-27 00:41:44 +00:00
2017-07-27 00:41:44 +00:00
2017-07-01 16:58:42 +00:00
2017-07-27 00:41:44 +00:00
2017-07-27 00:41:44 +00:00
2017-07-27 00:41:44 +00:00
2017-08-22 11:12:44 +00:00
2017-08-22 11:12:44 +00:00
2017-08-22 11:12:44 +00:00
2017-07-27 00:41:44 +00:00
2017-08-22 11:52:48 +00:00
2017-07-27 00:41:44 +00:00
2017-07-27 00:41:44 +00:00
2017-07-27 00:41:44 +00:00
2017-07-27 00:41:44 +00:00
2017-08-03 14:34:44 +00:00
2017-08-22 11:52:48 +00:00
2017-07-27 00:41:44 +00:00
2017-07-27 00:41:44 +00:00
2017-07-27 00:41:44 +00:00
2017-07-27 00:41:44 +00:00
2017-07-27 00:41:44 +00:00
2017-07-27 00:41:44 +00:00
2017-07-27 00:41:44 +00:00
2017-07-27 00:41:44 +00:00
2017-07-27 00:41:44 +00:00
2017-07-27 00:41:44 +00:00
2017-09-04 11:17:43 +00:00
2017-07-27 00:41:44 +00:00
2017-07-27 00:41:44 +00:00
2017-07-27 00:41:44 +00:00
2017-07-27 00:41:44 +00:00
2017-07-27 00:41:44 +00:00
2017-07-27 00:41:44 +00:00
2017-08-01 20:44:43 +00:00
2017-07-27 00:41:44 +00:00
2017-07-27 00:41:44 +00:00
2017-07-27 00:41:44 +00:00
2017-07-27 00:41:44 +00:00
2017-07-27 00:41:44 +00:00
2017-07-27 00:41:44 +00:00
2017-07-27 00:41:44 +00:00
2017-07-27 00:41:44 +00:00
2017-07-27 00:41:44 +00:00
2017-07-27 00:41:44 +00:00
2017-07-27 00:41:44 +00:00
2017-08-20 20:13:47 +00:00
2017-07-01 13:36:41 +00:00
2017-07-28 01:15:52 +00:00
2017-06-30 04:54:41 +00:00
2017-07-27 00:41:44 +00:00
2017-08-22 11:52:48 +00:00
2017-09-10 06:33:44 +00:00
2017-08-24 17:53:27 +00:00
2017-08-22 11:52:48 +00:00
2017-07-16 01:15:46 +00:00
2017-08-25 23:28:45 +00:00
2017-08-22 11:52:48 +00:00
2017-08-04 23:01:44 +00:00
2017-06-25 22:06:41 +00:00
2017-06-25 22:16:40 +00:00
2017-08-22 11:52:48 +00:00
2017-08-09 04:07:43 +00:00
2017-07-01 22:13:41 +00:00
2017-08-31 11:17:45 +00:00
2017-09-01 12:28:46 +00:00
2017-09-04 08:16:44 +00:00
2017-08-22 11:52:48 +00:00
2017-08-30 19:53:45 +00:00
2017-08-22 11:52:48 +00:00
2017-07-05 21:31:44 +00:00
2017-08-09 21:04:47 +00:00
2017-08-12 13:11:43 +00:00
2017-08-03 13:21:46 +00:00
2017-08-23 15:52:46 +00:00
2017-08-20 20:03:54 +00:00
2017-06-13 01:11:43 +00:00
2017-08-18 18:19:44 +00:00
2017-09-09 13:53:42 +00:00
2017-07-27 08:19:43 +00:00
2017-08-10 01:38:43 +00:00
2017-09-09 20:44:44 +00:00
2017-08-20 20:38:42 +00:00
2017-07-28 01:15:52 +00:00
2017-08-31 12:26:42 +00:00
2017-06-29 16:05:41 +00:00
2017-09-09 13:19:45 +00:00
2017-08-22 11:52:48 +00:00
2017-06-15 12:05:42 +00:00
2017-09-10 06:33:44 +00:00
2017-09-06 21:32:43 +00:00
2017-08-12 12:48:47 +00:00