You are here

function rabbit_hole_uninstall in Rabbit Hole 7

Same name and namespace in other branches
  1. 6 rabbit_hole.install \rabbit_hole_uninstall()

Implements hook_uninstall().

File

./rabbit_hole.install, line 45
Install, update and uninstall functions for Rabbit Hole.

Code

function rabbit_hole_uninstall() {

  // Remove variables.
  $node_types = array_keys(node_type_get_types());
  foreach ($node_types as $node_type) {
    variable_del('rabbit_hole_action_' . $node_type);
    variable_del('rabbit_hole_redirect_' . $node_type);
    variable_del('rabbit_hole_redirect_response_' . $node_type);
  }

  // Drop our fields from the {node} table.
  $schema['node'] = array();
  rabbit_hole_schema_alter($schema);
  foreach ($schema['node']['fields'] as $name => $spec) {
    db_drop_field('node', $name);
  }
}