diff --git a/web/themes/custom/geofresco/geofresco.theme b/web/themes/custom/geofresco/geofresco.theme index 0c87f48..06a7f2c 100644 --- a/web/themes/custom/geofresco/geofresco.theme +++ b/web/themes/custom/geofresco/geofresco.theme @@ -26,3 +26,18 @@ function geofresco_preprocess_page_title(&$variables) { } } } + +/** + * Implements hook_preprocess_HOOK() for comment. + * + * Shortens and stacks username and submitted date. + */ +function geofresco_preprocess_comment(array &$variables) { + $comment = $variables['elements']['#comment']; + if (isset($comment->in_preview)) { + $variables['permalink_url'] = new Url(''); + } + else { + $variables['permalink_url'] = $comment->permalink(); + } +}