Make WordPress Core

Changeset 39461


Ignore:
Timestamp:
12/03/2016 04:43:21 AM (8 years ago)
Author:
pento
Message:

REST API: Use the correct error message when editing a single term.

Merges [39460] to the 4.7 branch.

Props ramiy, johnbillion.
Fixes #39017.

Location:
branches/4.7
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/4.7

  • branches/4.7/src/wp-includes/rest-api/endpoints/class-wp-rest-terms-controller.php

    r39403 r39461  
    458458
    459459        if ( ! current_user_can( 'edit_term', $term->term_id ) ) {
    460             return new WP_Error( 'rest_cannot_update', __( 'Sorry, you are not allowed to edit terms.' ), array( 'status' => rest_authorization_required_code() ) );
     460            return new WP_Error( 'rest_cannot_update', __( 'Sorry, you are not allowed to edit this term.' ), array( 'status' => rest_authorization_required_code() ) );
    461461        }
    462462
Note: See TracChangeset for help on using the changeset viewer.