You are here

function date_content_migrate_field_alter in Date 7.3

Same name and namespace in other branches
  1. 7 date.field.inc \date_content_migrate_field_alter()
  2. 7.2 date.field.inc \date_content_migrate_field_alter()

Implements hook_content_migrate_field_alter().

File

./date.field.inc, line 526
Field hooks to implement a date field.

Code

function date_content_migrate_field_alter(&$field_value, $instance_value) {

  // Use this to tweak the conversion of field settings from the D6 style to the
  // D7 style for specific situations not handled by basic conversion, as when
  // field types or settings are changed.
  //
  // $field_value['widget_type'] is available to see what widget type was
  // originally used.
  switch ($field_value['module']) {
    case 'date':

      // Those settings do not exist anymore, or have been moved to the instance
      // level.
      unset($field_value['settings']['default_format']);
      unset($field_value['settings']['repeat_collapsed']);
      break;
  }
}