[wp-trac] [WordPress Trac] #42998: Custom HTML Widget uses widget_text twice in markup
WordPress Trac
noreply at wordpress.org
Mon Jan 8 20:21:27 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:
-------------------------------------------+------------------------------
Comment (by dreamwhisper):
I agree that it should be included for the Custom HTML widget. However, I
think it should be included in a way that it only adds the `widget_text`
class to the section.
What's happening now is the regex is catching everything in the
before_widget markup.
Thus using `<div id="%1$s" class="widget-container %2$s"><div class
="widget-wrap">` for `before_widget` will result in the markup below for
the Custom HTML widget, but not the Text widget:
{{{
<section id="custom_html-2" class="widget_text widget widget_custom_html">
<div class="widget_text widget-wrap">
}}}
I don't think the intent was to add the class twice for both the section
and the div.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/42998#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list