| 代码如下 | 复制代码 |
| function Bing_validate_gravatar( $comment ){ $headers = @get_headers( 'http://www.*gr*a*vatar.com/avatar/' . md5( strtolower( trim( $comment['comment_author_email'] ) ) ) . '?d=404' ); if( preg_match( '|200|', $headers[0] ) ) return $comment; $text = __( '请使用有头像的邮箱', 'Bing' ); if( function_exists( 'err' ) ) return err( $text ); return wp_die( $text ); } add_action( 'preprocess_comment', 'Bing_validate_gravatar' ); |
|
代码加到 functions.php 即可,不过由于 Gravatar 的服务器在国外,评论的时候可能略影响评论提交速度。
deepin20怎么新增字体? deepin20安装字体的教程
Linux如何给文件权限? linux给文件添加可执行权限的技巧
deepin20桌面图标样式怎么修改? deepin更换图标主题的技巧
virtualbox打不开虚拟机怎么办? linux无法访问virtualbox的解决办法
deepin怎么注销系统? deepin系统注销与切换用户的方法
Manjaro linux怎么调鼠标速度? Manjaro鼠标设置光标速度的技巧