A few days ago, I started to notice that the Gravatar comment avatar could not be displayed. They were all XX. Because my broadband has been a little cramped in the past few days and often slowed down for no reason. I thought it was because the network speed was not good, or it was my space. There is a problem, but I haven't seen a normal profile picture for several days, which is a bit strange.
After searching on the Internet, it turns out that I am not the only one who has this problem, nor is there a problem with my network or space, but the Gravatar comment avatar server has been GFW. Hey, there is no way, who told us to be born in the great heaven? Fortunately, there is still a solution. Here is the solution I searched for.
Modify the pluggable.php file under the wp-includes folder, open it with Notepad and find these codes:

 if ( is_ssl() ) {
  $host = 'https://secure.gravatar.com';
 } else {
  if ( !empty($email ) )
   $host = sprintf( “http://%d.gravatar.com“, ( hexdec( $email_hash{0} ) % 2 ) );
  else
   $host = 'http://0.gravatar.com';
 }

Modify them to:

 if ( is_ssl() ) {
  $host = 'https://secure.gravatar.com';
 } else {
  $host = 'http:/ /www.gravatar.com';
 }

Then overwrite the original file and it will be OK~~
Or if you find it troublesome to even change it, just download the changed file and upload it for overwriting.
Click to download


Hong Kong/United States/Domestic High Speed ​​VPS

postid
12017

Leave a Reply