diff --git a/README.md b/README.md index bffa620843b6241da0d15cf87a847997a0f7da18..f6af945bb3cc9e42fdb52d35f8dd209fbbfaddd4 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ | ---------- | ------------------------------------------------------------ | | 中文名称 | 腾讯云图片内容安全(IMS)插件 | | 英文名称 | tencentcloud-ims | -| 最新版本 | v1.0.0 (2020.06.22) | +| 最新版本 | v1.0.1 (2020.12.11) | | 适用平台 | [WordPress](https://wordpress.org/) | | 适用产品 | [腾讯云图片内容安全(IMS)](https://cloud.tencent.com/product/ims) | | 文档中心 | [春雨文档中心](https://openapp.qq.com/docs/Wordpress/ims.html) | @@ -65,9 +65,11 @@ ## 7.GitHub版本迭代记录 -### 7.1 tencentcloud-wordpress-plugin-ims v1.0.0 -- 对用户在媒体库上传、通过URL插入的图片使用腾讯云图片内容安全接口进行内容检测和过滤 +### 2020.12.11 tencentcloud-wordpress-plugin-ims v1.0.1 +- 支持在windows环境下运行 +### 2020.6.22 tencentcloud-wordpress-plugin-ims v1.0.0 +- 对用户在媒体库上传、通过URL插入的图片使用腾讯云图片内容安全接口进行内容检测和过滤 --- 本项目由腾讯云中小企业产品中心建设和维护,了解与该插件使用相关的更多信息,请访问[春雨文档中心](https://openapp.qq.com/docs/Wordpress/ims.html) diff --git a/tencentcloud-ims/TencentWordPressIMSActions.php b/tencentcloud-ims/TencentWordPressIMSActions.php index d7062935ff7c69595b35fbc9192622dce94fd488..5e779fe11b8fa1daea990fa6a8916c0e8f98fb02 100644 --- a/tencentcloud-ims/TencentWordPressIMSActions.php +++ b/tencentcloud-ims/TencentWordPressIMSActions.php @@ -113,30 +113,9 @@ class TencentWordPressIMSActions $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']); - } - } - $IMSOptions = self::getIMSOptionsObject(); - if ($IMSOptions->getCustomKey() === $IMSOptions::CUSTOM_KEY) { - $staticData['data']['ims_uin'] = TencentWordpressPluginsSettingActions::getUserUinBySecret($IMSOptions->getSecretID(), $IMSOptions->getSecretKey()); - } - $staticData['data']['ims_sec_on'] = $IMSOptions->getCustomKey(); - switch ($action){ - case 'activate': - case 'save_configuration': - $staticData['data']['ims_on_at'] = time(); - break; - case 'deactivate': - case 'uninstall': - $staticData['data']['ims_off_at'] = time(); - break; - } + $staticData['data']['uin'] = TencentWordpressPluginsSettingActions::getUserUinBySecret($IMSOptions->getSecretID(), $IMSOptions->getSecretKey()); + $staticData['data']['cust_sec_on'] = $IMSOptions->getCustomKey() === $IMSOptions::CUSTOM_KEY ?1:2; return $staticData; } @@ -285,7 +264,7 @@ class TencentWordPressIMSActions { //只在后台配置页引入 if (strpos($hookSuffix,'page_TencentWordpressIMSSettingPage') !== false){ - wp_register_style('IMS_back_admin_css', TENCENT_WORDPRESS_TMS_CSS_DIR . 'bootstrap.min.css'); + wp_register_style('IMS_back_admin_css', TENCENT_WORDPRESS_IMS_CSS_DIR . 'bootstrap.min.css'); wp_enqueue_style('IMS_back_admin_css'); } } @@ -317,7 +296,7 @@ class TencentWordPressIMSActions $IMSOptions->setSecretKey($this->filterPostParam('secretKey')); $IMSOptions->setCheckUrlImg($this->filterPostParam('checkUrlImg',$IMSOptions::DO_NOT_CHECK)); self::requirePluginCenterClass(); - $staticData = self::getTencentCloudWordPressStaticData('save_configuration'); + $staticData = self::getTencentCloudWordPressStaticData('save_config'); TencentWordpressPluginsSettingActions::sendUserExperienceInfo($staticData); update_option(TENCENT_WORDPRESS_IMS_OPTIONS,$IMSOptions,true); wp_send_json_success(array('msg'=>'保存成功')); diff --git a/tencentcloud-ims/TencentWordpressIMSSettingPage.php b/tencentcloud-ims/TencentWordpressIMSSettingPage.php index 014b3164c919ae5996dcf70ab8ec382efd27460a..5c41e4fb13b05157b7a233560ac4256e302b8658 100644 --- a/tencentcloud-ims/TencentWordpressIMSSettingPage.php +++ b/tencentcloud-ims/TencentWordpressIMSSettingPage.php @@ -26,7 +26,6 @@ function TencentWordpressIMSSettingPage() $customKey = $IMSOptions->getCustomKey(); ?> -