You are here

function appointment_calendar_delete_custom_fields in Appointment Calendar 7

Delete fileds in unistall module.

1 call to appointment_calendar_delete_custom_fields()
appointment_calendar_uninstall in ./appointment_calendar.install
Implements hook_unistall().

File

./appointment_calendar.install, line 128
Install and uninstall functions for the Appointment Calendar module.

Code

function appointment_calendar_delete_custom_fields() {
  foreach (array_keys(appointment_calendar_productcustomtype_installed_fields()) as $field) {
    field_delete_field($field);
  }
  $instances = field_info_instances('node', 'appointment_calendar');
  $instance_values = array_values($instances);
  foreach ($instance_values as $fieldinstance) {
    field_delete_instance($fieldinstance);
  }
}