[wp-trac] [WordPress Trac] #42998: Custom HTML Widget uses widget_text twice in markup
WordPress Trac
noreply at wordpress.org
Mon Jan 8 18:31:31 UTC 2018
#42998: Custom HTML Widget uses widget_text twice in markup
-------------------------------------------+------------------------------
Reporter: dreamwhisper | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Widgets | Version: 4.8.1
Severity: normal | Resolution:
Keywords: reporter-feedback needs-patch | Focuses:
-------------------------------------------+------------------------------
Changes (by westonruter):
* keywords: needs-patch => reporter-feedback needs-patch
Comment:
The inclusion of the `widget_text` class on the Custom HTML widget was
intentional. It is for backwards-compatibility, when users switch from the
Text widget to the Custom HTML widget but want to retain styles. If you
want to target the Text widget without the Custom HTML widget, use the CSS
selector: `.widget_text:not(.widget_custom_html)`. See this dev note:
https://make.wordpress.org/core/2017/08/01/fixes-to-text-widget-and-
introduction-of-custom-html-widget-in-4-8-1/
Is this not what is being reported here?
The Custom HTML widget is injecting the `widget_text` class name via:
{{{
$args['before_widget'] = preg_replace( '/(?<=\sclass=["\'])/',
'widget_text ', $args['before_widget'] );
}}}
Is this causing a problem?
--
Ticket URL: <https://core.trac.wordpress.org/ticket/42998#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list