name)) { $title = $entity->name; } else { $title = $entity->title; } $title = htmlspecialchars($title, ENT_QUOTES, 'UTF-8', false); $url = $entity->getURL(); if (isset($vars['href'])) { $url = $vars['href']; } $img_src = $entity->getIconURL($vars['size']); $img = "\"$title\""; if ($url) { echo elgg_view('output/url', array( 'href' => $url, 'text' => $img, 'is_trusted' => true, )); } else { echo $img; }