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:
parent
b31a5258cd
commit
d8077eae05
|
@ -369,21 +369,27 @@ foreach ( $wp_registered_sidebars as $sidebar => $registered_sidebar ) {
|
||||||
$theme_sidebars[$sidebar] = $registered_sidebar;
|
$theme_sidebars[$sidebar] = $registered_sidebar;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="widget-liquid-right">
|
|
||||||
<div id="widgets-right">
|
|
||||||
<div class="sidebars-column-1">
|
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
$i = $split = 0;
|
$i = $split = 0;
|
||||||
|
$single_sidebar_class = '';
|
||||||
$sidebars_count = count( $theme_sidebars );
|
$sidebars_count = count( $theme_sidebars );
|
||||||
|
|
||||||
if ( $sidebars_count > 2 )
|
if ( $sidebars_count > 1 ) {
|
||||||
$split = ceil( $sidebars_count / 2 );
|
$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 ) {
|
foreach ( $theme_sidebars as $sidebar => $registered_sidebar ) {
|
||||||
$wrap_class = 'widgets-holder-wrap';
|
$wrap_class = 'widgets-holder-wrap';
|
||||||
|
|
Loading…
Reference in New Issue