Skip to content

Commit 4217029

Browse files
committed
Gravatar source
1 parent df13491 commit 4217029

File tree

2 files changed

+12
-11
lines changed

2 files changed

+12
-11
lines changed

inc/frame/config/framework.config.php

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* @Author URI: https://www.iowen.cn/
77
* @Date: 2019-02-22 21:26:02
88
* @LastEditors: iowen
9-
* @LastEditTime: 2024-07-30 18:22:23
9+
* @LastEditTime: 2024-07-30 23:21:25
1010
* @FilePath: /WebStack/inc/frame/config/framework.config.php
1111
* @Description:
1212
*/
@@ -466,14 +466,12 @@
466466
'id' => 'gravatar',
467467
'type' => 'select',
468468
'title' => 'Gravatar加速',
469-
'default' => 'geekzu',
469+
'default' => 'chinayes',
470470
'options' => array(
471471
'gravatar' => __('使用 Gravatar官方 默认服务器','io_setting'),
472472
'cravatar' => __('使用 Cravatar 镜像加速服务','io_setting'),
473-
'sep' => __('使用 sep.cc 镜像加速服务','io_setting'),
474-
'loli' => __('使用 loli 镜像加速服务','io_setting'),
475-
'chinayes' => __('使用 wp-china-yes.cn 镜像加速服务','io_setting'),
476-
'geekzu' => __('使用 极客族 提供的加速服务','io_setting'),
473+
'iocdn' => '一为云 加速服务(cdn.iocdn.cc)',
474+
'chinayes' => __('使用 wp-china-yes.cn 镜像加速服务','io_setting')
477475
),
478476
),
479477

inc/inc.php

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* @Author URI: https://www.iowen.cn/
77
* @Date: 2019-02-22 21:26:02
88
* @LastEditors: iowen
9-
* @LastEditTime: 2024-07-30 22:06:04
9+
* @LastEditTime: 2024-07-30 23:22:56
1010
* @FilePath: /WebStack/inc/inc.php
1111
* @Description:
1212
*/
@@ -521,7 +521,7 @@ function walker_nav_menu_start_el( $item_output, $item, $depth, $args ){
521521

522522

523523
add_filter('pre_get_avatar_data', function($args, $id_or_email){
524-
$gravatar_cdn = io_get_option('gravatar','geekzu');
524+
$gravatar_cdn = io_get_option('gravatar','chinayes');
525525
if($gravatar_cdn=='gravatar'){
526526
return $args;
527527
}
@@ -584,11 +584,14 @@ function walker_nav_menu_start_el( $item_output, $item, $depth, $args ){
584584
case "chinayes":
585585
$url = '//gravatar.wp-china-yes.net/avatar/'.$email_hash;
586586
break;
587-
case "geekzu":
588-
$url = '//sdn.geekzu.org/avatar/'.$email_hash;
587+
case "iocdn":
588+
$url = '//cdn.iocdn.cc/avatar/'.$email_hash;
589+
break;
590+
case "qiniu":
591+
$url = '//dn-qiniu-avatar.qbox.me/avatar/'.$email_hash;
589592
break;
590593
default:
591-
$url = '//sdn.geekzu.org/avatar/'.$email_hash;
594+
$url = '//gravatar.wp-china-yes.net/avatar/'.$email_hash;
592595
}
593596

594597
$url_args = array_filter([

0 commit comments

Comments
 (0)