You are here

function termcase_taxonomy_vocabulary_update in Termcase 7

Implements hook_taxonomy_vocabulary_update().

Updates the termcase setting when adding a new vocabulary.

File

./termcase.module, line 196
The Termcase module gives you the option to specify specific case-formatting on terms.

Code

function termcase_taxonomy_vocabulary_update($vocabulary) {
  if (isset($vocabulary->termcase_options)) {
    _termcase_vocabulary_termcase($vocabulary->machine_name, $vocabulary->termcase_options);

    // Update all existing terms.
    if ($vocabulary->termcase_update_terms != 0) {
      _termcase_update_all_terms($vocabulary->machine_name, $vocabulary->termcase_options);
    }
  }
}