function hook_taxonomy_term_delete

Respond to the deletion of taxonomy terms.

Modules implementing this hook can respond to the deletion of taxonomy terms from the database.

Parameters

$term: A taxonomy term object.

Related topics

6 functions implement hook_taxonomy_term_delete()

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_delete in modules/simpletest/tests/entity_crud_hook_test.module
Implements hook_taxonomy_term_delete().
forum_taxonomy_term_delete in modules/forum/forum.module
Implements hook_taxonomy_term_delete().
path_taxonomy_term_delete in modules/path/path.module
Implements hook_taxonomy_term_delete().
taxonomy_taxonomy_term_delete in modules/taxonomy/taxonomy.module
Implements hook_taxonomy_term_delete().
taxonomy_test_taxonomy_term_delete in modules/simpletest/tests/taxonomy_test.module
Implements hook_taxonomy_term_delete().

... See full list

1 invocation of hook_taxonomy_term_delete()
taxonomy_term_delete in modules/taxonomy/taxonomy.module
Delete a term.

File

modules/taxonomy/taxonomy.api.php, line 171

Code

function hook_taxonomy_term_delete($term) {
    db_delete('mytable')->condition('tid', $term->tid)
        ->execute();
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.