Adding a hook for comments, fixes #3084

git-svn-id: https://develop.svn.wordpress.org/trunk@4568 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Matt Mullenweg 2006-12-01 03:30:26 +00:00
parent 9d7329cc68
commit 36e8aa39df
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 ) )