Obey comment_order if set. Defaul to asc if not set
git-svn-id: http://svn.automattic.com/wordpress/trunk@9386 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
7f456fd864
commit
6a3dd73a72
|
@ -1150,7 +1150,7 @@ function wp_list_comments($args = array(), $comments = null ) {
|
|||
$comment_depth = 1;
|
||||
|
||||
$defaults = array('walker' => null, 'depth' => '', 'style' => 'ul', 'callback' => null, 'end-callback' => null, 'type' => 'all',
|
||||
'page' => '', 'per_page' => '', 'avatar_size' => 32, 'reverse_top_level' => '', 'reverse_children' => '');
|
||||
'page' => '', 'per_page' => '', 'avatar_size' => 32, 'reverse_top_level' => null, 'reverse_children' => '');
|
||||
|
||||
$r = wp_parse_args( $args, $defaults );
|
||||
|
||||
|
@ -1187,8 +1187,8 @@ function wp_list_comments($args = array(), $comments = null ) {
|
|||
if ( 0 == $r['page'] && 0 != $r['per_page'] )
|
||||
$r['page'] = 1;
|
||||
|
||||
if ( ! isset( $r['reverse_top_level'] ) )
|
||||
$r['reverse_top_level'] = ( 'asc' == get_option('comment_order') ) ? FALSE : TRUE;
|
||||
if ( null === $r['reverse_top_level'] )
|
||||
$r['reverse_top_level'] = ( 'desc' == get_option('comment_order') ) ? TRUE : FALSE;
|
||||
|
||||
extract( $r, EXTR_SKIP );
|
||||
|
||||
|
|
Loading…
Reference in New Issue