function theme_fboauth_action__connect in Facebook OAuth (FBOAuth) 7.2
Same name and namespace in other branches
- 6 fboauth.module \theme_fboauth_action__connect()
- 7 fboauth.module \theme_fboauth_action__connect()
Return a link to initiate a Facebook Connect login or association.
Parameters
$link: An array of properties to be used to generate a login link. Note that all provided properties are required for the Facebook login to succeed and must not be changed. If $link is FALSE, Facebook OAuth is not yet configured.
See also
fboauth_link_properties()
File
- ./
fboauth.module, line 489
Code
function theme_fboauth_action__connect($variables) {
$action = $variables['action'];
$link = $variables['properties'];
$url = url($link['href'], array(
'query' => $link['query'],
));
$link['attributes']['class'][] = 'facebook-action-connect';
$link['attributes']['rel'] = 'nofollow';
$attributes = isset($link['attributes']) ? drupal_attributes($link['attributes']) : '';
$title = isset($link['title']) ? check_plain($link['title']) : '';
$src = ($GLOBALS['is_https'] ? 'https' : 'http') . '://www.facebook.com/images/fbconnect/login-buttons/connect_light_medium_short.gif';
return '<a ' . $attributes . ' href="' . $url . '"><img src="' . $src . '" alt="' . $title . '" /></a>';
}