From 3ef1fa5c6d1aba3ff0a36aca3b7e8b1d38a066f5 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Tue, 21 Jul 2020 14:40:43 +0000 Subject: [PATCH] Site Health: Use consistent error messages when switching plugin or theme auto-updates on or off. Props ramiy. Fixes #50721. git-svn-id: https://develop.svn.wordpress.org/trunk@48534 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/includes/ajax-actions.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/wp-admin/includes/ajax-actions.php b/src/wp-admin/includes/ajax-actions.php index ee2d186481..fa3dde021d 100644 --- a/src/wp-admin/includes/ajax-actions.php +++ b/src/wp-admin/includes/ajax-actions.php @@ -5324,7 +5324,7 @@ function wp_ajax_toggle_auto_updates() { switch ( $type ) { case 'plugin': 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 ) ); } @@ -5334,7 +5334,7 @@ function wp_ajax_toggle_auto_updates() { break; case 'theme': 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 ) ); }