aboutsummaryrefslogtreecommitdiff
path: root/views/default/icon/default.php
diff options
context:
space:
mode:
authorEvan Winslow <evan@elgg.org>2012-03-25 23:56:11 -0700
committerEvan Winslow <evan@elgg.org>2012-03-26 00:01:51 -0700
commit5c991946ad52889d4b0511484d6a58f8898b5061 (patch)
treecd81010dc687b12b41894657d9abddc06b826b2d /views/default/icon/default.php
parentdb0bb2d9c0d2835b95caf887a6ef3bfb818df047 (diff)
downloadelgg-5c991946ad52889d4b0511484d6a58f8898b5061.tar.gz
elgg-5c991946ad52889d4b0511484d6a58f8898b5061.tar.bz2
Refs #1279: Specifying image dimensions in icon/default view.
Diffstat (limited to 'views/default/icon/default.php')
-rw-r--r--views/default/icon/default.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/views/default/icon/default.php b/views/default/icon/default.php
index 22c20b3a7..087c7eae9 100644
--- a/views/default/icon/default.php
+++ b/views/default/icon/default.php
@@ -34,10 +34,15 @@ if (isset($vars['href'])) {
$url = $vars['href'];
}
+$icon_sizes = elgg_get_config('icon_sizes');
+$size = $vars['size'];
+
$img = elgg_view('output/img', array(
'src' => $entity->getIconURL($vars['size']),
'alt' => $title,
'class' => $class,
+ 'width' => $size != 'master' ? $icon_sizes[$size]['w'] : NULL,
+ 'height' => $size != 'master' ? $icon_sizes[$size]['h'] : NULL,
));
if ($url) {