Make WordPress Core


Ignore:
Timestamp:
07/07/2016 11:32:44 AM (8 years ago)
Author:
ocean90
Message:

Text Changes: Unify a few more permission error messages which were missed in [37914].

Props ramiy.
Fixes #34521.

File:
1 edited

Legend:

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

    r37914 r37999  
    17321732
    17331733        if ( ! current_user_can( 'edit_post', $post_id ) )
    1734             return new IXR_Error( 401, __( 'Sorry, you cannot edit this post.' ) );
     1734            return new IXR_Error( 401, __( 'Sorry, you are not allowed to edit this post.' ) );
    17351735
    17361736        return $this->_prepare_post( $post, $fields );
     
    24132413
    24142414        if ( ! current_user_can( 'edit_user', $user_id ) )
    2415             return new IXR_Error( 401, __( 'Sorry, you cannot edit users.' ) );
     2415            return new IXR_Error( 401, __( 'Sorry, you are not allowed to edit this user.' ) );
    24162416
    24172417        $user_data = get_userdata( $user_id );
     
    25442544
    25452545        if ( ! current_user_can( 'edit_user', $user->ID ) )
    2546             return new IXR_Error( 401, __( 'Sorry, you cannot edit your profile.' ) );
     2546            return new IXR_Error( 401, __( 'Sorry, you are not allowed to edit your profile.' ) );
    25472547
    25482548        $user_data = get_userdata( $user->ID );
     
    25902590
    25912591        if ( ! current_user_can( 'edit_user', $user->ID ) )
    2592             return new IXR_Error( 401, __( 'Sorry, you cannot edit your profile.' ) );
     2592            return new IXR_Error( 401, __( 'Sorry, you are not allowed to edit your profile.' ) );
    25932593
    25942594        // holds data of the user
     
    26602660
    26612661        if ( !current_user_can( 'edit_page', $page_id ) )
    2662             return new IXR_Error( 401, __( 'Sorry, you cannot edit this page.' ) );
     2662            return new IXR_Error( 401, __( 'Sorry, you are not allowed to edit this page.' ) );
    26632663
    26642664        /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */
     
    27012701
    27022702        if ( !current_user_can( 'edit_pages' ) )
    2703             return new IXR_Error( 401, __( 'Sorry, you cannot edit pages.' ) );
     2703            return new IXR_Error( 401, __( 'Sorry, you are not allowed to edit pages.' ) );
    27042704
    27052705        /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */
     
    29032903
    29042904        if ( !current_user_can( 'edit_pages' ) )
    2905             return new IXR_Error( 401, __( 'Sorry, you cannot edit pages.' ) );
     2905            return new IXR_Error( 401, __( 'Sorry, you are not allowed to edit pages.' ) );
    29062906
    29072907        /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */
     
    29592959
    29602960        if ( !current_user_can('edit_posts') )
    2961             return new IXR_Error( 401, __( 'Sorry, you cannot edit posts on this site.' ) );
     2961            return new IXR_Error( 401, __( 'Sorry, you are not allowed to edit posts.' ) );
    29622962
    29632963        /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */
     
    42874287
    42884288        if ( ! current_user_can( 'edit_post', $revision->post_parent ) )
    4289             return new IXR_Error( 401, __( 'Sorry, you cannot edit this post.' ) );
     4289            return new IXR_Error( 401, __( 'Sorry, you are not allowed to edit this post.' ) );
    42904290
    42914291        // Check if revisions are disabled.
     
    44564456
    44574457        if ( !current_user_can( 'edit_post', $post_ID ) )
    4458             return new IXR_Error( 401, __( 'Sorry, you cannot edit this post.' ) );
     4458            return new IXR_Error( 401, __( 'Sorry, you are not allowed to edit this post.' ) );
    44594459
    44604460        /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */
     
    45094509
    45104510        if ( ! current_user_can( 'edit_posts' ) )
    4511             return new IXR_Error( 401, __( 'Sorry, you cannot edit posts on this site.' ) );
     4511            return new IXR_Error( 401, __( 'Sorry, you are not allowed to edit posts.' ) );
    45124512
    45134513        /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */
     
    54845484
    54855485        if ( !current_user_can( 'edit_post', $post_ID ) )
    5486             return new IXR_Error( 401, __( 'Sorry, you cannot edit this post.' ) );
     5486            return new IXR_Error( 401, __( 'Sorry, you are not allowed to edit this post.' ) );
    54875487
    54885488        /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */
     
    56145614
    56155615        if ( ! current_user_can( 'edit_posts' ) )
    5616             return new IXR_Error( 401, __( 'Sorry, you cannot edit posts on this site.' ) );
     5616            return new IXR_Error( 401, __( 'Sorry, you are not allowed to edit posts.' ) );
    56175617
    56185618        /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */
     
    58255825
    58265826            if ( ! current_user_can( 'edit_post', $post_id ) )
    5827                 return new IXR_Error( 401, __( 'Sorry, you cannot edit this post.' ) );
     5827                return new IXR_Error( 401, __( 'Sorry, you are not allowed to edit this post.' ) );
    58285828        }
    58295829        $attachment = array(
     
    59965996
    59975997        if ( !current_user_can( 'edit_post', $post_ID ) )
    5998             return new IXR_Error( 401, __( 'Sorry, you can not edit this post.' ) );
     5998            return new IXR_Error( 401, __( 'Sorry, you are not allowed to edit this post.' ) );
    59995999
    60006000        /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */
     
    60506050
    60516051        if ( !current_user_can('edit_post', $post_ID) )
    6052             return new IXR_Error(401, __('Sorry, you cannot edit this post.'));
     6052            return new IXR_Error(401, __('Sorry, you are not allowed to edit this post.'));
    60536053
    60546054        $catids = array();
     
    61696169
    61706170        if ( !current_user_can('publish_posts') || !current_user_can('edit_post', $post_ID) )
    6171             return new IXR_Error(401, __('Sorry, you cannot publish this post.'));
     6171            return new IXR_Error(401, __('Sorry, you are not allowed to publish this post.'));
    61726172
    61736173        $postdata['post_status'] = 'publish';
Note: See TracChangeset for help on using the changeset viewer.