WordPress.org

Make WordPress Core

Ticket #14435: 14435.17.diff

File 14435.17.diff, 1.5 KB (added by PeteMall, 9 years ago)

Remove role selector from network admin user-edit.

  • wp-admin/user-edit.php

     
    229229                <td><input type="text" name="user_login" id="user_login" value="<?php echo esc_attr($profileuser->user_login); ?>" disabled="disabled" class="regular-text" /> <span class="description"><?php _e('Usernames cannot be changed.'); ?></span></td>
    230230        </tr>
    231231
    232 <?php if ( !IS_PROFILE_PAGE ): ?>
     232<?php if ( !IS_PROFILE_PAGE && !is_network_admin() ): ?>
    233233<tr><th><label for="role"><?php _e('Role:') ?></label></th>
    234234<td><select name="role" id="role">
    235235<?php
     
    248248        echo '<option value="" selected="selected">' . __('&mdash; No role for this site &mdash;') . '</option>';
    249249?>
    250250</select>
    251 <?php if ( is_multisite() && is_network_admin() && current_user_can( 'manage_network_options' ) && !isset($super_admins) ) { ?>
     251<?php endif; //!IS_PROFILE_PAGE
     252if ( is_multisite() && is_network_admin() && current_user_can( 'manage_network_options' ) && !isset($super_admins) ) { ?>
     253<tr><th><label for="role">Super Admin</label></th>
     254<td>
    252255<p><label><input type="checkbox" id="super_admin" name="super_admin"<?php checked( is_super_admin( $profileuser->ID ) ); ?> /> <?php _e( 'Grant this user super admin privileges for the Network.'); ?></label></p>
    253256<?php } ?>
    254257</td></tr>
    255 <?php endif; //!IS_PROFILE_PAGE ?>
    256258
    257259<tr>
    258260        <th><label for="first_name"><?php _e('First Name') ?></label></th>