diff --git a/README.md b/README.md index dc5f1e9236a4002f8875f8fd3386a8d8de357651..f4637c95f407d9d576c5a4da29814c7b13b8d5fa 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ | ---------- | ------------------------------------------------------------ | | 中文名称 | 腾讯云内容分发网络(CDN)插件 | | 英文名称 | tencentcloud-cdn | -| 最新版本 | 1.0.1 (2020.07.15) | +| 最新版本 | 1.0.2 (2020.12.11) | | 适用平台 | [WordPress](https://wordpress.org/) | | 适用产品 | [腾讯云内容分发网络(CDN)](https://cloud.tencent.com/product/cdn) | | GitHub项目 | [tencentcloud-wordpress-plugin-cdn](https://github.com/Tencent-Cloud-Plugins/tencentcloud-wordpress-plugin-cdn) | @@ -72,11 +72,14 @@ ## 7.版本迭代记录 -### 7.1.tencentcloud-wordpress-plugin-cdn v1.0.1 +### 2020.12.11 tencentcloud-wordpress-plugin-cdn v1.0.2 +- 支持在windows环境下运行 + +### 2020.7.15 tencentcloud-wordpress-plugin-cdn v1.0.1 - 新增CDN目录刷新和URL刷新功能。 - 新增刷新日志查询功能。 -### 7.2.tencentcloud-wordpress-plugin-cdn v1.0.0 +### 2020.6.22 tencentcloud-wordpress-plugin-cdn v1.0.0 - 发布或更新文章时,将自动刷新文章页、首页、分类列表页、标签列表页相关URL缓存。 - 发表评论或评论被审批后,将自动刷新文章页CDN缓存。 diff --git a/tencentcloud-cdn/class-tencent-cloud-cdn.php b/tencentcloud-cdn/class-tencent-cloud-cdn.php index c5c630e8bc9c3060cf73f658288d4189e364069b..b76cae667c70e9ba9d9c73717acb122074792987 100644 --- a/tencentcloud-cdn/class-tencent-cloud-cdn.php +++ b/tencentcloud-cdn/class-tencent-cloud-cdn.php @@ -295,6 +295,9 @@ class TencentWordpressCDN try { $client = self::getCndClient($tcwpcdn_options); if (false === $client) { + $err = array( + "Message" => 'create CdnClient failed' + ); return; } @@ -309,7 +312,6 @@ class TencentWordpressCDN if (!isset($resp['TaskId']) || !isset($resp['RequestId'])) { return; } - } catch (TencentCloudSDKException $e) { return; } diff --git a/tencentcloud-cdn/readme.txt b/tencentcloud-cdn/readme.txt index 8a2c852957b9479230d68c96a90046b0153a190b..7a5ce0e262d69cea0e29a9f6561afa2445cc2295 100644 --- a/tencentcloud-cdn/readme.txt +++ b/tencentcloud-cdn/readme.txt @@ -1,11 +1,11 @@ === 腾讯云内容分发管理(CDN) === Contributors: 腾讯云中小企业产品中心(SMB Product Center of Tencent Cloud) -Tags: 腾讯云wordpress, CDN, 内容分发网络, 腾讯云 +Tags: 腾讯云wordpress, CDN, 内容分发网络, 腾讯云, 春雨计划, Tencent Cloud Donate link: https://cloud.tencent.com/ Requires at least: 5.0 Tested up to: 5.4.1 Requires PHP: 5.6 -Stable tag: 1.0.0 +Stable tag: 1.0.2 License: Apache 2.0 License URI: http://www.apache.org/licenses/LICENSE-2.0.txt @@ -49,4 +49,7 @@ License URI: http://www.apache.org/licenses/LICENSE-2.0.txt = 1.0.1 = * 1、新增手动刷新所有URL的功能 * 2、新增自定义URL刷新功能 -* 3、新增自动刷新日志功能 \ No newline at end of file +* 3、新增自动刷新日志功能 + += 1.0.2 = +* 1、支持windows运行环境 \ No newline at end of file diff --git a/tencentcloud-cdn/tencent-cloud-cdn-setting-page.php b/tencentcloud-cdn/tencent-cloud-cdn-setting-page.php index 2fb643cfeac3d30a95844a1b281817b2037e2224..69a8dec5ffb85f52da3cd7c102d4fd38a7e494e7 100644 --- a/tencentcloud-cdn/tencent-cloud-cdn-setting-page.php +++ b/tencentcloud-cdn/tencent-cloud-cdn-setting-page.php @@ -343,9 +343,9 @@ $ajax_url = admin_url(TENCENT_WORDPRESS_CDN_ADMIN_AJAX);

diff --git a/tencentcloud-cdn/tencentcloud-cdn.php b/tencentcloud-cdn/tencentcloud-cdn.php index b93c6bced49dbf2b53a91d94399dd9d7a742bb5d..841cd04167451848bde8729962200585319171e1 100644 --- a/tencentcloud-cdn/tencentcloud-cdn.php +++ b/tencentcloud-cdn/tencentcloud-cdn.php @@ -3,7 +3,7 @@ * Plugin Name: tencentcloud-cdn * Plugin URI: https://openapp.qq.com/ * Description: 通过腾讯云内容分发网络服务自动刷新网站的变化内容,提升用户的浏览体验。 - * Version: 1.0.1 + * Version: 1.0.2 * Author: 腾讯云 * Author URI: https://cloud.tencent.com/ * modify it under the terms of the GNU General Public License @@ -29,23 +29,23 @@ if (!defined('ABSPATH')) { die('We\'re sorry, but you can not directly access this file.'); } -defined('TENCENT_WORDPRESS_CDN_VERSION') or define('TENCENT_WORDPRESS_CDN_VERSION', '1.0.1'); +defined('TENCENT_WORDPRESS_CDN_VERSION') or define('TENCENT_WORDPRESS_CDN_VERSION', '1.0.2'); defined('TENCENT_WORDPRESS_CDN_NAME') or define('TENCENT_WORDPRESS_CDN_NAME', 'tencentcloud-cdn'); defined('TENCENT_WORDPRESS_CDN_PLUGIN_DIR') or define('TENCENT_WORDPRESS_CDN_PLUGIN_DIR', plugin_dir_path(__FILE__)); -defined('TENCENT_WORDPRESS_PLUGINS_COMMON_DIR') or define('TENCENT_WORDPRESS_PLUGINS_COMMON_DIR', TENCENT_WORDPRESS_CDN_PLUGIN_DIR . 'common' . DIRECTORY_SEPARATOR); -defined('TENCENT_WORDPRESS_CDN_PLUGIN_INC_DIR') or define('TENCENT_WORDPRESS_CDN_PLUGIN_INC_DIR', TENCENT_WORDPRESS_CDN_PLUGIN_DIR . 'includes' . DIRECTORY_SEPARATOR); -defined('TENCENT_WORDPRESS_CDN_PLUGIN_VENDOR_DIR') or define('TENCENT_WORDPRESS_CDN_PLUGIN_VENDOR_DIR', TENCENT_WORDPRESS_CDN_PLUGIN_INC_DIR . 'vendor' . DIRECTORY_SEPARATOR); +defined('TENCENT_WORDPRESS_PLUGINS_COMMON_DIR') or define('TENCENT_WORDPRESS_PLUGINS_COMMON_DIR', TENCENT_WORDPRESS_CDN_PLUGIN_DIR . 'common' . '/'); +defined('TENCENT_WORDPRESS_CDN_PLUGIN_INC_DIR') or define('TENCENT_WORDPRESS_CDN_PLUGIN_INC_DIR', TENCENT_WORDPRESS_CDN_PLUGIN_DIR . 'includes' . '/'); +defined('TENCENT_WORDPRESS_CDN_PLUGIN_VENDOR_DIR') or define('TENCENT_WORDPRESS_CDN_PLUGIN_VENDOR_DIR', TENCENT_WORDPRESS_CDN_PLUGIN_INC_DIR . 'vendor' . '/'); -defined('TENCENT_WORDPRESS_PLUGINS_URL') or define('TENCENT_WORDPRESS_PLUGINS_URL', plugins_url() . DIRECTORY_SEPARATOR); -defined('TENCENT_WORDPRESS_CDN_PLUGIN_URL') or define('TENCENT_WORDPRESS_CDN_PLUGIN_URL', TENCENT_WORDPRESS_PLUGINS_URL . basename(__DIR__) . DIRECTORY_SEPARATOR); +defined('TENCENT_WORDPRESS_PLUGINS_URL') or define('TENCENT_WORDPRESS_PLUGINS_URL', plugins_url() . '/'); +defined('TENCENT_WORDPRESS_CDN_PLUGIN_URL') or define('TENCENT_WORDPRESS_CDN_PLUGIN_URL', TENCENT_WORDPRESS_PLUGINS_URL . basename(__DIR__) . '/'); -defined('TENCENT_WORDPRESS_CDN_PLUGIN_ASSETS_URL') or define('TENCENT_WORDPRESS_CDN_PLUGIN_ASSETS_URL', TENCENT_WORDPRESS_CDN_PLUGIN_URL . 'assets' . DIRECTORY_SEPARATOR); -defined('TENCENT_WORDPRESS_CDN_PLUGIN_JS_URL') or define('TENCENT_WORDPRESS_CDN_PLUGIN_JS_URL', TENCENT_WORDPRESS_CDN_PLUGIN_ASSETS_URL . 'javascript' . DIRECTORY_SEPARATOR); -defined('TENCENT_WORDPRESS_CDN_PLUGIN_CSS_URL') or define('TENCENT_WORDPRESS_CDN_PLUGIN_CSS_URL', TENCENT_WORDPRESS_CDN_PLUGIN_ASSETS_URL . 'css' . DIRECTORY_SEPARATOR); +defined('TENCENT_WORDPRESS_CDN_PLUGIN_ASSETS_URL') or define('TENCENT_WORDPRESS_CDN_PLUGIN_ASSETS_URL', TENCENT_WORDPRESS_CDN_PLUGIN_URL . 'assets' . '/'); +defined('TENCENT_WORDPRESS_CDN_PLUGIN_JS_URL') or define('TENCENT_WORDPRESS_CDN_PLUGIN_JS_URL', TENCENT_WORDPRESS_CDN_PLUGIN_ASSETS_URL . 'javascript' . '/'); +defined('TENCENT_WORDPRESS_CDN_PLUGIN_CSS_URL') or define('TENCENT_WORDPRESS_CDN_PLUGIN_CSS_URL', TENCENT_WORDPRESS_CDN_PLUGIN_ASSETS_URL . 'css' . '/'); -defined('TENCENT_WORDPRESS_PLUGINS_COMMON_URL') or define('TENCENT_WORDPRESS_PLUGINS_COMMON_URL', TENCENT_WORDPRESS_CDN_PLUGIN_URL . 'common' . DIRECTORY_SEPARATOR); -defined('TENCENT_WORDPRESS_PLUGINS_COMMON_CSS_URL') or define('TENCENT_WORDPRESS_PLUGINS_COMMON_CSS_URL', TENCENT_WORDPRESS_PLUGINS_COMMON_URL . 'css' . DIRECTORY_SEPARATOR); +defined('TENCENT_WORDPRESS_PLUGINS_COMMON_URL') or define('TENCENT_WORDPRESS_PLUGINS_COMMON_URL', TENCENT_WORDPRESS_CDN_PLUGIN_URL . 'common' . '/'); +defined('TENCENT_WORDPRESS_PLUGINS_COMMON_CSS_URL') or define('TENCENT_WORDPRESS_PLUGINS_COMMON_CSS_URL', TENCENT_WORDPRESS_PLUGINS_COMMON_URL . 'css' . '/'); defined('TENCENT_WORDPRESS_CDN_OPTIONS') or define('TENCENT_WORDPRESS_CDN_OPTIONS', 'tencent_wordpress_cdn_options'); defined('TENCENT_WORDPRESS_CDN_ADMIN_AJAX') or define('TENCENT_WORDPRESS_CDN_ADMIN_AJAX', 'admin-ajax.php');