您可以使用内置的ThickBox通过Ajax显示弹出窗口:
//first add thickbox to your page
function add_thickbox(){
if(is_admin() && (isset($_GET[\'page\']) && $_GET[\'page\'] == "my-plugin-file.php") {
wp_enqueue_script(\'jquery\');
wp_enqueue_script(\'thickbox\',null,array(\'jquery\'));
wp_enqueue_style(\'thickbox.css\', \'/\'.WPINC.\'/js/thickbox/thickbox.css\', null, \'1.0\');
}
}
add_action(\'wp_enqueue_script\',\'add_thickbox\');
//then in your user list for each user you add the thickbox
//popup on the onclick and pass the info needed (like user id) so eg:
?>
<!-- for each user add -->
<a class="thickbox" onclick="javascript: show_user_info(user_id)">user name</a>
<!-- and then add this function once -->
<script>
function show_user_info(user_id){
var aj_url = \'admin-ajax.php?action=my_get_user_info&user_id=\' + user_id;
tb_show(\'userinfo\',aj_url );
}
</script>
<?php
//so all you have left is to create the ajax processing function :
add_action(\'wp_ajax_my_get_user_info\', \'my_AJAX_processing_function\');
function my_AJAX_processing_function(){
//echo user info
//and remember to die;
}