WordPress.org

Make WordPress Core

Ticket #8755: 8755.patch

File 8755.patch, 1.5 KB (added by Viper007Bond, 5 years ago)

Don't commit me

  • wp-includes/comment-template.php

     
    12841284        $comment_alt = $comment_thread_alt = 0; 
    12851285        $comment_depth = 1; 
    12861286 
    1287         $defaults = array('walker' => null, 'max_depth' => '', 'style' => 'ul', 'callback' => null, 'end-callback' => null, 'type' => 'all', 
    1288                 'page' => '', 'per_page' => '', 'avatar_size' => 32, 'reverse_top_level' => null, 'reverse_children' => ''); 
     1287        $defaults = array( 'walker' => null, 'max_depth' => '', 'style' => 'ul', 'callback' => null, 'end-callback' => null, 'type' => 'all', 
     1288                'page' => '', 'per_page' => '', 'avatar_size' => 32, 'reverse_top_level' => null, 'reverse_children' => '', 'default_comments_page' => '' ); 
    12891289 
    12901290        $r = wp_parse_args( $args, $defaults ); 
    12911291 
     
    13351335                if ( empty($overridden_cpage) ) { 
    13361336                        $r['page'] = get_query_var('cpage'); 
    13371337                } else { 
     1338                        $default_comments_page = ( '' == $r['default_comments_page'] ) ? get_option('default_comments_page') : $r['default_comments_page']; 
    13381339                        $threaded = ( -1 == $r['max_depth'] ) ? false : true; 
    1339                         $r['page'] = ( 'newest' == get_option('default_comments_page') ) ? get_comment_pages_count($_comments, $r['per_page'], $threaded) : 1; 
     1340                        $r['page'] = ( 'newest' == $default_comments_page ) ? get_comment_pages_count( $_comments, $r['per_page'], $threaded ) : 1; 
    13401341                        set_query_var( 'cpage', $r['page'] ); 
    13411342                } 
    13421343        }