You are here

function taxonomy_title_taxonomy in Taxonomy Title 6

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

Implementation of hook_taxonomy().

File

./taxonomy_title.module, line 56
Enhanced control over the heading tag for the taxonomy term list pages.

Code

function taxonomy_title_taxonomy($op, $type, $array = NULL) {
  if ($type == 'term') {
    switch ($op) {
      case 'delete':
        _taxonomy_title_delete($array['tid']);
        break;
      case 'update':
        if (!empty($array['taxonomy_title'])) {
          _taxonomy_title_update($array['tid'], $array['taxonomy_title']);
        }
        if ($array['taxonomy_title_set'] === TRUE && empty($array['taxonomy_title'])) {
          _taxonomy_title_delete($array['tid']);
        }
        break;
      case 'insert':
        if (!empty($array['taxonomy_title'])) {
          _taxonomy_title_insert($array['tid'], $array['taxonomy_title']);
        }
        break;
    }
  }
}