PluginProbe ʕ •ᴥ•ʔ
Spider Elements – Premium Elementor Widgets & Addons Library / 1.1.0
Spider Elements – Premium Elementor Widgets & Addons Library v1.1.0
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 / Testimonial.php
spider-elements / widgets Last commit date
templates 2 years ago Accordion.php 2 years ago Alerts_Box.php 2 years ago Animated_Heading.php 2 years ago Before_after.php 2 years ago Blog_Grid.php 2 years ago Buttons.php 2 years ago Cheat_sheet.php 2 years ago Counter.php 2 years ago Fullscreen_Slider.php 2 years ago Icon_box.php 2 years ago Instagram.php 2 years ago Integrations.php 2 years ago List_Item.php 2 years ago Marquee_Slides.php 2 years ago Pricing_Table_Switcher.php 2 years ago Pricing_Table_Tabs.php 2 years ago Skill_Showcase.php 2 years ago Tabs.php 2 years ago Team_Carousel.php 2 years ago Testimonial.php 2 years ago Timeline.php 2 years ago Video_Playlist.php 2 years ago Video_Popup.php 2 years ago
Testimonial.php
1675 lines
1 <?php
2
3 namespace SPEL\Widgets;
4
5 use Elementor\Repeater;
6 use Elementor\Utils;
7 use Elementor\Widget_Base;
8 use Elementor\Controls_Manager;
9 use Elementor\Group_Control_Border;
10 use Elementor\Group_Control_Typography;
11 use Elementor\Group_Control_Background;
12
13 // Exit if accessed directly
14 if ( ! defined( 'ABSPATH' ) ) {
15 exit;
16 }
17
18
19 /**
20 * Class Testimonial
21 * @package spider\Widgets
22 */
23 class Testimonial extends Widget_Base {
24
25 public function get_name() {
26 return 'docy_testimonial'; // ID of the widget (Don't change this name)
27 }
28
29 public function get_title() {
30 return esc_html__( 'Testimonials', 'spider-elements' );
31 }
32
33 public function get_icon() {
34 return 'eicon-testimonial-carousel spel-icon';
35 }
36
37 public function get_keywords() {
38 return [ 'spider', 'spider elements', 'testimonial' ];
39 }
40
41 public function get_categories() {
42 return [ 'spider-elements' ];
43 }
44
45 /**
46 * Name: get_style_depends()
47 * Desc: Register the required CSS dependencies for the frontend.
48 */
49 public function get_style_depends() {
50 return [ 'slick', 'slick-theme', 'swiper', 'spel-main' ];
51 }
52
53 /**
54 * Name: get_script_depends()
55 * Desc: Register the required JS dependencies for the frontend.
56 */
57 public function get_script_depends() {
58 return [ 'slick', 'swiper', 'wow', 'spel-el-widgets' ];
59 }
60
61 /**
62 * Name: register_controls()
63 * Desc: Register controls for these widgets
64 * Params: no params
65 * Return: @void
66 * Since: @1.0.0
67 * Package: @spider-elements
68 * Author: spider-themes
69 */
70 protected function register_controls() {
71 $this->elementor_content_control();
72 $this->elementor_rating_controls();
73 $this->elementor_general_style();
74 $this->elementor_style_control();
75 $this->elementor_style_image();
76 $this->elementor_style_icon();
77 }
78
79 /**
80 * Name: elementor_content_control()
81 * Desc: Register the Content Tab output on the Elementor editor.
82 * Params: no params
83 * Return: @void
84 * Since: @1.0.0
85 * Package: @spider-elements
86 * Author: spider-themes
87 */
88 public function elementor_content_control() {
89
90 //========================= Select Style ======================//
91 $this->start_controls_section(
92 'select_style', [
93 'label' => esc_html__( 'Preset Skins', 'spider-elements' ),
94 ]
95 );
96
97 $this->add_control(
98 'style', [
99 'label' => esc_html__( 'Testimonials', 'spider-elements' ),
100 'type' => Controls_Manager::CHOOSE,
101 'options' => [
102 '1' => [
103 'icon' => 'testimonial1',
104 'title' => esc_html__( '01 : Carousel Testimonials', 'spider-elements' )
105 ],
106 '2' => [
107 'icon' => 'testimonial2',
108 'title' => esc_html__( '02 : Carousel Testimonials', 'spider-elements' ),
109 ],
110 '3' => [
111 'icon' => 'testimonial3',
112 'title' => esc_html__( '03 : Carousel Testimonials', 'spider-elements' ),
113 ],
114 '4' => [
115 'icon' => 'testimonial4',
116 'title' => esc_html__( '04 : Carousel Testimonials', 'spider-elements' ),
117 ],
118 '5' => [
119 'icon' => 'testimonial5',
120 'title' => esc_html__( '05 : Carousel Testimonials', 'spider-elements' ),
121 ],
122 '6' => [
123 'icon' => 'testimonial6',
124 'title' => esc_html__( '06 : Carousel Testimonials', 'spider-elements' ),
125 ],
126 '7' => [
127 'icon' => 'testimonial7',
128 'title' => esc_html__( '07 : Carousel Testimonials', 'spider-elements' ),
129 ],
130 '8' => [
131 'icon' => 'testimonial8',
132 'title' => esc_html__( '08 : Carousel Testimonials', 'spider-elements' ),
133 ],
134 '9' => [
135 'icon' => 'testimonial9',
136 'title' => esc_html__( '09 : Carousel Testimonials', 'spider-elements' ),
137 ],
138 '10' => [
139 'icon' => 'testimonial10',
140 'title' => esc_html__( '10 : Carousel Testimonials', 'spider-elements' ),
141 ],
142 '11' => [
143 'icon' => 'testimonial11',
144 'title' => esc_html__( '11 : Carousel Testimonials', 'spider-elements' ),
145 ],
146 ],
147 'default' => '1',
148 ]
149 );
150
151 $this->end_controls_section(); // End Style
152
153
154 //============================ Testimonials =========================//
155 $this->start_controls_section(
156 'sec_testimonials', [
157 'label' => esc_html__( 'Testimonials', 'spider-elements' ),
158 ]
159 );
160
161 //=== Testimonials 01
162 $testimonial = new Repeater();
163 $testimonial->add_control(
164 'author_image', [
165 'label' => esc_html__( 'Author Image', 'spider-elements' ),
166 'type' => Controls_Manager::MEDIA,
167 'default' => [
168 'url' => \Elementor\Utils::get_placeholder_image_src(),
169 ],
170 ]
171 );
172
173 $testimonial->add_control(
174 'name', [
175 'label' => esc_html__( 'Name', 'spider-elements' ),
176 'type' => Controls_Manager::TEXT,
177 'default' => esc_html__( 'Mark Tony', 'spider-elements' ),
178 ]
179 );
180
181 $testimonial->add_control(
182 'designation', [
183 'label' => esc_html__( 'Designation', 'spider-elements' ),
184 'type' => Controls_Manager::TEXT,
185 'default' => esc_html__( 'Software Developer', 'spider-elements' ),
186 ]
187 );
188
189 $testimonial->add_control(
190 'review_content', [
191 'label' => esc_html__( 'Review Content', 'spider-elements' ),
192 'type' => Controls_Manager::TEXTAREA,
193 ]
194 );
195
196 $testimonial->add_control(
197 'signature', [
198 'label' => esc_html__( 'Signature', 'spider-elements' ),
199 'type' => Controls_Manager::MEDIA,
200 'default' => [
201 'url' => \Elementor\Utils::get_placeholder_image_src(),
202 ],
203 ]
204 );
205
206 $this->add_control(
207 'testimonials', [
208 'label' => esc_html__( 'Testimonials', 'spider-elements' ),
209 'type' => Controls_Manager::REPEATER,
210 'fields' => $testimonial->get_controls(),
211 'title_field' => '{{{ name }}}',
212 'prevent_empty' => false,
213 'default' => [
214 [
215 'name' => esc_html__( 'Mark Tony', 'spider-elements' ),
216 'designation' => esc_html__( 'Software Developer', 'spider-elements' ),
217 'review_content' => esc_html__( 'Hendrerit laoreet incidunt molestie eum placeat, neque ridiculus? Maecenas incididunt aperiam tempora cumque quos?”', 'spider-elements' ),
218 ],
219 [
220 'name' => esc_html__( 'Mark Tony', 'spider-elements' ),
221 'designation' => esc_html__( 'App Developer', 'spider-elements' ),
222 'review_content' => esc_html__( 'Hendrerit laoreet incidunt molestie eum placeat, neque ridiculus? Maecenas incididunt aperiam tempora cumque quos?”', 'spider-elements' ),
223 ],
224 [
225 'name' => esc_html__( 'Mark Tony', 'spider-elements' ),
226 'designation' => esc_html__( 'UI/UX Designer', 'spider-elements' ),
227 'review_content' => esc_html__( 'Hendrerit laoreet incidunt molestie eum placeat, neque ridiculus? Maecenas incididunt aperiam tempora cumque quos?”', 'spider-elements' ),
228 ],
229 ],
230 'condition' => [
231 'style' => '1'
232 ]
233 ]
234 ); // End Testimonials 01
235
236
237 //=== Testimonials 02
238 $testimonial2 = new Repeater();
239 $testimonial2->add_control(
240 'author_image', [
241 'label' => esc_html__( 'Author Image', 'spider-elements' ),
242 'type' => Controls_Manager::MEDIA,
243 'default' => [
244 'url' => \Elementor\Utils::get_placeholder_image_src(),
245 ],
246 ]
247 );
248
249 $testimonial2->add_control(
250 'name', [
251 'label' => esc_html__( 'Name', 'spider-elements' ),
252 'type' => Controls_Manager::TEXT,
253 'default' => esc_html__( 'Mark Tony', 'spider-elements' ),
254 ]
255 );
256
257 $testimonial2->add_control(
258 'designation', [
259 'label' => esc_html__( 'Designation', 'spider-elements' ),
260 'type' => Controls_Manager::TEXT,
261 'default' => esc_html__( 'Software Developer', 'spider-elements' ),
262 ]
263 );
264
265 $testimonial2->add_control(
266 'review_content', [
267 'label' => esc_html__( 'Testimonial Text', 'spider-elements' ),
268 'type' => Controls_Manager::TEXTAREA,
269 ]
270 );
271
272 $this->add_control(
273 'testimonials2', [
274 'label' => esc_html__( 'Testimonials', 'spider-elements' ),
275 'type' => Controls_Manager::REPEATER,
276 'fields' => $testimonial2->get_controls(),
277 'title_field' => '{{{ name }}}',
278 'prevent_empty' => false,
279 'default' => [
280 [
281 'name' => esc_html__( 'Mark Tony', 'spider-elements' ),
282 'designation' => esc_html__( 'Software Developer', 'spider-elements' ),
283 'review_content' => esc_html__( 'Hendrerit laoreet incidunt molestie eum placeat, neque ridiculus? Maecenas incididunt aperiam tempora cumque quos?”', 'spider-elements' ),
284 ],
285 [
286 'name' => esc_html__( 'Mark Tony', 'spider-elements' ),
287 'designation' => esc_html__( 'App Developer', 'spider-elements' ),
288 'review_content' => esc_html__( 'Hendrerit laoreet incidunt molestie eum placeat, neque ridiculus? Maecenas incididunt aperiam tempora cumque quos?”', 'spider-elements' ),
289 ],
290 [
291 'name' => esc_html__( 'Mark Tony', 'spider-elements' ),
292 'designation' => esc_html__( 'UI/UX Designer', 'spider-elements' ),
293 'review_content' => esc_html__( 'Hendrerit laoreet incidunt molestie eum placeat, neque ridiculus? Maecenas incididunt aperiam tempora cumque quos?”', 'spider-elements' ),
294 ],
295 ],
296 'condition' => [
297 'style' => '2'
298 ]
299 ]
300 ); //End Testimonials 02
301
302 //=== Testimonials 03
303 $testimonial3 = new Repeater();
304 $testimonial3->add_control(
305 'author_image', [
306 'label' => esc_html__( 'Author Image', 'spider-elements' ),
307 'type' => Controls_Manager::MEDIA,
308 'default' => [
309 'url' => \Elementor\Utils::get_placeholder_image_src(),
310 ],
311 ]
312 );
313
314 $testimonial3->add_control(
315 'name', [
316 'label' => esc_html__( 'Name', 'spider-elements' ),
317 'type' => Controls_Manager::TEXT,
318 'default' => esc_html__( 'Mark Tony', 'spider-elements' ),
319 ]
320 );
321
322 $testimonial3->add_control(
323 'designation', [
324 'label' => esc_html__( 'Designation', 'spider-elements' ),
325 'type' => Controls_Manager::TEXT,
326 'default' => esc_html__( 'Software Developer', 'spider-elements' ),
327 ]
328 );
329
330 $testimonial3->add_control(
331 'review_content', [
332 'label' => esc_html__( 'Testimonial Text', 'spider-elements' ),
333 'type' => Controls_Manager::TEXTAREA,
334 ]
335 );
336
337 $this->add_control(
338 'testimonials3', [
339 'label' => esc_html__( 'Testimonials', 'spider-elements' ),
340 'type' => Controls_Manager::REPEATER,
341 'fields' => $testimonial3->get_controls(),
342 'title_field' => '{{{ name }}}',
343 'prevent_empty' => false,
344 'default' => [
345 [
346 'name' => esc_html__( 'Mark Tony', 'spider-elements' ),
347 'designation' => esc_html__( 'Software Developer', 'spider-elements' ),
348 'review_content' => esc_html__( 'Hendrerit laoreet incidunt molestie eum placeat, neque ridiculus? Maecenas incididunt aperiam tempora cumque quos?”', 'spider-elements' ),
349 ],
350 [
351 'name' => esc_html__( 'Mark Tony', 'spider-elements' ),
352 'designation' => esc_html__( 'App Developer', 'spider-elements' ),
353 'review_content' => esc_html__( 'Hendrerit laoreet incidunt molestie eum placeat, neque ridiculus? Maecenas incididunt aperiam tempora cumque quos?”', 'spider-elements' ),
354 ],
355 [
356 'name' => esc_html__( 'Mark Tony', 'spider-elements' ),
357 'designation' => esc_html__( 'UI/UX Designer', 'spider-elements' ),
358 'review_content' => esc_html__( 'Hendrerit laoreet incidunt molestie eum placeat, neque ridiculus? Maecenas incididunt aperiam tempora cumque quos?”', 'spider-elements' ),
359 ],
360 ],
361 'condition' => [
362 'style' => '3'
363 ]
364 ]
365 );
366
367 //End Testimonials 03
368
369 //=== Testimonials 04
370 $testimonial4 = new Repeater();
371 $testimonial4->add_control(
372 'author_image', [
373 'label' => esc_html__( 'Author Image', 'spider-elements' ),
374 'type' => Controls_Manager::MEDIA,
375 'default' => [
376 'url' => \Elementor\Utils::get_placeholder_image_src(),
377 ],
378 ]
379 );
380
381 $testimonial4->add_control(
382 'name', [
383 'label' => esc_html__( 'Name', 'spider-elements' ),
384 'type' => Controls_Manager::TEXT,
385 'default' => esc_html__( 'Mark Tony', 'spider-elements' ),
386 ]
387 );
388
389 $testimonial4->add_control(
390 'designation', [
391 'label' => esc_html__( 'Designation', 'spider-elements' ),
392 'type' => Controls_Manager::TEXT,
393 'default' => esc_html__( 'Software Developer', 'spider-elements' ),
394 ]
395 );
396
397 $testimonial4->add_control(
398 'review_content', [
399 'label' => esc_html__( 'Testimonial Text', 'spider-elements' ),
400 'type' => Controls_Manager::TEXTAREA,
401 ]
402 );
403
404 $testimonial4->add_control(
405 'c_logo', [
406 'label' => esc_html__( 'Company Logo', 'spider-elements' ),
407 'type' => Controls_Manager::MEDIA,
408 'default' => [
409 'url' => \Elementor\Utils::get_placeholder_image_src(),
410 ],
411 ]
412 );
413
414 $this->add_control(
415 'testimonials4', [
416 'label' => esc_html__( 'Testimonials', 'spider-elements' ),
417 'type' => Controls_Manager::REPEATER,
418 'fields' => $testimonial4->get_controls(),
419 'title_field' => '{{{ name }}}',
420 'prevent_empty' => false,
421 'default' => [
422 [
423 'name' => esc_html__( 'Mark Tony', 'spider-elements' ),
424 'designation' => esc_html__( 'Software Developer', 'spider-elements' ),
425 'review_content' => esc_html__( 'Hendrerit laoreet incidunt molestie eum placeat, neque ridiculus? Maecenas incididunt aperiam tempora cumque quos?”', 'spider-elements' ),
426 ],
427 [
428 'name' => esc_html__( 'Mark Tony', 'spider-elements' ),
429 'designation' => esc_html__( 'App Developer', 'spider-elements' ),
430 'review_content' => esc_html__( 'Hendrerit laoreet incidunt molestie eum placeat, neque ridiculus? Maecenas incididunt aperiam tempora cumque quos?”', 'spider-elements' ),
431 ],
432 [
433 'name' => esc_html__( 'Mark Tony', 'spider-elements' ),
434 'designation' => esc_html__( 'UI/UX Designer', 'spider-elements' ),
435 'review_content' => esc_html__( 'Hendrerit laoreet incidunt molestie eum placeat, neque ridiculus? Maecenas incididunt aperiam tempora cumque quos?”', 'spider-elements' ),
436 ],
437 ],
438 'condition' => [
439 'style' => '4'
440 ]
441 ]
442 ); //End Testimonials 04
443
444 //=== Testimonials 05
445 $testimonial5 = new Repeater();
446 $testimonial5->add_control(
447 'author_image', [
448 'label' => esc_html__( 'Author Image', 'spider-elements' ),
449 'type' => Controls_Manager::MEDIA,
450 'default' => [
451 'url' => \Elementor\Utils::get_placeholder_image_src(),
452 ],
453 ]
454 );
455
456 $testimonial5->add_control(
457 'company_name', [
458 'label' => esc_html__( 'Company Name', 'spider-elements' ),
459 'type' => Controls_Manager::TEXT,
460 'default' => esc_html__( 'Karina', 'spider-elements' ),
461 ]
462 );
463
464 $testimonial5->add_control(
465 'review_content', [
466 'label' => esc_html__( 'Testimonial Text', 'spider-elements' ),
467 'type' => Controls_Manager::TEXTAREA,
468 ]
469 );
470
471 $testimonial5->add_control(
472 'title', [
473 'label' => esc_html__( 'Title', 'spider-elements' ),
474 'type' => Controls_Manager::TEXT,
475 'default' => esc_html__( 'Madelyn Press', 'spider-elements' ),
476 ]
477 );
478
479 $testimonial5->add_control(
480 'name', [
481 'label' => esc_html__( 'Name', 'spider-elements' ),
482 'type' => Controls_Manager::TEXT,
483 'default' => esc_html__( 'Mark Tony', 'spider-elements' ),
484 ]
485 );
486
487 $this->add_control(
488 'testimonials5', [
489 'label' => esc_html__( 'Testimonials', 'spider-elements' ),
490 'type' => Controls_Manager::REPEATER,
491 'fields' => $testimonial5->get_controls(),
492 'title_field' => '{{{ name }}}',
493 'prevent_empty' => false,
494 'default' => [
495 [
496 'name' => esc_html__( 'Mark Tony', 'spider-elements' ),
497 'company_name' => esc_html__( 'Karina', 'spider-elements' ),
498 'title' => esc_html__( 'Madelyn Press', 'spider-elements' ),
499 'review_content' => esc_html__( 'Hendrerit laoreet incidunt molestie eum placeat, neque ridiculus? Maecenas incididunt aperiam tempora cumque quos?”', 'spider-elements' ),
500 ],
501 ],
502 'condition' => [
503 'style' => '5'
504 ]
505 ]
506 ); //End Testimonials 05
507
508 //=== Testimonials 06
509 $testimonial6 = new Repeater();
510 $testimonial6->add_control(
511 'author_rating',
512 [
513 'label' => esc_html__( 'Rating', 'spider-elements' ),
514 'type' => \Elementor\Controls_Manager::NUMBER,
515 'min' => 0,
516 'max' => 10,
517 'step' => 0.1,
518 'default' => 5,
519 'dynamic' => [
520 'active' => true,
521 ],
522 ]
523 );
524 $testimonial6->add_control(
525 'author_rating_title',
526 [
527 'label' => esc_html__( 'Title', 'spider-elements' ),
528 'type' => \Elementor\Controls_Manager::TEXT,
529 'separator' => 'before',
530 'default' => esc_html__( '4.8 Awesome', 'spider-elements' ),
531 ]
532 );
533 $testimonial6->add_control(
534 'company_image', [
535 'label' => esc_html__( 'Company Image', 'spider-elements' ),
536 'type' => Controls_Manager::MEDIA,
537 'default' => [
538 'url' => \Elementor\Utils::get_placeholder_image_src(),
539 ],
540 ]
541 );
542 $testimonial6->add_control(
543 'review_content', [
544 'label' => esc_html__( 'Testimonial Text', 'spider-elements' ),
545 'type' => Controls_Manager::TEXTAREA,
546 ]
547 );
548 $testimonial6->add_control(
549 'author_name', [
550 'label' => esc_html__( 'Author Name', 'spider-elements' ),
551 'type' => Controls_Manager::TEXT,
552 'default' => esc_html__( 'Karina', 'spider-elements' ),
553 ]
554 );
555 $testimonial6->add_control(
556 'author_position', [
557 'label' => esc_html__( 'Author Position', 'spider-elements' ),
558 'type' => Controls_Manager::TEXT,
559 'default' => esc_html__( 'Lead Designer', 'spider-elements' ),
560 ]
561 );
562 $testimonial6->add_control(
563 'author_image', [
564 'label' => esc_html__( 'Author Image', 'spider-elements' ),
565 'type' => Controls_Manager::MEDIA,
566 'default' => [
567 'url' => \Elementor\Utils::get_placeholder_image_src(),
568 ],
569 ]
570 );
571
572 $this->add_control(
573 'testimonials6', [
574 'label' => esc_html__( 'Testimonials', 'spider-elements' ),
575 'type' => Controls_Manager::REPEATER,
576 'fields' => $testimonial6->get_controls(),
577 'title_field' => '{{{ name }}}',
578 'prevent_empty' => false,
579 'default' => [
580 [
581 'author_name' => esc_html__( 'Karina', 'spider-elements' ),
582 'author_position' => esc_html__( 'Lead Designer', 'spider-elements' ),
583 'review_content' => esc_html__( '“Seattle opera simplifies Performance planning with deski eSignature.”', 'spider-elements' ),
584 ],
585 [
586 'author_name' => esc_html__( 'Karina', 'spider-elements' ),
587 'author_position' => esc_html__( 'Lead Designer', 'spider-elements' ),
588 'review_content' => esc_html__( '“Seattle opera simplifies Performance planning with deski eSignature.”', 'spider-elements' ),
589 ],
590 [
591 'author_name' => esc_html__( 'Karina', 'spider-elements' ),
592 'author_position' => esc_html__( 'Lead Designer', 'spider-elements' ),
593 'review_content' => esc_html__( '“Seattle opera simplifies Performance planning with deski eSignature.”', 'spider-elements' ),
594 ],
595 ],
596 'condition' => [
597 'style' => [ '6', '7', '9' ]
598 ]
599 ]
600 ); //End Testimonials 06
601
602 //=== Testimonials 08
603 $testimonial8 = new Repeater();
604 $testimonial8->add_control(
605 'review_content', [
606 'label' => esc_html__( 'Contents', 'spider-elements' ),
607 'type' => Controls_Manager::WYSIWYG,
608 ]
609 );
610
611 $testimonial8->add_control(
612 'author_name', [
613 'label' => esc_html__( 'Author Name', 'spider-elements' ),
614 'type' => Controls_Manager::TEXT,
615 'default' => esc_html__( 'Karina', 'spider-elements' ),
616 ]
617 );
618 $testimonial8->add_control(
619 'author_position', [
620 'label' => esc_html__( 'Author Position', 'spider-elements' ),
621 'type' => Controls_Manager::TEXT,
622 'default' => esc_html__( 'Lead Designer', 'spider-elements' ),
623 ]
624 );
625 $testimonial8->add_control(
626 'author_image', [
627 'label' => esc_html__( 'Author Image', 'spider-elements' ),
628 'type' => Controls_Manager::MEDIA,
629 'default' => [
630 'url' => \Elementor\Utils::get_placeholder_image_src(),
631 ],
632 ]
633 );
634
635 $this->add_control(
636 'testimonials8', [
637 'label' => esc_html__( 'Testimonials', 'spider-elements' ),
638 'type' => Controls_Manager::REPEATER,
639 'fields' => $testimonial8->get_controls(),
640 'title_field' => '{{{ name }}}',
641 'prevent_empty' => false,
642 'default' => [
643 [
644 'author_name' => esc_html__( 'Karina', 'spider-elements' ),
645 'author_position' => esc_html__( 'Italy', 'spider-elements' ),
646 'review_content' => esc_html__( '“Very easy to set-up. I had no experience with hosting before signing up with Jobi but they have made everything seem simple.”', 'spider-elements' ),
647 ],
648 [
649 'author_name' => esc_html__( 'Karina', 'spider-elements' ),
650 'author_position' => esc_html__( 'Lead Designer', 'spider-elements' ),
651 'review_content' => esc_html__( '“Very easy to set-up. I had no experience with hosting before signing up with Jobi but they have made everything seem simple.”', 'spider-elements' ),
652 ],
653 [
654 'author_name' => esc_html__( 'Karina', 'spider-elements' ),
655 'author_position' => esc_html__( 'Lead Designer', 'spider-elements' ),
656 'review_content' => esc_html__( '“Very easy to set-up. I had no experience with hosting before signing up with Jobi but they have made everything seem simple.”', 'spider-elements' ),
657 ],
658 ],
659 'condition' => [
660 'style' => [ '8' ]
661 ]
662 ]
663 ); //End Testimonials 08
664
665 //=== Testimonials 10
666 $testimonial10 = new Repeater();
667 $testimonial10->add_control(
668 'review_content', [
669 'label' => esc_html__( 'Testimonial Text', 'spider-elements' ),
670 'type' => Controls_Manager::TEXTAREA,
671 ]
672 );
673 $testimonial10->add_control(
674 'author_name', [
675 'label' => esc_html__( 'Author Name', 'spider-elements' ),
676 'type' => Controls_Manager::TEXT,
677 'default' => esc_html__( 'Karina', 'spider-elements' ),
678 ]
679 );
680 $testimonial10->add_control(
681 'author_position', [
682 'label' => esc_html__( 'Author Position', 'spider-elements' ),
683 'type' => Controls_Manager::TEXT,
684 'default' => esc_html__( 'Lead Designer', 'spider-elements' ),
685 ]
686 );
687 $testimonial10->add_control(
688 'author_image', [
689 'label' => esc_html__( 'Author Image', 'spider-elements' ),
690 'type' => Controls_Manager::MEDIA,
691 'default' => [
692 'url' => \Elementor\Utils::get_placeholder_image_src(),
693 ],
694 ]
695 );
696
697 $this->add_control(
698 'testimonials10', [
699 'label' => esc_html__( 'Testimonials', 'spider-elements' ),
700 'type' => Controls_Manager::REPEATER,
701 'fields' => $testimonial10->get_controls(),
702 'title_field' => '{{{ name }}}',
703 'prevent_empty' => false,
704 'default' => [
705 [
706 'author_name' => esc_html__( 'Karina', 'spider-elements' ),
707 'author_position' => esc_html__( 'Italy', 'spider-elements' ),
708 'review_content' => esc_html__( '“Very easy to set-up. I had no experience with hosting before signing up with Jobi but they have made everything seem simple.”', 'spider-elements' ),
709 ],
710 [
711 'author_name' => esc_html__( 'Karina', 'spider-elements' ),
712 'author_position' => esc_html__( 'Lead Designer', 'spider-elements' ),
713 'review_content' => esc_html__( '“Seattle opera simplifies Performance planning with deski eSignature.”', 'spider-elements' ),
714 ],
715 [
716 'author_name' => esc_html__( 'Karina', 'spider-elements' ),
717 'author_position' => esc_html__( 'Lead Designer', 'spider-elements' ),
718 'review_content' => esc_html__( '“Seattle opera simplifies Performance planning with deski eSignature.”', 'spider-elements' ),
719 ],
720 ],
721 'condition' => [
722 'style' => '10'
723 ]
724 ]
725 ); //End Testimonials 10
726
727 //=== Testimonials 11
728 $testimonial11 = new Repeater();
729 $testimonial11->add_control(
730 'review_content', [
731 'label' => esc_html__( 'Testimonial Text', 'spider-elements' ),
732 'type' => Controls_Manager::TEXTAREA,
733 ]
734 );
735 $testimonial11->add_control(
736 'author_name', [
737 'label' => esc_html__( 'Author Name', 'spider-elements' ),
738 'type' => Controls_Manager::TEXT,
739 'default' => esc_html__( 'Karina', 'spider-elements' ),
740 ]
741 );
742 $testimonial11->add_control(
743 'author_position', [
744 'label' => esc_html__( 'Author Position', 'spider-elements' ),
745 'type' => Controls_Manager::TEXT,
746 'default' => esc_html__( 'Lead Designer', 'spider-elements' ),
747 ]
748 );
749 $testimonial11->add_control(
750 'author_image', [
751 'label' => esc_html__( 'Author Image', 'spider-elements' ),
752 'type' => Controls_Manager::MEDIA,
753 'default' => [
754 'url' => \Elementor\Utils::get_placeholder_image_src(),
755 ],
756 ]
757 );
758
759 $this->add_control(
760 'testimonials11', [
761 'label' => esc_html__( 'Testimonials', 'spider-elements' ),
762 'type' => Controls_Manager::REPEATER,
763 'fields' => $testimonial11->get_controls(),
764 'title_field' => '{{{ name }}}',
765 'prevent_empty' => false,
766 'default' => [
767 [
768 'author_name' => esc_html__( 'Karina', 'spider-elements' ),
769 'author_position' => esc_html__( 'Italy', 'spider-elements' ),
770 'review_content' => esc_html__( '“Very easy to set-up. I had no experience with hosting before signing up with Jobi but they have made everything seem simple.”', 'spider-elements' ),
771 ],
772 [
773 'author_name' => esc_html__( 'Karina', 'spider-elements' ),
774 'author_position' => esc_html__( 'Lead Designer', 'spider-elements' ),
775 'review_content' => esc_html__( '“Seattle opera simplifies Performance planning with deski eSignature.”', 'spider-elements' ),
776 ],
777 [
778 'author_name' => esc_html__( 'Karina', 'spider-elements' ),
779 'author_position' => esc_html__( 'Lead Designer', 'spider-elements' ),
780 'review_content' => esc_html__( '“Seattle opera simplifies Performance planning with deski eSignature.”', 'spider-elements' ),
781 ],
782 ],
783 'condition' => [
784 'style' => '11'
785 ]
786 ]
787 ); //End Testimonials 11
788
789
790 $this->add_control(
791 'shape', [
792 'label' => esc_html__( 'Shape', 'spider-elements' ),
793 'type' => Controls_Manager::MEDIA,
794 'separator' => 'before',
795 'condition' => [
796 'style' => '1'
797 ],
798 ]
799 );
800 $this->add_control(
801 'quote_img', [
802 'label' => esc_html__( 'Quote Image', 'spider-elements' ),
803 'type' => Controls_Manager::MEDIA,
804 'separator' => 'before',
805 'default' => [
806 'url' => \Elementor\Utils::get_placeholder_image_src(),
807 ],
808 'condition' => [
809 'style' => '10'
810 ],
811 ]
812 );
813
814 $this->add_control(
815 'quote_icon',
816 [
817 'label' => esc_html__( 'Quote Icon', 'spider-elements' ),
818 'type' => Controls_Manager::ICONS,
819 'default' => [
820 'value' => 'fas fa-circle',
821 'library' => 'fa-solid',
822 ],
823 'condition' => [
824 'style' => '4'
825 ],
826 ]
827 );
828
829 $this->end_controls_section(); // End Testimonials
830
831 }
832
833 // Testimonial Repeater
834 protected function elementor_rating_controls() {
835 $this->start_controls_section(
836 'section_rating',
837 [
838 'label' => esc_html__( 'Rating', 'spider-elements' ),
839 'condition' => [
840 'style' => [ '6', '7', '9' ]
841 ],
842 ],
843
844 );
845
846 $this->add_control(
847 'testimonial_ratting_icon',
848 [
849 'label' => esc_html__( 'Show Title', 'spider-elements' ),
850 'type' => \Elementor\Controls_Manager::SWITCHER,
851 'label_on' => esc_html__( 'Show', 'spider-elements' ),
852 'label_off' => esc_html__( 'Hide', 'spider-elements' ),
853 'return_value' => 'yes',
854 'default' => 'yes',
855 ]
856 );
857
858
859 $this->add_control(
860 'rating_scale',
861 [
862 'label' => esc_html__( 'Rating Scale', 'spider-elements' ),
863 'type' => \Elementor\Controls_Manager::SELECT,
864 'options' => [
865 '5' => '0-5',
866 '10' => '0-10',
867 ],
868 'default' => '5',
869 'condition' => [
870 'testimonial_ratting_icon' => [ 'yes' ],
871 ],
872 ]
873 );
874
875 $this->add_control(
876 'star_style',
877 [
878 'label' => esc_html__( 'Icon', 'spider-elements' ),
879 'type' => \Elementor\Controls_Manager::SELECT,
880 'options' => [
881 'star_fontawesome' => 'Font Awesome',
882 'star_unicode' => 'Unicode',
883 ],
884 'default' => 'star_fontawesome',
885 'render_type' => 'template',
886 'prefix_class' => 'elementor--star-style-',
887 'separator' => 'before',
888 ]
889 );
890
891 $this->add_control(
892 'unmarked_star_style',
893 [
894 'label' => esc_html__( 'Unmarked Style', 'spider-elements' ),
895 'type' => \Elementor\Controls_Manager::CHOOSE,
896 'options' => [
897 'solid' => [
898 'title' => esc_html__( 'Solid', 'spider-elements' ),
899 'icon' => 'eicon-star',
900 ],
901 'outline' => [
902 'title' => esc_html__( 'Outline', 'spider-elements' ),
903 'icon' => 'eicon-star-o',
904 ],
905 ],
906 'default' => 'solid',
907 ]
908 );
909
910 $this->end_controls_section();
911 }
912
913
914 /**
915 * Name: elementor_style_control()
916 * Desc: Register the Style Tab output on the Elementor editor.
917 * Params: no params
918 * Return: @void
919 * Since: @1.0.0
920 * Package: @spider-elements
921 * Author: spider-themes
922 */
923
924 public function elementor_general_style() {
925 $this->start_controls_section(
926 'style_item_tabs', [
927 'label' => esc_html__( 'Testimonial Item', 'spider-elements' ),
928 'tab' => Controls_Manager::TAB_STYLE,
929 'condition' => [
930 'style' => [ '6', '7', '9' ]
931 ]
932 ]
933 );
934
935 $this->start_controls_tabs(
936 'style_testimonial_item_tabs'
937 );
938
939 //=== Normal testimonial
940 $this->start_controls_tab(
941 'style_normal',
942 [
943 'label' => esc_html__( 'Normal', 'spider-elements' ),
944 ]
945 );
946
947 $this->add_group_control(
948 Group_Control_Background::get_type(),
949 [
950 'name' => 'testimonial_item_background',
951 'types' => [ 'classic', 'gradient' ],
952 'selector' => '{{WRAPPER}} .feedback-block-one,
953 {{WRAPPER}} .testimonial-item,
954 {{WRAPPER}} .feedback-section-four .bg-wrapper ',
955 ]
956 );
957
958 $this->add_group_control(
959 Group_Control_Background::get_type(),
960 [
961 'name' => 'background',
962 'types' => [ 'classic', 'gradient', 'video' ],
963 'selector' => '{{WRAPPER}} .testimonial-item,
964 {{WRAPPER}} .feedback-section-four .bg-wrapper',
965 'condition' => [
966 'style' => [ '5', '10' ],
967 'style!' => [ '9' ]
968 ]
969 ]
970 );
971
972 $this->add_responsive_control(
973 'testimonial_item_pad',
974 [
975 'label' => esc_html__( 'Padding', 'spider-elements' ),
976 'type' => Controls_Manager::DIMENSIONS,
977 'size_units' => [ 'px', '%', 'em' ],
978 'selectors' => [
979 '{{WRAPPER}} .feedback-block-one' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
980 '{{WRAPPER}} .testimonial-item' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
981 ],
982 ]
983 );
984
985 $this->add_responsive_control(
986 'testimonial_item_mar',
987 [
988 'label' => esc_html__( 'Margin', 'spider-elements' ),
989 'type' => Controls_Manager::DIMENSIONS,
990 'size_units' => [ 'px', '%', 'em' ],
991 'selectors' => [
992 '{{WRAPPER}} .feedback-slider-two .item' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
993 ],
994 'condition' => [
995 'style' => '9'
996 ]
997 ]
998 );
999
1000 $this->add_group_control(
1001 \Elementor\Group_Control_Border::get_type(),
1002 [
1003 'name' => 'item_border',
1004 'label' => esc_html__( 'Border', 'spider-elements' ),
1005 'selector' => '{{WRAPPER}} .feedback-block-one,
1006 {{WRAPPER}} .testimonial-item,
1007 {{WRAPPER}} .feedback-section-four .bg-wrapper
1008 ',
1009 ]
1010 );
1011
1012 $this->add_responsive_control(
1013 'item_border_radius',
1014 [
1015 'label' => esc_html__( 'Border Radius', 'spider-elements' ),
1016 'type' => Controls_Manager::DIMENSIONS,
1017 'size_units' => [ 'px', '%', 'em' ],
1018 'selectors' => [
1019 '{{WRAPPER}} .feedback-block-one' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1020 '{{WRAPPER}} .testimonial-item' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1021 '{{WRAPPER}} .feedback-section-four .bg-wrapper' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1022 ],
1023 ]
1024 );
1025
1026 $this->end_controls_tab(); //End Normal Testimonial
1027
1028
1029 //=== Hover Testimonial
1030 $this->start_controls_tab(
1031 'testimonial_item_hover', [
1032 'label' => esc_html__( 'Hover', 'spider-elements' ),
1033 ]
1034 );
1035
1036 $this->add_group_control(
1037 Group_Control_Background::get_type(),
1038 [
1039 'name' => 'item_hover_background',
1040 'types' => [ 'classic', 'gradient' ],
1041 'selector' => '{{WRAPPER}} .feedback-block-one:hover',
1042 ]
1043 );
1044
1045 $this->add_control(
1046 'testimonial_item_hover_border', [
1047 'label' => esc_html__( 'Border Color', 'spider-elements' ),
1048 'type' => Controls_Manager::COLOR,
1049 'selectors' => [
1050 '{{WRAPPER}} .feedback-block-one:hover' => 'border-color: {{VALUE}};',
1051 ],
1052 ]
1053 );
1054 $this->end_controls_tab(); // End testimonial hover Tab
1055
1056 $this->end_controls_tabs(); // End Accordion icon Normal/Active/ State
1057 $this->end_controls_section(); // End Contents Style
1058
1059
1060 //========================= Arrow Icons =======================//
1061 $this->start_controls_section(
1062 'arrow_icons_sec', [
1063 'label' => esc_html__( 'Arrow Icon', 'textdomain' ),
1064 'condition' => [
1065 'style' => ['8', '10']
1066 ]
1067 ]
1068 );
1069
1070 $this->add_control(
1071 'prev_arrow_icon', [
1072 'label' => esc_html__( 'Prev Icon', 'textdomain' ),
1073 'type' => \Elementor\Controls_Manager::ICONS,
1074 'default' => [
1075 'value' => 'arrow_carrot-left',
1076 'library' => 'ElegantIcons'
1077 ],
1078 ]
1079 );
1080
1081 $this->add_control(
1082 'next_arrow_icon', [
1083 'label' => esc_html__( 'Next Icon', 'textdomain' ),
1084 'type' => \Elementor\Controls_Manager::ICONS,
1085 'default' => [
1086 'value' => 'arrow_carrot-right',
1087 'library' => 'ElegantIcons'
1088 ],
1089 ]
1090 );
1091
1092 $this->end_controls_section(); //End Arrow Icons
1093
1094 }
1095
1096
1097 public function elementor_style_control() {
1098 //========================= Contents =========================//
1099 $this->start_controls_section(
1100 'style_content_sec', [
1101 'label' => esc_html__( 'Contents', 'spider-elements' ),
1102 'tab' => Controls_Manager::TAB_STYLE,
1103 ]
1104 );
1105
1106 //=== Title Style
1107 $this->add_control(
1108 'title_style', [
1109 'label' => esc_html__( 'Title', 'spider-elements' ),
1110 'type' => Controls_Manager::HEADING,
1111 'separator' => 'before',
1112 'condition' => [
1113 'style' => [ '5' ],
1114 'style!' => [ '1', '2', '3', ]
1115 ]
1116 ]
1117 );
1118
1119 $this->add_group_control(
1120 Group_Control_Typography::get_type(), [
1121 'name' => 'title_typo',
1122 'selector' => '{{WRAPPER}} .se_title',
1123 'condition' => [
1124 'style' => [ '5' ],
1125 'style!' => [ '1', '2', '3', ]
1126 ]
1127 ]
1128 );
1129
1130 $this->add_control(
1131 'title_color', [
1132 'label' => esc_html__( 'Text Color', 'spider-elements' ),
1133 'type' => Controls_Manager::COLOR,
1134 'selectors' => [
1135 '{{WRAPPER}} .se_title' => 'color: {{VALUE}};',
1136 ],
1137 'condition' => [
1138 'style' => [ '5' ],
1139 'style!' => [ '1', '2', '3', ]
1140 ]
1141 ]
1142 );
1143
1144 //End Title Style
1145
1146 //=== Author Name
1147 $this->add_control(
1148 'author_name_options', [
1149 'label' => esc_html__( 'Author Name', 'spider-elements' ),
1150 'type' => Controls_Manager::HEADING,
1151 'separator' => 'before',
1152 ]
1153 );
1154
1155 $this->add_group_control(
1156 Group_Control_Typography::get_type(), [
1157 'name' => 'author_name_typo',
1158 'selector' => '{{WRAPPER}} .se_name,
1159 {{WRAPPER}} .feedback-block-one .name,
1160 {{WRAPPER}} #feedBack_carousel .name,
1161 {{WRAPPER}} .feedback-section-four .bg-wrapper .name',
1162 ]
1163 );
1164
1165 $this->add_control(
1166 'author_name_color', [
1167 'label' => esc_html__( 'Text Color', 'spider-elements' ),
1168 'type' => Controls_Manager::COLOR,
1169 'selectors' => [
1170 '{{WRAPPER}} .se_name' => 'color: {{VALUE}};',
1171 '{{WRAPPER}} .feedback-block-one .name' => 'color: {{VALUE}};',
1172 '{{WRAPPER}} #feedBack_carousel .name' => 'color: {{VALUE}};',
1173 '{{WRAPPER}} .feedback-section-four .bg-wrapper .name' => 'color: {{VALUE}};',
1174 ],
1175 ]
1176 );
1177 //End Author Name
1178
1179 //=== Review Content
1180 $this->add_control(
1181 'review_content_options', [
1182 'label' => esc_html__( 'Review Content', 'spider-elements' ),
1183 'type' => Controls_Manager::HEADING,
1184 'separator' => 'before',
1185 ]
1186 );
1187
1188 $this->add_group_control(
1189 Group_Control_Typography::get_type(), [
1190 'name' => 'review_text_typo',
1191 'selector' => '{{WRAPPER}} .se_review_content,
1192 {{WRAPPER}} .feedback-block-one h3,
1193 {{WRAPPER}} #feedBack_carousel .carousel-inner p,
1194 {{WRAPPER}} .feedback-section-four .bg-wrapper p',
1195 ]
1196 );
1197
1198 $this->add_control(
1199 'review_content_color', [
1200 'label' => esc_html__( 'Text Color', 'spider-elements' ),
1201 'type' => Controls_Manager::COLOR,
1202 'selectors' => [
1203 '{{WRAPPER}} .se_review_content' => 'color: {{VALUE}};',
1204 '{{WRAPPER}} .feedback-block-one h3' => 'color: {{VALUE}};',
1205 '{{WRAPPER}} #feedBack_carousel .carousel-inner p' => 'color: {{VALUE}};',
1206 '{{WRAPPER}} .feedback-section-four .bg-wrapper p' => 'color: {{VALUE}};',
1207 ],
1208 ]
1209 );
1210
1211 $this->add_control(
1212 'border_color', [
1213 'label' => esc_html__( 'Border Color', 'spider-elements' ),
1214 'type' => Controls_Manager::COLOR,
1215 'selectors' => [
1216 '{{WRAPPER}} .testimonial-slider-inner .testimonial-item' => 'border-color: {{VALUE}};',
1217 ],
1218 'condition' => [
1219 'style' => [ '3' ],
1220 'style!' => [ '1', '2', '4', '5', '6', '7', '8', '9' ]
1221 ]
1222 ]
1223 );
1224
1225 $this->add_responsive_control(
1226 'Content_margin',
1227 [
1228 'label' => esc_html__( 'Margin', 'spider-elements' ),
1229 'type' => Controls_Manager::DIMENSIONS,
1230 'size_units' => [ 'px', '%', 'em' ],
1231 'selectors' => [
1232 '{{WRAPPER}} .feedback-block-two h3' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1233 '{{WRAPPER}} .feedback-block-one h3' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1234 '{{WRAPPER}} .feedback-block-three h3' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1235 '{{WRAPPER}} .testimonial-slider-inner .testimonial-item p' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1236 ],
1237 'condition' => [
1238 'style' => [ '3', '6', '7', '9' ]
1239 ]
1240 ]
1241 );
1242
1243 //End Review Content
1244
1245 //=== Category Style
1246 $this->add_control(
1247 'category_options', [
1248 'label' => esc_html__( 'Category', 'spider-elements' ),
1249 'type' => Controls_Manager::HEADING,
1250 'separator' => 'before',
1251 'condition' => [
1252 'style' => '5'
1253 ]
1254 ]
1255 );
1256
1257 $this->add_group_control(
1258 Group_Control_Typography::get_type(), [
1259 'name' => 'category_typo',
1260 'selector' => '{{WRAPPER}} .se_category',
1261 'condition' => [
1262 'style' => '5'
1263 ]
1264 ]
1265 );
1266
1267 $this->add_control(
1268 'category_color', [
1269 'label' => esc_html__( 'Text Color', 'spider-elements' ),
1270 'type' => Controls_Manager::COLOR,
1271 'selectors' => [
1272 '{{WRAPPER}} .se_category' => 'color: {{VALUE}};',
1273 ],
1274 'condition' => [
1275 'style' => '5'
1276 ]
1277 ]
1278
1279 );//End Category Style
1280
1281 //=== Designation
1282 $this->add_control(
1283 'designation_options', [
1284 'label' => esc_html__( 'Designation', 'spider-elements' ),
1285 'type' => Controls_Manager::HEADING,
1286 'separator' => 'before',
1287 'condition' => [
1288 'style' => [ '1', '2', '3', '4', '9', '11' ]
1289 ]
1290 ]
1291 );
1292
1293 $this->add_group_control(
1294 Group_Control_Typography::get_type(), [
1295 'name' => 'designation_typo',
1296 'selector' => '{{WRAPPER}} .se_designation,
1297 {{WRAPPER}} .feedback-block-two .block-footer span,
1298 {{WRAPPER}} .testimonial-area .author-info p',
1299 'condition' => [
1300 'style' => [ '1', '2', '3', '4', '9', '11' ]
1301 ]
1302 ]
1303 );
1304
1305 $this->add_control(
1306 'designation_color', [
1307 'label' => esc_html__( 'Text Color', 'spider-elements' ),
1308 'type' => Controls_Manager::COLOR,
1309 'selectors' => [
1310 '{{WRAPPER}} .se_designation' => 'color: {{VALUE}};',
1311 '{{WRAPPER}} .feedback-block-two .block-footer span' => 'color: {{VALUE}};',
1312 '{{WRAPPER}} .testimonial-area .author-info p' => 'color: {{VALUE}};',
1313 ],
1314 'condition' => [
1315 'style' => [ '1', '2', '3', '4', '9', '11' ]
1316 ]
1317 ]
1318 );
1319
1320 //End Designation
1321
1322 // // Item BG color style 5
1323 // $this->add_control(
1324 // 'item_bg_color', [
1325 // 'label' => esc_html__( 'Item Background Color', 'spider-elements' ),
1326 // 'type' => Controls_Manager::HEADING,
1327 // 'separator' => 'before',
1328 // 'condition' => [
1329 // 'style' => [ '5', '10' ]
1330 // ]
1331 // ]
1332 // );
1333 //
1334 // $this->add_responsive_control(
1335 // 'feedback-section-four-item-pad',
1336 // [
1337 // 'label' => esc_html__( 'Padding', 'spider-elements' ),
1338 // 'type' => Controls_Manager::DIMENSIONS,
1339 // 'size_units' => [ 'px', '%', 'em' ],
1340 // 'selectors' => [
1341 // '{{WRAPPER}} .feedback-section-four .bg-wrapper' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1342 // ],
1343 // 'condition' => [
1344 // 'style' => [ '5', '10' ]
1345 // ]
1346 // ]
1347 // );
1348
1349 $this->end_controls_section();
1350
1351 //========================= Contents =========================//
1352 $this->start_controls_section(
1353 'style_rating_sec', [
1354 'label' => esc_html__( 'Rating', 'spider-elements' ),
1355 'tab' => Controls_Manager::TAB_STYLE,
1356 'condition' => [
1357 'style' => [ '6', '7', '9' ]
1358 ]
1359 ]
1360 );
1361
1362 $this->add_group_control(
1363 Group_Control_Typography::get_type(), [
1364 'name' => 'rating_title_typo',
1365 'selector' => '{{WRAPPER}} .feedback-block-one .review .text-md,
1366 {{WRAPPER}} .feedback-block-two .review .text-md,
1367 {{WRAPPER}} .feedback-block-three .review .text-md',
1368 'condition' => [
1369 'style' => [ '6', '7', '9' ]
1370 ]
1371 ]
1372 );
1373
1374 $this->add_control(
1375 'rating_title_color', [
1376 'label' => esc_html__( 'Text Color', 'spider-elements' ),
1377 'type' => Controls_Manager::COLOR,
1378 'selectors' => [
1379 '{{WRAPPER}} .feedback-block-one .review .text-md' => 'color: {{VALUE}};',
1380 '{{WRAPPER}} .feedback-block-two .review .text-md' => 'color: {{VALUE}};',
1381 '{{WRAPPER}} .feedback-block-three .review .text-md' => 'color: {{VALUE}};',
1382 ],
1383 'condition' => [
1384 'style' => [ '6', '7', '9' ]
1385 ]
1386 ]
1387 );
1388
1389 $this->add_responsive_control(
1390 'rating_pad',
1391 [
1392 'label' => esc_html__( 'Padding', 'spider-elements' ),
1393 'type' => Controls_Manager::DIMENSIONS,
1394 'size_units' => [ 'px', '%', 'em' ],
1395 'selectors' => [
1396 '{{WRAPPER}} .feedback-block-one .review' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1397 ],
1398 'condition' => [
1399 'style' => [ '6' ],
1400 'style!' => [ '7', '9' ]
1401 ]
1402 ]
1403 );
1404 $this->add_group_control(
1405 \Elementor\Group_Control_Border::get_type(),
1406 [
1407 'name' => 'review_border',
1408 'label' => esc_html__( 'Border', 'spider-elements' ),
1409 'selector' => '{{WRAPPER}} .feedback-block-one .review',
1410 'condition' => [
1411 'style' => [ '6' ],
1412 'style!' => [ '7', '9' ]
1413 ]
1414 ]
1415 );
1416
1417 $this->add_control(
1418 'rating_star_color', [
1419 'label' => esc_html__( 'Star Color', 'spider-elements' ),
1420 'type' => Controls_Manager::COLOR,
1421 'selectors' => [
1422 '{{WRAPPER}} .feedback-block-one .star-rating i::before' => 'color: {{VALUE}};',
1423 '{{WRAPPER}} .feedback-block-three .star-rating i:before' => 'color: {{VALUE}};',
1424 ],
1425 'condition' => [
1426 'style' => [ '6', '7', '9' ]
1427 ]
1428 ]
1429 );
1430
1431 $this->end_controls_section();
1432
1433 }
1434
1435
1436 public function elementor_style_image() {
1437 //========================= Contents =========================//
1438 $this->start_controls_section(
1439 'style_image', [
1440 'label' => esc_html__( 'Image', 'spider-elements' ),
1441 'tab' => Controls_Manager::TAB_STYLE,
1442 'condition' => [
1443 'style' => [ '3' ]
1444 ]
1445 ]
1446 );
1447
1448 $this->add_responsive_control(
1449 'image_size',
1450 [
1451 'label' => esc_html__( 'Size', 'spider-elements' ),
1452 'type' => Controls_Manager::SLIDER,
1453 'size_units' => [ 'px', '%', 'em', 'rem', 'vw', 'custom' ],
1454 'range' => [
1455 'px' => [
1456 'min' => 6,
1457 'max' => 1000,
1458 ],
1459 ],
1460 'selectors' => [
1461 '{{WRAPPER}} .testimonial-slider-inner .author-image img' => 'width: {{SIZE}}{{UNIT}};',
1462 ],
1463 ]
1464 );
1465
1466 $this->add_control(
1467 'img_bg_color',
1468 [
1469 'label' => esc_html__( 'Background', 'spider-elements' ),
1470 'type' => Controls_Manager::COLOR,
1471 'selectors' => [
1472 '{{WRAPPER}} .testimonial-slider-inner .author-image' => 'background: {{VALUE}}',
1473 ],
1474 ]
1475 );
1476
1477 //=== shape Style
1478 $this->add_control(
1479 'shape_style', [
1480 'label' => esc_html__( 'Shape', 'spider-elements' ),
1481 'type' => Controls_Manager::HEADING,
1482 'separator' => 'before',
1483 ]
1484 );
1485
1486 $this->add_responsive_control(
1487 'shape_size',
1488 [
1489 'label' => esc_html__( 'Size', 'spider-elements' ),
1490 'type' => Controls_Manager::SLIDER,
1491 'size_units' => [ 'px', '%', 'em', 'rem', 'vw', 'custom' ],
1492 'range' => [
1493 'px' => [
1494 'min' => 6,
1495 'max' => 500,
1496 ],
1497 ],
1498 'selectors' => [
1499 '{{WRAPPER}} .quote-img-top img, .quote-img-bottom img' => 'width: {{SIZE}}{{UNIT}}; height: {{SIZE}}{{UNIT}};',
1500 ],
1501 ]
1502 );
1503
1504 $this->end_controls_section();
1505 }
1506
1507 // start testimonial style 3 icon section======//
1508 public function elementor_style_icon() {
1509 //========================= Contents =========================//
1510 $this->start_controls_section(
1511 'style_icon', [
1512 'label' => esc_html__( 'Icon', 'spider-elements' ),
1513 'tab' => Controls_Manager::TAB_STYLE,
1514 'condition' => [
1515 'style' => [ '3' ]
1516 ]
1517 ]
1518 );
1519
1520 $this->start_controls_tabs(
1521 'style_tabs'
1522 );
1523
1524 $this->start_controls_tab(
1525 'style_icon_normal_tab',
1526 [
1527 'label' => esc_html__( 'Normal', 'spider-elements' ),
1528 ]
1529 );
1530
1531 $this->add_responsive_control(
1532 'icon_size',
1533 [
1534 'label' => esc_html__( 'Size', 'spider-elements' ),
1535 'type' => Controls_Manager::SLIDER,
1536 'size_units' => [ 'px', '%' ],
1537 'range' => [
1538 'px' => [
1539 'min' => 6,
1540 'max' => 100,
1541 ],
1542 ],
1543 'selectors' => [
1544 '{{WRAPPER}} .testimonial_area_nine .navigation .swiper-button-prev:after' => 'font-size: {{SIZE}}{{UNIT}}',
1545 '{{WRAPPER}} .testimonial_area_nine .navigation .swiper-button-next:after' => 'font-size: {{SIZE}}{{UNIT}}',
1546 ],
1547 ]
1548 );
1549
1550 $this->add_control(
1551 'icon_hover_color',
1552 [
1553 'label' => esc_html__( 'Color', 'spider-elements' ),
1554 'type' => Controls_Manager::COLOR,
1555 'selectors' => [
1556 '{{WRAPPER}} .testimonial_area_nine .navigation .swiper-button-prev:after, .testimonial_area_nine .navigation .swiper-button-next:after' => 'color: {{VALUE}}',
1557 ],
1558 ]
1559 );
1560
1561 $this->add_control(
1562 'icon_bg_color',
1563 [
1564 'label' => esc_html__( 'Background', 'spider-elements' ),
1565 'type' => Controls_Manager::COLOR,
1566 'selectors' => [
1567 '{{WRAPPER}} .testimonial_area_nine .navigation .swiper-button-prev' => 'background: {{VALUE}}',
1568 '{{WRAPPER}} .testimonial_area_nine .navigation .swiper-button-next' => 'background: {{VALUE}}',
1569 ],
1570 ]
1571 );
1572
1573 $this->end_controls_tab();
1574
1575 $this->start_controls_tab(
1576 'style_hover_tab',
1577 [
1578 'label' => esc_html__( 'Hover', 'spider-elements' ),
1579 ]
1580 );
1581
1582 $this->add_control(
1583 'icon_color',
1584 [
1585 'label' => esc_html__( 'Color', 'spider-elements' ),
1586 'type' => Controls_Manager::COLOR,
1587 'selectors' => [
1588 '{{WRAPPER}} .testimonial_area_nine .navigation .swiper-button-prev:hover:after, .testimonial_area_nine .navigation .swiper-button-next:hover:after' => 'color: {{VALUE}}',
1589 ],
1590 ]
1591 );
1592
1593 $this->add_control(
1594 'icon_bg_hover_color',
1595 [
1596 'label' => esc_html__( 'Background', 'spider-elements' ),
1597 'type' => Controls_Manager::COLOR,
1598 'selectors' => [
1599 '{{WRAPPER}} .testimonial_area_nine .navigation .swiper-button-prev:hover' => 'background: {{VALUE}}',
1600 '{{WRAPPER}} .testimonial_area_nine .navigation .swiper-button-next:hover' => 'background: {{VALUE}}',
1601 ],
1602 ]
1603 );
1604
1605 $this->end_controls_tab();
1606 // end icon hover
1607 $this->end_controls_tabs();
1608 // end icon normal and hover tabs style
1609 $this->end_controls_section();
1610 }
1611 // end testimonial style 3 icon style section============//
1612
1613
1614 /**
1615 * Print the actual stars and calculate their filling.
1616 *
1617 * Rating type is float to allow stars-count to be a fraction.
1618 * Floored-rating type is int, to represent the rounded-down stars count.
1619 * In the `for` loop, the index type is float to allow comparing with the rating value.
1620 *
1621 * @since 2.3.0
1622 * @access protected
1623 */
1624 protected function render_stars( $icon, $dat = 0 ) {
1625 $rating_data = $this->get_rating( $dat );
1626 $rating = (float) $rating_data[0];
1627 $floored_rating = floor( $rating );
1628 $stars_html = '';
1629
1630 for ( $stars = 1.0; $stars <= $rating_data[1]; $stars ++ ) {
1631 if ( $stars <= $floored_rating ) {
1632 $stars_html .= '<i class="elementor-star-full">' . $icon . '</i>';
1633 } elseif ( $floored_rating + 1 === $stars && $rating !== $floored_rating ) {
1634 $stars_html .= '<i class="elementor-star-' . ( $rating - $floored_rating ) * 10 . '">' . $icon . '</i>';
1635 } else {
1636 $stars_html .= '<i class="elementor-star-empty">' . $icon . '</i>';
1637 }
1638 }
1639
1640 return $stars_html;
1641 }
1642
1643 /**
1644 * @since 2.3.0
1645 * @access protected
1646 */
1647 protected function get_rating( $ratting ) {
1648 $settings = $this->get_settings_for_display();
1649 $rating_scale = (int) $settings['rating_scale'];
1650 $rating = (float) $ratting > $rating_scale ? $rating_scale : $ratting;
1651
1652 return [ $rating, $rating_scale ];
1653 }
1654
1655 /**
1656 * Name: elementor_render()
1657 * Desc: Render the widget output on the frontend.
1658 * Params: no params
1659 * Return: @void
1660 * Since: @1.0.0
1661 * Package: @spider-elements
1662 * Author: spider-themes
1663 */
1664 protected function render() {
1665 $settings = $this->get_settings_for_display();
1666 extract( $settings ); //extract all settings array to variables converted to name of key
1667 $icon = '&#xE934;';
1668
1669 $testimonial_id = $this->get_id();
1670
1671 //======================== Template Parts ==========================//
1672 include "templates/testimonials/testimonial-{$settings['style']}.php";
1673
1674 }
1675 }