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