Make WordPress Core


Ignore:
Timestamp:
01/02/2017 07:58:09 PM (8 years ago)
Author:
boonebgorges
Message:

Ignore the 'comment_order' setting when determining comment pagination.

[38740] incorrectly introduced logic that changed a comment's page when
'comment_order' was set to 'desc'. This is in violation of the design
of the comment pagination system: a comment's page is designed not to
change when 'comment_order' or 'default_comment_page' are changed.
See #31101.

Props rachelbaker.
Fixes #39280.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/comment.php

    r39640 r39663  
    10041004            return get_page_of_comment( $comment->comment_parent, $args );
    10051005
    1006         if ( 'desc' === get_option( 'comment_order' ) ) {
    1007             $compare = 'after';
    1008         } else {
    1009             $compare = 'before';
    1010         }
    1011 
    10121006        $comment_args = array(
    10131007            'type'       => $args['type'],
     
    10201014                array(
    10211015                    'column' => "$wpdb->comments.comment_date_gmt",
    1022                     $compare => $comment->comment_date_gmt,
     1016                    'before' => $comment->comment_date_gmt,
    10231017                )
    10241018            ),
Note: See TracChangeset for help on using the changeset viewer.