Make WordPress Core


Ignore:
Timestamp:
10/23/2008 04:08:47 PM (15 years ago)
Author:
ryan
Message:

Comment paging and sorting from Viper007Bond. see #7927

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-comments-post.php

    r8720 r9296  
    8080}
    8181
    82 $location = ( empty($_POST['redirect_to']) ? get_permalink($comment_post_ID) : $_POST['redirect_to'] ) . '#comment-' . $comment_id;
     82if ( empty($_POST['redirect_to']) )
     83    $postlink = ( 'newest' == get_option('default_comments_page') ) ? get_permalink($comment_post_ID) : add_query_arg( 'cpage', get_comment_pages_count( get_comments( array( 'post_id' => $comment_post_ID ) ) ), get_permalink($comment_post_ID) );
     84
     85$location = ( empty($_POST['redirect_to']) ? $postlink : $_POST['redirect_to'] ) . '#comment-' . $comment_id;
    8386$location = apply_filters('comment_post_redirect', $location, $comment);
    8487
Note: See TracChangeset for help on using the changeset viewer.