Make WordPress Core

Ticket #37267: 37267.patch

File 37267.patch, 729 bytes (added by jignesh.nakrani, 9 years ago)

@rachelbaker @henry.wright here is a patch to skip rendering cancel comment reply link if comments aren't threaded.

  • wp-includes/comment-template.php

    diff --git a/wp-includes/comment-template.php b/wp-includes/comment-template.php
    index d6a138d..46d1f53 100644
    a b function comment_form( $args = array(), $post_id = null ) { 
    22652265
    22662266                        comment_form_title( $args['title_reply'], $args['title_reply_to'] );
    22672267
    2268                         echo $args['cancel_reply_before'];
     2268                        if ( get_option('thread_comments') ) {
     2269                                echo $args[ 'cancel_reply_before' ];
    22692270
    2270                         cancel_comment_reply_link( $args['cancel_reply_link'] );
     2271                                cancel_comment_reply_link( $args[ 'cancel_reply_link' ] );
    22712272
    2272                         echo $args['cancel_reply_after'];
     2273                                echo $args[ 'cancel_reply_after' ];
     2274                        }
    22732275
    22742276                        echo $args['title_reply_after'];
    22752277