Delete custom taxonomy relationships when deleting a post. Props miqrogroove. fixes #10821

git-svn-id: https://develop.svn.wordpress.org/trunk@12299 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2009-11-30 22:17:28 +00:00
parent 6115dc47b2
commit 7026dd4d72
1 changed files with 1 additions and 2 deletions

View File

@ -1186,8 +1186,7 @@ function wp_delete_post( $postid = 0, $force_delete = false ) {
delete_post_meta($postid,'_wp_trash_meta_status');
delete_post_meta($postid,'_wp_trash_meta_time');
/** @todo delete for pluggable post taxonomies too */
wp_delete_object_term_relationships($postid, array('category', 'post_tag'));
wp_delete_object_term_relationships($postid, get_object_taxonomies('post'));
$parent_data = array( 'post_parent' => $post->post_parent );
$parent_where = array( 'post_parent' => $postid );