Make WordPress Core

Opened 17 years ago

Closed 17 years ago

#10962 closed enhancement (fixed)

set_object_terms should pass the old terms

Reported by: simonwheatley Owned by: westi
Priority: normal Milestone: 2.9
Component: Taxonomy Version:
Severity: normal Keywords: has-patch commit
Cc: Focuses:

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.

Attachments (1)

pass old tt_ids to set_object_terms actions.diff​ (762 bytes ) - added by simonwheatley 17 years ago.
Amends the set_object_terms action to also pass old_tt_ids

Download all attachments as: .zip

Change History (4)

@simonwheatley
17 years ago

Amends the set_object_terms action to also pass old_tt_ids

#1 @scribu
17 years ago

  • Keywords commit added
  • Milestone Unassigned → 2.9

#2 @scribu
17 years ago

  • Summary set_object_terms doesn't pass the old terms → set_object_terms should pass the old terms

#3 @westi
17 years ago

  • Resolution → fixed
  • Status new → closed

(In [12261]) Pass the old term_taxonomy ids to the action in set_object_terms so plugins know what was before. Fixes #10962 props simonwheatley.

Note: See TracTickets for help on using tickets.