当出现gravatar头像无法加载,首页一直等待*。gravatar.com响应的时候,可以使用如下方法解决
方法一、找到wp-includes文件夹下找到pluggable.php 文件,搜索gravatar.com显示如下代码:
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’;
}
将上面的代码修改为以下代码:
if ( is_ssl() ) {
$host = ‘https://secure.gravatar.com’;
} else {
if ( !empty($email) )
$host = sprintf( “http://en.gravatar.com”, ( hexdec( $email_hash{0} ) % 2 ) );
else
$host = ‘http://en.gravatar.com’;
}
或者为下面代码:
if ( is_ssl() ) {
$host = ‘https://secure.gravatar.com’;
$host = ‘http://en.gravatar.com’;
}
达维营-前端网