function url_field_load in URL field 8
Same name and namespace in other branches
- 7 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) {
// Unserialize the attributes into an array. The value stored in the
// field data should either be NULL or a non-empty serialized array.
if (empty($item['attributes'])) {
$item['attributes'] = array();
}
else {
$item['attributes'] = unserialize($item['attributes']);
}
}
}
}