Ticket #24247: 24247.patch
File 24247.patch, 784 bytes (added by , 12 years ago) |
---|
-
wp-admin/post.php
133 133 exit(); 134 134 } 135 135 136 $p = $post_id;137 138 139 136 if ( empty($post->ID) ) 140 137 wp_die( __('You attempted to edit an item that doesn’t exist. Perhaps it was deleted?') ); 141 138 … … 154 151 exit(); 155 152 } 156 153 157 $post_type = $post->post_type;158 154 if ( 'post' == $post_type ) { 159 155 $parent_file = "edit.php"; 160 156 $submenu_file = "edit.php"; … … 223 219 case 'trash': 224 220 check_admin_referer('trash-post_' . $post_id); 225 221 226 $post = get_post($post_id);227 228 222 if ( !current_user_can($post_type_object->cap->delete_post, $post_id) ) 229 223 wp_die( __('You are not allowed to move this item to the Trash.') ); 230 224