function fbconnect_login_theme_registry_alter in Facebook Connect 8.2
Same name and namespace in other branches
- 7.2 fbconnect_login/fbconnect_login.module \fbconnect_login_theme_registry_alter()
Implements hook_theme_registry_alter().
Override theme functions for things that can be displayed using XFBML. Currently overriding user_picture. We rename the original entries, as we will use them for users without javascript enabled.
File
- fbconnect_login/
fbconnect_login.module, line 343 - Login functionality for Facebook Connect module
Code
function fbconnect_login_theme_registry_alter(&$theme_registry) {
// Only change image handling if user have the permission to use the image.
$conf = fbconnect_get_config();
if ($conf['user_pictures'] == 'allow') {
// Re-register the original theme function under a new name.
$theme_registry['fbconnect_user_picture_orig'] = $theme_registry['user_picture'];
// Override theme username
$theme_registry['user_picture'] = array(
'arguments' => array(
'account' => NULL,
),
'function' => 'fbconnect_login_theme_user_picture_override',
'preprocess functions' => array(),
'theme path' => drupal_get_path('module', 'fbconnect'),
);
}
}