Changeset 38509
- Timestamp:
- 09/02/2016 03:56:22 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp-xmlrpc-server.php
r38459 r38509 1330 1330 case 'private': 1331 1331 if ( ! current_user_can( $post_type->cap->publish_posts ) ) 1332 return new IXR_Error( 401, __( 'Sorry, you are not allowed to create private posts in this post type ' ) );1332 return new IXR_Error( 401, __( 'Sorry, you are not allowed to create private posts in this post type.' ) ); 1333 1333 break; 1334 1334 case 'publish': 1335 1335 case 'future': 1336 1336 if ( ! current_user_can( $post_type->cap->publish_posts ) ) 1337 return new IXR_Error( 401, __( 'Sorry, you are not allowed to publish posts in this post type ' ) );1337 return new IXR_Error( 401, __( 'Sorry, you are not allowed to publish posts in this post type.' ) ); 1338 1338 break; 1339 1339 default: … … 1344 1344 1345 1345 if ( ! empty( $post_data['post_password'] ) && ! current_user_can( $post_type->cap->publish_posts ) ) 1346 return new IXR_Error( 401, __( 'Sorry, you are not allowed to create password protected posts in this post type ' ) );1346 return new IXR_Error( 401, __( 'Sorry, you are not allowed to create password protected posts in this post type.' ) ); 1347 1347 1348 1348 $post_data['post_author'] = absint( $post_data['post_author'] ); … … 1529 1529 1530 1530 if ( ! $post_ID ) 1531 return new IXR_Error( 401, __( 'Sorry, your entry could not be posted. Something wrong happened.' ) );1531 return new IXR_Error( 401, __( 'Sorry, your entry could not be posted.' ) ); 1532 1532 1533 1533 return strval( $post_ID ); … … 1795 1795 $post_type = get_post_type_object( $filter['post_type'] ); 1796 1796 if ( ! ( (bool) $post_type ) ) 1797 return new IXR_Error( 403, __( ' The post type specified is not valid' ) );1797 return new IXR_Error( 403, __( 'Invalid post type.' ) ); 1798 1798 } else { 1799 1799 $post_type = get_post_type_object( 'post' ); … … 1923 1923 1924 1924 if ( ! $term ) 1925 return new IXR_Error( 500, __( 'Sorry, your term could not be created. Something wrong happened.' ) );1925 return new IXR_Error( 500, __( 'Sorry, your term could not be created.' ) ); 1926 1926 1927 1927 return strval( $term['term_id'] ); … … 2495 2495 if ( isset( $filter['role'] ) ) { 2496 2496 if ( get_role( $filter['role'] ) === null ) 2497 return new IXR_Error( 403, __( ' The role specified is not valid' ) );2497 return new IXR_Error( 403, __( 'Invalid role.' ) ); 2498 2498 2499 2499 $query['role'] = $filter['role']; … … 3473 3473 3474 3474 if ( !$result ) 3475 return new IXR_Error(500, __('Sorry, the comment could not be edited. Something wrong happened.'));3475 return new IXR_Error(500, __('Sorry, the comment could not be edited.')); 3476 3476 3477 3477 /** … … 3527 3527 $logged_in = false; 3528 3528 if ( $allow_anon && get_option('comment_registration') ) { 3529 return new IXR_Error( 403, __( 'You must be registered to comment ' ) );3529 return new IXR_Error( 403, __( 'You must be registered to comment.' ) ); 3530 3530 } elseif ( ! $allow_anon ) { 3531 3531 return $this->error; … … 3581 3581 if ( get_option('require_name_email') ) { 3582 3582 if ( 6 > strlen($comment['comment_author_email']) || '' == $comment['comment_author'] ) 3583 return new IXR_Error( 403, __( 'Comment author name and email are required ' ) );3583 return new IXR_Error( 403, __( 'Comment author name and email are required.' ) ); 3584 3584 elseif ( !is_email($comment['comment_author_email']) ) 3585 return new IXR_Error( 403, __( 'A valid email address is required ' ) );3585 return new IXR_Error( 403, __( 'A valid email address is required.' ) ); 3586 3586 } 3587 3587 } … … 4627 4627 4628 4628 if ( !$post_ID ) 4629 return new IXR_Error(500, __('Sorry, your entry could not be posted. Something wrong happened.'));4629 return new IXR_Error(500, __('Sorry, your entry could not be posted.')); 4630 4630 4631 4631 $this->attach_uploads( $post_ID, $post_content ); … … 4881 4881 $content_struct['wp_post_format'] = sanitize_key( $content_struct['wp_post_format'] ); 4882 4882 if ( !array_key_exists( $content_struct['wp_post_format'], get_post_format_strings() ) ) { 4883 return new IXR_Error( 404, __( 'Invalid post format ' ) );4883 return new IXR_Error( 404, __( 'Invalid post format.' ) ); 4884 4884 } 4885 4885 } … … 5086 5086 5087 5087 if ( !$post_ID ) 5088 return new IXR_Error(500, __('Sorry, your entry could not be posted. Something wrong happened.'));5088 return new IXR_Error(500, __('Sorry, your entry could not be posted.')); 5089 5089 5090 5090 /** … … 5202 5202 $content_struct['wp_post_format'] = sanitize_key( $content_struct['wp_post_format'] ); 5203 5203 if ( !array_key_exists( $content_struct['wp_post_format'], get_post_format_strings() ) ) { 5204 return new IXR_Error( 404, __( 'Invalid post format ' ) );5204 return new IXR_Error( 404, __( 'Invalid post format.' ) ); 5205 5205 } 5206 5206 } … … 5404 5404 5405 5405 if ( !$result ) 5406 return new IXR_Error(500, __('Sorry, your entry could not be edited. Something wrong happened.'));5406 return new IXR_Error(500, __('Sorry, your entry could not be edited.')); 5407 5407 5408 5408 // Only posts can be sticky … … 5813 5813 $upload = wp_upload_bits($name, null, $bits); 5814 5814 if ( ! empty($upload['error']) ) { 5815 $errorString = sprintf(__('Could not write file %1$s (%2$s) '), $name, $upload['error']);5815 $errorString = sprintf(__('Could not write file %1$s (%2$s).'), $name, $upload['error']); 5816 5816 return new IXR_Error(500, $errorString); 5817 5817 }
Note: See TracChangeset
for help on using the changeset viewer.