diff --git a/README.md b/README.md index e10517a1674a5bb95af6bfc23379d9ca9c4e53c3..f88d3f820ebc7636ce57414f2e262da6b45deb11 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ | ---------- | ------------------------------------------------------------ | | 中文名称 | 腾讯云文本内容安全(TMS)插件 | | 英文名称 | tencentcloud-tms | -| 最新版本 | v1.0.0 (2020.06.22) | +| 最新版本 | v1.0.1 (2020.12.11) | | 适用平台 | [WordPress](https://wordpress.org/) | | 适用产品 | [腾讯云文本内容安全(SMS)](https://cloud.tencent.com/product/tms) | | 文档中心 | [春雨文档中心](https://openapp.qq.com/docs/Wordpress/tms.html) | @@ -63,10 +63,11 @@ > 暂无 ## 7.GitHub版本迭代记录 +### 2020.12.11 tencentcloud-wordpress-plugin-tms v1.0.1 +- 支持在windows环境下运行 -### 7.1 tencentcloud-wordpress-plugin-tms v1.0.0 +### 2020.6.22 tencentcloud-wordpress-plugin-tms v1.0.0 - 对用户在评论提交的文字出现违规涉黄、爆、恐的内容,使用腾讯云文本内容安全接口进行内容检测和过滤 - --- 本项目由腾讯云中小企业产品中心建设和维护,了解与该插件使用相关的更多信息,请访问[春雨文档中心](https://openapp.qq.com/docs/Wordpress/tms.html) diff --git a/tencentcloud-tms/TencentWordpressTMSActions.php b/tencentcloud-tms/TencentWordpressTMSActions.php index d0ee313de7dc98fc386baec9cb2c91dfe9661dbe..3c13ab4239fae49be4995c5cce983ff388e323f6 100644 --- a/tencentcloud-tms/TencentWordpressTMSActions.php +++ b/tencentcloud-tms/TencentWordpressTMSActions.php @@ -101,30 +101,9 @@ class TencentWordpressTMSActions $staticData['data']['site_id'] = TencentWordpressPluginsSettingActions::getWordPressSiteID(); $staticData['data']['site_url'] = TencentWordpressPluginsSettingActions::getWordPressSiteUrl(); $staticData['data']['site_app'] = TencentWordpressPluginsSettingActions::getWordPressSiteApp(); - $commonOption = get_option(TENCENT_WORDPRESS_COMMON_OPTIONS); - if (!empty($commonOption)) { - $staticData['data']['site_report_on'] = intval($commonOption['site_report_on']); - $staticData['data']['site_sec_on'] = intval($commonOption['site_sec_on']); - if ($commonOption['site_report_on'] === true && isset($commonOption['secret_id']) && isset($commonOption['secret_key'])) { - $staticData['data']['site_global_uin'] = TencentWordpressPluginsSettingActions::getUserUinBySecret($commonOption['secret_id'], $commonOption['secret_key']); - } - } - $TMSOptions = self::getTMSOptionsObject(); - if ($TMSOptions->getCustomKey() === $TMSOptions::CUSTOM_KEY) { - $staticData['data']['tms_uin'] = TencentWordpressPluginsSettingActions::getUserUinBySecret($TMSOptions->getSecretID(), $TMSOptions->getSecretKey()); - } - $staticData['data']['tms_sec_on'] = $TMSOptions->getCustomKey(); - switch ($action){ - case 'activate': - case 'save_configuration': - $staticData['data']['tms_on_at'] = time(); - break; - case 'deactivate': - case 'uninstall': - $staticData['data']['tms_off_at'] = time(); - break; - } + $staticData['data']['uin'] = TencentWordpressPluginsSettingActions::getUserUinBySecret($TMSOptions->getSecretID(), $TMSOptions->getSecretKey()); + $staticData['data']['cust_sec_on'] = $TMSOptions->getCustomKey() === $TMSOptions::CUSTOM_KEY ?1:2; return $staticData; } @@ -325,7 +304,7 @@ class TencentWordpressTMSActions //更新系统讨论设置(在评论显示之前) $this->updateOptionsDiscussion($TMSOptions); self::requirePluginCenterClass(); - $staticData = self::getTencentCloudWordPressStaticData('save_configuration'); + $staticData = self::getTencentCloudWordPressStaticData('save_config'); TencentWordpressPluginsSettingActions::sendUserExperienceInfo($staticData); wp_send_json_success(array('msg' => '保存成功')); } catch (Exception $exception) { diff --git a/tencentcloud-tms/TencentWordpressTMSSettingPage.php b/tencentcloud-tms/TencentWordpressTMSSettingPage.php index 3916ffa5989b4725284210933d5f47587935e9c1..9856d325e95bcbbe057b2bc2f4bfdf7c47b87906 100644 --- a/tencentcloud-tms/TencentWordpressTMSSettingPage.php +++ b/tencentcloud-tms/TencentWordpressTMSSettingPage.php @@ -146,8 +146,9 @@ function TencentWordpressTMSSettingPage()
- 文档中心 | GitHub | 意见反馈 + 文档中心 + | GitHub + | 意见反馈
true));