You are here

function hashtags_uninstall in Hashtags 6

Same name and namespace in other branches
  1. 8 hashtags.install \hashtags_uninstall()
  2. 6.2 hashtags.install \hashtags_uninstall()
  3. 7.2 hashtags.install \hashtags_uninstall()
  4. 7 hashtags.install \hashtags_uninstall()

Implementation of hook_uninstall().

File

./hashtags.install, line 30

Code

function hashtags_uninstall() {

  // Load the dependent Taxonomy module, in case it has been disabled.
  drupal_load('module', 'taxonomy');

  // Delete the vocabulary.
  $vid = variable_get('hashtags_vocabulary', '');
  taxonomy_del_vocabulary($vid);
  variable_del('hashtags_vocabulary');

  // remove Hashtags filter out of all input formats
  $module = 'hashtags';
  db_query("DELETE FROM {filters} WHERE module = '%s'", $module);
  drupal_set_message(t('Hashtags module: Hashtags filter has been removed from all input format'));
}