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/Elementor/BaseWidget.php +33 -28 3.4.24.9.2 View file →
@@ -1,7 +1,8 @@
1 1 <?php
2 2
3 3 namespace WPDeveloper\BetterDocs\Editors\Elementor;
4 +
4 5 use Elementor\Widget_Base;
5 6 use WPDeveloper\BetterDocs\Traits\EditorHelper;
6 7
7 8 /**
@@ -7,45 +8,49 @@
7 8 /**
8 9 * @method render_editor_script()
9 10 */
10 11 abstract class BaseWidget extends Widget_Base {
11 - use EditorHelper;
12 + use EditorHelper;
12 13
13 - public function __construct( $data = [], $args = null ) {
14 - // $is_type_instance = $this->is_type_instance();
15 - // dump( $is_type_instance, $data, $args );
14 + public function __construct( $data = [], $args = null ) {
15 + // $is_type_instance = $this->is_type_instance();
16 + // dump( $is_type_instance, $data, $args );
16 17
17 - // if( $is_type_instance && $args !== null ) {
18 - // $data['settings']['nested_posts_per_page'] = 5;
19 - // }
18 + // if( $is_type_instance && $args !== null ) {
19 + // $data['settings']['nested_posts_per_page'] = 5;
20 + // }
20 21
21 22 parent::__construct( $data, $args );
22 23
23 - // if( $is_type_instance && $args !== null ) {
24 - // // $this->set_settings('nested_posts_per_page', 5);
25 - // // $this->query = betterdocs()->query;
26 - // }
27 - }
24 + // if( $is_type_instance && $args !== null ) {
25 + // // $this->set_settings('nested_posts_per_page', 5);
26 + // // $this->query = betterdocs()->query;
27 + // }
28 + }
28 29
29 - public function betterdocs_do_action(){
30 - /**
31 - * Query Controls!
32 - * @source includes/elementor-helper.php
33 - */
34 - do_action( 'betterdocs/elementor/widgets/query', $this, 'doc_category' );
35 - }
30 + public function has_widget_inner_wrapper():bool {
31 + return false;
32 + }
36 33
37 - abstract protected function render_callback();
34 + public function betterdocs_do_action() {
35 + /**
36 + * Query Controls!
37 + * @source includes/elementor-helper.php
38 + */
39 + do_action( 'betterdocs/elementor/widgets/query', $this, 'doc_category' );
40 + }
38 41
39 - protected function render(){
40 - $settings = $this->get_settings_for_display();
41 - $this->attributes = &$settings;
42 + abstract protected function render_callback();
42 43
43 - $this->reset_attributes();
44 + protected function render() {
45 + $settings = $this->get_settings_for_display();
46 + $this->attributes = &$settings;
44 47
45 - do_action_ref_array( 'betterdocs_before_render', [ &$this, 'elementor' ] );
48 + $this->reset_attributes();
46 49
47 - $this->render_callback();
50 + do_action_ref_array( 'betterdocs_before_render', [ &$this, 'elementor' ] );
48 51
49 - do_action_ref_array( 'betterdocs_after_render', [ &$this, 'elementor' ] );
50 - }
52 + $this->render_callback();
53 +
54 + do_action_ref_array( 'betterdocs_after_render', [ &$this, 'elementor' ] );
55 + }
51 56 }