Make WordPress Core

Ticket #38808: 38808-delete-resource.patch

File 38808-delete-resource.patch, 761 bytes (added by ramiy, 8 years ago)
  • wp-includes/rest-api/endpoints/class-wp-rest-terms-controller.php

     
    546546                }
    547547
    548548                if ( ! current_user_can( 'delete_term', $term->term_id ) ) {
    549                         return new WP_Error( 'rest_cannot_delete', __( 'Sorry, you are not allowed to delete resource.' ), array( 'status' => rest_authorization_required_code() ) );
     549                        return new WP_Error( 'rest_cannot_delete', __( 'Sorry, you are not allowed to delete this resource.' ), array( 'status' => rest_authorization_required_code() ) );
    550550                }
    551551
    552552                return true;