Make WordPress Core


Ignore:
Timestamp:
08/23/2011 04:00:56 AM (14 years ago)
Author:
azaozz
Message:

Auto column switching for the dashboard, see #18198

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/dashboard.php

    r18555 r18582  
    201201    switch ( $screen_layout_columns ) {
    202202        case 4:
    203             $width = 'width:24.5%;';
     203            $width = 'width:25%;';
    204204            break;
    205205        case 3:
    206             $width = 'width:32.67%;';
     206            $width = 'width:33.333333%;';
    207207            $hide4 = 'display:none;';
    208208            break;
    209209        case 2:
    210             $width = 'width:49%;';
     210            $width = 'width:50%;';
    211211            $hide3 = $hide4 = 'display:none;';
    212212            break;
    213213        default:
    214             $width = 'width:98%;';
     214            $width = 'width:100%;';
    215215            $hide2 = $hide3 = $hide4 = 'display:none;';
    216216    }
     
    218218<div id="dashboard-widgets" class="metabox-holder">
    219219<?php
    220     echo "\t<div class='postbox-container' style='$width'>\n";
     220    echo "\t<div id='postbox-container-1' class='postbox-container' style='$width'>\n";
    221221    do_meta_boxes( $screen->id, 'normal', '' );
    222222
    223     echo "\t</div><div class='postbox-container' style='{$hide2}$width'>\n";
     223    echo "\t</div><div id='postbox-container-2' class='postbox-container' style='{$hide2}$width'>\n";
    224224    do_meta_boxes( $screen->id, 'side', '' );
    225225
    226     echo "\t</div><div class='postbox-container' style='{$hide3}$width'>\n";
     226    echo "\t</div><div id='postbox-container-3' class='postbox-container' style='{$hide3}$width'>\n";
    227227    do_meta_boxes( $screen->id, 'column3', '' );
    228228
    229     echo "\t</div><div class='postbox-container' style='{$hide4}$width'>\n";
     229    echo "\t</div><div id='postbox-container-4' class='postbox-container' style='{$hide4}$width'>\n";
    230230    do_meta_boxes( $screen->id, 'column4', '' );
    231231?>
Note: See TracChangeset for help on using the changeset viewer.