You are here

function fb_connect_init_option in Drupal for Facebook 5.2

Same name and namespace in other branches
  1. 6.2 fb_connect.module \fb_connect_init_option()

Add an option when initializing facebook's javascript api.

2 calls to fb_connect_init_option()
fb_connect_fb in ./fb_connect.module
Implementation of hook_fb().
fb_connect_footer in ./fb_connect.module
Include facebook javascript in the footer of the current page.

File

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

Code

function fb_connect_init_option($option = NULL, $value = NULL, $fb_app = NULL) {
  if ($option && !isset($fb_app)) {
    $fb_app = $GLOBALS['fb_app'];
  }
  if ($option && !$fb_app) {
    return;
  }
  static $options;
  if (!$options) {
    $options = array();
  }
  if ($fb_app && !$options[$fb_app->apikey]) {
    $options[$fb_app->apikey] = array();
  }
  if ($option) {
    $options[$fb_app->apikey][$option] = $value;
  }
  return $options;
}