diff --git a/core/modules/link/link.module b/core/modules/link/link.module index 2baa164..9b4f300 100644 --- a/core/modules/link/link.module +++ b/core/modules/link/link.module @@ -423,14 +423,25 @@ function link_theme() { } /** - * Preprocesses variables for link-formatter-link-separate.html.twig. + * Prepares variables for separated link field templates. * - * @see link-formatter-link-separate.html.twig + * This template outputs a separate title and link. + * + * Default template: link-formatter-link-separate.html.twig. + * + * @param array $variables + * An associative array containing: + * - title: (optional) A descriptive or alternate title for the link, which + * may be different than the actual link text. + * - url_title: The anchor text for the link. + * - href: The link URL. + * - options: (optional) An array of options to pass to l(). */ -function template_preprocess_link_formatter_link_separate(&$variables){ +function template_preprocess_link_formatter_link_separate(&$variables) { if (!empty($variables['title'])) { $variables['title'] = check_plain($variables['title']); } - // @todo revisit this use of l() after http://drupal.org/node/1922454 is resolved. + // @todo Revisit this use of l() after http://drupal.org/node/1922454 is + // resolved. $variables['link'] = l($variables['url_title'], $variables['href'], $variables['options']); } diff --git a/core/modules/link/templates/link-formatter-link-separate.html.twig b/core/modules/link/templates/link-formatter-link-separate.html.twig index ebdb7e5..84e7a7d 100644 --- a/core/modules/link/templates/link-formatter-link-separate.html.twig +++ b/core/modules/link/templates/link-formatter-link-separate.html.twig @@ -5,7 +5,8 @@ * * Available variables: * - link: The link that has already been formatted by l(). - * - title: The title of the link. + * - title: (optional) A descriptive or alternate title for the link, which may + * be different than the actual link text. * * @see template_preprocess() * @see template_preprocess_link_formatter_link_separate() @@ -13,9 +14,11 @@ * @ingroup themeable */ #} +{% spaceless %}