You are here

function link_content_migrate_field_alter in Link 7

Implements hook_migrate_field_alter().

File

./link.module, line 1883
Defines simple link field types.

Code

function link_content_migrate_field_alter(&$field_value, $instance_value) {
  if ($field_value['type'] == 'link') {

    // Adjust the field type.
    $field_value['type'] = 'link_field';

    // Remove settings that are now on the instance.
    foreach (array(
      'attributes',
      'display',
      'url',
      'title',
      'title_value',
      'enable_tokens',
      'validate_url',
    ) as $setting) {
      unset($field_value['settings'][$setting]);
    }
  }
}