function redhen_note_uninstall in RedHen CRM 7
Implements hook_uninstall().
File
- modules/
redhen_note/ redhen_note.install, line 151 - Schema and installation hooks for redhen_note module.
Code
function redhen_note_uninstall() {
// Delete note fields and taxonomy.
$note_fields = array(
'redhen_note_body',
'redhen_note_type',
);
foreach ($note_fields as $field_name) {
$instance = field_info_instance('redhen_note', $field_name, 'redhen_note');
if ($instance) {
field_delete_instance($instance, TRUE);
}
}
$taxonomy = taxonomy_vocabulary_machine_name_load('note_type');
if ($taxonomy) {
taxonomy_vocabulary_delete($taxonomy->vid);
}
}