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) { $params = array( 'href' => $url, 'text' => $img, 'is_trusted' => true, ); $class = elgg_extract('link_class', $vars, ''); if ($class) { $params['class'] = $class; } echo elgg_view('output/url', $params); } else { echo $img; }