在不扩展类的情况下,可以做的是添加自定义操作链接:
add_filter( \'plugin_install_action_links\', \'action_links_wpse_119218\', 10, 2 );
function action_links_wpse_119218( $links, $plugin )
{
if( isset( $_GET[\'tab\'] ) )
{
switch( $_GET[\'tab\'] )
{
case \'featured\':
$links[\'my-action\'] = "Tested up to <a href=\'#\'>{$plugin[\'tested\']}</a>";
break;
case \'popular\':
$links[\'my-action\'] = "Requires <a href=\'#\'>{$plugin[\'requires\']}</a>";
break;
case \'new\':
$links[\'my-action\'] = "Slug <a href=\'#\'>{$plugin[\'slug\']}</a>";
break;
}
}
return $links;
}
然后,可以继续使用jQuery移动元素:
$(\'.move-me\').each(function(){ /* your_magic(); */ });
该自定义链接“我的视图”添加了:
add_filter( \'views_plugin-install\', \'views_wpse_119218\' );
function views_wpse_119218( $views ){
$views[\'my-view\'] = \'<a href="#">My view</a>\';
return $views;
}
这将用于创建您自己的自定义屏幕/表格
add_action( \'load-plugin-install.php\', \'callback\' )
.