function theme_link_formatter_separate in Link 6.2
Same name and namespace in other branches
- 6 link.module \theme_link_formatter_separate()
Theme function for 'separate' text field formatter.
File
- ./
link.theme.inc, line 117 - Theme functions for the link module.
Code
function theme_link_formatter_separate($element) {
$class = empty($element['#item']['attributes']['class']) ? '' : ' ' . $element['#item']['attributes']['class'];
unset($element['#item']['attributes']['class']);
$title = empty($element['#item']['title']) ? '' : check_plain($element['#item']['title']);
$output = '';
$output .= '<div class="link-item ' . $class . '">';
if (!empty($title)) {
$output .= '<div class="link-title">' . $title . '</div>';
}
$output .= '<div class="link-url">' . l($element['#item']['display_url'], $element['#item']['url'], $element['#item']) . '</div>';
$output .= '</div>';
return $output;
}