function template_preprocess_shrinktheweb_formatter_shrinktheweb_link_url in ShrinkTheWeb 8
Displays the thumbnail as '[ShrinkTheWeb] URL, as link'.
Parameters
array $variables:
File
- ./
shrinktheweb.module, line 240
Code
function template_preprocess_shrinktheweb_formatter_shrinktheweb_link_url(&$variables) {
$options = _shrinktheweb_custom_settings($variables);
$variables['link'] = Link::fromTextAndUrl($variables['url'], Url::fromUri($variables['url']));
if ($src = shrinktheweb_get_thumbnail($variables['url'], $options)) {
$variables['image_path'] = $src;
}
}