# betterdocs/4.9.2/views/widgets/title.php

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

- Page: https://pluginprobe.com/plugins/betterdocs/4.9.2/code/views/widgets/title.php
- Raw: https://pluginprobe.com/plugins/betterdocs/4.9.2/raw/views/widgets/title.php
- Modified: 2026-08-04T07:29:08+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/widgets/title.php#L10-L20`.

```php
<?php


if ( ! defined( 'ABSPATH' ) ) {
    exit;
}
$tag = empty( $tag ) ? 'h2' : $tag;
// $tag lands in a tag-name position, so clamp it to a safe HTML tag via the
// allow-list rather than relying on strtolower() (which leaves a space/= intact).
$tag = betterdocs()->template_helper->is_valid_tag( $tag );
printf( '<%1$s id="betterdocs-entry-title" class="betterdocs-entry-title" %2$s>%3$s</%1$s>', $tag, $wrapper_attr, wp_kses_post( $title ) ); //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped

```
