From 30d997bcca6590814b333d74d5921a41beb63d46 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=9C=E6=81=92?= <2323333339@qq.com>
Date: Tue, 18 May 2021 11:36:24 +0800
Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
core/function.php | 4 ++--
functions.php | 13 +++++++++++++
package.json | 2 +-
3 files changed, 16 insertions(+), 3 deletions(-)
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": [