1 taxonomy.path.inc taxonomy_path_type_delete_callback($types)

Callback to delete aliases for taxonomy types.

File

core/modules/taxonomy/taxonomy.path.inc, line 51
Path integration.

Code

function taxonomy_path_type_delete_callback($types) {
  $query = db_select('taxonomy_term_data', 'td');
  $query->addField('td', 'tid');
  $query->condition('td.vocabulary', $types, 'IN');
  $tids = $query->execute()->fetchCol();

  $sources = array();
  foreach ($tids as $tid) {
    $sources[] = 'taxonomy/term/' . $tid;
  }

  $query = db_delete('url_alias');
  $query->condition('source', $sources, 'IN');
  $query->execute();
}