[wp-trac] [WordPress Trac] #42998: Custom HTML Widget uses widget_text twice in markup

WordPress Trac noreply at wordpress.org
Fri Dec 29 21:55:06 UTC 2017


#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:                |     Focuses:
--------------------------+------------------------------

Comment (by dreamwhisper):

 For additional information, this only happens if a theme alters the
 before_widget 'open' attribute to include an element with a class
 attribute. This is due to the regex in
 https://core.trac.wordpress.org/changeset/41117

 {{{#!php
 <?php
 register_sidebar( array(
                 'name' => __( 'Primary Widget Area', 'twentyten' ),
                 'id' => 'primary-widget-area',
                 'description' => __( 'Add widgets here to appear in your
 sidebar.', 'twentyten' ),
                 'before_widget' => '<div id="%1$s" class="widget-container
 %2$s"><div class="widget-wrap">',
                 'after_widget' => '</div></div>',
                 'before_title' => '<h3 class="widget-title">',
                 'after_title' => '</h3>',
         ) );
 }}}

--
Ticket URL: <https://core.trac.wordpress.org/ticket/42998#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list