From 42170293d8248bbef40459bba8130899caa749aa Mon Sep 17 00:00:00 2001 From: owen <32561126+owen0o0@users.noreply.github.com> Date: Tue, 30 Jul 2024 23:24:02 +0800 Subject: [PATCH] Gravatar source --- inc/frame/config/framework.config.php | 10 ++++------ inc/inc.php | 13 ++++++++----- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/inc/frame/config/framework.config.php b/inc/frame/config/framework.config.php index 3edb82f..b3c3260 100644 --- a/inc/frame/config/framework.config.php +++ b/inc/frame/config/framework.config.php @@ -6,7 +6,7 @@ * @Author URI: https://www.iowen.cn/ * @Date: 2019-02-22 21:26:02 * @LastEditors: iowen - * @LastEditTime: 2024-07-30 18:22:23 + * @LastEditTime: 2024-07-30 23:21:25 * @FilePath: /WebStack/inc/frame/config/framework.config.php * @Description: */ @@ -466,14 +466,12 @@ 'id' => 'gravatar', 'type' => 'select', 'title' => 'Gravatar加速', - 'default' => 'geekzu', + 'default' => 'chinayes', 'options' => array( 'gravatar' => __('使用 Gravatar官方 默认服务器','io_setting'), 'cravatar' => __('使用 Cravatar 镜像加速服务','io_setting'), - 'sep' => __('使用 sep.cc 镜像加速服务','io_setting'), - 'loli' => __('使用 loli 镜像加速服务','io_setting'), - 'chinayes' => __('使用 wp-china-yes.cn 镜像加速服务','io_setting'), - 'geekzu' => __('使用 极客族 提供的加速服务','io_setting'), + 'iocdn' => '一为云 加速服务(cdn.iocdn.cc)', + 'chinayes' => __('使用 wp-china-yes.cn 镜像加速服务','io_setting') ), ), diff --git a/inc/inc.php b/inc/inc.php index 4aa5f6e..64d22ca 100644 --- a/inc/inc.php +++ b/inc/inc.php @@ -6,7 +6,7 @@ * @Author URI: https://www.iowen.cn/ * @Date: 2019-02-22 21:26:02 * @LastEditors: iowen - * @LastEditTime: 2024-07-30 22:06:04 + * @LastEditTime: 2024-07-30 23:22:56 * @FilePath: /WebStack/inc/inc.php * @Description: */ @@ -521,7 +521,7 @@ function walker_nav_menu_start_el( $item_output, $item, $depth, $args ){ add_filter('pre_get_avatar_data', function($args, $id_or_email){ - $gravatar_cdn = io_get_option('gravatar','geekzu'); + $gravatar_cdn = io_get_option('gravatar','chinayes'); if($gravatar_cdn=='gravatar'){ return $args; } @@ -584,11 +584,14 @@ function walker_nav_menu_start_el( $item_output, $item, $depth, $args ){ case "chinayes": $url = '//gravatar.wp-china-yes.net/avatar/'.$email_hash; break; - case "geekzu": - $url = '//sdn.geekzu.org/avatar/'.$email_hash; + case "iocdn": + $url = '//cdn.iocdn.cc/avatar/'.$email_hash; + break; + case "qiniu": + $url = '//dn-qiniu-avatar.qbox.me/avatar/'.$email_hash; break; default: - $url = '//sdn.geekzu.org/avatar/'.$email_hash; + $url = '//gravatar.wp-china-yes.net/avatar/'.$email_hash; } $url_args = array_filter([