PluginProbe
Easy Elements for Elementor – Addons & Website Templates / 1.0.7
Easy Elements for Elementor – Addons & Website Templates v1.0.7
1.5.3 1.5.2 1.5.1 1.5.0 1.4.9 1.4.6 1.4.7 1.4.8 1.4.5 1.4.4 1.4.3 1.2.7 1.2.8 1.2.9 1.3.0 1.3.1 1.3.2 1.3.3 1.3.4 1.3.5 1.3.6 1.3.7 1.3.8 1.3.9 1.4.0 All 47 releases
← All changes | widgets/process-grid/process-grid.php +541 -536 1.2.91.0.7 View file →
@@ -1,6 +1,5 @@
1 1 <?php
2 -namespace Easyel\EasyElements\Widgets;
3 2 use Elementor\Repeater;
4 3 use Elementor\Utils;
5 4 use Elementor\Controls_Manager;
6 5 use Elementor\Responsive_Control;
@@ -7,607 +6,613 @@
7 6 use Elementor\Group_Control_Image_Size;
8 7 use Elementor\Group_Control_Box_Shadow;
9 8 use Elementor\Group_Control_Typography;
10 9 defined( 'ABSPATH' ) || die();
10 +if ( ! class_exists( 'Easyel_Process_Widget' ) ) {
11 + class Easyel_Process_Widget extends \Elementor\Widget_Base {
11 12
12 -class Easyel_Process_Grid_Widget extends \Elementor\Widget_Base {
13 + public function get_style_depends() {
14 + $handle = 'eel-process';
15 + $css_path = plugin_dir_path( __FILE__ ) . 'css/process.css';
16 +
17 + if ( ! wp_style_is( $handle, 'registered' ) && file_exists( $css_path ) ) {
18 + wp_register_style( $handle, plugins_url( 'css/process.css', __FILE__ ), [], defined( 'WP_DEBUG' ) && WP_DEBUG ? filemtime( $css_path ) : '1.0.0' );
19 + }
13 20
14 - public function get_name() {
15 - return 'eel-process';
16 - }
21 + return [ $handle ];
22 + }
17 23
18 - public function get_title() {
19 - return esc_html__( 'Process Grid', 'easy-elements' );
20 - }
24 + public function get_name() {
25 + return 'eel-process';
26 + }
21 27
22 - public function get_icon() {
23 - return 'easyicon easyelIcon-process-grid';
24 - }
28 + public function get_title() {
29 + return esc_html__( 'Process Grid', 'easy-elements' );
30 + }
25 31
26 - public function get_categories() {
27 - return [ 'easyelements_category' ];
28 - }
32 + public function get_icon() {
33 + return 'easyicon easyelIcon-process-grid';
34 + }
29 35
30 - public function get_keywords() {
31 - return [ 'process', 'sevice', 'icon', 'process-box', 'text' ];
32 - }
36 + public function get_categories() {
37 + return [ 'easyelements_category' ];
38 + }
33 39
34 - public function get_style_depends() {
35 - return [
36 - 'eel-process',
37 - ];
38 - }
40 + public function get_keywords() {
41 + return [ 'process', 'sevice', 'icon', 'process-box', 'text' ];
42 + }
39 43
44 + protected function register_controls() {
45 + $this->start_controls_section(
46 + '_section_logo',
47 + [
48 + 'label' => esc_html__( 'Icon Box Settings', 'easy-elements' ),
49 + 'tab' => Controls_Manager::TAB_CONTENT,
50 + ]
51 + );
40 52
41 - protected function register_controls() {
42 - $this->start_controls_section(
43 - '_section_logo',
44 - [
45 - 'label' => esc_html__( 'Process Grid Settings', 'easy-elements' ),
46 - 'tab' => Controls_Manager::TAB_CONTENT,
47 - ]
48 - );
53 + $repeater = new Repeater();
49 54
50 - $repeater = new Repeater();
55 + $repeater->add_control(
56 + 'icon',
57 + [
58 + 'label' => esc_html__( 'Icon', 'easy-elements' ),
59 + 'type' => \Elementor\Controls_Manager::ICONS,
60 + 'label_block' => true,
61 + 'default' => [
62 + 'value' => 'fas fa-star',
63 + 'library' => 'fa-solid',
64 + ],
65 + ]
66 + );
51 67
52 - $repeater->add_control(
53 - 'icon',
54 - [
55 - 'label' => esc_html__( 'Icon', 'easy-elements' ),
56 - 'type' => \Elementor\Controls_Manager::ICONS,
57 - 'label_block' => true,
58 - 'default' => [
59 - 'value' => 'fas fa-star',
60 - 'library' => 'fa-solid',
61 - ],
62 - ]
63 - );
68 + $repeater->add_control(
69 + '_title',
70 + [
71 + 'label' => esc_html__( 'Title', 'easy-elements' ),
72 + 'type' => \Elementor\Controls_Manager::TEXT,
73 + 'default' => esc_html__( 'Manufacturing Industrial', 'easy-elements' ),
74 + 'label_block' => true,
75 + ]
76 + );
64 77
65 - $repeater->add_control(
66 - '_title',
67 - [
68 - 'label' => esc_html__( 'Title', 'easy-elements' ),
69 - 'type' => \Elementor\Controls_Manager::TEXT,
70 - 'default' => esc_html__( 'Manufacturing Industrial', 'easy-elements' ),
71 - 'label_block' => true,
72 - ]
73 - );
78 + $repeater->add_control(
79 + '_description',
80 + [
81 + 'label' => esc_html__( 'Description', 'easy-elements' ),
82 + 'type' => \Elementor\Controls_Manager::TEXTAREA,
83 + 'default' => esc_html__( 'Optimizing production and supply chain operations and generational transitions', 'easy-elements' ),
84 + ]
85 + );
74 86
75 - $repeater->add_control(
76 - '_description',
77 - [
78 - 'label' => esc_html__( 'Description', 'easy-elements' ),
79 - 'type' => \Elementor\Controls_Manager::TEXTAREA,
80 - 'default' => esc_html__( 'Optimizing production and supply chain operations and generational transitions', 'easy-elements' ),
81 - ]
82 - );
87 + $repeater->add_control(
88 + 'link',
89 + [
90 + 'label' => esc_html__('Link', 'easy-elements'),
91 + 'type' => Controls_Manager::URL,
92 + 'placeholder' => 'https://example.com',
93 + ]
94 + );
95 + $repeater->add_control(
96 + 'process_number_or_icon',
97 + [
98 + 'label' => esc_html__('Process Number or Icon', 'easy-elements'),
99 + 'type' => \Elementor\Controls_Manager::SELECT,
100 + 'options' => [
101 + 'p_number' => esc_html__('Process Number', 'easy-elements'),
102 + 'p_icon' => esc_html__('Process Icon', 'easy-elements'),
103 + ],
104 + 'default' => 'p_number',
105 + ]
106 + );
107 + $repeater->add_control(
108 + 'process_number',
109 + [
110 + 'label' => esc_html__( 'Process Number', 'easy-elements' ),
111 + 'type' => \Elementor\Controls_Manager::TEXT,
112 + 'default' => '1',
113 + 'placeholder' => 'Enter a number',
114 + 'condition' => [
115 + 'process_number_or_icon' => 'p_number',
116 + ],
117 + ]
118 + );
119 + $repeater->add_control(
120 + 'process_icon',
121 + [
122 + 'label' => esc_html__( 'Process Icon', 'easy-elements' ),
123 + 'type' => \Elementor\Controls_Manager::ICONS,
124 + 'label_block' => true,
125 + 'default' => [
126 + 'value' => 'fas fa-long-arrow-alt-right',
127 + 'library' => 'fa-solid',
128 + ],
129 + 'condition' => [
130 + 'process_number_or_icon' => 'p_icon',
131 + ],
132 + ]
133 + );
83 134
84 - $repeater->add_control(
85 - 'link',
86 - [
87 - 'label' => esc_html__('Link', 'easy-elements'),
88 - 'type' => Controls_Manager::URL,
89 - 'placeholder' => 'https://example.com',
90 - ]
91 - );
92 - $repeater->add_control(
93 - 'process_number_or_icon',
94 - [
95 - 'label' => esc_html__('Process Number or Icon', 'easy-elements'),
96 - 'type' => \Elementor\Controls_Manager::SELECT,
97 - 'options' => [
98 - 'p_number' => esc_html__('Process Number', 'easy-elements'),
99 - 'p_icon' => esc_html__('Process Icon', 'easy-elements'),
100 - ],
101 - 'default' => 'p_number',
102 - ]
103 - );
104 - $repeater->add_control(
105 - 'process_number',
106 - [
107 - 'label' => esc_html__( 'Process Number', 'easy-elements' ),
108 - 'type' => \Elementor\Controls_Manager::TEXT,
109 - 'default' => '1',
110 - 'placeholder' => 'Enter a number',
111 - 'condition' => [
112 - 'process_number_or_icon' => 'p_number',
113 - ],
114 - ]
115 - );
116 - $repeater->add_control(
117 - 'process_icon',
118 - [
119 - 'label' => esc_html__( 'Process Icon', 'easy-elements' ),
120 - 'type' => \Elementor\Controls_Manager::ICONS,
121 - 'label_block' => true,
122 - 'default' => [
123 - 'value' => 'fas fa-long-arrow-alt-right',
124 - 'library' => 'fa-solid',
125 - ],
126 - 'condition' => [
127 - 'process_number_or_icon' => 'p_icon',
128 - ],
129 - ]
130 - );
131 135
136 + $this->add_control(
137 + 'easy_icon_box',
138 + [
139 + 'type' => Controls_Manager::REPEATER,
140 + 'fields' => $repeater->get_controls(),
141 + 'title_field' => '{{{ _title }}}',
142 + 'default' => [
143 + [
144 + 'icon' => [
145 + 'value' => 'fas fa-heart',
146 + 'library' => 'fa-solid',
147 + ],
148 + '_title' => esc_html__( 'Manufacturing Industrial', 'easy-elements' ),
149 + '_description' => esc_html__( 'Optimizing production and supply chain operations and generational transitions', 'easy-elements' ),
150 + 'link' => ['url' => ''],
151 + ],
152 + [
153 + 'icon' => [
154 + 'value' => 'fas fa-heart',
155 + 'library' => 'fa-solid',
156 + ],
157 + '_title' => esc_html__( 'Professional Services', 'easy-elements' ),
158 + '_description' => esc_html__( 'Growth strategies for knowledge-based businesses with strategic guidance throughout', 'easy-elements' ),
159 + 'link' => ['url' => ''],
160 + ],
161 + [
162 + 'icon' => [
163 + 'value' => 'fas fa-heart',
164 + 'library' => 'fa-solid',
165 + ],
166 + '_title' => esc_html__( 'Technology & SaaS', 'easy-elements' ),
167 + '_description' => esc_html__( 'Scaling strategies for rapid growth and market leadership expertise for companies facing challenges', 'easy-elements' ),
168 + 'link' => ['url' => ''],
169 + ],
170 + ],
171 + ]
172 + );
132 173
133 - $this->add_control(
134 - 'easy_icon_box',
135 - [
136 - 'type' => Controls_Manager::REPEATER,
137 - 'fields' => $repeater->get_controls(),
138 - 'title_field' => '{{{ _title }}}',
139 - 'default' => [
140 - [
141 - 'icon' => [
142 - 'value' => 'fas fa-heart',
143 - 'library' => 'fa-solid',
174 + $this->add_control(
175 + 'icon_direction',
176 + [
177 + 'label' => esc_html__( 'Direction', 'easy-elements' ),
178 + 'type' => \Elementor\Controls_Manager::CHOOSE,
179 + 'default' => 'top',
180 + 'options' => [
181 + 'left' => [
182 + 'title' => esc_html__( 'Left', 'easy-elements' ),
183 + 'icon' => 'eicon-h-align-left',
144 184 ],
145 - '_title' => esc_html__( 'Manufacturing Industrial', 'easy-elements' ),
146 - '_description' => esc_html__( 'Optimizing production and supply chain operations and generational transitions', 'easy-elements' ),
147 - 'link' => ['url' => ''],
148 - ],
149 - [
150 - 'icon' => [
151 - 'value' => 'fas fa-heart',
152 - 'library' => 'fa-solid',
185 + 'top' => [
186 + 'title' => esc_html__( 'Top', 'easy-elements' ),
187 + 'icon' => 'eicon-v-align-top',
153 188 ],
154 - '_title' => esc_html__( 'Professional Services', 'easy-elements' ),
155 - '_description' => esc_html__( 'Growth strategies for knowledge-based businesses with strategic guidance throughout', 'easy-elements' ),
156 - 'link' => ['url' => ''],
157 - ],
158 - [
159 - 'icon' => [
160 - 'value' => 'fas fa-heart',
161 - 'library' => 'fa-solid',
189 + 'right' => [
190 + 'title' => esc_html__( 'Right', 'easy-elements' ),
191 + 'icon' => 'eicon-h-align-right',
162 192 ],
163 - '_title' => esc_html__( 'Technology & SaaS', 'easy-elements' ),
164 - '_description' => esc_html__( 'Scaling strategies for rapid growth and market leadership expertise for companies facing challenges', 'easy-elements' ),
165 - 'link' => ['url' => ''],
166 193 ],
167 - ],
168 - ]
169 - );
194 + 'toggle' => false,
195 + ]
196 + );
170 197
171 - $this->add_control(
172 - 'icon_direction',
173 - [
174 - 'label' => esc_html__( 'Direction', 'easy-elements' ),
175 - 'type' => \Elementor\Controls_Manager::CHOOSE,
176 - 'default' => 'top',
177 - 'options' => [
178 - 'left' => [
179 - 'title' => esc_html__( 'Left', 'easy-elements' ),
180 - 'icon' => 'eicon-h-align-left',
198 + $this->add_responsive_control(
199 + '_text_align',
200 + [
201 + 'label' => esc_html__( 'Alignment', 'easy-elements' ),
202 + 'type' => \Elementor\Controls_Manager::CHOOSE,
203 + 'options' => [
204 + 'left' => [
205 + 'title' => esc_html__( 'Left', 'easy-elements' ),
206 + 'icon' => 'eicon-text-align-left',
207 + ],
208 + 'center' => [
209 + 'title' => esc_html__( 'Center', 'easy-elements' ),
210 + 'icon' => 'eicon-text-align-center',
211 + ],
212 + 'right' => [
213 + 'title' => esc_html__( 'Right', 'easy-elements' ),
214 + 'icon' => 'eicon-text-align-right',
215 + ],
181 216 ],
182 - 'top' => [
183 - 'title' => esc_html__( 'Top', 'easy-elements' ),
184 - 'icon' => 'eicon-v-align-top',
217 + 'default' => 'center',
218 + 'selectors' => [
219 + '{{WRAPPER}} .ee--icon-box' => 'text-align: {{VALUE}};',
185 220 ],
186 - 'right' => [
187 - 'title' => esc_html__( 'Right', 'easy-elements' ),
188 - 'icon' => 'eicon-h-align-right',
221 + ]
222 + );
223 +
224 + $this->add_control(
225 + 'title_tag',
226 + [
227 + 'label' => esc_html__( 'Title HTML Tag', 'easy-elements' ),
228 + 'type' => \Elementor\Controls_Manager::SELECT,
229 + 'default' => 'h3',
230 + 'options' => [
231 + 'h1' => 'H1',
232 + 'h2' => 'H2',
233 + 'h3' => 'H3',
234 + 'h4' => 'H4',
235 + 'h5' => 'H5',
236 + 'h6' => 'H6',
237 + 'div' => 'div',
238 + 'span' => 'span',
239 + 'p' => 'p',
189 240 ],
190 - ],
191 - 'toggle' => false,
192 - ]
193 - );
241 + ]
242 + );
194 243
195 - $this->add_responsive_control(
196 - '_text_align',
197 - [
198 - 'label' => esc_html__( 'Alignment', 'easy-elements' ),
199 - 'type' => \Elementor\Controls_Manager::CHOOSE,
200 - 'options' => [
201 - 'left' => [
202 - 'title' => esc_html__( 'Left', 'easy-elements' ),
203 - 'icon' => 'eicon-text-align-left',
244 + $this->add_responsive_control(
245 + 'columns',
246 + [
247 + 'label' => esc_html__( 'Select Columns', 'easy-elements' ),
248 + 'type' => Controls_Manager::SELECT,
249 + 'default' => '3',
250 + 'tablet_default' => '3',
251 + 'mobile_default' => '2',
252 + 'options' => [
253 + '1' => '1 Column',
254 + '2' => '2 Columns',
255 + '3' => '3 Columns',
256 + '4' => '4 Columns',
257 + '5' => '5 Columns',
258 + '6' => '6 Columns',
204 259 ],
205 - 'center' => [
206 - 'title' => esc_html__( 'Center', 'easy-elements' ),
207 - 'icon' => 'eicon-text-align-center',
260 + 'selectors' => [
261 + '{{WRAPPER}} .eel-icon-box-wrap .eel-icon-item' => 'width: calc(100% / {{VALUE}});',
208 262 ],
209 - 'right' => [
210 - 'title' => esc_html__( 'Right', 'easy-elements' ),
211 - 'icon' => 'eicon-text-align-right',
212 - ],
213 - ],
214 - 'default' => 'center',
215 - 'selectors' => [
216 - '{{WRAPPER}} .ee--icon-box' => 'text-align: {{VALUE}};',
217 - ],
218 - ]
219 - );
263 + ]
264 + );
220 265
221 - $this->add_control(
222 - 'title_tag',
223 - [
224 - 'label' => esc_html__( 'Title HTML Tag', 'easy-elements' ),
225 - 'type' => \Elementor\Controls_Manager::SELECT,
226 - 'default' => 'h3',
227 - 'options' => [
228 - 'h1' => 'H1',
229 - 'h2' => 'H2',
230 - 'h3' => 'H3',
231 - 'h4' => 'H4',
232 - 'h5' => 'H5',
233 - 'h6' => 'H6',
234 - 'div' => 'div',
235 - 'span' => 'span',
236 - 'p' => 'p',
237 - ],
238 - ]
239 - );
240 266
241 - $this->add_responsive_control(
242 - 'columns',
243 - [
244 - 'label' => esc_html__( 'Select Columns', 'easy-elements' ),
245 - 'type' => Controls_Manager::SELECT,
246 - 'default' => '3',
247 - 'tablet_default' => '3',
248 - 'mobile_default' => '2',
249 - 'options' => [
250 - '1' => '1 Column',
251 - '2' => '2 Columns',
252 - '3' => '3 Columns',
253 - '4' => '4 Columns',
254 - '5' => '5 Columns',
255 - '6' => '6 Columns',
256 - ],
257 - 'selectors' => [
258 - '{{WRAPPER}} .eel-icon-box-wrap .eel-icon-item' => 'width: calc(100% / {{VALUE}});',
259 - ],
260 - ]
261 - );
267 + $this->add_responsive_control(
268 + 'item_padding',
269 + [
270 + 'label' => esc_html__( 'Space', 'easy-elements' ),
271 + 'type' => Controls_Manager::DIMENSIONS,
272 + 'size_units' => [ 'px', 'em', '%' ],
273 + 'selectors' => [
274 + '{{WRAPPER}} .eel-icon-box-wrap .eel-icon-item' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
275 + ],
276 + ]
277 + );
262 278
279 + $this->end_controls_section();
263 280
264 - $this->add_responsive_control(
265 - 'item_padding',
266 - [
267 - 'label' => esc_html__( 'Space', 'easy-elements' ),
268 - 'type' => Controls_Manager::DIMENSIONS,
269 - 'size_units' => [ 'px', 'em', '%' ],
270 - 'selectors' => [
271 - '{{WRAPPER}} .eel-icon-box-wrap .eel-icon-item' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
272 - ],
273 - ]
274 - );
281 + $this->start_controls_section(
282 + 'section_style_icon_box',
283 + [
284 + 'label' => esc_html__( 'Box Style', 'easy-elements' ),
285 + 'tab' => Controls_Manager::TAB_STYLE,
286 + ]
287 + );
275 288
276 - $this->end_controls_section();
289 + $this->add_control(
290 + 'box_background_color',
291 + [
292 + 'label' => esc_html__( 'Background Color', 'easy-elements' ),
293 + 'type' => Controls_Manager::COLOR,
294 + 'selectors' => [
295 + '{{WRAPPER}} .eel-icon-item .ee--icon-box' => 'background-color: {{VALUE}};',
296 + ],
297 + ]
298 + );
277 299
278 - $this->start_controls_section(
279 - 'section_style_icon_box',
280 - [
281 - 'label' => esc_html__( 'Box Style', 'easy-elements' ),
282 - 'tab' => Controls_Manager::TAB_STYLE,
283 - ]
284 - );
300 + $this->add_responsive_control(
301 + 'item_padding_inner',
302 + [
303 + 'label' => esc_html__( 'Padding', 'easy-elements' ),
304 + 'type' => Controls_Manager::DIMENSIONS,
305 + 'size_units' => [ 'px', 'em', '%' ],
306 + 'selectors' => [
307 + '{{WRAPPER}} .eel-icon-box-wrap .eel-icon-item .ee--icon-box' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
308 + ],
309 + ]
310 + );
285 311
286 - $this->add_control(
287 - 'box_background_color',
288 - [
289 - 'label' => esc_html__( 'Background Color', 'easy-elements' ),
290 - 'type' => Controls_Manager::COLOR,
291 - 'selectors' => [
292 - '{{WRAPPER}} .eel-icon-item .ee--icon-box' => 'background-color: {{VALUE}};',
293 - ],
294 - ]
295 - );
312 + $this->add_group_control(
313 + \Elementor\Group_Control_Border::get_type(),
314 + [
315 + 'name' => 'item_border',
316 + 'selector' => '{{WRAPPER}} .ee--icon-box',
317 + ]
318 + );
296 319
297 - $this->add_responsive_control(
298 - 'item_padding_inner',
299 - [
300 - 'label' => esc_html__( 'Padding', 'easy-elements' ),
301 - 'type' => Controls_Manager::DIMENSIONS,
302 - 'size_units' => [ 'px', 'em', '%' ],
303 - 'selectors' => [
304 - '{{WRAPPER}} .eel-icon-box-wrap .eel-icon-item .ee--icon-box' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
305 - ],
306 - ]
307 - );
320 + $this->add_control(
321 + 'item__border_radius',
322 + [
323 + 'label' => esc_html__( 'Border Radius', 'easy-elements' ),
324 + 'type' => \Elementor\Controls_Manager::DIMENSIONS,
325 + 'size_units' => [ 'px', '%' ],
326 + 'selectors' => [
327 + '{{WRAPPER}} .eel-icon-box-wrap .eel-icon-item .ee--icon-box' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
328 + ],
329 + ]
330 + );
331 + $this->add_group_control(
332 + \Elementor\Group_Control_Box_Shadow::get_type(),
333 + [
334 + 'name' => 'item_box_shadow',
335 + 'selector' => '{{WRAPPER}} .eel-icon-box-wrap .ee--icon-box',
336 + ]
337 + );
308 338
309 - $this->add_group_control(
310 - \Elementor\Group_Control_Border::get_type(),
311 - [
312 - 'name' => 'item_border',
313 - 'selector' => '{{WRAPPER}} .ee--icon-box',
314 - ]
315 - );
339 + $this->end_controls_section();
316 340
317 - $this->add_control(
318 - 'item__border_radius',
319 - [
320 - 'label' => esc_html__( 'Border Radius', 'easy-elements' ),
321 - 'type' => \Elementor\Controls_Manager::DIMENSIONS,
322 - 'size_units' => [ 'px', '%' ],
323 - 'selectors' => [
324 - '{{WRAPPER}} .eel-icon-box-wrap .eel-icon-item .ee--icon-box' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
325 - ],
326 - ]
327 - );
328 - $this->add_group_control(
329 - \Elementor\Group_Control_Box_Shadow::get_type(),
330 - [
331 - 'name' => 'item_box_shadow',
332 - 'selector' => '{{WRAPPER}} .eel-icon-box-wrap .ee--icon-box',
333 - ]
334 - );
341 + $this->start_controls_section(
342 + 'section_style_icon',
343 + [
344 + 'label' => esc_html__( 'Icon', 'easy-elements' ),
345 + 'tab' => Controls_Manager::TAB_STYLE,
346 + ]
347 + );
335 348
336 - $this->end_controls_section();
349 + $this->add_control(
350 + 'icon_color',
351 + [
352 + 'label' => esc_html__( 'Color', 'easy-elements' ),
353 + 'type' => Controls_Manager::COLOR,
354 + 'selectors' => [
355 + '{{WRAPPER}} .ee--icon-box .eel-icon' => 'color: {{VALUE}};',
356 + '{{WRAPPER}} .ee--icon-box .eel-icon svg' => 'fill: {{VALUE}};',
357 + '{{WRAPPER}} .ee--icon-box .eel-icon svg path' => 'fill: {{VALUE}};',
358 + ],
359 + ]
360 + );
337 361
338 - $this->start_controls_section(
339 - 'section_style_icon',
340 - [
341 - 'label' => esc_html__( 'Icon', 'easy-elements' ),
342 - 'tab' => Controls_Manager::TAB_STYLE,
343 - ]
344 - );
362 + $this->add_control(
363 + 'icon_bg_color',
364 + [
365 + 'label' => esc_html__( 'Background', 'easy-elements' ),
366 + 'type' => Controls_Manager::COLOR,
367 + 'selectors' => [
368 + '{{WRAPPER}} .ee--icon-box .eel-icon' => 'background-color: {{VALUE}};',
369 + ],
370 + ]
371 + );
345 372
346 - $this->add_control(
347 - 'icon_color',
348 - [
349 - 'label' => esc_html__( 'Color', 'easy-elements' ),
350 - 'type' => Controls_Manager::COLOR,
351 - 'selectors' => [
352 - '{{WRAPPER}} .ee--icon-box .eel-icon' => 'color: {{VALUE}};',
353 - '{{WRAPPER}} .ee--icon-box .eel-icon svg' => 'fill: {{VALUE}};',
354 - '{{WRAPPER}} .ee--icon-box .eel-icon svg path' => 'fill: {{VALUE}};',
355 - ],
356 - ]
357 - );
373 + $this->add_group_control(
374 + \Elementor\Group_Control_Typography::get_type(),
375 + [
376 + 'name' => 'icon_typography',
377 + 'label' => esc_html__( 'Icon Typography', 'easy-elements' ),
378 + 'selector' => '{{WRAPPER}} .ee--icon-box .eel-icon',
379 + ]
380 + );
358 381
359 - $this->add_control(
360 - 'icon_bg_color',
361 - [
362 - 'label' => esc_html__( 'Background', 'easy-elements' ),
363 - 'type' => Controls_Manager::COLOR,
364 - 'selectors' => [
365 - '{{WRAPPER}} .ee--icon-box .eel-icon' => 'background-color: {{VALUE}};',
366 - ],
367 - ]
368 - );
382 + $this->add_group_control(
383 + \Elementor\Group_Control_Border::get_type(),
384 + [
385 + 'name' => 'icon_border',
386 + 'selector' => '{{WRAPPER}} .ee--icon-box .eel-icon',
387 + ]
388 + );
369 389
370 - $this->add_group_control(
371 - \Elementor\Group_Control_Typography::get_type(),
372 - [
373 - 'name' => 'icon_typography',
374 - 'label' => esc_html__( 'Icon Typography', 'easy-elements' ),
375 - 'selector' => '{{WRAPPER}} .ee--icon-box .eel-icon',
376 - ]
377 - );
390 + $this->add_control(
391 + 'icon__border_radius',
392 + [
393 + 'label' => esc_html__( 'Border Radius', 'easy-elements' ),
394 + 'type' => \Elementor\Controls_Manager::DIMENSIONS,
395 + 'size_units' => [ 'px', '%' ],
396 + 'selectors' => [
397 + '{{WRAPPER}} .ee--icon-box .eel-icon' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
398 + ],
399 + ]
400 + );
378 401
379 - $this->add_group_control(
380 - \Elementor\Group_Control_Border::get_type(),
381 - [
382 - 'name' => 'icon_border',
383 - 'selector' => '{{WRAPPER}} .ee--icon-box .eel-icon',
384 - ]
385 - );
402 + $this->end_controls_section();
386 403
387 - $this->add_control(
388 - 'icon__border_radius',
389 - [
390 - 'label' => esc_html__( 'Border Radius', 'easy-elements' ),
391 - 'type' => \Elementor\Controls_Manager::DIMENSIONS,
392 - 'size_units' => [ 'px', '%' ],
393 - 'selectors' => [
394 - '{{WRAPPER}} .ee--icon-box .eel-icon' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
395 - ],
396 - ]
397 - );
404 + $this->start_controls_section(
405 + 'section_style_title',
406 + [
407 + 'label' => esc_html__( 'Title', 'easy-elements' ),
408 + 'tab' => Controls_Manager::TAB_STYLE,
409 + ]
410 + );
398 411
399 - $this->end_controls_section();
412 + $this->add_control(
413 + 'title_color',
414 + [
415 + 'label' => esc_html__( 'Color', 'easy-elements' ),
416 + 'type' => Controls_Manager::COLOR,
417 + 'selectors' => [
418 + '{{WRAPPER}} .icon-box-title' => 'color: {{VALUE}};',
419 + ],
420 + ]
421 + );
400 422
401 - $this->start_controls_section(
402 - 'section_style_title',
403 - [
404 - 'label' => esc_html__( 'Title', 'easy-elements' ),
405 - 'tab' => Controls_Manager::TAB_STYLE,
406 - ]
407 - );
423 + $this->add_group_control(
424 + \Elementor\Group_Control_Typography::get_type(),
425 + [
426 + 'name' => 'box_title_typography',
427 + 'label' => esc_html__( 'Typography', 'easy-elements' ),
428 + 'selector' => '{{WRAPPER}} .icon-box-title',
429 + ]
430 + );
408 431
409 - $this->add_control(
410 - 'title_color',
411 - [
412 - 'label' => esc_html__( 'Color', 'easy-elements' ),
413 - 'type' => Controls_Manager::COLOR,
414 - 'selectors' => [
415 - '{{WRAPPER}} .icon-box-title' => 'color: {{VALUE}};',
416 - ],
417 - ]
418 - );
432 + $this->add_responsive_control(
433 + 'title_margin',
434 + [
435 + 'label' => esc_html__( 'Margin', 'easy-elements' ),
436 + 'type' => \Elementor\Controls_Manager::DIMENSIONS,
437 + 'size_units' => [ 'px', 'em', '%' ],
438 + 'selectors' => [
439 + '{{WRAPPER}} .icon-box-title' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
440 + ],
441 + ]
442 + );
419 443
420 - $this->add_group_control(
421 - \Elementor\Group_Control_Typography::get_type(),
422 - [
423 - 'name' => 'box_title_typography',
424 - 'label' => esc_html__( 'Typography', 'easy-elements' ),
425 - 'selector' => '{{WRAPPER}} .icon-box-title',
426 - ]
427 - );
444 + $this->end_controls_section();
428 445
429 - $this->add_responsive_control(
430 - 'title_margin',
431 - [
432 - 'label' => esc_html__( 'Margin', 'easy-elements' ),
433 - 'type' => \Elementor\Controls_Manager::DIMENSIONS,
434 - 'size_units' => [ 'px', 'em', '%' ],
435 - 'selectors' => [
436 - '{{WRAPPER}} .icon-box-title' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
437 - ],
438 - ]
439 - );
446 + $this->start_controls_section(
447 + 'section_style_description',
448 + [
449 + 'label' => esc_html__( 'Description', 'easy-elements' ),
450 + 'tab' => Controls_Manager::TAB_STYLE,
451 + ]
452 + );
440 453
441 - $this->end_controls_section();
454 + $this->add_control(
455 + 'desc_color',
456 + [
457 + 'label' => esc_html__( 'Color', 'easy-elements' ),
458 + 'type' => Controls_Manager::COLOR,
459 + 'selectors' => [
460 + '{{WRAPPER}} .icon-box-description' => 'color: {{VALUE}};',
461 + ],
462 + ]
463 + );
442 464
443 - $this->start_controls_section(
444 - 'section_style_description',
445 - [
446 - 'label' => esc_html__( 'Description', 'easy-elements' ),
447 - 'tab' => Controls_Manager::TAB_STYLE,
448 - ]
449 - );
450 465
451 - $this->add_control(
452 - 'desc_color',
453 - [
454 - 'label' => esc_html__( 'Color', 'easy-elements' ),
455 - 'type' => Controls_Manager::COLOR,
456 - 'selectors' => [
457 - '{{WRAPPER}} .icon-box-description' => 'color: {{VALUE}};',
458 - ],
459 - ]
460 - );
466 + $this->add_group_control(
467 + \Elementor\Group_Control_Typography::get_type(),
468 + [
469 + 'name' => 'box_desc_typography',
470 + 'label' => esc_html__( 'Typography', 'easy-elements' ),
471 + 'selector' => '{{WRAPPER}} .icon-box-description',
472 + ]
473 + );
461 474
462 475
463 - $this->add_group_control(
464 - \Elementor\Group_Control_Typography::get_type(),
465 - [
466 - 'name' => 'box_desc_typography',
467 - 'label' => esc_html__( 'Typography', 'easy-elements' ),
468 - 'selector' => '{{WRAPPER}} .icon-box-description',
469 - ]
470 - );
476 + $this->end_controls_section();
471 477
472 -
473 - $this->end_controls_section();
474 -
475 - $this->start_controls_section(
476 - 'section_process_number',
477 - [
478 - 'label' => esc_html__( 'Number', 'easy-elements' ),
479 - 'tab' => Controls_Manager::TAB_STYLE,
480 - ]
481 - );
482 - $this->add_control(
483 - 'process_number_color',
484 - [
485 - 'label' => esc_html__( 'Color', 'easy-elements' ),
486 - 'type' => \Elementor\Controls_Manager::COLOR,
487 - 'selectors' => [
488 - '{{WRAPPER}} .eel-process-number' => 'background-image:linear-gradient(180deg, {{VALUE}} 0%, rgba(255, 255, 255, 0.24) 100%);',
489 - ],
490 - ]
491 - );
492 - $this->add_group_control(
493 - Group_Control_Typography::get_type(),
494 - [
495 - 'name' => 'number_typography',
496 - 'label' => esc_html__('Number Typography', 'easy-elements'),
497 - 'selector' => '{{WRAPPER}} .eel-process-number',
498 - ]
499 - );
500 - $this->add_responsive_control(
501 - 'process_number_opacity',
502 - [
503 - 'label' => esc_html__( 'Opacity', 'easy-elements' ),
504 - 'type' => \Elementor\Controls_Manager::SLIDER,
505 - 'range' => [
506 - 'px' => [
507 - 'min' => 0, 'max' => 1, 'step' => 0.1,
478 + $this->start_controls_section(
479 + 'section_process_number',
480 + [
481 + 'label' => esc_html__( 'Number', 'easy-elements' ),
482 + 'tab' => Controls_Manager::TAB_STYLE,
483 + ]
484 + );
485 + $this->add_control(
486 + 'process_number_color',
487 + [
488 + 'label' => esc_html__( 'Color', 'easy-elements' ),
489 + 'type' => \Elementor\Controls_Manager::COLOR,
490 + 'selectors' => [
491 + '{{WRAPPER}} .eel-process-number' => 'background-image:linear-gradient(180deg, {{VALUE}} 0%, rgba(255, 255, 255, 0.24) 100%);',
508 492 ],
509 - ],
510 - 'selectors' => [
511 - '{{WRAPPER}} .eel-process-number' => 'opacity: {{SIZE}};',
512 - ],
513 - ]
514 - );
515 - $this->add_responsive_control(
516 - 'process_number_offset',
517 - [
518 - 'label' => esc_html__( 'Number Vertical Position', 'easy-elements' ),
519 - 'type' => \Elementor\Controls_Manager::SLIDER,
520 - 'size_units' => [ 'px', '%' ],
521 - 'range' => [
522 - 'px' => [ 'min' => -500, 'max' => 500 ],
523 - '%' => [ 'min' => -100, 'max' => 100 ],
524 - ],
525 - 'selectors' => [
526 - '{{WRAPPER}} .eel-process-number' => 'bottom: {{SIZE}}{{UNIT}};',
527 - ],
528 - ]
529 - );
530 - $this->add_responsive_control(
531 - 'process_number_offset_horizontal',
532 - [
533 - 'label' => esc_html__( 'Number Horizontal Position', 'easy-elements' ),
534 - 'type' => \Elementor\Controls_Manager::SLIDER,
535 - 'size_units' => [ 'px', '%' ],
536 - 'range' => [
537 - 'px' => [ 'min' => -500, 'max' => 500 ],
538 - '%' => [ 'min' => -100, 'max' => 100 ],
539 - ],
540 - 'selectors' => [
541 - '{{WRAPPER}} .eel-process-number' => 'left: {{SIZE}}{{UNIT}};',
542 - ],
543 - ]
544 - );
545 - $this->end_controls_section();
546 - }
493 + ]
494 + );
495 + $this->add_group_control(
496 + Group_Control_Typography::get_type(),
497 + [
498 + 'name' => 'number_typography',
499 + 'label' => esc_html__('Number Typography', 'easy-elements'),
500 + 'selector' => '{{WRAPPER}} .eel-process-number',
501 + ]
502 + );
503 + $this->add_responsive_control(
504 + 'process_number_opacity',
505 + [
506 + 'label' => esc_html__( 'Opacity', 'easy-elements' ),
507 + 'type' => \Elementor\Controls_Manager::SLIDER,
508 + 'range' => [
509 + 'px' => [
510 + 'min' => 0, 'max' => 1, 'step' => 0.1,
511 + ],
512 + ],
513 + 'selectors' => [
514 + '{{WRAPPER}} .eel-process-number' => 'opacity: {{SIZE}};',
515 + ],
516 + ]
517 + );
518 + $this->add_responsive_control(
519 + 'process_number_offset',
520 + [
521 + 'label' => esc_html__( 'Number Vertical Position', 'easy-elements' ),
522 + 'type' => \Elementor\Controls_Manager::SLIDER,
523 + 'size_units' => [ 'px', '%' ],
524 + 'range' => [
525 + 'px' => [ 'min' => -500, 'max' => 500 ],
526 + '%' => [ 'min' => -100, 'max' => 100 ],
527 + ],
528 + 'selectors' => [
529 + '{{WRAPPER}} .eel-process-number' => 'bottom: {{SIZE}}{{UNIT}};',
530 + ],
531 + ]
532 + );
533 + $this->add_responsive_control(
534 + 'process_number_offset_horizontal',
535 + [
536 + 'label' => esc_html__( 'Number Horizontal Position', 'easy-elements' ),
537 + 'type' => \Elementor\Controls_Manager::SLIDER,
538 + 'size_units' => [ 'px', '%' ],
539 + 'range' => [
540 + 'px' => [ 'min' => -500, 'max' => 500 ],
541 + '%' => [ 'min' => -100, 'max' => 100 ],
542 + ],
543 + 'selectors' => [
544 + '{{WRAPPER}} .eel-process-number' => 'left: {{SIZE}}{{UNIT}};',
545 + ],
546 + ]
547 + );
548 + $this->end_controls_section();
549 + }
547 550
548 - protected function render() {
549 - $settings = $this->get_settings_for_display();
551 + protected function render() {
552 + $settings = $this->get_settings_for_display();
550 553
551 - if ( empty( $settings['easy_icon_box'] ) ) {
552 - return;
553 - }
554 - ?>
555 - <div class="eel-icon-box-wrap">
556 - <div class="grid-wrap">
557 - <?php foreach ( $settings['easy_icon_box'] as $item ) :
558 - $link = $item['link']['url'] ?? '';
559 - $target = ! empty( $item['link']['is_external'] ) ? ' target="_blank"' : '';
560 - $nofollow = ! empty( $item['link']['nofollow'] ) ? ' rel="nofollow"' : '';
561 - $icon_direction = $settings['icon_direction'] ?? '';
562 - ?>
554 + if ( empty( $settings['easy_icon_box'] ) ) {
555 + return;
556 + }
557 + ?>
558 + <div class="eel-icon-box-wrap">
559 + <div class="grid-wrap">
560 + <?php foreach ( $settings['easy_icon_box'] as $item ) :
561 + $link = $item['link']['url'] ?? '';
562 + $target = ! empty( $item['link']['is_external'] ) ? ' target="_blank"' : '';
563 + $nofollow = ! empty( $item['link']['nofollow'] ) ? ' rel="nofollow"' : '';
564 + $icon_direction = $settings['icon_direction'] ?? '';
565 + ?>
563 566
564 - <div class="eel-icon-item">
565 - <div class="ee--icon-box <?php echo esc_attr($icon_direction); ?>">
566 - <?php if ( $link ) : ?>
567 - <a href="<?php echo esc_url( $link ); ?>" <?php echo esc_attr( $target ); ?> <?php echo esc_attr( $nofollow ); ?>>
568 - <?php endif; ?>
567 + <div class="eel-icon-item">
568 + <div class="ee--icon-box <?php echo esc_attr($icon_direction); ?>">
569 + <?php if ( $link ) : ?>
570 + <a href="<?php echo esc_url( $link ); ?>" <?php echo esc_attr( $target ); ?> <?php echo esc_attr( $nofollow ); ?>>
571 + <?php endif; ?>
569 572
570 - <?php
571 - if ( isset( $item['icon']['value'] ) && $item['icon']['value'] ) { ?>
572 - <span class="eel-icon"><?php \Elementor\Icons_Manager::render_icon( $item['icon'], [ 'aria-hidden' => 'true' ] ); ?></span>
573 - <?php } ?>
573 + <?php
574 + if ( isset( $item['icon']['value'] ) && $item['icon']['value'] ) { ?>
575 + <span class="eel-icon"><?php \Elementor\Icons_Manager::render_icon( $item['icon'], [ 'aria-hidden' => 'true' ] ); ?></span>
576 + <?php } ?>
574 577
575 - <?php if ( $icon_direction === 'left' || $icon_direction === 'right' ) : ?>
576 - <div class="eel-title-content-wrap">
577 - <?php endif; ?>
578 - <?php
579 - if ( $item['process_number_or_icon'] === 'p_number' && ! empty( $item['process_number'] ) ) :
580 - echo '<span class="eel-process-number">' . esc_html( $item['process_number'] ) . '</span>';
581 - elseif ( $item['process_number_or_icon'] === 'p_icon' && ! empty( $item['process_icon'] ) ) :
582 - echo '<span class="eel-process-number">';
583 - \Elementor\Icons_Manager::render_icon( $item['process_icon'], [ 'aria-hidden' => 'true' ] );
584 - echo '</span>';
585 - endif;
586 - ?>
587 - <?php if ( ! empty( $item['_title'] ) ) :
588 - $title_tag = isset( $settings['title_tag'] ) ? $settings['title_tag'] : 'h3'; ?>
589 - <<?php echo esc_attr( $title_tag ); ?> class="icon-box-title">
590 - <?php echo wp_kses_post( $item['_title'] ); ?>
591 - </<?php echo esc_attr( $title_tag ); ?>>
592 - <?php endif; ?>
578 + <?php if ( $icon_direction === 'left' || $icon_direction === 'right' ) : ?>
579 + <div class="eel-title-content-wrap">
580 + <?php endif; ?>
581 + <?php
582 + if ( $item['process_number_or_icon'] === 'p_number' && ! empty( $item['process_number'] ) ) :
583 + echo '<span class="eel-process-number">' . esc_html( $item['process_number'] ) . '</span>';
584 + elseif ( $item['process_number_or_icon'] === 'p_icon' && ! empty( $item['process_icon'] ) ) :
585 + echo '<span class="eel-process-number">';
586 + \Elementor\Icons_Manager::render_icon( $item['process_icon'], [ 'aria-hidden' => 'true' ] );
587 + echo '</span>';
588 + endif;
589 + ?>
590 + <?php if ( ! empty( $item['_title'] ) ) :
591 + $title_tag = isset( $settings['title_tag'] ) ? $settings['title_tag'] : 'h3'; ?>
592 + <<?php echo esc_attr( $title_tag ); ?> class="icon-box-title">
593 + <?php echo wp_kses_post( $item['_title'] ); ?>
594 + </<?php echo esc_attr( $title_tag ); ?>>
595 + <?php endif; ?>
593 596
594 - <?php if ( ! empty( $item['_description'] ) ) : ?>
595 - <div class="icon-box-description"><?php echo wp_kses_post( $item['_description'] ); ?></div>
596 - <?php endif; ?>
597 + <?php if ( ! empty( $item['_description'] ) ) : ?>
598 + <div class="icon-box-description"><?php echo wp_kses_post( $item['_description'] ); ?></div>
599 + <?php endif; ?>
597 600
598 - <?php if ( $icon_direction === 'left' || $icon_direction === 'right' ) : ?>
599 - </div>
600 - <?php endif; ?>
601 + <?php if ( $icon_direction === 'left' || $icon_direction === 'right' ) : ?>
602 + </div>
603 + <?php endif; ?>
601 604
602 - <?php if ( $link ) : ?>
603 - </a>
604 - <?php endif; ?>
605 + <?php if ( $link ) : ?>
606 + </a>
607 + <?php endif; ?>
608 + </div>
605 609 </div>
606 - </div>
607 610
608 - <?php endforeach; ?>
611 + <?php endforeach; ?>
612 + </div>
609 613 </div>
610 - </div>
611 - <?php
614 + <?php
615 + }
612 616 }
613 -}
617 +}
618 +?>