Add some comment API and update comment popup templates to use them. Props David Hose. fixes #1892

git-svn-id: https://develop.svn.wordpress.org/trunk@3115 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren
2005-11-16 23:48:12 +00:00
parent 01c2155563
commit da61a9f508
6 changed files with 19 additions and 9 deletions

View File

@@ -863,4 +863,9 @@ function check_comment($author, $email, $url, $comment, $user_ip, $user_agent, $
return true;
}
function get_approved_comments($post_id) {
global $wpdb;
return $wpdb->get_results("SELECT * FROM $wpdb->comments WHERE comment_post_ID = $post_id AND comment_approved = '1' ORDER BY comment_date");
}
?>