From a90afaeb7f1bbb4ffd0bbf99729b9bd6270c9662 Mon Sep 17 00:00:00 2001 From: sy-records <52o@qq52o.cn> Date: Thu, 14 Dec 2023 09:50:39 +0800 Subject: [PATCH] Fix duplicate append image style param --- aliyun-oss-wordpress.php | 8 ++++++-- readme.txt | 6 +++++- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/aliyun-oss-wordpress.php b/aliyun-oss-wordpress.php index 6b8ed01..7be1563 100644 --- a/aliyun-oss-wordpress.php +++ b/aliyun-oss-wordpress.php @@ -3,7 +3,7 @@ Plugin Name: OSS Aliyun Plugin URI: https://github.com/sy-records/aliyun-oss-wordpress Description: 使用阿里云对象存储 OSS 作为附件存储空间。(This is a plugin that uses Aliyun Object Storage Service for attachments remote saving.) -Version: 1.4.7 +Version: 1.4.8 Author: 沈唁 Author URI: https://qq52o.me License: Apache2.0 @@ -19,7 +19,7 @@ use OSS\Credentials\CredentialsProvider; use AlibabaCloud\Credentials\Credential; use OSS\Credentials\StaticCredentialsProvider; -define('OSS_VERSION', '1.4.7'); +define('OSS_VERSION', '1.4.8'); define('OSS_BASEFOLDER', plugin_basename(dirname(__FILE__))); if (!function_exists('get_home_path')) { @@ -509,6 +509,8 @@ function oss_setting_content_style($content) $content = str_replace($item, $item . $style, $content); } } + + $content = str_replace($style . $style, $style, $content); } } return $content; @@ -529,6 +531,8 @@ function oss_setting_post_thumbnail_style($html, $post_id, $post_image_id) $html = str_replace($item, $item . $style, $html); } } + + $html = str_replace($style . $style, $style, $html); } } return $html; diff --git a/readme.txt b/readme.txt index 78fb9e3..c25cd4e 100644 --- a/readme.txt +++ b/readme.txt @@ -5,7 +5,7 @@ Tags: oss, 阿里云, 对象存储, aliyun Requires at least: 4.2 Tested up to: 6.4 Requires PHP: 7.0 -Stable tag: 1.4.7 +Stable tag: 1.4.8 License: Apache2.0 License URI: http://www.apache.org/licenses/LICENSE-2.0.html @@ -73,6 +73,10 @@ License URI: http://www.apache.org/licenses/LICENSE-2.0.html == Changelog == += 1.4.8 = + +- 修复图片处理参数重复添加 + = 1.4.7 = - 修复 `upload_url_path` 设置为 `.` 时删除失败