From 3da487037d69162a4825999cbd4507717a947dd7 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Tue, 21 Jul 2020 21:59:46 +0000 Subject: [PATCH] REST API: Use consistent error messages when managing network plugins. Props ramiy. Fixes #50729. git-svn-id: https://develop.svn.wordpress.org/trunk@48556 602fd350-edb4-49c9-b593-d223f7449a82 --- .../rest-api/endpoints/class-wp-rest-plugins-controller.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-includes/rest-api/endpoints/class-wp-rest-plugins-controller.php b/src/wp-includes/rest-api/endpoints/class-wp-rest-plugins-controller.php index 5654879ee5..1fec28b618 100644 --- a/src/wp-includes/rest-api/endpoints/class-wp-rest-plugins-controller.php +++ b/src/wp-includes/rest-api/endpoints/class-wp-rest-plugins-controller.php @@ -640,7 +640,7 @@ class WP_REST_Plugins_Controller extends WP_REST_Controller { if ( is_multisite() && ( 'network-active' === $current_status || 'network-active' === $new_status ) && ! current_user_can( 'manage_network_plugins' ) ) { return new WP_Error( 'rest_cannot_manage_network_plugins', - __( 'Sorry, you do not have permission to manage network plugins.' ), + __( 'Sorry, you are not allowed to manage network plugins.' ), array( 'status' => rest_authorization_required_code() ) ); }