Text Changes: Unify two permission error messages in `wp-admin/network/site-users.php`.

Props ramiy.
Fixes #38178. See #34521.

git-svn-id: https://develop.svn.wordpress.org/trunk@38665 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov 2016-09-27 23:51:12 +00:00
parent b97b0b4203
commit 01e8552fd6
1 changed files with 4 additions and 3 deletions

View File

@ -115,7 +115,7 @@ if ( $action ) {
case 'remove':
if ( ! current_user_can( 'remove_users' ) ) {
wp_die( __( 'You can’t remove users.' ) );
wp_die( __( 'Sorry, you are not allowed to remove users.' ) );
}
check_admin_referer( 'bulk-users' );
@ -138,8 +138,9 @@ if ( $action ) {
case 'promote':
check_admin_referer( 'bulk-users' );
$editable_roles = get_editable_roles();
if ( empty( $editable_roles[$_REQUEST['new_role']] ) )
wp_die(__('You can’t give users that role.'));
if ( empty( $editable_roles[ $_REQUEST['new_role'] ] ) ) {
wp_die( __( 'Sorry, you are not allowed to give users that role.' ) );
}
if ( isset( $_REQUEST['users'] ) ) {
$userids = $_REQUEST['users'];