1.20.x link.theme.inc theme_link_formatter_link_label($variables)

Formats a link using the field's label as link text.

File

modules/link/link.theme.inc, line 132
Theme functions and preprocessing for Link module output.

Code

function theme_link_formatter_link_label($variables) {
  $link_options = $variables['element'];
  unset($link_options['title']);
  unset($link_options['url']);
  return $variables['element']['url'] ? l($variables['field']['label'], $variables['element']['url'], $link_options) : '';
}