View source
<?php
function hashtags_enable() {
if (!variable_get('hashtags_vocabulary', 0)) {
$vocabulary = array(
'name' => t('Hashtags'),
'multiple' => 1,
'tags' => 1,
'required' => 0,
'hierarchy' => 1,
'relations' => 0,
'module' => 'hashtags',
'weight' => -10,
);
taxonomy_save_vocabulary($vocabulary);
variable_set('hashtags_vocabulary', $vocabulary['vid']);
}
}
function hashtags_uninstall() {
drupal_load('module', 'taxonomy');
$vid = variable_get('hashtags_vocabulary', '');
taxonomy_del_vocabulary($vid);
variable_del('hashtags_vocabulary');
}