PluginProbe
BetterDocs – AI Documentation, Knowledge Base, MCP Server, Docs, Wikis, FAQ & Chatbot / 4.2.0
BetterDocs – AI Documentation, Knowledge Base, MCP Server, Docs, Wikis, FAQ & Chatbot v4.2.0
4.9.1 4.9.0 4.8.2 4.8.1 4.8.0 4.7.0 4.6.2 4.6.1 4.6.0 4.5.6 4.5.5 4.5.4 4.5.3 4.5.2 4.5.1 4.5.0 4.4.1 4.4.0 3.3.4 3.4.0 3.4.1 3.4.2 3.5.0 3.5.1 3.5.2 All 199 releases
← All changes | includes/Shortcodes/PostContent.php +27 -27 3.4.24.2.0 View file →
@@ -4,36 +4,36 @@
4 4
5 5 use WPDeveloper\BetterDocs\Core\Shortcode;
6 6
7 7 class PostContent extends Shortcode {
8 - protected $html_attributes = [];
8 + protected $html_attributes = [];
9 9
10 - public function get_name() {
11 - return 'betterdocs_post_content';
12 - }
10 + public function get_name() {
11 + return 'betterdocs_post_content';
12 + }
13 13
14 - /**
15 - * Summary of default_attributes
16 - * @return array
17 - */
18 - public function default_attributes() {
19 - return [
20 - 'post_id' => get_the_ID(),
21 - 'htags' => 'h1,h2,h3,h4,h5,h6',
22 - 'enable_toc' => '',
23 - 'toc_hierarchy' => '',
24 - 'list_number' => '',
25 - 'display_toc_on_top' => '',
26 - 'collapsible_toc_mobile' => ''
27 - ];
28 - }
14 + /**
15 + * Summary of default_attributes
16 + * @return array
17 + */
18 + public function default_attributes() {
19 + return [
20 + 'post_id' => get_the_ID(),
21 + 'htags' => 'h1,h2,h3,h4,h5,h6',
22 + 'enable_toc' => '',
23 + 'toc_hierarchy' => '',
24 + 'list_number' => '',
25 + 'display_toc_on_top' => '',
26 + 'collapsible_toc_mobile' => ''
27 + ];
28 + }
29 29
30 - public function render( $atts, $content = null ) {
31 - $post = get_post( $get_args['post_id'] );
30 + public function render( $atts, $content = null ) {
31 + $post = get_post( $this->attributes['post_id'] );
32 32
33 - return betterdocs()->template_helper->content(
34 - $post->post_content,
35 - $this->attributes['htags'],
36 - $this->attributes['enable_toc']
37 - );
38 - }
33 + return betterdocs()->template_helper->content(
34 + $post->post_content,
35 + $this->attributes['htags'],
36 + $this->attributes['enable_toc']
37 + );
38 + }
39 39 }