WordPress.org

Make WordPress Core

Changeset 8878


Ignore:
Timestamp:
09/12/2008 11:45:15 PM (10 years ago)
Author:
ryan
Message:

Add depth handling to comment_reply_link(). see #7635

File:
1 edited

Legend:

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

    r8877 r8878  
    846846
    847847    $defaults = array('add_below' => 'comment', 'respond_id' => 'respond', 'reply_text' => __('Reply'),
    848         'login_text' => __('Log in to Reply'));
     848        'login_text' => __('Log in to Reply'), 'depth' => 0);
    849849
    850850    $args = wp_parse_args($args, $defaults);
     851
     852    if ( 0 == $args['depth'] || $args['max_depth'] < $args['depth'] )
    851853
    852854    extract($args, EXTR_SKIP);
     
    940942
    941943        <div class='reply'>
    942         <?php if ( 0 == $args['depth'] || $depth < $args['depth'] ) echo comment_reply_link(array('add_below' => 'div-comment')) ?>
     944        <?php echo comment_reply_link(array('add_below' => 'div-comment', 'depth' => $args['depth'], 'max_depth' => $depth)) ?>
    943945        <?php if ( 'list' == $args['style'] ) : ?>
    944946        </div>
Note: See TracChangeset for help on using the changeset viewer.