Widgets: Improve theme styling compatibility for Custom HTML widget by adding container with `textwidget` class.

The same styling from the Text widget should apply to the Custom HTML widget since users are expected to copy HTML from the (legacy) Text widget into the latter.

Amends [40893].
See #40907.
Fixes #41392.

Built from https://develop.svn.wordpress.org/trunk@41115


git-svn-id: http://core.svn.wordpress.org/trunk@40955 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Weston Ruter 2017-07-21 18:13:45 +00:00
parent e8e68a50f8
commit 048ac7df67
2 changed files with 3 additions and 1 deletions

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.9-alpha-41114';
$wp_version = '4.9-alpha-41115';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.

View File

@ -79,7 +79,9 @@ class WP_Widget_Custom_HTML extends WP_Widget {
if ( ! empty( $title ) ) {
echo $args['before_title'] . $title . $args['after_title'];
}
echo '<div class="textwidget custom-html-widget">'; // The textwidget class is for theme styling compatibility.
echo $content;
echo '</div>';
echo $args['after_widget'];
}