function hook_taxonomy_vocabulary_delete

hook_taxonomy_vocabulary_delete($vocabulary)

Respond to the deletion of taxonomy vocabularies.

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

Parameters

$vocabulary: A taxonomy vocabulary object.

Related topics

File

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

Code

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

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/modules!taxonomy!taxonomy.api.php/function/hook_taxonomy_vocabulary_delete/7.x