You are here

function phone_content_migrate_instance_alter in Phone 7.2

Implements hook_content_migrate_instance_alter().

Alter the instance definition of D6 fields.

File

./phone.content_migrate.inc, line 36
Functions specifically to support the content_migrate package used within CCK to do Drupal6 to Drupal7 migration of fields.

Code

function phone_content_migrate_instance_alter(&$instance_value, $field_value) {
  if ($instance_value['widget']['module'] == 'phone') {
    $orig_country = $field_value['settings']['country'];
    $country = _phone_update_phone_country($orig_country);
    _phone_update_phone_instance_settings($instance_value, array(
      'orig' => $orig_country,
      'new' => $country,
    ));
  }
  elseif ($instance_value['widget']['module'] == 'cck_phone') {
    _phone_update_cck_phone_instance_settings($instance_value);
  }
}