PluginProbe
Elementor Website Builder – more than just a page builder / 3.2.1
Elementor Website Builder – more than just a page builder v3.2.1
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
← All changes | includes/controls/groups/background.php +183 -168 4.2.13.2.1 View file →
@@ -1,8 +1,7 @@
1 1 <?php
2 2 namespace Elementor;
3 3
4 -use Elementor\Core\Breakpoints\Manager as Breakpoints_Manager;
5 4 use Elementor\Modules\DynamicTags\Module as TagsModule;
6 5
7 6 if ( ! defined( 'ABSPATH' ) ) {
8 7 exit; // Exit if accessed directly.
@@ -91,21 +90,21 @@
91 90 */
92 91 private static function get_default_background_types() {
93 92 return [
94 93 'classic' => [
95 - 'title' => esc_html__( 'Classic', 'elementor' ),
94 + 'title' => _x( 'Classic', 'Background Control', 'elementor' ),
96 95 'icon' => 'eicon-paint-brush',
97 96 ],
98 97 'gradient' => [
99 - 'title' => esc_html__( 'Gradient', 'elementor' ),
98 + 'title' => _x( 'Gradient', 'Background Control', 'elementor' ),
100 99 'icon' => 'eicon-barcode',
101 100 ],
102 101 'video' => [
103 - 'title' => esc_html__( 'Video', 'elementor' ),
102 + 'title' => _x( 'Video', 'Background Control', 'elementor' ),
104 103 'icon' => 'eicon-video-camera',
105 104 ],
106 105 'slideshow' => [
107 - 'title' => esc_html__( 'Slideshow', 'elementor' ),
106 + 'title' => _x( 'Slideshow', 'Background Control', 'elementor' ),
108 107 'icon' => 'eicon-slideshow',
109 108 ],
110 109 ];
111 110 }
@@ -120,77 +119,37 @@
120 119 *
121 120 * @return array Control fields.
122 121 */
123 122 public function init_fields() {
124 - $active_breakpoints = Plugin::$instance->breakpoints->get_active_breakpoints();
125 -
126 - $location_device_args = [];
127 - $location_device_defaults = [
128 - 'default' => [
129 - 'unit' => '%',
130 - ],
131 - ];
132 -
133 - $angel_device_args = [];
134 - $angel_device_defaults = [
135 - 'default' => [
136 - 'unit' => 'deg',
137 - ],
138 - ];
139 -
140 - $position_device_args = [];
141 - $position_device_defaults = [
142 - 'default' => 'center center',
143 - ];
144 -
145 - foreach ( $active_breakpoints as $breakpoint_name => $breakpoint ) {
146 - $location_device_args[ $breakpoint_name ] = $location_device_defaults;
147 - $angel_device_args[ $breakpoint_name ] = $angel_device_defaults;
148 - $position_device_args[ $breakpoint_name ] = $position_device_defaults;
149 - }
150 -
151 123 $fields = [];
152 124
153 125 $fields['background'] = [
154 - 'label' => esc_html__( 'Background Type', 'elementor' ),
126 + 'label' => _x( 'Background Type', 'Background Control', 'elementor' ),
155 127 'type' => Controls_Manager::CHOOSE,
156 128 'render_type' => 'ui',
157 129 ];
158 130
159 - $fields['gradient_notice'] = [
160 - 'type' => Controls_Manager::ALERT,
161 - 'alert_type' => 'warning',
162 - 'content' => esc_html__( 'Set locations and angle for each breakpoint to ensure the gradient adapts to different screen sizes.', 'elementor' ),
163 - 'render_type' => 'ui',
164 - 'condition' => [
165 - 'background' => [ 'gradient' ],
166 - ],
167 - ];
168 -
169 131 $fields['color'] = [
170 - 'label' => esc_html__( 'Color', 'elementor' ),
132 + 'label' => _x( 'Color', 'Background Control', 'elementor' ),
171 133 'type' => Controls_Manager::COLOR,
172 134 'default' => '',
173 - 'control_type' => 'content',
174 - 'title' => esc_html__( 'Background Color', 'elementor' ),
135 + 'title' => _x( 'Background Color', 'Background Control', 'elementor' ),
175 136 'selectors' => [
176 137 '{{SELECTOR}}' => 'background-color: {{VALUE}};',
177 138 ],
178 139 'condition' => [
179 - 'background' => [ 'classic', 'gradient', 'video' ],
140 + 'background' => [ 'classic', 'gradient' ],
180 141 ],
181 142 ];
182 143
183 144 $fields['color_stop'] = [
184 - 'label' => esc_html_x( 'Location', 'Background Control', 'elementor' ),
145 + 'label' => _x( 'Location', 'Background Control', 'elementor' ),
185 146 'type' => Controls_Manager::SLIDER,
186 - 'size_units' => [ '%', 'custom' ],
147 + 'size_units' => [ '%' ],
187 148 'default' => [
188 149 'unit' => '%',
189 150 'size' => 0,
190 151 ],
191 - 'device_args' => $location_device_args,
192 - 'responsive' => true,
193 152 'render_type' => 'ui',
194 153 'condition' => [
195 154 'background' => [ 'gradient' ],
196 155 ],
@@ -197,13 +156,12 @@
197 156 'of_type' => 'gradient',
198 157 ];
199 158
200 159 $fields['color_b'] = [
201 - 'label' => esc_html__( 'Second Color', 'elementor' ),
160 + 'label' => _x( 'Second Color', 'Background Control', 'elementor' ),
202 161 'type' => Controls_Manager::COLOR,
203 162 'default' => '#f2295b',
204 163 'render_type' => 'ui',
205 - 'control_type' => 'content',
206 164 'condition' => [
207 165 'background' => [ 'gradient' ],
208 166 ],
209 167 'of_type' => 'gradient',
@@ -209,17 +167,15 @@
209 167 'of_type' => 'gradient',
210 168 ];
211 169
212 170 $fields['color_b_stop'] = [
213 - 'label' => esc_html_x( 'Location', 'Background Control', 'elementor' ),
171 + 'label' => _x( 'Location', 'Background Control', 'elementor' ),
214 172 'type' => Controls_Manager::SLIDER,
215 - 'size_units' => [ '%', 'custom' ],
173 + 'size_units' => [ '%' ],
216 174 'default' => [
217 175 'unit' => '%',
218 176 'size' => 100,
219 177 ],
220 - 'device_args' => $location_device_args,
221 - 'responsive' => true,
222 178 'render_type' => 'ui',
223 179 'condition' => [
224 180 'background' => [ 'gradient' ],
225 181 ],
@@ -226,13 +182,13 @@
226 182 'of_type' => 'gradient',
227 183 ];
228 184
229 185 $fields['gradient_type'] = [
230 - 'label' => esc_html_x( 'Type', 'Background Control', 'elementor' ),
186 + 'label' => _x( 'Type', 'Background Control', 'elementor' ),
231 187 'type' => Controls_Manager::SELECT,
232 188 'options' => [
233 - 'linear' => esc_html__( 'Linear', 'elementor' ),
234 - 'radial' => esc_html__( 'Radial', 'elementor' ),
189 + 'linear' => _x( 'Linear', 'Background Control', 'elementor' ),
190 + 'radial' => _x( 'Radial', 'Background Control', 'elementor' ),
235 191 ],
236 192 'default' => 'linear',
237 193 'render_type' => 'ui',
238 194 'condition' => [
@@ -241,17 +197,20 @@
241 197 'of_type' => 'gradient',
242 198 ];
243 199
244 200 $fields['gradient_angle'] = [
245 - 'label' => esc_html__( 'Angle', 'elementor' ),
201 + 'label' => _x( 'Angle', 'Background Control', 'elementor' ),
246 202 'type' => Controls_Manager::SLIDER,
247 - 'size_units' => [ 'deg', 'grad', 'rad', 'turn', 'custom' ],
203 + 'size_units' => [ 'deg' ],
248 204 'default' => [
249 205 'unit' => 'deg',
250 206 'size' => 180,
251 207 ],
252 - 'device_args' => $angel_device_args,
253 - 'responsive' => true,
208 + 'range' => [
209 + 'deg' => [
210 + 'step' => 10,
211 + ],
212 + ],
254 213 'selectors' => [
255 214 '{{SELECTOR}}' => 'background-color: transparent; background-image: linear-gradient({{SIZE}}{{UNIT}}, {{color.VALUE}} {{color_stop.SIZE}}{{color_stop.UNIT}}, {{color_b.VALUE}} {{color_b_stop.SIZE}}{{color_b_stop.UNIT}})',
256 215 ],
257 216 'condition' => [
@@ -261,24 +220,22 @@
261 220 'of_type' => 'gradient',
262 221 ];
263 222
264 223 $fields['gradient_position'] = [
265 - 'label' => esc_html__( 'Position', 'elementor' ),
224 + 'label' => _x( 'Position', 'Background Control', 'elementor' ),
266 225 'type' => Controls_Manager::SELECT,
267 226 'options' => [
268 - 'center center' => esc_html__( 'Center Center', 'elementor' ),
269 - 'center left' => esc_html__( 'Center Left', 'elementor' ),
270 - 'center right' => esc_html__( 'Center Right', 'elementor' ),
271 - 'top center' => esc_html__( 'Top Center', 'elementor' ),
272 - 'top left' => esc_html__( 'Top Left', 'elementor' ),
273 - 'top right' => esc_html__( 'Top Right', 'elementor' ),
274 - 'bottom center' => esc_html__( 'Bottom Center', 'elementor' ),
275 - 'bottom left' => esc_html__( 'Bottom Left', 'elementor' ),
276 - 'bottom right' => esc_html__( 'Bottom Right', 'elementor' ),
227 + 'center center' => _x( 'Center Center', 'Background Control', 'elementor' ),
228 + 'center left' => _x( 'Center Left', 'Background Control', 'elementor' ),
229 + 'center right' => _x( 'Center Right', 'Background Control', 'elementor' ),
230 + 'top center' => _x( 'Top Center', 'Background Control', 'elementor' ),
231 + 'top left' => _x( 'Top Left', 'Background Control', 'elementor' ),
232 + 'top right' => _x( 'Top Right', 'Background Control', 'elementor' ),
233 + 'bottom center' => _x( 'Bottom Center', 'Background Control', 'elementor' ),
234 + 'bottom left' => _x( 'Bottom Left', 'Background Control', 'elementor' ),
235 + 'bottom right' => _x( 'Bottom Right', 'Background Control', 'elementor' ),
277 236 ],
278 237 'default' => 'center center',
279 - 'device_args' => $position_device_args,
280 - 'responsive' => true,
281 238 'selectors' => [
282 239 '{{SELECTOR}}' => 'background-color: transparent; background-image: radial-gradient(at {{VALUE}}, {{color.VALUE}} {{color_stop.SIZE}}{{color_stop.UNIT}}, {{color_b.VALUE}} {{color_b_stop.SIZE}}{{color_b_stop.UNIT}})',
283 240 ],
284 241 'condition' => [
@@ -288,22 +245,18 @@
288 245 'of_type' => 'gradient',
289 246 ];
290 247
291 248 $fields['image'] = [
292 - 'label' => esc_html__( 'Image', 'elementor' ),
249 + 'label' => _x( 'Image', 'Background Control', 'elementor' ),
293 250 'type' => Controls_Manager::MEDIA,
294 - 'ai' => [
295 - 'category' => 'background',
296 - ],
297 251 'dynamic' => [
298 252 'active' => true,
299 253 ],
300 254 'responsive' => true,
301 - 'title' => esc_html__( 'Background Image', 'elementor' ),
255 + 'title' => _x( 'Background Image', 'Background Control', 'elementor' ),
302 256 'selectors' => [
303 257 '{{SELECTOR}}' => 'background-image: url("{{URL}}");',
304 258 ],
305 - 'has_sizes' => true,
306 259 'render_type' => 'template',
307 260 'condition' => [
308 261 'background' => [ 'classic' ],
309 262 ],
@@ -309,25 +262,24 @@
309 262 ],
310 263 ];
311 264
312 265 $fields['position'] = [
313 - 'label' => esc_html__( 'Position', 'elementor' ),
266 + 'label' => _x( 'Position', 'Background Control', 'elementor' ),
314 267 'type' => Controls_Manager::SELECT,
315 268 'default' => '',
316 - 'separator' => 'before',
317 269 'responsive' => true,
318 270 'options' => [
319 - '' => esc_html__( 'Default', 'elementor' ),
320 - 'center center' => esc_html__( 'Center Center', 'elementor' ),
321 - 'center left' => esc_html__( 'Center Left', 'elementor' ),
322 - 'center right' => esc_html__( 'Center Right', 'elementor' ),
323 - 'top center' => esc_html__( 'Top Center', 'elementor' ),
324 - 'top left' => esc_html__( 'Top Left', 'elementor' ),
325 - 'top right' => esc_html__( 'Top Right', 'elementor' ),
326 - 'bottom center' => esc_html__( 'Bottom Center', 'elementor' ),
327 - 'bottom left' => esc_html__( 'Bottom Left', 'elementor' ),
328 - 'bottom right' => esc_html__( 'Bottom Right', 'elementor' ),
329 - 'initial' => esc_html__( 'Custom', 'elementor' ),
271 + '' => _x( 'Default', 'Background Control', 'elementor' ),
272 + 'center center' => _x( 'Center Center', 'Background Control', 'elementor' ),
273 + 'center left' => _x( 'Center Left', 'Background Control', 'elementor' ),
274 + 'center right' => _x( 'Center Right', 'Background Control', 'elementor' ),
275 + 'top center' => _x( 'Top Center', 'Background Control', 'elementor' ),
276 + 'top left' => _x( 'Top Left', 'Background Control', 'elementor' ),
277 + 'top right' => _x( 'Top Right', 'Background Control', 'elementor' ),
278 + 'bottom center' => _x( 'Bottom Center', 'Background Control', 'elementor' ),
279 + 'bottom left' => _x( 'Bottom Left', 'Background Control', 'elementor' ),
280 + 'bottom right' => _x( 'Bottom Right', 'Background Control', 'elementor' ),
281 + 'initial' => _x( 'Custom', 'Background Control', 'elementor' ),
330 282
331 283 ],
332 284 'selectors' => [
333 285 '{{SELECTOR}}' => 'background-position: {{VALUE}};',
@@ -338,19 +290,22 @@
338 290 ],
339 291 ];
340 292
341 293 $fields['xpos'] = [
342 - 'label' => esc_html__( 'X Position', 'elementor' ),
294 + 'label' => _x( 'X Position', 'Background Control', 'elementor' ),
343 295 'type' => Controls_Manager::SLIDER,
344 296 'responsive' => true,
345 - 'size_units' => [ 'px', '%', 'em', 'rem', 'vw', 'custom' ],
297 + 'size_units' => [ 'px', 'em', '%', 'vw' ],
346 298 'default' => [
299 + 'unit' => 'px',
347 300 'size' => 0,
348 301 ],
349 302 'tablet_default' => [
303 + 'unit' => 'px',
350 304 'size' => 0,
351 305 ],
352 306 'mobile_default' => [
307 + 'unit' => 'px',
353 308 'size' => 0,
354 309 ],
355 310 'range' => [
356 311 'px' => [
@@ -378,22 +333,45 @@
378 333 'position' => [ 'initial' ],
379 334 'image[url]!' => '',
380 335 ],
381 336 'required' => true,
337 + 'device_args' => [
338 + Controls_Stack::RESPONSIVE_TABLET => [
339 + 'selectors' => [
340 + '{{SELECTOR}}' => 'background-position: {{SIZE}}{{UNIT}} {{ypos_tablet.SIZE}}{{ypos_tablet.UNIT}}',
341 + ],
342 + 'condition' => [
343 + 'background' => [ 'classic' ],
344 + 'position_tablet' => [ 'initial' ],
345 + ],
346 + ],
347 + Controls_Stack::RESPONSIVE_MOBILE => [
348 + 'selectors' => [
349 + '{{SELECTOR}}' => 'background-position: {{SIZE}}{{UNIT}} {{ypos_mobile.SIZE}}{{ypos_mobile.UNIT}}',
350 + ],
351 + 'condition' => [
352 + 'background' => [ 'classic' ],
353 + 'position_mobile' => [ 'initial' ],
354 + ],
355 + ],
356 + ],
382 357 ];
383 358
384 359 $fields['ypos'] = [
385 - 'label' => esc_html__( 'Y Position', 'elementor' ),
360 + 'label' => _x( 'Y Position', 'Background Control', 'elementor' ),
386 361 'type' => Controls_Manager::SLIDER,
387 362 'responsive' => true,
388 - 'size_units' => [ 'px', '%', 'em', 'rem', 'vh', 'custom' ],
363 + 'size_units' => [ 'px', 'em', '%', 'vh' ],
389 364 'default' => [
365 + 'unit' => 'px',
390 366 'size' => 0,
391 367 ],
392 368 'tablet_default' => [
369 + 'unit' => 'px',
393 370 'size' => 0,
394 371 ],
395 372 'mobile_default' => [
373 + 'unit' => 'px',
396 374 'size' => 0,
397 375 ],
398 376 'range' => [
399 377 'px' => [
@@ -421,18 +399,38 @@
421 399 'position' => [ 'initial' ],
422 400 'image[url]!' => '',
423 401 ],
424 402 'required' => true,
403 + 'device_args' => [
404 + Controls_Stack::RESPONSIVE_TABLET => [
405 + 'selectors' => [
406 + '{{SELECTOR}}' => 'background-position: {{xpos_tablet.SIZE}}{{xpos_tablet.UNIT}} {{SIZE}}{{UNIT}}',
407 + ],
408 + 'condition' => [
409 + 'background' => [ 'classic' ],
410 + 'position_tablet' => [ 'initial' ],
411 + ],
412 + ],
413 + Controls_Stack::RESPONSIVE_MOBILE => [
414 + 'selectors' => [
415 + '{{SELECTOR}}' => 'background-position: {{xpos_mobile.SIZE}}{{xpos_mobile.UNIT}} {{SIZE}}{{UNIT}}',
416 + ],
417 + 'condition' => [
418 + 'background' => [ 'classic' ],
419 + 'position_mobile' => [ 'initial' ],
420 + ],
421 + ],
422 + ],
425 423 ];
426 424
427 425 $fields['attachment'] = [
428 - 'label' => esc_html_x( 'Attachment', 'Background Control', 'elementor' ),
426 + 'label' => _x( 'Attachment', 'Background Control', 'elementor' ),
429 427 'type' => Controls_Manager::SELECT,
430 428 'default' => '',
431 429 'options' => [
432 - '' => esc_html__( 'Default', 'elementor' ),
433 - 'scroll' => esc_html_x( 'Scroll', 'Background Control', 'elementor' ),
434 - 'fixed' => esc_html_x( 'Fixed', 'Background Control', 'elementor' ),
430 + '' => _x( 'Default', 'Background Control', 'elementor' ),
431 + 'scroll' => _x( 'Scroll', 'Background Control', 'elementor' ),
432 + 'fixed' => _x( 'Fixed', 'Background Control', 'elementor' ),
435 433 ],
436 434 'selectors' => [
437 435 '(desktop+){{SELECTOR}}' => 'background-attachment: {{VALUE}};',
438 436 ],
@@ -444,9 +442,10 @@
444 442
445 443 $fields['attachment_alert'] = [
446 444 'type' => Controls_Manager::RAW_HTML,
447 445 'content_classes' => 'elementor-control-field-description',
448 - 'raw' => esc_html__( 'Note: Attachment Fixed works only on desktop.', 'elementor' ),
446 + 'raw' => __( 'Note: Attachment Fixed works only on desktop.', 'elementor' ),
447 + 'separator' => 'none',
449 448 'condition' => [
450 449 'background' => [ 'classic' ],
451 450 'image[url]!' => '',
452 451 'attachment' => 'fixed',
@@ -453,18 +452,18 @@
453 452 ],
454 453 ];
455 454
456 455 $fields['repeat'] = [
457 - 'label' => esc_html_x( 'Repeat', 'Background Control', 'elementor' ),
456 + 'label' => _x( 'Repeat', 'Background Control', 'elementor' ),
458 457 'type' => Controls_Manager::SELECT,
459 458 'default' => '',
460 459 'responsive' => true,
461 460 'options' => [
462 - '' => esc_html__( 'Default', 'elementor' ),
463 - 'no-repeat' => esc_html__( 'No-repeat', 'elementor' ),
464 - 'repeat' => esc_html__( 'Repeat', 'elementor' ),
465 - 'repeat-x' => esc_html__( 'Repeat-x', 'elementor' ),
466 - 'repeat-y' => esc_html__( 'Repeat-y', 'elementor' ),
461 + '' => _x( 'Default', 'Background Control', 'elementor' ),
462 + 'no-repeat' => _x( 'No-repeat', 'Background Control', 'elementor' ),
463 + 'repeat' => _x( 'Repeat', 'Background Control', 'elementor' ),
464 + 'repeat-x' => _x( 'Repeat-x', 'Background Control', 'elementor' ),
465 + 'repeat-y' => _x( 'Repeat-y', 'Background Control', 'elementor' ),
467 466 ],
468 467 'selectors' => [
469 468 '{{SELECTOR}}' => 'background-repeat: {{VALUE}};',
470 469 ],
@@ -474,18 +473,18 @@
474 473 ],
475 474 ];
476 475
477 476 $fields['size'] = [
478 - 'label' => esc_html__( 'Display Size', 'elementor' ),
477 + 'label' => _x( 'Size', 'Background Control', 'elementor' ),
479 478 'type' => Controls_Manager::SELECT,
480 479 'responsive' => true,
481 480 'default' => '',
482 481 'options' => [
483 - '' => esc_html__( 'Default', 'elementor' ),
484 - 'auto' => esc_html__( 'Auto', 'elementor' ),
485 - 'cover' => esc_html__( 'Cover', 'elementor' ),
486 - 'contain' => esc_html__( 'Contain', 'elementor' ),
487 - 'initial' => esc_html__( 'Custom', 'elementor' ),
482 + '' => _x( 'Default', 'Background Control', 'elementor' ),
483 + 'auto' => _x( 'Auto', 'Background Control', 'elementor' ),
484 + 'cover' => _x( 'Cover', 'Background Control', 'elementor' ),
485 + 'contain' => _x( 'Contain', 'Background Control', 'elementor' ),
486 + 'initial' => _x( 'Custom', 'Background Control', 'elementor' ),
488 487 ],
489 488 'selectors' => [
490 489 '{{SELECTOR}}' => 'background-size: {{VALUE}};',
491 490 ],
@@ -495,16 +494,25 @@
495 494 ],
496 495 ];
497 496
498 497 $fields['bg_width'] = [
499 - 'label' => esc_html__( 'Width', 'elementor' ),
498 + 'label' => _x( 'Width', 'Background Control', 'elementor' ),
500 499 'type' => Controls_Manager::SLIDER,
501 500 'responsive' => true,
502 - 'size_units' => [ 'px', '%', 'em', 'rem', 'vw', 'custom' ],
501 + 'size_units' => [ 'px', 'em', '%', 'vw' ],
503 502 'range' => [
504 503 'px' => [
504 + 'min' => 0,
505 505 'max' => 1000,
506 506 ],
507 + '%' => [
508 + 'min' => 0,
509 + 'max' => 100,
510 + ],
511 + 'vw' => [
512 + 'min' => 0,
513 + 'max' => 100,
514 + ],
507 515 ],
508 516 'default' => [
509 517 'size' => 100,
510 518 'unit' => '%',
@@ -518,15 +526,35 @@
518 526 'background' => [ 'classic' ],
519 527 'size' => [ 'initial' ],
520 528 'image[url]!' => '',
521 529 ],
530 + 'device_args' => [
531 + Controls_Stack::RESPONSIVE_TABLET => [
532 + 'selectors' => [
533 + '{{SELECTOR}}' => 'background-size: {{SIZE}}{{UNIT}} auto',
534 + ],
535 + 'condition' => [
536 + 'background' => [ 'classic' ],
537 + 'size_tablet' => [ 'initial' ],
538 + ],
539 + ],
540 + Controls_Stack::RESPONSIVE_MOBILE => [
541 + 'selectors' => [
542 + '{{SELECTOR}}' => 'background-size: {{SIZE}}{{UNIT}} auto',
543 + ],
544 + 'condition' => [
545 + 'background' => [ 'classic' ],
546 + 'size_mobile' => [ 'initial' ],
547 + ],
548 + ],
549 + ],
522 550 ];
523 551
524 552 $fields['video_link'] = [
525 - 'label' => esc_html__( 'Video Link', 'elementor' ),
553 + 'label' => _x( 'Video Link', 'Background Control', 'elementor' ),
526 554 'type' => Controls_Manager::TEXT,
527 555 'placeholder' => 'https://www.youtube.com/watch?v=XHOmBV4js_E',
528 - 'description' => esc_html__( 'YouTube/Vimeo link, or link to video file (mp4 is recommended).', 'elementor' ),
556 + 'description' => __( 'YouTube/Vimeo link, or link to video file (mp4 is recommended).', 'elementor' ),
529 557 'label_block' => true,
530 558 'default' => '',
531 559 'dynamic' => [
532 560 'active' => true,
@@ -534,11 +562,8 @@
534 562 TagsModule::POST_META_CATEGORY,
535 563 TagsModule::URL_CATEGORY,
536 564 ],
537 565 ],
538 - 'ai' => [
539 - 'active' => false,
540 - ],
541 566 'condition' => [
542 567 'background' => [ 'video' ],
543 568 ],
544 569 'of_type' => 'video',
@@ -545,11 +570,11 @@
545 570 'frontend_available' => true,
546 571 ];
547 572
548 573 $fields['video_start'] = [
549 - 'label' => esc_html__( 'Start Time', 'elementor' ),
574 + 'label' => __( 'Start Time', 'elementor' ),
550 575 'type' => Controls_Manager::NUMBER,
551 - 'description' => esc_html__( 'Specify a start time (in seconds)', 'elementor' ),
576 + 'description' => __( 'Specify a start time (in seconds)', 'elementor' ),
552 577 'placeholder' => 10,
553 578 'condition' => [
554 579 'background' => [ 'video' ],
555 580 ],
@@ -557,11 +582,11 @@
557 582 'frontend_available' => true,
558 583 ];
559 584
560 585 $fields['video_end'] = [
561 - 'label' => esc_html__( 'End Time', 'elementor' ),
586 + 'label' => __( 'End Time', 'elementor' ),
562 587 'type' => Controls_Manager::NUMBER,
563 - 'description' => esc_html__( 'Specify an end time (in seconds)', 'elementor' ),
588 + 'description' => __( 'Specify an end time (in seconds)', 'elementor' ),
564 589 'placeholder' => 70,
565 590 'condition' => [
566 591 'background' => [ 'video' ],
567 592 ],
@@ -569,9 +594,9 @@
569 594 'frontend_available' => true,
570 595 ];
571 596
572 597 $fields['play_once'] = [
573 - 'label' => esc_html__( 'Play Once', 'elementor' ),
598 + 'label' => __( 'Play Once', 'elementor' ),
574 599 'type' => Controls_Manager::SWITCHER,
575 600 'condition' => [
576 601 'background' => [ 'video' ],
577 602 ],
@@ -579,9 +604,9 @@
579 604 'frontend_available' => true,
580 605 ];
581 606
582 607 $fields['play_on_mobile'] = [
583 - 'label' => esc_html__( 'Play On Mobile', 'elementor' ),
608 + 'label' => __( 'Play On Mobile', 'elementor' ),
584 609 'type' => Controls_Manager::SWITCHER,
585 610 'condition' => [
586 611 'background' => [ 'video' ],
587 612 ],
@@ -593,10 +618,11 @@
593 618 // Mode on, and at the same time the page contains another video WITHOUT privacy mode on, one of the videos
594 619 // will not run properly. This added control allows users to align all their videos to one host (either
595 620 // youtube.com or youtube-nocookie.com, depending on whether the user wants privacy mode on or not).
596 621 $fields['privacy_mode'] = [
597 - 'label' => esc_html__( 'Privacy Mode', 'elementor' ),
622 + 'label' => __( 'Privacy mode', 'elementor' ),
598 623 'type' => Controls_Manager::SWITCHER,
624 + 'description' => __( 'Only works for YouTube videos.', 'elementor' ),
599 625 'condition' => [
600 626 'background' => [ 'video' ],
601 627 ],
602 628 'of_type' => 'video',
@@ -603,10 +629,10 @@
603 629 'frontend_available' => true,
604 630 ];
605 631
606 632 $fields['video_fallback'] = [
607 - 'label' => esc_html__( 'Background Fallback', 'elementor' ),
608 - 'description' => esc_html__( 'This cover image will replace the background video in case that the video could not be loaded.', 'elementor' ),
633 + 'label' => _x( 'Background Fallback', 'Background Control', 'elementor' ),
634 + 'description' => __( 'This cover image will replace the background video in case that the video could not be loaded.', 'elementor' ),
609 635 'type' => Controls_Manager::MEDIA,
610 636 'dynamic' => [
611 637 'active' => true,
612 638 ],
@@ -619,9 +645,9 @@
619 645 'of_type' => 'video',
620 646 ];
621 647
622 648 $fields['slideshow_gallery'] = [
623 - 'label' => esc_html__( 'Images', 'elementor' ),
649 + 'label' => _x( 'Images', 'Background Control', 'elementor' ),
624 650 'type' => Controls_Manager::GALLERY,
625 651 'condition' => [
626 652 'background' => [ 'slideshow' ],
627 653 ],
@@ -630,9 +656,9 @@
630 656 'frontend_available' => true,
631 657 ];
632 658
633 659 $fields['slideshow_loop'] = [
634 - 'label' => esc_html__( 'Infinite Loop', 'elementor' ),
660 + 'label' => __( 'Infinite Loop', 'elementor' ),
635 661 'type' => Controls_Manager::SWITCHER,
636 662 'default' => 'yes',
637 663 'condition' => [
638 664 'background' => [ 'slideshow' ],
@@ -641,9 +667,9 @@
641 667 'frontend_available' => true,
642 668 ];
643 669
644 670 $fields['slideshow_slide_duration'] = [
645 - 'label' => esc_html__( 'Duration', 'elementor' ) . ' (ms)',
671 + 'label' => __( 'Duration', 'elementor' ) . ' (ms)',
646 672 'type' => Controls_Manager::NUMBER,
647 673 'default' => 5000,
648 674 'condition' => [
649 675 'background' => [ 'slideshow' ],
@@ -651,9 +677,9 @@
651 677 'frontend_available' => true,
652 678 ];
653 679
654 680 $fields['slideshow_slide_transition'] = [
655 - 'label' => esc_html__( 'Transition', 'elementor' ),
681 + 'label' => __( 'Transition', 'elementor' ),
656 682 'type' => Controls_Manager::SELECT,
657 683 'default' => 'fade',
658 684 'options' => [
659 685 'fade' => 'Fade',
@@ -669,9 +695,9 @@
669 695 'frontend_available' => true,
670 696 ];
671 697
672 698 $fields['slideshow_transition_duration'] = [
673 - 'label' => esc_html__( 'Transition Duration', 'elementor' ) . ' (ms)',
699 + 'label' => __( 'Transition Duration', 'elementor' ) . ' (ms)',
674 700 'type' => Controls_Manager::NUMBER,
675 701 'default' => 500,
676 702 'condition' => [
677 703 'background' => [ 'slideshow' ],
@@ -679,17 +705,17 @@
679 705 'frontend_available' => true,
680 706 ];
681 707
682 708 $fields['slideshow_background_size'] = [
683 - 'label' => esc_html__( 'Background Size', 'elementor' ),
709 + 'label' => __( 'Background Size', 'elementor' ),
684 710 'type' => Controls_Manager::SELECT,
685 711 'responsive' => true,
686 712 'default' => '',
687 713 'options' => [
688 - '' => esc_html__( 'Default', 'elementor' ),
689 - 'auto' => esc_html__( 'Auto', 'elementor' ),
690 - 'cover' => esc_html__( 'Cover', 'elementor' ),
691 - 'contain' => esc_html__( 'Contain', 'elementor' ),
714 + '' => __( 'Default', 'elementor' ),
715 + 'auto' => __( 'Auto', 'elementor' ),
716 + 'cover' => __( 'Cover', 'elementor' ),
717 + 'contain' => __( 'Contain', 'elementor' ),
692 718 ],
693 719 'selectors' => [
694 720 '{{WRAPPER}} .elementor-background-slideshow__slide__image' => 'background-size: {{VALUE}};',
695 721 ],
@@ -698,23 +724,23 @@
698 724 ],
699 725 ];
700 726
701 727 $fields['slideshow_background_position'] = [
702 - 'label' => esc_html__( 'Background Position', 'elementor' ),
728 + 'label' => __( 'Background Position', 'elementor' ),
703 729 'type' => Controls_Manager::SELECT,
704 730 'default' => '',
705 731 'responsive' => true,
706 732 'options' => [
707 - '' => esc_html__( 'Default', 'elementor' ),
708 - 'center center' => esc_html__( 'Center Center', 'elementor' ),
709 - 'center left' => esc_html__( 'Center Left', 'elementor' ),
710 - 'center right' => esc_html__( 'Center Right', 'elementor' ),
711 - 'top center' => esc_html__( 'Top Center', 'elementor' ),
712 - 'top left' => esc_html__( 'Top Left', 'elementor' ),
713 - 'top right' => esc_html__( 'Top Right', 'elementor' ),
714 - 'bottom center' => esc_html__( 'Bottom Center', 'elementor' ),
715 - 'bottom left' => esc_html__( 'Bottom Left', 'elementor' ),
716 - 'bottom right' => esc_html__( 'Bottom Right', 'elementor' ),
733 + '' => __( 'Default', 'elementor' ),
734 + 'center center' => _x( 'Center Center', 'Background Control', 'elementor' ),
735 + 'center left' => _x( 'Center Left', 'Background Control', 'elementor' ),
736 + 'center right' => _x( 'Center Right', 'Background Control', 'elementor' ),
737 + 'top center' => _x( 'Top Center', 'Background Control', 'elementor' ),
738 + 'top left' => _x( 'Top Left', 'Background Control', 'elementor' ),
739 + 'top right' => _x( 'Top Right', 'Background Control', 'elementor' ),
740 + 'bottom center' => _x( 'Bottom Center', 'Background Control', 'elementor' ),
741 + 'bottom left' => _x( 'Bottom Left', 'Background Control', 'elementor' ),
742 + 'bottom right' => _x( 'Bottom Right', 'Background Control', 'elementor' ),
717 743 ],
718 744 'selectors' => [
719 745 '{{WRAPPER}} .elementor-background-slideshow__slide__image' => 'background-position: {{VALUE}};',
720 746 ],
@@ -722,21 +748,10 @@
722 748 'background' => [ 'slideshow' ],
723 749 ],
724 750 ];
725 751
726 - $fields['slideshow_lazyload'] = [
727 - 'label' => esc_html__( 'Lazyload', 'elementor' ),
728 - 'type' => Controls_Manager::SWITCHER,
729 - 'separator' => 'before',
730 - 'condition' => [
731 - 'background' => [ 'slideshow' ],
732 - ],
733 - 'of_type' => 'slideshow',
734 - 'frontend_available' => true,
735 - ];
736 -
737 752 $fields['slideshow_ken_burns'] = [
738 - 'label' => esc_html__( 'Ken Burns Effect', 'elementor' ),
753 + 'label' => __( 'Ken Burns Effect', 'elementor' ),
739 754 'type' => Controls_Manager::SWITCHER,
740 755 'separator' => 'before',
741 756 'condition' => [
742 757 'background' => [ 'slideshow' ],
@@ -745,14 +760,14 @@
745 760 'frontend_available' => true,
746 761 ];
747 762
748 763 $fields['slideshow_ken_burns_zoom_direction'] = [
749 - 'label' => esc_html__( 'Direction', 'elementor' ),
764 + 'label' => __( 'Direction', 'elementor' ),
750 765 'type' => Controls_Manager::SELECT,
751 766 'default' => 'in',
752 767 'options' => [
753 - 'in' => esc_html__( 'In', 'elementor' ),
754 - 'out' => esc_html__( 'Out', 'elementor' ),
768 + 'in' => __( 'In', 'elementor' ),
769 + 'out' => __( 'Out', 'elementor' ),
755 770 ],
756 771 'condition' => [
757 772 'background' => [ 'slideshow' ],
758 773 'slideshow_ken_burns!' => '',