WordPress.org

Make WordPress Core

Changeset 10097


Ignore:
Timestamp:
12/07/2008 04:49:22 AM (13 years ago)
Author:
ryan
Message:

Add paging links above comments list. Props Viper007Bond. fixes #8219

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-content/themes/default/comments.php

    r9175 r10097  
    2121    <h3 id="comments"><?php comments_number('No Responses', 'One Response', '% Responses' );?> to &#8220;<?php the_title(); ?>&#8221;</h3>
    2222
     23    <div class="navigation">
     24        <div class="alignleft"><?php previous_comments_link() ?></div>
     25        <div class="alignright"><?php next_comments_link() ?></div>
     26    </div>
     27
    2328    <ol class="commentlist">
    2429    <?php wp_list_comments(); ?>
    2530    </ol>
     31
    2632    <div class="navigation">
    2733        <div class="alignleft"><?php previous_comments_link() ?></div>
  • trunk/wp-includes/comment.php

    r10078 r10097  
    514514    global $wp_query;
    515515
     516    if ( null === $comments && null === $per_page && null === $threaded && !empty($wp_query->max_num_comment_pages) )
     517        return $wp_query->max_num_comment_pages;
     518
    516519    if ( !$comments || !is_array($comments) )
    517520        $comments = $wp_query->comments;
  • trunk/wp-includes/link-template.php

    r10039 r10097  
    12661266        $max_page = $wp_query->max_num_comment_pages;
    12671267
     1268    if ( empty($max_page) )
     1269        $max_page = get_comment_pages_count();
     1270
    12681271    if ( $nextpage > $max_page )
    12691272        return;
     
    13251328    if ( !$page )
    13261329        $page = 1;
    1327     $max_page = $wp_query->max_num_comment_pages;
     1330    $max_page = get_comment_pages_count();
    13281331    $defaults = array(
    13291332        'base' => add_query_arg( 'cpage', '%#%' ),
Note: See TracChangeset for help on using the changeset viewer.