Skip to content

Commit

Permalink
Use wp_get_mime_types instead of get_allowed_mime_types (#71)
Browse files Browse the repository at this point in the history
  • Loading branch information
sy-records committed Jun 27, 2024
1 parent 49ca7f9 commit 007e2b1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
5 changes: 2 additions & 3 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Tags: COS, 腾讯云, 对象存储, Tencent, Qcloud
Requires at least: 4.6
Tested up to: 6.5
Requires PHP: 7.2
Stable tag: 2.5.7
Stable tag: 2.5.8
License: Apache2.0
License URI: http://www.apache.org/licenses/LICENSE-2.0.html

Expand Down Expand Up @@ -103,8 +103,7 @@ License URI: http://www.apache.org/licenses/LICENSE-2.0.html

= Stable =

- Fix upload heic format file error.
- Support delete file using `wp-cli` command.
- Use wp_get_mime_types instead of get_allowed_mime_types.

= Other =

Expand Down
6 changes: 3 additions & 3 deletions sync-qcloud-cos.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Plugin Name: Sync QCloud COS
Plugin URI: https://qq52o.me/2518.html
Description: 使用腾讯云对象存储服务 COS 作为附件存储空间。(Using Tencent Cloud Object Storage Service COS as Attachment Storage Space.)
Version: 2.5.7
Version: 2.5.8
Author: 沈唁
Author URI: https://qq52o.me
License: Apache2.0
Expand All @@ -27,7 +27,7 @@
use SyncQcloudCos\Monitor\DataPoints;
use SyncQcloudCos\Object\Head;

define('COS_VERSION', '2.5.7');
define('COS_VERSION', '2.5.8');
define('COS_PLUGIN_SLUG', 'sync-qcloud-cos');
define('COS_PLUGIN_PAGE', plugin_basename(dirname(__FILE__)) . '%2F' . basename(__FILE__));

Expand Down Expand Up @@ -355,7 +355,7 @@ function cos_get_option($key)
*/
function cos_upload_attachments($metadata)
{
$mime_types = get_allowed_mime_types();
$mime_types = wp_get_mime_types();
$image_mime_types = [
$mime_types['jpg|jpeg|jpe'],
$mime_types['gif'],
Expand Down

0 comments on commit 007e2b1

Please sign in to comment.