function theme_user_badge in User Badges 5
Same name and namespace in other branches
- 6.2 user_badges.module \theme_user_badge()
- 6 user_badges.module \theme_user_badge()
- 7 user_badges.module \theme_user_badge()
- 7.2 user_badges.module \theme_user_badge()
- 7.3 user_badges.module \theme_user_badge()
Return html representation of a badge image (note: theme_image does the check_plaining)
5 theme calls to theme_user_badge()
- user_badges_delete_form in ./
user_badges.module - user_badges_for_uid in ./
user_badges.module - Returns HTML representation of user badges for given uid
- user_badges_for_user in ./
user_badges.module - Returns HTML representation of user badges for given user $array is array defining criteria for user_load() most common use will be: user_badges_for_user(array('uid'=>123));
- user_badges_page_form in ./
user_badges.module - Form to assign badges to users.
- user_badges_user in ./
user_badges.module - Implementation of hook_user() This handles assignment of badges based on role. When role is assigned or removed, appropriate badges are added or removed.
File
- ./
user_badges.module, line 846 - @brief User Badges module file
Code
function theme_user_badge($badge) {
$image = theme('image', $badge->image, $badge->name, $badge->name);
if ($badge->href != "") {
return l($image, $badge->href, array(), NULL, NULL, FALSE, TRUE);
}
else {
return $image;
}
}