WordPress.org

Make WordPress Core

Ticket #30556: 30556.1.diff

File 30556.1.diff, 608 bytes (added by valendesigns, 5 years ago)
  • src/wp-includes/widgets.php

    diff --git src/wp-includes/widgets.php src/wp-includes/widgets.php
    index 2e710cc..9a530e3 100644
    function register_sidebar($args = array()) { 
    814814                'after_title' => "</h2>\n",
    815815        );
    816816
     817        if ( current_theme_supports( 'html5', 'widget' ) ) {
     818                $defaults['before_widget'] = '<aside id="%1$s" class="widget %2$s">';
     819                $defaults['after_widget'] = "</aside>\n";
     820                $defaults['before_title'] = '<h2 class="widget-title">';
     821        }
     822
    817823        $sidebar = wp_parse_args( $args, $defaults );
    818824
    819825        $wp_registered_sidebars[$sidebar['id']] = $sidebar;