aboutsummaryrefslogtreecommitdiff
path: root/views/default/icon
diff options
context:
space:
mode:
Diffstat (limited to 'views/default/icon')
-rw-r--r--views/default/icon/default.php5
-rw-r--r--views/default/icon/user/default.php4
2 files changed, 8 insertions, 1 deletions
diff --git a/views/default/icon/default.php b/views/default/icon/default.php
index c5749ba04..3abd96b96 100644
--- a/views/default/icon/default.php
+++ b/views/default/icon/default.php
@@ -8,6 +8,7 @@
* @uses $vars['entity'] The entity the icon represents - uses getIconURL() method
* @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
*/
$entity = $vars['entity'];
@@ -18,6 +19,8 @@ if (!in_array($vars['size'], $sizes)) {
$vars['size'] = "medium";
}
+$class = elgg_extract('img_class', $vars, '');
+
if (isset($entity->name)) {
$title = $entity->name;
} else {
@@ -30,7 +33,7 @@ if (isset($vars['href'])) {
}
$img_src = $entity->getIconURL($vars['size']);
-$img = "<img src=\"$img_src\" alt=\"$title\" />";
+$img = "<img $class src=\"$img_src\" alt=\"$title\" />";
if ($url) {
echo elgg_view('output/url', array(
diff --git a/views/default/icon/user/default.php b/views/default/icon/user/default.php
index 6f5c6e2da..aca03521f 100644
--- a/views/default/icon/user/default.php
+++ b/views/default/icon/user/default.php
@@ -37,6 +37,10 @@ if (!$icontime) {
$js = elgg_extract('js', $vars, '');
$hover = elgg_extract('hover', $vars, true);
+if (isset($vars['override'])) {
+ elgg_deprecated_notice("Use 'hover' rather than 'override' with user avatars", 1.8, 5);
+ $hover = false;
+}
$spacer_url = elgg_get_site_url() . '_graphics/spacer.gif';