Skip to content

Commit

Permalink
Add uninstall.php
Browse files Browse the repository at this point in the history
  • Loading branch information
0xJacky committed Aug 28, 2017
1 parent fa514ef commit 4a59370
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 5 deletions.
20 changes: 15 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,22 @@
本插件为 WordPress 的管理页面添加快捷按钮,方便站长在修改完静态资源后能快速刷新 CDN 缓存。

### 当前版本

v2.0

![image][image-1]

### 插件特色

1. 方便刷新缓存
2. 配置简单
3. 可以显示当日的刷新剩余量
3. 设置页面可以显示当日的刷新剩余量
4. 中英文支持,汉化错误提示(TODO)
5. 支持文件刷新和目录刷新
6. 支持批量预热文件

### 环境

WordPress 4.8+ (低版本暂未测试,理论上是支持的)

PHP 5.3 ~ 7.1 (取决于阿里云 SDK)
Expand All @@ -24,17 +28,20 @@ PHP 5.3 ~ 7.1 (取决于阿里云 SDK)
[Latest Release][1]

#### 安装

计划提交到 WordPress 插件商店,但在此之前,您需要使用以下的安装方法:

将压缩包解压,上传到`/wp-content/plugins/` 或通过 WordPress 插件管理页面上传插件压缩包来安装
将压缩包解压,上传到 `/wp-content/plugins/` 或通过 WordPress 插件管理页面上传插件压缩包来安装

#### 配置

1. 启动插件
2. 进入`设置->阿里云 CDN` 完成设置后即可使用
2. 进入 `设置->阿里云 CDN` 完成设置后即可使用

### 配置的相关说明
#### 刷新文件类型:
如果选择的是 `刷新当前主题目录内的静态文件(目录)``全站刷新(目录)` 则请求强制回源拉取更新的目录(使用一个刷新目录配额)。

这个是对快捷按钮的设置,如果选择 `刷新当前主题目录内的静态文件(目录)``全站刷新(目录)` 则请求强制回源拉取更新的目录(使用一个刷新目录配额)。

#### URL 预热

Expand All @@ -46,11 +53,14 @@ PHP 5.3 ~ 7.1 (取决于阿里云 SDK)

#### 刷新自定义 URL

功能如题所示,对应阿里云 CDN 控制台的 URL 刷新,如果强行要输入目录的话不要忘记末尾的 `/`。容错机制暂未完善,一旦出现异常将跳出循环,并返回错误,如果刷新错误请检查每一行的 URL 书写是否规范。
功能如题所示,对应阿里云 CDN 控制台的 URL 刷新,如果强行要输入目录的话不要忘记末尾的 `/`

容错机制暂未完善,一旦出现异常将立即返回错误,如果刷新错误请检查每一行的 URL 书写是否规范。


### 支持
如果您喜欢这个插件,欢迎捐助我~

![image][image-2]


Expand Down
Binary file modified screenshot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
22 changes: 22 additions & 0 deletions uninstall.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?php
/**
* Aliyun CDN Helper
* Copyright 2017 0xJacky (email : [email protected])
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
defined( 'WP_UNINSTALL_PLUGIN' ) OR exit(); // if uninstall.php is not called by WordPress, exit.

delete_option('alicdn_options');

0 comments on commit 4a59370

Please sign in to comment.