You are here

function taxonomy_title_taxonomy in Taxonomy Title 5

Same name and namespace in other branches
  1. 6 taxonomy_title.module \taxonomy_title_taxonomy()

Implementation of hook_taxonomy()

File

./taxonomy_title.module, line 36

Code

function taxonomy_title_taxonomy($op, $type, $array = NULL) {
  if ($type == 'term') {
    switch ($op) {
      case 'delete':
        _taxonomy_title_delete_title($array['tid']);
        break;
      case 'update':
        _taxonomy_title_delete_title($array['tid']);
        _taxonomy_title_insert_title($array['tid'], $array['tax_title']);
        break;
      case 'insert':
        _taxonomy_title_insert_title($array['tid'], $array['tax_title']);
        break;
    }
  }
}