Bug: CoursePress discussion layout issue

Bug with discussion layout, editing the following should fix it:


$content .= '<div class="edit-link"><a href="' . esc_url( $edit_discussion_link ) . '">' . esc_html__( 'Edit', 'cp' ) . '</a>';


$content .= '<div class="edit-link"><a href="' . esc_url( $edit_discussion_link ) . '">' . esc_html__( 'Edit', 'cp' ) . '</a></div>';

When an users opens his own discussion thread, the layout breaks, since the div is not closed. The edit link is visible when an user opens his own discussion thread, and since the div is not closed, depending on the theme it will break the layout.


The sidebar should be on the right for the above screenshot, but due to this bug it's not aligned correctly. Tested in TwentySixteen, and was able to notice the same issue in the source code, but it displays the layout correctly in TwentySixteen.

This is from 2016 theme:

<div class="course-discussion-wrapper">
<div class="course-discussion-page course-discussion-content">
<h3 class="title course-discussion-title">
Discussion: gfd gfdg fd
</h3>g fdg fdg fd
<div class="edit-link">
<a href="">Edit</a>

It needs one more closing tag. Which is missing in the plugin side, when tested with TwentySixteen theme.