Ticket #35511: 35511.diff
File 35511.diff, 1.7 KB (added by , 9 years ago) |
---|
-
comment-template.php
730 730 * If the default page displays the oldest comments, the permalinks for comments on the default page 731 731 * do not need a 'cpage' query var. 732 732 */ 733 $default_comments_page = get_option( 'default_comments_page' );734 733 if ( 'oldest' === get_option( 'default_comments_page' ) && 1 === $cpage ) { 735 734 $cpage = ''; 736 735 } … … 1249 1248 * Default false. 1250 1249 */ 1251 1250 function comments_template( $file = '/comments.php', $separate_comments = false ) { 1252 global $wp_query, $withcomments, $post, $ wpdb, $id, $comment, $user_login, $user_ID, $user_identity, $overridden_cpage;1251 global $wp_query, $withcomments, $post, $user_ID, $overridden_cpage; 1253 1252 1254 1253 if ( !(is_single() || is_page() || $withcomments) || empty($post) ) 1255 1254 return; … … 1277 1276 /* 1278 1277 * The url of the current comment author escaped for use in attributes. 1279 1278 */ 1280 $comment_author_url = esc_url($commenter['comment_author_url']);1281 1282 1279 $comment_args = array( 1283 1280 'orderby' => 'comment_date_gmt', 1284 1281 'order' => 'ASC', … … 1300 1297 $comment_args['include_unapproved'] = array( $comment_author_email ); 1301 1298 } 1302 1299 1303 $per_page = 0;1304 1300 if ( get_option( 'page_comments' ) ) { 1305 1301 $per_page = (int) get_query_var( 'comments_per_page' ); 1306 1302 if ( 0 === $per_page ) { … … 1401 1397 1402 1398 if ( $separate_comments ) { 1403 1399 $wp_query->comments_by_type = separate_comments($comments); 1404 $comments_by_type = &$wp_query->comments_by_type;1405 1400 } else { 1406 1401 $wp_query->comments_by_type = array(); 1407 1402 }