You are here

function lineage_taxonomy in Taxonomy Lineage 6

Same name and namespace in other branches
  1. 5 lineage.module \lineage_taxonomy()

Implementation of hook_taxonomy().

File

./lineage.module, line 6

Code

function lineage_taxonomy($op, $type, $array = NULL) {

  // we care not about vocabularies
  if ($type == 'vocabulary') {
    return;
  }
  switch ($op) {
    case 'delete':
      lineage_delete_term($array['tid']);
      break;
    case 'insert':
    case 'update':

      // Skip if we are on the admin reordering pages;
      // it will happen be triggered by our submit handler after processing.
      if (arg() != array(
        'admin',
        'content',
        'taxonomy',
        $array['vid'],
      )) {
        lineage_update_term($array);
      }
      break;
  }
}