Definition:
function wp_dashboard() {}
Displays the dashboard.
Source code
function wp_dashboard() {
global $screen_layout_columns;
$screen = get_current_screen();
$hide2 = $hide3 = $hide4 = '';
switch ( $screen_layout_columns ) {
case 4:
$width = 'width:24.5%;';
break;
case 3:
$width = 'width:32.67%;';
$hide4 = 'display:none;';
break;
case 2:
$width = 'width:49%;';
$hide3 = $hide4 = 'display:none;';
break;
default:
$width = 'width:98%;';
$hide2 = $hide3 = $hide4 = 'display:none;';
}
?>
<div id="dashboard-widgets" class="metabox-holder">
<?php
echo "\t<div class='postbox-container' style='$width'>\n";
do_meta_boxes( $screen->id, 'normal', '' );
echo "\t</div><div class='postbox-container' style='{$hide2}$width'>\n";
3527

February 12, 2011 


No comments yet... Be the first to leave a reply!