[wp-trac] [WordPress Trac] #33473: Shortcodes + Widgets. Unified "component" API (aka Content Blocks)

WordPress Trac noreply at wordpress.org
Thu Mar 17 23:46:36 UTC 2016


#33473: Shortcodes + Widgets. Unified "component" API (aka Content Blocks)
-----------------------------+-----------------------------
 Reporter:  brentjett@…      |       Owner:
     Type:  feature request  |      Status:  new
 Priority:  normal           |   Milestone:  Future Release
Component:  Widgets          |     Version:
 Severity:  normal           |  Resolution:
 Keywords:                   |     Focuses:
-----------------------------+-----------------------------

Comment (by westonruter):

 The quickest way to an initial functioning feature plugin I think would be
 to introduce a `widget` shortcode, and then to implement Shortcake support
 for this shortcode as a Post Element, bringing in the widget form into the
 Shortcake UI. Integrating the widget form would be vastly simplified once
 #33507 is implemented (via Fields API). The TinyMCE view for previewing
 this widget in the content could then be generated by an Ajax call to
 `the_widget()`. A widget would need to indicate the stylesheet to be used
 in a TinyMCE view context. As for where the widget data is stored when it
 is used in a shortcode: there could be an `id` attribute for the `widget`
 shortcode that could point to a pre-existing widget to pull in. This would
 be handy for re-using a widget across multiple pages, similar to an image
 from the media library.

 The opposite integration, allowing a shortcode to be used as a widget, is
 described here: https://github.com/wp-shortcake/shortcake/issues/210

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


More information about the wp-trac mailing list