Make WordPress Core

Changeset 26286


Ignore:
Timestamp:
11/20/2013 05:08:22 AM (11 years ago)
Author:
azaozz
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/widgets.php

    r26285 r26286  
    370370    }
    371371}
     372
    372373?>
    373 
    374 </div>
    375 </div>
    376 
     374</div>
     375</div>
     376<?php
     377
     378$i = $split = 0;
     379$single_sidebar_class = '';
     380$sidebars_count = count( $theme_sidebars );
     381
     382if ( $sidebars_count > 1 ) {
     383    $split = ceil( $sidebars_count / 2 );
     384} else {
     385    $single_sidebar_class = ' class="single-sidebar"';
     386}
     387
     388?>
    377389<div class="widget-liquid-right">
    378 <div id="widgets-right">
     390<div id="widgets-right"<?php echo $single_sidebar_class; ?>>
    379391<div class="sidebars-column-1">
    380392<?php
    381 
    382 $i = $split = 0;
    383 $sidebars_count = count( $theme_sidebars );
    384 
    385 if ( $sidebars_count > 2 )
    386     $split = ceil( $sidebars_count / 2 );
    387393
    388394foreach ( $theme_sidebars as $sidebar => $registered_sidebar ) {
Note: See TracChangeset for help on using the changeset viewer.