diff --git a/wp-includes/comment-template.php b/wp-includes/comment-template.php index 06b2ce2397..d5b7dc1833 100644 --- a/wp-includes/comment-template.php +++ b/wp-includes/comment-template.php @@ -2034,6 +2034,8 @@ function comment_id_fields( $post = null ) { * @since 2.7.0 * @since 6.2.0 Added the `$post` parameter. * + * @global WP_Comment $comment Global comment object. + * * @param string|false $no_reply_text Optional. Text to display when not replying to a comment. * Default false. * @param string|false $reply_text Optional. Text to display when replying to a comment. @@ -2045,6 +2047,8 @@ function comment_id_fields( $post = null ) { * Defaults to the current global post. */ function comment_form_title( $no_reply_text = false, $reply_text = false, $link_to_parent = true, $post = null ) { + global $comment; + if ( false === $no_reply_text ) { $no_reply_text = __( 'Leave a Reply' ); } @@ -2067,6 +2071,9 @@ function comment_form_title( $no_reply_text = false, $reply_text = false, $link_ return; } + // Sets the global so that template tags can be used in the comment form. + $comment = get_comment( $reply_to_id ); + if ( $link_to_parent ) { $author = '' . get_comment_author( $reply_to_id ) . ''; } else { diff --git a/wp-includes/version.php b/wp-includes/version.php index cdb04a3133..0d803efe33 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.2-beta2-55394'; +$wp_version = '6.2-beta2-55395'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.