function readmorecontrol_uninstall in Read More Control 7
Implements hook_uninstall().
File
- ./
readmorecontrol.install, line 11 - Standand installation functions.
Code
function readmorecontrol_uninstall() {
db_delete('variable')
->condition('name', db_like('readmorecontrol_format__') . '%', 'LIKE')
->execute();
db_delete('variable')
->condition('name', db_like('readmorecontrol_behaviour__') . '%', 'LIKE')
->execute();
variable_del('readmorecontrol_disabled_view_modes');
variable_del('readmodecontrol_external_view_modes');
// Now delete the readmore_behaviour values from node field instances.
/*
$node_bundles = field_info_instances('node');
foreach ($node_bundles as $bundle => $bundle_instances) {
foreach ($bundle_instances as $field_name => $instance) {
if (isset($instance['readmore_behaviour'])) {
unset($instance['readmore_behaviour']);
field_update_instance($instance);
}
}
}
*/
}