function fbconnect_theme_registry_alter in Facebook Connect 6.2
Same name and namespace in other branches
- 6 fbconnect.module \fbconnect_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.module, line 759 - Integration with Facebook Connect API.
Code
function fbconnect_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_theme_user_picture_override',
'preprocess functions' => array(),
);
}
}