PluginProbe
Elementor Website Builder – more than just a page builder / 3.35.0-dev4
Elementor Website Builder – more than just a page builder v3.35.0-dev4
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 4.0.8 4.1.0-beta1 4.1.0-dev1 All 452 releases
← All changes | modules/atomic-widgets/elements/flexbox/flexbox.php +3 -27 4.3.0-beta33.35.0-dev4 View file →
@@ -1,10 +1,8 @@
1 1 <?php
2 2 namespace Elementor\Modules\AtomicWidgets\Elements\Flexbox;
3 3
4 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 5 use Elementor\Modules\AtomicWidgets\PropDependencies\Manager as Dependency_Manager;
8 6 use Elementor\Modules\AtomicWidgets\PropTypes\Primitives\String_Prop_Type;
9 7 use Elementor\Modules\AtomicWidgets\PropTypes\Size_Prop_Type;
10 8 use Elementor\Modules\AtomicWidgets\Styles\Style_Definition;
@@ -22,10 +20,8 @@
22 20 exit; // Exit if accessed directly.
23 21 }
24 22
25 23 class Flexbox extends Atomic_Element_Base {
26 - use Has_Element_Template;
27 -
28 24 const BASE_STYLE_KEY = 'base';
29 25
30 26 public function __construct( $data = [], $args = null ) {
31 27 parent::__construct( $data, $args );
@@ -35,10 +31,8 @@
35 31 public static function get_type() {
36 32 return 'e-flexbox';
37 33 }
38 34
39 - public static $widget_description = 'A container (div) with flex display and flex-direction row by default.';
40 -
41 35 public static function get_element_type(): string {
42 36 return 'e-flexbox';
43 37 }
44 38
@@ -46,9 +40,9 @@
46 40 return esc_html__( 'Flexbox', 'elementor' );
47 41 }
48 42
49 43 public function get_keywords() {
50 - return [ 'ato', 'atom', 'atoms', 'atomic', 'container', 'wrapper', 'section', 'row', 'column', 'flex', 'layout' ];
44 + return [ 'ato', 'atom', 'atoms', 'atomic' ];
51 45 }
52 46
53 47 public function get_icon() {
54 48 return 'eicon-flexbox';
@@ -53,12 +47,8 @@
53 47 public function get_icon() {
54 48 return 'eicon-flexbox';
55 49 }
56 50
57 - public static function get_computed_html_tag( array $settings ): string {
58 - return Html_Tag_Computer::compute( $settings, 'div' );
59 - }
60 -
61 51 protected static function define_props_schema(): array {
62 52 $tag_dependencies = Dependency_Manager::make( Dependency_Manager::RELATION_AND )
63 53 ->where( [
64 54 'operator' => 'ne',
@@ -81,11 +71,11 @@
81 71 return [
82 72 'classes' => Classes_Prop_Type::make()
83 73 ->default( [] ),
84 74 'tag' => String_Prop_Type::make()
85 - ->enum( [ 'div', 'header', 'section', 'article', 'aside', 'footer', 'a', 'button', 'main', 'nav' ] )
75 + ->enum( [ 'div', 'header', 'section', 'article', 'aside', 'footer', 'a', 'button' ] )
86 76 ->default( 'div' )
87 - ->description( 'The HTML tag for the flexbox container. One of: div, header, section, article, aside, footer, main, nav, a (link), or button.' )
77 + ->description( 'The HTML tag for the flexbox container. Could be div, header, section, article, aside, footer, or a (link).' )
88 78 ->set_dependencies( $tag_dependencies ),
89 79 'link' => Link_Prop_Type::make(),
90 80 'attributes' => Attributes_Prop_Type::make()->meta( Overridable_Prop_Type::ignore() ),
91 81 ];
@@ -124,16 +114,8 @@
124 114 [
125 115 'value' => 'footer',
126 116 'label' => 'Footer',
127 117 ],
128 - [
129 - 'value' => 'main',
130 - 'label' => 'Main',
131 - ],
132 - [
133 - 'value' => 'nav',
134 - 'label' => 'Nav',
135 - ],
136 118 ])
137 119 ->set_label( esc_html__( 'HTML Tag', 'elementor' ) )
138 120 ->set_fallback_labels( [
139 121 'a' => 'a (link)',
@@ -197,12 +179,6 @@
197 179 $attributes = array_merge( $attributes, $link_attributes );
198 180 }
199 181
200 182 $this->add_render_attribute( '_wrapper', array_merge( $initial_attributes, $attributes ) );
201 - }
202 -
203 - protected function get_templates(): array {
204 - return [
205 - 'elementor/elements/flexbox' => __DIR__ . '/flexbox.html.twig',
206 - ];
207 183 }
208 184 }