[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
Tue Jul 4 23:19:59 UTC 2017


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

Comment (by westonruter):

 Replying to [comment:41 emmtre]:
 > And what about shortcodes that add content with html markup? I still see
 a lot of cases with forms, etc where this won't work.

 Good point about shortcodes. The `wpautop` function is going to run on the
 `widget_text_content` filter at priority 10. This is ''after'' the
 `widget_text` filter applies. So if you have a plugin that add shortcode
 handling to the Text widget (since shortcodes are not processed by default
 in core) then it's true that `wpautop` could cause problems. So probably
 the solution here is to add another condition to the legacy mode detection
 to include the case when a shortcode is detected.

 Plugins that add shortcode support for the Text widget should use the
 `widget_text_content` filter at priority 11, in the same way that core
 applies shortcodes on the `the_content` filter at priority 11, whereas
 `wpautop` runs at priority 10.

 Patch has been updated on that ticket to implement this:
 https://core.trac.wordpress.org/ticket/40951#comment:106

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


More information about the wp-trac mailing list