Changeset 38076
- Timestamp:
- 07/17/2016 04:04:50 PM (8 years ago)
- Location:
- trunk/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/edit.php
r37914 r38076 11 11 12 12 if ( ! $typenow ) 13 wp_die( __( 'Invalid post type ' ) );13 wp_die( __( 'Invalid post type.' ) ); 14 14 15 15 if ( ! in_array( $typenow, get_post_types( array( 'show_ui' => true ) ) ) ) { … … 33 33 34 34 if ( ! $post_type_object ) 35 wp_die( __( 'Invalid post type ' ) );35 wp_die( __( 'Invalid post type.' ) ); 36 36 37 37 if ( ! current_user_can( $post_type_object->cap->edit_posts ) ) { -
trunk/src/wp-admin/post-new.php
r37914 r38076 22 22 $post_type = $_GET['post_type']; 23 23 } else { 24 wp_die( __( 'Invalid post type') );24 wp_die( __( 'Invalid post type.' ) ); 25 25 } 26 26 $post_type_object = get_post_type_object( $post_type ); -
trunk/src/wp-includes/class-wp-xmlrpc-server.php
r38051 r38076 1303 1303 $post_type = get_post_type_object( $post_data['post_type'] ); 1304 1304 if ( ! $post_type ) 1305 return new IXR_Error( 403, __( 'Invalid post type ' ) );1305 return new IXR_Error( 403, __( 'Invalid post type.' ) ); 1306 1306 1307 1307 $update = ! empty( $post_data['ID'] ); … … 4099 4099 4100 4100 if ( ! post_type_exists( $post_type_name ) ) 4101 return new IXR_Error( 403, __( 'Invalid post type ' ) );4101 return new IXR_Error( 403, __( 'Invalid post type.' ) ); 4102 4102 4103 4103 $post_type = get_post_type_object( $post_type_name ); … … 4858 4858 } else { 4859 4859 // No other post_type values are allowed here 4860 return new IXR_Error( 401, __( 'Invalid post type ' ) );4860 return new IXR_Error( 401, __( 'Invalid post type.' ) ); 4861 4861 } 4862 4862 } else { … … 4916 4916 break; 4917 4917 default: 4918 return new IXR_Error( 401, __( 'Invalid post type ' ) );4918 return new IXR_Error( 401, __( 'Invalid post type.' ) ); 4919 4919 } 4920 4920 $author = get_userdata( $content_struct['wp_author_id'] ); … … 5194 5194 // Use wp.editPost to edit post types other than post and page. 5195 5195 if ( ! in_array( $postdata[ 'post_type' ], array( 'post', 'page' ) ) ) 5196 return new IXR_Error( 401, __( 'Invalid post type ' ) );5196 return new IXR_Error( 401, __( 'Invalid post type.' ) ); 5197 5197 5198 5198 // Thwart attempt to change the post type. … … 5258 5258 break; 5259 5259 default: 5260 return new IXR_Error( 401, __( 'Invalid post type ' ) );5260 return new IXR_Error( 401, __( 'Invalid post type.' ) ); 5261 5261 } 5262 5262 $post_author = $content_struct['wp_author_id']; -
trunk/src/wp-includes/post.php
r38068 r38076 1070 1070 1071 1071 if ( ! post_type_exists( $post_type ) ) { 1072 return new WP_Error( 'invalid_post_type', __( 'Invalid post type ' ) );1072 return new WP_Error( 'invalid_post_type', __( 'Invalid post type.' ) ); 1073 1073 } 1074 1074
Note: See TracChangeset
for help on using the changeset viewer.