You are here

function taxonomy_uninstall in Drupal 7

Implements hook_uninstall().

File

modules/taxonomy/taxonomy.install, line 11
Install, update and uninstall functions for the taxonomy module.

Code

function taxonomy_uninstall() {

  // Remove variables.
  variable_del('taxonomy_override_selector');
  variable_del('taxonomy_terms_per_page_admin');

  // Remove taxonomy_term bundles.
  $vocabularies = db_query("SELECT machine_name FROM {taxonomy_vocabulary}")
    ->fetchCol();
  foreach ($vocabularies as $vocabulary) {
    field_attach_delete_bundle('taxonomy_term', $vocabulary);
  }
}