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
c5833841ed
commit
ff25331317
1 changed files with 1 additions and 1 deletions
|
@ -36,7 +36,7 @@ class WP_CHINA_YES {
|
|||
* 插件列表页中所有插件增加“翻译校准”链接
|
||||
*/
|
||||
if (get_option('wpapi') == 1) {
|
||||
add_filter('plugin_action_links', function ($links, $plugin = '') {
|
||||
add_filter(sprintf('%splugin_action_links', is_multisite() ? 'network_admin_' : ''), 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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue