You are here

function fb_is_canvas in Drupal for Facebook 7.3

Same name and namespace in other branches
  1. 6.3 fb.module \fb_is_canvas()

Is the current request a canvas page?

13 calls to fb_is_canvas()
fb_canvas_form_alter in ./fb_canvas.module
Implements hook_form_alter.
fb_canvas_preprocess_html in ./fb_canvas.module
Implements hook_preprocess_html().
fb_connect_fb in ./fb_connect.module
Implements hook_fb().
fb_devel_fb in ./fb_devel.module
Implements hook_fb().
fb_example_fb in contrib/fb_example.module
Implements hook_fb().

... See full list

File

./fb.module, line 893
This is the core required module of Drupal for Facebook.

Code

function fb_is_canvas() {
  if (fb_is_tab()) {
    return FALSE;
  }
  elseif (fb_settings(FB_SETTINGS_CB)) {

    // Using fb_url_rewrite.
    return TRUE;
  }
  elseif (fb_settings(FB_SETTINGS_TYPE) == FB_SETTINGS_TYPE_CANVAS) {

    // No rewrite, but fb_settings.inc has detected type.
    return TRUE;
  }
  return FALSE;
}