mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-03-30 02:04:26 +00:00
Don't show plugin editor when there are no plugins. props solarissmoke, fixes #13117.
git-svn-id: https://develop.svn.wordpress.org/trunk@14290 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -168,9 +168,11 @@ if ( is_super_admin() || ( is_multisite() && isset($menu_perms['plugins']) && $m
|
||||
$submenu['plugins.php'][5] = array( __('Installed'), 'activate_plugins', 'plugins.php' );
|
||||
/* translators: add new plugin */
|
||||
$submenu['plugins.php'][10] = array(_x('Add New', 'plugin'), 'install_plugins', 'plugin-install.php');
|
||||
$submenu['plugins.php'][15] = array( _x('Editor', 'plugin editor'), 'edit_plugins', 'plugin-editor.php' );
|
||||
$plugins = get_plugins();
|
||||
if( !empty($plugins) )
|
||||
$submenu['plugins.php'][15] = array( _x('Editor', 'plugin editor'), 'edit_plugins', 'plugin-editor.php' );
|
||||
}
|
||||
unset($menu_perms, $update_plugins, $update_count);
|
||||
unset($menu_perms, $update_plugins, $update_count, $plugins);
|
||||
|
||||
if ( current_user_can('list_users') )
|
||||
$menu[70] = array( __('Users'), 'list_users', 'users.php', '', 'menu-top menu-icon-users', 'menu-users', 'div' );
|
||||
|
||||
Reference in New Issue
Block a user