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. Built from https://develop.svn.wordpress.org/trunk@37914 git-svn-id: http://core.svn.wordpress.org/trunk@37855 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -16,7 +16,7 @@ if ( ! isset( $_GET['inline'] ) )
|
||||
require_once( dirname( __FILE__ ) . '/admin.php' );
|
||||
|
||||
if ( ! current_user_can( 'upload_files' ) ) {
|
||||
wp_die( __( 'You do not have permission to upload files.' ), 403 );
|
||||
wp_die( __( 'Sorry, you are not allowed to upload files.' ), 403 );
|
||||
}
|
||||
|
||||
wp_enqueue_script('plupload-handlers');
|
||||
@@ -43,7 +43,7 @@ if ( isset( $action ) && $action == 'edit' && !$ID ) {
|
||||
if ( ! empty( $_REQUEST['post_id'] ) && ! current_user_can( 'edit_post' , $_REQUEST['post_id'] ) ) {
|
||||
wp_die(
|
||||
'<h1>' . __( 'Cheatin’ uh?' ) . '</h1>' .
|
||||
'<p>' . __( 'You are not allowed to edit this item.' ) . '</p>',
|
||||
'<p>' . __( 'Sorry, you are not allowed to edit this item.' ) . '</p>',
|
||||
403
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user