Poulomi Nag给出的get\\u comments()答案是正确的。这样会更有效率。
global $wpdb, $post;
$query = sprintf("SELECT user_id
FROM {$wpdb->comments}
JOIN {$wpdb->posts} ON {$wpdb->posts}.ID = {$wpdb->comments}.comment_post_ID
WHERE comment_post_ID = %d
AND comment_approved = \'1\'",
$post->ID);
$authors = $wpdb->get_col($query);
$authors = array_unique($authors);
$authors = array_diff($authors,array(\'0\')); // Remove those where users are not registered
另一种选择是使用WP\\u Comment\\u Query
http://core.trac.wordpress.org/browser/branches/3.2/wp-includes/comment.php#L186