+
+<?php
+$post_id = $comment->comment_post_ID;
+if ( current_user_can( 'edit_post', $post_id ) ) {
+ $post_link = "<a href='" . esc_url( get_edit_post_link( $post_id ) ) . "'>";
+ $post_link .= esc_html( get_the_title( $post_id ) ) . '</a>';
+} else {
+ $post_link = esc_html( get_the_title( $post_id ) );
+}
+?>
+
+<div class="misc-pub-section misc-pub-response-to">
+ <?php printf(
+ /* translators: %s: post link */
+ __( 'In response to: %s' ),
+ '<b>' . $post_link . '</b>'
+ ); ?>
+</div>
+
+<?php
+if ( $comment->comment_parent ) :
+ $parent = get_comment( $comment->comment_parent );
+ if ( $parent ) :
+ $parent_link = esc_url( get_comment_link( $parent ) );
+ $name = get_comment_author( $parent );
+ ?>
+ <div class="misc-pub-section misc-pub-reply-to">
+ <?php printf(
+ /* translators: %s: comment link */
+ __( 'In reply to: %s' ),
+ '<b><a href="' . $parent_link . '">' . $name . '</a></b>'
+ ); ?>
+ </div>
+<?php endif;
+endif; ?>
+
+<?php
+ /**
+ * Filter miscellaneous actions for the edit comment form sidebar.
+ *
+ * @since 4.3.0
+ *
+ * @param string $html Output HTML to display miscellaneous action.
+ * @param object $comment Current comment object.
+ */
+ echo apply_filters( 'edit_comment_misc_actions', '', $comment );
+?>
+