WordPress.org

Make WordPress Core

Changeset 39460


Ignore:
Timestamp:
12/03/2016 04:41:16 AM (3 years ago)
Author:
pento
Message:

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

Props ramiy, johnbillion.
Fixes #39017.

File:
1 edited

Legend:

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

    r39402 r39460  
    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.