mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 20:30:23 +00:00
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:
@@ -47,7 +47,7 @@ if ( empty($option_page) ) {
|
||||
if ( ! current_user_can( $capability ) ) {
|
||||
wp_die(
|
||||
'<h1>' . __( 'Cheatin’ uh?' ) . '</h1>' .
|
||||
'<p>' . __( 'You are not allowed to manage these items.' ) . '</p>',
|
||||
'<p>' . __( 'Sorry, you are not allowed to manage these items.' ) . '</p>',
|
||||
403
|
||||
);
|
||||
}
|
||||
@@ -76,7 +76,7 @@ if ( is_multisite() ) {
|
||||
if ( is_multisite() && ! is_super_admin() && 'update' != $action ) {
|
||||
wp_die(
|
||||
'<h1>' . __( 'Cheatin’ uh?' ) . '</h1>' .
|
||||
'<p>' . __( 'You are not allowed to delete these items.' ) . '</p>',
|
||||
'<p>' . __( 'Sorry, you are not allowed to delete these items.' ) . '</p>',
|
||||
403
|
||||
);
|
||||
}
|
||||
@@ -160,7 +160,7 @@ if ( 'update' == $action ) {
|
||||
|
||||
if ( 'options' == $option_page ) {
|
||||
if ( is_multisite() && ! is_super_admin() )
|
||||
wp_die( __( 'You do not have sufficient permissions to modify unregistered settings for this site.' ) );
|
||||
wp_die( __( 'Sorry, you are not allowed to modify unregistered settings for this site.' ) );
|
||||
$options = explode( ',', wp_unslash( $_POST[ 'page_options' ] ) );
|
||||
} else {
|
||||
$options = $whitelist_options[ $option_page ];
|
||||
|
||||
Reference in New Issue
Block a user