function diff_uninstall in Diff 7.3
Implements hook_uninstall().
File
- ./
diff.install, line 19 - Provides uninstallation functions.
Code
function diff_uninstall() {
// Bulk delete entity based variables.
$prefixes = array(
'diff_enable_revisions_page_',
'diff_show_',
'diff_view_mode_',
'diff_admin_path_',
'diff_default_state_',
'diff_additional_options_',
);
foreach ($prefixes as $prefix) {
db_delete('variable')
->condition('name', db_like($prefix) . '%', 'LIKE')
->execute();
}
// Delete global variables.
variable_del('diff_context_lines_trailing');
variable_del('diff_context_lines_leading');
variable_del('diff_theme');
variable_del('diff_radio_behavior', '');
foreach (field_info_fields() as $field) {
variable_del("diff_{$field['module']}_field_{$field['type']}_default_options");
}
}