function theme_fb_canvas_fbml_username in Drupal for Facebook 6.2
Theme FBML markup for username.
1 theme call to theme_fb_canvas_fbml_username()
- fb_canvas_theme_username_override in ./
fb_canvas.module - Our replacement for theme('username', ...)
File
- ./
fb_canvas.module, line 965 - This module provides support for Canvas page applications. Use Drupal to power traditional Facebook Apps.
Code
function theme_fb_canvas_fbml_username($fbu, $object, $orig) {
if (!$fbu) {
return $orig;
}
$wrap_pre = '';
$wrap_post = '';
if ($object->uid && user_access('access user profiles')) {
// Provide link if local account.
$wrap_pre = $wrap_pre . '<a href="' . url('user/' . $object->uid) . '">';
$wrap_post = '</a>' . $wrap_post;
$ifcantsee = 'ifcantsee="' . addslashes(check_plain($object->name)) . '"';
}
$fbml = "<fb:name linked=false useyou=false uid=\"{$fbu}\" {$ifcantsee}></fb:name>";
return $wrap_pre . $fbml . $wrap_post;
}