[wp-trac] [WordPress Trac] #40960: Widgets: The Text widget should respect the “Disable the visual editor when writing” setting

WordPress Trac noreply at wordpress.org
Mon Jun 19 18:09:12 UTC 2017


#40960: Widgets: The Text widget should respect the “Disable the visual editor when
writing” setting
--------------------------+--------------------
 Reporter:  westonruter   |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  4.8.1
Component:  Widgets       |     Version:  4.8
 Severity:  major         |  Resolution:
 Keywords:  needs-patch   |     Focuses:
--------------------------+--------------------

Comment (by j893):

 Additionally, Wordpress is long overdue for a "Code" widget that is
 specifically for placing raw code (shortcodes, javascript, SVG, HTML,
 etc.).  This is what people ''would'' have been using if it had been
 available, and then now the additional of the visual editor to the text
 widget would not be breaking anything and would have been the welcome
 additional it was hoped to be...

 But for now, please have it default to the "Text" tab at least, and not
 the visual editor, and not convert anything without asking!  This change
 caused an ongoing crisis on dozens of my sites as users went and edited a
 widget like they usually do, but then had all the code-containing widgets
 insta-break on them.

 Sure one can use:

 {{{
 remove_filter('widget_text_content', 'wpautop');
 remove_filter('widget_text_content', 'wptexturize');
 remove_filter('widget_text_content', 'capital_P_dangit');
 remove_filter('widget_text_content', 'convert_smilies');
 }}}


 but that doesn't help keep any code from being mangled when changing over
 to the visual editor and back to text (and it always defaults to "Visual"
 now).

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


More information about the wp-trac mailing list