You are here

function workbench_access_taxonomy_term_delete in Workbench Access 7

Implements hook_taxonomy_term_delete().

If an active term is deleted, cascade the change through our system.

File

modules/taxonomy.workbench_access.inc, line 381
Taxonomy integration for Workbench Access.

Code

function workbench_access_taxonomy_term_delete($term) {
  $access_scheme = db_query("SELECT * FROM {workbench_access} WHERE access_type = :access_type AND access_id = :access_id", array(
    ':access_type' => 'taxonomy',
    ':access_id' => $term->tid,
  ))
    ->fetchAssoc();
  if (!empty($access_scheme)) {
    workbench_access_section_delete($access_scheme);
  }
}