function theme_link_formatter_default in Link 6.2
Same name and namespace in other branches
- 6 link.module \theme_link_formatter_default()
Theme function for 'default' text field formatter.
File
- ./
link.theme.inc, line 55 - Theme functions for the link module.
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']['title']) && empty($element['#item']['url'])) {
return;
}
elseif (!empty($element['#item']['display_title'])) {
return check_plain($element['#item']['display_title']);
}
}