You are here

function theme_link_formatter_link_absolute in Link 7

Formats a link as an absolute URL.

File

./link.module, line 1374
Defines simple link field types.

Code

function theme_link_formatter_link_absolute($vars) {

  // If no URL value is present there's no point in continuing.
  if (empty($vars['element']['url'])) {
    return '';
  }

  // Hardcode the 'absolute' argument.
  $vars['element']['absolute'] = TRUE;
  return url($vars['element']['url'], $vars['element']);
}