1 link.module _link_load($field, $item, $instance)

Unpacks the item attributes for use.

File

core/modules/link/link.module, line 356
Defines simple link field types.

Code

function _link_load($field, $item, $instance) {
  if (isset($item['attributes'])) {
    if (!is_array($item['attributes'])) {
      $item['attributes'] = unserialize($item['attributes']);
    }
    return $item['attributes'];
  }
  else {
    return $instance['settings']['attributes'];
  }
}