From e0adc47f6b0c2fa37effbfcf7a28487a6fde9ef6 Mon Sep 17 00:00:00 2001 From: Cash Costello Date: Thu, 7 Jul 2011 06:23:30 -0400 Subject: Refs #3567 added class extending to icon/user/default --- views/default/icon/user/default.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'views/default') diff --git a/views/default/icon/user/default.php b/views/default/icon/user/default.php index 46889e89e..6f5c6e2da 100644 --- a/views/default/icon/user/default.php +++ b/views/default/icon/user/default.php @@ -8,6 +8,7 @@ * @uses $vars['entity'] The user entity. If none specified, the current user is assumed. * @uses $vars['size'] The size - tiny, small, medium or large. (medium) * @uses $vars['hover'] Display the hover menu? (true) + * @uses $vars['class'] Optional class added to the .elgg-avatar div */ $user = elgg_extract('entity', $vars, elgg_get_logged_in_user_entity()); @@ -16,6 +17,11 @@ if (!in_array($size, array('topbar', 'tiny', 'small', 'medium', 'large', 'master $size = 'medium'; } +$class = "elgg-avatar elgg-avatar-$size"; +if (isset($vars['class'])) { + $class = "$class {$vars['class']}"; +} + if (!($user instanceof ElggUser)) { return true; } @@ -40,7 +46,7 @@ $icon = "\"$name\"isBanned()); ?> -
+