aboutsummaryrefslogtreecommitdiff
path: root/views/default/icon/default.php
diff options
context:
space:
mode:
authorcash <cash.costello@gmail.com>2011-11-05 17:09:34 -0400
committercash <cash.costello@gmail.com>2011-11-05 17:09:34 -0400
commitfa0dbc7f8a34597345f7939ca9914438624c3cee (patch)
tree70f499175aeae36f48a72c9393a520004c4aa7fe /views/default/icon/default.php
parent558f03f0f84a142438de9844b2047be2f050c385 (diff)
downloadelgg-fa0dbc7f8a34597345f7939ca9914438624c3cee.tar.gz
elgg-fa0dbc7f8a34597345f7939ca9914438624c3cee.tar.bz2
Fixes #3567 standardized classes for icons
Diffstat (limited to 'views/default/icon/default.php')
-rw-r--r--views/default/icon/default.php11
1 files changed, 9 insertions, 2 deletions
diff --git a/views/default/icon/default.php b/views/default/icon/default.php
index 6aeef204b..ec39e59f2 100644
--- a/views/default/icon/default.php
+++ b/views/default/icon/default.php
@@ -9,6 +9,7 @@
* @uses $vars['size'] topbar, tiny, small, medium (default), large, master
* @uses $vars['href'] Optional override for link
* @uses $vars['img_class'] Optional CSS class added to img
+ * @uses $vars['link_class'] Optional CSS class for the link
*/
$entity = $vars['entity'];
@@ -37,11 +38,17 @@ $img_src = $entity->getIconURL($vars['size']);
$img = "<img $class src=\"$img_src\" alt=\"$title\" />";
if ($url) {
- echo elgg_view('output/url', array(
+ $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;
}