Display dash submenus correctly for all combinations of multisite and super admin.

git-svn-id: http://svn.automattic.com/wordpress/trunk@13589 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2010-03-04 23:11:51 +00:00
parent 13d204b3f9
commit 274a3f69fb
1 changed files with 6 additions and 5 deletions

View File

@ -43,14 +43,15 @@ if ( is_multisite() && is_super_admin() ) {
$menu[2] = array( __('Dashboard'), 'read', 'index.php', '', 'menu-top menu-top-first', 'menu-dashboard', 'div' );
}
if ( is_multisite() || is_super_admin() )
$submenu[ 'index.php' ][0] = array( __('Dashboard'), 'read', 'index.php' );
if ( is_multisite() )
$submenu[ 'index.php' ][5] = array( __('My Sites'), 'read', 'my-sites.php' );
if ( is_super_admin() )
$submenu[ 'index.php' ][10] = array( __('Updates'), 'install_plugins', 'update-core.php');
if ( is_multisite() ) {
$submenu[ 'index.php' ][0] = array( __('Dashboard'), 'read', 'index.php' );
$submenu[ 'index.php' ][5] = array( __('My Sites'), 'read', 'my-sites.php' );
}
$menu[4] = array( '', 'read', 'separator1', '', 'wp-menu-separator' );
$menu[5] = array( __('Posts'), 'edit_posts', 'edit.php', '', 'open-if-no-js menu-top', 'menu-posts', 'div' );