You are here

function addressfield_field_load in Address Field 7

Implements hook_field_load().

File

./addressfield.module, line 467
Defines a field for attaching country-specific addresses to entities.

Code

function addressfield_field_load($entity_type, $entities, $field, $instances, $langcode, &$items) {

  // Normalize addressfield items on load, so that items that were saved in an
  // older format can be compared more easily to newer items. For now, our
  // field_presave hook does nothing besides normalizing, so we can call it.
  foreach ($entities as $id => $entity) {
    addressfield_field_presave($entity_type, $entity, $field, $instances[$id], $langcode, $items[$id]);
  }
}