function theme_link_widget_form in Link 5
Theme the display of the entire link set
1 theme call to theme_link_widget_form()
- link_widget in ./
link.module - Implementation of hook_widget().
File
- ./
link.module, line 517 - Defines simple link field types.
Code
function theme_link_widget_form($element) {
drupal_add_css(drupal_get_path('module', 'link') . '/link.css');
// Check for multiple (output normally).
if (isset($element[1])) {
$output = drupal_render($element);
}
else {
if (isset($element[0]['title'])) {
$element[0]['title']['#title'] = $element['#title'] . ' ' . $element[0]['title']['#title'];
$element[0]['title']['#description'] = $element['#description'];
$element[0]['url']['#title'] = $element['#title'] . ' ' . $element[0]['url']['#title'];
}
else {
$element[0]['url']['#title'] = $element['#title'];
$element[0]['url']['#description'] = $element['#description'];
}
$output = drupal_render($element);
}
return $output;
}