function hook_term_merge in Term Merge 7
Notify other modules when merging of 2 taxonomy terms occurs.
Parameters
object $term_trunk: Fully loaded taxonomy term object of the term trunk, term into which merging occurs, aka 'destination'
object $term_branch: Fully loaded taxonomy term object of the term branch, term that is being merged, aka 'source'
array $context: Array $context as it is passed to term_merge_action() - you can get a little more info about context about merging from this array
1 invocation of hook_term_merge()
- term_merge_action in ./
term_merge.module - Action function. Perform action "Term Merge".
File
- ./
term_merge.api.php, line 21 - Documentation for Term Merge module.
Code
function hook_term_merge($term_trunk, $term_branch, $context) {
// Here we might want to run a query like:
// UPDATE {my_table}
// SET term_tid = $term_trunk->tid
// WHERE term_tid = $term_branch->tid
// Or do anything else that your own logic requires when merging of 2 terms
// happens.
}