Make WordPress Core

Ticket #23022: 23022.2.patch

File 23022.2.patch, 761 bytes (added by bananastalktome, 11 years ago)
  • wp-includes/post.php

     
    24062406
    24072407        do_action('wp_trash_post', $post_id);
    24082408
    2409         add_post_meta($post_id,'_wp_trash_meta_status', $post['post_status']);
    24102409        add_post_meta($post_id,'_wp_trash_meta_time', time());
    24112410
    24122411        $post['post_status'] = 'trash';
     
    24382437
    24392438        do_action('untrash_post', $post_id);
    24402439
    2441         $post_status = get_post_meta($post_id, '_wp_trash_meta_status', true);
     2440        $post['post_status'] = 'draft';
    24422441
    2443         $post['post_status'] = $post_status;
    2444 
    2445         delete_post_meta($post_id, '_wp_trash_meta_status');
    24462442        delete_post_meta($post_id, '_wp_trash_meta_time');
    24472443
    24482444        wp_insert_post($post);