WordPress.org

Make WordPress Core

Changeset 12908


Ignore:
Timestamp:
01/31/10 11:39:34 (4 years ago)
Author:
dd32
Message:

Hide Users -> Add New on MultiSite unless admin has enabled access to the page. See #11644

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/menu.php

    r12904 r12908  
    129129    $_wp_real_parent_file['profile.php'] = 'users.php'; // Back-compat for plugins adding submenus to profile.php. 
    130130    $submenu['users.php'][5] = array(__('Authors & Users'), 'edit_users', 'users.php'); 
    131     $submenu['users.php'][10] = array(_x('Add New', 'user'), 'create_users', 'user-new.php'); 
     131 
     132    if ( ! is_multisite() || get_site_option( 'add_new_users' ) ) 
     133        $submenu['users.php'][10] = array(_x('Add New', 'user'), 'create_users', 'user-new.php'); 
    132134 
    133135    $submenu['users.php'][15] = array(__('Your Profile'), 'read', 'profile.php'); 
Note: See TracChangeset for help on using the changeset viewer.