WordPress.org

Make WordPress Core

Ticket #24247: 24247.patch

File 24247.patch, 784 bytes (added by ocean90, 5 years ago)
  • wp-admin/post.php

     
    133133                exit();
    134134        }
    135135
    136         $p = $post_id;
    137 
    138 
    139136        if ( empty($post->ID) )
    140137                wp_die( __('You attempted to edit an item that doesn’t exist. Perhaps it was deleted?') );
    141138
     
    154151                exit();
    155152        }
    156153
    157         $post_type = $post->post_type;
    158154        if ( 'post' == $post_type ) {
    159155                $parent_file = "edit.php";
    160156                $submenu_file = "edit.php";
     
    223219case 'trash':
    224220        check_admin_referer('trash-post_' . $post_id);
    225221
    226         $post = get_post($post_id);
    227 
    228222        if ( !current_user_can($post_type_object->cap->delete_post, $post_id) )
    229223                wp_die( __('You are not allowed to move this item to the Trash.') );
    230224