feat: add gravatar proxy option

add gravatar avatar proxy option, you can change your front-end gravatar
url to your costum proxy
fix #208
pull/210/head
Spirit 2020-04-01 22:53:09 +08:00
parent 7437bfa456
commit dc52354c74
11 changed files with 609 additions and 234 deletions

File diff suppressed because one or more lines are too long

View File

@ -8,7 +8,7 @@ function get_gravatar(email, size) {
var size = size || 80;
return 'https://gravatar.2heng.xin/avatar/' + MD5(email) + '.jpg?s=' + size + '&d=mm';
return 'https://' + Poi.gravatar_url + '/' + MD5(email) + '.jpg?s=' + size + '&d=mm';
}
// sync css

View File

@ -88,7 +88,7 @@
'comment_notes_after' => '',
'comment_notes_before' => '',
'fields' => apply_filters( 'comment_form_default_fields', array(
'avatar' => '<div class="cmt-info-container"><div class="comment-user-avatar"><img src="https://gravatar.2heng.xin/avatar/f11f237b3de93c93b24045e71f7f65c6?s=80&d=mm&r=g"><div class="socila-check qq-check"><i class="fa fa-qq" aria-hidden="true"></i></div><div class="socila-check gravatar-check"><i class="fa fa-google" aria-hidden="true"></i></div></div>',
'avatar' => '<div class="cmt-info-container"><div class="comment-user-avatar"><img src="' . get_template_directory_uri() . '/images/avatar.jpeg"><div class="socila-check qq-check"><i class="fa fa-qq" aria-hidden="true"></i></div><div class="socila-check gravatar-check"><i class="fa fa-google" aria-hidden="true"></i></div></div>',
'author' =>
'<div class="popup cmt-popup cmt-author" onclick="cmt_showPopup(this)"><span class="popuptext" id="thePopup" style="margin-left: -115px;width: 230px;">' . __("Auto pull nickname and avatar with a QQ num. entered", "sakura")/*输入QQ号将自动拉取昵称和头像*/ . '</span><input type="text" placeholder="' . __("Nickname or QQ number", "sakura") /*昵称或QQ号*/. ' ' . ( $req ? '(' . __("Name* ", "sakura") . ')' : '') . '" name="author" id="author" value="' . esc_attr($comment_author) . '" size="22" autocomplete="off" tabindex="1" ' . ($req ? "aria-required='true'" : '' ). ' /></div>',
'email' =>

View File

@ -204,6 +204,7 @@ function sakura_scripts()
// }
//拦截移动端
version_compare($GLOBALS['wp_version'], '5.1', '>=') ? $reply_link_version = 'new' : $reply_link_version = 'old';
$gravatar_url = akina_option('gravatar_proxy') ?: 'secure.gravatar.com/avatar';
wp_localize_script('app', 'Poi', array(
'pjax' => akina_option('poi_pjax'),
'movies' => $movies,
@ -215,7 +216,8 @@ function sakura_scripts()
'reply_link_version' => $reply_link_version,
'api' => esc_url_raw(rest_url()),
'nonce' => wp_create_nonce('wp_rest'),
'google_analytics_id' => akina_option('google_analytics_id', '')
'google_analytics_id' => akina_option('google_analytics_id', ''),
'gravatar_url' => $gravatar_url
));
}
add_action('wp_enqueue_scripts', 'sakura_scripts');
@ -608,13 +610,15 @@ function get_link_items()
* Gravatar头像使用中国服务器
*/
function gravatar_cn($url)
{
$gravatar_url = array('0.gravatar.com', '1.gravatar.com', '2.gravatar.com', 'secure.gravatar.com');
{
$gravatar_url = array('0.gravatar.com/avatar','1.gravatar.com/avatar','2.gravatar.com/avatar','secure.gravatar.com/avatar');
//return str_replace($gravatar_url, 'cn.gravatar.com', $url);
//官方服务器近期大陆访问 429建议使用镜像
return str_replace( $gravatar_url, 'gravatar.2heng.xin', $url );
return str_replace( $gravatar_url, akina_option('gravatar_proxy'), $url );
}
if(akina_option('gravatar_proxy')){
add_filter('get_avatar_url', 'gravatar_cn', 4);
}
add_filter('get_avatar_url', 'gravatar_cn', 4);
/*
* 自定义默认头像

BIN
images/avatar.jpeg 100644

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

View File

@ -1,8 +1,8 @@
msgid ""
msgstr ""
"Project-Id-Version: Sakura\n"
"POT-Creation-Date: 2020-03-29 00:39+0800\n"
"PO-Revision-Date: 2020-03-29 00:39+0800\n"
"POT-Creation-Date: 2020-04-01 22:52+0800\n"
"PO-Revision-Date: 2020-04-01 22:52+0800\n"
"Last-Translator: \n"
"Language-Team: \n"
"Language: en_US\n"
@ -142,74 +142,74 @@ msgstr ""
msgid "Nav Menus"
msgstr ""
#: functions.php:421 inc/theme_plus.php:186 layouts/authorprofile.php:11
#: functions.php:423 inc/theme_plus.php:186 layouts/authorprofile.php:11
#: options.php:121
msgid "Author"
msgstr ""
#: functions.php:421
#: functions.php:423
msgid "Blogger"
msgstr ""
#: functions.php:425
#: functions.php:427
msgid "Location"
msgstr ""
#: functions.php:429
#: functions.php:431
msgid "Private"
msgstr ""
#: functions.php:431
#: functions.php:433
msgid "Yes"
msgstr ""
#: functions.php:433
#: functions.php:435
msgid "No"
msgstr ""
#: functions.php:436
#: functions.php:438
msgid "Edit"
msgstr ""
#: functions.php:525
#: functions.php:527
msgid ""
"Please install pulgin <a href=\"https://wordpress.org/plugins/wp-statistics/"
"\" target=\"_blank\">WP-Statistics</a>"
msgstr ""
#: functions.php:575
#: functions.php:577
msgid "This guy is so lazy ╮(╯▽╰)╭"
msgstr ""
#: functions.php:1330
#: functions.php:1334
msgid "All expand/collapse"
msgstr ""
#: functions.php:1351 options.php:834
#: functions.php:1355 options.php:834
msgid " "
msgstr ""
#: functions.php:1355
#: functions.php:1359
msgid " post(s)"
msgstr ""
#: functions.php:1378 functions.php:1381 inc/theme_plus.php:478
#: functions.php:1382 functions.php:1385 inc/theme_plus.php:478
msgid "Dashboard"
msgstr ""
#: functions.php:1607
#: functions.php:1611
msgid "<b>ERROR</b>: This email domain (<b>@"
msgstr ""
#: functions.php:1712
#: functions.php:1716
msgid "QQ"
msgstr ""
#: functions.php:1784
#: functions.php:1788
msgid "Sidebar"
msgstr ""
#: functions.php:1896
#: functions.php:1900
msgid ""
"<b> For a better experience, please do not set <a href=\"/wp-admin/options-"
"permalink.php\"> permalink </a> as plain. To do this, you may need to "
@ -923,7 +923,7 @@ msgstr ""
msgid "Whether to turn on the top-feature"
msgstr ""
#: options.php:446 options.php:1085
#: options.php:446 options.php:1092
msgid "Default on"
msgstr ""
@ -1475,72 +1475,82 @@ msgid "23k Views (chinese)"
msgstr ""
#: options.php:1010
msgid "Comment image upload API"
msgid "Gravatar avatar proxy"
msgstr ""
#: options.php:1015
msgid "Imgur (https://imgur.com)"
msgstr ""
#: options.php:1016
msgid "SM.MS (https://sm.ms)"
#: options.php:1011
msgid ""
"A front-ed proxy for Gravatar, eg. gravatar.2heng.xin/avatar . Leave it "
"blank if you do not need."
msgstr ""
#: options.php:1017
msgid "Chevereto (https://chevereto.com)"
msgstr ""
#: options.php:1021
msgid "Imgur Client ID"
msgid "Comment image upload API"
msgstr ""
#: options.php:1022
msgid "Imgur (https://imgur.com)"
msgstr ""
#: options.php:1023
msgid "SM.MS (https://sm.ms)"
msgstr ""
#: options.php:1024
msgid "Chevereto (https://chevereto.com)"
msgstr ""
#: options.php:1028
msgid "Imgur Client ID"
msgstr ""
#: options.php:1029
msgid ""
"Register your application <a href=\"https://api.imgur.com/oauth2/addclient"
"\">here</a>, note we only need the Client ID here."
msgstr ""
#: options.php:1028
#: options.php:1035
msgid "SM.MS Secret Token"
msgstr ""
#: options.php:1029
#: options.php:1036
msgid ""
"Register your application <a href=\"https://sm.ms/home/apitoken\">here</a>."
msgstr ""
#: options.php:1035
#: options.php:1042
msgid "Chevereto API v1 key"
msgstr ""
#: options.php:1036
#: options.php:1043
msgid "Get your API key here: "
msgstr ""
#: options.php:1042
#: options.php:1049
msgid "Chevereto URL"
msgstr ""
#: options.php:1043
#: options.php:1050
msgid ""
"Your Chevereto homepage url, no slash in the end, eg. https://your.cherverto."
"com"
msgstr ""
#: options.php:1049
#: options.php:1056
msgid "Comment images proxy"
msgstr ""
#: options.php:1050
#: options.php:1057
msgid ""
"A front-ed proxy for the uploaded images. Leave it blank if you do not need."
msgstr ""
#: options.php:1056
#: options.php:1063
msgid "Imgur upload proxy"
msgstr ""
#: options.php:1057
#: options.php:1064
msgid ""
"A back-ed proxy to upload images. You may set a self hosted proxy with "
"Nginx, following my <a href=\"https://2heng.xin/2018/06/06/javascript-upload-"
@ -1550,151 +1560,151 @@ msgid ""
"a>】"
msgstr ""
#: options.php:1063
#: options.php:1070
msgid "Enable live search"
msgstr ""
#: options.php:1064
#: options.php:1071
msgid ""
"Real-time search in the foreground, call the Rest API to update the cache "
"every hour, you can manually set the cache time in functions.php"
"every hour, you can manually set the cache time in api.php"
msgstr ""
#: options.php:1070
#: options.php:1077
msgid "Include comments in live search"
msgstr ""
#: options.php:1071
#: options.php:1078
msgid ""
"Search for comments in real-time search (not recommended if there are too "
"many comments on the site)"
msgstr ""
#: options.php:1077
#: options.php:1084
msgid "Enable baguetteBox"
msgstr ""
#: options.php:1078
#: options.php:1085
msgid ""
"Default off<a href=\"https://github.com/mashirozx/Sakura/wiki/Fancybox"
"\">please read wiki</a>"
msgstr ""
#: options.php:1084
#: options.php:1091
msgid "Enable lazyload in posts"
msgstr ""
#: options.php:1091
#: options.php:1098
msgid "lazyload spinner"
msgstr ""
#: options.php:1092
#: options.php:1099
msgid "The placeholder to display when the image loads, fill in the image url"
msgstr ""
#: options.php:1098
#: options.php:1105
msgid "Whether to enable the clipboard copyright"
msgstr ""
#: options.php:1099
#: options.php:1106
msgid ""
"Automatically add a copyright to the clipboard when copying more than 30 "
"bytes, which is enabled by default."
msgstr ""
#: options.php:1105
#: options.php:1112
msgid "Email address prefix"
msgstr ""
#: options.php:1106
#: options.php:1113
msgid ""
"For sending system mail, the sender address displayed in the user's mailbox, "
"do not use Chinese, the default system email address is bibi@your_domain_name"
msgstr ""
#: options.php:1112
#: options.php:1119
msgid "Comments reply notification"
msgstr ""
#: options.php:1113
#: options.php:1120
msgid ""
"WordPress will use email to notify users when their comments receive a reply "
"by default. Tick this item allows users to set their own comments reply "
"notification"
msgstr ""
#: options.php:1119
#: options.php:1126
msgid "Administrator comment notification"
msgstr ""
#: options.php:1120
#: options.php:1127
msgid ""
"Whether to use email notification when the administrator's comments receive "
"a reply"
msgstr ""
#: options.php:1126
#: options.php:1133
msgid "Enable private comment"
msgstr ""
#: options.php:1127
#: options.php:1134
msgid "Allow users to set their own comments to be invisible to others"
msgstr ""
#: options.php:1133
#: options.php:1140
msgid "Human verification"
msgstr ""
#: options.php:1134
#: options.php:1141
msgid "Enable human verification"
msgstr ""
#: options.php:1140
#: options.php:1147
msgid "QQ avatar link encryption"
msgstr ""
#: options.php:1141
#: options.php:1148
msgid "Do not display the user's qq avatar links directly."
msgstr ""
#: options.php:1146
#: options.php:1153
msgid "Off (default)"
msgstr ""
#: options.php:1147
#: options.php:1154
msgid "use redirect (general security)"
msgstr ""
#: options.php:1148
#: options.php:1155
msgid "fetch data at backend (high security)"
msgstr ""
#: options.php:1149
#: options.php:1156
msgid "fetch data at backend (high securityslow)"
msgstr ""
#: options.php:1153
#: options.php:1160
msgid "Comment UA infomation"
msgstr ""
#: options.php:1154
#: options.php:1161
msgid ""
"Check to enable, display the user's browser, operating system information"
msgstr ""
#: options.php:1160
#: options.php:1167
msgid "Enable disqus"
msgstr ""
#: options.php:1161
#: options.php:1168
msgid "Enable disqus for comment"
msgstr ""
#: options.php:1167
#: options.php:1174
msgid "Time Zone adjustment"
msgstr ""
#: options.php:1168
#: options.php:1175
msgid ""
"If the comment has a time difference problem adjust here, fill in an "
"integer, the calculation method: actual_time = display_error_time - "

View File

@ -3,7 +3,7 @@ msgid ""
msgstr ""
"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
"Project-Id-Version: Sakura\n"
"POT-Creation-Date: 2020-03-29 00:38+0800\n"
"POT-Creation-Date: 2020-04-01 22:51+0800\n"
"PO-Revision-Date: 2019-11-01 14:27+0800\n"
"Last-Translator: \n"
"Language-Team: \n"
@ -142,73 +142,73 @@ msgstr ""
msgid "Nav Menus"
msgstr ""
#: functions.php:421 inc/theme_plus.php:186 layouts/authorprofile.php:11 options.php:121
#: functions.php:423 inc/theme_plus.php:186 layouts/authorprofile.php:11 options.php:121
msgid "Author"
msgstr ""
#: functions.php:421
#: functions.php:423
msgid "Blogger"
msgstr ""
#: functions.php:425
#: functions.php:427
msgid "Location"
msgstr ""
#: functions.php:429
#: functions.php:431
msgid "Private"
msgstr ""
#: functions.php:431
#: functions.php:433
msgid "Yes"
msgstr ""
#: functions.php:433
#: functions.php:435
msgid "No"
msgstr ""
#: functions.php:436
#: functions.php:438
msgid "Edit"
msgstr ""
#: functions.php:525
#: functions.php:527
msgid ""
"Please install pulgin <a href=\"https://wordpress.org/plugins/wp-statistics/\" target=\"_blank"
"\">WP-Statistics</a>"
msgstr ""
#: functions.php:575
#: functions.php:577
msgid "This guy is so lazy ╮(╯▽╰)╭"
msgstr ""
#: functions.php:1330
#: functions.php:1334
msgid "All expand/collapse"
msgstr ""
#: functions.php:1351 options.php:834
#: functions.php:1355 options.php:834
msgid " "
msgstr ""
#: functions.php:1355
#: functions.php:1359
msgid " post(s)"
msgstr ""
#: functions.php:1378 functions.php:1381 inc/theme_plus.php:478
#: functions.php:1382 functions.php:1385 inc/theme_plus.php:478
msgid "Dashboard"
msgstr ""
#: functions.php:1607
#: functions.php:1611
msgid "<b>ERROR</b>: This email domain (<b>@"
msgstr ""
#: functions.php:1712
#: functions.php:1716
msgid "QQ"
msgstr ""
#: functions.php:1784
#: functions.php:1788
msgid "Sidebar"
msgstr ""
#: functions.php:1896
#: functions.php:1900
msgid ""
"<b> For a better experience, please do not set <a href=\"/wp-admin/options-permalink.php\"> "
"permalink </a> as plain. To do this, you may need to configure <a href=\"https://www.wpdaxue."
@ -911,7 +911,7 @@ msgstr ""
msgid "Whether to turn on the top-feature"
msgstr ""
#: options.php:446 options.php:1085
#: options.php:446 options.php:1092
msgid "Default on"
msgstr ""
@ -1451,68 +1451,78 @@ msgid "23k Views (chinese)"
msgstr ""
#: options.php:1010
msgid "Comment image upload API"
msgid "Gravatar avatar proxy"
msgstr ""
#: options.php:1015
msgid "Imgur (https://imgur.com)"
msgstr ""
#: options.php:1016
msgid "SM.MS (https://sm.ms)"
#: options.php:1011
msgid ""
"A front-ed proxy for Gravatar, eg. gravatar.2heng.xin/avatar . Leave it blank if you do not "
"need."
msgstr ""
#: options.php:1017
msgid "Chevereto (https://chevereto.com)"
msgstr ""
#: options.php:1021
msgid "Imgur Client ID"
msgid "Comment image upload API"
msgstr ""
#: options.php:1022
msgid "Imgur (https://imgur.com)"
msgstr ""
#: options.php:1023
msgid "SM.MS (https://sm.ms)"
msgstr ""
#: options.php:1024
msgid "Chevereto (https://chevereto.com)"
msgstr ""
#: options.php:1028
msgid "Imgur Client ID"
msgstr ""
#: options.php:1029
msgid ""
"Register your application <a href=\"https://api.imgur.com/oauth2/addclient\">here</a>, note we "
"only need the Client ID here."
msgstr ""
#: options.php:1028
#: options.php:1035
msgid "SM.MS Secret Token"
msgstr ""
#: options.php:1029
#: options.php:1036
msgid "Register your application <a href=\"https://sm.ms/home/apitoken\">here</a>."
msgstr ""
#: options.php:1035
#: options.php:1042
msgid "Chevereto API v1 key"
msgstr ""
#: options.php:1036
#: options.php:1043
msgid "Get your API key here: "
msgstr ""
#: options.php:1042
#: options.php:1049
msgid "Chevereto URL"
msgstr ""
#: options.php:1043
#: options.php:1050
msgid "Your Chevereto homepage url, no slash in the end, eg. https://your.cherverto.com"
msgstr ""
#: options.php:1049
#: options.php:1056
msgid "Comment images proxy"
msgstr ""
#: options.php:1050
#: options.php:1057
msgid "A front-ed proxy for the uploaded images. Leave it blank if you do not need."
msgstr ""
#: options.php:1056
#: options.php:1063
msgid "Imgur upload proxy"
msgstr ""
#: options.php:1057
#: options.php:1064
msgid ""
"A back-ed proxy to upload images. You may set a self hosted proxy with Nginx, following my <a "
"href=\"https://2heng.xin/2018/06/06/javascript-upload-images-with-imgur-api/\">turtal</a>. "
@ -1521,146 +1531,146 @@ msgid ""
"</a>】"
msgstr ""
#: options.php:1063
#: options.php:1070
msgid "Enable live search"
msgstr ""
#: options.php:1064
#: options.php:1071
msgid ""
"Real-time search in the foreground, call the Rest API to update the cache every hour, you can "
"manually set the cache time in functions.php"
"manually set the cache time in api.php"
msgstr ""
#: options.php:1070
#: options.php:1077
msgid "Include comments in live search"
msgstr ""
#: options.php:1071
#: options.php:1078
msgid ""
"Search for comments in real-time search (not recommended if there are too many comments on the "
"site)"
msgstr ""
#: options.php:1077
#: options.php:1084
msgid "Enable baguetteBox"
msgstr ""
#: options.php:1078
#: options.php:1085
msgid ""
"Default off<a href=\"https://github.com/mashirozx/Sakura/wiki/Fancybox\">please read wiki</a>"
msgstr ""
#: options.php:1084
#: options.php:1091
msgid "Enable lazyload in posts"
msgstr ""
#: options.php:1091
#: options.php:1098
msgid "lazyload spinner"
msgstr ""
#: options.php:1092
#: options.php:1099
msgid "The placeholder to display when the image loads, fill in the image url"
msgstr ""
#: options.php:1098
#: options.php:1105
msgid "Whether to enable the clipboard copyright"
msgstr ""
#: options.php:1099
#: options.php:1106
msgid ""
"Automatically add a copyright to the clipboard when copying more than 30 bytes, which is "
"enabled by default."
msgstr ""
#: options.php:1105
#: options.php:1112
msgid "Email address prefix"
msgstr ""
#: options.php:1106
#: options.php:1113
msgid ""
"For sending system mail, the sender address displayed in the user's mailbox, do not use "
"Chinese, the default system email address is bibi@your_domain_name"
msgstr ""
#: options.php:1112
#: options.php:1119
msgid "Comments reply notification"
msgstr ""
#: options.php:1113
#: options.php:1120
msgid ""
"WordPress will use email to notify users when their comments receive a reply by default. Tick "
"this item allows users to set their own comments reply notification"
msgstr ""
#: options.php:1119
#: options.php:1126
msgid "Administrator comment notification"
msgstr ""
#: options.php:1120
#: options.php:1127
msgid "Whether to use email notification when the administrator's comments receive a reply"
msgstr ""
#: options.php:1126
#: options.php:1133
msgid "Enable private comment"
msgstr ""
#: options.php:1127
#: options.php:1134
msgid "Allow users to set their own comments to be invisible to others"
msgstr ""
#: options.php:1133
#: options.php:1140
msgid "Human verification"
msgstr ""
#: options.php:1134
#: options.php:1141
msgid "Enable human verification"
msgstr ""
#: options.php:1140
#: options.php:1147
msgid "QQ avatar link encryption"
msgstr ""
#: options.php:1141
#: options.php:1148
msgid "Do not display the user's qq avatar links directly."
msgstr ""
#: options.php:1146
#: options.php:1153
msgid "Off (default)"
msgstr ""
#: options.php:1147
#: options.php:1154
msgid "use redirect (general security)"
msgstr ""
#: options.php:1148
#: options.php:1155
msgid "fetch data at backend (high security)"
msgstr ""
#: options.php:1149
#: options.php:1156
msgid "fetch data at backend (high securityslow)"
msgstr ""
#: options.php:1153
#: options.php:1160
msgid "Comment UA infomation"
msgstr ""
#: options.php:1154
#: options.php:1161
msgid "Check to enable, display the user's browser, operating system information"
msgstr ""
#: options.php:1160
#: options.php:1167
msgid "Enable disqus"
msgstr ""
#: options.php:1161
#: options.php:1168
msgid "Enable disqus for comment"
msgstr ""
#: options.php:1167
#: options.php:1174
msgid "Time Zone adjustment"
msgstr ""
#: options.php:1168
#: options.php:1175
msgid ""
"If the comment has a time difference problem adjust here, fill in an integer, the calculation "
"method: actual_time = display_error_time - the_integer_you_entered (unit: hour)"

Binary file not shown.

View File

@ -1,8 +1,8 @@
msgid ""
msgstr ""
"Project-Id-Version: Sakura\n"
"POT-Creation-Date: 2020-03-29 00:38+0800\n"
"PO-Revision-Date: 2020-03-29 00:38+0800\n"
"POT-Creation-Date: 2020-04-01 22:51+0800\n"
"PO-Revision-Date: 2020-04-01 22:52+0800\n"
"Last-Translator: \n"
"Language-Team: \n"
"Language: zh_CN\n"
@ -142,36 +142,36 @@ msgstr "小工具"
msgid "Nav Menus"
msgstr "导航菜单"
#: functions.php:421 inc/theme_plus.php:186 layouts/authorprofile.php:11
#: functions.php:423 inc/theme_plus.php:186 layouts/authorprofile.php:11
#: options.php:121
msgid "Author"
msgstr "作者"
#: functions.php:421
#: functions.php:423
msgid "Blogger"
msgstr "博主"
#: functions.php:425
#: functions.php:427
msgid "Location"
msgstr "来自"
#: functions.php:429
#: functions.php:431
msgid "Private"
msgstr "私密"
#: functions.php:431
#: functions.php:433
msgid "Yes"
msgstr "是"
#: functions.php:433
#: functions.php:435
msgid "No"
msgstr "否"
#: functions.php:436
#: functions.php:438
msgid "Edit"
msgstr "编辑"
#: functions.php:525
#: functions.php:527
msgid ""
"Please install pulgin <a href=\"https://wordpress.org/plugins/wp-statistics/"
"\" target=\"_blank\">WP-Statistics</a>"
@ -179,39 +179,39 @@ msgstr ""
"请安装插件 <a href=\"https://wordpress.org/plugins/wp-statistics/\" target="
"\"_blank\">WP-Statistics</a>"
#: functions.php:575
#: functions.php:577
msgid "This guy is so lazy ╮(╯▽╰)╭"
msgstr "这家伙好懒╮(╯▽╰)╭"
#: functions.php:1330
#: functions.php:1334
msgid "All expand/collapse"
msgstr "全部展开/收缩"
#: functions.php:1351 options.php:834
#: functions.php:1355 options.php:834
msgid " "
msgstr ""
#: functions.php:1355
#: functions.php:1359
msgid " post(s)"
msgstr " 篇文章"
#: functions.php:1378 functions.php:1381 inc/theme_plus.php:478
#: functions.php:1382 functions.php:1385 inc/theme_plus.php:478
msgid "Dashboard"
msgstr "管理中心"
#: functions.php:1607
#: functions.php:1611
msgid "<b>ERROR</b>: This email domain (<b>@"
msgstr ""
#: functions.php:1712
#: functions.php:1716
msgid "QQ"
msgstr ""
#: functions.php:1784
#: functions.php:1788
msgid "Sidebar"
msgstr "侧栏"
#: functions.php:1896
#: functions.php:1900
msgid ""
"<b> For a better experience, please do not set <a href=\"/wp-admin/options-"
"permalink.php\"> permalink </a> as plain. To do this, you may need to "
@ -938,7 +938,7 @@ msgstr "点点"
msgid "Whether to turn on the top-feature"
msgstr "是否开启聚焦"
#: options.php:446 options.php:1085
#: options.php:446 options.php:1092
msgid "Default on"
msgstr "默认开启"
@ -1511,26 +1511,38 @@ msgid "23k Views (chinese)"
msgstr "23k 次访问(中式)"
#: options.php:1010
msgid "Gravatar avatar proxy"
msgstr "Gravatar头像代理"
#: options.php:1011
msgid ""
"A front-ed proxy for Gravatar, eg. gravatar.2heng.xin/avatar . Leave it "
"blank if you do not need."
msgstr ""
"填写Gravatar头像的代理地址例如gravatar.2heng.xin/avatar。留空则不使用代"
"理。"
#: options.php:1017
msgid "Comment image upload API"
msgstr "评论上传图片接口"
#: options.php:1015
#: options.php:1022
msgid "Imgur (https://imgur.com)"
msgstr ""
#: options.php:1016
#: options.php:1023
msgid "SM.MS (https://sm.ms)"
msgstr ""
#: options.php:1017
#: options.php:1024
msgid "Chevereto (https://chevereto.com)"
msgstr ""
#: options.php:1021
#: options.php:1028
msgid "Imgur Client ID"
msgstr ""
#: options.php:1022
#: options.php:1029
msgid ""
"Register your application <a href=\"https://api.imgur.com/oauth2/addclient"
"\">here</a>, note we only need the Client ID here."
@ -1538,48 +1550,48 @@ msgstr ""
"在<a href=\"https://api.imgur.com/oauth2/addclient\">这里</a>注册你的 "
"application , 注意此处只需要填写 Client ID."
#: options.php:1028
#: options.php:1035
msgid "SM.MS Secret Token"
msgstr ""
#: options.php:1029
#: options.php:1036
msgid ""
"Register your application <a href=\"https://sm.ms/home/apitoken\">here</a>."
msgstr "在<a href=\"https://sm.ms/home/apitoken\">这里</a>获取 key."
#: options.php:1035
#: options.php:1042
msgid "Chevereto API v1 key"
msgstr ""
#: options.php:1036
#: options.php:1043
msgid "Get your API key here: "
msgstr "在这里获取你的 API key "
#: options.php:1042
#: options.php:1049
msgid "Chevereto URL"
msgstr ""
#: options.php:1043
#: options.php:1050
msgid ""
"Your Chevereto homepage url, no slash in the end, eg. https://your.cherverto."
"com"
msgstr ""
"你的 Chevereto 首页 url, 注意结尾没有 /, 例如https://your.cherverto.com"
#: options.php:1049
#: options.php:1056
msgid "Comment images proxy"
msgstr "评论图片代理"
#: options.php:1050
#: options.php:1057
msgid ""
"A front-ed proxy for the uploaded images. Leave it blank if you do not need."
msgstr "前端显示的图片的代理。"
#: options.php:1056
#: options.php:1063
msgid "Imgur upload proxy"
msgstr "Imgur 上传代理"
#: options.php:1057
#: options.php:1064
msgid ""
"A back-ed proxy to upload images. You may set a self hosted proxy with "
"Nginx, following my <a href=\"https://2heng.xin/2018/06/06/javascript-upload-"
@ -1594,33 +1606,33 @@ msgstr ""
"端显示都需要代理!如果服务器在国外不需要上传代理,此处填写默认值即可:【<a "
"href=\"https://api.imgur.com/3/image/\">https://api.imgur.com/3/image/</a>】"
#: options.php:1063
#: options.php:1070
msgid "Enable live search"
msgstr "启用实时搜索"
#: options.php:1064
#: options.php:1071
msgid ""
"Real-time search in the foreground, call the Rest API to update the cache "
"every hour, you can manually set the cache time in functions.php"
"every hour, you can manually set the cache time in api.php"
msgstr ""
"前台实现实时搜索,调用 Rest API 每小时更新一次缓存,可在 functions.php 里手动"
"设置缓存时间"
"前台实现实时搜索,调用 Rest API 每小时更新一次缓存,可在 api.php 里手动设置缓"
"存时间"
#: options.php:1070
#: options.php:1077
msgid "Include comments in live search"
msgstr "实时搜索包含评论"
#: options.php:1071
#: options.php:1078
msgid ""
"Search for comments in real-time search (not recommended if there are too "
"many comments on the site)"
msgstr "在实时搜索中搜索评论(如果网站评论数量太多不建议开启)"
#: options.php:1077
#: options.php:1084
msgid "Enable baguetteBox"
msgstr "启用 baguetteBox"
#: options.php:1078
#: options.php:1085
msgid ""
"Default off<a href=\"https://github.com/mashirozx/Sakura/wiki/Fancybox"
"\">please read wiki</a>"
@ -1628,33 +1640,33 @@ msgstr ""
"默认禁用,<a href=\"https://github.com/mashirozx/Sakura/wiki/Fancybox\">请阅"
"读说明</a>"
#: options.php:1084
#: options.php:1091
msgid "Enable lazyload in posts"
msgstr "文章内图片启用 lazyload"
#: options.php:1091
#: options.php:1098
msgid "lazyload spinner"
msgstr "lazyload 占位图"
#: options.php:1092
#: options.php:1099
msgid "The placeholder to display when the image loads, fill in the image url"
msgstr "图片加载时要显示的占位图,填写图片 url"
#: options.php:1098
#: options.php:1105
msgid "Whether to enable the clipboard copyright"
msgstr "是否开启剪贴板版权标识"
#: options.php:1099
#: options.php:1106
msgid ""
"Automatically add a copyright to the clipboard when copying more than 30 "
"bytes, which is enabled by default."
msgstr "复制超过30个字节时自动向剪贴板添加版权标识默认开启。"
#: options.php:1105
#: options.php:1112
msgid "Email address prefix"
msgstr "发件地址前缀"
#: options.php:1106
#: options.php:1113
msgid ""
"For sending system mail, the sender address displayed in the user's mailbox, "
"do not use Chinese, the default system email address is bibi@your_domain_name"
@ -1662,11 +1674,11 @@ msgstr ""
"用于发送系统邮件,在用户的邮箱中显示的发件人地址,不要使用中文,默认系统邮件"
"地址为 bibi@你的域名"
#: options.php:1112
#: options.php:1119
msgid "Comments reply notification"
msgstr "邮件回复通知"
#: options.php:1113
#: options.php:1120
msgid ""
"WordPress will use email to notify users when their comments receive a reply "
"by default. Tick this item allows users to set their own comments reply "
@ -1675,78 +1687,78 @@ msgstr ""
"WordPress默认会使用邮件通知用户评论收到回复开启此项允许用户设置自己的评论收"
"到回复时是否使用邮件通知"
#: options.php:1119
#: options.php:1126
msgid "Administrator comment notification"
msgstr "邮件回复通知管理员"
#: options.php:1120
#: options.php:1127
msgid ""
"Whether to use email notification when the administrator's comments receive "
"a reply"
msgstr "当管理员评论收到回复时是否使用邮件通知"
#: options.php:1126
#: options.php:1133
msgid "Enable private comment"
msgstr "允许私密评论"
#: options.php:1127
#: options.php:1134
msgid "Allow users to set their own comments to be invisible to others"
msgstr "允许用户设置自己的评论对其他人不可见"
#: options.php:1133
#: options.php:1140
msgid "Human verification"
msgstr "机器人验证"
#: options.php:1134
#: options.php:1141
msgid "Enable human verification"
msgstr "开启机器人验证"
#: options.php:1140
#: options.php:1147
msgid "QQ avatar link encryption"
msgstr "QQ头像链接加密"
#: options.php:1141
#: options.php:1148
msgid "Do not display the user's qq avatar links directly."
msgstr "不直接暴露用户QQ头像链接"
#: options.php:1146
#: options.php:1153
msgid "Off (default)"
msgstr "关闭(默认)"
#: options.php:1147
#: options.php:1154
msgid "use redirect (general security)"
msgstr "使用重定向(安全性低)"
#: options.php:1148
#: options.php:1155
msgid "fetch data at backend (high security)"
msgstr "后端获取头像数据(安全性高)"
#: options.php:1149
#: options.php:1156
msgid "fetch data at backend (high securityslow)"
msgstr "后端解析QQ头像接口安全性高"
#: options.php:1153
#: options.php:1160
msgid "Comment UA infomation"
msgstr "评论UA信息"
#: options.php:1154
#: options.php:1161
msgid ""
"Check to enable, display the user's browser, operating system information"
msgstr "勾选开启,显示用户的浏览器,操作系统信息"
#: options.php:1160
#: options.php:1167
msgid "Enable disqus"
msgstr "开启多说插件支持"
#: options.php:1161
#: options.php:1168
msgid "Enable disqus for comment"
msgstr "多说已经凉了~~"
#: options.php:1167
#: options.php:1174
msgid "Time Zone adjustment"
msgstr "时区调整"
#: options.php:1168
#: options.php:1175
msgid ""
"If the comment has a time difference problem adjust here, fill in an "
"integer, the calculation method: actual_time = display_error_time - "

View File

@ -1006,6 +1006,13 @@ function optionsframework_options()
'type_4' => __('23k Views (chinese)', 'sakura'), /*23k 次访问(中式)*/
));
$options[] = array(
'name' => __('Gravatar avatar proxy', 'sakura'),
'desc' => __('A front-ed proxy for Gravatar, eg. gravatar.2heng.xin/avatar . Leave it blank if you do not need.', 'sakura'),
'id' => 'gravatar_proxy',
'std' => "gravatar.2heng.xin/avatar",
'type' => "text");
$options[] = array(
'name' => __('Comment image upload API', 'sakura'), /*评论图片上传接口*/
'id' => 'img_upload_api',
@ -1061,7 +1068,7 @@ function optionsframework_options()
$options[] = array(
'name' => __('Enable live search', 'sakura'), /*启用实时搜索*/
'desc' => __('Real-time search in the foreground, call the Rest API to update the cache every hour, you can manually set the cache time in functions.php', 'sakura'), /*前台实现实时搜索,调用 Rest API 每小时更新一次缓存,可在 functions.php 里手动设置缓存时间*/
'desc' => __('Real-time search in the foreground, call the Rest API to update the cache every hour, you can manually set the cache time in api.php', 'sakura'), /*前台实现实时搜索,调用 Rest API 每小时更新一次缓存,可在 functions.php 里手动设置缓存时间*/
'id' => 'live_search',
'std' => '0',
'type' => 'checkbox');