mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-12 12:50:28 +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:
@@ -20,7 +20,7 @@ if ( is_multisite() && ! is_network_admin() ) {
|
||||
}
|
||||
|
||||
if ( ! current_user_can( 'update_core' ) && ! current_user_can( 'update_themes' ) && ! current_user_can( 'update_plugins' ) )
|
||||
wp_die( __( 'You do not have sufficient permissions to update this site.' ) );
|
||||
wp_die( __( 'Sorry, you are not allowed to update this site.' ) );
|
||||
|
||||
/**
|
||||
*
|
||||
@@ -623,7 +623,7 @@ if ( 'upgrade-core' == $action ) {
|
||||
} elseif ( 'do-core-upgrade' == $action || 'do-core-reinstall' == $action ) {
|
||||
|
||||
if ( ! current_user_can( 'update_core' ) )
|
||||
wp_die( __( 'You do not have sufficient permissions to update this site.' ) );
|
||||
wp_die( __( 'Sorry, you are not allowed to update this site.' ) );
|
||||
|
||||
check_admin_referer('upgrade-core');
|
||||
|
||||
@@ -647,7 +647,7 @@ if ( 'upgrade-core' == $action ) {
|
||||
} elseif ( 'do-plugin-upgrade' == $action ) {
|
||||
|
||||
if ( ! current_user_can( 'update_plugins' ) )
|
||||
wp_die( __( 'You do not have sufficient permissions to update this site.' ) );
|
||||
wp_die( __( 'Sorry, you are not allowed to update this site.' ) );
|
||||
|
||||
check_admin_referer('upgrade-core');
|
||||
|
||||
@@ -675,7 +675,7 @@ if ( 'upgrade-core' == $action ) {
|
||||
} elseif ( 'do-theme-upgrade' == $action ) {
|
||||
|
||||
if ( ! current_user_can( 'update_themes' ) )
|
||||
wp_die( __( 'You do not have sufficient permissions to update this site.' ) );
|
||||
wp_die( __( 'Sorry, you are not allowed to update this site.' ) );
|
||||
|
||||
check_admin_referer('upgrade-core');
|
||||
|
||||
@@ -705,7 +705,7 @@ if ( 'upgrade-core' == $action ) {
|
||||
} elseif ( 'do-translation-upgrade' == $action ) {
|
||||
|
||||
if ( ! current_user_can( 'update_core' ) && ! current_user_can( 'update_plugins' ) && ! current_user_can( 'update_themes' ) )
|
||||
wp_die( __( 'You do not have sufficient permissions to update this site.' ) );
|
||||
wp_die( __( 'Sorry, you are not allowed to update this site.' ) );
|
||||
|
||||
check_admin_referer( 'upgrade-translations' );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user