Skip to content

Commit

Permalink
Don't require existing wp comments to show wp comments with setting (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
angusmcleod authored Jun 27, 2024
1 parent 6b2ba54 commit 0a3eb4f
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions lib/discourse-comment.php
Original file line number Diff line number Diff line change
Expand Up @@ -318,10 +318,7 @@ public function comments_template( $old ) {
break;
}

// Use $post->comment_count because get_comments_number will return the Discourse comments
// number for posts that are published to Discourse.
$num_wp_comments = $post->comment_count;
if ( empty( $this->options['show-existing-comments'] ) || 0 === intval( $num_wp_comments ) ) {
if ( empty( $this->options['show-existing-comments'] ) ) {
echo wp_kses_post( $discourse_comments );

return WPDISCOURSE_PATH . 'templates/blank.php';
Expand Down

0 comments on commit 0a3eb4f

Please sign in to comment.