function fbconnect_render_button in Facebook Connect 6
Same name and namespace in other branches
- 5 fbconnect.module \fbconnect_render_button()
- 6.2 fbconnect.module \fbconnect_render_button()
Render a custom button to log in via Facebook.
4 calls to fbconnect_render_button()
- fbconnect_appearance_settings in ./
fbconnect.admin.inc - fbconnect_fbapp_settings in ./
fbconnect.admin.inc - fbconnect_form_alter in ./
fbconnect.module - Impletementation of hook_form_alter.
- fbconnect_user_identities in ./
fbconnect.pages.inc - Menu callback fbconnect identities
File
- ./
fbconnect.module, line 361
Code
function fbconnect_render_button($attr = array()) {
list($size, $length) = explode('_', variable_get('fbconnect_button', NULL));
$default_attr = array(
'text' => t(variable_get('fbconnect_button_text', 'Connect')),
'size' => $size,
'onlogin' => 'facebook_onlogin_ready();',
'background' => 'dark',
'v' => 2,
);
$attr = array_merge($default_attr, $attr);
drupal_alter('fbconnect_login_button', $attr);
$text = $attr['text'];
unset($attr['text']);
return '<fb:login-button ' . drupal_attributes($attr) . '>' . $text . '</fb:login-button>';
}