You are here

function fb_canvas_theme_username_override in Drupal for Facebook 6.2

Our replacement for theme('username', ...)

1 string reference to 'fb_canvas_theme_username_override'
fb_canvas_theme_registry_alter in ./fb_canvas.module
Implementation of hook_theme_registry_alter().

File

./fb_canvas.module, line 949
This module provides support for Canvas page applications. Use Drupal to power traditional Facebook Apps.

Code

function fb_canvas_theme_username_override($object) {
  $orig = theme('fb_canvas_username_orig', $object);

  // Make no changes to non-FBML pages.
  if (fb_canvas_is_fbml() && ($fbu = fb_get_object_fbu($object))) {

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