Make WordPress Core

Ticket #33775: 33775.patch

File 33775.patch, 2.4 KB (added by tyxla, 10 years ago)

In comment_form(): implement title_reply_before and title_reply_after args to allow modifying the HTML of the comment form reply title.

  • src/wp-includes/comment-template.php

     
    19051905 *     @type string $title_reply          The translatable 'reply' button label. Default 'Leave a Reply'.
    19061906 *     @type string $title_reply_to       The translatable 'reply-to' button label. Default 'Leave a Reply to %s',
    19071907 *                                        where %s is the author of the comment being replied to.
     1908 *     @type string $title_reply_before   HTML displayed before the comment form title.
     1909 *                                        Default: '<h3 id="reply-title" class="comment-reply-title">'.
     1910 *     @type string $title_reply_after    HTML displayed after the comment form title.
     1911 *                                        Default: '</h3>'.
    19081912 *     @type string $cancel_reply_link    The translatable 'cancel reply' button label. Default 'Cancel reply'.
    19091913 *     @type string $label_submit         The translatable 'submit' button label. Default 'Post a comment'.
    19101914 *     @type string $submit_button        HTML format for the Submit button.
     
    19661970                'name_submit'          => 'submit',
    19671971                'title_reply'          => __( 'Leave a Reply' ),
    19681972                'title_reply_to'       => __( 'Leave a Reply to %s' ),
     1973                'title_reply_before'   => '<h3 id="reply-title" class="comment-reply-title">',
     1974                'title_reply_after'    => '</h3>',
    19691975                'cancel_reply_link'    => __( 'Cancel reply' ),
    19701976                'label_submit'         => __( 'Post Comment' ),
    19711977                'submit_button'        => '<input name="%1$s" type="submit" id="%2$s" class="%3$s" value="%4$s" />',
     
    19972003                        do_action( 'comment_form_before' );
    19982004                        ?>
    19992005                        <div id="respond" class="comment-respond">
    2000                                 <h3 id="reply-title" class="comment-reply-title"><?php comment_form_title( $args['title_reply'], $args['title_reply_to'] ); ?> <small><?php cancel_comment_reply_link( $args['cancel_reply_link'] ); ?></small></h3>
     2006                                <?php
     2007                                echo $args['title_reply_before'];
     2008                                comment_form_title( $args['title_reply'], $args['title_reply_to'] );
     2009                                echo ' <small>';
     2010                                cancel_comment_reply_link( $args['cancel_reply_link'] );
     2011                                echo '</small>';
     2012                                echo $args['title_reply_after'];
     2013                                ?>
     2014
    20012015                                <?php if ( get_option( 'comment_registration' ) && !is_user_logged_in() ) : ?>
    20022016                                        <?php echo $args['must_log_in']; ?>
    20032017                                        <?php