a wee weblog, since 2006

Extension Hooks

20Jul
2013

Taxonomy includes an extension hook which is fired when a node is updated, allowing you to perform functions like clearing third party caches. More hooks are available on request

Hooks available

taxonomy_updated

Typically all you’ll need to know is what tree has been updated, but if you need to know more, three parameters are available to you:

  1. $this->tree_id returns the tree_id of the node which was updated
  2. $update_type returns what kind of update was performed
  3. $data contains information regarding the update
Update TypeData
update_nodeAn array containing the updated node’s kay => values
reorder_nodesA nested array containing updated tree structure
delete_branch or delete_nodeAn array containing the updated node’s kay => values
fieldtype_saveAn array containing what updated was performed when the Taxonomy fieldtype’s save method was called

As captured 18 February 2021 · The archived original