fix missing delete backup images
parent
9a5756ba4e
commit
2bee1e5d04
|
@ -26,6 +26,7 @@
|
|||
- [x] 支持原图保护
|
||||
- [x] 支持 `wp-cli` 命令上传/删除文件
|
||||
- [x] 支持多站点
|
||||
- [x] 支持图片裁剪编辑等操作后的上传
|
||||
|
||||
## 安装
|
||||
|
||||
|
|
|
@ -400,6 +400,13 @@ function oss_delete_remote_attachment($post_id)
|
|||
}
|
||||
}
|
||||
|
||||
$backup_sizes = get_post_meta($post_id, '_wp_attachment_backup_sizes', true);
|
||||
if (is_array($backup_sizes)) {
|
||||
foreach ($backup_sizes as $size) {
|
||||
$deleteObjects[] = $dirname . $size['file'];
|
||||
}
|
||||
}
|
||||
|
||||
oss_delete_oss_files($deleteObjects);
|
||||
} else {
|
||||
// 获取链接删除
|
||||
|
|
|
@ -31,7 +31,8 @@ License URI: http://www.apache.org/licenses/LICENSE-2.0.html
|
|||
10. 支持原图保护
|
||||
11. 支持 `wp-cli` 命令上传/删除文件
|
||||
12. 支持多站点
|
||||
13. 插件更多详细介绍和安装:[https://github.com/sy-records/aliyun-oss-wordpress](https://github.com/sy-records/aliyun-oss-wordpress)
|
||||
13. 支持图片裁剪编辑等操作后的上传
|
||||
14. 插件更多详细介绍和安装:[https://github.com/sy-records/aliyun-oss-wordpress](https://github.com/sy-records/aliyun-oss-wordpress)
|
||||
|
||||
## 其他插件
|
||||
|
||||
|
|
Loading…
Reference in New Issue