Hide Users -> Add New on MultiSite unless admin has enabled access to the page. See #11644
git-svn-id: http://svn.automattic.com/wordpress/trunk@12908 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
72a4e7a350
commit
6b5cba1de8
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue