WordPress.org

Make WordPress Core

Changeset 9424


Ignore:
Timestamp:
10/31/2008 02:58:22 AM (11 years ago)
Author:
ryan
Message:

depth? during the wp_list_comments should be max_depth?. Props ShaneF. fixes #8018

File:
1 edited

Legend:

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

    r9416 r9424  
    11301130
    11311131        <div class="reply">
    1132         <?php comment_reply_link(array_merge( $args, array('add_below' => $add_below, 'depth' => $depth, 'max_depth' => $args['depth']))) ?>
     1132        <?php comment_reply_link(array_merge( $args, array('add_below' => $add_below, 'depth' => $depth, 'max_depth' => $args['max_depth']))) ?>
    11331133        </div>
    11341134        <?php if ( 'ul' == $args['style'] ) : ?>
     
    11771177    $comment_depth = 1;
    11781178
    1179     $defaults = array('walker' => null, 'depth' => '', 'style' => 'ul', 'callback' => null, 'end-callback' => null, 'type' => 'all',
     1179    $defaults = array('walker' => null, 'max_depth' => '', 'style' => 'ul', 'callback' => null, 'end-callback' => null, 'type' => 'all',
    11801180        'page' => '', 'per_page' => '', 'avatar_size' => 32, 'reverse_top_level' => null, 'reverse_children' => '');
    11811181
     
    11901190    }
    11911191
    1192     if ( '' === $r['depth'] ) {
     1192    if ( '' === $r['max_depth'] ) {
    11931193        if ( get_option('thread_comments') )
    1194             $r['depth'] = get_option('thread_comments_depth');
     1194            $r['max_depth'] = get_option('thread_comments_depth');
    11951195        else
    1196             $r['depth'] = -1;
     1196            $r['max_depth'] = -1;
    11971197    }
    11981198
     
    12041204                $r['page'] = get_query_var('cpage');
    12051205            } else {
    1206                 $threaded = ( -1 == $r['depth'] ) ? false : true;
     1206                $threaded = ( -1 == $r['max_depth'] ) ? false : true;
    12071207                $r['page'] = ( 'newest' == get_option('default_comments_page') ) ? get_comment_pages_count($comments, $r['per_page'], $threaded) : 1;
    12081208                set_query_var( 'cpage', $r['page'] );
     
    12311231            if ( empty($wp_query->comments_by_type[$type]) )
    12321232                return;
    1233             $walker->paged_walk($wp_query->comments_by_type[$type], $depth, $page, $per_page, $r);
     1233            $walker->paged_walk($wp_query->comments_by_type[$type], $max_depth, $page, $per_page, $r);
    12341234            $wp_query->max_num_comment_pages = $walker->max_pages;
    12351235            return;
    12361236        }
    1237         $walker->paged_walk($wp_query->comments, $depth, $page, $per_page, $r);
     1237        $walker->paged_walk($wp_query->comments, $max_depth, $page, $per_page, $r);
    12381238        $wp_query->max_num_comment_pages = $walker->max_pages;
    12391239    } else {
     
    12441244            if ( empty($comments_by_type[$type]) )
    12451245                return;
    1246             $walker->paged_walk($comments_by_type[$type], $depth, $page, $per_page, $r);
     1246            $walker->paged_walk($comments_by_type[$type], $max_depth, $page, $per_page, $r);
    12471247            $wp_query->max_num_comment_pages = $walker->max_pages;
    12481248            return;
    12491249        }
    1250         $walker->paged_walk($comments, $depth, $page, $per_page, $r);
     1250        $walker->paged_walk($comments, $max_depth, $page, $per_page, $r);
    12511251        $wp_query->max_num_comment_pages = $walker->max_pages;
    12521252    }
Note: See TracChangeset for help on using the changeset viewer.