特性:当使用本土应用市场时为插件列表中的所有插件追加“翻译校准”链接

This commit is contained in:
sunxiyuan 2020-10-14 20:15:31 +08:00
parent 0349b4a0dd
commit c5833841ed

View file

@ -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);
}
/**
* 初始化设置项
*/