Ticket #39171: 39171.patch
File 39171.patch, 2.8 KB (added by , 8 years ago) |
---|
-
wp-admin/async-upload.php
52 52 if ( isset($_REQUEST['attachment_id']) && ($id = intval($_REQUEST['attachment_id'])) && $_REQUEST['fetch'] ) { 53 53 $post = get_post( $id ); 54 54 if ( 'attachment' != $post->post_type ) 55 wp_die( __( ' Unknownpost type.' ) );55 wp_die( __( 'Invalid post type.' ) ); 56 56 if ( ! current_user_can( 'edit_post', $id ) ) 57 57 wp_die( __( 'Sorry, you are not allowed to edit this item.' ) ); 58 58 -
wp-admin/post.php
107 107 wp_die( __( 'You attempted to edit an item that doesn’t exist. Perhaps it was deleted?' ) ); 108 108 109 109 if ( ! $post_type_object ) 110 wp_die( __( ' Unknownpost type.' ) );110 wp_die( __( 'Invalid post type.' ) ); 111 111 112 112 if ( ! in_array( $typenow, get_post_types( array( 'show_ui' => true ) ) ) ) { 113 113 wp_die( __( 'Sorry, you are not allowed to edit posts in this post type.' ) ); … … 208 208 wp_die( __( 'The item you are trying to move to the Trash no longer exists.' ) ); 209 209 210 210 if ( ! $post_type_object ) 211 wp_die( __( ' Unknownpost type.' ) );211 wp_die( __( 'Invalid post type.' ) ); 212 212 213 213 if ( ! current_user_can( 'delete_post', $post_id ) ) 214 214 wp_die( __( 'Sorry, you are not allowed to move this item to the Trash.' ) ); … … 231 231 wp_die( __( 'The item you are trying to restore from the Trash no longer exists.' ) ); 232 232 233 233 if ( ! $post_type_object ) 234 wp_die( __( ' Unknownpost type.' ) );234 wp_die( __( 'Invalid post type.' ) ); 235 235 236 236 if ( ! current_user_can( 'delete_post', $post_id ) ) 237 237 wp_die( __( 'Sorry, you are not allowed to restore this item from the Trash.' ) ); … … 249 249 wp_die( __( 'This item has already been deleted.' ) ); 250 250 251 251 if ( ! $post_type_object ) 252 wp_die( __( ' Unknownpost type.' ) );252 wp_die( __( 'Invalid post type.' ) ); 253 253 254 254 if ( ! current_user_can( 'delete_post', $post_id ) ) 255 255 wp_die( __( 'Sorry, you are not allowed to delete this item.' ) ); -
wp-includes/class-wp-customize-nav-menus.php
788 788 */ 789 789 public function insert_auto_draft_post( $postarr ) { 790 790 if ( ! isset( $postarr['post_type'] ) || ! post_type_exists( $postarr['post_type'] ) ) { 791 return new WP_Error( 'unknown_post_type', __( ' Unknown post type' ) );791 return new WP_Error( 'unknown_post_type', __( 'Invalid post type.' ) ); 792 792 } 793 793 if ( empty( $postarr['post_title'] ) ) { 794 794 return new WP_Error( 'empty_title', __( 'Empty title' ) );