Make WordPress Core

Ticket #38875: 38875.patch

File 38875.patch, 1.2 KB (added by ramiy, 9 years ago)
  • wp-includes/rest-api/endpoints/class-wp-rest-comments-controller.php

     
    611611                $comment = get_comment( $id );
    612612
    613613                if ( $comment && ! $this->check_edit_permission( $comment ) ) {
    614                         return new WP_Error( 'rest_cannot_edit', __( 'Sorry, you can not edit this comment.' ), array( 'status' => rest_authorization_required_code() ) );
     614                        return new WP_Error( 'rest_cannot_edit', __( 'Sorry, you are not allowed to edit this comment.' ), array( 'status' => rest_authorization_required_code() ) );
    615615                }
    616616
    617617                return true;
     
    726726                }
    727727
    728728                if ( ! $this->check_edit_permission( $comment ) ) {
    729                         return new WP_Error( 'rest_cannot_delete', __( 'Sorry, you can not delete this comment.' ), array( 'status' => rest_authorization_required_code() ) );
     729                        return new WP_Error( 'rest_cannot_delete', __( 'Sorry, you are not allowed to delete this comment.' ), array( 'status' => rest_authorization_required_code() ) );
    730730                }
    731731                return true;
    732732        }