PluginProbe ʕ •ᴥ•ʔ
Spider Elements – Premium Elementor Widgets & Addons Library / 1.6.5
Spider Elements – Premium Elementor Widgets & Addons Library v1.6.5
trunk 1.0.0 1.1.0 1.5.0 1.6.0 1.6.1 1.6.2 1.6.3 1.6.4 1.6.5 1.6.6 1.6.7 1.7.0 1.8.0 1.9.0
spider-elements / widgets / Video_Playlist.php
spider-elements / widgets Last commit date
templates 1 year ago Accordion.php 1 year ago Alerts_Box.php 1 year ago Before_after.php 1 year ago Blog_Grid.php 1 year ago Cheat_Sheet.php 1 year ago Counter.php 1 year ago Icon_Box.php 1 year ago Integrations.php 1 year ago List_Item.php 1 year ago Tabs.php 1 year ago Team_Carousel.php 1 year ago Testimonial.php 1 year ago Timeline.php 1 year ago Video_Playlist.php 1 year ago Video_Popup.php 1 year ago
Video_Playlist.php
861 lines
1 <?php
2 /**
3 * Use namespace to avoid conflict
4 */
5 namespace SPEL\Widgets;
6
7 use Elementor\Group_Control_Typography;
8 use Elementor\Widget_Base;
9 use Elementor\Controls_Manager;
10 use Elementor\Repeater;
11 use Elementor\Utils;
12
13 // Exit if accessed directly
14 if ( ! defined( 'ABSPATH' ) ) {
15 exit;
16 }
17
18 /**
19 * Class Video_playlist
20 *
21 * @package spider\Widgets
22 * @since 1.0.0
23 */
24 class Video_Playlist extends Widget_Base {
25
26 public function get_name(): string
27 {
28 return 'spel_videos_playlist'; // ID of the widget (Don't change this name)
29 }
30
31 public function get_title(): string
32 {
33 return esc_html__( 'SE Video Playlist', 'spider-elements' );
34 }
35
36 public function get_icon(): string
37 {
38 return 'eicon-video-playlist spel-icon';
39 }
40
41 /**
42 * Name: get_style_depends()
43 * Desc: Register the required CSS dependencies for the frontend.
44 */
45 public function get_style_depends(): array
46 {
47 return [ 'font-awesome', 'slick', 'slick-theme', 'elegant-icon', 'videojs', 'video-theaterMode', 'spel-main' ];
48 }
49
50 /**
51 * Name: get_script_depends()
52 * Desc: Register the required JS dependencies for the frontend.
53 */
54 public function get_script_depends(): array
55 {
56 return [ 'slick', 'video-js', 'artplayer', 'video-nuevo', 'spel-el-widgets' ];
57 }
58
59 public function get_keywords(): array
60 {
61 return [ 'spider', 'spider elements', 'video', 'playlist', 'Video playlist', 'Video list' ];
62 }
63
64 public function get_categories(): array
65 {
66 return [ 'spider-elements' ];
67 }
68
69 /**
70 * Name: register_controls()
71 * Desc: Register controls for these widgets
72 * Params: no params
73 * Return: @void
74 * Since: @1.0.0
75 * Package: @spider-elements
76 * Author: spider-themes
77 */
78 protected function register_controls(): void
79 {
80 $this->elementor_content_control();
81 $this->elementor_style_control();
82 }
83
84 /**
85 * Name: elementor_content_control()
86 * Desc: Register the Content Tab output on the Elementor editor.
87 * Params: no params
88 * Return: @void
89 * Since: @1.0.0
90 * Package: @spider-elements
91 * Author: spider-themes
92 */
93 public function elementor_content_control(): void
94 {
95
96
97 //==================== Select Preset Skin ====================//
98 $this->start_controls_section(
99 'spe_video_preset', [
100 'label' => esc_html__( 'Preset Skin', 'spider-elements' ),
101 ]
102 );
103
104 $this->add_control(
105 'style', [
106 'label' => esc_html__( 'Skin', 'spider-elements' ),
107 'type' => Controls_Manager::CHOOSE,
108 'options' => [
109 '1' => [
110 'title' => esc_html__( 'Tab', 'spider-elements' ),
111 'icon' => 'video_playlist_1',
112 ],
113 '2' => [
114 'title' => esc_html__( 'Slide', 'spider-elements' ),
115 'icon' => 'video_playlist_2',
116 ],
117 ],
118 'toggle' => false,
119 'default' => '1',
120 ]
121 );
122
123 $this->end_controls_section(); // End Preset Skin
124
125
126 //======================= Title Section =======================//
127 $this->start_controls_section(
128 'title_opt_sec', [
129 'label' => esc_html__( 'Title', 'spider-elements' ),
130 'condition' => [
131 'style' => [ '1' ]
132 ]
133 ]
134 );
135
136 $this->add_control(
137 'playlist_title', [
138 'label' => esc_html__( 'Text', 'spider-elements' ),
139 'type' => Controls_Manager::TEXTAREA,
140 'separator' => 'before'
141 ]
142 );
143
144 $this->add_group_control(
145 Group_Control_Typography::get_type(), [
146 'name' => 'playlist_title_typo',
147 'selector' => '{{WRAPPER}} .play_list_title'
148 ]
149 );
150
151 $this->add_control(
152 'playlist_title_color', [
153 'label' => esc_html__( 'Color', 'spider-elements' ),
154 'type' => Controls_Manager::COLOR,
155 'selectors' => [
156 '{{WRAPPER}} .play_list_title' => 'color: {{VALUE}};',
157 ],
158 ]
159 );
160
161 $this->add_control(
162 'title_tag', [
163 'label' => esc_html__( 'Title Tag', 'spider-elements' ),
164 'type' => Controls_Manager::SELECT,
165 'separator' => 'before',
166 'default' => 'h3',
167 'options' => spel_get_title_tags(),
168 ]
169 );
170
171 $this->end_controls_section(); // End Title Section
172
173
174 //======================= Video Playlist Section =======================//
175 $this->start_controls_section(
176 'section_playlist', [
177 'label' => esc_html__( 'Playlist', 'spider-elements' ),
178 ]
179 );
180
181 $repeater = new Repeater();
182 $repeater->add_control(
183 'title', [
184 'label' => esc_html__( 'Heading', 'spider-elements' ),
185 'type' => Controls_Manager::TEXT,
186 'dynamic' => [
187 'active' => true,
188 ],
189 'placeholder' => esc_html__( 'Tab title text here', 'spider-elements' ),
190 'label_block' => true,
191 ]
192 );
193
194 $repeater2 = new repeater();
195 $repeater2->add_control(
196 'title2', [
197 'label' => esc_html__( 'Title', 'spider-elements' ),
198 'type' => Controls_Manager::TEXT,
199 'label_block' => true,
200 ]
201 );
202
203 $repeater2->add_control(
204 'video_upload', [
205 'label' => esc_html__( 'Upload Video', 'spider-elements' ),
206 'type' => Controls_Manager::MEDIA,
207 'media_type' => 'video',
208 ]
209 );
210
211 $repeater2->add_control(
212 'thumbnail', [
213 'label' => esc_html__( 'Thumbnail', 'spider-elements' ),
214 'type' => Controls_Manager::MEDIA,
215 'default' => [
216 'url' => Utils::get_placeholder_image_src(),
217 ]
218 ]
219 );
220
221 $repeater2->add_control(
222 'video_caption', [
223 'label' => esc_html__( 'Description', 'spider-elements' ),
224 'type' => Controls_Manager::TEXTAREA,
225 'placeholder' => esc_html__( 'Type your caption here', 'spider-elements' ),
226 'description' => esc_html__( '<strong>Note: </strong>This field is applicable for Preset Two', 'spider-elements' ),
227 ]
228 );
229
230 $repeater2->add_control(
231 'current_author', [
232 'label' => esc_html__( 'Author', 'spider-elements' ),
233 'type' => Controls_Manager::HIDDEN,
234 // current login user-name //
235 'default' => get_current_user_id() ? get_userdata( get_current_user_id() )->display_name : ''
236 ]
237 );
238
239 // CURRENT DATE control
240 $repeater2->add_control(
241 'current_date', [
242 'label' => esc_html__( 'Current Date', 'spider-elements' ),
243 'type' => Controls_Manager::HIDDEN,
244 // DEFAULT CURRENT DATE with time zone
245 'default' => date( get_option( 'date_format' ) . get_option( 'time_format' ), current_time( 'timestamp', 0 ) )
246 ]
247 );
248
249 $repeater->add_control(
250 'videos', [
251 'label' => esc_html__( 'Playlist Items', 'spider-elements' ),
252 'type' => Controls_Manager::REPEATER,
253 'fields' => $repeater2->get_controls(),
254 'default' => [
255 [
256 'title2' => esc_html__( 'Add Video', 'spider-elements' ),
257 ]
258 ],
259 'frontend_available' => true,
260 'title_field' => '{{{ title2 }}}'
261 ]
262 );
263
264 $this->add_control(
265 'tabs', [
266 'label' => esc_html__( 'Playlist Items', 'spider-elements' ),
267 'type' => Controls_Manager::REPEATER,
268 'fields' => $repeater->get_controls(),
269 'default' => [
270 [
271 'title' => esc_html__( 'Insert Video', 'spider-elements' ),
272 ]
273 ],
274 'frontend_available' => true,
275 'title_field' => '{{{ title }}}',
276 'prevent_empty' => true,
277 // 'condition' => [
278 // 'style' => [ '1' ]
279 // ]
280 ]
281 );
282
283 $this->end_controls_section(); // end of playlist section
284
285 }
286
287
288 /**
289 * Name: elementor_style_control()
290 * Desc: Register the Style Tab output on the Elementor editor.
291 * Params: no params
292 * Return: @void
293 * Since: @1.0.0
294 * Package: @spider-elements
295 * Author: spider-themes
296 */
297 public function elementor_style_control() {
298
299 // Style Section
300 $this->start_controls_section(
301 'style_sec',
302 [
303 'label' => esc_html__( 'Playlist Section', 'spider-elements' ),
304 'tab' => Controls_Manager::TAB_STYLE,
305 ]
306 );
307
308 $this->add_group_control(
309 \Elementor\Group_Control_Background::get_type(),
310 [
311 'name' => 'background',
312 'types' => [ 'classic', 'gradient' ],
313 'selector' => '{{WRAPPER}} .video_list_area,
314 {{WRAPPER}} .video_slider_area',
315 ]
316 );
317
318 $this->add_responsive_control(
319 'sec_padding', [
320 'label' => esc_html__( 'Padding', 'spider-elements' ),
321 'type' => Controls_Manager::DIMENSIONS,
322 'size_units' => [ 'px', '%', 'em' ],
323 'selectors' => [
324 '{{WRAPPER}} .video_list_area' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
325 '{{WRAPPER}} .video_slider_area' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
326 ],
327 'default' => [
328 'unit' => 'px', // The selected CSS Unit. 'px', '%', 'em',
329 ],
330 ]
331 );
332
333 $this->add_control(
334 'laaout_headin',
335 [
336 'label' => esc_html__( 'Layout', 'spider-elements' ),
337 'type' => Controls_Manager::HEADING,
338 'separator' => 'before',
339 'condition' => [
340 'style' => [ '1' ]
341 ]
342 ]
343 );
344
345 $this->add_responsive_control(
346 'layout_height',
347 [
348 'label' => esc_html__( 'Height', 'spider-elements' ),
349 'type' => Controls_Manager::SLIDER,
350 'size_units' => [ 'px', 'vh', 'vw' ],
351 'range' => [
352 'px' => [
353 'min' => 200,
354 'max' => 1200,
355 ],
356 'vh' => [
357 'min' => 10,
358 'max' => 100,
359 ],
360 'vw' => [
361 'min' => 10,
362 'max' => 100,
363 ],
364 ],
365 'selectors' => [
366 '{{WRAPPER}} .spel_video_list' => 'height: {{SIZE}}{{UNIT}};',
367 ],
368 'condition' => [
369 'style' => [ '1' ]
370 ]
371 ]
372 );
373
374 $this->end_controls_section();
375
376 $this->start_controls_section(
377 'section_style_top_bar',
378 [
379 'label' => esc_html__( 'Video List', 'spider-elements' ),
380 'tab' => Controls_Manager::TAB_STYLE,
381 'condition' => [
382 'style' => [ '1' ]
383 ]
384 ]
385 );
386
387 $this->add_control(
388 'heading_playlist_name',
389 [
390 'label' => esc_html__( 'Title', 'spider-elements' ),
391 'type' => Controls_Manager::HEADING,
392 ]
393 );
394
395 $this->add_group_control(
396 Group_Control_Typography::get_type(),
397 [
398 'name' => 'playlist_name_typography',
399 'selector' => '{{WRAPPER}} .list_title',
400 ]
401 );
402
403 $this->start_controls_tabs(
404 'video_list_tabs'
405 );
406
407 $this->start_controls_tab(
408 'list_normal_tab',
409 [
410 'label' => esc_html__( 'Normal', 'spider-elements' ),
411 ]
412 );
413
414 $this->add_control(
415 'playlist_name_color',
416 [
417 'label' => esc_html__( 'Text Color', 'spider-elements' ),
418 'type' => Controls_Manager::COLOR,
419 'default' => '',
420 'selectors' => [
421 '{{WRAPPER}} .list_title' => 'color: {{VALUE}};',
422 ],
423 ]
424 );
425
426 $this->add_group_control(
427 \Elementor\Group_Control_Background::get_type(),
428 [
429 'name' => 'playlist_name_bg',
430 'types' => [ 'classic', 'gradient' ],
431 'exclude' => [ 'image' ],
432 'selector' => '{{WRAPPER}} .video_list .video_list_inner .accordion .accordion-panel',
433 ]
434 );
435
436 $this->end_controls_tab();
437
438 $this->start_controls_tab(
439 'list_hover_tab',
440 [
441 'label' => esc_html__( 'Active', 'spider-elements' ),
442 ]
443 );
444
445 $this->add_control(
446 'active_name_color',
447 [
448 'label' => esc_html__( 'Text Color', 'spider-elements' ),
449 'type' => Controls_Manager::COLOR,
450 'default' => '',
451 'selectors' => [
452 '{{WRAPPER}} .video_list .video_list_inner .accordion .spe-collapsed .spe-accordion .card-header .list_title' => 'color: {{VALUE}};',
453 ],
454 ]
455 );
456
457 $this->add_control(
458 'active_count_color',
459 [
460 'label' => esc_html__( 'Count Color', 'spider-elements' ),
461 'type' => Controls_Manager::COLOR,
462 'default' => '',
463 'selectors' => [
464 '{{WRAPPER}} .video_list .video_list_inner .accordion .spe-collapsed .spe-accordion .card-header button .list_count' => 'color: {{VALUE}} !important;',
465 ],
466 ]
467 );
468
469 $this->add_control(
470 'activer_icon_color',
471 [
472 'label' => esc_html__( 'Icon Color', 'spider-elements' ),
473 'type' => Controls_Manager::COLOR,
474 'selectors' => [
475 '{{WRAPPER}} .video_list .video_list_inner .accordion .spe-collapsed .spe-accordion .card-header button .plus-minus svg path' => 'stroke: {{VALUE}} !important',
476 ],
477 ]
478 );
479
480 $this->add_group_control(
481 \Elementor\Group_Control_Background::get_type(),
482 [
483 'name' => 'active_name_bg',
484 'types' => [ 'classic', 'gradient' ],
485 'exclude' => [ 'image' ],
486 'selector' => '{{WRAPPER}} .video_list .video_list_inner .accordion .spe-collapsed',
487 ]
488 );
489
490 $this->end_controls_tab();
491
492 $this->end_controls_tabs();
493
494 $this->add_responsive_control(
495 'playlist_name_padding',
496 [
497 'label' => esc_html__( 'Padding', 'spider-elements' ),
498 'type' => Controls_Manager::DIMENSIONS,
499 'size_units' => [ 'px', 'em', '%' ],
500 'separator' => 'before',
501 'selectors' => [
502 '{{WRAPPER}} .video_list .video_list_inner .accordion .accordion-panel .spe-accordion .card-header button' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
503 ],
504 ]
505 );
506
507 $this->add_control(
508 'heading_videos_amount',
509 [
510 'label' => esc_html__( 'Video Count', 'spider-elements' ),
511 'type' => Controls_Manager::HEADING,
512 'separator' => 'before',
513 ]
514 );
515
516 $this->add_group_control(
517 Group_Control_Typography::get_type(),
518 [
519 'name' => 'videos_amount_typography',
520 'selector' => '{{WRAPPER}} .video_list .video_list_inner .accordion .accordion-panel .spe-accordion .card-header button .list_count',
521 ]
522 );
523
524 $this->add_control(
525 'count_color',
526 [
527 'label' => esc_html__( 'Color', 'spider-elements' ),
528 'type' => Controls_Manager::COLOR,
529 'default' => '',
530 'separator' => 'after',
531 'selectors' => [
532 '{{WRAPPER}} .list_count' => 'color: {{VALUE}} !important;',
533 ],
534 ]
535 );
536
537 $this->add_control(
538 'icon_heading',
539 [
540 'label' => esc_html__( 'Icon', 'spider-elements' ),
541 'type' => Controls_Manager::HEADING,
542 'separator' => 'before',
543 ]
544 );
545
546 $this->add_control(
547 'playlist_icon_color',
548 [
549 'label' => esc_html__( 'Color', 'spider-elements' ),
550 'type' => Controls_Manager::COLOR,
551 'selectors' => [
552 '{{WRAPPER}} .video_list .video_list_inner .accordion .accordion-panel .spe-accordion .card-header button .plus-minus #plus path' => 'stroke: {{VALUE}} !important',
553 ],
554 ]
555 );
556
557 $this->add_responsive_control(
558 'icon_size',
559 [
560 'label' => esc_html__( 'Size', 'spider-elements' ),
561 'type' => Controls_Manager::SLIDER,
562 'range' => [
563 'min' => 6,
564 'max' => 100,
565 ],
566 'selectors' => [
567 '{{WRAPPER}} .video_list .video_list_inner .accordion .accordion-panel .spe-accordion .card-header button .plus-minus #plus' => 'width: {{SIZE}}{{UNIT}}; height: {{SIZE}}{{UNIT}} !important',
568 ],
569 ]
570 );
571
572 $this->end_controls_section();
573
574 $this->start_controls_section(
575 'section_style_videos',
576 [
577 'label' => esc_html__( 'Videos', 'spider-elements' ),
578 'tab' => Controls_Manager::TAB_STYLE,
579 'condition' => [
580 'style' => [ '1' ]
581 ]
582 ]
583 );
584
585 $this->add_group_control(
586 \Elementor\Group_Control_Background::get_type(),
587 [
588 'name' => 'playlist_content_bg',
589 'types' => [ 'classic', 'gradient' ],
590 'exclude' => [ 'image' ],
591 'selector' => '{{WRAPPER}} .video_list .video_list_inner .accordion .accordion-content .card-body',
592 ]
593 );
594
595 $this->add_responsive_control(
596 'content_padding',
597 [
598 'label' => esc_html__( 'Padding', 'spider-elements' ),
599 'type' => Controls_Manager::DIMENSIONS,
600 'size_units' => [ 'px', 'em', '%' ],
601 'separator' => 'after',
602 'selectors' => [
603 '{{WRAPPER}} .video_list .video_list_inner .accordion .accordion-content .card-body' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
604 ],
605 ]
606 );
607
608 $this->add_control(
609 'heading_tab_normal',
610 [
611 'label' => esc_html__( 'Title', 'spider-elements' ),
612 'type' => Controls_Manager::HEADING,
613 'separator' => 'before',
614 ]
615 );
616
617 $this->add_group_control(
618 Group_Control_Typography::get_type(),
619 [
620 'name' => 'normal_typography',
621 'selector' => '{{WRAPPER}} .video_list .video_list_inner .card .card-body .nav li a .media .media-body .body_title',
622 ]
623 );
624
625 $this->add_control(
626 'normal_color',
627 [
628 'label' => esc_html__( 'Text Color', 'spider-elements' ),
629 'type' => Controls_Manager::COLOR,
630 'separator' => 'after',
631 'selectors' => [
632 '{{WRAPPER}} .video_list .video_list_inner .card .card-body .nav li a .media .media-body .body_title' => 'color: {{VALUE}};',
633 '{{WRAPPER}} .e-tab-title .e-tab-title-text a' => 'color: {{VALUE}};',
634 ],
635 ]
636 );
637
638 $this->add_control(
639 'heading_duration_normal',
640 [
641 'label' => esc_html__( 'Meta', 'spider-elements' ),
642 'type' => Controls_Manager::HEADING,
643 'separator' => 'before',
644 ]
645 );
646
647 $this->add_group_control(
648 Group_Control_Typography::get_type(),
649 [
650 'name' => 'normal_duration_typography',
651 'selector' => '{{WRAPPER}} .video_list .video_list_inner .card .card-body .nav li a .media .media-body .list .videos_meta',
652 ]
653 );
654
655 $this->add_control(
656 'meta_color',
657 [
658 'label' => esc_html__( 'Color', 'spider-elements' ),
659 'type' => Controls_Manager::COLOR,
660 'selectors' => [
661 '{{WRAPPER}} .videos_meta' => 'color: {{VALUE}} !important;',
662 ],
663 ]
664 );
665
666
667 $this->end_controls_section();
668
669 // Style 2 controls
670 $this->start_controls_section(
671 'style2_videos_slider',
672 [
673 'label' => esc_html__( 'Video', 'spider-elements' ),
674 'tab' => Controls_Manager::TAB_STYLE,
675 'condition' => [
676 'style' => [ '2' ]
677 ]
678 ]
679 );
680
681 $this->add_control(
682 'slider_heading',
683 [
684 'label' => esc_html__( 'Title', 'spider-elements' ),
685 'type' => Controls_Manager::HEADING,
686 ]
687 );
688
689 $this->add_group_control(
690 Group_Control_Typography::get_type(),
691 [
692 'name' => 'title_typography',
693 'selector' => '{{WRAPPER}} .slide_text a .video_title',
694 ]
695 );
696
697 $this->add_control(
698 'title_color',
699 [
700 'label' => esc_html__( 'Color', 'spider-elements' ),
701 'type' => Controls_Manager::COLOR,
702 'selectors' => [
703 '{{WRAPPER}} .slide_text a .video_title' => 'color: {{VALUE}};',
704 ],
705 ]
706 );
707
708 $this->add_control(
709 'title_hover_color',
710 [
711 'label' => esc_html__( 'Hover Color', 'spider-elements' ),
712 'type' => Controls_Manager::COLOR,
713 'selectors' => [
714 '{{WRAPPER}} .slide_text a .video_title:hover' => 'color: {{VALUE}};',
715 ],
716 ]
717 );
718
719 $this->add_control(
720 'description_heading',
721 [
722 'label' => esc_html__( 'Description', 'spider-elements' ),
723 'type' => Controls_Manager::HEADING,
724 'separator' => 'before',
725 ]
726 );
727
728 $this->add_group_control(
729 Group_Control_Typography::get_type(),
730 [
731 'name' => 'description_typography',
732 'selector' => '{{WRAPPER}} .slide_text p',
733 ]
734 );
735
736 $this->add_control(
737 'desc_color',
738 [
739 'label' => esc_html__( 'Color', 'spider-elements' ),
740 'type' => Controls_Manager::COLOR,
741 'selectors' => [
742 '{{WRAPPER}} .slide_text p' => 'color: {{VALUE}};',
743 ],
744 ]
745 );
746
747 $this->add_control(
748 'desc_margin',
749 [
750 'label' => esc_html__( 'Margin', 'spider-elements' ),
751 'type' => Controls_Manager::DIMENSIONS,
752 'size_units' => [ 'px', 'em', '%' ],
753 'selectors' => [
754 '{{WRAPPER}} .slide_text p' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
755 ],
756 ]
757 );
758
759 $this->add_control(
760 'meta_heading',
761 [
762 'label' => esc_html__( 'Meta', 'spider-elements' ),
763 'type' => Controls_Manager::HEADING,
764 'separator' => 'before',
765 ]
766 );
767
768 $this->add_group_control(
769 Group_Control_Typography::get_type(),
770 [
771 'name' => 'meta_typography',
772 'selector' => '{{WRAPPER}} .slide_text .video_user a',
773 ]
774 );
775
776 $this->add_control(
777 'meta2_color',
778 [
779 'label' => esc_html__( 'Color', 'spider-elements' ),
780 'type' => Controls_Manager::COLOR,
781 'selectors' => [
782 '{{WRAPPER}} .slide_text .video_user a' => 'color: {{VALUE}};',
783 ],
784 ]
785 );
786
787 $this->add_control(
788 'meta_hover_color',
789 [
790 'label' => esc_html__( 'Hover Color', 'spider-elements' ),
791 'type' => Controls_Manager::COLOR,
792 'selectors' => [
793 '{{WRAPPER}} .slide_text .video_user a:hover' => 'color: {{VALUE}};',
794 ],
795 ]
796 );
797
798 $this->end_controls_section();
799
800 $this->start_controls_section(
801 'style2_slider',
802 [
803 'label' => esc_html__( 'Slider', 'spider-elements' ),
804 'tab' => Controls_Manager::TAB_STYLE,
805 'condition' => [
806 'style' => [ '2' ]
807 ]
808 ]
809 );
810
811 $this->add_control(
812 'slider2_heading',
813 [
814 'label' => esc_html__( 'Thumbnail Title', 'spider-elements' ),
815 'type' => Controls_Manager::HEADING,
816 ]
817 );
818
819 $this->add_group_control(
820 Group_Control_Typography::get_type(),
821 [
822 'name' => 'thumbnail_title_typography',
823 'selector' => '{{WRAPPER}} .gallery_main_area .gallery-thumbs .item .caption_text .thumbnail_title',
824 ]
825 );
826
827 $this->add_control(
828 'thumbnail_color',
829 [
830 'label' => esc_html__( 'Color', 'spider-elements' ),
831 'type' => Controls_Manager::COLOR,
832 'selectors' => [
833 '{{WRAPPER}} .gallery_main_area .gallery-thumbs .item .caption_text .thumbnail_title' => 'color: {{VALUE}};',
834 ],
835 ]
836 );
837
838 }
839
840
841 /**
842 * Name: elementor_render()
843 * Desc: Render the widget output on the frontend.
844 * Params: no params
845 * Return: @void
846 * Since: @1.0.0
847 * Package: @spider-elements
848 * Author: spider-themes
849 */
850 protected function render(): void
851 {
852
853 $settings = $this->get_settings();
854 extract( $settings ); //extract all settings array to variables converted to name of a key
855
856 // Render the widget output on the frontend.
857 include "templates/video-playlist/video-playlist-{$settings['style']}.php";
858
859 }
860 }
861