From d28e6850bceb025e90a53cf7d2ff51f5421ffdfb Mon Sep 17 00:00:00 2001 From: Licoy Date: Sat, 9 Jan 2021 09:15:14 +0800 Subject: [PATCH] =?UTF-8?q?:zap:=20=E4=BC=98=E5=8C=96gravatar=E9=95=9C?= =?UTF-8?q?=E5=83=8F=E6=BA=90=20#37?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- inc/fun/opt.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/inc/fun/opt.php b/inc/fun/opt.php index beff3343..818ff375 100755 --- a/inc/fun/opt.php +++ b/inc/fun/opt.php @@ -81,7 +81,7 @@ function get_path_query($query) } //GrAvatar头像源 -$gravatar_urls = array('www.gravatar.com','0.gravatar.com','1.gravatar.com','2.gravatar.com'); +$gravatar_urls = array('www.gravatar.com','0.gravatar.com','1.gravatar.com','2.gravatar.com','secure.gravatar.com','cn.gravatar.com'); function cn_avatar($avatar) { global $gravatar_urls; return str_replace( $gravatar_urls, 'cn.gravatar.com', $avatar ); @@ -96,7 +96,7 @@ function loli_ssl_avatar($avatar) { } function v2ex_ssl_avatar($avatar) { global $gravatar_urls; - return str_replace("http://","https://",str_replace( $gravatar_urls, 'cdn.v2ex.com', $avatar )); + return str_replace("http://","https://",str_replace("/avatar", "/gravatar", str_replace( $gravatar_urls, 'cdn.v2ex.com', $avatar ))); } //评论回复邮件通知 function comment_mail_notify($comment_id) { @@ -135,7 +135,7 @@ function sc_quicktags() { function wp_compress_html(){ //禁止pre标签压缩 - function pre_no_compress($content) { + function pre_no_compress($content) { if(preg_match_all('/<\/pre>/i', $content, $matches)) { $content = ''.$content; $content.= '';