Ticket #17778: 17778.patch
File 17778.patch, 4.3 KB (added by , 14 years ago) |
---|
-
wp-content/themes/twentyeleven/comments.php
35 35 ?> 36 36 </h2> 37 37 38 <?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' )) : // are there comments to navigate through ?>38 <?php if ( get_comment_pages_count() > 1 ) : // are there comments to navigate through ?> 39 39 <nav id="comment-nav-above"> 40 40 <h1 class="assistive-text"><?php _e( 'Comment navigation', 'twentyeleven' ); ?></h1> 41 41 <div class="nav-previous"><?php previous_comments_link( __( '← Older Comments', 'twentyeleven' ) ); ?></div> 42 42 <div class="nav-next"><?php next_comments_link( __( 'Newer Comments →', 'twentyeleven' ) ); ?></div> 43 43 </nav> 44 44 <?php endif; // check for comment navigation ?> 45 46 45 <ol class="commentlist"> 47 46 <?php 48 47 /* Loop through and list the comments. Tell wp_list_comments() … … 55 54 ?> 56 55 </ol> 57 56 58 <?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' )) : // are there comments to navigate through ?>57 <?php if ( get_comment_pages_count() > 1 ) : // are there comments to navigate through ?> 59 58 <nav id="comment-nav-below"> 60 59 <h1 class="assistive-text"><?php _e( 'Comment navigation', 'twentyeleven' ); ?></h1> 61 60 <div class="nav-previous"><?php previous_comments_link( __( '← Older Comments', 'twentyeleven' ) ); ?></div> -
wp-content/themes/twentyten/comments.php
36 36 number_format_i18n( get_comments_number() ), '<em>' . get_the_title() . '</em>' ); 37 37 ?></h3> 38 38 39 <?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' )) : // Are there comments to navigate through? ?>39 <?php if ( get_comment_pages_count() > 1 ) : // Are there comments to navigate through? ?> 40 40 <div class="navigation"> 41 41 <div class="nav-previous"><?php previous_comments_link( __( '<span class="meta-nav">←</span> Older Comments', 'twentyten' ) ); ?></div> 42 42 <div class="nav-next"><?php next_comments_link( __( 'Newer Comments <span class="meta-nav">→</span>', 'twentyten' ) ); ?></div> … … 55 55 ?> 56 56 </ol> 57 57 58 <?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' )) : // Are there comments to navigate through? ?>58 <?php if ( get_comment_pages_count() > 1 ) : // Are there comments to navigate through? ?> 59 59 <div class="navigation"> 60 60 <div class="nav-previous"><?php previous_comments_link( __( '<span class="meta-nav">←</span> Older Comments', 'twentyten' ) ); ?></div> 61 61 <div class="nav-next"><?php next_comments_link( __( 'Newer Comments <span class="meta-nav">→</span>', 'twentyten' ) ); ?></div> -
wp-includes/comment.php
731 731 function get_comment_pages_count( $comments = null, $per_page = null, $threaded = null ) { 732 732 global $wp_query; 733 733 734 if ( null === $comments && null === $per_page && null === $threaded && !empty( $wp_query->max_num_comment_pages) )734 if ( null === $comments && null === $per_page && null === $threaded && !empty( $wp_query->max_num_comment_pages ) ) 735 735 return $wp_query->max_num_comment_pages; 736 736 737 if ( !$comments || !is_array( $comments) )737 if ( !$comments || !is_array( $comments ) ) 738 738 $comments = $wp_query->comments; 739 739 740 if ( empty( $comments) )740 if ( empty( $comments ) ) 741 741 return 0; 742 743 if ( !isset($per_page) ) 744 $per_page = (int) get_query_var('comments_per_page'); 742 743 if ( ! get_option( 'page_comments' ) ) 744 return 1; 745 746 if ( ! isset( $per_page ) ) 747 $per_page = (int) get_query_var( 'comments_per_page' ); 745 748 if ( 0 === $per_page ) 746 $per_page = (int) get_option( 'comments_per_page');749 $per_page = (int) get_option( 'comments_per_page' ); 747 750 if ( 0 === $per_page ) 748 751 return 1; 749 752 750 if ( !isset( $threaded) )751 $threaded = get_option( 'thread_comments');753 if ( !isset( $threaded ) ) 754 $threaded = get_option( 'thread_comments' ); 752 755 753 756 if ( $threaded ) { 754 757 $walker = new Walker_Comment;