function linkimagefield_elements in Link Image Field 6
Implementation of hook_elements().
File
- ./
linkimagefield.module, line 54 - Defines a link image field type.
Code
function linkimagefield_elements() {
$elements = array();
// An LinkImageField is really just a ImageField with a URL.
$imagefield_elements = imagefield_elements();
$elements['linkimagefield_widget'] = $imagefield_elements['imagefield_widget'];
$elements['linkimagefield_widget']['#process'][] = 'linkimagefield_widget_process';
//$elements['linkimagefield_widget']['#element_validate'][] = 'linkimagefield_widget_validate';
// ImageField needs a separate value callback to save its alt, title and URL texts.
$elements['linkimagefield_widget']['#value_callback'] = 'linkimagefield_widget_value';
return $elements;
}