Widgets: fix html for sidebars columns when the theme has only one sidebar. See #25952.

git-svn-id: https://develop.svn.wordpress.org/trunk@26286 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Ozz 2013-11-20 05:08:22 +00:00
parent b31a5258cd
commit d8077eae05
1 changed files with 12 additions and 6 deletions

View File

@ -369,21 +369,27 @@ foreach ( $wp_registered_sidebars as $sidebar => $registered_sidebar ) {
$theme_sidebars[$sidebar] = $registered_sidebar;
}
}
?>
</div>
</div>
<div class="widget-liquid-right">
<div id="widgets-right">
<div class="sidebars-column-1">
<?php
$i = $split = 0;
$single_sidebar_class = '';
$sidebars_count = count( $theme_sidebars );
if ( $sidebars_count > 2 )
if ( $sidebars_count > 1 ) {
$split = ceil( $sidebars_count / 2 );
} else {
$single_sidebar_class = ' class="single-sidebar"';
}
?>
<div class="widget-liquid-right">
<div id="widgets-right"<?php echo $single_sidebar_class; ?>>
<div class="sidebars-column-1">
<?php
foreach ( $theme_sidebars as $sidebar => $registered_sidebar ) {
$wrap_class = 'widgets-holder-wrap';