mirror of
https://github.com/WordPress/WordPress.git
synced 2025-01-30 20:21:37 +01:00
Delete custom taxonomy relationships when deleting a post. Props miqrogroove. fixes #10821
git-svn-id: http://svn.automattic.com/wordpress/trunk@12299 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
97bf1f11bd
commit
41099db69b
@ -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 );
|
||||
|
Loading…
Reference in New Issue
Block a user