aboutsummaryrefslogtreecommitdiff
path: root/views/default
diff options
context:
space:
mode:
authorCash Costello <cash.costello@gmail.com>2011-07-07 06:23:30 -0400
committerCash Costello <cash.costello@gmail.com>2011-07-07 06:23:30 -0400
commite0adc47f6b0c2fa37effbfcf7a28487a6fde9ef6 (patch)
tree8943a403790f2fbcd37dd51c4446e40936873508 /views/default
parent3e318bdeda941f78e9ae7b78bf337f67c4475849 (diff)
downloadelgg-e0adc47f6b0c2fa37effbfcf7a28487a6fde9ef6.tar.gz
elgg-e0adc47f6b0c2fa37effbfcf7a28487a6fde9ef6.tar.bz2
Refs #3567 added class extending to icon/user/default
Diffstat (limited to 'views/default')
-rw-r--r--views/default/icon/user/default.php8
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) {