hook_taxonomy_vocabulary_insert

  1. drupal
    1. 7
Versions
7 hook_taxonomy_vocabulary_insert($vocabulary)

Act on taxonomy vocabularies when inserted.

Modules implementing this hook can act on the vocabulary object when saved to the database.

Parameters

$vocabulary A taxonomy vocabulary object.

Related topics

Code

drupal/modules/taxonomy/taxonomy.api.php, line 52

<?php
function hook_taxonomy_vocabulary_insert($vocabulary) {
  if ($vocabulary->synonyms) {
    variable_set('taxonomy_' . $vocabulary->vid . '_synonyms', TRUE);
  }
}
?>