Fix warnings in menu.php when plugins.php is enabled for non-supes. Props PeteMall. fixes #17702
git-svn-id: http://svn.automattic.com/wordpress/trunk@18169 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
2de8d4818d
commit
ebdc0d02b6
|
@ -174,11 +174,12 @@ function _add_themes_utility_last() {
|
|||
add_submenu_page('themes.php', _x('Editor', 'theme editor'), _x('Editor', 'theme editor'), 'edit_themes', 'theme-editor.php');
|
||||
}
|
||||
|
||||
$menu_perms = get_site_option('menu_items', array());
|
||||
$menu_perms = get_site_option( 'menu_items', array() );
|
||||
if ( ! is_multisite() || is_super_admin() || ! empty( $menu_perms['plugins'] ) ) {
|
||||
$count = "<span class='update-plugins count-$plugin_update_count'><span class='plugin-count'>" . number_format_i18n($plugin_update_count) . "</span></span>";
|
||||
if ( is_multisite() || ! current_user_can( 'update_plugins' ) )
|
||||
$count = '';
|
||||
$count = '';
|
||||
if ( ! is_multisite() && current_user_can( 'update_plugins' ) )
|
||||
$count = "<span class='update-plugins count-$plugin_update_count'><span class='plugin-count'>" . number_format_i18n($plugin_update_count) . "</span></span>";
|
||||
|
||||
$menu[65] = array( sprintf( __('Plugins %s'), $count ), 'activate_plugins', 'plugins.php', '', 'menu-top menu-icon-plugins', 'menu-plugins', 'div' );
|
||||
|
||||
$submenu['plugins.php'][5] = array( __('Installed Plugins'), 'activate_plugins', 'plugins.php' );
|
||||
|
|
Loading…
Reference in New Issue