Changeset 39278
- Timestamp:
- 11/17/2016 03:52:18 PM (8 years ago)
- Location:
- trunk/src
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/post.php
r39062 r39278 161 161 $valid_date = wp_checkdate( $mm, $jj, $aa, $post_data['post_date'] ); 162 162 if ( !$valid_date ) { 163 return new WP_Error( 'invalid_date', __( ' Whoops, the provided date is invalid.' ) );163 return new WP_Error( 'invalid_date', __( 'Invalid date.' ) ); 164 164 } 165 165 $post_data['post_date_gmt'] = get_gmt_from_date( $post_data['post_date'] ); -
trunk/src/wp-includes/class-wp-xmlrpc-server.php
r39045 r39278 1271 1271 } elseif ( isset( $post_data['sticky'] ) ) { 1272 1272 if ( ! current_user_can( $post_type->cap->edit_others_posts ) ) { 1273 return new IXR_Error( 401, __( 'Sorry, you are not allowed to stick this post.' ) );1273 return new IXR_Error( 401, __( 'Sorry, you are not allowed to make posts sticky.' ) ); 1274 1274 } 1275 1275 … … 1796 1796 1797 1797 if ( ! current_user_can( $post_type->cap->edit_posts ) ) 1798 return new IXR_Error( 401, __( 'Sorry, you are not allowed to edit posts in this post type.' ) );1798 return new IXR_Error( 401, __( 'Sorry, you are not allowed to edit posts in this post type.' ) ); 1799 1799 1800 1800 $query['post_type'] = $post_type->name; … … 4118 4118 4119 4119 if ( ! current_user_can( $post_type->cap->edit_posts ) ) 4120 return new IXR_Error( 401, __( 'Sorry, you are not allowed to edit this post type.' ) );4120 return new IXR_Error( 401, __( 'Sorry, you are not allowed to edit posts in this post type.' ) ); 4121 4121 4122 4122 return $this->_prepare_post_type( $post_type, $fields ); -
trunk/src/wp-includes/post.php
r39188 r39278 3124 3124 if ( ! $valid_date ) { 3125 3125 if ( $wp_error ) { 3126 return new WP_Error( 'invalid_date', __( ' Whoops, the provided date is invalid.' ) );3126 return new WP_Error( 'invalid_date', __( 'Invalid date.' ) ); 3127 3127 } else { 3128 3128 return 0; … … 3404 3404 if ( 'default' != $postarr['page_template'] && ! isset( $page_templates[ $postarr['page_template'] ] ) ) { 3405 3405 if ( $wp_error ) { 3406 return new WP_Error( 'invalid_page_template', __('The page template is invalid.'));3406 return new WP_Error( 'invalid_page_template', __( 'Invalid page template.' ) ); 3407 3407 } 3408 3408 update_post_meta( $post_ID, '_wp_page_template', 'default' ); -
trunk/src/wp-includes/rest-api.php
r39239 r39278 1041 1041 case 'date-time' : 1042 1042 if ( ! rest_parse_date( $value ) ) { 1043 return new WP_Error( 'rest_invalid_date', __( ' The date you provided is invalid.' ) );1043 return new WP_Error( 'rest_invalid_date', __( 'Invalid date.' ) ); 1044 1044 } 1045 1045 break; … … 1051 1051 // https://core.trac.wordpress.org/ticket/38506 1052 1052 if ( ! is_email( $value ) || strlen( $value ) < 6 ) { 1053 return new WP_Error( 'rest_invalid_email', __( ' The email address you provided is invalid.' ) );1053 return new WP_Error( 'rest_invalid_email', __( 'Invalid email address.' ) ); 1054 1054 } 1055 1055 break; -
trunk/src/wp-includes/rest-api/class-wp-rest-server.php
r39104 r39278 286 286 $jsonp_callback = $_GET['_jsonp']; 287 287 if ( ! wp_check_jsonp_callback( $jsonp_callback ) ) { 288 echo $this->json_error( 'rest_callback_invalid', __( ' The JSONP callback function is invalid.' ), 400 );288 echo $this->json_error( 'rest_callback_invalid', __( 'Invalid JSONP callback function.' ), 400 ); 289 289 return false; 290 290 } -
trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-comments-controller.php
r39266 r39278 436 436 */ 437 437 if ( empty( $prepared_comment['comment_content'] ) ) { 438 return new WP_Error( 'rest_comment_content_invalid', __( ' Comment content is invalid.' ), array( 'status' => 400 ) );438 return new WP_Error( 'rest_comment_content_invalid', __( 'Invalid comment content.' ), array( 'status' => 400 ) ); 439 439 } 440 440 … … 638 638 639 639 if ( isset( $prepared_args['comment_content'] ) && empty( $prepared_args['comment_content'] ) ) { 640 return new WP_Error( 'rest_comment_content_invalid', __( ' Comment content is invalid.' ), array( 'status' => 400 ) );640 return new WP_Error( 'rest_comment_content_invalid', __( 'Invalid comment content.' ), array( 'status' => 400 ) ); 641 641 } 642 642 -
trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php
r39266 r39278 127 127 128 128 if ( 'edit' === $request['context'] && ! current_user_can( $post_type->cap->edit_posts ) ) { 129 return new WP_Error( 'rest_forbidden_context', __( 'Sorry, you are not allowed to edit theseposts in this post type.' ), array( 'status' => rest_authorization_required_code() ) );129 return new WP_Error( 'rest_forbidden_context', __( 'Sorry, you are not allowed to edit posts in this post type.' ), array( 'status' => rest_authorization_required_code() ) ); 130 130 } 131 131 … … 459 459 460 460 if ( ! current_user_can( $post_type->cap->create_posts ) ) { 461 return new WP_Error( 'rest_cannot_create', __( 'Sorry, you are not allowed to create new posts.' ), array( 'status' => rest_authorization_required_code() ) );461 return new WP_Error( 'rest_cannot_create', __( 'Sorry, you are not allowed to create posts as this user.' ), array( 'status' => rest_authorization_required_code() ) ); 462 462 } 463 463 … … 709 709 710 710 if ( $post && ! $this->check_delete_permission( $post ) ) { 711 return new WP_Error( 'rest_cannot_delete', __( 'Sorry, you are not allowed to delete posts.' ), array( 'status' => rest_authorization_required_code() ) );711 return new WP_Error( 'rest_cannot_delete', __( 'Sorry, you are not allowed to delete this post.' ), array( 'status' => rest_authorization_required_code() ) ); 712 712 } 713 713 -
trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-terms-controller.php
r39266 r39278 547 547 548 548 if ( ! current_user_can( 'delete_term', $term->term_id ) ) { 549 return new WP_Error( 'rest_cannot_delete', __( 'Sorry, you are not allowed to delete resource.' ), array( 'status' => rest_authorization_required_code() ) );549 return new WP_Error( 'rest_cannot_delete', __( 'Sorry, you are not allowed to delete this resource.' ), array( 'status' => rest_authorization_required_code() ) ); 550 550 } 551 551 … … 824 824 ), 825 825 'link' => array( 826 'description' => __( 'URL tothe resource.' ),826 'description' => __( 'URL of the resource.' ), 827 827 'type' => 'string', 828 828 'format' => 'uri', -
trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-users-controller.php
r39266 r39278 388 388 389 389 if ( ! current_user_can( 'create_users' ) ) { 390 return new WP_Error( 'rest_cannot_create_user', __( 'Sorry, you are not allowed to create resource.' ), array( 'status' => rest_authorization_required_code() ) );390 return new WP_Error( 'rest_cannot_create_user', __( 'Sorry, you are not allowed to create new resource.' ), array( 'status' => rest_authorization_required_code() ) ); 391 391 } 392 392 … … 544 544 545 545 if ( email_exists( $request['email'] ) && $request['email'] !== $user->user_email ) { 546 return new WP_Error( 'rest_user_invalid_email', __( ' Email address is invalid.' ), array( 'status' => 400 ) );546 return new WP_Error( 'rest_user_invalid_email', __( 'Invalid email address.' ), array( 'status' => 400 ) ); 547 547 } 548 548 … … 552 552 553 553 if ( ! empty( $request['slug'] ) && $request['slug'] !== $user->user_nicename && get_user_by( 'slug', $request['slug'] ) ) { 554 return new WP_Error( 'rest_user_invalid_slug', __( ' Slug is invalid.' ), array( 'status' => 400 ) );554 return new WP_Error( 'rest_user_invalid_slug', __( 'Invalid slug.' ), array( 'status' => 400 ) ); 555 555 } 556 556 … … 1140 1140 ), 1141 1141 'link' => array( 1142 'description' => __( 'Author URL tothe resource.' ),1142 'description' => __( 'Author URL of the resource.' ), 1143 1143 'type' => 'string', 1144 1144 'format' => 'uri', -
trunk/src/wp-includes/script-loader.php
r39272 r39278 232 232 // Strings for 'jquery-ui-autocomplete' live region messages 233 233 did_action( 'init' ) && $scripts->localize( 'jquery-ui-autocomplete', 'uiAutocompleteL10n', array( 234 'noResults' => __( 'No search results.' ),234 'noResults' => __( 'No results found.' ), 235 235 /* translators: Number of results found when using jQuery UI Autocomplete */ 236 236 'oneResult' => __( '1 result found. Use up and down arrow keys to navigate.' ),
Note: See TracChangeset
for help on using the changeset viewer.