Make WordPress Core


Ignore:
Timestamp:
09/24/2015 09:32:03 PM (9 years ago)
Author:
wonderboymusic
Message:

Comments: in comment_form(), add args for cancel_reply_before and cancel_reply_after to eradicate remaining hard-coded HTML bits.

Props MikeHansenMe.
Fixes #23797.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/comment-template.php

    r34520 r34523  
    18911891 * @since 4.1.0 Introduced the 'class_submit' argument.
    18921892 * @since 4.2.0 Introduced 'submit_button' and 'submit_fields' arguments.
    1893  * @since 4.4.0 Introduced 'title_reply_before' and 'title_reply_after' arguments.
     1893 * @since 4.4.0 Introduced 'title_reply_before', 'title_reply_after',
     1894 *              'cancel_reply_before', and 'cancel_reply_after' arguments.
    18941895 *
    18951896 * @param array       $args {
     
    19201921 *     @type string $title_reply_after    HTML displayed after the comment form title.
    19211922 *                                        Default: '</h3>'.
     1923 *     @type string $cancel_reply_before  HTML displayed before the cancel reply link.
     1924 *     @type string $cancel_reply_after   HTML displayed after the cancel reply link.
    19221925 *     @type string $cancel_reply_link    The translatable 'cancel reply' button label. Default 'Cancel reply'.
    19231926 *     @type string $label_submit         The translatable 'submit' button label. Default 'Post a comment'.
     
    19831986        'title_reply_before'   => '<h3 id="reply-title" class="comment-reply-title">',
    19841987        'title_reply_after'    => '</h3>',
     1988        'cancel_reply_before'  => ' <small>',
     1989        'cancel_reply_after'   => '</small>',
    19851990        'cancel_reply_link'    => __( 'Cancel reply' ),
    19861991        'label_submit'         => __( 'Post Comment' ),
     
    20192024                comment_form_title( $args['title_reply'], $args['title_reply_to'] );
    20202025
    2021                 echo ' <small>';
     2026                echo $args['cancel_reply_before'];
    20222027
    20232028                cancel_comment_reply_link( $args['cancel_reply_link'] );
    20242029
    2025                 echo '</small>';
     2030                echo $args['cancel_reply_after'];
    20262031
    20272032                echo $args['title_reply_after'];
Note: See TracChangeset for help on using the changeset viewer.