You are here

function url_field_load in URL field 7

Same name and namespace in other branches
  1. 8 url.module \url_field_load()

Implements hook_field_load().

File

./url.module, line 63
Provides a URL field type that stores external links with optional titles.

Code

function url_field_load($entity_type, $entities, $field, $instances, $langcode, &$items, $age) {
  foreach ($entities as $id => $entity) {
    foreach ($items[$id] as $delta => &$item) {
      if (empty($item['attributes'])) {
        $item['attributes'] = array();
      }
      else {
        $item['attributes'] = unserialize($item['attributes']);
      }
    }
  }
}