From 61400609c9f72ce520f09f3bbbf02978485d9902 Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Fri, 12 Sep 2008 23:45:15 +0000 Subject: [PATCH] Add depth handling to comment_reply_link(). see #7635 git-svn-id: https://develop.svn.wordpress.org/trunk@8878 602fd350-edb4-49c9-b593-d223f7449a82 --- 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)) ?>