Changeset 9092
- Timestamp:
- 10/06/2008 11:16:26 PM (17 years ago)
- File:
-
- 1 edited
-
trunk/wp-includes/comment-template.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/comment-template.php
r9037 r9092 727 727 * 728 728 * @param string $file Optional, default '/comments.php'. The file to load 729 * @param bool $separate_comments Optional, whether to separate the comments by comment type. Default is false. 729 730 * @return null Returns null if no comments appear 730 731 */ 731 function comments_template( $file = '/comments.php' ) {732 function comments_template( $file = '/comments.php', $separate_comments = false ) { 732 733 global $wp_query, $withcomments, $post, $wpdb, $id, $comment, $user_login, $user_ID, $user_identity; 733 734 734 735 if ( ! (is_single() || is_page() || $withcomments) ) 735 736 return; 737 738 if ( empty($file) ) 739 $file = '/comments.php'; 736 740 737 741 $req = get_option('require_name_email'); … … 748 752 } 749 753 750 // keep $comments for legacy's sake (remember $table*? ;) )754 // keep $comments for legacy's sake 751 755 $wp_query->comments = apply_filters( 'comments_array', $comments, $post->ID ); 752 756 $comments = &$wp_query->comments; 753 757 $wp_query->comment_count = count($wp_query->comments); 754 758 update_comment_cache($wp_query->comments); 759 760 if ( $separate_comments ) { 761 $wp_query->comments_by_type = &separate_comments($comments); 762 $comments_by_type = &$wp_query->comments_by_type; 763 } 755 764 756 765 define('COMMENTS_TEMPLATE', true);
Note: See TracChangeset
for help on using the changeset viewer.