You are here

function addanother_uninstall in Add Another 7.2

Same name and namespace in other branches
  1. 5 addanother.install \addanother_uninstall()
  2. 6 addanother.install \addanother_uninstall()
  3. 7 addanother.install \addanother_uninstall()

Implements hook_uninstall().

File

./addanother.install, line 11
Install, update and uninstall functions for the Add another module.

Code

function addanother_uninstall() {
  $types = node_type_get_types();
  foreach ($types as $type) {
    $typeid = $type->type;
    variable_del('addanother_message_' . $typeid);
    variable_del('addanother_tab_' . $typeid);
    variable_del('addanother_tab_edit_' . $typeid);
    variable_del('addanother_button_' . $typeid);
  }

  // Can't put the word default at the end of this variable name in the rare
  // case that there is a content type with a machine name of 'default'.
  variable_del('addanother_default_message');
  variable_del('addanother_default_tab');
  variable_del('addanother_default_tab_edit');
  variable_del('addanother_default_button');
}