1

I have found this code for disable gravatar on email but it not work on 100% why? Because it replace online image but the image always open with gravatar domanin..

function __default_local_avatar()
{
    // this assumes default_avatar.png is in wp-content/themes/active-theme/images
    return get_bloginfo('template_directory') . '/images/default_avatar.png';
}
add_filter( 'pre_option_avatar_default', '__default_local_avatar' );

How to remove request from gravatar without delete avatar?

5
  • You can change it from Discussion settings.
    – Shazzad
    Commented Jan 14, 2014 at 1:53
  • no, discussion settings --> only disable or change image Commented Jan 14, 2014 at 1:57
  • open wp-includes/pluggable.php and remove gravatar.com domain, replace url with local avatar!! SIMPLE VERY SIMPLE Commented Jan 14, 2014 at 1:58
  • That code does not disable gravatar, it just sets a custom default image.
    – Otto
    Commented Jan 14, 2014 at 3:22
  • So is this not possible then? Commented Aug 27, 2014 at 1:19

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.