Make WordPress Core


Ignore:
Timestamp:
02/28/2018 03:18:47 AM (6 years ago)
Author:
SergeyBiryukov
Message:

XML-RPC: Unify permission error messages in wp_xmlrpc_server.

Props ramiy.
Fixes #42266.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wp-xmlrpc-server.php

    r42719 r42764  
    39213921
    39223922        if ( ! current_user_can( 'publish_posts' ) ) {
    3923             return new IXR_Error( 403, __( 'Sorry, you are not allowed access to details about this site.' ) );
     3923            return new IXR_Error( 403, __( 'Sorry, you are not allowed to access details about this site.' ) );
    39243924        }
    39253925
     
    39623962
    39633963        if ( ! current_user_can( 'edit_post', $post_id ) ) {
    3964             return new IXR_Error( 403, __( 'Sorry, you are not allowed access to details of this post.' ) );
     3964            return new IXR_Error( 403, __( 'Sorry, you are not allowed to access details of this post.' ) );
    39653965        }
    39663966
     
    40034003
    40044004        if ( ! current_user_can( 'edit_posts' ) ) {
    4005             return new IXR_Error( 403, __( 'Sorry, you are not allowed access to details about this site.' ) );
     4005            return new IXR_Error( 403, __( 'Sorry, you are not allowed to access details about this site.' ) );
    40064006        }
    40074007
     
    40374037
    40384038        if ( ! current_user_can( 'edit_pages' ) ) {
    4039             return new IXR_Error( 403, __( 'Sorry, you are not allowed access to details about this site.' ) );
     4039            return new IXR_Error( 403, __( 'Sorry, you are not allowed to access details about this site.' ) );
    40404040        }
    40414041
     
    40714071
    40724072        if ( ! current_user_can( 'edit_pages' ) ) {
    4073             return new IXR_Error( 403, __( 'Sorry, you are not allowed access to details about this site.' ) );
     4073            return new IXR_Error( 403, __( 'Sorry, you are not allowed to access details about this site.' ) );
    40744074        }
    40754075
     
    43324332
    43334333        if ( ! current_user_can( 'edit_posts' ) ) {
    4334             return new IXR_Error( 403, __( 'Sorry, you are not allowed access to details about this site.' ) );
     4334            return new IXR_Error( 403, __( 'Sorry, you are not allowed to access details about this site.' ) );
    43354335        }
    43364336
Note: See TracChangeset for help on using the changeset viewer.