From 2c23ca7411ccd37d35f56d5058b8172d4664e65b Mon Sep 17 00:00:00 2001 From: Scott Taylor Date: Thu, 24 Sep 2015 21:33:26 +0000 Subject: [PATCH] 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. Built from https://develop.svn.wordpress.org/trunk@34523 git-svn-id: http://core.svn.wordpress.org/trunk@34487 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/comment-template.php | 11 ++++++++--- wp-includes/version.php | 2 +- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/wp-includes/comment-template.php b/wp-includes/comment-template.php index 06cc26e1f0..11968803f7 100644 --- a/wp-includes/comment-template.php +++ b/wp-includes/comment-template.php @@ -1890,7 +1890,8 @@ function wp_list_comments( $args = array(), $comments = null ) { * @since 3.0.0 * @since 4.1.0 Introduced the 'class_submit' argument. * @since 4.2.0 Introduced 'submit_button' and 'submit_fields' arguments. - * @since 4.4.0 Introduced 'title_reply_before' and 'title_reply_after' arguments. + * @since 4.4.0 Introduced 'title_reply_before', 'title_reply_after', + * 'cancel_reply_before', and 'cancel_reply_after' arguments. * * @param array $args { * Optional. Default arguments and form fields to override. @@ -1919,6 +1920,8 @@ function wp_list_comments( $args = array(), $comments = null ) { * Default: '

'. * @type string $title_reply_after HTML displayed after the comment form title. * Default: '

'. + * @type string $cancel_reply_before HTML displayed before the cancel reply link. + * @type string $cancel_reply_after HTML displayed after the cancel reply link. * @type string $cancel_reply_link The translatable 'cancel reply' button label. Default 'Cancel reply'. * @type string $label_submit The translatable 'submit' button label. Default 'Post a comment'. * @type string $submit_button HTML format for the Submit button. @@ -1982,6 +1985,8 @@ function comment_form( $args = array(), $post_id = null ) { 'title_reply_to' => __( 'Leave a Reply to %s' ), 'title_reply_before' => '

', 'title_reply_after' => '

', + 'cancel_reply_before' => ' ', + 'cancel_reply_after' => '', 'cancel_reply_link' => __( 'Cancel reply' ), 'label_submit' => __( 'Post Comment' ), 'submit_button' => '', @@ -2018,11 +2023,11 @@ function comment_form( $args = array(), $post_id = null ) { comment_form_title( $args['title_reply'], $args['title_reply_to'] ); - echo ' '; + echo $args['cancel_reply_before']; cancel_comment_reply_link( $args['cancel_reply_link'] ); - echo ''; + echo $args['cancel_reply_after']; echo $args['title_reply_after']; ?> diff --git a/wp-includes/version.php b/wp-includes/version.php index e8382a2320..da5ce6759c 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.4-alpha-34522'; +$wp_version = '4.4-alpha-34523'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.