WPTavern: WordPress 4.8.1 Adds a Dedicated Custom HTML Widget
When WordPress 4.8 was released last month, it introduced TinyMCE functionality to the Text widget. Unfortunately, this caused issues for those who use Custom HTML as the Visual editor often strips out portions of the code.
WordPress 4.8.1 Beta 1 is available for testing and addresses this problem by including a dedicated Custom HTML widget.
“For advanced users or any user who needs to paste in HTML snippets, there is now a dedicated ‘Custom HTML’ widget that is specifically for adding arbitrary HTML to your sidebar,” Weston Ruter, said.
“This widget will retain the application of the widget_text
filters, in addition to having a new dedicated widget_custom_html_content
filter.
“For use cases that involve adding content to your sidebar, the Text widget will continue to feature the same Visual editing interface that the post editor has (TinyMCE).”
Users who access Text widgets that have Custom HTML in WordPress 4.8.1, will see a note at the top of the widget that suggests using the Custom HTML widget.
If a user pastes or types HTML into a text widget with the Visual editor active, WordPress displays an Admin Pointer suggesting that they use the Text tab instead or use the Custom HTML widget.
Text Widget Admin Pointer
The Custom HTML widget works similar to the Text widget in WordPress 4.7 and below.
Custom HTML Widget
Sites that have existing Text widgets containing custom HTML that may be modified by the Visual editor, are opened in a legacy mode.
Legacy mode retains the old Text widget interface, including the checkbox on whether or not to automatically add paragraphs. This change prevents the Visual editor from altering code.
Ruter says the ideal way to test these improvements is to install it on a staging site that has Text widgets containing HTML and are known to be problematic in WordPress 4.8. After upgrading, check to see if the widgets open in legacy mode.
WordPress 4.8.1 is scheduled to be released on August 1st. Please report any bugs or errors you encounter in as much detail as possible to the WordPress Alpha/Beta section of the support forums.
Source: WordPress