1 taxonomy.api.php | hook_taxonomy_term_delete(TaxonomyTerm $term) |
Respond to taxonomy term deletion.
This hook is invoked from taxonomy_term_delete() after field_attach_delete() has been called and after the term has been removed from the database.
Parameters
TaxonomyTerm $term: The taxonomy term entity that has been deleted.
See also
Related topics
File
- core/
modules/ taxonomy/ taxonomy.api.php, line 216 - Hooks provided by the Taxonomy module.
Code
function hook_taxonomy_term_delete(TaxonomyTerm $term) {
db_delete('mytable')
->condition('tid', $term->tid)
->execute();
}