Skip to content

Commit

Permalink
Update version
Browse files Browse the repository at this point in the history
  • Loading branch information
sy-records committed Dec 19, 2020
1 parent 4798c80 commit 6d79c60
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
12 changes: 6 additions & 6 deletions huaweicloud-obs-wordpress.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Plugin Name: OBS HuaWeiCloud
Plugin URI: https://github.com/sy-records/huaweicloud-obs-wordpress
Description: 使用华为云对象存储服务 OBS 作为附件存储空间。(This is a plugin that uses HuaWei Cloud Object Storage Service for attachments remote saving.)
Version: 1.2.0
Version: 1.2.1
Author: 沈唁
Author URI: https://qq52o.me
License: Apache 2.0
Expand All @@ -14,7 +14,7 @@
use Obs\ObsClient;
use Obs\ObsException;

define('OBS_VERSION', '1.2.0');
define('OBS_VERSION', '1.2.1');
define('OBS_BASEFOLDER', plugin_basename(dirname(__FILE__)));

// 初始化选项
Expand Down Expand Up @@ -272,17 +272,17 @@ function obs_delete_remote_attachment($post_id) {

$deleteObjects[] = ['Key' => str_replace("\\", '/', $file_path)];

$obs_options = get_option('obs_options', true);
$is_nothumb = (esc_attr($obs_options['nothumb']) == 'false');
if ($is_nothumb) {
// $obs_options = get_option('obs_options', true);
// $is_nothumb = (esc_attr($obs_options['nothumb']) == 'false');
// if ($is_nothumb) {
// 删除缩略图
if (isset($meta['sizes']) && count($meta['sizes']) > 0) {
foreach ($meta['sizes'] as $val) {
$size_file = dirname($file_path) . '/' . $val['file'];
$deleteObjects[] = ['Key' => str_replace("\\", '/', $size_file)];
}
}
}
// }

obs_delete_obs_files($deleteObjects);
}
Expand Down
8 changes: 6 additions & 2 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ Contributors: shenyanzhi
Donate link: https://qq52o.me/sponsor.html
Tags: OBS, 华为云, 对象存储, HuaWei
Requires at least: 4.2
Tested up to: 5.5
Tested up to: 5.6
Requires PHP: 5.6.0
Stable tag: 1.2.0
Stable tag: 1.2.1
License: Apache 2.0
License URI: http://www.apache.org/licenses/LICENSE-2.0.html

Expand Down Expand Up @@ -60,6 +60,10 @@ QQ交流群:887595381

== Changelog ==

= 1.2.1 =
* 支持WordPress 5.6
* 优化缩略图删除逻辑

= 1.2.0 =
* 优化同步上传路径获取
* 修复多站点上传原图失败,缩略图正常问题
Expand Down

0 comments on commit 6d79c60

Please sign in to comment.