From 9b23ccfc298598f23de5c890f8083da0276623d3 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Sun, 20 Nov 2016 11:46:34 +0000 Subject: [PATCH] REST API: Update error messages in `WP_REST_Comments_Controller` to use the common text for permission errors. Props ramiy. Fixes #38875. Built from https://develop.svn.wordpress.org/trunk@39321 git-svn-id: http://core.svn.wordpress.org/trunk@39261 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- .../rest-api/endpoints/class-wp-rest-comments-controller.php | 4 ++-- wp-includes/version.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/wp-includes/rest-api/endpoints/class-wp-rest-comments-controller.php b/wp-includes/rest-api/endpoints/class-wp-rest-comments-controller.php index 7a8d4b0584..9071697f9a 100644 --- a/wp-includes/rest-api/endpoints/class-wp-rest-comments-controller.php +++ b/wp-includes/rest-api/endpoints/class-wp-rest-comments-controller.php @@ -611,7 +611,7 @@ class WP_REST_Comments_Controller extends WP_REST_Controller { $comment = get_comment( $id ); if ( $comment && ! $this->check_edit_permission( $comment ) ) { - return new WP_Error( 'rest_cannot_edit', __( 'Sorry, you can not edit this comment.' ), array( 'status' => rest_authorization_required_code() ) ); + return new WP_Error( 'rest_cannot_edit', __( 'Sorry, you are not allowed to edit this comment.' ), array( 'status' => rest_authorization_required_code() ) ); } return true; @@ -726,7 +726,7 @@ class WP_REST_Comments_Controller extends WP_REST_Controller { } if ( ! $this->check_edit_permission( $comment ) ) { - return new WP_Error( 'rest_cannot_delete', __( 'Sorry, you can not delete this comment.' ), array( 'status' => rest_authorization_required_code() ) ); + return new WP_Error( 'rest_cannot_delete', __( 'Sorry, you are not allowed to delete this comment.' ), array( 'status' => rest_authorization_required_code() ) ); } return true; } diff --git a/wp-includes/version.php b/wp-includes/version.php index 1f96357596..52e78b79ab 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.7-beta4-39320'; +$wp_version = '4.7-beta4-39321'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.