WordPress.org

Make WordPress Core

Ticket #27550: 27550.diff

File 27550.diff, 619 bytes (added by Denis-de-Bernardy, 5 years ago)
  • src/wp-includes/post.php

     
    24312431        add_post_meta($post_id,'_wp_trash_meta_time', time());
    24322432
    24332433        $post['post_status'] = 'trash';
     2434        $post = wp_slash($post);
    24342435        wp_insert_post($post);
    24352436
    24362437        wp_trash_post_comments($post_id);
     
    24662467        delete_post_meta($post_id, '_wp_trash_meta_status');
    24672468        delete_post_meta($post_id, '_wp_trash_meta_time');
    24682469
     2470        $post = wp_slash($post);
    24692471        wp_insert_post($post);
    24702472
    24712473        wp_untrash_post_comments($post_id);