function menu_link_field_load in Menu Link (Field) 7
Implements hook_field_load().
File
- ./
menu_link.field.inc, line 75 - Defines a menu link field type.
Code
function menu_link_field_load($entity_type, $entities, $field, $instances, $langcode, &$items, $age) {
foreach ($entities as $id => $entity) {
foreach ($items[$id] as $delta => &$item) {
if (!is_array($item['options'])) {
$item['options'] = !empty($item['options']) ? unserialize($item['options']) : array();
}
$item['external'] = !empty($item['link_path']) && $item['link_path'] != '<front>' && url_is_external($item['link_path']) ? 1 : 0;
}
}
}