mirror of
git://develop.git.wordpress.org/
synced 2025-01-17 21:08:44 +01:00
Introduce HTML5 widgets support.
When a theme supports HTML5 widgets via `add_theme_support( 'html5', 'widgets' )`, aside will be used instead of list markup. props LeoPeo, valendesigns. fixes #30556. git-svn-id: https://develop.svn.wordpress.org/trunk@31729 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
22f174c106
commit
bea0628880
@ -814,6 +814,12 @@ function register_sidebar($args = array()) {
|
||||
'after_title' => "</h2>\n",
|
||||
);
|
||||
|
||||
if ( current_theme_supports( 'html5', 'widgets' ) ) {
|
||||
$defaults['before_widget'] = '<aside id="%1$s" class="widget %2$s">';
|
||||
$defaults['after_widget'] = "</aside>\n";
|
||||
$defaults['before_title'] = '<h2 class="widget-title">';
|
||||
}
|
||||
|
||||
$sidebar = wp_parse_args( $args, $defaults );
|
||||
|
||||
$wp_registered_sidebars[$sidebar['id']] = $sidebar;
|
||||
|
Loading…
x
Reference in New Issue
Block a user