WordPress.org

Make WordPress Core

Ticket #10821: 10821.diff

File 10821.diff, 1.0 KB (added by dd32, 4 years ago)
  • wp-includes/post.php

     
    11861186        delete_post_meta($postid,'_wp_trash_meta_status'); 
    11871187        delete_post_meta($postid,'_wp_trash_meta_time'); 
    11881188 
    1189         wp_delete_object_term_relationships($postid, get_object_taxonomies('post')); 
     1189        wp_delete_object_term_relationships($postid, get_object_taxonomies($post->post_type)); 
    11901190 
    11911191        $parent_data = array( 'post_parent' => $post->post_parent ); 
    11921192        $parent_where = array( 'post_parent' => $postid ); 
     
    28512851 
    28522852        do_action('delete_attachment', $post_id); 
    28532853 
    2854         /** @todo Delete for pluggable post taxonomies too */ 
    28552854        wp_delete_object_term_relationships($post_id, array('category', 'post_tag')); 
     2855        wp_delete_object_term_relationships($postid, get_object_taxonomies($post->post_type)); 
    28562856 
    28572857        $wpdb->query( $wpdb->prepare( "DELETE FROM $wpdb->postmeta WHERE meta_key = '_thumbnail_id' AND meta_value = %d", $post_id )); 
    28582858