1.7.x taxonomy.api.php hook_taxonomy_vocabulary_delete(TaxonomyVocabulary $vocabulary)
1.10.x taxonomy.api.php hook_taxonomy_vocabulary_delete(TaxonomyVocabulary $vocabulary)
1.8.x taxonomy.api.php hook_taxonomy_vocabulary_delete(TaxonomyVocabulary $vocabulary)
1.9.x taxonomy.api.php hook_taxonomy_vocabulary_delete(TaxonomyVocabulary $vocabulary)

Respond to taxonomy vocabulary deletion.

This hook is invoked from taxonomy_vocabulary_delete() after field_attach_delete_bundle() has been called and after the vocabulary has been removed from the database.

Parameters

TaxonomyVocabulary $vocabulary: The taxonomy vocabulary that has been deleted.

See also

hook_taxonomy_vocabulary_predelete()

taxonomy_vocabulary_delete()

Related topics

File

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

Code

function hook_taxonomy_vocabulary_delete(TaxonomyVocabulary $vocabulary) {
  db_delete('mytable')
    ->condition('vocabulary', $vocabulary->machine_name)
    ->execute();
}