function theme_fbconnect_login_user_picture_override in Facebook Connect 8.2
Same name and namespace in other branches
- 7.2 fbconnect_login/fbconnect_login.pages.inc \theme_fbconnect_login_user_picture_override()
Make rendering of Facebook user picture themeable
1 theme call to theme_fbconnect_login_user_picture_override()
- fbconnect_login_theme_user_picture_override in fbconnect_login/
fbconnect_login.module - Our replacement for theme('user_picture', ...)
File
- fbconnect_login/
fbconnect_login.pages.inc, line 425 - User pages callbacks for the fbconnect module.
Code
function theme_fbconnect_login_user_picture_override($variables) {
$fbuid = $variables['fbuid'];
$account = $variables['account'];
$user_url = $variables['user_url'];
$size = $variables['size'];
$protocol = isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on' ? 'https' : 'http';
$path = $protocol . '://graph.facebook.com/' . $fbuid . '/picture?type=' . $size;
$image = theme('image', array(
'path' => $path,
'alt' => $account->name,
));
return '<div class="picture">' . $image . '</div>';
}