Make WordPress Core


Ignore:
Timestamp:
12/03/2017 08:48:35 PM (7 years ago)
Author:
joehoyle
Message:

REST API: Fix permissions error message in post statuses controller.

The permissions error message when a request tries to fetch post statuses unauthenticated is incorrect. It was a copy/paste from elsewhere, as indicated by the use of "in this post type" where this is no post type referenced.

Props schlessera.
Fixes #42303.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-post-statuses-controller.php

    r42343 r42356  
    8686                }
    8787            }
    88             return new WP_Error( 'rest_cannot_view', __( 'Sorry, you are not allowed to edit posts in this post type.' ), array( 'status' => rest_authorization_required_code() ) );
     88            return new WP_Error( 'rest_cannot_view', __( 'Sorry, you are not allowed to manage post statuses.' ), array( 'status' => rest_authorization_required_code() ) );
    8989        }
    9090
Note: See TracChangeset for help on using the changeset viewer.