1 taxonomy.api.php | hook_taxonomy_term_predelete(TaxonomyTerm $term) |
Act before taxonomy term deletion.
This hook is invoked from taxonomy_term_delete() before field_attach_delete() is called and before the term is actually removed from the database.
Parameters
TaxonomyTerm $term: The taxonomy term entity that is about to be deleted.
See also
Related topics
File
- core/
modules/ taxonomy/ taxonomy.api.php, line 201 - Hooks provided by the Taxonomy module.
Code
function hook_taxonomy_term_predelete(TaxonomyTerm $term) {
db_delete('term_synonym')->condition('tid', $term->tid)->execute();
}