PluginProbe
Ultimate Store Kit – Store Builder Addons for Elementor, WooCommerce Store Builder, EDD Store Builder / 3.0.7
Ultimate Store Kit – Store Builder Addons for Elementor, WooCommerce Store Builder, EDD Store Builder v3.0.7
3.1.4 3.0.8 3.0.9 3.1.0 3.1.2 3.1.3 3.0.7 3.0.5 3.0.4 3.0.3 3.0.2 trunk 1.5.0 1.5.1 1.5.2 1.6.1 1.6.2 1.6.3 1.6.4 2.0.0 2.0.1 2.0.2 2.0.3 2.0.4 2.0.5 All 93 releases
ultimate-store-kit / modules / featured-box / widgets / featured-box.php

featured-box.php in Ultimate Store Kit – Store Builder Addons for Elementor, WooCommerce Store Builder, EDD Store Builder 3.0.7, at modules/featured-box/widgets/featured-box.php

1,515 lines 48.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace UltimateStoreKit\Modules\FeaturedBox\Widgets;
4
5 use Elementor\Controls_Manager;
6 use Elementor\Group_Control_Background;
7 use Elementor\Group_Control_Border;
8 use Elementor\Group_Control_Box_Shadow;
9 use Elementor\Group_Control_Image_Size;
10 use Elementor\Group_Control_Typography;
11 use UltimateStoreKit\Classes\Utils;
12 use UltimateStoreKit\Base\Module_Base;
13
14 if (!defined('ABSPATH')) {
15 exit;
16 } // Exit if accessed directly
17
18 class Featured_Box extends Module_Base {
19
20 public function get_name() {
21 return 'usk-featured-box';
22 }
23
24 public function get_title() {
25 return esc_html__('Featured Box', 'ultimate-store-kit');
26 }
27
28 public function get_icon() {
29 return 'usk-widget-icon usk-icon-featured-box';
30 }
31
32 public function get_categories() {
33 return ['ultimate-store-kit'];
34 }
35
36 public function get_keywords() {
37 return ['services', 'list', 'featured', 'box', 'info', 'featured box'];
38 }
39
40 public function get_style_depends() {
41 if ($this->usk_is_edit_mode()) {
42 return ['usk-styles'];
43 } else {
44 return ['usk-featured-box'];
45 }
46 }
47
48 // public function get_custom_help_url() {
49 // return 'https://youtu.be/a_wJL950Kz4';
50 // }
51
52 public function has_widget_inner_wrapper(): bool {
53 return ! \Elementor\Plugin::$instance->experiments->is_feature_active( 'e_optimized_markup' );
54 }
55 protected function register_controls() {
56
57 $this->start_controls_section(
58 'section_layout',
59 [
60 'label' => __('Layout', 'ultimate-store-kit'),
61 'tab' => Controls_Manager::TAB_CONTENT,
62 ]
63 );
64
65 $this->start_controls_tabs('tabs_layout');
66 $this->start_controls_tab(
67 'tab_content',
68 [
69 'label' => __('Content', 'ultimate-store-kit'),
70 ]
71 );
72
73 $this->add_control(
74 'title',
75 [
76 'label' => __('Title', 'ultimate-store-kit'),
77 'type' => Controls_Manager::TEXT,
78 'dynamic' => [
79 'active' => true,
80 ],
81 'default' => esc_html__('New Featured Box', 'ultimate-store-kit'),
82 'placeholder' => __('Enter your title', 'ultimate-store-kit'),
83 'label_block' => true,
84 'condition' => [
85 'show_title' => 'yes',
86 ],
87 ]
88 );
89
90 $this->add_control(
91 'meta',
92 [
93 'label' => esc_html__('Meta Text', 'ultimate-store-kit'),
94 'type' => Controls_Manager::TEXT,
95 'label_block' => true,
96 'dynamic' => ['active' => true],
97 'default' => esc_html__('Monthly Discount', 'ultimate-store-kit'),
98 'condition' => [
99 'show_meta' => 'yes',
100 ],
101 ]
102 );
103
104 $this->add_control(
105 'readmore_text',
106 [
107 'label' => esc_html__('Button Text', 'ultimate-store-kit'),
108 'type' => Controls_Manager::TEXT,
109 'default' => esc_html__('Shop Now', 'ultimate-store-kit'),
110 'label_block' => true,
111 'dynamic' => ['active' => true],
112 'condition' => [
113 'show_readmore' => 'yes',
114 ],
115 ]
116 );
117
118 $this->add_control(
119 'readmore_link',
120 [
121 'label' => esc_html__('Button Link', 'ultimate-store-kit'),
122 'type' => Controls_Manager::URL,
123 'dynamic' => ['active' => true],
124 'placeholder' => 'http://your-link.com',
125 'default' => [
126 'url' => '#',
127 ],
128 'condition' => [
129 'show_readmore' => 'yes',
130 ],
131 ]
132 );
133 $this->add_responsive_control(
134 'image',
135 [
136 'label' => __('Image', 'ultimate-store-kit'),
137 'type' => Controls_Manager::MEDIA,
138 'dynamic' => [ 'active' => true ],
139 'default' => [
140 'url' => \Elementor\Utils::get_placeholder_image_src(),
141 ],
142 'selectors' => [
143 '{{WRAPPER}} .usk-featured-box .usk-image-wrap' => 'background-image: url("{{URL}}");',
144 ],
145 'has_sizes' => true,
146 'render_type' => 'template',
147 ]
148 );
149 $this->add_responsive_control(
150 'position',
151 [
152 'label' => esc_html__( 'Position', 'ultimate-store-kit' ),
153 'type' => Controls_Manager::SELECT,
154 'default' => '',
155 'separator' => 'before',
156 'options' => [
157 '' => esc_html__( 'Default', 'ultimate-store-kit' ),
158 'center center' => esc_html__( 'Center Center', 'ultimate-store-kit' ),
159 'center left' => esc_html__( 'Center Left', 'ultimate-store-kit' ),
160 'center right' => esc_html__( 'Center Right', 'ultimate-store-kit' ),
161 'top center' => esc_html__( 'Top Center', 'ultimate-store-kit' ),
162 'top left' => esc_html__( 'Top Left', 'ultimate-store-kit' ),
163 'top right' => esc_html__( 'Top Right', 'ultimate-store-kit' ),
164 'bottom center' => esc_html__( 'Bottom Center', 'ultimate-store-kit' ),
165 'bottom left' => esc_html__( 'Bottom Left', 'ultimate-store-kit' ),
166 'bottom right' => esc_html__( 'Bottom Right', 'ultimate-store-kit' ),
167 'initial' => esc_html__( 'Custom', 'ultimate-store-kit' ),
168
169 ],
170 'selectors' => [
171 '{{WRAPPER}} .usk-featured-box .usk-image-wrap' => 'background-position: {{VALUE}};',
172 ],
173 'condition' => [
174 'image[url]!' => '',
175 ],
176 ]
177 );
178
179 $this->add_responsive_control(
180 'xpos',
181 [
182 'label' => esc_html__( 'X Position', 'ultimate-store-kit' ),
183 'type' => Controls_Manager::SLIDER,
184 'responsive' => true,
185 'size_units' => [ 'px', '%', 'em', 'rem', 'vw', 'custom' ],
186 'default' => [
187 'size' => 0,
188 ],
189 'tablet_default' => [
190 'size' => 0,
191 ],
192 'mobile_default' => [
193 'size' => 0,
194 ],
195 'range' => [
196 'px' => [
197 'min' => -800,
198 'max' => 800,
199 ],
200 'em' => [
201 'min' => -100,
202 'max' => 100,
203 ],
204 '%' => [
205 'min' => -100,
206 'max' => 100,
207 ],
208 'vw' => [
209 'min' => -100,
210 'max' => 100,
211 ],
212 ],
213 'selectors' => [
214 '{{WRAPPER}} .usk-featured-box .usk-image-wrap' => 'background-position: {{SIZE}}{{UNIT}} {{ypos.SIZE}}{{ypos.UNIT}}',
215 ],
216 'condition' => [
217 'position' => [ 'initial' ],
218 'image[url]!' => '',
219 ],
220 'required' => true,
221 ]
222 );
223
224 $this->add_responsive_control(
225 'ypos',
226 [
227 'label' => esc_html__( 'Y Position', 'ultimate-store-kit' ),
228 'type' => Controls_Manager::SLIDER,
229 'responsive' => true,
230 'size_units' => [ 'px', '%', 'em', 'rem', 'vh', 'custom' ],
231 'default' => [
232 'size' => 0,
233 ],
234 'tablet_default' => [
235 'size' => 0,
236 ],
237 'mobile_default' => [
238 'size' => 0,
239 ],
240 'range' => [
241 'px' => [
242 'min' => -800,
243 'max' => 800,
244 ],
245 'em' => [
246 'min' => -100,
247 'max' => 100,
248 ],
249 '%' => [
250 'min' => -100,
251 'max' => 100,
252 ],
253 'vh' => [
254 'min' => -100,
255 'max' => 100,
256 ],
257 ],
258 'selectors' => [
259 '{{WRAPPER}} .usk-featured-box .usk-image-wrap' => 'background-position: {{xpos.SIZE}}{{xpos.UNIT}} {{SIZE}}{{UNIT}}',
260 ],
261 'condition' => [
262 'position' => [ 'initial' ],
263 'image[url]!' => '',
264 ],
265 'required' => true,
266 ]
267 );
268
269 $this->add_responsive_control(
270 'repeat',
271 [
272 'label' => esc_html_x( 'Repeat', 'Background Control', 'ultimate-store-kit' ),
273 'type' => Controls_Manager::SELECT,
274 'default' => '',
275 'options' => [
276 '' => esc_html__( 'Default', 'ultimate-store-kit' ),
277 'no-repeat' => esc_html__( 'No-repeat', 'ultimate-store-kit' ),
278 'repeat' => esc_html__( 'Repeat', 'ultimate-store-kit' ),
279 'repeat-x' => esc_html__( 'Repeat-x', 'ultimate-store-kit' ),
280 'repeat-y' => esc_html__( 'Repeat-y', 'ultimate-store-kit' ),
281 ],
282 'selectors' => [
283 '{{WRAPPER}} .usk-featured-box .usk-image-wrap' => 'background-repeat: {{VALUE}};',
284 ],
285 'condition' => [
286 'image[url]!' => '',
287 ],
288 ]
289 );
290
291 $this->add_responsive_control(
292 'size',
293 [
294 'label' => esc_html__( 'Display Size', 'ultimate-store-kit' ),
295 'type' => Controls_Manager::SELECT,
296 'default' => '',
297 'options' => [
298 '' => esc_html__( 'Default', 'ultimate-store-kit' ),
299 'auto' => esc_html__( 'Auto', 'ultimate-store-kit' ),
300 'cover' => esc_html__( 'Cover', 'ultimate-store-kit' ),
301 'contain' => esc_html__( 'Contain', 'ultimate-store-kit' ),
302 'initial' => esc_html__( 'Custom', 'ultimate-store-kit' ),
303 ],
304 'selectors' => [
305 '{{WRAPPER}} .usk-featured-box .usk-image-wrap' => 'background-size: {{VALUE}};',
306 ],
307 'condition' => [
308 'image[url]!' => '',
309 ],
310 ]
311 );
312
313 $this->add_responsive_control(
314 'bg_width',
315 [
316 'label' => esc_html__( 'Width', 'ultimate-store-kit' ),
317 'type' => Controls_Manager::SLIDER,
318 'responsive' => true,
319 'size_units' => [ 'px', '%', 'em', 'rem', 'vw', 'custom' ],
320 'range' => [
321 'px' => [
322 'max' => 1000,
323 ],
324 ],
325 'default' => [
326 'size' => 100,
327 'unit' => '%',
328 ],
329 'required' => true,
330 'selectors' => [
331 '{{WRAPPER}} .usk-featured-box .usk-image-wrap' => 'background-size: {{SIZE}}{{UNIT}} auto',
332
333 ],
334 'condition' => [
335 'size' => [ 'initial' ],
336 'image[url]!' => '',
337 ],
338 ]
339 );
340
341
342 $this->end_controls_tab();
343 $this->start_controls_tab(
344 'tab_optional',
345 [
346 'label' => __('Optional', 'ultimate-store-kit'),
347 ]
348 );
349
350 $this->add_control(
351 'title_link',
352 [
353 'label' => esc_html__('Title Link', 'ultimate-store-kit'),
354 'type' => Controls_Manager::URL,
355 'dynamic' => ['active' => true],
356 'placeholder' => 'http://your-link.com',
357 'condition' => [
358 'show_title' => 'yes',
359 ],
360 ]
361 );
362
363 $this->add_control(
364 'text',
365 [
366 'label' => esc_html__('Text', 'ultimate-store-kit'),
367 'type' => Controls_Manager::WYSIWYG,
368 'label_block' => true,
369 'dynamic' => ['active' => true],
370 'default' => esc_html__('Don\'t miss the last opportunity.', 'ultimate-store-kit'),
371 'condition' => [
372 'show_text' => 'yes',
373 ],
374 'separator' => 'before',
375 ]
376 );
377
378 $this->add_control(
379 'badge_text',
380 [
381 'label' => esc_html__('Badge Text', 'ultimate-store-kit'),
382 'type' => Controls_Manager::TEXT,
383 'dynamic' => ['active' => true],
384 'default' => esc_html__('New', 'ultimate-store-kit'),
385 'condition' => [
386 'badge' => 'yes',
387 ],
388 'separator' => 'before',
389 ]
390 );
391
392
393
394 $this->end_controls_tab();
395 $this->end_controls_tabs();
396 $this->end_controls_section();
397
398 $this->start_controls_section(
399 'section_additional_settings',
400 [
401 'label' => __('Additional Options', 'ultimate-store-kit'),
402 'tab' => Controls_Manager::TAB_CONTENT,
403 ]
404 );
405
406 $this->add_responsive_control(
407 'box_height',
408 [
409 'label' => esc_html__('Height', 'ultimate-store-kit'),
410 'type' => Controls_Manager::SLIDER,
411 'default' => [
412 'size' => 300,
413 ],
414 'range' => [
415 'px' => [
416 'min' => 200,
417 'max' => 800,
418 ],
419 ],
420 'selectors' => [
421 '{{WRAPPER}} .usk-featured-box .usk-item' => 'height: {{SIZE}}{{UNIT}};',
422 ],
423 ]
424 );
425
426 $this->add_responsive_control(
427 'content_width',
428 [
429 'label' => esc_html__('Content Width', 'ultimate-store-kit'),
430 'type' => Controls_Manager::SLIDER,
431 'default' => [
432 'size' => 500,
433 ],
434 'range' => [
435 'px' => [
436 'min' => 200,
437 'max' => 1200,
438 ],
439 ],
440 'selectors' => [
441 '{{WRAPPER}} .usk-featured-box .usk-content' => 'max-width: {{SIZE}}{{UNIT}};',
442 ],
443 ]
444 );
445
446 $this->add_control(
447 'content_position',
448 [
449 'label' => esc_html__('Content Position', 'ultimate-store-kit'),
450 'type' => Controls_Manager::CHOOSE,
451 'default' => 'center',
452 'options' => [
453 'top' => [
454 'title' => esc_html__('Top', 'ultimate-store-kit'),
455 'icon' => 'eicon-v-align-top',
456 ],
457 'center' => [
458 'title' => esc_html__('Center', 'ultimate-store-kit'),
459 'icon' => 'eicon-v-align-middle',
460 ],
461 'bottom' => [
462 'title' => esc_html__('Bottom', 'ultimate-store-kit'),
463 'icon' => 'eicon-v-align-bottom',
464 ],
465 ],
466 'toggle' => false,
467 ]
468 );
469
470 $this->add_responsive_control(
471 'alignment',
472 [
473 'label' => esc_html__('Alignment', 'ultimate-store-kit'),
474 'type' => Controls_Manager::CHOOSE,
475 'options' => [
476 'left' => [
477 'title' => esc_html__('Left', 'ultimate-store-kit'),
478 'icon' => 'eicon-h-align-left',
479 ],
480 'center' => [
481 'title' => esc_html__('Center', 'ultimate-store-kit'),
482 'icon' => 'eicon-h-align-center',
483 ],
484 'right' => [
485 'title' => esc_html__('Right', 'ultimate-store-kit'),
486 'icon' => 'eicon-h-align-right',
487 ],
488 ],
489 'selectors' => [
490 '{{WRAPPER}} .usk-featured-box .usk-content' => 'text-align: {{VALUE}}',
491 ],
492 ]
493 );
494
495 $this->add_control(
496 'show_title',
497 [
498 'label' => __('Show Title', 'ultimate-store-kit'),
499 'type' => Controls_Manager::SWITCHER,
500 'default' => 'yes',
501 'separator' => 'before',
502 ]
503 );
504
505 $this->add_control(
506 'title_tag',
507 [
508 'label' => __('Title HTML Tag', 'ultimate-store-kit'),
509 'type' => Controls_Manager::SELECT,
510 'default' => 'h3',
511 'options' => ultimate_store_kit_title_tags(),
512 'condition' => [
513 'show_title' => 'yes',
514 ],
515 ]
516 );
517
518 $this->add_control(
519 'show_text',
520 [
521 'label' => esc_html__('Show Text', 'ultimate-store-kit'),
522 'type' => Controls_Manager::SWITCHER,
523 'default' => 'yes',
524 'separator' => 'before',
525 ]
526 );
527
528 $this->add_control(
529 'show_meta',
530 [
531 'label' => esc_html__('Show Meta', 'ultimate-store-kit'),
532 'type' => Controls_Manager::SWITCHER,
533 'default' => 'yes',
534 ]
535 );
536
537 $this->add_control(
538 'show_readmore',
539 [
540 'label' => esc_html__('Show Button', 'ultimate-store-kit'),
541 'type' => Controls_Manager::SWITCHER,
542 'default' => 'yes',
543 ]
544 );
545 $this->add_control(
546 'badge',
547 [
548 'label' => esc_html__('Badge', 'ultimate-store-kit') . BDTUSK_NC,
549 'type' => Controls_Manager::SWITCHER,
550 ]
551 );
552
553 $this->add_control(
554 'show_wrapper_link',
555 [
556 'label' => esc_html__('Show Wrapper link', 'ultimate-store-kit'),
557 'type' => Controls_Manager::SWITCHER,
558 'separator' => 'before',
559 ]
560 );
561
562 $this->add_control(
563 'wrapper_link',
564 [
565 'label' => esc_html__('Wrapper Link', 'ultimate-store-kit'),
566 'type' => Controls_Manager::URL,
567 'dynamic' => ['active' => true],
568 'placeholder' => 'http://your-link.com',
569 'default' => [
570 'url' => '#',
571 ],
572 'condition' => [
573 'show_wrapper_link' => 'yes',
574 ],
575 ]
576 );
577
578 $this->end_controls_section();
579
580 //Style
581 $this->start_controls_section(
582 'section_style_items',
583 [
584 'label' => __('Featured Box', 'ultimate-store-kit'),
585 'tab' => Controls_Manager::TAB_STYLE,
586 ]
587 );
588
589 $this->start_controls_tabs('tabs_item_style');
590
591 $this->start_controls_tab(
592 'tab_item_normal',
593 [
594 'label' => esc_html__('Normal', 'ultimate-store-kit'),
595 ]
596 );
597
598 $this->add_group_control(
599 Group_Control_Background::get_type(),
600 [
601 'name' => 'item_background',
602 'selector' => '{{WRAPPER}} .usk-featured-box .usk-item',
603 ]
604 );
605
606 $this->add_group_control(
607 Group_Control_Border::get_type(),
608 [
609 'name' => 'item_border',
610 'label' => esc_html__('Border', 'ultimate-store-kit'),
611 // 'fields_options' => [
612 // 'border' => [
613 // 'default' => 'solid',
614 // ],
615 // 'width' => [
616 // 'default' => [
617 // 'top' => '1',
618 // 'right' => '1',
619 // 'bottom' => '1',
620 // 'left' => '1',
621 // 'isLinked' => false,
622 // ],
623 // ],
624 // 'color' => [
625 // 'default' => '#eee',
626 // ],
627 // ],
628 'selector' => '{{WRAPPER}} .usk-featured-box .usk-item',
629 'separator' => 'before',
630 ]
631 );
632
633 $this->add_responsive_control(
634 'item_border_radius',
635 [
636 'label' => esc_html__('Border Radius', 'ultimate-store-kit'),
637 'type' => Controls_Manager::DIMENSIONS,
638 'size_units' => ['px', 'em', '%'],
639 'selectors' => [
640 '{{WRAPPER}} .usk-featured-box .usk-item' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
641 ],
642 ]
643 );
644
645 $this->add_responsive_control(
646 'item_padding',
647 [
648 'label' => esc_html__('Padding', 'ultimate-store-kit'),
649 'type' => Controls_Manager::DIMENSIONS,
650 'size_units' => ['px', 'em', '%'],
651 'selectors' => [
652 '{{WRAPPER}} .usk-featured-box .usk-item .usk-content' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
653 ],
654 ]
655 );
656
657 $this->add_group_control(
658 Group_Control_Box_Shadow::get_type(),
659 [
660 'name' => 'item_box_shadow',
661 'selector' => '{{WRAPPER}} .usk-featured-box .usk-item',
662 ]
663 );
664
665 $this->end_controls_tab();
666
667 $this->start_controls_tab(
668 'tab_item_hover',
669 [
670 'label' => esc_html__('Hover', 'ultimate-store-kit'),
671 ]
672 );
673
674 $this->add_group_control(
675 Group_Control_Background::get_type(),
676 [
677 'name' => 'item_hover_background',
678 'selector' => '{{WRAPPER}} .usk-featured-box .usk-item:hover',
679 ]
680 );
681
682 $this->add_control(
683 'item_hover_border_color',
684 [
685 'label' => esc_html__('Border Color', 'ultimate-store-kit'),
686 'type' => Controls_Manager::COLOR,
687 'default' => '#333',
688 'condition' => [
689 'item_border_border!' => '',
690 ],
691 'selectors' => [
692 '{{WRAPPER}} .usk-featured-box .usk-item:hover' => 'border-color: {{VALUE}};',
693 ],
694 'separator' => 'before',
695 ]
696 );
697
698 $this->add_group_control(
699 Group_Control_Box_Shadow::get_type(),
700 [
701 'name' => 'item_hover_box_shadow',
702 'selector' => '{{WRAPPER}} .usk-featured-box .usk-item:hover',
703 ]
704 );
705
706 $this->end_controls_tab();
707
708 $this->end_controls_tabs();
709
710 $this->end_controls_section();
711
712 $this->start_controls_section(
713 'section_title_style',
714 [
715 'label' => __('Title', 'ultimate-store-kit'),
716 'tab' => Controls_Manager::TAB_STYLE,
717 'condition' => [
718 'show_title' => 'yes',
719 ],
720 ]
721 );
722
723 $this->add_control(
724 'title_color',
725 [
726 'label' => __('Color', 'ultimate-store-kit'),
727 'type' => Controls_Manager::COLOR,
728 'selectors' => [
729 '{{WRAPPER}} .usk-featured-box .usk-title a' => 'color: {{VALUE}} ',
730 ],
731 ]
732 );
733
734 $this->add_control(
735 'title_hover_color',
736 [
737 'label' => __('Hover Color', 'ultimate-store-kit'),
738 'type' => Controls_Manager::COLOR,
739 'selectors' => [
740 '{{WRAPPER}} .usk-featured-box .usk-title a:hover' => 'color: {{VALUE}} ',
741 ],
742 ]
743 );
744
745 $this->add_responsive_control(
746 'title_margin',
747 [
748 'label' => esc_html__('Margin', 'ultimate-store-kit'),
749 'type' => Controls_Manager::DIMENSIONS,
750 'size_units' => ['px', 'em', '%'],
751 'selectors' => [
752 '{{WRAPPER}} .usk-featured-box .usk-title' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
753 ],
754 ]
755 );
756
757 $this->add_group_control(
758 Group_Control_Typography::get_type(),
759 [
760 'name' => 'title_typography',
761 'selector' => '{{WRAPPER}} .usk-featured-box .usk-title',
762 ]
763 );
764
765 $this->end_controls_section();
766
767 $this->start_controls_section(
768 'section_style_text',
769 [
770 'label' => __('Text', 'ultimate-store-kit'),
771 'tab' => Controls_Manager::TAB_STYLE,
772 'condition' => [
773 'show_text' => 'yes',
774 ],
775 ]
776 );
777
778 $this->add_control(
779 'text_color',
780 [
781 'label' => __('Color', 'ultimate-store-kit'),
782 'type' => Controls_Manager::COLOR,
783 'selectors' => [
784 '{{WRAPPER}} .usk-featured-box .usk-text' => 'color: {{VALUE}};',
785 ],
786 ]
787 );
788
789 $this->add_responsive_control(
790 'text_margin',
791 [
792 'label' => esc_html__('Margin', 'ultimate-store-kit'),
793 'type' => Controls_Manager::DIMENSIONS,
794 'size_units' => ['px', 'em', '%'],
795 'selectors' => [
796 '{{WRAPPER}} .usk-featured-box .usk-text' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
797 ],
798 ]
799 );
800
801 $this->add_group_control(
802 Group_Control_Typography::get_type(),
803 [
804 'name' => 'text_typography',
805 'selector' => '{{WRAPPER}} .usk-featured-box .usk-text',
806 ]
807 );
808
809 $this->end_controls_section();
810
811 $this->start_controls_section(
812 'section_style_meta',
813 [
814 'label' => __('Meta', 'ultimate-store-kit'),
815 'tab' => Controls_Manager::TAB_STYLE,
816 'condition' => [
817 'show_meta' => 'yes',
818 ],
819 ]
820 );
821
822 $this->add_control(
823 'meta_color',
824 [
825 'label' => __('Color', 'ultimate-store-kit'),
826 'type' => Controls_Manager::COLOR,
827 'selectors' => [
828 '{{WRAPPER}} .usk-featured-box .usk-meta' => 'color: {{VALUE}};',
829 ],
830 ]
831 );
832
833 $this->add_control(
834 'meta_color_hover',
835 [
836 'label' => __('Hover Color', 'ultimate-store-kit'),
837 'type' => Controls_Manager::COLOR,
838 'selectors' => [
839 '{{WRAPPER}} .usk-featured-box .usk-meta:hover' => 'color: {{VALUE}};',
840 ],
841 ]
842 );
843
844 $this->add_responsive_control(
845 'meta_margin',
846 [
847 'label' => esc_html__('Margin', 'ultimate-store-kit'),
848 'type' => Controls_Manager::DIMENSIONS,
849 'size_units' => ['px', 'em', '%'],
850 'selectors' => [
851 '{{WRAPPER}} .usk-featured-box .usk-meta' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
852 ],
853 ]
854 );
855
856 $this->add_group_control(
857 Group_Control_Typography::get_type(),
858 [
859 'name' => 'meta_typography',
860 'selector' => '{{WRAPPER}} .usk-featured-box .usk-meta',
861 ]
862 );
863
864 $this->end_controls_section();
865
866 $this->start_controls_section(
867 'section_style_readmore',
868 [
869 'label' => esc_html__('Button', 'ultimate-store-kit'),
870 'tab' => Controls_Manager::TAB_STYLE,
871 'condition' => [
872 'show_readmore' => 'yes',
873 ],
874 ]
875 );
876
877 $this->add_control(
878 'button_offset_toggle',
879 [
880 'label' => __('Offset', 'ultimate-store-kit'),
881 'type' => Controls_Manager::POPOVER_TOGGLE,
882 'label_off' => __('None', 'ultimate-store-kit'),
883 'label_on' => __('Custom', 'ultimate-store-kit'),
884 'return_value' => 'yes',
885 ]
886 );
887 $this->start_popover();
888 $this->add_responsive_control(
889 'button_x_position',
890 [
891 'label' => __( 'X', 'ultimate-store-kit' ),
892 'type' => Controls_Manager::SLIDER,
893 'default' => [
894 'size' => 0,
895 ],
896 'tablet_default' => [
897 'size' => 0,
898 ],
899 'mobile_default' => [
900 'size' => 0,
901 ],
902 'range' => [
903 'px' => [
904 'min' => -800,
905 'max' => 800,
906 ],
907 ],
908 'condition' => [
909 'button_offset_toggle' => 'yes'
910 ],
911 'render_type' => 'ui',
912 'selectors' => [
913 '{{WRAPPER}}' => '--usk-button-x-offset: {{SIZE}}px;'
914 ],
915 ]
916 );
917
918 $this->add_responsive_control(
919 'button_y_position',
920 [
921 'label' => __( 'Y', 'ultimate-store-kit' ),
922 'type' => Controls_Manager::SLIDER,
923 'default' => [
924 'size' => 0,
925 ],
926 'tablet_default' => [
927 'size' => 0,
928 ],
929 'mobile_default' => [
930 'size' => 0,
931 ],
932 'range' => [
933 'px' => [
934 'min' => -800,
935 'max' => 800,
936 ],
937 ],
938 'condition' => [
939 'button_offset_toggle' => 'yes'
940 ],
941 'render_type' => 'ui',
942 'selectors' => [
943 '{{WRAPPER}}' => '--usk-button-y-offset: {{SIZE}}px;'
944 ],
945 ]
946 );
947
948 $this->add_responsive_control(
949 'button_rotate',
950 [
951 'label' => __( 'Rotate', 'ultimate-store-kit' ),
952 'type' => Controls_Manager::SLIDER,
953 'default' => [
954 'size' => 0,
955 ],
956 'tablet_default' => [
957 'size' => 0,
958 ],
959 'mobile_default' => [
960 'size' => 0,
961 ],
962 'range' => [
963 'px' => [
964 'min' => -180,
965 'max' => 180,
966 'step' => 5,
967 ],
968 ],
969 'condition' => [
970 'button_offset_toggle' => 'yes'
971 ],
972 'render_type' => 'ui',
973 'selectors' => [
974 '{{WRAPPER}}' => '--usk-button-rotate: {{SIZE}}deg;'
975 ],
976 ]
977 );
978 $this->end_popover();
979
980 $this->start_controls_tabs('tabs_readmore_style');
981
982 $this->start_controls_tab(
983 'tab_readmore_normal',
984 [
985 'label' => esc_html__('Normal', 'ultimate-store-kit'),
986 ]
987 );
988
989 $this->add_control(
990 'readmore_color',
991 [
992 'label' => esc_html__('Color', 'ultimate-store-kit'),
993 'type' => Controls_Manager::COLOR,
994 'selectors' => [
995 '{{WRAPPER}} .usk-featured-box .usk-link-btn a' => 'color: {{VALUE}};',
996 ],
997 ]
998 );
999
1000 $this->add_group_control(
1001 Group_Control_Background::get_type(),
1002 [
1003 'name' => 'readmore_background',
1004 'selector' => '{{WRAPPER}} .usk-featured-box .usk-link-btn a',
1005 ]
1006 );
1007
1008 $this->add_group_control(
1009 Group_Control_Border::get_type(),
1010 [
1011 'name' => 'readmore_border',
1012 'label' => esc_html__('Border', 'ultimate-store-kit'),
1013 'fields_options' => [
1014 'border' => [
1015 'default' => 'solid',
1016 ],
1017 'width' => [
1018 'default' => [
1019 'top' => '1',
1020 'right' => '1',
1021 'bottom' => '1',
1022 'left' => '1',
1023 'isLinked' => false,
1024 ],
1025 ],
1026 'color' => [
1027 'default' => '#D90429',
1028 ],
1029 ],
1030 'selector' => '{{WRAPPER}} .usk-featured-box .usk-link-btn a',
1031 'separator' => 'before',
1032 ]
1033 );
1034
1035 $this->add_responsive_control(
1036 'readmore_radius',
1037 [
1038 'label' => esc_html__('Border Radius', 'ultimate-store-kit'),
1039 'type' => Controls_Manager::DIMENSIONS,
1040 'size_units' => ['px', '%'],
1041 'selectors' => [
1042 '{{WRAPPER}} .usk-featured-box .usk-link-btn a' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1043 ],
1044 ]
1045 );
1046
1047 $this->add_responsive_control(
1048 'readmore_padding',
1049 [
1050 'label' => esc_html__('Padding', 'ultimate-store-kit'),
1051 'type' => Controls_Manager::DIMENSIONS,
1052 'size_units' => ['px', 'em', '%'],
1053 'selectors' => [
1054 '{{WRAPPER}} .usk-featured-box .usk-link-btn a' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1055 ],
1056 ]
1057 );
1058
1059 $this->add_responsive_control(
1060 'readmore_margin',
1061 [
1062 'label' => esc_html__('Margin', 'ultimate-store-kit'),
1063 'type' => Controls_Manager::DIMENSIONS,
1064 'size_units' => ['px', 'em', '%'],
1065 'selectors' => [
1066 '{{WRAPPER}} .usk-featured-box .usk-link-btn' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1067 ],
1068 ]
1069 );
1070
1071 $this->add_group_control(
1072 Group_Control_Typography::get_type(),
1073 [
1074 'name' => 'readmore_typography',
1075 'selector' => '{{WRAPPER}} .usk-featured-box .usk-link-btn a',
1076 ]
1077 );
1078
1079 $this->add_group_control(
1080 Group_Control_Box_Shadow::get_type(),
1081 [
1082 'name' => 'readmore_box_shadow',
1083 'selector' => '{{WRAPPER}} .usk-featured-box .usk-link-btn a',
1084 ]
1085 );
1086
1087 $this->end_controls_tab();
1088
1089 $this->start_controls_tab(
1090 'tab_readmore_hover',
1091 [
1092 'label' => esc_html__('Hover', 'ultimate-store-kit'),
1093 ]
1094 );
1095
1096 $this->add_control(
1097 'readmore_hover_color',
1098 [
1099 'label' => esc_html__('Color', 'ultimate-store-kit'),
1100 'type' => Controls_Manager::COLOR,
1101 'selectors' => [
1102 '{{WRAPPER}} .usk-featured-box .usk-link-btn a:hover' => 'color: {{VALUE}};',
1103 '{{WRAPPER}} .usk-featured-box .usk-link-btn a span::before' => 'background-color: {{VALUE}};',
1104 '{{WRAPPER}} .usk-featured-box .usk-link-btn a span::after' => 'border-top-color: {{VALUE}}; border-right-color: {{VALUE}};',
1105 ],
1106 ]
1107 );
1108
1109 $this->add_group_control(
1110 Group_Control_Background::get_type(),
1111 [
1112 'name' => 'readmore_hover_background',
1113 'selector' => '{{WRAPPER}} .usk-featured-box .usk-link-btn a:before',
1114 ]
1115 );
1116
1117 $this->add_control(
1118 'readmore_hover_border_color',
1119 [
1120 'label' => esc_html__('Border Color', 'ultimate-store-kit'),
1121 'type' => Controls_Manager::COLOR,
1122 'condition' => [
1123 'readmore_border_border!' => '',
1124 ],
1125 'selectors' => [
1126 '{{WRAPPER}} .usk-featured-box .usk-link-btn a:hover' => 'border-color: {{VALUE}};',
1127 ],
1128 ]
1129 );
1130
1131 $this->end_controls_tab();
1132 $this->end_controls_tabs();
1133 $this->end_controls_section();
1134
1135 $this->start_controls_section(
1136 'section_style_badge',
1137 [
1138 'label' => esc_html__('Badge', 'ultimate-store-kit'),
1139 'tab' => Controls_Manager::TAB_STYLE,
1140 'condition' => [
1141 'badge' => 'yes',
1142 'badge_text!' => '',
1143 ],
1144 ]
1145 );
1146 $this->add_responsive_control(
1147 'badge_position',
1148 [
1149 'label' => esc_html__('Position', 'ultimate-store-kit'),
1150 'type' => Controls_Manager::SELECT,
1151 'default' => 'top-right',
1152 'options' => [
1153 'top-left' => esc_html__('Top Left', 'ultimate-store-kit'),
1154 'top-right' => esc_html__('Top Right', 'ultimate-store-kit'),
1155 'bottom-left' => esc_html__('Bottom Left', 'ultimate-store-kit'),
1156 'bottom-right' => esc_html__('Bottom Right', 'ultimate-store-kit'),
1157 ],
1158 'selectors_dictionary' => [
1159 'top-left' => 'top: 0; left: 0;',
1160 'top-right' => 'top: 0; right: 0;',
1161 'bottom-left' => 'bottom: 0; left: 0;',
1162 'bottom-right' => 'bottom: 0; right: 0;',
1163 ],
1164 'selectors' => [
1165 '{{WRAPPER}} .usk-featured-box .usk-badge' => '{{VALUE}};',
1166 ],
1167 ]
1168 );
1169 $this->start_controls_tabs('tabs_badge_style');
1170 $this->start_controls_tab(
1171 'tab_badge_normal',
1172 [
1173 'label' => esc_html__('Normal', 'ultimate-store-kit'),
1174 ]
1175 );
1176 $this->add_control(
1177 'badge_color',
1178 [
1179 'label' => esc_html__('Color', 'ultimate-store-kit'),
1180 'type' => Controls_Manager::COLOR,
1181 'selectors' => [
1182 '{{WRAPPER}} .usk-featured-box .usk-badge' => 'color: {{VALUE}};',
1183 ],
1184 ]
1185 );
1186 $this->add_group_control(
1187 Group_Control_Background::get_type(),
1188 [
1189 'name' => 'badge_background',
1190 'exclude' => ['image'],
1191 'selector' => '{{WRAPPER}} .usk-featured-box .usk-badge',
1192 ]
1193 );
1194 $this->add_group_control(
1195 Group_Control_Border::get_type(),
1196 [
1197 'name' => 'badge_border',
1198 'selector' => '{{WRAPPER}} .usk-featured-box .usk-badge',
1199 'separator' => 'before',
1200 ]
1201 );
1202 $this->add_responsive_control(
1203 'badge_border_radius',
1204 [
1205 'label' => esc_html__('Border Radius', 'ultimate-store-kit'),
1206 'type' => Controls_Manager::DIMENSIONS,
1207 'size_units' => ['px', '%'],
1208 'selectors' => [
1209 '{{WRAPPER}} .usk-featured-box .usk-badge' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1210 ],
1211 ]
1212 );
1213 $this->add_responsive_control(
1214 'badge_padding',
1215 [
1216 'label' => esc_html__('Padding', 'ultimate-store-kit'),
1217 'type' => Controls_Manager::DIMENSIONS,
1218 'size_units' => ['px', 'em', '%'],
1219 'selectors' => [
1220 '{{WRAPPER}} .usk-featured-box .usk-badge' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1221 ],
1222 ]
1223 );
1224 $this->add_responsive_control(
1225 'badge_margin',
1226 [
1227 'label' => esc_html__('Margin', 'ultimate-store-kit'),
1228 'type' => Controls_Manager::DIMENSIONS,
1229 'size_units' => ['px', 'em', '%'],
1230 'selectors' => [
1231 '{{WRAPPER}} .usk-featured-box .usk-badge' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1232 ],
1233 ]
1234 );
1235 $this->add_group_control(
1236 Group_Control_Typography::get_type(),
1237 [
1238 'name' => 'badge_typography',
1239 'selector' => '{{WRAPPER}} .usk-featured-box .usk-badge',
1240 ]
1241 );
1242 $this->add_group_control(
1243 Group_Control_Box_Shadow::get_type(),
1244 [
1245 'name' => 'badge_box_shadow',
1246 'selector' => '{{WRAPPER}} .usk-featured-box .usk-badge',
1247 ]
1248 );
1249 $this->add_control(
1250 'badge_offset_toggle',
1251 [
1252 'label' => __('Offset', 'ultimate-store-kit'),
1253 'type' => Controls_Manager::POPOVER_TOGGLE,
1254 'label_off' => __('None', 'ultimate-store-kit'),
1255 'label_on' => __('Custom', 'ultimate-store-kit'),
1256 'return_value' => 'yes',
1257 ]
1258 );
1259 $this->start_popover();
1260 $this->add_responsive_control(
1261 'badge_x_position',
1262 [
1263 'label' => __( 'X', 'ultimate-store-kit' ),
1264 'type' => Controls_Manager::SLIDER,
1265 'default' => [
1266 'size' => 0,
1267 ],
1268 'tablet_default' => [
1269 'size' => 0,
1270 ],
1271 'mobile_default' => [
1272 'size' => 0,
1273 ],
1274 'range' => [
1275 'px' => [
1276 'min' => -800,
1277 'max' => 800,
1278 ],
1279 ],
1280 'condition' => [
1281 'badge_offset_toggle' => 'yes'
1282 ],
1283 'render_type' => 'ui',
1284 'selectors' => [
1285 '{{WRAPPER}}' => '--usk-badge-x-offset: {{SIZE}}px;'
1286 ],
1287 ]
1288 );
1289
1290 $this->add_responsive_control(
1291 'badge_y_position',
1292 [
1293 'label' => __( 'Y', 'ultimate-store-kit' ),
1294 'type' => Controls_Manager::SLIDER,
1295 'default' => [
1296 'size' => 0,
1297 ],
1298 'tablet_default' => [
1299 'size' => 0,
1300 ],
1301 'mobile_default' => [
1302 'size' => 0,
1303 ],
1304 'range' => [
1305 'px' => [
1306 'min' => -800,
1307 'max' => 800,
1308 ],
1309 ],
1310 'condition' => [
1311 'badge_offset_toggle' => 'yes'
1312 ],
1313 'render_type' => 'ui',
1314 'selectors' => [
1315 '{{WRAPPER}}' => '--usk-badge-y-offset: {{SIZE}}px;'
1316 ],
1317 ]
1318 );
1319
1320 $this->add_responsive_control(
1321 'badge_rotate',
1322 [
1323 'label' => __( 'Rotate', 'ultimate-store-kit' ),
1324 'type' => Controls_Manager::SLIDER,
1325 'default' => [
1326 'size' => 0,
1327 ],
1328 'tablet_default' => [
1329 'size' => 0,
1330 ],
1331 'mobile_default' => [
1332 'size' => 0,
1333 ],
1334 'range' => [
1335 'px' => [
1336 'min' => -180,
1337 'max' => 180,
1338 'step' => 5,
1339 ],
1340 ],
1341 'condition' => [
1342 'badge_offset_toggle' => 'yes'
1343 ],
1344 'render_type' => 'ui',
1345 'selectors' => [
1346 '{{WRAPPER}}' => '--usk-badge-rotate: {{SIZE}}deg;'
1347 ],
1348 ]
1349 );
1350 $this->end_popover();
1351 $this->end_controls_tab();
1352 $this->start_controls_tab(
1353 'tab_badge_hover',
1354 [
1355 'label' => esc_html__('Hover', 'ultimate-store-kit'),
1356 ]
1357 );
1358 $this->add_control(
1359 'badge_hover_color',
1360 [
1361 'label' => esc_html__('Color', 'ultimate-store-kit'),
1362 'type' => Controls_Manager::COLOR,
1363 'selectors' => [
1364 '{{WRAPPER}} .usk-featured-box .usk-badge:hover' => 'color: {{VALUE}};',
1365 ],
1366 ]
1367 );
1368 $this->add_group_control(
1369 Group_Control_Background::get_type(),
1370 [
1371 'name' => 'badge_hover_background',
1372 'exclude' => ['image'],
1373 'selector' => '{{WRAPPER}} .usk-featured-box .usk-badge:hover',
1374 ]
1375 );
1376 $this->add_control(
1377 'badge_hover_border_color',
1378 [
1379 'label' => esc_html__('Border Color', 'ultimate-store-kit'),
1380 'type' => Controls_Manager::COLOR,
1381 'condition' => [
1382 'badge_border_border!' => '',
1383 ],
1384 'selectors' => [
1385 '{{WRAPPER}} .usk-featured-box .usk-badge:hover' => 'border-color: {{VALUE}};',
1386 ],
1387 ]
1388 );
1389 $this->end_controls_tab();
1390 $this->end_controls_tabs();
1391 $this->end_controls_section();
1392 }
1393
1394 public function render_title() {
1395 $settings = $this->get_settings_for_display();
1396
1397 if (!$settings['show_title']) {
1398 return;
1399 }
1400
1401 if ( ! empty($settings['title_link']['url']) && ! empty($settings['title']) ) {
1402 $this->add_link_attributes('title-link', $settings['title_link'], true);
1403 }
1404
1405 if (!empty($settings['title'])) {
1406 printf(
1407 '<%1$s class="usk-title"><a %2$s title="%3$s">%3$s</a></%1$s>',
1408 esc_attr( Utils::get_valid_html_tag($settings['title_tag']) ),
1409 $this->get_render_attribute_string('title-link'), // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
1410 esc_attr($settings['title'])
1411 );
1412 }
1413 }
1414
1415 public function render_text() {
1416 $settings = $this->get_settings_for_display();
1417
1418 if (!$settings['show_text']) {
1419 return;
1420 }
1421
1422 ?>
1423 <?php if ($settings['text']): ?>
1424 <div class="usk-text">
1425 <?php echo wp_kses_post($settings['text']); ?>
1426 </div>
1427 <?php endif;
1428 }
1429
1430 public function render_meta() {
1431 $settings = $this->get_settings_for_display();
1432
1433 if (!$settings['show_meta']) {
1434 return;
1435 }
1436
1437 ?>
1438 <?php if ($settings['meta']): ?>
1439 <div class="usk-meta">
1440 <?php echo wp_kses_post($settings['meta']); ?>
1441 </div>
1442 <?php endif;
1443 }
1444
1445 public function rendar_image() {
1446 $settings = $this->get_settings_for_display();
1447
1448 if (empty($settings['image']['url'])) {
1449 return;
1450 }
1451
1452 ?>
1453
1454 <div class="usk-image-wrap"></div>
1455
1456 <?php
1457 }
1458
1459 public function render_readmore() {
1460 $settings = $this->get_settings_for_display();
1461
1462 if (!$settings['show_readmore']) {
1463 return;
1464 }
1465
1466 if (!empty($settings['readmore_link']['url'])) {
1467 $this->add_link_attributes('readmore-link', $settings['readmore_link'], true);
1468 }
1469
1470 ?>
1471 <?php if ((!empty($settings['readmore_link']['url'])) && ($settings['show_readmore'])): ?>
1472 <div class="usk-link-btn">
1473 <a <?php $this->print_render_attribute_string('readmore-link');?>>
1474 <span><?php echo esc_html($settings['readmore_text']); ?></span>
1475 </a>
1476 </div>
1477 <?php endif;?>
1478 <?php
1479 }
1480
1481 protected function render() {
1482 $settings = $this->get_settings_for_display();
1483
1484 $this->add_render_attribute('featured-box', 'class', 'usk-featured-box usk-fb-content-position-' . $settings['content_position']);
1485
1486 if (!empty($settings['wrapper_link']['url'])) {
1487 $this->add_link_attributes('link', $settings['wrapper_link'], true);
1488 }
1489 $this->add_render_attribute('link', 'class', 'usk-featured-box-wrapper-link', true);
1490
1491 ?>
1492 <div <?php $this->print_render_attribute_string('featured-box');?>>
1493
1494 <div class="usk-item">
1495 <?php $this->rendar_image();?>
1496 <div class="usk-content">
1497 <?php $this->render_meta();?>
1498 <?php $this->render_title();?>
1499 <?php $this->render_text();?>
1500 <?php $this->render_readmore();?>
1501 </div>
1502 </div>
1503 <?php
1504 if ($settings['badge'] == 'yes' and !empty($settings['badge_text'])) {
1505 printf('<div class="usk-badge">%1$s</div>', esc_html($settings['badge_text']));
1506 }
1507 if ($settings['show_wrapper_link'] == 'yes' and !empty($settings['wrapper_link']['url'])) { ?>
1508 <a <?php $this->print_render_attribute_string('link'); ?>></a>
1509 <?php } ?>
1510
1511 </div>
1512 <?php
1513 }
1514 }
1515