diff --git a/functions.php b/functions.php index 9da5072..c58c45d 100644 --- a/functions.php +++ b/functions.php @@ -126,7 +126,7 @@ function my_enqueue_scripts() //使用官方中文源加速 Gravatar 头像 function replace_gravatar($avatar) { - $avatar = str_replace(array("//gravatar.com/", "//secure.gravatar.com/", "//www.gravatar.com/", "//0.gravatar.com/", "//1.gravatar.com/", "//2.gravatar.com/", "//cn.gravatar.com/"), "//cn.gravatar.com/", $avatar); + $avatar = str_replace(array("//gravatar.com/", "//secure.gravatar.com/", "//www.gravatar.com/", "//0.gravatar.com/", "//1.gravatar.com/", "//2.gravatar.com/", "//cn.gravatar.com/"), "//".getTigerMaterial('tm_gravatar')."/", $avatar); return $avatar; } diff --git a/options.php b/options.php index 0fcd9e3..48d3e3c 100644 --- a/options.php +++ b/options.php @@ -107,6 +107,14 @@ function optionsframework_options() { 'type' => 'text' ); + $options[] = array( + 'name' => __('Gravatar 头像加速', 'theme-textdomain'), + 'desc' => __('请填入加速域名,比如七牛之类的。末尾请不要带有 / 。默认为 cn.gravatar.com', 'theme-textdomain'), + 'id' => 'tm_gravatar', + 'std' => 'cn.gravatar.com', + 'type' => 'text' + ); + $options[] = array( 'name' => __('Creative Commons 授权方式', 'theme-textdomain'), 'desc' => __('请填入所选择的 CC 授权方式,最终会在网页底部及文章结尾出现。默认为 CC BY-NC-SA 3.0', 'theme-textdomain'), diff --git a/page.php b/page.php index b67a35d..97c30e1 100644 --- a/page.php +++ b/page.php @@ -26,8 +26,8 @@ class="mdui-text-color-white tm-index-single-title">