PluginProbe
UiCore Elements – Free widgets and templates for Elementor / 1.3.17
UiCore Elements – Free widgets and templates for Elementor v1.3.17
1.3.17 1.3.16 trunk 1.0.0 1.0.1 1.0.10 1.0.11 1.0.12 1.0.13 1.0.14 1.0.15 1.0.16 1.0.2 1.0.3 1.0.4 1.0.5 1.0.6 1.0.7 1.0.8 1.0.9 1.2.0 1.2.1 1.2.2 1.2.3 1.2.4 All 41 releases
← All changes | includes/widgets/logo-grid.php +52 -49 1.2.11.3.17 View file →
@@ -1,5 +1,6 @@
1 1 <?php
2 +
2 3 namespace UiCoreElements;
3 4
4 5 use Elementor\Controls_Manager;
5 6 use UiCoreElements\UiCoreWidget;
@@ -8,9 +9,10 @@
8 9 use UiCoreElements\Utils\Logo_Trait;
9 10
10 11 defined('ABSPATH') || exit();
11 12
12 -class Logo_Grid extends UiCoreWidget {
13 +class Logo_Grid extends UiCoreWidget
14 +{
13 15
14 16 use Animation_Trait;
15 17 use Grid_Trait;
16 18 use Logo_Trait;
@@ -20,9 +22,9 @@
20 22 return 'uicore-logo-grid';
21 23 }
22 24 public function get_title()
23 25 {
24 - return esc_html__( 'Logo Grid', 'uicore-elements' );
26 + return esc_html__('Logo Grid', 'uicore-elements');
25 27 }
26 28 public function get_icon()
27 29 {
28 30 return 'eicon-logo ui-e-widget';
@@ -32,9 +34,9 @@
32 34 return ['uicore'];
33 35 }
34 36 public function get_keywords()
35 37 {
36 - return [ 'logo', 'grid', 'client', 'brand', 'showcase' ];
38 + return ['logo', 'grid', 'client', 'brand', 'showcase'];
37 39 }
38 40 public function get_styles()
39 41 {
40 42 $styles = [
@@ -42,9 +44,9 @@
42 44 'grid',
43 45 'animation', // hover animations
44 46 'entrance', // entrance basic style
45 47 ];
46 - if(!class_exists('\UiCore\Core') && !class_exists('\UiCoreAnimate\Base')){
48 + if (!class_exists('\UiCore\Core') && !class_exists('\UiCoreAnimate\Base')) {
47 49 $styles['e-animations'] = [ // entrance animations
48 50 'external' => true,
49 51 ];
50 52 }
@@ -60,12 +62,13 @@
60 62 ],
61 63 ]
62 64 ];
63 65 }
64 - // TODO: remove or set as false, after 3.30, when the full deprecation of widget innet wrapper is ready
65 - public function has_widget_inner_wrapper(): bool {
66 - return true;
67 - }
66 + public function has_widget_inner_wrapper(): bool
67 + {
68 + // TODO: remove after Optmized Markup experiment is merged to the core
69 + return ! \Elementor\Plugin::$instance->experiments->is_feature_active('e_optimized_markup');
70 + }
68 71 protected function register_controls()
69 72 {
70 73
71 74 $this->TRAIT_register_logo_repeater_controls('Logos'); // Repeater Controls
@@ -72,31 +75,31 @@
72 75
73 76 $this->start_controls_section(
74 77 'section_grid_settings',
75 78 [
76 - 'label' => __( 'Grid Settings', 'uicore-elements' ),
79 + 'label' => __('Grid Settings', 'uicore-elements'),
77 80 'tab' => Controls_Manager::TAB_CONTENT,
78 81 ]
79 82 );
80 83
81 - $this->add_control(
82 - 'layout',
83 - [
84 - 'label' => __( 'Grid Layout', 'uicore-elements' ),
85 - 'type' => Controls_Manager::SELECT,
86 - 'options' => [
87 - 'inner-border' => __( 'Inner Border', 'uicore-elements' ),
88 - 'outer-border' => __( 'Outer Border', 'uicore-elements' ),
89 - 'divider' => __( 'Inner Divider', 'uicore-elements' ),
90 - ],
91 - 'default' => 'inner-border',
92 - 'frontend_available' => true,
93 - 'style_transfer' => true, // enables the param to be copied/pasted even without selector => []
94 - 'render_type' => 'template',
95 - ]
96 - );
84 + $this->add_control(
85 + 'layout',
86 + [
87 + 'label' => __('Grid Layout', 'uicore-elements'),
88 + 'type' => Controls_Manager::SELECT,
89 + 'options' => [
90 + 'inner-border' => __('Inner Border', 'uicore-elements'),
91 + 'outer-border' => __('Outer Border', 'uicore-elements'),
92 + 'divider' => __('Inner Divider', 'uicore-elements'),
93 + ],
94 + 'default' => 'inner-border',
95 + 'frontend_available' => true,
96 + 'style_transfer' => true, // enables the param to be copied/pasted even without selector => []
97 + 'render_type' => 'template',
98 + ]
99 + );
97 100
98 - $this->TRAIT_register_grid_layout_controls();
101 + $this->TRAIT_register_grid_layout_controls();
99 102
100 103 $this->end_controls_section();
101 104
102 105 $this->start_controls_section(
@@ -101,14 +104,14 @@
101 104
102 105 $this->start_controls_section(
103 106 'section_logo_settings',
104 107 [
105 - 'label' => __( 'Logo Settings', 'uicore-elements' ),
108 + 'label' => __('Logo Settings', 'uicore-elements'),
106 109 'tab' => Controls_Manager::TAB_CONTENT,
107 110 ]
108 111 );
109 112
110 - $this->TRAIT_register_logo_adittional_controls();
113 + $this->TRAIT_register_logo_adittional_controls();
111 114
112 115 $this->end_controls_section();
113 116
114 117 $this->start_controls_section(
@@ -113,14 +116,14 @@
113 116
114 117 $this->start_controls_section(
115 118 'section_logo_grid',
116 119 [
117 - 'label' => __( 'Logo Grid', 'uicore-elements' ),
120 + 'label' => __('Logo Grid', 'uicore-elements'),
118 121 'tab' => Controls_Manager::TAB_STYLE,
119 122 ]
120 123 );
121 124
122 - $this->TRAIT_register_logos_grid_style_controls();
125 + $this->TRAIT_register_logos_grid_style_controls();
123 126
124 127 $this->end_controls_section();
125 128
126 129 $this->start_controls_section(
@@ -125,24 +128,24 @@
125 128
126 129 $this->start_controls_section(
127 130 'animation_style_grid',
128 131 [
129 - 'label' => __( 'Animations', 'uicore-elements' ),
132 + 'label' => __('Animations', 'uicore-elements'),
130 133 'tab' => Controls_Manager::TAB_STYLE,
131 134 ]
132 135 );
133 136
134 - $this->TRAIT_register_entrance_animations_controls();
135 - $this->TRAIT_register_hover_animation_control(
136 - 'Item Hover Animation',
137 - [],
138 - ['underline']
139 - );
140 - $this->TRAIT_register_hover_animation_control(
141 - 'Logo Hover Animation',
142 - [],
143 - ['underline']
144 - );
137 + $this->TRAIT_register_entrance_animations_controls();
138 + $this->TRAIT_register_hover_animation_control(
139 + 'Item Hover Animation',
140 + [],
141 + ['underline']
142 + );
143 + $this->TRAIT_register_hover_animation_control(
144 + 'Logo Hover Animation',
145 + [],
146 + ['underline']
147 + );
145 148
146 149 $this->end_controls_section();
147 150
148 151 // Updates and removes grid component controls
@@ -166,16 +169,16 @@
166 169 }
167 170 protected function render()
168 171 {
169 172
170 - if(empty( $this->get_settings_for_display('logo_list'))) {
173 + if (empty($this->get_settings_for_display('logo_list'))) {
171 174 return;
172 175 }
173 176
174 - ?>
175 - <div class='ui-e-grid'>
176 - <?php $this->TRAIT_render_logo_item(); ?>
177 - </div>
178 - <?php
177 +?>
178 + <div class='ui-e-grid'>
179 + <?php $this->TRAIT_render_logo_item(); ?>
180 + </div>
181 +<?php
179 182 }
180 183 }
181 -\Elementor\Plugin::instance()->widgets_manager->register(new Logo_Grid());
184 +\Elementor\Plugin::instance()->widgets_manager->register(new Logo_Grid());