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()
1 invocation of hook_taxonomy_term_delete()

File

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

Code

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