You are here

function template_preprocess_shrinktheweb_formatter_shrinktheweb_link_short in ShrinkTheWeb 8

Displays the thumbnail as '[ShrinkTheWeb] Short as link with title "Link"'.

Parameters

array $variables:

File

./shrinktheweb.module, line 224

Code

function template_preprocess_shrinktheweb_formatter_shrinktheweb_link_short(&$variables) {
  $options = _shrinktheweb_custom_settings($variables);
  $variables['link'] = Link::fromTextAndUrl(t('Link'), Url::fromUri($variables['url']));
  if ($src = shrinktheweb_get_thumbnail($variables['url'], $options)) {
    $variables['image_path'] = $src;
  }
}