diff --git a/wp-admin/includes/template.php b/wp-admin/includes/template.php index cfa3dcc620..07cff56258 100644 --- a/wp-admin/includes/template.php +++ b/wp-admin/includes/template.php @@ -1809,9 +1809,13 @@ function user_row( $user_object, $style = '', $role = '', $numposts = 0 ) { $edit = "$user_object->user_login
"; // Set up the hover actions for this user + $del_cap_type = 'remove'; + if ( !is_multisite() && current_user_can('delete_users') ) + $del_cap_type = 'delete'; + $actions = array(); $actions['edit'] = '' . __('Edit') . ''; - if ( $current_user->ID != $user_object->ID ) + if ( $current_user->ID != $user_object->ID && current_user_can( $del_cap_type . '_user', $user_object->ID ) ) $actions['delete'] = "" . __('Delete') . ""; $actions = apply_filters('user_row_actions', $actions, $user_object); $action_count = count($actions);