From 8db1601dd7caaf082a3e041e81b3f16eea2e8344 Mon Sep 17 00:00:00 2001 From: ryan Date: Fri, 12 Sep 2008 23:45:15 +0000 Subject: [PATCH] Add depth handling to comment_reply_link(). see #7635 git-svn-id: http://svn.automattic.com/wordpress/trunk@8878 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/comment-template.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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)) ?>