# betterdocs/4.9.2/views/template-parts/category-description.php

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

- Page: https://pluginprobe.com/plugins/betterdocs/4.9.2/code/views/template-parts/category-description.php
- Raw: https://pluginprobe.com/plugins/betterdocs/4.9.2/raw/views/template-parts/category-description.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.2/code/views/template-parts/category-description.php#L10-L20`.

```php
<?php
// phpcs:disable WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound -- view template receives variables via extract(); prefixing is impractical.

if ( ! defined( 'ABSPATH' ) ) {
    exit;
}
if ( ! $show_description || empty( $description ) ) {
	return;
}
?>
<p class="betterdocs-category-description">
	<?php
	if ( isset( $widget_type ) && $widget_type === 'category_box' ) {
		$allowed_tags = [ 'strong', 'em', 'b', 'code', 'i' ];
		echo wp_kses( $description, $allowed_tags );
	} else {
		echo wp_kses_post( $description );
	}
	?>
</p>

```
