Ticket #20064: 20064.patch
File 20064.patch, 958 bytes (added by , 13 years ago) |
---|
-
wp-admin/post.php
134 134 if ( empty($post->ID) ) 135 135 wp_die( __('You attempted to edit an item that doesn’t exist. Perhaps it was deleted?') ); 136 136 137 if ( null == $post_type_object || ( $post->post_type == 'revision' && post_type_exists( get_post_type( $post->post_parent ) ) == false ) ) 138 wp_die( __('Unknown post type.') ); 139 137 140 if ( !current_user_can($post_type_object->cap->edit_post, $post_id) ) 138 141 wp_die( __('You are not allowed to edit this item.') ); 139 142 140 143 if ( 'trash' == $post->post_status ) 141 144 wp_die( __('You can’t edit this item because it is in the Trash. Please restore it and try again.') ); 142 145 143 if ( null == $post_type_object )144 wp_die( __('Unknown post type.') );145 146 146 $post_type = $post->post_type; 147 147 if ( 'post' == $post_type ) { 148 148 $parent_file = "edit.php";