Skip to content

Commit

Permalink
Fix missing setting button for plugins page
Browse files Browse the repository at this point in the history
  • Loading branch information
sy-records committed Aug 17, 2023
1 parent 28dc6d7 commit 9aec332
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
5 changes: 4 additions & 1 deletion 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.2
Tested up to: 6.3
Requires PHP: 7.0.0
Stable tag: 2.2.0
Stable tag: 2.2.1
License: Apache 2.0
License URI: http://www.apache.org/licenses/LICENSE-2.0.html

Expand Down Expand Up @@ -92,6 +92,9 @@ License URI: http://www.apache.org/licenses/LICENSE-2.0.html

== Changelog ==

= 2.2.1 =
* 修复插件列表页丢失设置按钮

= 2.2.0 =
* 调整 UserAgent
* 复用部分代码
Expand Down
9 changes: 5 additions & 4 deletions wordpress-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 作为附件存储空间。(This is a plugin that uses Tencent Cloud Cloud Object Storage for attachments remote saving.)
Version: 2.2.0
Version: 2.2.1
Author: 沈唁
Author URI: https://qq52o.me
License: Apache 2.0
Expand All @@ -20,7 +20,7 @@
use SyncQcloudCos\CI\ImageSlim;
use SyncQcloudCos\ErrorCode;

define('COS_VERSION', '2.2.0');
define('COS_VERSION', '2.2.1');
define('COS_PLUGIN_PAGE', plugin_basename(dirname(__FILE__)) . '%2Fwordpress-qcloud-cos.php');

if (!function_exists('get_home_path')) {
Expand Down Expand Up @@ -498,8 +498,9 @@ function cos_read_dir_queue($dir)
// 在插件列表页添加设置按钮
function cos_plugin_action_links($links, $file)
{
if ($file == plugin_basename(dirname(__FILE__) . '/wordpress-qcloud-cos.php')) {
$links[] = '<a href="options-general.php?page=' . COS_PLUGIN_PAGE . '>设置</a>';
$link = urldecode(COS_PLUGIN_PAGE);
if ($file == $link) {
$links[] = "<a href='options-general.php?page={$link}'>设置</a>";
}
return $links;
}
Expand Down

0 comments on commit 9aec332

Please sign in to comment.