在Wordpress插件安装列表中添加新标签


Answers:


8

有过滤器:("views_plugin-install"请参阅此处)。

您可以在/wp-admin/includes/class-wp-plugin-install-list-table.php(当前)第226行找到它:

$views = apply_filters( "views_{$this->screen->id}", $views );

像这样使用它:

add_filter( 'views_plugin-install', 'my_filter', 10, 1 );

function my_filter( $views ){
    //Do your stuff
    return $views;
}

1
又见过滤器install_plugins_tabsinstall_plugins_nonmenu_tabsinstall_plugins_table_api_args_{$tab}在文件中指定。
majick '17
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.