From 5c991946ad52889d4b0511484d6a58f8898b5061 Mon Sep 17 00:00:00 2001 From: Evan Winslow Date: Sun, 25 Mar 2012 23:56:11 -0700 Subject: Refs #1279: Specifying image dimensions in icon/default view. --- views/default/icon/default.php | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'views/default/icon') 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) { -- cgit v1.2.3