PluginProbe
Elementor Website Builder – more than just a page builder / 3.30.0-dev3
Elementor Website Builder – more than just a page builder v3.30.0-dev3
4.3.0-beta2 4.3.0-beta1 4.2.4 4.2.3 4.2.2 4.2.1 4.2.0 4.1.5 4.2.0-beta2 4.2.0-dev2 4.2.0-beta1 4.1.4 4.1.3 4.1.2 4.1.1 4.1.0 4.1.0-beta3 4.1.0-dev3 4.0.9 4.1.0-beta2 4.1.0-dev2 4.0.8 4.1.0-beta1 4.1.0-dev1 4.0.7 All 451 releases
elementor / modules / atomic-widgets / elements / atomic-element-base.php

atomic-element-base.php in Elementor Website Builder – more than just a page builder 3.30.0-dev3, at modules/atomic-widgets/elements/atomic-element-base.php

70 lines 1.6 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace Elementor\Modules\AtomicWidgets\Elements;
4
5 use Elementor\Element_Base;
6 use Elementor\Modules\AtomicWidgets\PropTypes\Contracts\Prop_Type;
7 use Elementor\Plugin;
8
9 if ( ! defined( 'ABSPATH' ) ) {
10 exit; // Exit if accessed directly.
11 }
12
13 abstract class Atomic_Element_Base extends Element_Base {
14
15 use Has_Atomic_Base;
16
17 protected $version = '0.0';
18 protected $styles = [];
19 protected $editor_settings = [];
20
21 public function __construct( $data = [], $args = null ) {
22 parent::__construct( $data, $args );
23
24 $this->version = $data['version'] ?? '0.0';
25 $this->styles = $data['styles'] ?? [];
26 $this->editor_settings = $data['editor_settings'] ?? [];
27 }
28
29 abstract protected function define_atomic_controls(): array;
30
31 public function get_global_scripts() {
32 return [];
33 }
34
35 final public function get_initial_config() {
36 $config = parent::get_initial_config();
37
38 $config['atomic_controls'] = $this->get_atomic_controls();
39 $config['atomic_props_schema'] = static::get_props_schema();
40 $config['base_styles'] = $this->get_base_styles();
41 $config['version'] = $this->version;
42 $config['show_in_panel'] = true;
43 $config['categories'] = [ 'v4-elements' ];
44 $config['hide_on_search'] = false;
45 $config['controls'] = [];
46 $config['keywords'] = $this->get_keywords();
47
48 return $config;
49 }
50
51 /**
52 * @return array<string, Prop_Type>
53 */
54 abstract protected static function define_props_schema(): array;
55
56 /**
57 * Get Element keywords.
58 *
59 * Retrieve the element keywords.
60 *
61 * @since 3.29
62 * @access public
63 *
64 * @return array Element keywords.
65 */
66 public function get_keywords() {
67 return [];
68 }
69 }
70