Changeset 37999
- Timestamp:
- 07/07/2016 11:32:44 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp-xmlrpc-server.php
r37914 r37999 1732 1732 1733 1733 if ( ! current_user_can( 'edit_post', $post_id ) ) 1734 return new IXR_Error( 401, __( 'Sorry, you cannotedit this post.' ) );1734 return new IXR_Error( 401, __( 'Sorry, you are not allowed to edit this post.' ) ); 1735 1735 1736 1736 return $this->_prepare_post( $post, $fields ); … … 2413 2413 2414 2414 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.' ) ); 2416 2416 2417 2417 $user_data = get_userdata( $user_id ); … … 2544 2544 2545 2545 if ( ! current_user_can( 'edit_user', $user->ID ) ) 2546 return new IXR_Error( 401, __( 'Sorry, you cannotedit your profile.' ) );2546 return new IXR_Error( 401, __( 'Sorry, you are not allowed to edit your profile.' ) ); 2547 2547 2548 2548 $user_data = get_userdata( $user->ID ); … … 2590 2590 2591 2591 if ( ! current_user_can( 'edit_user', $user->ID ) ) 2592 return new IXR_Error( 401, __( 'Sorry, you cannotedit your profile.' ) );2592 return new IXR_Error( 401, __( 'Sorry, you are not allowed to edit your profile.' ) ); 2593 2593 2594 2594 // holds data of the user … … 2660 2660 2661 2661 if ( !current_user_can( 'edit_page', $page_id ) ) 2662 return new IXR_Error( 401, __( 'Sorry, you cannotedit this page.' ) );2662 return new IXR_Error( 401, __( 'Sorry, you are not allowed to edit this page.' ) ); 2663 2663 2664 2664 /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */ … … 2701 2701 2702 2702 if ( !current_user_can( 'edit_pages' ) ) 2703 return new IXR_Error( 401, __( 'Sorry, you cannotedit pages.' ) );2703 return new IXR_Error( 401, __( 'Sorry, you are not allowed to edit pages.' ) ); 2704 2704 2705 2705 /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */ … … 2903 2903 2904 2904 if ( !current_user_can( 'edit_pages' ) ) 2905 return new IXR_Error( 401, __( 'Sorry, you cannotedit pages.' ) );2905 return new IXR_Error( 401, __( 'Sorry, you are not allowed to edit pages.' ) ); 2906 2906 2907 2907 /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */ … … 2959 2959 2960 2960 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.' ) ); 2962 2962 2963 2963 /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */ … … 4287 4287 4288 4288 if ( ! current_user_can( 'edit_post', $revision->post_parent ) ) 4289 return new IXR_Error( 401, __( 'Sorry, you cannotedit this post.' ) );4289 return new IXR_Error( 401, __( 'Sorry, you are not allowed to edit this post.' ) ); 4290 4290 4291 4291 // Check if revisions are disabled. … … 4456 4456 4457 4457 if ( !current_user_can( 'edit_post', $post_ID ) ) 4458 return new IXR_Error( 401, __( 'Sorry, you cannotedit this post.' ) );4458 return new IXR_Error( 401, __( 'Sorry, you are not allowed to edit this post.' ) ); 4459 4459 4460 4460 /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */ … … 4509 4509 4510 4510 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.' ) ); 4512 4512 4513 4513 /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */ … … 5484 5484 5485 5485 if ( !current_user_can( 'edit_post', $post_ID ) ) 5486 return new IXR_Error( 401, __( 'Sorry, you cannotedit this post.' ) );5486 return new IXR_Error( 401, __( 'Sorry, you are not allowed to edit this post.' ) ); 5487 5487 5488 5488 /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */ … … 5614 5614 5615 5615 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.' ) ); 5617 5617 5618 5618 /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */ … … 5825 5825 5826 5826 if ( ! current_user_can( 'edit_post', $post_id ) ) 5827 return new IXR_Error( 401, __( 'Sorry, you cannotedit this post.' ) );5827 return new IXR_Error( 401, __( 'Sorry, you are not allowed to edit this post.' ) ); 5828 5828 } 5829 5829 $attachment = array( … … 5996 5996 5997 5997 if ( !current_user_can( 'edit_post', $post_ID ) ) 5998 return new IXR_Error( 401, __( 'Sorry, you can notedit this post.' ) );5998 return new IXR_Error( 401, __( 'Sorry, you are not allowed to edit this post.' ) ); 5999 5999 6000 6000 /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */ … … 6050 6050 6051 6051 if ( !current_user_can('edit_post', $post_ID) ) 6052 return new IXR_Error(401, __('Sorry, you cannotedit this post.'));6052 return new IXR_Error(401, __('Sorry, you are not allowed to edit this post.')); 6053 6053 6054 6054 $catids = array(); … … 6169 6169 6170 6170 if ( !current_user_can('publish_posts') || !current_user_can('edit_post', $post_ID) ) 6171 return new IXR_Error(401, __('Sorry, you cannotpublish this post.'));6171 return new IXR_Error(401, __('Sorry, you are not allowed to publish this post.')); 6172 6172 6173 6173 $postdata['post_status'] = 'publish';
Note: See TracChangeset
for help on using the changeset viewer.