mirror of
https://github.com/WordPress/WordPress.git
synced 2024-11-12 13:44:21 +01:00
Site Health: Use consistent error messages when switching plugin or theme auto-updates on or off.
Props ramiy. Fixes #50721. Built from https://develop.svn.wordpress.org/trunk@48534 git-svn-id: http://core.svn.wordpress.org/trunk@48296 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
3cd9474d68
commit
d1822e81ba
@ -5324,7 +5324,7 @@ function wp_ajax_toggle_auto_updates() {
|
|||||||
switch ( $type ) {
|
switch ( $type ) {
|
||||||
case 'plugin':
|
case 'plugin':
|
||||||
if ( ! current_user_can( 'update_plugins' ) ) {
|
if ( ! current_user_can( 'update_plugins' ) ) {
|
||||||
$error_message = __( 'You do not have permission to modify plugins.' );
|
$error_message = __( 'Sorry, you are not allowed to modify plugins.' );
|
||||||
wp_send_json_error( array( 'error' => $error_message ) );
|
wp_send_json_error( array( 'error' => $error_message ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -5334,7 +5334,7 @@ function wp_ajax_toggle_auto_updates() {
|
|||||||
break;
|
break;
|
||||||
case 'theme':
|
case 'theme':
|
||||||
if ( ! current_user_can( 'update_themes' ) ) {
|
if ( ! current_user_can( 'update_themes' ) ) {
|
||||||
$error_message = __( 'You do not have permission to modify themes.' );
|
$error_message = __( 'Sorry, you are not allowed to modify themes.' );
|
||||||
wp_send_json_error( array( 'error' => $error_message ) );
|
wp_send_json_error( array( 'error' => $error_message ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '5.5-beta2-48533';
|
$wp_version = '5.5-beta2-48534';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
Loading…
Reference in New Issue
Block a user