# betterdocs/3.3.2/includes/Shortcodes/PostContent.php

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

- Page: https://pluginprobe.com/plugins/betterdocs/3.3.2/code/includes/Shortcodes/PostContent.php
- Raw: https://pluginprobe.com/plugins/betterdocs/3.3.2/raw/includes/Shortcodes/PostContent.php
- Modified: 2023-08-14T08:41:14+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/3.3.2/code/includes/Shortcodes/PostContent.php#L10-L20`.

```php
<?php

namespace WPDeveloper\BetterDocs\Shortcodes;

use WPDeveloper\BetterDocs\Core\Shortcode;

class PostContent extends Shortcode {
    protected $html_attributes = [];

    public function get_name() {
        return 'betterdocs_post_content';
    }

    /**
     * Summary of default_attributes
     * @return array
     */
    public function default_attributes() {
        return [
            'post_id'                => get_the_ID(),
            'htags'                  => 'h1,h2,h3,h4,h5,h6',
            'enable_toc'             => '',
            'toc_hierarchy'          => '',
            'list_number'            => '',
            'display_toc_on_top'     => '',
            'collapsible_toc_mobile' => ''
        ];
    }

    public function render( $atts, $content = null ) {
        $post = get_post( $get_args['post_id'] );

        return betterdocs()->template_helper->content(
            $post->post_content,
            $this->attributes['htags'],
            $this->attributes['enable_toc']
        );
    }
}

```
