You are here

function phone_field_delete_instance in Phone 7.2

Implements hook_field_delete_instance().

File

./phone.module, line 1135
The phone module lets administrators use a phone number field type.

Code

function phone_field_delete_instance($instance) {
  $field_name = $instance['field_name'];
  $field = field_info_field($field_name);
  if ($field['type'] == 'phone' && module_exists('rdf')) {
    $mapping = rdf_mapping_load($instance['entity_type'], $instance['bundle']);
    unset($mapping[$field_name]);
    $mapping_info = array(
      'mapping' => $mapping,
      'type' => $instance['entity_type'],
      'bundle' => $instance['bundle'],
    );
    rdf_mapping_save($mapping_info);
  }
}