[wp-trac] [WordPress Trac] #40854: Allow media to be embedded in Text widget

WordPress Trac noreply at wordpress.org
Sat Sep 9 02:20:51 UTC 2017


#40854: Allow media to be embedded in Text widget
-------------------------------------+-----------------------
 Reporter:  alexvorn2                |       Owner:  azaozz
     Type:  enhancement              |      Status:  assigned
 Priority:  normal                   |   Milestone:  4.9
Component:  Widgets                  |     Version:  4.8
 Severity:  normal                   |  Resolution:
 Keywords:  has-patch needs-testing  |     Focuses:  ui
-------------------------------------+-----------------------

Comment (by westonruter):

 Cool. So then next we'll need to support for (a subset of) shortcodes for
 the widget. Given that shortcodes often rely on a `$post` global, we'd
 need to potentially temporarily unset this global variable so that the
 widget's doesn't attempt to use an unexpected post as context, e.g. the
 last post in The Loop on an archive page.

 The shortcodes and their handlers in core are:

  * `[wp_caption]` => `img_caption_shortcode()`
  * `[caption]` => `img_caption_shortcode()`
  * `[gallery]` => `gallery_shortcode()`
  * `[playlist]` => `wp_playlist_shortcode()`
  * `[audio]` => `wp_audio_shortcode()`
  * `[video]` => `wp_video_shortcode()`
  * `[embed]` => `WP_Embed::shortcode()`

 The one I know for sure will needs work here to work without a `$post`
 global is `embed`. And for that see #34115.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/40854#comment:21>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list