From 53a1d9b294e55e439f3fabab6b32c726350b3f3f Mon Sep 17 00:00:00 2001 From: Kelly Dwan Date: Fri, 22 Nov 2019 15:45:06 -0500 Subject: [PATCH] Return a plain text error string This is used in an alert box, so it can't contain HTML --- plugins/wporg-5ftf/includes/endpoints.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/wporg-5ftf/includes/endpoints.php b/plugins/wporg-5ftf/includes/endpoints.php index 84ad2c7..340d87e 100644 --- a/plugins/wporg-5ftf/includes/endpoints.php +++ b/plugins/wporg-5ftf/includes/endpoints.php @@ -30,7 +30,7 @@ function manage_contributors_handler() { if ( is_wp_error( $authenticated ) ) { wp_die( wp_json_encode( [ 'success' => false, - 'message' => $authenticated->get_error_message(), + 'message' => __( 'Sorry, you don\'t have permissions to do that.', 'wporg-5ftf' ), ] ) ); }