[wp-trac] [WordPress Trac] #40907: Introduce widget dedicated for HTML code

WordPress Trac noreply at wordpress.org
Tue Jul 18 02:20:21 UTC 2017


#40907: Introduce widget dedicated for HTML code
--------------------------------------+--------------------------
 Reporter:  westonruter               |       Owner:  westonruter
     Type:  feature request           |      Status:  reopened
 Priority:  normal                    |   Milestone:  4.8.1
Component:  Widgets                   |     Version:  4.8
 Severity:  normal                    |  Resolution:
 Keywords:  has-patch has-unit-tests  |     Focuses:
--------------------------------------+--------------------------

Comment (by slewisma):

 Many sites where the new text widget created challenges for me also depend
 on shortcodes in widgets as enabled in my plugin or functions.php code.

 The issue of how / whether to apply filters from the text widget to the
 html widget is a battle of bad choices in my opinion. The cleanest
 solution would be to give the html widget its own filters and ask us to
 enable shortcode processing if we need it but I appreciate the magnitude
 of backwards compatibility impacts of doing this the "right", clean way.

 If either of the alternatives (just enable shortcodes if they are enabled
 explicitly for the text widget or apply all text widget filters to the
 html widget) are implemented, is there a way to make it a short-term
 solution and indicate that developers should add filters to html widgets
 explicitly by some future date or release?



 Replying to [comment:61 westonruter]:
 > As noted in [https://core.trac.wordpress.org/ticket/40951#comment:154
 #40951 (comment 154)], we may want to update the Custom HTML widget to
 explicitly add the just-in-time shortcode support if a plugin had added
 support for it. See [attachment:custom-html-widget-shortcode-
 support.diff]. This would ensure that if a user moves from a Text widget
 to a Custom HTML widget, the shortcode handling will still work.
 >
 > Alternatively, we could just go ahead and apply all the `widget_text`
 filters to the Custom HTML instance instead. See [attachment:apply-
 widget_text-filter-in-custom-html-widget.diff].
 >
 > Thoughts?

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


More information about the wp-trac mailing list