Text Changes: Unify permission error messages.

The new format looks like "Sorry, you are not allowed to <action>.". This provides a consistent experience for all error messages related to missing permissions. It also reduces the number of similar strings and allows translators to provide a consistent style in their language.

Props ramiy, Presskopp.
Fixes #34521.

git-svn-id: https://develop.svn.wordpress.org/trunk@37914 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Dominik Schilling (ocean90)
2016-06-29 15:15:40 +00:00
parent 3715a70613
commit 206380180e
73 changed files with 207 additions and 207 deletions

View File

@@ -14,7 +14,7 @@ if ( ! is_multisite() )
wp_die( __( 'Multisite support is not enabled.' ) );
if ( ! current_user_can( 'manage_network_users' ) )
wp_die( __( 'You do not have permission to access this page.' ), 403 );
wp_die( __( 'Sorry, you are not allowed to access this page.' ), 403 );
if ( isset( $_GET['action'] ) ) {
/** This action is documented in wp-admin/network/edit.php */
@@ -23,7 +23,7 @@ if ( isset( $_GET['action'] ) ) {
switch ( $_GET['action'] ) {
case 'deleteuser':
if ( ! current_user_can( 'manage_network_users' ) )
wp_die( __( 'You do not have permission to access this page.' ), 403 );
wp_die( __( 'Sorry, you are not allowed to access this page.' ), 403 );
check_admin_referer( 'deleteuser' );
@@ -44,7 +44,7 @@ if ( isset( $_GET['action'] ) ) {
case 'allusers':
if ( !current_user_can( 'manage_network_users' ) )
wp_die( __( 'You do not have permission to access this page.' ), 403 );
wp_die( __( 'Sorry, you are not allowed to access this page.' ), 403 );
if ( ( isset( $_POST['action']) || isset($_POST['action2'] ) ) && isset( $_POST['allusers'] ) ) {
check_admin_referer( 'bulk-users-network' );
@@ -57,7 +57,7 @@ if ( isset( $_GET['action'] ) ) {
switch ( $doaction ) {
case 'delete':
if ( ! current_user_can( 'delete_users' ) )
wp_die( __( 'You do not have permission to access this page.' ), 403 );
wp_die( __( 'Sorry, you are not allowed to access this page.' ), 403 );
$title = __( 'Users' );
$parent_file = 'users.php';
require_once( ABSPATH . 'wp-admin/admin-header.php' );
@@ -106,7 +106,7 @@ if ( isset( $_GET['action'] ) ) {
case 'dodelete':
check_admin_referer( 'ms-users-delete' );
if ( ! ( current_user_can( 'manage_network_users' ) && current_user_can( 'delete_users' ) ) )
wp_die( __( 'You do not have permission to access this page.' ), 403 );
wp_die( __( 'Sorry, you are not allowed to access this page.' ), 403 );
if ( ! empty( $_POST['blog'] ) && is_array( $_POST['blog'] ) ) {
foreach ( $_POST['blog'] as $id => $users ) {