Default some widgets to the side

git-svn-id: http://svn.automattic.com/wordpress/trunk@9447 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2008-10-31 21:04:48 +00:00
parent b0e741b6af
commit 9a7fcfdd23
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 ) {