WordPress.org

Make WordPress Core

Ticket #35402: 35402.diff

File 35402.diff, 1.6 KB (added by boonebgorges, 4 years ago)
  • src/wp-includes/comment-template.php

    diff --git src/wp-includes/comment-template.php src/wp-includes/comment-template.php
    index 49dc188..39cabb1 100644
    function wp_comment_form_unfiltered_html_nonce() { 
    12421242 * @global int        $user_ID
    12431243 * @global string     $user_identity
    12441244 * @global bool       $overridden_cpage
    1245  * @global bool       $withcomments 
     1245 * @global bool       $withcomments
    12461246 *
    12471247 * @param string $file              Optional. The file to load. Default '/comments.php'.
    12481248 * @param bool   $separate_comments Optional. Whether to separate the comments by comment type.
    function wp_list_comments( $args = array(), $comments = null ) { 
    19281928                 * If 'page' or 'per_page' has been passed, and does not match what's in $wp_query,
    19291929                 * perform a separate comment query and allow Walker_Comment to paginate.
    19301930                 */
    1931                 if ( is_singular() && ( $r['page'] || $r['per_page'] ) ) {
     1931                if ( $r['page'] || $r['per_page'] ) {
    19321932                        $current_cpage = get_query_var( 'cpage' );
    19331933                        if ( ! $current_cpage ) {
    19341934                                $current_cpage = 'newest' === get_option( 'default_comments_page' ) ? 1 : $wp_query->max_num_comment_pages;
    function wp_list_comments( $args = array(), $comments = null ) { 
    19361936
    19371937                        $current_per_page = get_query_var( 'comments_per_page' );
    19381938                        if ( $r['page'] != $current_cpage || $r['per_page'] != $current_per_page ) {
     1939
    19391940                                $comments = get_comments( array(
    1940                                         'post_id' => get_queried_object_id(),
     1941                                        'post_id' => get_the_ID(),
    19411942                                        'orderby' => 'comment_date_gmt',
    19421943                                        'order' => 'ASC',
    19431944                                        'status' => 'all',