You are here

function linkimagefield_widget_value in Link Image Field 6

Element #value_callback function.

Parameters

array $element:

mixed $edit:

Return value

array

1 string reference to 'linkimagefield_widget_value'
linkimagefield_elements in ./linkimagefield.module
Implementation of hook_elements().

File

./linkimagefield_widget.inc, line 66
linkimagefield widget code @author John Young <john@codeandcreative.com>

Code

function linkimagefield_widget_value($element, $edit = FALSE) {
  $item = imagefield_widget_value($element, $edit);
  if ($edit) {
    $item['url'] = isset($edit['url']) ? $edit['url'] : '';
  }
  else {
    $item['url'] = '';
  }
  return $item;
}