Text Changes: Merge and clarify some permission error strings in the admin.

See #38857.

git-svn-id: https://develop.svn.wordpress.org/trunk@39308 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov 2016-11-19 01:37:25 +00:00
parent abfbc08c34
commit 81353e76be
3 changed files with 6 additions and 6 deletions

View File

@ -18,13 +18,13 @@ if ( ! $tax )
wp_die( __( 'Invalid taxonomy.' ) );
if ( ! in_array( $tax->name, get_taxonomies( array( 'show_ui' => true ) ) ) ) {
wp_die( __( 'Sorry, you are not allowed to manage these items.' ) );
wp_die( __( 'Sorry, you are not allowed to edit terms in this taxonomy.' ) );
}
if ( ! current_user_can( $tax->cap->manage_terms ) ) {
wp_die(
'<h1>' . __( 'Cheatin&#8217; uh?' ) . '</h1>' .
'<p>' . __( 'Sorry, you are not allowed to manage these items.' ) . '</p>',
'<p>' . __( 'Sorry, you are not allowed to manage terms in this taxonomy.' ) . '</p>',
403
);
}
@ -74,7 +74,7 @@ case 'add-tag':
if ( ! current_user_can( $tax->cap->edit_terms ) ) {
wp_die(
'<h1>' . __( 'Cheatin&#8217; uh?' ) . '</h1>' .
'<p>' . __( 'Sorry, you are not allowed to add this item.' ) . '</p>',
'<p>' . __( 'Sorry, you are not allowed to create terms in this taxonomy.' ) . '</p>',
403
);
}

View File

@ -47,7 +47,7 @@ if ( empty($option_page) ) {
if ( ! current_user_can( $capability ) ) {
wp_die(
'<h1>' . __( 'Cheatin&#8217; uh?' ) . '</h1>' .
'<p>' . __( 'Sorry, you are not allowed to manage these items.' ) . '</p>',
'<p>' . __( 'Sorry, you are not allowed to manage these options.' ) . '</p>',
403
);
}

View File

@ -94,7 +94,7 @@ case 'promote':
check_admin_referer('bulk-users');
if ( ! current_user_can( 'promote_users' ) )
wp_die( __( 'Sorry, you are not allowed to edit that user.' ) );
wp_die( __( 'Sorry, you are not allowed to edit this user.' ) );
if ( empty($_REQUEST['users']) ) {
wp_redirect($redirect);
@ -119,7 +119,7 @@ case 'promote':
$id = (int) $id;
if ( ! current_user_can('promote_user', $id) )
wp_die(__('Sorry, you are not allowed to edit that user.'));
wp_die(__('Sorry, you are not allowed to edit this user.'));
// The new role of the current user must also have the promote_users cap or be a multisite super admin
if ( $id == $current_user->ID && ! $wp_roles->role_objects[ $role ]->has_cap('promote_users')
&& ! ( is_multisite() && is_super_admin() ) ) {