diff --git a/wp-includes/comment-template.php b/wp-includes/comment-template.php index 76d4b1aac9..b10b8ce06a 100644 --- a/wp-includes/comment-template.php +++ b/wp-includes/comment-template.php @@ -845,10 +845,12 @@ function comment_reply_link($args = array(), $comment = null, $post = null) { global $user_ID; $defaults = array('add_below' => 'comment', 'respond_id' => 'respond', 'reply_text' => __('Reply'), - 'login_text' => __('Log in to Reply')); + 'login_text' => __('Log in to Reply'), 'depth' => 0); $args = wp_parse_args($args, $defaults); + if ( 0 == $args['depth'] || $args['max_depth'] < $args['depth'] ) + extract($args, EXTR_SKIP); $comment = get_comment($comment); @@ -939,7 +941,7 @@ class Walker_Comment extends Walker {
- 'div-comment')) ?> + 'div-comment', 'depth' => $args['depth'], 'max_depth' => $depth)) ?>