Adding a hook for comments, fixes #3084

git-svn-id: http://svn.automattic.com/wordpress/trunk@4568 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
matt 2006-12-01 03:30:26 +00:00
parent 76f6a1cbf2
commit b7746f62c2
1 changed files with 2 additions and 0 deletions

View File

@ -290,6 +290,8 @@ function comments_template( $file = '/comments.php' ) {
$comments = $wpdb->get_results("SELECT * FROM $wpdb->comments WHERE comment_post_ID = '$post->ID' AND ( comment_approved = '1' OR ( comment_author = '$author_db' AND comment_author_email = '$email_db' AND comment_approved = '0' ) ) ORDER BY comment_date");
}
$comments = apply_filters( 'comments_array', $comments, $post->ID );
define('COMMENTS_TEMPLATE', true);
$include = apply_filters('comments_template', TEMPLATEPATH . $file );
if ( file_exists( $include ) )