diff options
author | Brett Profitt <brett.profitt@gmail.com> | 2011-08-25 10:00:38 -0700 |
---|---|---|
committer | Brett Profitt <brett.profitt@gmail.com> | 2011-08-25 10:00:38 -0700 |
commit | dccc333c765bb28da55b4a55d9c916acdb88413a (patch) | |
tree | bdd26a0b4cd85241a19b7fcb2c0770f0ac3eb9f0 /views/default/icon/user | |
parent | ec7b94a64aef23b85866ecdac8e8acc712d29bb6 (diff) | |
parent | 003cb81c7888f4d2fd763e5814027c6f8d71186f (diff) | |
download | elgg-dccc333c765bb28da55b4a55d9c916acdb88413a.tar.gz elgg-dccc333c765bb28da55b4a55d9c916acdb88413a.tar.bz2 |
Merge branch 'master' of github.com:brettp/Elgg
Diffstat (limited to 'views/default/icon/user')
-rw-r--r-- | views/default/icon/user/default.php | 8 |
1 files changed, 7 insertions, 1 deletions
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 = "<img src=\"$spacer_url\" alt=\"$name\" title=\"$name\" $js style=\"back $show_menu = $hover && (elgg_is_admin_logged_in() || !$user->isBanned()); ?> -<div class="elgg-avatar elgg-avatar-<?php echo $size; ?>"> +<div class="<?php echo $class; ?>"> <?php if ($show_menu) { |