You are here

function tac_fields_taxonomy in Taxonomy Access Control 6

Implements hook_taxonomy().

File

tac_fields/tac_fields.module, line 90
Allows administrators to control access to individual CCK fields based on the node's taxonomy categories.

Code

function tac_fields_taxonomy($op, $type, $array = NULL) {
  switch ($op) {
    case 'delete':

      // Clean our data for the term or vocab.
      if ($type == 'term') {
        db_query('DELETE FROM {term_field_access} WHERE tid = %d', $array['tid']);
      }
      elseif ($type == 'vocabulary') {
        db_query('DELETE FROM {term_field_access_defaults} WHERE vid = %d', $array['vid']);
      }
      break;
  }
  return;
}