You are here

function birthdays_defaults_uninstall in Birthdays 7

Implements hook_uninstall().

File

defaults/birthdays_defaults.install, line 121
Create a default field and action.

Code

function birthdays_defaults_uninstall() {

  // Delete the default action unless it has been overridden.
  if ($action = actions_load(variable_get('birthdays_defaults_action', 0))) {
    if (unserialize($action->parameters) == _birthdays_defaults_action_parameters()) {
      actions_delete($action->aid);
    }
  }
  variable_del('birthdays_defaults_action');

  // Delete the default field.
  if (field_info_field('birthdays')) {
    field_delete_field('birthdays');
    field_purge_batch(5);
  }
}