function theme_link_formatter_default in Link 6
Same name and namespace in other branches
- 6.2 link.theme.inc \theme_link_formatter_default()
Theme function for 'default' text field formatter.
File
- ./
link.module, line 535 - Defines simple link field types.
Code
function theme_link_formatter_default($element) {
// Display a normal link if both title and URL are available.
if (!empty($element['#item']['display_title']) && !empty($element['#item']['url'])) {
return l($element['#item']['display_title'], $element['#item']['url'], $element['#item']);
}
elseif (!empty($element['#item']['display_title'])) {
return check_plain($element['#item']['display_title']);
}
}