WordPress.org

Make WordPress Core

Ticket #38822: 38822.3.patch

File 38822.3.patch, 987 bytes (added by ramiy, 4 years ago)
  • wp-includes/rest-api/endpoints/class-wp-rest-comments-controller.php

     
    379379
    380380                if ( isset( $request['author_ip'] ) && ! current_user_can( 'moderate_comments' ) ) {
    381381                        if ( empty( $_SERVER['REMOTE_ADDR'] ) || $request['author_ip'] !== $_SERVER['REMOTE_ADDR'] ) {
    382                                 return new WP_Error( 'rest_comment_invalid_author_ip', __( 'Sorry, you are not allowed to set author_ip for comments.' ), array( 'status' => rest_authorization_required_code() ) );
     382                                /* translators: %s: request parameter */
     383                                return new WP_Error( 'rest_comment_invalid_author_ip', sprintf( __( "Sorry, you are not allowed to edit '%s' for comments." ), 'author_ip' ), array( 'status' => rest_authorization_required_code() ) );
    383384                        }
    384385                }
    385386