diff --git a/core/function.php b/core/function.php index 1d33e0d..c114447 100644 --- a/core/function.php +++ b/core/function.php @@ -2,7 +2,7 @@ /* 获取主题当前版本号 */ function _getVersion() { - return "6.9.7"; + return "6.9.8"; }; /* 判断是否是手机 */ @@ -157,7 +157,7 @@ function _endCountTime($precision = 3) /* 通过邮箱生成头像地址 */ function _getAvatarByMail($mail) { - $gravatarsUrl = 'https://gravatar.helingqi.com/wavatar/'; + $gravatarsUrl = Helper::options()->JCustomAvatarSource ? Helper::options()->JCustomAvatarSource : 'https://gravatar.helingqi.com/wavatar/'; $mailLower = strtolower($mail); $md5MailLower = md5($mailLower); $qqMail = str_replace('@qq.com', '', $mailLower); diff --git a/functions.php b/functions.php index 2044f0a..fc5508f 100644 --- a/functions.php +++ b/functions.php @@ -345,6 +345,19 @@ function themeConfig($form) $JCustomFont->setAttribute('class', 'joe_content joe_global'); $form->addInput($JCustomFont); + $JCustomAvatarSource = new Typecho_Widget_Helper_Form_Element_Text( + 'JCustomAvatarSource', + NULL, + NULL, + '自定义头像源(非必填)', + '介绍:用于修改全站头像源地址
+ 例如:https://gravatar.ihuan.me/avatar/
+ 其他:非必填,默认头像源为禾令奇
+ 注意:填写时,务必保证最后有一个/字符,否则不起作用!' + ); + $JCustomAvatarSource->setAttribute('class', 'joe_content joe_global'); + $form->addInput($JCustomAvatarSource); + $JAside_Author_Nick = new Typecho_Widget_Helper_Form_Element_Text( 'JAside_Author_Nick', NULL, diff --git a/package.json b/package.json index 6385486..430cd23 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "typecho-joe-next", - "version": "6.9.7", + "version": "6.9.8", "description": "A Theme Of Typecho", "main": "index.php", "keywords": [