Pass the old term_taxonomy ids to the action in set_object_terms so plugins know what was before. Fixes #10962 props simonwheatley.
git-svn-id: http://svn.automattic.com/wordpress/trunk@12261 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
b912aa2012
commit
693451e75f
|
@ -1518,7 +1518,7 @@ function wp_set_object_terms($object_id, $terms, $taxonomy, $append = false) {
|
|||
$wpdb->query("INSERT INTO $wpdb->term_relationships (object_id, term_taxonomy_id, term_order) VALUES " . join(',', $values) . " ON DUPLICATE KEY UPDATE term_order = VALUES(term_order)");
|
||||
}
|
||||
|
||||
do_action('set_object_terms', $object_id, $terms, $tt_ids, $taxonomy, $append);
|
||||
do_action('set_object_terms', $object_id, $terms, $tt_ids, $taxonomy, $append, $old_tt_ids);
|
||||
return $tt_ids;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue