Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't require existing wp comments to show wp comments with setting #523

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading