Make WordPress Core


Ignore:
Timestamp:
02/10/2011 08:38:04 PM (14 years ago)
Author:
ryan
Message:

Disallow and hide user removal (as opposed to deletion) for single site installs. Removal is a multisite concept. Props nacin. fixes #16501 for 3.1

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/3.1/wp-admin/includes/class-wp-users-list-table.php

    r17432 r17440  
    122122        $actions = array();
    123123
    124         if ( !is_multisite() && current_user_can( 'delete_users' ) )
    125             $actions['delete'] = __( 'Delete' );
    126         else
    127             $actions['remove'] = __( 'Remove' );
     124        if ( is_multisite() ) {
     125            if ( current_user_can( 'remove_users' ) )
     126                $actions['remove'] = __( 'Remove' );
     127        } else {
     128            if ( current_user_can( 'delete_users' ) )
     129                $actions['delete'] = __( 'Delete' );
     130        }
    128131
    129132        return $actions;
Note: See TracChangeset for help on using the changeset viewer.