PluginProbe
Elementor Website Builder – more than just a page builder / 4.3.1
Elementor Website Builder – more than just a page builder v4.3.1
4.3.2 4.3.1 4.3.0 4.3.0-beta3 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 All 455 releases
elementor / modules / atomic-widgets / elements / atomic-tabs / atomic-tabs-content-area / atomic-tabs-content-area.php

atomic-tabs-content-area.php in Elementor Website Builder – more than just a page builder 4.3.1, at modules/atomic-widgets/elements/atomic-tabs/atomic-tabs-content-area/atomic-tabs-content-area.php

107 lines 3.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 namespace Elementor\Modules\AtomicWidgets\Elements\Atomic_Tabs\Atomic_Tabs_Content_Area;
3
4 use Elementor\Modules\AtomicWidgets\Elements\Base\Atomic_Element_Base;
5 use Elementor\Modules\AtomicWidgets\Elements\Base\Has_Element_Template;
6 use Elementor\Modules\AtomicWidgets\Elements\Base\Html_Tag_Computer;
7 use Elementor\Modules\AtomicWidgets\PropTypes\Primitives\Boolean_Prop_Type;
8 use Elementor\Modules\AtomicWidgets\PropTypes\Primitives\String_Prop_Type;
9 use Elementor\Modules\AtomicWidgets\PropTypes\Size_Prop_Type;
10 use Elementor\Modules\AtomicWidgets\Styles\Style_Definition;
11 use Elementor\Modules\AtomicWidgets\Styles\Style_Variant;
12 use Elementor\Modules\AtomicWidgets\Controls\Section;
13 use Elementor\Modules\AtomicWidgets\Controls\Types\Text_Control;
14 use Elementor\Modules\AtomicWidgets\PropTypes\Classes_Prop_Type;
15 use Elementor\Modules\AtomicWidgets\PropTypes\Attributes_Prop_Type;
16 use Elementor\Modules\Components\PropTypes\Overridable_Prop_Type;
17
18 if ( ! defined( 'ABSPATH' ) ) {
19 exit; // Exit if accessed directly.
20 }
21
22 class Atomic_Tabs_Content_Area extends Atomic_Element_Base {
23 use Has_Element_Template;
24
25 const BASE_STYLE_KEY = 'base';
26
27 public function __construct( $data = [], $args = null ) {
28 parent::__construct( $data, $args );
29 $this->meta( 'permanently_locked', true );
30 }
31
32 public static function get_type() {
33 return 'e-tabs-content-area';
34 }
35
36 public static function get_element_type(): string {
37 return 'e-tabs-content-area';
38 }
39
40 public function get_title() {
41 return esc_html__( 'Tabs content area', 'elementor' );
42 }
43
44 public function get_keywords() {
45 return [ 'ato', 'atom', 'atoms', 'atomic' ];
46 }
47
48 public function get_icon() {
49 return 'eicon-tab-content';
50 }
51
52 public function should_show_in_panel() {
53 return false;
54 }
55
56 public static function get_computed_html_tag( array $settings ): string {
57 return Html_Tag_Computer::compute( $settings, 'div' );
58 }
59
60 protected static function define_props_schema(): array {
61 return [
62 'classes' => Classes_Prop_Type::make()
63 ->default( [] ),
64 'attributes' => Attributes_Prop_Type::make()->meta( Overridable_Prop_Type::ignore() ),
65 ];
66 }
67
68 protected function define_atomic_controls(): array {
69 return [
70 Section::make()
71 ->set_label( __( 'Settings', 'elementor' ) )
72 ->set_id( 'settings' )
73 ->set_items( [
74 Text_Control::bind_to( '_cssid' )
75 ->set_label( __( 'ID', 'elementor' ) )
76 ->set_meta( [
77 'layout' => 'two-columns',
78 ] ),
79 ] ),
80 ];
81 }
82
83 protected function define_base_styles(): array {
84 $styles = [
85 'display' => String_Prop_Type::generate( 'block' ),
86 ];
87
88 return [
89 static::BASE_STYLE_KEY => Style_Definition::make()
90 ->add_variant(
91 Style_Variant::make()
92 ->add_props( $styles )
93 ),
94 ];
95 }
96
97 protected function get_templates(): array {
98 return [
99 'elementor/elements/atomic-tabs-content-area' => __DIR__ . '/atomic-tabs-content-area.html.twig',
100 ];
101 }
102
103 protected function define_allowed_child_types() {
104 return [ 'e-tab-content', 'container' ];
105 }
106 }
107