You are here

function fb_connect_fb_admin in Drupal for Facebook 6.3

Same name and namespace in other branches
  1. 6.2 fb_connect.admin.inc \fb_connect_fb_admin()
  2. 7.3 fb_connect.admin.inc \fb_connect_fb_admin()

Implementation of hook_fb_admin().

File

./fb_connect.admin.inc, line 11
Admin pages and forms for connect settings.

Code

function fb_connect_fb_admin($op, $data, &$return) {
  if ($op == FB_ADMIN_OP_SET_PROPERTIES) {
    $return['website_url'] = fb_connect_get_website_url($data['fb_app']);
    if (variable_get(FB_VAR_SECURE_URLS, FB_SECURE_URLS_SOMETIMES) == FB_SECURE_URLS_ALWAYS) {
      $return['website_url'] = str_replace('http://', 'https://', $return['website_url']);
    }
    else {
      $return['website_url'] = str_replace('https://', 'http://', $return['website_url']);
    }
  }
  elseif ($op == FB_ADMIN_OP_LIST_PROPERTIES) {
    $return[t('Webiste URL')] = 'website_url';
  }
}