Default some widgets to the side

git-svn-id: https://develop.svn.wordpress.org/trunk@9447 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2008-10-31 21:04:48 +00:00
parent dee3f707b0
commit 9ea4441dca
1 changed files with 5 additions and 1 deletions

View File

@ -115,7 +115,11 @@ function wp_add_dashboard_widget( $widget_id, $widget_name, $callback, $control_
list($url) = explode( '#', add_query_arg( 'edit', $widget_id ), 2 );
$widget_name .= ' <a href="' . clean_url( "$url#$widget_id" ) . '" class="edit-box open-box">' . __( 'Edit' ) . '</a>';
}
add_meta_box( $widget_id, $widget_name , $callback, 'dashboard', 'normal', 'core' );
$side_widgets = array('dashboard_quick_press', 'dashboard_recent_drafts', 'dashboard_primary', 'dashboard_secondary');
$location = 'normal';
if ( in_array($widget_id, $side_widgets) )
$location = 'side';
add_meta_box( $widget_id, $widget_name , $callback, 'dashboard', $location, 'core' );
}
function _wp_dashboard_control_callback( $dashboard, $meta_box ) {