function fb_connect_init_option in Drupal for Facebook 6.2
Same name and namespace in other branches
- 5.2 fb_connect.module \fb_connect_init_option()
Add an option when initializing facebook's javascript api.
4 calls to fb_connect_init_option()
- fb_connect_block in ./
fb_connect.module - Implementation of hook_block.
- 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.
- fb_connect_form_alter in ./
fb_connect.module
File
- ./
fb_connect.module, line 373 - 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 && !isset($options[$fb_app->apikey])) {
$options[$fb_app->apikey] = array();
}
if ($option) {
$options[$fb_app->apikey][$option] = $value;
}
return $options;
}