function theme_fb_user_picture in Drupal for Facebook 7.3
Same name and namespace in other branches
- 6.3 fb.theme.inc \theme_fb_user_picture()
1 theme call to theme_fb_user_picture()
- fb_connect_theme_user_picture_override in ./
fb_connect.module - Our replacement for theme('user_picture', ...)
File
- ./
fb.theme.inc, line 147
Code
function theme_fb_user_picture($params) {
if (!$params['fbu']) {
return $params['orig'];
}
$fbu = $params['fbu'];
$object = $params['account'];
$orig = $params['orig'];
// http://developers.facebook.com/docs/reference/fbml/profile-pic
$fbml = "<fb:profile-pic linked=\"false\" uid=\"{$fbu}\"></fb:profile-pic>";
$wrap_pre = '<span class=fb_hide>' . $orig . '</span><span class="fb_show"><div class="picture">';
$wrap_post = '</div></span>';
if ($object->uid && user_access('access user profiles')) {
// Provide link to local account.
$wrap_pre = $wrap_pre . '<a href="' . url('user/' . $object->uid) . '">';
$wrap_post = '</a>' . $wrap_post;
}
return $wrap_pre . $fbml . $wrap_post;
}