Make WordPress Core

Ticket #38925: 0001-Support-override-of-depth-constraint-on-reply-link.patch

File 0001-Support-override-of-depth-constraint-on-reply-link.patch, 1.5 KB (added by TravisR, 8 years ago)

git patch for the change

  • wp-includes/comment-template.php

    From d0bbb4cc01ca7598ad8f0c74e0d4a1ec76613e9a Mon Sep 17 00:00:00 2001
    From: Travis Rothlisberger <t.rothlis@gmail.com>
    Date: Wed, 23 Nov 2016 22:30:01 -0800
    Subject: [PATCH] Support override of depth constraint on reply link
    
    ---
     wp-includes/comment-template.php | 13 +++++++++----
     1 file changed, 9 insertions(+), 4 deletions(-)
    
    diff --git a/wp-includes/comment-template.php b/wp-includes/comment-template.php
    index c914796..e21fc09 100644
    a b function get_comment_reply_link( $args = array(), $comment = null, $post = null 
    15981598                'max_depth'     => 0,
    15991599                'depth'         => 0,
    16001600                'before'        => '',
    1601                 'after'         => ''
     1601                'after'         => '',
     1602        'limit_by_depth' => true
    16021603        );
    16031604
    16041605        $args = wp_parse_args( $args, $defaults );
    16051606
    1606         if ( 0 == $args['depth'] || $args['max_depth'] <= $args['depth'] ) {
     1607        if ( 0 == $args['depth'] ) {
    16071608                return;
    1608         }
    1609 
     1609        }   
     1610   
    16101611        $comment = get_comment( $comment );
    16111612
    16121613        if ( empty( $post ) ) {
    function get_comment_reply_link( $args = array(), $comment = null, $post = null 
    16311632         */
    16321633        $args = apply_filters( 'comment_reply_link_args', $args, $comment, $post );
    16331634
     1635        if ( $args['limit_by_depth'] && ( $args['max_depth'] <= $args['depth'] ) ) {
     1636                return;
     1637        }   
     1638   
    16341639        if ( get_option( 'comment_registration' ) && ! is_user_logged_in() ) {
    16351640                $link = sprintf( '<a rel="nofollow" class="comment-reply-login" href="%s">%s</a>',
    16361641                        esc_url( wp_login_url( get_permalink() ) ),