You are here

function fb_connect_theme_username_override in Drupal for Facebook 6.2

Same name and namespace in other branches
  1. 6.3 fb_connect.module \fb_connect_theme_username_override()
  2. 7.3 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
Implementation of hook_theme_registry_alter().

File

./fb_connect.module, line 783
Support for Facebook Connect features

Code

function fb_connect_theme_username_override($object) {
  $orig = theme('fb_connect_username_orig', $object);

  // Make no changes to FBML pages.
  if (fb_is_fbml_canvas()) {
    return $orig;
  }
  elseif ($fbu = fb_get_object_fbu($object)) {

    // Theme the username with XFBML, using original username as backup.
    return theme('fb_connect_fbml_username', $fbu, $object, $orig);
  }
  else {
    return $orig;
  }
}