Only rely on is_super_admin for is_multisite when generating menu code. fixes #16184.
git-svn-id: http://svn.automattic.com/wordpress/trunk@17259 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
db4c62761a
commit
b8c4418d50
|
@ -169,7 +169,7 @@ if ( !empty($update_plugins->response) )
|
||||||
$update_count = count( $update_plugins->response );
|
$update_count = count( $update_plugins->response );
|
||||||
|
|
||||||
$menu_perms = get_site_option('menu_items', array());
|
$menu_perms = get_site_option('menu_items', array());
|
||||||
if ( is_super_admin() || ( is_multisite() && isset($menu_perms['plugins']) && $menu_perms['plugins'] ) ) {
|
if ( ! is_multisite() || ! empty( $menu_perms['plugins'] ) ) {
|
||||||
$count = "<span class='update-plugins count-$update_count'><span class='plugin-count'>" . number_format_i18n($update_count) . "</span></span>";
|
$count = "<span class='update-plugins count-$update_count'><span class='plugin-count'>" . number_format_i18n($update_count) . "</span></span>";
|
||||||
if ( is_multisite() )
|
if ( is_multisite() )
|
||||||
$count = '';
|
$count = '';
|
||||||
|
@ -206,7 +206,7 @@ $menu[75] = array( __('Tools'), 'edit_posts', 'tools.php', '', 'menu-top menu-ic
|
||||||
$submenu['tools.php'][15] = array( __('Export'), 'import', 'export.php' );
|
$submenu['tools.php'][15] = array( __('Export'), 'import', 'export.php' );
|
||||||
if ( is_multisite() && !is_main_site() )
|
if ( is_multisite() && !is_main_site() )
|
||||||
$submenu['tools.php'][25] = array( __('Delete Site'), 'manage_options', 'ms-delete-site.php' );
|
$submenu['tools.php'][25] = array( __('Delete Site'), 'manage_options', 'ms-delete-site.php' );
|
||||||
if ( ! is_multisite() && defined('WP_ALLOW_MULTISITE') && WP_ALLOW_MULTISITE && is_super_admin() )
|
if ( ! is_multisite() && defined('WP_ALLOW_MULTISITE') && WP_ALLOW_MULTISITE )
|
||||||
$submenu['tools.php'][50] = array(__('Network'), 'manage_options', 'network.php');
|
$submenu['tools.php'][50] = array(__('Network'), 'manage_options', 'network.php');
|
||||||
|
|
||||||
$menu[80] = array( __('Settings'), 'manage_options', 'options-general.php', '', 'menu-top menu-icon-settings', 'menu-settings', 'div' );
|
$menu[80] = array( __('Settings'), 'manage_options', 'options-general.php', '', 'menu-top menu-icon-settings', 'menu-settings', 'div' );
|
||||||
|
|
Loading…
Reference in New Issue