From eca137d68f8c07cbe9e6d05d33ef20d2a02f2e33 Mon Sep 17 00:00:00 2001 From: Dion Hulse Date: Sun, 31 Jan 2010 11:39:34 +0000 Subject: [PATCH] Hide Users -> Add New on MultiSite unless admin has enabled access to the page. See #11644 git-svn-id: https://develop.svn.wordpress.org/trunk@12908 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-admin/menu.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/wp-admin/menu.php b/wp-admin/menu.php index 90cb20ff23..9abea74fa3 100644 --- a/wp-admin/menu.php +++ b/wp-admin/menu.php @@ -128,7 +128,9 @@ else if ( current_user_can('edit_users') ) { $_wp_real_parent_file['profile.php'] = 'users.php'; // Back-compat for plugins adding submenus to profile.php. $submenu['users.php'][5] = array(__('Authors & Users'), 'edit_users', 'users.php'); - $submenu['users.php'][10] = array(_x('Add New', 'user'), 'create_users', 'user-new.php'); + + if ( ! is_multisite() || get_site_option( 'add_new_users' ) ) + $submenu['users.php'][10] = array(_x('Add New', 'user'), 'create_users', 'user-new.php'); $submenu['users.php'][15] = array(__('Your Profile'), 'read', 'profile.php'); } else { @@ -361,4 +363,4 @@ if (! user_can_access_admin_page()) { wp_die( __('You do not have sufficient permissions to access this page.') ); } -?> +?> \ No newline at end of file