Changeset 17440
- Timestamp:
- 02/10/2011 08:38:04 PM (14 years ago)
- Location:
- branches/3.1/wp-admin
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3.1/wp-admin/includes/class-wp-users-list-table.php
r17432 r17440 122 122 $actions = array(); 123 123 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 } 128 131 129 132 return $actions; -
branches/3.1/wp-admin/users.php
r17432 r17440 201 201 check_admin_referer('remove-users'); 202 202 203 if ( ! is_multisite() ) 204 wp_die( __( 'You can’t remove users.' ) ); 205 203 206 if ( empty($_REQUEST['users']) ) { 204 207 wp_redirect($redirect); … … 206 209 } 207 210 208 if ( ! current_user_can('remove_users'))209 die(__('You can’t remove users.'));211 if ( ! current_user_can( 'remove_users' ) ) 212 wp_die( __( 'You can’t remove users.' ) ); 210 213 211 214 $userids = $_REQUEST['users']; … … 234 237 235 238 check_admin_referer('bulk-users'); 239 240 if ( ! is_multisite() ) 241 wp_die( __( 'You can’t remove users.' ) ); 236 242 237 243 if ( empty($_REQUEST['users']) && empty($_REQUEST['user']) ) {
Note: See TracChangeset
for help on using the changeset viewer.