7.x taxonomy.api.php hook_taxonomy_term_insert($term)

Act on taxonomy terms when inserted.

Modules implementing this hook can act on the term object when saved to the database.


$term: A taxonomy term object.

Related topics

4 functions implement hook_taxonomy_term_insert()

Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.

entity_crud_hook_test_taxonomy_term_insert in modules/simpletest/tests/entity_crud_hook_test.module
Implements hook_taxonomy_term_insert().
path_taxonomy_term_insert in modules/path/path.module
Implements hook_taxonomy_term_insert().
taxonomy_test_taxonomy_term_insert in modules/simpletest/tests/taxonomy_test.module
Implements hook_taxonomy_term_insert().
trigger_taxonomy_term_insert in modules/trigger/trigger.module
Implements hook_taxonomy_term_insert().


modules/taxonomy/taxonomy.api.php, line 138
Hooks provided by the Taxonomy module.


function hook_taxonomy_term_insert($term) {
    'tid' => $term->tid,
    'foo' => $term->foo,


SeeStein’s picture

Why functions have table 'taxonomy_term_synonym', but database of Drupal 7 don't have this table?
It will be work in future?

gargsuchi’s picture

Please check this scenario
I have a node which has tags as a field (term reference)
When I add / edit a node and add in new tags, this hook is not called.
Any idea why?