You are here

function postal_code_content_migrate_field_alter in Postal Code 7

Implement this hook to alter the field definition of the migrated content.

Parameters

$field_value:

$instance_value:

File

./content_migrate.zipcode.inc, line 30
Zipcode content_migrate file

Code

function postal_code_content_migrate_field_alter(&$field_value, $instance_value) {
  switch ($instance_value['widget']['module']) {
    case 'zipcode':
      $country = str_replace('_zipcode', '', $field_value['type']);
      if (_postal_code_content_migrate_is_supported_country($country)) {

        // Module names and types changed.
        $field_value['module'] = 'postal_code';
        $field_value['type'] = 'postal_code';
      }
      break;
  }
}