diff --git a/functions.php b/functions.php
index 879009c..2bc548b 100644
--- a/functions.php
+++ b/functions.php
@@ -7,7 +7,7 @@
* @package Sakura
*/
-define( 'SAKURA_VERSION', '3.3.2' );
+define( 'SAKURA_VERSION', '3.3.3' );
define( 'BUILD_VERSION', '3' );
//ini_set('display_errors', true);
diff --git a/inc/api.php b/inc/api.php
index 970551e..394f284 100644
--- a/inc/api.php
+++ b/inc/api.php
@@ -224,26 +224,9 @@ function SMMS_API($image)
$Boundary = wp_generate_password();
$bits = file_get_contents($filedata);
- $headers = array();
- array_push($headers, "Content-Type: multipart/form-data; boundary=$Boundary");
- array_push($headers, '');
- array_push($headers, "Authorization: Basic " . $client_id);
- array_push($headers, '');
- array_push($headers, "User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.97");
- $headers = implode("\r\n", $headers);
-
- $fields = array();
- array_push($fields, "--" . $Boundary);
- array_push($fields, "Content-Disposition: form-data; name=\"smfile\"; filename=\"$filename\"");
- array_push($fields, '');
- array_push($fields, $bits);
- array_push($fields, '');
- array_push($fields, "--" . $Boundary . "--");
- $fields = implode("\r\n", $fields);
-
$args = array(
- 'headers' => $headers,
- 'body' => $fields,
+ 'headers' => 'Content-Type: multipart/form-data; boundary=' . $Boundary . '\r\n\r\nAuthorization: Basic ' . $client_id . '\r\n\r\nUser-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.97',
+ 'body' => '--' . $Boundary . '\r\nContent-Disposition: form-data; name="smfile"; filename="' . $filename . '"\r\n\r\n'.$bits.'\r\n\r\n--' . $Boundary . '--'
);
$response = wp_remote_post($upload_url, $args);
diff --git a/inc/options-framework.php b/inc/options-framework.php
index 2080026..c903931 100644
--- a/inc/options-framework.php
+++ b/inc/options-framework.php
@@ -272,7 +272,7 @@ function optionsframework_page() { ?>
@@ -491,4 +491,4 @@ if ( ! function_exists( 'akina_option' ) ) {
return $default;
}
-}
\ No newline at end of file
+}
diff --git a/languages/en_US.mo b/languages/en_US.mo
index 9eec412..b6bb5a7 100644
Binary files a/languages/en_US.mo and b/languages/en_US.mo differ
diff --git a/languages/en_US.po b/languages/en_US.po
index 4ebb128..090a9c3 100644
--- a/languages/en_US.po
+++ b/languages/en_US.po
@@ -1,8 +1,8 @@
msgid ""
msgstr ""
"Project-Id-Version: Sakura\n"
-"POT-Creation-Date: 2019-12-04 15:07+0800\n"
-"PO-Revision-Date: 2019-12-04 15:15+0800\n"
+"POT-Creation-Date: 2019-12-13 14:51+0800\n"
+"PO-Revision-Date: 2019-12-13 14:51+0800\n"
"Last-Translator: \n"
"Language-Team: \n"
"Language: en_US\n"
@@ -205,7 +205,7 @@ msgstr ""
msgid "QQ"
msgstr ""
-#: functions.php:1654
+#: functions.php:1664
msgid "Sidebar"
msgstr ""
@@ -214,7 +214,7 @@ msgstr ""
msgid "page %s "
msgstr ""
-#: inc/api.php:313 inc/theme_plus.php:727
+#: inc/api.php:301 inc/theme_plus.php:727
msgid "The comment is private"
msgstr ""
@@ -1341,7 +1341,13 @@ msgid "About"
msgstr ""
#: options.php:906
-msgid "Theme Sakura v"
+#, php-format
+msgid ""
+"Theme Sakura v %s | Theme "
+"document | Source "
+"code"
msgstr ""
#: options.php:912
@@ -1623,27 +1629,51 @@ msgid "Enable human verification"
msgstr ""
#: options.php:1139
-msgid "Comment UA infomation"
+msgid "QQ avatar link encryption"
msgstr ""
#: options.php:1140
+msgid "Do not display the user's qq avatar links directly."
+msgstr ""
+
+#: options.php:1145
+msgid "Off (default)"
+msgstr ""
+
+#: options.php:1146
+msgid "use redirect (general security)"
+msgstr ""
+
+#: options.php:1147
+msgid "fetch data at backend (high security)"
+msgstr ""
+
+#: options.php:1148
+msgid "fetch data at backend (high security,slow)"
+msgstr ""
+
+#: options.php:1152
+msgid "Comment UA infomation"
+msgstr ""
+
+#: options.php:1153
msgid ""
"Check to enable, display the user's browser, operating system information"
msgstr ""
-#: options.php:1146
+#: options.php:1159
msgid "Enable disqus"
msgstr ""
-#: options.php:1147
+#: options.php:1160
msgid "Enable disqus for comment"
msgstr ""
-#: options.php:1153
+#: options.php:1166
msgid "Time Zone adjustment"
msgstr ""
-#: options.php:1154
+#: options.php:1167
msgid ""
"If the comment has a time difference problem adjust here, fill in an "
"integer, the calculation method: actual_time = display_error_time - "
diff --git a/languages/sakura.pot b/languages/sakura.pot
index 1100956..7787ef0 100644
--- a/languages/sakura.pot
+++ b/languages/sakura.pot
@@ -3,7 +3,7 @@ msgid ""
msgstr ""
"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
"Project-Id-Version: Sakura\n"
-"POT-Creation-Date: 2019-12-04 15:07+0800\n"
+"POT-Creation-Date: 2019-12-13 14:50+0800\n"
"PO-Revision-Date: 2019-11-01 14:27+0800\n"
"Last-Translator: \n"
"Language-Team: \n"
@@ -204,7 +204,7 @@ msgstr ""
msgid "QQ"
msgstr ""
-#: functions.php:1654
+#: functions.php:1664
msgid "Sidebar"
msgstr ""
@@ -213,7 +213,7 @@ msgstr ""
msgid "page %s "
msgstr ""
-#: inc/api.php:313 inc/theme_plus.php:727
+#: inc/api.php:301 inc/theme_plus.php:727
msgid "The comment is private"
msgstr ""
@@ -1322,7 +1322,12 @@ msgid "About"
msgstr ""
#: options.php:906
-msgid "Theme Sakura v"
+#, php-format
+msgid ""
+"Theme Sakura v %s | Theme document | Source code"
msgstr ""
#: options.php:912
@@ -1592,26 +1597,50 @@ msgid "Enable human verification"
msgstr ""
#: options.php:1139
-msgid "Comment UA infomation"
+msgid "QQ avatar link encryption"
msgstr ""
#: options.php:1140
-msgid "Check to enable, display the user's browser, operating system information"
+msgid "Do not display the user's qq avatar links directly."
+msgstr ""
+
+#: options.php:1145
+msgid "Off (default)"
msgstr ""
#: options.php:1146
-msgid "Enable disqus"
+msgid "use redirect (general security)"
msgstr ""
#: options.php:1147
-msgid "Enable disqus for comment"
+msgid "fetch data at backend (high security)"
+msgstr ""
+
+#: options.php:1148
+msgid "fetch data at backend (high security,slow)"
+msgstr ""
+
+#: options.php:1152
+msgid "Comment UA infomation"
msgstr ""
#: options.php:1153
+msgid "Check to enable, display the user's browser, operating system information"
+msgstr ""
+
+#: options.php:1159
+msgid "Enable disqus"
+msgstr ""
+
+#: options.php:1160
+msgid "Enable disqus for comment"
+msgstr ""
+
+#: options.php:1166
msgid "Time Zone adjustment"
msgstr ""
-#: options.php:1154
+#: options.php:1167
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)"
diff --git a/languages/zh_CN.mo b/languages/zh_CN.mo
index 4de63a4..b42f935 100644
Binary files a/languages/zh_CN.mo and b/languages/zh_CN.mo differ
diff --git a/languages/zh_CN.po b/languages/zh_CN.po
index ca928a9..162f250 100644
--- a/languages/zh_CN.po
+++ b/languages/zh_CN.po
@@ -1,8 +1,8 @@
msgid ""
msgstr ""
"Project-Id-Version: Sakura\n"
-"POT-Creation-Date: 2019-12-04 15:07+0800\n"
-"PO-Revision-Date: 2019-12-04 15:07+0800\n"
+"POT-Creation-Date: 2019-12-13 14:51+0800\n"
+"PO-Revision-Date: 2019-12-13 14:51+0800\n"
"Last-Translator: \n"
"Language-Team: \n"
"Language: zh_CN\n"
@@ -207,7 +207,7 @@ msgstr ""
msgid "QQ"
msgstr ""
-#: functions.php:1654
+#: functions.php:1664
msgid "Sidebar"
msgstr "侧栏"
@@ -216,7 +216,7 @@ msgstr "侧栏"
msgid "page %s "
msgstr "第 %s 页 "
-#: inc/api.php:313 inc/theme_plus.php:727
+#: inc/api.php:301 inc/theme_plus.php:727
msgid "The comment is private"
msgstr "该评论为私密评论"
@@ -1365,8 +1365,19 @@ msgid "About"
msgstr "关于"
#: options.php:906
-msgid "Theme Sakura v"
+#, php-format
+msgid ""
+"Theme Sakura v %s | Theme "
+"document | Source "
+"code"
msgstr ""
+"Theme Sakura v %s | 主题说明"
+"a> | 源码"
#: options.php:912
msgid "Check for Updates"
@@ -1667,27 +1678,51 @@ msgid "Enable human verification"
msgstr "开启机器人验证"
#: options.php:1139
+msgid "QQ avatar link encryption"
+msgstr "QQ头像链接加密"
+
+#: options.php:1140
+msgid "Do not display the user's qq avatar links directly."
+msgstr "不直接暴露用户QQ头像链接"
+
+#: options.php:1145
+msgid "Off (default)"
+msgstr "关闭(默认)"
+
+#: options.php:1146
+msgid "use redirect (general security)"
+msgstr "使用重定向(安全性低)"
+
+#: options.php:1147
+msgid "fetch data at backend (high security)"
+msgstr "后端获取头像数据(安全性高)"
+
+#: options.php:1148
+msgid "fetch data at backend (high security,slow)"
+msgstr "后端解析QQ头像接口(安全性高,慢)"
+
+#: options.php:1152
msgid "Comment UA infomation"
msgstr "评论UA信息"
-#: options.php:1140
+#: options.php:1153
msgid ""
"Check to enable, display the user's browser, operating system information"
msgstr "勾选开启,显示用户的浏览器,操作系统信息"
-#: options.php:1146
+#: options.php:1159
msgid "Enable disqus"
msgstr "开启多说插件支持"
-#: options.php:1147
+#: options.php:1160
msgid "Enable disqus for comment"
msgstr "多说已经凉了~~"
-#: options.php:1153
+#: options.php:1166
msgid "Time Zone adjustment"
msgstr "时区调整"
-#: options.php:1154
+#: options.php:1167
msgid ""
"If the comment has a time difference problem adjust here, fill in an "
"integer, the calculation method: actual_time = display_error_time - "
diff --git a/options.php b/options.php
index 4d1f00a..6df04e3 100644
--- a/options.php
+++ b/options.php
@@ -903,7 +903,7 @@ function optionsframework_options() {
$options[] = array(
'name' => __('About', 'sakura'),/*关于*/
- 'desc' => __('Theme Sakura v'.SAKURA_VERSION.' | Theme document | Source code', 'sakura'),/*Theme Sakura v'.SAKURA_VERSION.' | 主题说明 | 源码*/
+ 'desc' => sprintf(__('Theme Sakura v %s | Theme document | Source code', 'sakura'), SAKURA_VERSION),/*Theme Sakura v'.SAKURA_VERSION.' | 主题说明 | 源码*/
'id' => 'theme_intro',
'std' => '',
'type' => 'typography ');
@@ -1140,7 +1140,7 @@ function optionsframework_options() {
'desc' => __('Do not display the user\'s qq avatar links directly.', 'sakura'),/*不直接暴露用户qq头像链接*/
'id' => 'qq_avatar_link',
'std' => "off",
- 'type' => "radio",
+ 'type' => "select",
'options' => array(
'off' => __('Off (default)', 'sakura'),/*关闭(默认)*/
'type_1' => __('use redirect (general security)', 'sakura'),/*使用 重定向(安全性一般)'*/
diff --git a/style.css b/style.css
index 39a7cb1..447b2c8 100644
--- a/style.css
+++ b/style.css
@@ -5,7 +5,7 @@ Theme URI: https://github.com/mashirozx/Sakura/
Author: Mashiro, Spirit, Louie, Fuzzz
Author URI: http://2heng.xin
Description: A wonderful branch of theme Akina
-Version: 3.3.2
+Version: 3.3.3
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: sakura