# betterdocs/4.9.3/views/templates/parts/comment.php

BetterDocs – AI Documentation, Knowledge Base, MCP Server, Docs, Wikis, FAQ &amp; Chatbot, version 4.9.3. 18 lines.

- Page: https://pluginprobe.com/plugins/betterdocs/4.9.3/code/views/templates/parts/comment.php
- Raw: https://pluginprobe.com/plugins/betterdocs/4.9.3/raw/views/templates/parts/comment.php
- Modified: 2026-06-23T11:52:12+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/betterdocs/4.9.3/code/views/templates/parts/comment.php#L10-L20`.

```php
<?php


if ( ! defined( 'ABSPATH' ) ) {
    exit;
}
if ( ! betterdocs()->settings->get( 'enable_comment' ) ) {
	return;
}

if ( comments_open() || get_comments_number() ) {
	if ( function_exists( 'wp_is_block_theme' ) && wp_is_block_theme() ) {
		echo do_blocks( '<!-- wp:post-comments /-->' ); //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
	} else {
		comments_template();
	}
}

```
