LPH
Well-known member
I have this very simple function which returns Gravatars externally from XenForo.
The challenge is that I want the XenForo uploaded avatar to show if the member is not using a Gravatar.
I'm aware of these two ...
and
But trying to wrap the return $email in either one causes nothing to show. The conditional shouldn't be reliant on the login or logout of a visitor.
Does anyone have any suggestions on where I can look to try to figure out a way to get non-Gravatars to show outside XenForo?
PHP:
function xenword_avatar ( $id_or_email ) {
if ( ! get_option( 'show_avatars' ) ) {
return false;
}
$email = $id_or_email;
return $email;
}
add_filter('get_avatar', 'xenword_avatar', 10, 5);
The challenge is that I want the XenForo uploaded avatar to show if the member is not using a Gravatar.
I'm aware of these two ...
Code:
XenForo_Model_Avatar::gravatarExists
Code:
$avatar= XenForo_Upload::getUploadedFile('avatar');
But trying to wrap the return $email in either one causes nothing to show. The conditional shouldn't be reliant on the login or logout of a visitor.
Does anyone have any suggestions on where I can look to try to figure out a way to get non-Gravatars to show outside XenForo?