You are here

function fb_social_custom_channel_url in Facebook social plugins integration 6

Same name and namespace in other branches
  1. 6.2 fb_social.module \fb_social_custom_channel_url()
  2. 7.2 fb_social.module \fb_social_custom_channel_url()

The Custom Channel URL that FB.init has as an option

1 string reference to 'fb_social_custom_channel_url'
fb_social_menu in ./fb_social.module
Implementation of hook_menu

File

./fb_social.module, line 260
Common settings for all fb social plugins

Code

function fb_social_custom_channel_url() {
  header("Cache-Control: public, s-maxage=31536000, max-age=31536000");
  header("Expires: Sun, 1 Oct 2079 00:00:00 GMT");
  global $language;
  $languages = _map_active_languages();
  $fb_locale = "en_US";
  if (fb_social_auto_language()) {
    if (array_key_exists($language->language, $languages)) {
      $fb_locale = $languages[$language->language];
    }
  }
  else {
    $fb_locale = variable_get('fb_social_locale', 'en_US');
  }
  print '<script src="http://connect.facebook.net/' . $fb_locale . '/all.js"></script>';
  exit;
}