mirror of
https://github.com/WenPai-org/wp-china-yes.git
synced 2025-08-03 11:11:30 +08:00
特性:当使用本土应用市场时为插件列表中的所有插件追加“翻译校准”链接
This commit is contained in:
parent
0349b4a0dd
commit
c5833841ed
1 changed files with 12 additions and 0 deletions
|
@ -32,6 +32,18 @@ class WP_CHINA_YES {
|
|||
});
|
||||
|
||||
|
||||
/**
|
||||
* 插件列表页中所有插件增加“翻译校准”链接
|
||||
*/
|
||||
if (get_option('wpapi') == 1) {
|
||||
add_filter('plugin_action_links', function ($links, $plugin = '') {
|
||||
$links[] = '<a target="_blank" href="https://translate.wp-china.org/projects/plugins/' . substr($plugin, 0, strpos($plugin, '/')) . '/zh-cn/default">翻译校准</a>';
|
||||
|
||||
return $links;
|
||||
}, 10, 2);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 初始化设置项
|
||||
*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue