Opened 4 years ago
Closed 4 years ago
#10962 closed enhancement (fixed)
set_object_terms should pass the old terms
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Priority: | normal | Milestone: | 2.9 |
| Component: | Taxonomy | Version: | |
| Severity: | normal | Keywords: | has-patch commit |
| Cc: |
Description
I'm writing a plugin which will allow tag clouds which are pinned to particular specified categories, e.g. show me the tag cloud for all posts in the "documents" category. This means I need to precache additional term counts for these categories. Because set_object_terms doesn't pass the old_tt_ids I am forced to iterate all the tags in the system in case a tag was deleted, if the old ids were passed I'd have code execution times approximately ten times faster with the number of tags in my system (lots).
The attached diff amends the set_object_terms action to also pass the old_tt_ids array.
Amends the set_object_terms action to also pass old_tt_ids