function fb_connect_theme_username_override in Drupal for Facebook 7.3
Same name and namespace in other branches
- 6.3 fb_connect.module \fb_connect_theme_username_override()
- 6.2 fb_connect.module \fb_connect_theme_username_override()
Our replacement for theme('username', ...)
1 string reference to 'fb_connect_theme_username_override'
- fb_connect_theme_registry_alter in ./
fb_connect.module - Implements hook_theme_registry_alter().
File
- ./
fb_connect.module, line 469 - Support for Facebook Connect features
Code
function fb_connect_theme_username_override($variables) {
// Static helps avoid altering username. See fb_username_alter.
$is_theming_username =& drupal_static('fb_theming_username');
$is_theming_username = TRUE;
$account = $variables['account'];
$orig = theme('fb_connect_username_orig', $variables);
if ($account && ($fbu = fb_get_object_fbu($account))) {
// Theme the username with XFBML, using original username as backup.
$return_me = theme('fb_username', array(
'fbu' => $fbu,
'account' => $account,
'orig' => $orig,
));
}
else {
$return_me = $orig;
}
$is_theming_username = FALSE;
return $return_me;
}