PluginProbe
BetterDocs – AI Documentation, Knowledge Base, MCP Server, Docs, Wikis, FAQ & Chatbot / 4.9.2
BetterDocs – AI Documentation, Knowledge Base, MCP Server, Docs, Wikis, FAQ & Chatbot v4.9.2
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 3.5.1 All 200 releases
← All changes | includes/Editors/BlockEditor/Blocks/BetterdocsPrint.php +28 -20 3.4.24.9.2 View file →
@@ -4,30 +4,38 @@
4 4
5 5 use WPDeveloper\BetterDocs\Editors\BlockEditor\Block;
6 6
7 7 class BetterdocsPrint extends Block {
8 - protected $editor_styles = [
9 - 'betterdocs-single'
10 - ];
8 + protected $editor_styles = [
9 + 'betterdocs-single'
10 + ];
11 11
12 - protected $frontend_styles = [
13 - 'betterdocs-single'
14 - ];
12 + protected $frontend_styles = [
13 + 'betterdocs-single',
14 + 'betterdocs-encyclopedia'
15 + ];
15 16
16 - protected $frontend_scripts = [
17 - 'betterdocs'
18 - ];
17 + protected $frontend_scripts = [
18 + 'betterdocs'
19 + ];
19 20
20 - public function get_name() {
21 - return 'betterdocs-print';
22 - }
21 + public function get_name() {
22 + return 'betterdocs-print';
23 + }
23 24
24 - public function get_default_attributes() {
25 - return [
26 - 'blockId' => ''
27 - ];
28 - }
25 + public function get_default_attributes() {
26 + return [
27 + 'blockId' => '',
28 + 'layout' => 'layout-1',
29 + 'enable' => true
30 + ];
31 + }
29 32
30 - public function render($attributes, $content) {
31 - $this->views('widgets/print-icon');
32 - }
33 + public function render( $attributes, $content ) {
34 + $layout = $attributes['layout'];
35 + if ( $layout == 'layout-1' ) {
36 + $this->views( 'widgets/print-icon' );
37 + } else {
38 + $this->views( 'templates/parts/print-icon-2' );
39 + }
40 + }
33 41 }