function theme_fboauth_action__connect in Facebook OAuth (FBOAuth) 6
Same name and namespace in other branches
- 7.2 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 422
Code
function theme_fboauth_action__connect($action, $link) {
$url = url($link['href'], array(
'query' => $link['query'],
));
$link['attributes']['class'] = isset($link['attributes']['class']) ? $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 = (empty($_SERVER['HTTPS']) ? 'http' : 'https') . '://www.facebook.com/images/fbconnect/login-buttons/connect_light_medium_short.gif';
return '<a ' . $attributes . ' href="' . $url . '"><img src="' . $src . '" alt="' . $title . '" /></a>';
}