据我所知,没有这个函数。需要自己去写。
可以在
wp-includes/comment.php
增加一个funciton
function get_first_approved_comment($post_id) {
global $wpdb;
return $wpdb->get_results($wpdb->prepare("SELECT * FROM $wpdb->comments WHERE comment_post_ID = %d AND comment_approved = '1' ORDER BY comment_date DESC limit 1", $post_id));
}