WordPress.org

Make WordPress Core


Ignore:
Timestamp:
02/10/2011 08:37:26 PM (9 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 trunk

File:
1 edited

Legend:

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

    r17431 r17439  
    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.