PluginProbe
BetterDocs – AI Documentation, Knowledge Base, MCP Server, Docs, Wikis, FAQ & Chatbot / 3.5.3
BetterDocs – AI Documentation, Knowledge Base, MCP Server, Docs, Wikis, FAQ & Chatbot v3.5.3
4.9.3 4.9.2 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 All 201 releases
← All changes | includes/Editors/BlockEditor/Blocks/DocContent.php +28 -30 4.5.6 → 3.5.3 View file →
@@ -4,40 +4,38 @@
4 4
5 5 use WPDeveloper\BetterDocs\Editors\BlockEditor\Block;
6 6
7 7 class DocContent extends Block {
8 - public function get_name() {
9 - return 'doc-content';
10 - }
8 + public function get_name() {
9 + return 'doc-content';
10 + }
11 11
12 - protected $editor_styles = [
13 - 'betterdocs-single',
14 - 'betterdocs-encyclopedia'
12 + protected $editor_styles = [
13 + 'betterdocs-single'
14 + ];
15 15
16 - ];
16 + public function get_default_attributes() {
17 + return [
18 + 'blockId' => '',
19 + 'show_print_icon' => true
20 + ];
21 + }
17 22
18 - public function get_default_attributes() {
19 - return [
20 - 'blockId' => '',
21 - 'show_print_icon' => true
22 - ];
23 - }
23 + public function render( $attributes, $content ) {
24 + $this->views( 'widgets/content' );
25 + }
24 26
25 - public function render( $attributes, $content ) {
26 - $this->views( 'widgets/content' );
27 - }
27 + public function view_params() {
28 + $toc_setting = get_transient( 'betterdocs_toc_setting' );
29 + $htags = ( $toc_setting ) ? implode( ',', $toc_setting['htags'] ) : '';
30 + $enable_toc = ( $htags ) ? 1 : '';
28 31
29 - public function view_params() {
30 - $toc_setting = get_transient( 'betterdocs_toc_setting' );
31 - $htags = ( $toc_setting ) ? implode( ',', $toc_setting['htags'] ) : '';
32 - $enable_toc = ( $htags ) ? 1 : '';
33 -
34 - return [
35 - 'wrapper_attr' => [
36 - 'class' => [ 'betterdocs-entry-content' ]
37 - ],
38 - 'enable' => $this->attributes['show_print_icon'],
39 - 'enable_toc' => $enable_toc,
40 - 'htags' => $htags
41 - ];
42 - }
32 + return [
33 + 'wrapper_attr' => [
34 + 'class' => ['betterdocs-entry-content']
35 + ],
36 + 'enable' => $this->attributes['show_print_icon'],
37 + 'enable_toc' => $enable_toc,
38 + 'htags' => $htags
39 + ];
40 + }
43 41 }