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:
parent
e8e68a50f8
commit
048ac7df67
|
@ -4,7 +4,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @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.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
|
|
@ -79,7 +79,9 @@ class WP_Widget_Custom_HTML extends WP_Widget {
|
||||||
if ( ! empty( $title ) ) {
|
if ( ! empty( $title ) ) {
|
||||||
echo $args['before_title'] . $title . $args['after_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 $content;
|
||||||
|
echo '</div>';
|
||||||
echo $args['after_widget'];
|
echo $args['after_widget'];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue