Version Description
- September 14, 2020 =
- Added: Info Box, Info Box Carousel - Option to show button in case of link type box option
- Enhancement: Info Box Carousel - Updated Choose Arrow control
- Fixed: Logo Grid - Greyscale option was not working in editor
- Added: Image Hotspots - Typography option for hotspot type text
- Added: Image Hotspots - Option to keep tooltips always open
Download this release
Release Info
Developer | ideaboxcreations |
Plugin | PowerPack Addons for Elementor (Instagram Feed, Pricing Table, Forms Stylers, Display Conditions, Free Elementor Widgets and Elementor Templates) |
Version | 2.1.4 |
Comparing to | |
See all releases |
Code changes from version 2.1.3 to 2.1.4
- assets/js/frontend.js +58 -34
- assets/js/tooltip.js +35 -29
- changelog.txt +8 -0
- modules/hotspots/widgets/hotspots.php +149 -45
- modules/info-box/widgets/info-box-carousel.php +1750 -1489
- modules/info-box/widgets/info-box.php +358 -98
- modules/logos/widgets/logo-grid.php +453 -383
- package.json +1 -1
- powerpack-lite-elementor.php +2 -2
- readme.txt +27 -16
assets/js/frontend.js
CHANGED
@@ -23,10 +23,49 @@
|
|
23 |
|
24 |
var isEditMode = false;
|
25 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
26 |
var ImageHotspotHandler = function ($scope, $) {
|
27 |
var id = $scope.data('id'),
|
28 |
elementSettings = getElementSettings( $scope ),
|
29 |
$tt_arrow = elementSettings.tooltip_arrow,
|
|
|
30 |
$tt_trigger = elementSettings.tooltip_trigger;
|
31 |
|
32 |
$('.pp-hot-spot-wrap[data-tooltip]').each(function () {
|
@@ -58,6 +97,7 @@
|
|
58 |
animationIn : $animation_in,
|
59 |
animationOut : $animation_out,
|
60 |
animDuration : 400,
|
|
|
61 |
toggleable : ($tt_trigger === 'click') ? true : false
|
62 |
};
|
63 |
|
@@ -116,46 +156,30 @@
|
|
116 |
|
117 |
var mySwiper = new Swiper(carousel, slider_options);
|
118 |
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
119 |
|
120 |
var InfoBoxCarouselHandler = function ($scope, $) {
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
var mySwiper = new Swiper(carousel, slider_options);
|
128 |
|
129 |
if ( equal_height === 'yes' ) {
|
130 |
-
|
131 |
-
|
132 |
-
$scope.find('.swiper-slide').each( function( currentSlide ) {
|
133 |
-
if($(this).height() > maxHeight){
|
134 |
-
maxHeight = $(this).height();
|
135 |
-
}
|
136 |
-
});
|
137 |
-
$scope.find('.pp-info-box-content-wrap').css('min-height',maxHeight);
|
138 |
-
}
|
139 |
-
|
140 |
-
$(setEqualHeight);
|
141 |
-
$(window).resize(setEqualHeight);
|
142 |
}
|
143 |
|
144 |
-
|
145 |
-
if ( content.find('.pp-info-box-carousel-wrap').length > 0 ) {
|
146 |
-
setTimeout(function() {
|
147 |
-
mySwiper.update();
|
148 |
-
}, 400);
|
149 |
-
}
|
150 |
-
});
|
151 |
-
|
152 |
-
if ( $(carousel_wrap).closest('.elementor-tabs').length > 0 ) {
|
153 |
-
$(carousel_wrap).closest('.elementor-tabs').find('.elementor-tab-title').on('click', function() {
|
154 |
-
setTimeout(function() {
|
155 |
-
mySwiper.update();
|
156 |
-
}, 400);
|
157 |
-
});
|
158 |
-
}
|
159 |
};
|
160 |
|
161 |
var InstaFeedPopupHandler = function ($scope, $) {
|
23 |
|
24 |
var isEditMode = false;
|
25 |
|
26 |
+
var PPSwiperSliderHandler = function ($scope, $) {
|
27 |
+
var $carousel = $scope.find('.pp-swiper-slider').eq(0),
|
28 |
+
$slider_options = JSON.parse( $carousel.attr('data-slider-settings') );
|
29 |
+
|
30 |
+
var mySwiper = new Swiper($carousel, $slider_options);
|
31 |
+
|
32 |
+
PPSliderUpdate( mySwiper, '.pp-swiper-slider', 'swiper' );
|
33 |
+
};
|
34 |
+
|
35 |
+
var PPSliderUpdate = function (slider, selector, type) {
|
36 |
+
|
37 |
+
if( 'undefined' !== typeof type ){
|
38 |
+
type = 'swiper';
|
39 |
+
}
|
40 |
+
|
41 |
+
var $triggers = [
|
42 |
+
'ppe-tabs-switched',
|
43 |
+
'ppe-toggle-switched',
|
44 |
+
];
|
45 |
+
|
46 |
+
$triggers.forEach(function(trigger) {
|
47 |
+
if ( 'undefined' !== typeof trigger ) {
|
48 |
+
$(document).on(trigger, function(e, wrap) {
|
49 |
+
if ( wrap.find( selector ).length > 0 ) {
|
50 |
+
setTimeout(function() {
|
51 |
+
if ( 'slick' === type ) {
|
52 |
+
slider.slick( 'setPosition' );
|
53 |
+
}
|
54 |
+
if ( 'swiper' === type ) {
|
55 |
+
slider.update();
|
56 |
+
}
|
57 |
+
}, 100);
|
58 |
+
}
|
59 |
+
});
|
60 |
+
}
|
61 |
+
});
|
62 |
+
};
|
63 |
+
|
64 |
var ImageHotspotHandler = function ($scope, $) {
|
65 |
var id = $scope.data('id'),
|
66 |
elementSettings = getElementSettings( $scope ),
|
67 |
$tt_arrow = elementSettings.tooltip_arrow,
|
68 |
+
$tt_always_open = elementSettings.tooltip_always_open,
|
69 |
$tt_trigger = elementSettings.tooltip_trigger;
|
70 |
|
71 |
$('.pp-hot-spot-wrap[data-tooltip]').each(function () {
|
97 |
animationIn : $animation_in,
|
98 |
animationOut : $animation_out,
|
99 |
animDuration : 400,
|
100 |
+
alwaysOpen : ( $tt_always_open === 'yes' ) ? true : false,
|
101 |
toggleable : ($tt_trigger === 'click') ? true : false
|
102 |
};
|
103 |
|
156 |
|
157 |
var mySwiper = new Swiper(carousel, slider_options);
|
158 |
};
|
159 |
+
|
160 |
+
var IbEqualHeight = function($scope, $) {
|
161 |
+
var maxHeight = 0;
|
162 |
+
$scope.find('.swiper-slide').each( function() {
|
163 |
+
if($(this).height() > maxHeight){
|
164 |
+
maxHeight = $(this).height();
|
165 |
+
}
|
166 |
+
});
|
167 |
+
$scope.find('.pp-info-box-content-wrap').css('min-height',maxHeight);
|
168 |
+
};
|
169 |
|
170 |
var InfoBoxCarouselHandler = function ($scope, $) {
|
171 |
+
var elementSettings = getElementSettings( $scope ),
|
172 |
+
$carousel = $scope.find('.pp-info-box-carousel'),
|
173 |
+
slider_options = JSON.parse( $carousel.attr('data-slider-settings') ),
|
174 |
+
equal_height = elementSettings.equal_height_boxes,
|
175 |
+
mySwiper = new Swiper($carousel, slider_options);
|
|
|
|
|
176 |
|
177 |
if ( equal_height === 'yes' ) {
|
178 |
+
IbEqualHeight($scope, $);
|
179 |
+
$(window).resize(IbEqualHeight($scope, $));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
180 |
}
|
181 |
|
182 |
+
PPSliderUpdate( mySwiper, '.pp-info-box-carousel', 'swiper' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
183 |
};
|
184 |
|
185 |
var InstaFeedPopupHandler = function ($scope, $) {
|
assets/js/tooltip.js
CHANGED
@@ -54,6 +54,7 @@
|
|
54 |
offset: this.element.data("tooltipOffset") || 7,
|
55 |
extraClass: this.element.data("tooltipClass") || false,
|
56 |
toggleable: this.element.data("tooltipToggleable") || false,
|
|
|
57 |
width: this.element.data("tooltipWidth") || undefined,
|
58 |
height: this.element.data("tooltipHeight") || undefined
|
59 |
}, options);
|
@@ -74,7 +75,7 @@
|
|
74 |
html = self.element.find(self.options.contentElement);
|
75 |
} else {
|
76 |
var dataContent = self.element.data("tooltip") || false;
|
77 |
-
var contentElement = self.element.find(".tooltip-content");
|
78 |
if (!dataContent && contentElement.length) {
|
79 |
html = contentElement.children();
|
80 |
} else if (dataContent) {
|
@@ -140,37 +141,42 @@
|
|
140 |
*/
|
141 |
Tooltip.prototype.init = function() {
|
142 |
var self = this;
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
self.create();
|
147 |
-
}
|
148 |
-
if (!self._visible) {
|
149 |
-
self.position();
|
150 |
-
self.show();
|
151 |
-
} else {
|
152 |
-
self.hide();
|
153 |
-
}
|
154 |
-
});
|
155 |
} else {
|
156 |
-
self.
|
157 |
-
"
|
158 |
-
if (self.
|
159 |
-
|
160 |
}
|
161 |
-
self.
|
162 |
-
self.
|
163 |
self.show();
|
164 |
-
}
|
165 |
-
|
166 |
-
"mouseleave": function(e) {
|
167 |
-
if (self._showTimer) {
|
168 |
-
clearTimeout(self._showTimer);
|
169 |
-
self._showTimer = null;
|
170 |
}
|
171 |
-
|
172 |
-
|
173 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
174 |
}
|
175 |
};
|
176 |
|
@@ -442,7 +448,7 @@
|
|
442 |
// Throttle timer
|
443 |
var throttled = false;
|
444 |
// Let's reposition tooltips on resize and scroll
|
445 |
-
$(window).on("resize
|
446 |
// If throttled, do nothing
|
447 |
if (throttled) {
|
448 |
return;
|
54 |
offset: this.element.data("tooltipOffset") || 7,
|
55 |
extraClass: this.element.data("tooltipClass") || false,
|
56 |
toggleable: this.element.data("tooltipToggleable") || false,
|
57 |
+
alwaysOpen: this.element.data("alwaysOpen") || false,
|
58 |
width: this.element.data("tooltipWidth") || undefined,
|
59 |
height: this.element.data("tooltipHeight") || undefined
|
60 |
}, options);
|
75 |
html = self.element.find(self.options.contentElement);
|
76 |
} else {
|
77 |
var dataContent = self.element.data("tooltip") || false;
|
78 |
+
var contentElement = self.element.find(".pp-tooltip-content");
|
79 |
if (!dataContent && contentElement.length) {
|
80 |
html = contentElement.children();
|
81 |
} else if (dataContent) {
|
141 |
*/
|
142 |
Tooltip.prototype.init = function() {
|
143 |
var self = this;
|
144 |
+
|
145 |
+
if ( true === self.options.alwaysOpen ) {
|
146 |
+
self.show();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
147 |
} else {
|
148 |
+
if (self.options.toggleable) {
|
149 |
+
self.element.on("click", function() {
|
150 |
+
if (!self.tooltip) {
|
151 |
+
self.create();
|
152 |
}
|
153 |
+
if (!self._visible) {
|
154 |
+
self.position();
|
155 |
self.show();
|
156 |
+
} else {
|
157 |
+
self.hide();
|
|
|
|
|
|
|
|
|
158 |
}
|
159 |
+
});
|
160 |
+
} else {
|
161 |
+
self.element.on({
|
162 |
+
"mouseenter": function(e) {
|
163 |
+
if (self._showTimer) {
|
164 |
+
return;
|
165 |
+
}
|
166 |
+
self._showTimer = setTimeout(function() {
|
167 |
+
self._showTimer = null;
|
168 |
+
self.show();
|
169 |
+
}, self.options.showDelay);
|
170 |
+
},
|
171 |
+
"mouseleave": function(e) {
|
172 |
+
if (self._showTimer) {
|
173 |
+
clearTimeout(self._showTimer);
|
174 |
+
self._showTimer = null;
|
175 |
+
}
|
176 |
+
self.hide(true);
|
177 |
+
}
|
178 |
+
});
|
179 |
+
}
|
180 |
}
|
181 |
};
|
182 |
|
448 |
// Throttle timer
|
449 |
var throttled = false;
|
450 |
// Let's reposition tooltips on resize and scroll
|
451 |
+
$(window).on("resize", function() {
|
452 |
// If throttled, do nothing
|
453 |
if (throttled) {
|
454 |
return;
|
changelog.txt
CHANGED
@@ -1,3 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
== 2.1.3 ==
|
2 |
Release date: August 31, 2020
|
3 |
* Fixed: Buttons - Tooltip styling options were not working in buttons widget
|
1 |
+
== 2.1.4 ==
|
2 |
+
Release date: September 14, 2020
|
3 |
+
* Added: Info Box, Info Box Carousel - Option to show button in case of link type box option
|
4 |
+
* Enhancement: Info Box Carousel - Updated Choose Arrow control
|
5 |
+
* Fixed: Logo Grid - Greyscale option was not working in editor
|
6 |
+
* Added: Image Hotspots - Typography option for hotspot type text
|
7 |
+
* Added: Image Hotspots - Option to keep tooltips always open
|
8 |
+
|
9 |
== 2.1.3 ==
|
10 |
Release date: August 31, 2020
|
11 |
* Fixed: Buttons - Tooltip styling options were not working in buttons widget
|
modules/hotspots/widgets/hotspots.php
CHANGED
@@ -8,8 +8,9 @@
|
|
8 |
namespace PowerpackElementsLite\Modules\Hotspots\Widgets;
|
9 |
|
10 |
use PowerpackElementsLite\Base\Powerpack_Widget;
|
|
|
11 |
|
12 |
-
// Elementor Classes
|
13 |
use Elementor\Controls_Manager;
|
14 |
use Elementor\Utils;
|
15 |
use Elementor\Icons_Manager;
|
@@ -96,10 +97,37 @@ class Hotspots extends Powerpack_Widget {
|
|
96 |
*
|
97 |
* Adds different input fields to allow the user to change and customize the widget settings.
|
98 |
*
|
|
|
|
|
99 |
* @access protected
|
100 |
*/
|
101 |
protected function _register_controls() { // phpcs:ignore PSR2.Methods.MethodDeclaration.Underscore
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
102 |
|
|
|
103 |
/**
|
104 |
* Content Tab: Image
|
105 |
*/
|
@@ -113,7 +141,7 @@ class Hotspots extends Powerpack_Widget {
|
|
113 |
$this->add_control(
|
114 |
'image',
|
115 |
array(
|
116 |
-
'label' => __( 'Image', 'powerpack' ),
|
117 |
'type' => Controls_Manager::MEDIA,
|
118 |
'default' => array(
|
119 |
'url' => Utils::get_placeholder_image_src(),
|
@@ -131,7 +159,9 @@ class Hotspots extends Powerpack_Widget {
|
|
131 |
);
|
132 |
|
133 |
$this->end_controls_section();
|
|
|
134 |
|
|
|
135 |
/**
|
136 |
* Content Tab: Hotspots
|
137 |
*/
|
@@ -177,12 +207,13 @@ class Hotspots extends Powerpack_Widget {
|
|
177 |
array(
|
178 |
'label' => __( 'Icon', 'powerpack' ),
|
179 |
'type' => Controls_Manager::ICONS,
|
180 |
-
'label_block' =>
|
181 |
'default' => array(
|
182 |
'value' => 'fas fa-plus',
|
183 |
'library' => 'fa-solid',
|
184 |
),
|
185 |
'fa4compatibility' => 'hotspot_icon',
|
|
|
186 |
'conditions' => array(
|
187 |
'terms' => array(
|
188 |
array(
|
@@ -217,7 +248,7 @@ class Hotspots extends Powerpack_Widget {
|
|
217 |
$repeater->add_control(
|
218 |
'left_position',
|
219 |
array(
|
220 |
-
'label' => __( 'Left Position', 'powerpack' ),
|
221 |
'type' => Controls_Manager::SLIDER,
|
222 |
'range' => array(
|
223 |
'px' => array(
|
@@ -226,6 +257,7 @@ class Hotspots extends Powerpack_Widget {
|
|
226 |
'step' => 0.1,
|
227 |
),
|
228 |
),
|
|
|
229 |
'selectors' => array(
|
230 |
'{{WRAPPER}} {{CURRENT_ITEM}}' => 'left: {{SIZE}}%;',
|
231 |
),
|
@@ -235,7 +267,7 @@ class Hotspots extends Powerpack_Widget {
|
|
235 |
$repeater->add_control(
|
236 |
'top_position',
|
237 |
array(
|
238 |
-
'label' => __( 'Top Position', 'powerpack' ),
|
239 |
'type' => Controls_Manager::SLIDER,
|
240 |
'range' => array(
|
241 |
'px' => array(
|
@@ -254,6 +286,7 @@ class Hotspots extends Powerpack_Widget {
|
|
254 |
'hotspot_link',
|
255 |
array(
|
256 |
'label' => __( 'Link', 'powerpack' ),
|
|
|
257 |
'type' => Controls_Manager::URL,
|
258 |
'dynamic' => array(
|
259 |
'active' => true,
|
@@ -262,6 +295,7 @@ class Hotspots extends Powerpack_Widget {
|
|
262 |
'default' => array(
|
263 |
'url' => '#',
|
264 |
),
|
|
|
265 |
)
|
266 |
);
|
267 |
|
@@ -332,6 +366,18 @@ class Hotspots extends Powerpack_Widget {
|
|
332 |
|
333 |
$repeater->start_controls_tab( 'tab_style', array( 'label' => __( 'Style', 'powerpack' ) ) );
|
334 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
335 |
$repeater->add_control(
|
336 |
'hotspot_color_single',
|
337 |
array(
|
@@ -342,6 +388,9 @@ class Hotspots extends Powerpack_Widget {
|
|
342 |
'{{WRAPPER}} {{CURRENT_ITEM}}.pp-hot-spot-wrap, {{WRAPPER}} {{CURRENT_ITEM}} .pp-hot-spot-inner, {{WRAPPER}} {{CURRENT_ITEM}} .pp-hot-spot-inner:before' => 'color: {{VALUE}}',
|
343 |
'{{WRAPPER}} {{CURRENT_ITEM}}.pp-hot-spot-wrap .pp-icon svg' => 'fill: {{VALUE}}',
|
344 |
),
|
|
|
|
|
|
|
345 |
)
|
346 |
);
|
347 |
|
@@ -401,11 +450,14 @@ class Hotspots extends Powerpack_Widget {
|
|
401 |
'label_on' => __( 'Yes', 'powerpack' ),
|
402 |
'label_off' => __( 'No', 'powerpack' ),
|
403 |
'return_value' => 'yes',
|
|
|
404 |
)
|
405 |
);
|
406 |
|
407 |
$this->end_controls_section();
|
|
|
408 |
|
|
|
409 |
/**
|
410 |
* Content Tab: Tooltip Settings
|
411 |
*/
|
@@ -416,6 +468,19 @@ class Hotspots extends Powerpack_Widget {
|
|
416 |
)
|
417 |
);
|
418 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
419 |
$this->add_control(
|
420 |
'tooltip_trigger',
|
421 |
array(
|
@@ -427,6 +492,9 @@ class Hotspots extends Powerpack_Widget {
|
|
427 |
'click' => __( 'Click', 'powerpack' ),
|
428 |
),
|
429 |
'frontend_available' => true,
|
|
|
|
|
|
|
430 |
)
|
431 |
);
|
432 |
|
@@ -592,39 +660,52 @@ class Hotspots extends Powerpack_Widget {
|
|
592 |
);
|
593 |
|
594 |
$this->end_controls_section();
|
|
|
595 |
|
596 |
-
|
597 |
-
* Content Tab: Docs Links
|
598 |
-
*
|
599 |
-
* @since 1.4.8
|
600 |
-
* @access protected
|
601 |
-
*/
|
602 |
-
$this->start_controls_section(
|
603 |
-
'section_help_docs',
|
604 |
-
array(
|
605 |
-
'label' => __( 'Help Docs', 'powerpack' ),
|
606 |
-
)
|
607 |
-
);
|
608 |
|
609 |
-
$
|
610 |
-
'help_doc_1',
|
611 |
-
array(
|
612 |
-
'type' => Controls_Manager::RAW_HTML,
|
613 |
-
/* translators: %1$s doc link */
|
614 |
-
'raw' => sprintf( __( '%1$s Widget Overview %2$s', 'powerpack' ), '<a href="https://powerpackelements.com/docs/powerpack/widgets/image-hotspots/image-hotspots-widget-overview/?utm_source=widget&utm_medium=panel&utm_campaign=userkb" target="_blank" rel="noopener">', '</a>' ),
|
615 |
-
'content_classes' => 'pp-editor-doc-links',
|
616 |
-
)
|
617 |
-
);
|
618 |
|
619 |
-
$
|
620 |
|
621 |
-
if ( ! is_pp_elements_active() ) {
|
622 |
/**
|
623 |
-
* Content Tab:
|
624 |
*
|
625 |
-
* @since 1.
|
626 |
* @access protected
|
627 |
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
628 |
$this->start_controls_section(
|
629 |
'section_upgrade_powerpack',
|
630 |
array(
|
@@ -638,7 +719,6 @@ class Hotspots extends Powerpack_Widget {
|
|
638 |
array(
|
639 |
'label' => '',
|
640 |
'type' => Controls_Manager::RAW_HTML,
|
641 |
-
// translators: %1$s opening link tag, %2$s closing link tag.
|
642 |
'raw' => apply_filters( 'upgrade_powerpack_message', sprintf( __( 'Upgrade to %1$s Pro Version %2$s for 70+ widgets, exciting extensions and advanced features.', 'powerpack' ), '<a href="#" target="_blank" rel="noopener">', '</a>' ) ),
|
643 |
'content_classes' => 'upgrade-powerpack-notice elementor-panel-alert elementor-panel-alert-info',
|
644 |
)
|
@@ -646,7 +726,9 @@ class Hotspots extends Powerpack_Widget {
|
|
646 |
|
647 |
$this->end_controls_section();
|
648 |
}
|
|
|
649 |
|
|
|
650 |
/**
|
651 |
* Style Tab: Image
|
652 |
*/
|
@@ -742,7 +824,9 @@ class Hotspots extends Powerpack_Widget {
|
|
742 |
);
|
743 |
|
744 |
$this->end_controls_section();
|
|
|
745 |
|
|
|
746 |
/**
|
747 |
* Style Tab: Hotspot
|
748 |
*/
|
@@ -774,6 +858,15 @@ class Hotspots extends Powerpack_Widget {
|
|
774 |
)
|
775 |
);
|
776 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
777 |
$this->add_control(
|
778 |
'icon_color_normal',
|
779 |
array(
|
@@ -844,7 +937,9 @@ class Hotspots extends Powerpack_Widget {
|
|
844 |
);
|
845 |
|
846 |
$this->end_controls_section();
|
|
|
847 |
|
|
|
848 |
/**
|
849 |
* Style Tab: Tooltip
|
850 |
*/
|
@@ -958,13 +1053,6 @@ class Hotspots extends Powerpack_Widget {
|
|
958 |
$this->end_controls_section();
|
959 |
}
|
960 |
|
961 |
-
/**
|
962 |
-
* Render Image Hostspots output on the frontend.
|
963 |
-
*
|
964 |
-
* Written in PHP and used to generate the final HTML.
|
965 |
-
*
|
966 |
-
* @access protected
|
967 |
-
*/
|
968 |
protected function render() {
|
969 |
$settings = $this->get_settings_for_display();
|
970 |
$fallback_defaults = array(
|
@@ -996,7 +1084,7 @@ class Hotspots extends Powerpack_Widget {
|
|
996 |
)
|
997 |
);
|
998 |
|
999 |
-
if ( 'yes' === $item['tooltip'] &&
|
1000 |
if ( 'global' !== $item['tooltip_position_local'] ) {
|
1001 |
$tooltip_position = 'tt-' . $item['tooltip_position_local'];
|
1002 |
} else {
|
@@ -1034,7 +1122,7 @@ class Hotspots extends Powerpack_Widget {
|
|
1034 |
|
1035 |
$migration_allowed = Icons_Manager::is_migration_allowed();
|
1036 |
|
1037 |
-
// add old default
|
1038 |
if ( ! isset( $item['hotspot_icon'] ) && ! $migration_allowed ) {
|
1039 |
$item['hotspot_icon'] = isset( $fallback_defaults[ $index ] ) ? $fallback_defaults[ $index ] : 'fa fa-plus';
|
1040 |
}
|
@@ -1052,9 +1140,10 @@ class Hotspots extends Powerpack_Widget {
|
|
1052 |
|
1053 |
}
|
1054 |
}
|
|
|
1055 |
?>
|
1056 |
-
<<?php echo
|
1057 |
-
<span <?php echo
|
1058 |
<span class="pp-hotspot-icon-wrap">
|
1059 |
<?php
|
1060 |
if ( 'icon' === $item['hotspot_type'] ) {
|
@@ -1075,10 +1164,10 @@ class Hotspots extends Powerpack_Widget {
|
|
1075 |
?>
|
1076 |
</span>
|
1077 |
</span>
|
1078 |
-
</<?php echo
|
1079 |
<?php endforeach; ?>
|
1080 |
|
1081 |
-
<?php echo
|
1082 |
</div>
|
1083 |
</div>
|
1084 |
<?php
|
@@ -1089,9 +1178,10 @@ class Hotspots extends Powerpack_Widget {
|
|
1089 |
*
|
1090 |
* Written as a Backbone JavaScript template and used to generate the live preview.
|
1091 |
*
|
|
|
1092 |
* @access protected
|
1093 |
*/
|
1094 |
-
protected function
|
1095 |
?>
|
1096 |
<#
|
1097 |
var i = 1;
|
@@ -1198,4 +1288,18 @@ class Hotspots extends Powerpack_Widget {
|
|
1198 |
</div>
|
1199 |
<?php
|
1200 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1201 |
}
|
8 |
namespace PowerpackElementsLite\Modules\Hotspots\Widgets;
|
9 |
|
10 |
use PowerpackElementsLite\Base\Powerpack_Widget;
|
11 |
+
use PowerpackElementsLite\Classes\PP_Config;
|
12 |
|
13 |
+
// Elementor Classes
|
14 |
use Elementor\Controls_Manager;
|
15 |
use Elementor\Utils;
|
16 |
use Elementor\Icons_Manager;
|
97 |
*
|
98 |
* Adds different input fields to allow the user to change and customize the widget settings.
|
99 |
*
|
100 |
+
* Remove this after Elementor v3.4.0
|
101 |
+
*
|
102 |
* @access protected
|
103 |
*/
|
104 |
protected function _register_controls() { // phpcs:ignore PSR2.Methods.MethodDeclaration.Underscore
|
105 |
+
$this->register_controls();
|
106 |
+
}
|
107 |
+
|
108 |
+
/**
|
109 |
+
* Register image hotspots widget controls.
|
110 |
+
*
|
111 |
+
* Adds different input fields to allow the user to change and customize the widget settings.
|
112 |
+
*
|
113 |
+
* @since 2.1.4
|
114 |
+
* @access protected
|
115 |
+
*/
|
116 |
+
protected function register_controls() {
|
117 |
+
/* Content Tab */
|
118 |
+
$this->register_content_image_controls();
|
119 |
+
$this->register_content_hotspots_controls();
|
120 |
+
$this->register_content_tooltip_controls();
|
121 |
+
$this->register_content_help_docs_controls();
|
122 |
+
$this->register_content_upgrade_controls();
|
123 |
+
|
124 |
+
/* Style Tab */
|
125 |
+
$this->register_style_image_controls();
|
126 |
+
$this->register_style_hotspot_controls();
|
127 |
+
$this->register_style_tooltip_controls();
|
128 |
+
}
|
129 |
|
130 |
+
protected function register_content_image_controls() {
|
131 |
/**
|
132 |
* Content Tab: Image
|
133 |
*/
|
141 |
$this->add_control(
|
142 |
'image',
|
143 |
array(
|
144 |
+
'label' => __( 'Choose Image', 'powerpack' ),
|
145 |
'type' => Controls_Manager::MEDIA,
|
146 |
'default' => array(
|
147 |
'url' => Utils::get_placeholder_image_src(),
|
159 |
);
|
160 |
|
161 |
$this->end_controls_section();
|
162 |
+
}
|
163 |
|
164 |
+
protected function register_content_hotspots_controls() {
|
165 |
/**
|
166 |
* Content Tab: Hotspots
|
167 |
*/
|
207 |
array(
|
208 |
'label' => __( 'Icon', 'powerpack' ),
|
209 |
'type' => Controls_Manager::ICONS,
|
210 |
+
'label_block' => false,
|
211 |
'default' => array(
|
212 |
'value' => 'fas fa-plus',
|
213 |
'library' => 'fa-solid',
|
214 |
),
|
215 |
'fa4compatibility' => 'hotspot_icon',
|
216 |
+
'skin' => 'inline',
|
217 |
'conditions' => array(
|
218 |
'terms' => array(
|
219 |
array(
|
248 |
$repeater->add_control(
|
249 |
'left_position',
|
250 |
array(
|
251 |
+
'label' => __( 'Left Position (%)', 'powerpack' ),
|
252 |
'type' => Controls_Manager::SLIDER,
|
253 |
'range' => array(
|
254 |
'px' => array(
|
257 |
'step' => 0.1,
|
258 |
),
|
259 |
),
|
260 |
+
'separator' => 'before',
|
261 |
'selectors' => array(
|
262 |
'{{WRAPPER}} {{CURRENT_ITEM}}' => 'left: {{SIZE}}%;',
|
263 |
),
|
267 |
$repeater->add_control(
|
268 |
'top_position',
|
269 |
array(
|
270 |
+
'label' => __( 'Top Position (%)', 'powerpack' ),
|
271 |
'type' => Controls_Manager::SLIDER,
|
272 |
'range' => array(
|
273 |
'px' => array(
|
286 |
'hotspot_link',
|
287 |
array(
|
288 |
'label' => __( 'Link', 'powerpack' ),
|
289 |
+
'description' => __( 'Works only when tolltips\' Trigger is set to Hover or if tooltip is disabled.', 'powerpack' ),
|
290 |
'type' => Controls_Manager::URL,
|
291 |
'dynamic' => array(
|
292 |
'active' => true,
|
295 |
'default' => array(
|
296 |
'url' => '#',
|
297 |
),
|
298 |
+
'separator' => 'before',
|
299 |
)
|
300 |
);
|
301 |
|
366 |
|
367 |
$repeater->start_controls_tab( 'tab_style', array( 'label' => __( 'Style', 'powerpack' ) ) );
|
368 |
|
369 |
+
$repeater->add_group_control(
|
370 |
+
Group_Control_Typography::get_type(),
|
371 |
+
array(
|
372 |
+
'name' => 'hotspot_typography',
|
373 |
+
'label' => __( 'Typography', 'powerpack' ),
|
374 |
+
'selector' => '{{WRAPPER}} {{CURRENT_ITEM}}.pp-hot-spot-wrap',
|
375 |
+
'condition' => array(
|
376 |
+
'hotspot_type' => 'text',
|
377 |
+
),
|
378 |
+
)
|
379 |
+
);
|
380 |
+
|
381 |
$repeater->add_control(
|
382 |
'hotspot_color_single',
|
383 |
array(
|
388 |
'{{WRAPPER}} {{CURRENT_ITEM}}.pp-hot-spot-wrap, {{WRAPPER}} {{CURRENT_ITEM}} .pp-hot-spot-inner, {{WRAPPER}} {{CURRENT_ITEM}} .pp-hot-spot-inner:before' => 'color: {{VALUE}}',
|
389 |
'{{WRAPPER}} {{CURRENT_ITEM}}.pp-hot-spot-wrap .pp-icon svg' => 'fill: {{VALUE}}',
|
390 |
),
|
391 |
+
'condition' => array(
|
392 |
+
'hotspot_type!' => 'blank',
|
393 |
+
),
|
394 |
)
|
395 |
);
|
396 |
|
450 |
'label_on' => __( 'Yes', 'powerpack' ),
|
451 |
'label_off' => __( 'No', 'powerpack' ),
|
452 |
'return_value' => 'yes',
|
453 |
+
'separator' => 'before',
|
454 |
)
|
455 |
);
|
456 |
|
457 |
$this->end_controls_section();
|
458 |
+
}
|
459 |
|
460 |
+
protected function register_content_tooltip_controls() {
|
461 |
/**
|
462 |
* Content Tab: Tooltip Settings
|
463 |
*/
|
468 |
)
|
469 |
);
|
470 |
|
471 |
+
$this->add_control(
|
472 |
+
'tooltip_always_open',
|
473 |
+
array(
|
474 |
+
'label' => __( 'Always Open?', 'powerpack' ),
|
475 |
+
'type' => Controls_Manager::SWITCHER,
|
476 |
+
'default' => 'no',
|
477 |
+
'label_on' => __( 'Yes', 'powerpack' ),
|
478 |
+
'label_off' => __( 'No', 'powerpack' ),
|
479 |
+
'return_value' => 'yes',
|
480 |
+
'frontend_available' => true,
|
481 |
+
)
|
482 |
+
);
|
483 |
+
|
484 |
$this->add_control(
|
485 |
'tooltip_trigger',
|
486 |
array(
|
492 |
'click' => __( 'Click', 'powerpack' ),
|
493 |
),
|
494 |
'frontend_available' => true,
|
495 |
+
'condition' => array(
|
496 |
+
'tooltip_always_open!' => 'yes',
|
497 |
+
),
|
498 |
)
|
499 |
);
|
500 |
|
660 |
);
|
661 |
|
662 |
$this->end_controls_section();
|
663 |
+
}
|
664 |
|
665 |
+
protected function register_content_help_docs_controls() {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
666 |
|
667 |
+
$help_docs = PP_Config::get_widget_help_links( 'Hotspots' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
668 |
|
669 |
+
if ( ! empty( $help_docs ) ) {
|
670 |
|
|
|
671 |
/**
|
672 |
+
* Content Tab: Help Docs
|
673 |
*
|
674 |
+
* @since 1.4.8
|
675 |
* @access protected
|
676 |
*/
|
677 |
+
$this->start_controls_section(
|
678 |
+
'section_help_docs',
|
679 |
+
array(
|
680 |
+
'label' => __( 'Help Docs', 'powerpack' ),
|
681 |
+
)
|
682 |
+
);
|
683 |
+
|
684 |
+
$hd_counter = 1;
|
685 |
+
foreach ( $help_docs as $hd_title => $hd_link ) {
|
686 |
+
$this->add_control(
|
687 |
+
'help_doc_' . $hd_counter,
|
688 |
+
array(
|
689 |
+
'type' => Controls_Manager::RAW_HTML,
|
690 |
+
'raw' => sprintf( '%1$s ' . $hd_title . ' %2$s', '<a href="' . $hd_link . '" target="_blank" rel="noopener">', '</a>' ),
|
691 |
+
'content_classes' => 'pp-editor-doc-links',
|
692 |
+
)
|
693 |
+
);
|
694 |
+
|
695 |
+
$hd_counter++;
|
696 |
+
}
|
697 |
+
|
698 |
+
$this->end_controls_section();
|
699 |
+
}
|
700 |
+
}
|
701 |
+
|
702 |
+
/**
|
703 |
+
* Register PowerPack Upgrade in Content tab
|
704 |
+
*
|
705 |
+
* @return void
|
706 |
+
*/
|
707 |
+
protected function register_content_upgrade_controls() {
|
708 |
+
if ( ! is_pp_elements_active() ) {
|
709 |
$this->start_controls_section(
|
710 |
'section_upgrade_powerpack',
|
711 |
array(
|
719 |
array(
|
720 |
'label' => '',
|
721 |
'type' => Controls_Manager::RAW_HTML,
|
|
|
722 |
'raw' => apply_filters( 'upgrade_powerpack_message', sprintf( __( 'Upgrade to %1$s Pro Version %2$s for 70+ widgets, exciting extensions and advanced features.', 'powerpack' ), '<a href="#" target="_blank" rel="noopener">', '</a>' ) ),
|
723 |
'content_classes' => 'upgrade-powerpack-notice elementor-panel-alert elementor-panel-alert-info',
|
724 |
)
|
726 |
|
727 |
$this->end_controls_section();
|
728 |
}
|
729 |
+
}
|
730 |
|
731 |
+
protected function register_style_image_controls() {
|
732 |
/**
|
733 |
* Style Tab: Image
|
734 |
*/
|
824 |
);
|
825 |
|
826 |
$this->end_controls_section();
|
827 |
+
}
|
828 |
|
829 |
+
protected function register_style_hotspot_controls() {
|
830 |
/**
|
831 |
* Style Tab: Hotspot
|
832 |
*/
|
858 |
)
|
859 |
);
|
860 |
|
861 |
+
$this->add_group_control(
|
862 |
+
Group_Control_Typography::get_type(),
|
863 |
+
array(
|
864 |
+
'name' => 'hotspots_typography',
|
865 |
+
'label' => __( 'Typography', 'powerpack' ),
|
866 |
+
'selector' => '{{WRAPPER}} .pp-hot-spot-wrap',
|
867 |
+
)
|
868 |
+
);
|
869 |
+
|
870 |
$this->add_control(
|
871 |
'icon_color_normal',
|
872 |
array(
|
937 |
);
|
938 |
|
939 |
$this->end_controls_section();
|
940 |
+
}
|
941 |
|
942 |
+
protected function register_style_tooltip_controls() {
|
943 |
/**
|
944 |
* Style Tab: Tooltip
|
945 |
*/
|
1053 |
$this->end_controls_section();
|
1054 |
}
|
1055 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1056 |
protected function render() {
|
1057 |
$settings = $this->get_settings_for_display();
|
1058 |
$fallback_defaults = array(
|
1084 |
)
|
1085 |
);
|
1086 |
|
1087 |
+
if ( 'yes' === $item['tooltip'] && $item['tooltip_content'] ) {
|
1088 |
if ( 'global' !== $item['tooltip_position_local'] ) {
|
1089 |
$tooltip_position = 'tt-' . $item['tooltip_position_local'];
|
1090 |
} else {
|
1122 |
|
1123 |
$migration_allowed = Icons_Manager::is_migration_allowed();
|
1124 |
|
1125 |
+
// add old default
|
1126 |
if ( ! isset( $item['hotspot_icon'] ) && ! $migration_allowed ) {
|
1127 |
$item['hotspot_icon'] = isset( $fallback_defaults[ $index ] ) ? $fallback_defaults[ $index ] : 'fa fa-plus';
|
1128 |
}
|
1140 |
|
1141 |
}
|
1142 |
}
|
1143 |
+
|
1144 |
?>
|
1145 |
+
<<?php echo $hotspot_tag; ?> <?php echo $this->get_render_attribute_string( $hotspot_key ); ?>>
|
1146 |
+
<span <?php echo $this->get_render_attribute_string( $hotspot_inner_key ); ?>>
|
1147 |
<span class="pp-hotspot-icon-wrap">
|
1148 |
<?php
|
1149 |
if ( 'icon' === $item['hotspot_type'] ) {
|
1164 |
?>
|
1165 |
</span>
|
1166 |
</span>
|
1167 |
+
</<?php echo $hotspot_tag; ?>>
|
1168 |
<?php endforeach; ?>
|
1169 |
|
1170 |
+
<?php echo Group_Control_Image_Size::get_attachment_image_html( $settings ); ?>
|
1171 |
</div>
|
1172 |
</div>
|
1173 |
<?php
|
1178 |
*
|
1179 |
* Written as a Backbone JavaScript template and used to generate the live preview.
|
1180 |
*
|
1181 |
+
* @since 2.0.3
|
1182 |
* @access protected
|
1183 |
*/
|
1184 |
+
protected function content_template() {
|
1185 |
?>
|
1186 |
<#
|
1187 |
var i = 1;
|
1288 |
</div>
|
1289 |
<?php
|
1290 |
}
|
1291 |
+
|
1292 |
+
/**
|
1293 |
+
* Render image hotspots widget output in the editor.
|
1294 |
+
*
|
1295 |
+
* Written as a Backbone JavaScript template and used to generate the live preview.
|
1296 |
+
*
|
1297 |
+
* Remove this after Elementor v3.3.0
|
1298 |
+
*
|
1299 |
+
* @since 1.0.0
|
1300 |
+
* @access protected
|
1301 |
+
*/
|
1302 |
+
protected function _content_template() { // phpcs:ignore PSR2.Methods.MethodDeclaration.Underscore
|
1303 |
+
$this->content_template();
|
1304 |
+
}
|
1305 |
}
|
modules/info-box/widgets/info-box-carousel.php
CHANGED
@@ -2,6 +2,7 @@
|
|
2 |
namespace PowerpackElementsLite\Modules\InfoBox\Widgets;
|
3 |
|
4 |
use PowerpackElementsLite\Base\Powerpack_Widget;
|
|
|
5 |
|
6 |
// Elementor Classes
|
7 |
use Elementor\Controls_Manager;
|
@@ -84,10 +85,21 @@ class Info_Box_Carousel extends Powerpack_Widget {
|
|
84 |
* @return array Widget scripts dependencies.
|
85 |
*/
|
86 |
public function get_script_depends() {
|
87 |
-
return
|
88 |
'jquery-swiper',
|
89 |
'powerpack-frontend',
|
90 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
91 |
}
|
92 |
|
93 |
/**
|
@@ -95,230 +107,343 @@ class Info_Box_Carousel extends Powerpack_Widget {
|
|
95 |
*
|
96 |
* Adds different input fields to allow the user to change and customize the widget settings.
|
97 |
*
|
|
|
98 |
* @access protected
|
99 |
*/
|
100 |
-
protected function
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
101 |
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
CONTENT TAB
|
106 |
-
/*-----------------------------------------------------------------------------------*/
|
107 |
|
|
|
108 |
/**
|
109 |
* Content Tab: Info Boxes
|
110 |
* -------------------------------------------------
|
111 |
*/
|
112 |
$this->start_controls_section(
|
113 |
'section_info_boxes',
|
114 |
-
|
115 |
-
'label'
|
116 |
-
|
117 |
);
|
118 |
|
119 |
$repeater = new Repeater();
|
120 |
|
121 |
$repeater->start_controls_tabs( 'items_repeater' );
|
122 |
|
123 |
-
$repeater->start_controls_tab( 'tab_content',
|
124 |
|
125 |
$repeater->add_control(
|
126 |
'title',
|
127 |
-
|
128 |
-
'label'
|
129 |
-
'type'
|
130 |
-
'dynamic'
|
131 |
-
'active'
|
132 |
-
|
133 |
-
'default'
|
134 |
-
|
135 |
);
|
136 |
|
137 |
$repeater->add_control(
|
138 |
'subtitle',
|
139 |
-
|
140 |
-
'label'
|
141 |
-
'type'
|
142 |
-
'dynamic'
|
143 |
-
'active'
|
144 |
-
|
145 |
-
'default'
|
146 |
-
|
147 |
);
|
148 |
|
149 |
$repeater->add_control(
|
150 |
'description',
|
151 |
-
|
152 |
-
'label'
|
153 |
-
'type'
|
154 |
-
'dynamic'
|
155 |
-
'active'
|
156 |
-
|
157 |
-
'default'
|
158 |
-
|
159 |
);
|
160 |
|
161 |
$repeater->end_controls_tab();
|
162 |
|
163 |
-
$repeater->start_controls_tab( 'tab_icon',
|
164 |
|
165 |
$repeater->add_control(
|
166 |
'icon_type',
|
167 |
-
|
168 |
-
'label'
|
169 |
-
'type'
|
170 |
-
'label_block'
|
171 |
-
'options'
|
172 |
-
'none'
|
173 |
'title' => esc_html__( 'None', 'powerpack' ),
|
174 |
-
'icon'
|
175 |
-
|
176 |
-
'icon'
|
177 |
'title' => esc_html__( 'Icon', 'powerpack' ),
|
178 |
-
'icon'
|
179 |
-
|
180 |
-
'image' =>
|
181 |
'title' => esc_html__( 'Image', 'powerpack' ),
|
182 |
-
'icon'
|
183 |
-
|
184 |
-
'text'
|
185 |
'title' => esc_html__( 'Text', 'powerpack' ),
|
186 |
-
'icon'
|
187 |
-
|
188 |
-
|
189 |
-
'default'
|
190 |
-
|
191 |
);
|
192 |
|
193 |
$repeater->add_control(
|
194 |
'selected_icon',
|
195 |
-
|
196 |
-
'label'
|
197 |
-
'type'
|
198 |
-
'label_block'
|
199 |
-
'default'
|
200 |
-
'value'
|
201 |
-
'library'
|
202 |
-
|
203 |
-
'fa4compatibility'
|
204 |
-
'condition'
|
205 |
-
'icon_type'
|
206 |
-
|
207 |
-
|
208 |
);
|
209 |
|
210 |
$repeater->add_control(
|
211 |
'icon_text',
|
212 |
-
|
213 |
-
'label'
|
214 |
-
'type'
|
215 |
-
'dynamic'
|
216 |
-
'active'
|
217 |
-
|
218 |
-
'default'
|
219 |
-
'condition'
|
220 |
-
'icon_type'
|
221 |
-
|
222 |
-
|
223 |
);
|
224 |
|
225 |
$repeater->add_control(
|
226 |
'image',
|
227 |
-
|
228 |
-
'label'
|
229 |
-
'type'
|
230 |
-
'dynamic'
|
231 |
-
'active'
|
232 |
-
|
233 |
-
'default'
|
234 |
'url' => Utils::get_placeholder_image_src(),
|
235 |
-
|
236 |
-
'condition'
|
237 |
'icon_type' => 'image',
|
238 |
-
|
239 |
-
|
240 |
);
|
241 |
|
242 |
$repeater->end_controls_tab();
|
243 |
|
244 |
-
$repeater->start_controls_tab( 'tab_link',
|
245 |
|
246 |
$repeater->add_control(
|
247 |
'link_type',
|
248 |
-
|
249 |
-
'label'
|
250 |
-
'type'
|
251 |
-
'default'
|
252 |
-
'options'
|
253 |
-
'none'
|
254 |
-
'box'
|
255 |
-
'icon'
|
256 |
-
'title'
|
257 |
-
'button'
|
258 |
-
|
259 |
-
|
260 |
);
|
261 |
|
262 |
$repeater->add_control(
|
263 |
'link',
|
264 |
-
|
265 |
-
'label'
|
266 |
-
'type'
|
267 |
-
'dynamic'
|
268 |
-
'active'
|
269 |
-
|
270 |
-
'placeholder'
|
271 |
-
'default'
|
272 |
'url' => '#',
|
273 |
-
|
274 |
-
'condition'
|
275 |
-
'link_type!'
|
276 |
-
|
277 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
278 |
);
|
279 |
|
280 |
$repeater->add_control(
|
281 |
'button_text',
|
282 |
-
|
283 |
-
'label'
|
284 |
-
'type'
|
285 |
-
'dynamic'
|
286 |
-
'active'
|
287 |
-
|
288 |
-
'default'
|
289 |
-
'
|
290 |
-
'
|
291 |
-
|
292 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
293 |
);
|
294 |
|
295 |
$repeater->add_control(
|
296 |
'select_button_icon',
|
297 |
-
|
298 |
-
'label'
|
299 |
-
'type'
|
300 |
-
'label_block'
|
301 |
-
'fa4compatibility'
|
302 |
-
'
|
303 |
-
'
|
304 |
-
|
305 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
306 |
);
|
307 |
|
308 |
$repeater->add_control(
|
309 |
'button_icon_position',
|
310 |
-
|
311 |
-
'label'
|
312 |
-
'type'
|
313 |
-
'default'
|
314 |
-
'options'
|
315 |
-
'before'
|
316 |
-
'after'
|
317 |
-
|
318 |
-
'
|
319 |
-
'
|
320 |
-
|
321 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
322 |
);
|
323 |
|
324 |
$repeater->end_controls_tab();
|
@@ -327,347 +452,384 @@ class Info_Box_Carousel extends Powerpack_Widget {
|
|
327 |
|
328 |
$this->add_control(
|
329 |
'pp_info_boxes',
|
330 |
-
|
331 |
-
'label'
|
332 |
-
'type'
|
333 |
-
'default'
|
334 |
-
|
335 |
'title' => __( 'Info Box 1', 'powerpack' ),
|
336 |
-
|
337 |
-
|
338 |
'title' => __( 'Info Box 2', 'powerpack' ),
|
339 |
-
|
340 |
-
|
341 |
'title' => __( 'Info Box 3', 'powerpack' ),
|
342 |
-
|
343 |
-
|
344 |
-
'fields'
|
345 |
-
'title_field'
|
346 |
-
|
347 |
);
|
348 |
|
349 |
$this->add_group_control(
|
350 |
Group_Control_Image_Size::get_type(),
|
351 |
-
|
352 |
-
'name'
|
353 |
-
'label'
|
354 |
-
'default'
|
355 |
-
'separator'
|
356 |
-
|
357 |
);
|
358 |
|
359 |
$this->add_control(
|
360 |
'divider_title_switch',
|
361 |
-
|
362 |
-
'label'
|
363 |
-
'type'
|
364 |
-
'default'
|
365 |
-
'label_on'
|
366 |
-
'label_off'
|
367 |
-
'return_value'
|
368 |
-
|
369 |
);
|
370 |
|
371 |
$this->add_control(
|
372 |
'title_html_tag',
|
373 |
-
|
374 |
-
'label'
|
375 |
-
'type'
|
376 |
-
'default'
|
377 |
-
'options'
|
378 |
-
'h1'
|
379 |
-
'h2'
|
380 |
-
'h3'
|
381 |
-
'h4'
|
382 |
-
'h5'
|
383 |
-
'h6'
|
384 |
-
'div'
|
385 |
-
'span'
|
386 |
-
'p'
|
387 |
-
|
388 |
-
|
389 |
);
|
390 |
|
391 |
$this->add_control(
|
392 |
'sub_title_html_tag',
|
393 |
-
|
394 |
-
'label'
|
395 |
-
'type'
|
396 |
-
'default'
|
397 |
-
'options'
|
398 |
-
'h1'
|
399 |
-
'h2'
|
400 |
-
'h3'
|
401 |
-
'h4'
|
402 |
-
'h5'
|
403 |
-
'h6'
|
404 |
-
'div'
|
405 |
-
'span'
|
406 |
-
'p'
|
407 |
-
|
408 |
-
|
409 |
);
|
410 |
|
411 |
$this->add_control(
|
412 |
'equal_height_boxes',
|
413 |
-
|
414 |
-
'label'
|
415 |
-
'type'
|
416 |
-
'default'
|
417 |
-
'label_on'
|
418 |
-
'label_off'
|
419 |
-
'return_value'
|
420 |
-
'frontend_available'
|
421 |
-
|
422 |
);
|
423 |
|
424 |
$this->end_controls_section();
|
|
|
425 |
|
|
|
426 |
/**
|
427 |
* Content Tab: Carousel Settings
|
428 |
* -------------------------------------------------
|
429 |
*/
|
430 |
$this->start_controls_section(
|
431 |
'section_carousel_settings',
|
432 |
-
|
433 |
-
'label'
|
434 |
-
|
435 |
);
|
436 |
|
437 |
$this->add_control(
|
438 |
'carousel_effect',
|
439 |
-
|
440 |
-
'label'
|
441 |
-
'description'
|
442 |
-
'type'
|
443 |
-
'default'
|
444 |
-
'options'
|
445 |
'slide' => __( 'Slide', 'powerpack' ),
|
446 |
'fade' => __( 'Fade', 'powerpack' ),
|
447 |
'cube' => __( 'Cube', 'powerpack' ),
|
448 |
'coverflow' => __( 'Coverflow', 'powerpack' ),
|
449 |
'flip' => __( 'Flip', 'powerpack' ),
|
450 |
-
|
451 |
-
|
452 |
);
|
453 |
|
454 |
$this->add_responsive_control(
|
455 |
'items',
|
456 |
-
|
457 |
-
'label'
|
458 |
-
'description'
|
459 |
-
'type'
|
460 |
-
'default'
|
461 |
-
'tablet_default'
|
462 |
-
'mobile_default'
|
463 |
-
'range'
|
464 |
-
'px' =>
|
465 |
-
'min'
|
466 |
-
'max'
|
467 |
-
'step'
|
468 |
-
|
469 |
-
|
470 |
-
'size_units'
|
471 |
-
'condition'
|
472 |
-
'carousel_effect'
|
473 |
-
|
474 |
-
'separator'
|
475 |
-
|
476 |
);
|
477 |
|
478 |
$this->add_responsive_control(
|
479 |
'margin',
|
480 |
-
|
481 |
-
'label'
|
482 |
-
'description'
|
483 |
-
'type'
|
484 |
-
'default'
|
485 |
-
'tablet_default'
|
486 |
-
'mobile_default'
|
487 |
-
'range'
|
488 |
-
'px' =>
|
489 |
-
'min'
|
490 |
-
'max'
|
491 |
-
'step'
|
492 |
-
|
493 |
-
|
494 |
-
'size_units'
|
495 |
-
'condition'
|
496 |
-
'carousel_effect'
|
497 |
-
|
498 |
-
|
499 |
);
|
500 |
|
501 |
$this->add_control(
|
502 |
'slider_speed',
|
503 |
-
|
504 |
-
'label'
|
505 |
-
'description'
|
506 |
-
'type'
|
507 |
-
'default'
|
508 |
-
'range'
|
509 |
-
'px' =>
|
510 |
-
'min'
|
511 |
-
'max'
|
512 |
-
'step'
|
513 |
-
|
514 |
-
|
515 |
-
'size_units'
|
516 |
-
'separator'
|
517 |
-
|
518 |
);
|
519 |
|
520 |
$this->add_control(
|
521 |
'autoplay',
|
522 |
-
|
523 |
-
'label'
|
524 |
-
'type'
|
525 |
-
'default'
|
526 |
-
'label_on'
|
527 |
-
'label_off'
|
528 |
-
'return_value'
|
529 |
-
'separator'
|
530 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
531 |
);
|
532 |
|
533 |
$this->add_control(
|
534 |
'autoplay_speed',
|
535 |
-
|
536 |
-
'label'
|
537 |
-
'type'
|
538 |
-
'default'
|
539 |
-
'range'
|
540 |
-
'px' =>
|
541 |
-
'min'
|
542 |
-
'max'
|
543 |
-
'step'
|
544 |
-
|
545 |
-
|
546 |
-
'size_units'
|
547 |
-
'condition'
|
548 |
-
'autoplay'
|
549 |
-
|
550 |
-
|
551 |
);
|
552 |
|
553 |
$this->add_control(
|
554 |
'infinite_loop',
|
555 |
-
|
556 |
-
'label'
|
557 |
-
'description'
|
558 |
-
'type'
|
559 |
-
'default'
|
560 |
-
'label_on'
|
561 |
-
'label_off'
|
562 |
-
'return_value'
|
563 |
-
|
564 |
);
|
565 |
|
566 |
$this->add_control(
|
567 |
'grab_cursor',
|
568 |
-
|
569 |
-
'label'
|
570 |
-
'description'
|
571 |
-
'type'
|
572 |
-
'default'
|
573 |
-
'label_on'
|
574 |
-
'label_off'
|
575 |
-
'return_value'
|
576 |
-
'separator'
|
577 |
-
|
578 |
);
|
579 |
|
580 |
$this->add_control(
|
581 |
'navigation_heading',
|
582 |
-
|
583 |
-
'label'
|
584 |
-
'type'
|
585 |
-
'separator'
|
586 |
-
|
587 |
);
|
588 |
|
589 |
$this->add_control(
|
590 |
'arrows',
|
591 |
-
|
592 |
-
'label'
|
593 |
-
'type'
|
594 |
-
'default'
|
595 |
-
'label_on'
|
596 |
-
'label_off'
|
597 |
-
'return_value'
|
598 |
-
|
599 |
);
|
600 |
|
601 |
$this->add_control(
|
602 |
'dots',
|
603 |
-
|
604 |
-
'label'
|
605 |
-
'type'
|
606 |
-
'default'
|
607 |
-
'label_on'
|
608 |
-
'label_off'
|
609 |
-
'return_value'
|
610 |
-
|
611 |
);
|
612 |
|
613 |
$this->add_control(
|
614 |
'pagination_type',
|
615 |
-
|
616 |
-
'label'
|
617 |
-
'type'
|
618 |
-
'default'
|
619 |
-
'options'
|
620 |
-
'bullets'
|
621 |
-
'fraction'
|
622 |
-
|
623 |
-
'condition'
|
624 |
-
'dots'
|
625 |
-
|
626 |
-
|
627 |
);
|
628 |
|
629 |
$this->add_control(
|
630 |
'direction',
|
631 |
-
|
632 |
-
'label'
|
633 |
-
'type'
|
634 |
-
'default'
|
635 |
-
'options'
|
636 |
-
'auto'
|
637 |
-
'left'
|
638 |
-
'right'
|
639 |
-
|
640 |
-
'separator'
|
641 |
-
|
642 |
);
|
643 |
|
644 |
$this->end_controls_section();
|
|
|
645 |
|
646 |
-
|
647 |
-
* Content Tab: Docs Links
|
648 |
-
*
|
649 |
-
* @since 1.4.8
|
650 |
-
* @access protected
|
651 |
-
*/
|
652 |
-
$this->start_controls_section(
|
653 |
-
'section_help_docs',
|
654 |
-
array(
|
655 |
-
'label' => __( 'Help Docs', 'powerpack' ),
|
656 |
-
)
|
657 |
-
);
|
658 |
|
659 |
-
$
|
660 |
-
'help_doc_1',
|
661 |
-
array(
|
662 |
-
'type' => Controls_Manager::RAW_HTML,
|
663 |
-
/* translators: %1$s doc link */
|
664 |
-
'raw' => sprintf( __( '%1$s Widget Overview %2$s', 'powerpack' ), '<a href="https://powerpackelements.com/docs/powerpack/widgets/info-box-carousel/info-box-carousel-widget-overview/?utm_source=widget&utm_medium=panel&utm_campaign=userkb" target="_blank" rel="noopener">', '</a>' ),
|
665 |
-
'content_classes' => 'pp-editor-doc-links',
|
666 |
-
)
|
667 |
-
);
|
668 |
|
669 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
670 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
671 |
if ( ! is_pp_elements_active() ) {
|
672 |
$this->start_controls_section(
|
673 |
'section_upgrade_powerpack',
|
@@ -689,307 +851,309 @@ class Info_Box_Carousel extends Powerpack_Widget {
|
|
689 |
|
690 |
$this->end_controls_section();
|
691 |
}
|
|
|
692 |
|
693 |
-
|
694 |
-
|
695 |
-
|
696 |
-
STYLE TAB
|
697 |
-
/*-----------------------------------------------------------------------------------*/
|
698 |
|
|
|
699 |
/**
|
700 |
* Style Tab: Info Boxes
|
701 |
* -------------------------------------------------
|
702 |
*/
|
703 |
$this->start_controls_section(
|
704 |
'section_info_box_style',
|
705 |
-
|
706 |
-
'label'
|
707 |
-
'tab'
|
708 |
-
|
709 |
);
|
710 |
|
711 |
$this->add_responsive_control(
|
712 |
'align',
|
713 |
-
|
714 |
-
'label'
|
715 |
-
'type'
|
716 |
-
'options'
|
717 |
-
'left'
|
718 |
'title' => __( 'Left', 'powerpack' ),
|
719 |
'icon' => 'fa fa-align-left',
|
720 |
-
|
721 |
-
'center'
|
722 |
'title' => __( 'Center', 'powerpack' ),
|
723 |
'icon' => 'fa fa-align-center',
|
724 |
-
|
725 |
-
'right'
|
726 |
'title' => __( 'Right', 'powerpack' ),
|
727 |
'icon' => 'fa fa-align-right',
|
728 |
-
|
729 |
-
'justify'
|
730 |
'title' => __( 'Justified', 'powerpack' ),
|
731 |
'icon' => 'fa fa-align-justify',
|
732 |
-
|
733 |
-
|
734 |
-
'default'
|
735 |
-
'selectors'
|
736 |
'{{WRAPPER}} .pp-info-box .swiper-slide' => 'text-align: {{VALUE}};',
|
737 |
-
|
738 |
-
|
739 |
);
|
740 |
|
741 |
$this->add_group_control(
|
742 |
Group_Control_Background::get_type(),
|
743 |
-
|
744 |
-
'name'
|
745 |
-
'types'
|
746 |
-
'separator'
|
747 |
-
'selector'
|
748 |
-
|
749 |
);
|
750 |
|
751 |
$this->add_group_control(
|
752 |
Group_Control_Border::get_type(),
|
753 |
-
|
754 |
-
'name'
|
755 |
-
'label'
|
756 |
-
'placeholder'
|
757 |
-
'default'
|
758 |
-
'separator'
|
759 |
-
'selector'
|
760 |
-
|
761 |
);
|
762 |
|
763 |
$this->add_responsive_control(
|
764 |
'info_box_padding',
|
765 |
-
|
766 |
-
'label'
|
767 |
-
'type'
|
768 |
-
'size_units'
|
769 |
-
'separator'
|
770 |
-
'selectors'
|
771 |
'{{WRAPPER}} .pp-info-box-content-wrap' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
772 |
-
|
773 |
-
|
774 |
);
|
775 |
|
776 |
$this->end_controls_section();
|
|
|
777 |
|
|
|
778 |
/**
|
779 |
* Style Tab: Icon Style
|
780 |
* -------------------------------------------------
|
781 |
*/
|
782 |
$this->start_controls_section(
|
783 |
'section_info_box_icon_style',
|
784 |
-
|
785 |
-
'label'
|
786 |
-
'tab'
|
787 |
-
|
788 |
);
|
789 |
|
790 |
$this->add_responsive_control(
|
791 |
'icon_size',
|
792 |
-
|
793 |
-
'label'
|
794 |
-
'type'
|
795 |
-
'range'
|
796 |
-
'px' =>
|
797 |
-
'min'
|
798 |
-
'max'
|
799 |
-
'step'
|
800 |
-
|
801 |
-
|
802 |
-
'size_units'
|
803 |
-
'selectors'
|
804 |
'{{WRAPPER}} .pp-info-box-icon' => 'font-size: {{SIZE}}{{UNIT}}',
|
805 |
-
|
806 |
-
|
807 |
);
|
808 |
|
809 |
$this->start_controls_tabs( 'tabs_icon_style' );
|
810 |
|
811 |
$this->start_controls_tab(
|
812 |
'tab_icon_normal',
|
813 |
-
|
814 |
-
'label'
|
815 |
-
|
816 |
);
|
817 |
|
818 |
$this->add_control(
|
819 |
'icon_color_normal',
|
820 |
-
|
821 |
-
'label'
|
822 |
-
'type'
|
823 |
-
'default'
|
824 |
-
'selectors'
|
825 |
-
'{{WRAPPER}} .pp-info-box-icon'
|
826 |
'{{WRAPPER}} .pp-info-box-icon svg' => 'fill: {{VALUE}}',
|
827 |
-
|
828 |
-
|
829 |
);
|
830 |
|
831 |
$this->add_control(
|
832 |
'icon_bg_color_normal',
|
833 |
-
|
834 |
-
'label'
|
835 |
-
'type'
|
836 |
-
'default'
|
837 |
-
'selectors'
|
838 |
'{{WRAPPER}} .pp-info-box-icon' => 'background-color: {{VALUE}}',
|
839 |
-
|
840 |
-
|
841 |
);
|
842 |
|
843 |
$this->add_group_control(
|
844 |
Group_Control_Border::get_type(),
|
845 |
-
|
846 |
-
'name'
|
847 |
-
'label'
|
848 |
-
'placeholder'
|
849 |
-
'default'
|
850 |
-
'selector'
|
851 |
-
|
852 |
);
|
853 |
|
854 |
$this->add_control(
|
855 |
'icon_border_radius',
|
856 |
-
|
857 |
-
'label'
|
858 |
-
'type'
|
859 |
-
'size_units'
|
860 |
-
'selectors'
|
861 |
'{{WRAPPER}} .pp-info-box-icon, {{WRAPPER}} .pp-info-box-icon img' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
862 |
-
|
863 |
-
|
864 |
);
|
865 |
|
866 |
$this->add_responsive_control(
|
867 |
'icon_rotation',
|
868 |
-
|
869 |
-
'label'
|
870 |
-
'type'
|
871 |
-
'range'
|
872 |
-
'px' =>
|
873 |
-
'min'
|
874 |
-
'max'
|
875 |
-
'step'
|
876 |
-
|
877 |
-
|
878 |
-
'size_units'
|
879 |
-
'selectors'
|
880 |
'{{WRAPPER}} .pp-info-box-icon' => 'transform: rotate( {{SIZE}}deg );',
|
881 |
-
|
882 |
-
|
883 |
);
|
884 |
|
885 |
$this->add_responsive_control(
|
886 |
'icon_padding',
|
887 |
-
|
888 |
-
'label'
|
889 |
-
'type'
|
890 |
-
'range'
|
891 |
-
'px' =>
|
892 |
-
'min'
|
893 |
-
'max'
|
894 |
-
'step'
|
895 |
-
|
896 |
-
|
897 |
-
'size_units'
|
898 |
-
'selectors'
|
899 |
'{{WRAPPER}} .pp-info-box-icon' => 'padding: {{SIZE}}{{UNIT}};',
|
900 |
-
|
901 |
-
|
902 |
);
|
903 |
|
904 |
$this->add_responsive_control(
|
905 |
'icon_margin',
|
906 |
-
|
907 |
-
'label'
|
908 |
-
'type'
|
909 |
-
'size_units'
|
910 |
-
'placeholder'
|
911 |
-
'top'
|
912 |
-
'right'
|
913 |
-
'bottom'
|
914 |
-
'left'
|
915 |
-
|
916 |
-
'selectors'
|
917 |
'{{WRAPPER}} .pp-info-box-icon' => 'margin-top: {{TOP}}{{UNIT}}; margin-left: {{LEFT}}{{UNIT}}; margin-right: {{RIGHT}}{{UNIT}}; margin-bottom: {{BOTTOM}}{{UNIT}};',
|
918 |
-
|
919 |
-
|
920 |
);
|
921 |
|
922 |
$this->end_controls_tab();
|
923 |
|
924 |
$this->start_controls_tab(
|
925 |
'tab_icon_hover',
|
926 |
-
|
927 |
-
'label'
|
928 |
-
|
929 |
);
|
930 |
|
931 |
$this->add_control(
|
932 |
'icon_color_hover',
|
933 |
-
|
934 |
-
'label'
|
935 |
-
'type'
|
936 |
-
'default'
|
937 |
-
'selectors'
|
938 |
'{{WRAPPER}} .pp-info-box-icon:hover' => 'color: {{VALUE}}',
|
939 |
'{{WRAPPER}} .pp-info-box-icon:hover svg' => 'fill: {{VALUE}}',
|
940 |
-
|
941 |
-
|
942 |
);
|
943 |
|
944 |
$this->add_control(
|
945 |
'icon_bg_color_hover',
|
946 |
-
|
947 |
-
'label'
|
948 |
-
'type'
|
949 |
-
'default'
|
950 |
-
'selectors'
|
951 |
'{{WRAPPER}} .pp-info-box-icon:hover' => 'background-color: {{VALUE}}',
|
952 |
-
|
953 |
-
|
954 |
);
|
955 |
|
956 |
$this->add_control(
|
957 |
'icon_border_color_hover',
|
958 |
-
|
959 |
-
'label'
|
960 |
-
'type'
|
961 |
-
'default'
|
962 |
-
'selectors'
|
963 |
'{{WRAPPER}} .pp-info-box-icon:hover' => 'border-color: {{VALUE}}',
|
964 |
-
|
965 |
-
|
966 |
);
|
967 |
|
968 |
$this->add_responsive_control(
|
969 |
'icon_rotation_hover',
|
970 |
-
|
971 |
-
'label'
|
972 |
-
'type'
|
973 |
-
'range'
|
974 |
-
'px' =>
|
975 |
-
'min'
|
976 |
-
'max'
|
977 |
-
'step'
|
978 |
-
|
979 |
-
|
980 |
-
'size_units'
|
981 |
-
'selectors'
|
982 |
'{{WRAPPER}} .pp-info-box .pp-info-box-icon-wrap:hover' => 'transform: rotate( {{SIZE}}deg );',
|
983 |
-
|
984 |
-
|
985 |
);
|
986 |
|
987 |
$this->add_control(
|
988 |
'icon_animation',
|
989 |
-
|
990 |
-
'label'
|
991 |
-
'type'
|
992 |
-
|
993 |
);
|
994 |
|
995 |
$this->end_controls_tab();
|
@@ -998,828 +1162,851 @@ class Info_Box_Carousel extends Powerpack_Widget {
|
|
998 |
|
999 |
$this->add_control(
|
1000 |
'icon_image_heading',
|
1001 |
-
|
1002 |
-
'label'
|
1003 |
-
'type'
|
1004 |
-
'separator'
|
1005 |
-
|
1006 |
);
|
1007 |
|
1008 |
$this->add_responsive_control(
|
1009 |
'icon_img_width',
|
1010 |
-
|
1011 |
-
'label'
|
1012 |
-
'type'
|
1013 |
-
'range'
|
1014 |
-
'%' =>
|
1015 |
-
'min'
|
1016 |
-
'max'
|
1017 |
-
'step'
|
1018 |
-
|
1019 |
-
|
1020 |
-
'size_units'
|
1021 |
-
'selectors'
|
1022 |
'{{WRAPPER}} .pp-info-box-icon img' => 'width: {{SIZE}}{{UNIT}}',
|
1023 |
-
|
1024 |
-
|
1025 |
);
|
1026 |
|
1027 |
$this->add_control(
|
1028 |
'icon_text_heading',
|
1029 |
-
|
1030 |
-
'label'
|
1031 |
-
'type'
|
1032 |
-
'separator'
|
1033 |
-
|
1034 |
);
|
1035 |
|
1036 |
$this->add_group_control(
|
1037 |
Group_Control_Typography::get_type(),
|
1038 |
-
|
1039 |
-
'name'
|
1040 |
-
'label'
|
1041 |
-
'scheme'
|
1042 |
-
'selector'
|
1043 |
-
|
1044 |
);
|
1045 |
|
1046 |
$this->end_controls_section();
|
|
|
1047 |
|
|
|
1048 |
/**
|
1049 |
* Style Tab: Title
|
1050 |
* -------------------------------------------------
|
1051 |
*/
|
1052 |
$this->start_controls_section(
|
1053 |
'section_info_box_title_style',
|
1054 |
-
|
1055 |
-
'label'
|
1056 |
-
'tab'
|
1057 |
-
|
1058 |
);
|
1059 |
|
1060 |
$this->add_control(
|
1061 |
'title_color',
|
1062 |
-
|
1063 |
-
'label'
|
1064 |
-
'type'
|
1065 |
-
'default'
|
1066 |
-
'selectors'
|
1067 |
'{{WRAPPER}} .pp-info-box-title' => 'color: {{VALUE}}',
|
1068 |
-
|
1069 |
-
|
1070 |
);
|
1071 |
|
1072 |
$this->add_group_control(
|
1073 |
Group_Control_Typography::get_type(),
|
1074 |
-
|
1075 |
-
'name'
|
1076 |
-
'label'
|
1077 |
-
'scheme'
|
1078 |
-
'selector'
|
1079 |
-
|
1080 |
);
|
1081 |
|
1082 |
$this->add_responsive_control(
|
1083 |
'title_margin',
|
1084 |
-
|
1085 |
-
'label'
|
1086 |
-
'type'
|
1087 |
-
'default'
|
1088 |
-
'size'
|
1089 |
-
|
1090 |
-
'range'
|
1091 |
-
'px' =>
|
1092 |
-
'min'
|
1093 |
-
'max'
|
1094 |
-
'step'
|
1095 |
-
|
1096 |
-
'%'
|
1097 |
-
'min'
|
1098 |
-
'max'
|
1099 |
-
'step'
|
1100 |
-
|
1101 |
-
|
1102 |
-
'size_units'
|
1103 |
-
'selectors'
|
1104 |
'{{WRAPPER}} .pp-info-box-title' => 'margin-bottom: {{SIZE}}{{UNIT}}',
|
1105 |
-
|
1106 |
-
|
1107 |
);
|
1108 |
|
1109 |
$this->add_control(
|
1110 |
'subtitle_heading',
|
1111 |
-
|
1112 |
-
'label'
|
1113 |
-
'type'
|
1114 |
-
'separator'
|
1115 |
-
|
1116 |
);
|
1117 |
|
1118 |
$this->add_control(
|
1119 |
'subtitle_color',
|
1120 |
-
|
1121 |
-
'label'
|
1122 |
-
'type'
|
1123 |
-
'default'
|
1124 |
-
'selectors'
|
1125 |
'{{WRAPPER}} .pp-info-box-subtitle' => 'color: {{VALUE}}',
|
1126 |
-
|
1127 |
-
|
1128 |
);
|
1129 |
|
1130 |
$this->add_group_control(
|
1131 |
Group_Control_Typography::get_type(),
|
1132 |
-
|
1133 |
-
'name'
|
1134 |
-
'label'
|
1135 |
-
'scheme'
|
1136 |
-
'selector'
|
1137 |
-
|
1138 |
);
|
1139 |
|
1140 |
$this->add_responsive_control(
|
1141 |
'subtitle_margin',
|
1142 |
-
|
1143 |
-
'label'
|
1144 |
-
'type'
|
1145 |
-
'default'
|
1146 |
-
'size'
|
1147 |
-
|
1148 |
-
'range'
|
1149 |
-
'px' =>
|
1150 |
-
'min'
|
1151 |
-
'max'
|
1152 |
-
'step'
|
1153 |
-
|
1154 |
-
'%'
|
1155 |
-
'min'
|
1156 |
-
'max'
|
1157 |
-
'step'
|
1158 |
-
|
1159 |
-
|
1160 |
-
'size_units'
|
1161 |
-
'selectors'
|
1162 |
'{{WRAPPER}} .pp-info-box-subtitle' => 'margin-bottom: {{SIZE}}{{UNIT}}',
|
1163 |
-
|
1164 |
-
|
1165 |
);
|
1166 |
|
1167 |
$this->end_controls_section();
|
|
|
1168 |
|
|
|
1169 |
/**
|
1170 |
* Style Tab: Title Separator
|
1171 |
* -------------------------------------------------
|
1172 |
*/
|
1173 |
$this->start_controls_section(
|
1174 |
'section_title_divider_style',
|
1175 |
-
|
1176 |
-
'label'
|
1177 |
-
'tab'
|
1178 |
-
'condition'
|
1179 |
'divider_title_switch' => 'yes',
|
1180 |
-
|
1181 |
-
|
1182 |
);
|
1183 |
|
1184 |
$this->add_control(
|
1185 |
'divider_title_border_type',
|
1186 |
-
|
1187 |
-
'label'
|
1188 |
-
'type'
|
1189 |
-
'default'
|
1190 |
-
'options'
|
1191 |
-
'none'
|
1192 |
-
'solid'
|
1193 |
-
'double'
|
1194 |
-
'dotted'
|
1195 |
-
'dashed'
|
1196 |
-
|
1197 |
-
'selectors'
|
1198 |
'{{WRAPPER}} .pp-info-box-divider' => 'border-bottom-style: {{VALUE}}',
|
1199 |
-
|
1200 |
-
'condition'
|
1201 |
'divider_title_switch' => 'yes',
|
1202 |
-
|
1203 |
-
|
1204 |
);
|
1205 |
|
1206 |
$this->add_responsive_control(
|
1207 |
'divider_title_width',
|
1208 |
-
|
1209 |
-
'label'
|
1210 |
-
'type'
|
1211 |
-
'default'
|
1212 |
-
'size'
|
1213 |
-
|
1214 |
-
'range'
|
1215 |
-
'px' =>
|
1216 |
-
'min'
|
1217 |
-
'max'
|
1218 |
-
'step'
|
1219 |
-
|
1220 |
-
'%'
|
1221 |
-
'min'
|
1222 |
-
'max'
|
1223 |
-
'step'
|
1224 |
-
|
1225 |
-
|
1226 |
-
'size_units'
|
1227 |
-
'selectors'
|
1228 |
'{{WRAPPER}} .pp-info-box-divider' => 'width: {{SIZE}}{{UNIT}}',
|
1229 |
-
|
1230 |
-
'condition'
|
1231 |
'divider_title_switch' => 'yes',
|
1232 |
-
|
1233 |
-
|
1234 |
);
|
1235 |
|
1236 |
$this->add_responsive_control(
|
1237 |
'divider_title_border_height',
|
1238 |
-
|
1239 |
-
'label'
|
1240 |
-
'type'
|
1241 |
-
'default'
|
1242 |
-
'size'
|
1243 |
-
|
1244 |
-
'range'
|
1245 |
-
'px' =>
|
1246 |
-
'min'
|
1247 |
-
'max'
|
1248 |
-
'step'
|
1249 |
-
|
1250 |
-
|
1251 |
-
'size_units'
|
1252 |
-
'selectors'
|
1253 |
'{{WRAPPER}} .pp-info-box-divider' => 'border-bottom-width: {{SIZE}}{{UNIT}}',
|
1254 |
-
|
1255 |
-
'condition'
|
1256 |
'divider_title_switch' => 'yes',
|
1257 |
-
|
1258 |
-
|
1259 |
);
|
1260 |
|
1261 |
$this->add_control(
|
1262 |
'divider_title_border_color',
|
1263 |
-
|
1264 |
-
'label'
|
1265 |
-
'type'
|
1266 |
-
'default'
|
1267 |
-
'selectors'
|
1268 |
'{{WRAPPER}} .pp-info-box-divider' => 'border-bottom-color: {{VALUE}}',
|
1269 |
-
|
1270 |
-
'condition'
|
1271 |
'divider_title_switch' => 'yes',
|
1272 |
-
|
1273 |
-
|
1274 |
);
|
1275 |
|
1276 |
$this->add_responsive_control(
|
1277 |
'divider_title_align',
|
1278 |
-
|
1279 |
-
'label'
|
1280 |
-
'type'
|
1281 |
-
'options'
|
1282 |
-
'left'
|
1283 |
'title' => __( 'Left', 'powerpack' ),
|
1284 |
'icon' => 'fa fa-align-left',
|
1285 |
-
|
1286 |
-
'center'
|
1287 |
'title' => __( 'Center', 'powerpack' ),
|
1288 |
'icon' => 'fa fa-align-center',
|
1289 |
-
|
1290 |
-
'right'
|
1291 |
'title' => __( 'Right', 'powerpack' ),
|
1292 |
'icon' => 'fa fa-align-right',
|
1293 |
-
|
1294 |
-
|
1295 |
-
'default'
|
1296 |
-
'selectors'
|
1297 |
'{{WRAPPER}} .pp-info-box-divider-wrap' => 'text-align: {{VALUE}};',
|
1298 |
-
|
1299 |
-
'condition'
|
1300 |
'divider_title_switch' => 'yes',
|
1301 |
-
|
1302 |
-
|
1303 |
);
|
1304 |
|
1305 |
$this->add_responsive_control(
|
1306 |
'divider_title_margin',
|
1307 |
-
|
1308 |
-
'label'
|
1309 |
-
'type'
|
1310 |
-
'default'
|
1311 |
-
'size'
|
1312 |
-
|
1313 |
-
'range'
|
1314 |
-
'px' =>
|
1315 |
-
'min'
|
1316 |
-
'max'
|
1317 |
-
'step'
|
1318 |
-
|
1319 |
-
'%'
|
1320 |
-
'min'
|
1321 |
-
'max'
|
1322 |
-
'step'
|
1323 |
-
|
1324 |
-
|
1325 |
-
'size_units'
|
1326 |
-
'selectors'
|
1327 |
'{{WRAPPER}} .pp-info-box-divider-wrap' => 'margin-bottom: {{SIZE}}{{UNIT}}',
|
1328 |
-
|
1329 |
-
'condition'
|
1330 |
'divider_title_switch' => 'yes',
|
1331 |
-
|
1332 |
-
|
1333 |
);
|
1334 |
|
1335 |
$this->end_controls_section();
|
|
|
1336 |
|
|
|
1337 |
/**
|
1338 |
* Style Tab: Description
|
1339 |
* -------------------------------------------------
|
1340 |
*/
|
1341 |
$this->start_controls_section(
|
1342 |
'section_info_description_style',
|
1343 |
-
|
1344 |
-
'label'
|
1345 |
-
'tab'
|
1346 |
-
|
1347 |
);
|
1348 |
|
1349 |
$this->add_control(
|
1350 |
'description_color',
|
1351 |
-
|
1352 |
-
'label'
|
1353 |
-
'type'
|
1354 |
-
'default'
|
1355 |
-
'selectors'
|
1356 |
'{{WRAPPER}} .pp-info-box-description' => 'color: {{VALUE}}',
|
1357 |
-
|
1358 |
-
|
1359 |
);
|
1360 |
|
1361 |
$this->add_group_control(
|
1362 |
Group_Control_Typography::get_type(),
|
1363 |
-
|
1364 |
-
'name'
|
1365 |
-
'label'
|
1366 |
-
'scheme'
|
1367 |
-
'selector'
|
1368 |
-
|
1369 |
);
|
1370 |
|
1371 |
$this->add_responsive_control(
|
1372 |
'description_padding',
|
1373 |
-
|
1374 |
-
'label'
|
1375 |
-
'type'
|
1376 |
-
'size_units'
|
1377 |
-
'selectors'
|
1378 |
'{{WRAPPER}} .pp-info-box-description' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
1379 |
-
|
1380 |
-
|
1381 |
);
|
1382 |
|
1383 |
$this->add_responsive_control(
|
1384 |
'description_margin',
|
1385 |
-
|
1386 |
-
'label'
|
1387 |
-
'type'
|
1388 |
-
'default'
|
1389 |
-
'size'
|
1390 |
-
|
1391 |
-
'range'
|
1392 |
-
'px' =>
|
1393 |
-
'min'
|
1394 |
-
'max'
|
1395 |
-
'step'
|
1396 |
-
|
1397 |
-
'%'
|
1398 |
-
'min'
|
1399 |
-
'max'
|
1400 |
-
'step'
|
1401 |
-
|
1402 |
-
|
1403 |
-
'size_units'
|
1404 |
-
'selectors'
|
1405 |
'{{WRAPPER}} .pp-info-box-description' => 'margin-bottom: {{SIZE}}{{UNIT}}',
|
1406 |
-
|
1407 |
-
|
1408 |
);
|
1409 |
|
1410 |
$this->end_controls_section();
|
|
|
1411 |
|
|
|
1412 |
/**
|
1413 |
* Style Tab: Button
|
1414 |
* -------------------------------------------------
|
1415 |
*/
|
1416 |
$this->start_controls_section(
|
1417 |
'section_info_box_button_style',
|
1418 |
-
|
1419 |
-
'label'
|
1420 |
-
'tab'
|
1421 |
-
|
1422 |
);
|
1423 |
|
1424 |
$this->add_control(
|
1425 |
'button_size',
|
1426 |
-
|
1427 |
-
'label'
|
1428 |
-
'type'
|
1429 |
-
'default'
|
1430 |
-
'options'
|
1431 |
'xs' => __( 'Extra Small', 'powerpack' ),
|
1432 |
'sm' => __( 'Small', 'powerpack' ),
|
1433 |
'md' => __( 'Medium', 'powerpack' ),
|
1434 |
'lg' => __( 'Large', 'powerpack' ),
|
1435 |
'xl' => __( 'Extra Large', 'powerpack' ),
|
1436 |
-
|
1437 |
-
|
1438 |
);
|
1439 |
|
1440 |
$this->start_controls_tabs( 'tabs_button_style' );
|
1441 |
|
1442 |
$this->start_controls_tab(
|
1443 |
'tab_button_normal',
|
1444 |
-
|
1445 |
-
'label'
|
1446 |
-
|
1447 |
);
|
1448 |
|
1449 |
$this->add_control(
|
1450 |
'button_text_color_normal',
|
1451 |
-
|
1452 |
-
'label'
|
1453 |
-
'type'
|
1454 |
-
'default'
|
1455 |
-
'selectors'
|
1456 |
'{{WRAPPER}} .pp-info-box-button' => 'color: {{VALUE}}',
|
1457 |
'{{WRAPPER}} .pp-info-box-button .pp-icon' => 'fill: {{VALUE}}',
|
1458 |
-
|
1459 |
-
|
1460 |
);
|
1461 |
|
1462 |
$this->add_control(
|
1463 |
'button_bg_color_normal',
|
1464 |
-
|
1465 |
-
'label'
|
1466 |
-
'type'
|
1467 |
-
'default'
|
1468 |
-
'selectors'
|
1469 |
'{{WRAPPER}} .pp-info-box-button' => 'background-color: {{VALUE}}',
|
1470 |
-
|
1471 |
-
|
1472 |
);
|
1473 |
|
1474 |
$this->add_group_control(
|
1475 |
Group_Control_Border::get_type(),
|
1476 |
-
|
1477 |
-
'name'
|
1478 |
-
'label'
|
1479 |
-
'placeholder'
|
1480 |
-
'default'
|
1481 |
-
'selector'
|
1482 |
-
|
1483 |
);
|
1484 |
|
1485 |
$this->add_control(
|
1486 |
'button_border_radius',
|
1487 |
-
|
1488 |
-
'label'
|
1489 |
-
'type'
|
1490 |
-
'size_units'
|
1491 |
-
'selectors'
|
1492 |
'{{WRAPPER}} .pp-info-box-button' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
1493 |
-
|
1494 |
-
|
1495 |
);
|
1496 |
|
1497 |
$this->add_group_control(
|
1498 |
Group_Control_Typography::get_type(),
|
1499 |
-
|
1500 |
-
'name'
|
1501 |
-
'label'
|
1502 |
-
'scheme'
|
1503 |
-
'selector'
|
1504 |
-
|
1505 |
);
|
1506 |
|
1507 |
$this->add_responsive_control(
|
1508 |
'button_padding',
|
1509 |
-
|
1510 |
-
'label'
|
1511 |
-
'type'
|
1512 |
-
'size_units'
|
1513 |
-
'selectors'
|
1514 |
'{{WRAPPER}} .pp-info-box-button' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
1515 |
-
|
1516 |
-
|
1517 |
);
|
1518 |
|
1519 |
$this->add_group_control(
|
1520 |
Group_Control_Box_Shadow::get_type(),
|
1521 |
-
|
1522 |
-
'name'
|
1523 |
-
'selector'
|
1524 |
-
|
1525 |
);
|
1526 |
|
1527 |
$this->add_control(
|
1528 |
'info_box_button_icon_heading',
|
1529 |
-
|
1530 |
-
'label'
|
1531 |
-
'type'
|
1532 |
-
'separator'
|
1533 |
-
'condition'
|
1534 |
-
'button_icon!'
|
1535 |
-
|
1536 |
-
|
1537 |
);
|
1538 |
|
1539 |
$this->add_responsive_control(
|
1540 |
'button_icon_margin',
|
1541 |
-
|
1542 |
-
'label'
|
1543 |
-
'type'
|
1544 |
-
'size_units'
|
1545 |
-
'placeholder'
|
1546 |
-
'top'
|
1547 |
-
'right'
|
1548 |
-
'bottom'
|
1549 |
-
'left'
|
1550 |
-
|
1551 |
-
'condition'
|
1552 |
-
'button_icon!'
|
1553 |
-
|
1554 |
-
'selectors'
|
1555 |
'{{WRAPPER}} .pp-info-box .pp-button-icon' => 'margin-top: {{TOP}}{{UNIT}}; margin-left: {{LEFT}}{{UNIT}}; margin-right: {{RIGHT}}{{UNIT}}; margin-bottom: {{BOTTOM}}{{UNIT}};',
|
1556 |
-
|
1557 |
-
|
1558 |
);
|
1559 |
|
1560 |
$this->end_controls_tab();
|
1561 |
|
1562 |
$this->start_controls_tab(
|
1563 |
'tab_button_hover',
|
1564 |
-
|
1565 |
-
'label'
|
1566 |
-
|
1567 |
);
|
1568 |
|
1569 |
$this->add_control(
|
1570 |
'button_text_color_hover',
|
1571 |
-
|
1572 |
-
'label'
|
1573 |
-
'type'
|
1574 |
-
'default'
|
1575 |
-
'selectors'
|
1576 |
'{{WRAPPER}} .pp-info-box-button:hover' => 'color: {{VALUE}}',
|
1577 |
'{{WRAPPER}} .pp-info-box-button:hover .pp-icon' => 'fill: {{VALUE}}',
|
1578 |
-
|
1579 |
-
|
1580 |
);
|
1581 |
|
1582 |
$this->add_control(
|
1583 |
'button_bg_color_hover',
|
1584 |
-
|
1585 |
-
'label'
|
1586 |
-
'type'
|
1587 |
-
'default'
|
1588 |
-
'selectors'
|
1589 |
'{{WRAPPER}} .pp-info-box-button:hover' => 'background-color: {{VALUE}}',
|
1590 |
-
|
1591 |
-
|
1592 |
);
|
1593 |
|
1594 |
$this->add_control(
|
1595 |
'button_border_color_hover',
|
1596 |
-
|
1597 |
-
'label'
|
1598 |
-
'type'
|
1599 |
-
'default'
|
1600 |
-
'selectors'
|
1601 |
'{{WRAPPER}} .pp-info-box-button:hover' => 'border-color: {{VALUE}}',
|
1602 |
-
|
1603 |
-
|
1604 |
);
|
1605 |
|
1606 |
$this->add_control(
|
1607 |
'button_hover_animation',
|
1608 |
-
|
1609 |
-
'label'
|
1610 |
-
'type'
|
1611 |
-
|
1612 |
);
|
1613 |
|
1614 |
$this->add_group_control(
|
1615 |
Group_Control_Box_Shadow::get_type(),
|
1616 |
-
|
1617 |
-
'name'
|
1618 |
-
'selector'
|
1619 |
-
|
1620 |
);
|
1621 |
|
1622 |
$this->end_controls_tab();
|
1623 |
$this->end_controls_tabs();
|
1624 |
|
1625 |
$this->end_controls_section();
|
|
|
1626 |
|
|
|
1627 |
/**
|
1628 |
* Style Tab: Arrows
|
1629 |
* -------------------------------------------------
|
1630 |
*/
|
1631 |
$this->start_controls_section(
|
1632 |
'section_arrows_style',
|
1633 |
-
|
1634 |
-
'label'
|
1635 |
-
'tab'
|
1636 |
-
'condition'
|
1637 |
-
'arrows'
|
1638 |
-
|
1639 |
-
|
1640 |
);
|
1641 |
|
1642 |
$this->add_control(
|
1643 |
-
'
|
1644 |
-
array(
|
1645 |
-
'label'
|
1646 |
-
'type'
|
1647 |
-
'
|
1648 |
-
'
|
1649 |
-
'
|
1650 |
-
'
|
1651 |
-
'
|
1652 |
-
|
1653 |
-
|
1654 |
-
|
1655 |
-
|
1656 |
-
'fa
|
1657 |
-
|
1658 |
-
|
1659 |
-
|
1660 |
-
|
1661 |
-
'fa
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1662 |
),
|
1663 |
)
|
1664 |
);
|
1665 |
|
1666 |
$this->add_responsive_control(
|
1667 |
'arrows_size',
|
1668 |
-
|
1669 |
-
'label'
|
1670 |
-
'type'
|
1671 |
-
'default'
|
1672 |
-
'range'
|
1673 |
-
'px' =>
|
1674 |
-
'min'
|
1675 |
-
'max'
|
1676 |
-
'step'
|
1677 |
-
|
1678 |
-
|
1679 |
-
'size_units'
|
1680 |
-
'selectors'
|
1681 |
'{{WRAPPER}} .swiper-container-wrap .swiper-button-next, {{WRAPPER}} .swiper-container-wrap .swiper-button-prev' => 'font-size: {{SIZE}}{{UNIT}};',
|
1682 |
-
|
1683 |
-
|
1684 |
);
|
1685 |
|
1686 |
$this->add_responsive_control(
|
1687 |
'left_arrow_position',
|
1688 |
-
|
1689 |
-
'label'
|
1690 |
-
'type'
|
1691 |
-
'range'
|
1692 |
-
'px' =>
|
1693 |
-
'min'
|
1694 |
-
'max'
|
1695 |
-
'step'
|
1696 |
-
|
1697 |
-
|
1698 |
-
'size_units'
|
1699 |
-
'selectors'
|
1700 |
'{{WRAPPER}} .swiper-container-wrap .swiper-button-prev' => 'left: {{SIZE}}{{UNIT}};',
|
1701 |
-
|
1702 |
-
|
1703 |
);
|
1704 |
|
1705 |
$this->add_responsive_control(
|
1706 |
'right_arrow_position',
|
1707 |
-
|
1708 |
-
'label'
|
1709 |
-
'type'
|
1710 |
-
'range'
|
1711 |
-
'px' =>
|
1712 |
-
'min'
|
1713 |
-
'max'
|
1714 |
-
'step'
|
1715 |
-
|
1716 |
-
|
1717 |
-
'size_units'
|
1718 |
-
'selectors'
|
1719 |
'{{WRAPPER}} .swiper-container-wrap .swiper-button-next' => 'right: {{SIZE}}{{UNIT}};',
|
1720 |
-
|
1721 |
-
|
1722 |
);
|
1723 |
|
1724 |
$this->start_controls_tabs( 'tabs_arrows_style' );
|
1725 |
|
1726 |
$this->start_controls_tab(
|
1727 |
'tab_arrows_normal',
|
1728 |
-
|
1729 |
-
'label'
|
1730 |
-
|
1731 |
);
|
1732 |
|
1733 |
$this->add_control(
|
1734 |
'arrows_bg_color_normal',
|
1735 |
-
|
1736 |
-
'label'
|
1737 |
-
'type'
|
1738 |
-
'default'
|
1739 |
-
'selectors'
|
1740 |
'{{WRAPPER}} .swiper-container-wrap .swiper-button-next, {{WRAPPER}} .swiper-container-wrap .swiper-button-prev' => 'background-color: {{VALUE}};',
|
1741 |
-
|
1742 |
-
|
1743 |
);
|
1744 |
|
1745 |
$this->add_control(
|
1746 |
'arrows_color_normal',
|
1747 |
-
|
1748 |
-
'label'
|
1749 |
-
'type'
|
1750 |
-
'default'
|
1751 |
-
'selectors'
|
1752 |
'{{WRAPPER}} .swiper-container-wrap .swiper-button-next, {{WRAPPER}} .swiper-container-wrap .swiper-button-prev' => 'color: {{VALUE}};',
|
1753 |
-
|
1754 |
-
|
1755 |
);
|
1756 |
|
1757 |
$this->add_group_control(
|
1758 |
Group_Control_Border::get_type(),
|
1759 |
-
|
1760 |
-
'name'
|
1761 |
-
'label'
|
1762 |
-
'placeholder'
|
1763 |
-
'default'
|
1764 |
-
'selector'
|
1765 |
-
|
1766 |
);
|
1767 |
|
1768 |
$this->add_control(
|
1769 |
'arrows_border_radius_normal',
|
1770 |
-
|
1771 |
-
'label'
|
1772 |
-
'type'
|
1773 |
-
'size_units'
|
1774 |
-
'selectors'
|
1775 |
'{{WRAPPER}} .swiper-container-wrap .swiper-button-next, {{WRAPPER}} .swiper-container-wrap .swiper-button-prev' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
1776 |
-
|
1777 |
-
|
1778 |
);
|
1779 |
|
1780 |
$this->end_controls_tab();
|
1781 |
|
1782 |
$this->start_controls_tab(
|
1783 |
-
'tab_arrows_hover',
|
1784 |
-
|
1785 |
-
'label'
|
1786 |
-
|
1787 |
);
|
1788 |
|
1789 |
$this->add_control(
|
1790 |
'arrows_bg_color_hover',
|
1791 |
-
|
1792 |
-
'label'
|
1793 |
-
'type'
|
1794 |
-
'default'
|
1795 |
-
'selectors'
|
1796 |
'{{WRAPPER}} .swiper-container-wrap .swiper-button-next:hover, {{WRAPPER}} .swiper-container-wrap .swiper-button-prev:hover' => 'background-color: {{VALUE}};',
|
1797 |
-
|
1798 |
-
|
1799 |
);
|
1800 |
|
1801 |
$this->add_control(
|
1802 |
'arrows_color_hover',
|
1803 |
-
|
1804 |
-
'label'
|
1805 |
-
'type'
|
1806 |
-
'default'
|
1807 |
-
'selectors'
|
1808 |
'{{WRAPPER}} .swiper-container-wrap .swiper-button-next:hover, {{WRAPPER}} .swiper-container-wrap .swiper-button-prev:hover' => 'color: {{VALUE}};',
|
1809 |
-
|
1810 |
-
|
1811 |
);
|
1812 |
|
1813 |
$this->add_control(
|
1814 |
'arrows_border_color_hover',
|
1815 |
-
|
1816 |
-
'label'
|
1817 |
-
'type'
|
1818 |
-
'default'
|
1819 |
-
'selectors'
|
1820 |
'{{WRAPPER}} .swiper-container-wrap .swiper-button-next:hover, {{WRAPPER}} .swiper-container-wrap .swiper-button-prev:hover' => 'border-color: {{VALUE}};',
|
1821 |
-
|
1822 |
-
|
1823 |
);
|
1824 |
|
1825 |
$this->end_controls_tab();
|
@@ -1828,240 +2015,242 @@ class Info_Box_Carousel extends Powerpack_Widget {
|
|
1828 |
|
1829 |
$this->add_responsive_control(
|
1830 |
'arrows_padding',
|
1831 |
-
|
1832 |
-
'label'
|
1833 |
-
'type'
|
1834 |
-
'size_units'
|
1835 |
-
'selectors'
|
1836 |
'{{WRAPPER}} .swiper-container-wrap .swiper-button-next, {{WRAPPER}} .swiper-container-wrap .swiper-button-prev' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
1837 |
-
|
1838 |
-
'separator'
|
1839 |
-
|
1840 |
);
|
1841 |
|
1842 |
$this->end_controls_section();
|
|
|
1843 |
|
|
|
1844 |
/**
|
1845 |
* Style Tab: Pagination: Dots
|
1846 |
* -------------------------------------------------
|
1847 |
*/
|
1848 |
$this->start_controls_section(
|
1849 |
'section_dots_style',
|
1850 |
-
|
1851 |
-
'label'
|
1852 |
-
'tab'
|
1853 |
-
'condition'
|
1854 |
-
'dots'
|
1855 |
-
'pagination_type'
|
1856 |
-
|
1857 |
-
|
1858 |
);
|
1859 |
|
1860 |
$this->add_control(
|
1861 |
'dots_position',
|
1862 |
-
|
1863 |
-
'label'
|
1864 |
-
'type'
|
1865 |
-
'options'
|
1866 |
-
'inside'
|
1867 |
-
'outside'
|
1868 |
-
|
1869 |
-
'default'
|
1870 |
-
'condition'
|
1871 |
-
'dots'
|
1872 |
-
'pagination_type'
|
1873 |
-
|
1874 |
-
|
1875 |
);
|
1876 |
|
1877 |
$this->add_responsive_control(
|
1878 |
'dots_size',
|
1879 |
-
|
1880 |
-
'label'
|
1881 |
-
'type'
|
1882 |
-
'range'
|
1883 |
-
'px' =>
|
1884 |
-
'min'
|
1885 |
-
'max'
|
1886 |
-
'step'
|
1887 |
-
|
1888 |
-
|
1889 |
-
'size_units'
|
1890 |
-
'selectors'
|
1891 |
'{{WRAPPER}} .swiper-container-wrap .swiper-pagination-bullet' => 'height: {{SIZE}}{{UNIT}}; width: {{SIZE}}{{UNIT}}',
|
1892 |
-
|
1893 |
-
'condition'
|
1894 |
-
'dots'
|
1895 |
-
'pagination_type'
|
1896 |
-
|
1897 |
-
|
1898 |
);
|
1899 |
|
1900 |
$this->add_responsive_control(
|
1901 |
'dots_spacing',
|
1902 |
-
|
1903 |
-
'label'
|
1904 |
-
'type'
|
1905 |
-
'range'
|
1906 |
-
'px' =>
|
1907 |
-
'min'
|
1908 |
-
'max'
|
1909 |
-
'step'
|
1910 |
-
|
1911 |
-
|
1912 |
-
'size_units'
|
1913 |
-
'selectors'
|
1914 |
'{{WRAPPER}} .swiper-container-wrap .swiper-pagination-bullet' => 'margin-left: {{SIZE}}{{UNIT}}; margin-right: {{SIZE}}{{UNIT}}',
|
1915 |
-
|
1916 |
-
'condition'
|
1917 |
-
'dots'
|
1918 |
-
'pagination_type'
|
1919 |
-
|
1920 |
-
|
1921 |
);
|
1922 |
|
1923 |
$this->start_controls_tabs( 'tabs_dots_style' );
|
1924 |
|
1925 |
$this->start_controls_tab(
|
1926 |
'tab_dots_normal',
|
1927 |
-
|
1928 |
-
'label'
|
1929 |
-
'condition'
|
1930 |
-
'dots'
|
1931 |
-
'pagination_type'
|
1932 |
-
|
1933 |
-
|
1934 |
);
|
1935 |
|
1936 |
$this->add_control(
|
1937 |
'dots_color_normal',
|
1938 |
-
|
1939 |
-
'label'
|
1940 |
-
'type'
|
1941 |
-
'default'
|
1942 |
-
'selectors'
|
1943 |
'{{WRAPPER}} .swiper-container-wrap .swiper-pagination-bullet' => 'background: {{VALUE}};',
|
1944 |
-
|
1945 |
-
'condition'
|
1946 |
-
'dots'
|
1947 |
-
'pagination_type'
|
1948 |
-
|
1949 |
-
|
1950 |
);
|
1951 |
|
1952 |
$this->add_control(
|
1953 |
'active_dot_color_normal',
|
1954 |
-
|
1955 |
-
'label'
|
1956 |
-
'type'
|
1957 |
-
'default'
|
1958 |
-
'selectors'
|
1959 |
'{{WRAPPER}} .swiper-container-wrap .swiper-pagination-bullet-active' => 'background: {{VALUE}};',
|
1960 |
-
|
1961 |
-
'condition'
|
1962 |
-
'dots'
|
1963 |
-
'pagination_type'
|
1964 |
-
|
1965 |
-
|
1966 |
);
|
1967 |
|
1968 |
$this->add_group_control(
|
1969 |
Group_Control_Border::get_type(),
|
1970 |
-
|
1971 |
-
'name'
|
1972 |
-
'label'
|
1973 |
-
'placeholder'
|
1974 |
-
'default'
|
1975 |
-
'selector'
|
1976 |
-
'condition'
|
1977 |
-
'dots'
|
1978 |
-
'pagination_type'
|
1979 |
-
|
1980 |
-
|
1981 |
);
|
1982 |
|
1983 |
$this->add_control(
|
1984 |
'dots_border_radius_normal',
|
1985 |
-
|
1986 |
-
'label'
|
1987 |
-
'type'
|
1988 |
-
'size_units'
|
1989 |
-
'selectors'
|
1990 |
'{{WRAPPER}} .swiper-container-wrap .swiper-pagination-bullet' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
1991 |
-
|
1992 |
-
'condition'
|
1993 |
-
'dots'
|
1994 |
-
'pagination_type'
|
1995 |
-
|
1996 |
-
|
1997 |
);
|
1998 |
|
1999 |
$this->add_responsive_control(
|
2000 |
'dots_margin',
|
2001 |
-
|
2002 |
-
'label'
|
2003 |
-
'type'
|
2004 |
-
'size_units'
|
2005 |
-
'allowed_dimensions'
|
2006 |
-
'placeholder'
|
2007 |
-
'top'
|
2008 |
-
'right'
|
2009 |
-
'bottom'
|
2010 |
-
'left'
|
2011 |
-
|
2012 |
-
'selectors'
|
2013 |
'{{WRAPPER}} .swiper-container-wrap .swiper-pagination-bullets' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
2014 |
-
|
2015 |
-
'condition'
|
2016 |
-
'dots'
|
2017 |
-
'pagination_type'
|
2018 |
-
|
2019 |
-
|
2020 |
);
|
2021 |
|
2022 |
$this->end_controls_tab();
|
2023 |
|
2024 |
$this->start_controls_tab(
|
2025 |
'tab_dots_hover',
|
2026 |
-
|
2027 |
-
'label'
|
2028 |
-
'condition'
|
2029 |
-
'dots'
|
2030 |
-
'pagination_type'
|
2031 |
-
|
2032 |
-
|
2033 |
);
|
2034 |
|
2035 |
$this->add_control(
|
2036 |
'dots_color_hover',
|
2037 |
-
|
2038 |
-
'label'
|
2039 |
-
'type'
|
2040 |
-
'default'
|
2041 |
-
'selectors'
|
2042 |
'{{WRAPPER}} .swiper-container-wrap .swiper-pagination-bullet:hover' => 'background: {{VALUE}};',
|
2043 |
-
|
2044 |
-
'condition'
|
2045 |
-
'dots'
|
2046 |
-
'pagination_type'
|
2047 |
-
|
2048 |
-
|
2049 |
);
|
2050 |
|
2051 |
$this->add_control(
|
2052 |
'dots_border_color_hover',
|
2053 |
-
|
2054 |
-
'label'
|
2055 |
-
'type'
|
2056 |
-
'default'
|
2057 |
-
'selectors'
|
2058 |
'{{WRAPPER}} .swiper-container-wrap .swiper-pagination-bullet:hover' => 'border-color: {{VALUE}};',
|
2059 |
-
|
2060 |
-
'condition'
|
2061 |
-
'dots'
|
2062 |
-
'pagination_type'
|
2063 |
-
|
2064 |
-
|
2065 |
);
|
2066 |
|
2067 |
$this->end_controls_tab();
|
@@ -2069,98 +2258,125 @@ class Info_Box_Carousel extends Powerpack_Widget {
|
|
2069 |
$this->end_controls_tabs();
|
2070 |
|
2071 |
$this->end_controls_section();
|
|
|
2072 |
|
|
|
2073 |
/**
|
2074 |
-
* Style Tab: Pagination:
|
2075 |
* -------------------------------------------------
|
2076 |
*/
|
2077 |
$this->start_controls_section(
|
2078 |
'section_fraction_style',
|
2079 |
-
|
2080 |
-
'label'
|
2081 |
-
'tab'
|
2082 |
-
'condition'
|
2083 |
-
'dots'
|
2084 |
-
'pagination_type'
|
2085 |
-
|
2086 |
-
|
2087 |
);
|
2088 |
|
2089 |
$this->add_control(
|
2090 |
'fraction_text_color',
|
2091 |
-
|
2092 |
-
'label'
|
2093 |
-
'type'
|
2094 |
-
'default'
|
2095 |
-
'selectors'
|
2096 |
'{{WRAPPER}} .swiper-pagination-fraction' => 'color: {{VALUE}};',
|
2097 |
-
|
2098 |
-
'condition'
|
2099 |
-
'dots'
|
2100 |
-
'pagination_type'
|
2101 |
-
|
2102 |
-
|
2103 |
);
|
2104 |
|
2105 |
$this->add_group_control(
|
2106 |
Group_Control_Typography::get_type(),
|
2107 |
-
|
2108 |
-
'name'
|
2109 |
-
'label'
|
2110 |
-
'scheme'
|
2111 |
-
'selector'
|
2112 |
-
'condition'
|
2113 |
-
'dots'
|
2114 |
-
'pagination_type'
|
2115 |
-
|
2116 |
-
|
2117 |
);
|
2118 |
|
2119 |
$this->end_controls_section();
|
2120 |
}
|
2121 |
|
2122 |
/**
|
2123 |
-
*
|
2124 |
*
|
2125 |
* @access public
|
|
|
2126 |
*/
|
2127 |
-
public function
|
2128 |
-
$settings = $this->
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2129 |
|
2130 |
-
$slider_options =
|
2131 |
'direction' => 'horizontal',
|
2132 |
-
'
|
2133 |
-
'
|
2134 |
-
'slidesPerView' =>
|
2135 |
-
'spaceBetween' =>
|
2136 |
-
'grabCursor' => ( $settings['grab_cursor']
|
2137 |
'autoHeight' => true,
|
2138 |
-
'loop' => ( $settings['infinite_loop']
|
2139 |
-
|
2140 |
|
2141 |
-
|
2142 |
-
|
2143 |
-
|
2144 |
-
$autoplay_speed
|
|
|
|
|
|
|
|
|
2145 |
}
|
2146 |
|
2147 |
-
$slider_options['autoplay'] =
|
2148 |
-
'delay'
|
2149 |
-
|
|
|
2150 |
|
2151 |
-
if (
|
2152 |
-
$slider_options['pagination'] =
|
2153 |
'el' => '.swiper-pagination-' . esc_attr( $this->get_id() ),
|
2154 |
'type' => $settings['pagination_type'],
|
2155 |
'clickable' => true,
|
2156 |
-
|
2157 |
}
|
2158 |
|
2159 |
-
if ( $settings['arrows']
|
2160 |
-
$slider_options['navigation'] =
|
2161 |
'nextEl' => '.swiper-button-next-' . esc_attr( $this->get_id() ),
|
2162 |
'prevEl' => '.swiper-button-prev-' . esc_attr( $this->get_id() ),
|
2163 |
-
|
2164 |
}
|
2165 |
|
2166 |
$elementor_bp_lg = get_option( 'elementor_viewport_lg' );
|
@@ -2169,27 +2385,22 @@ class Info_Box_Carousel extends Powerpack_Widget {
|
|
2169 |
$bp_tablet = ! empty( $elementor_bp_md ) ? $elementor_bp_md : 768;
|
2170 |
$bp_mobile = 320;
|
2171 |
|
2172 |
-
$slider_options['breakpoints'] =
|
2173 |
-
$bp_desktop
|
2174 |
-
'slidesPerView' =>
|
2175 |
-
'spaceBetween' =>
|
2176 |
-
|
2177 |
-
$bp_tablet
|
2178 |
-
'slidesPerView' =>
|
2179 |
-
'spaceBetween' =>
|
2180 |
-
|
2181 |
-
$bp_mobile
|
2182 |
-
'slidesPerView' =>
|
2183 |
-
'spaceBetween' =>
|
2184 |
-
|
2185 |
-
|
2186 |
-
|
2187 |
-
$
|
2188 |
-
'info-box-carousel-wrap',
|
2189 |
-
array(
|
2190 |
-
'data-slider-settings' => wp_json_encode( $slider_options ),
|
2191 |
-
)
|
2192 |
-
);
|
2193 |
}
|
2194 |
|
2195 |
/**
|
@@ -2206,24 +2417,25 @@ class Info_Box_Carousel extends Powerpack_Widget {
|
|
2206 |
|
2207 |
if ( $settings['dots_position'] ) {
|
2208 |
$this->add_render_attribute( 'info-box-carousel-wrap', 'class', 'swiper-container-wrap-dots-' . $settings['dots_position'] );
|
2209 |
-
} elseif ( $settings['pagination_type']
|
2210 |
$this->add_render_attribute( 'info-box-carousel-wrap', 'class', 'swiper-container-wrap-dots-outside' );
|
2211 |
}
|
2212 |
|
2213 |
-
$
|
2214 |
-
|
2215 |
-
if ( $settings['direction'] == 'right' || is_rtl() ) {
|
2216 |
$this->add_render_attribute( 'info-box-carousel', 'dir', 'rtl' );
|
2217 |
}
|
2218 |
|
|
|
|
|
2219 |
$this->add_render_attribute(
|
2220 |
'info-box-carousel',
|
2221 |
-
|
2222 |
-
'class'
|
2223 |
-
'data-pagination'
|
2224 |
-
'data-arrow-next'
|
2225 |
-
'data-arrow-prev'
|
2226 |
-
|
|
|
2227 |
);
|
2228 |
|
2229 |
$this->add_render_attribute( 'info-box-container', 'class', 'pp-info-box-container' );
|
@@ -2232,21 +2444,17 @@ class Info_Box_Carousel extends Powerpack_Widget {
|
|
2232 |
$pp_title_html_tag = 'div';
|
2233 |
$pp_button_html_tag = 'div';
|
2234 |
|
2235 |
-
$this->add_render_attribute(
|
2236 |
-
'info-box-button',
|
2237 |
-
'
|
2238 |
-
|
2239 |
-
|
2240 |
-
'elementor-button',
|
2241 |
-
'elementor-size-' . $settings['button_size'],
|
2242 |
-
)
|
2243 |
-
);
|
2244 |
|
2245 |
if ( $settings['button_hover_animation'] ) {
|
2246 |
$this->add_render_attribute( 'info-box-button', 'class', 'elementor-animation-' . $settings['button_hover_animation'] );
|
2247 |
}
|
2248 |
|
2249 |
-
$this->add_render_attribute( 'icon', 'class',
|
2250 |
|
2251 |
if ( $settings['icon_animation'] ) {
|
2252 |
$this->add_render_attribute( 'icon', 'class', 'elementor-animation-' . $settings['icon_animation'] );
|
@@ -2262,32 +2470,34 @@ class Info_Box_Carousel extends Powerpack_Widget {
|
|
2262 |
|
2263 |
$this->add_render_attribute( 'title-container' . $i, 'class', 'pp-info-box-title-container' );
|
2264 |
|
2265 |
-
if ( $item['link_type']
|
2266 |
if ( ! empty( $item['link']['url'] ) ) {
|
2267 |
|
2268 |
$this->add_link_attributes( 'link' . $i, $item['link'] );
|
2269 |
|
2270 |
-
if ( $item['link_type']
|
2271 |
$pp_title_html_tag = 'a';
|
2272 |
$this->add_link_attributes( 'title-container' . $i, $item['link'] );
|
2273 |
-
} elseif ( $item['link_type']
|
2274 |
$pp_button_html_tag = 'a';
|
2275 |
-
}
|
|
|
|
|
2276 |
}
|
2277 |
}
|
2278 |
?>
|
2279 |
<div class="swiper-slide">
|
2280 |
<div class="pp-info-box-content-wrap">
|
2281 |
-
<?php if ( $item['link_type']
|
2282 |
<a <?php echo $this->get_render_attribute_string( 'link' . $i ); ?>>
|
2283 |
<?php } ?>
|
2284 |
-
<?php if ( $item['icon_type']
|
2285 |
<div class="pp-info-box-icon-wrap">
|
2286 |
-
<?php if ( $item['link_type']
|
2287 |
<a <?php echo $this->get_render_attribute_string( 'link' . $i ); ?>>
|
2288 |
<?php } ?>
|
2289 |
<?php $this->render_infobox_icon( $item ); ?>
|
2290 |
-
<?php if ( $item['link_type']
|
2291 |
</a>
|
2292 |
<?php } ?>
|
2293 |
</div>
|
@@ -2311,7 +2521,7 @@ class Info_Box_Carousel extends Powerpack_Widget {
|
|
2311 |
?>
|
2312 |
</div>
|
2313 |
|
2314 |
-
<?php if ( $settings['divider_title_switch']
|
2315 |
<div class="pp-info-box-divider-wrap">
|
2316 |
<div class="pp-info-box-divider"></div>
|
2317 |
</div>
|
@@ -2322,12 +2532,12 @@ class Info_Box_Carousel extends Powerpack_Widget {
|
|
2322 |
<?php echo $this->parse_text_editor( nl2br( $item['description'] ) ); ?>
|
2323 |
</div>
|
2324 |
<?php } ?>
|
2325 |
-
<?php if ( $item['link_type']
|
2326 |
<div class="pp-info-box-footer">
|
2327 |
<<?php echo $pp_button_html_tag . ' ' . $this->get_render_attribute_string( 'info-box-button' . $i ) . $this->get_render_attribute_string( 'link' . $i ); ?>>
|
2328 |
<div <?php echo $this->get_render_attribute_string( 'info-box-button' ); ?>>
|
2329 |
<?php
|
2330 |
-
if ( $item['button_icon_position']
|
2331 |
$this->render_infobox_button_icon( $item );
|
2332 |
}
|
2333 |
?>
|
@@ -2337,7 +2547,7 @@ class Info_Box_Carousel extends Powerpack_Widget {
|
|
2337 |
</span>
|
2338 |
<?php } ?>
|
2339 |
<?php
|
2340 |
-
if ( $item['button_icon_position']
|
2341 |
$this->render_infobox_button_icon( $item );
|
2342 |
}
|
2343 |
?>
|
@@ -2345,16 +2555,14 @@ class Info_Box_Carousel extends Powerpack_Widget {
|
|
2345 |
</<?php echo $pp_button_html_tag; ?>>
|
2346 |
</div>
|
2347 |
<?php } ?>
|
2348 |
-
<?php if ( $item['link_type']
|
2349 |
</a>
|
2350 |
<?php } ?>
|
2351 |
-
</div
|
2352 |
</div>
|
2353 |
</div>
|
2354 |
-
<?php
|
2355 |
-
|
2356 |
-
endforeach;
|
2357 |
-
?>
|
2358 |
</div>
|
2359 |
</div>
|
2360 |
<?php
|
@@ -2376,11 +2584,11 @@ endforeach;
|
|
2376 |
protected function render_infobox_icon( $item ) {
|
2377 |
$settings = $this->get_settings_for_display();
|
2378 |
|
2379 |
-
$fallback_defaults =
|
2380 |
'fa fa-check',
|
2381 |
'fa fa-times',
|
2382 |
'fa fa-dot-circle-o',
|
2383 |
-
|
2384 |
|
2385 |
$migration_allowed = Icons_Manager::is_migration_allowed();
|
2386 |
|
@@ -2390,20 +2598,19 @@ endforeach;
|
|
2390 |
}
|
2391 |
|
2392 |
$migrated = isset( $item['__fa4_migrated']['selected_icon'] );
|
2393 |
-
$is_new
|
2394 |
|
2395 |
if ( ! empty( $item['icon'] ) || ( ! empty( $item['selected_icon']['value'] ) && $is_new ) || ! empty( $item['image']['url'] ) ) {
|
2396 |
?>
|
2397 |
<span <?php echo $this->get_render_attribute_string( 'icon' ); ?>>
|
2398 |
-
<?php if ( $item['icon_type']
|
2399 |
<?php
|
2400 |
if ( $is_new || $migrated ) {
|
2401 |
-
Icons_Manager::render_icon( $item['selected_icon'],
|
2402 |
-
} else {
|
2403 |
-
?>
|
2404 |
<i class="<?php echo esc_attr( $item['icon'] ); ?>" aria-hidden="true"></i>
|
2405 |
<?php } ?>
|
2406 |
-
<?php } elseif ( $item['icon_type']
|
2407 |
<?php
|
2408 |
if ( ! empty( $item['image']['url'] ) ) {
|
2409 |
$image_url = Group_Control_Image_Size::get_attachment_image_src( $item['image']['id'], 'thumbnail', $settings );
|
@@ -2415,11 +2622,9 @@ endforeach;
|
|
2415 |
}
|
2416 |
}
|
2417 |
?>
|
2418 |
-
|
2419 |
-
} elseif ( $item['icon_type'] == 'text' ) {
|
2420 |
echo $item['icon_text'];
|
2421 |
-
}
|
2422 |
-
?>
|
2423 |
</span>
|
2424 |
<?php
|
2425 |
}
|
@@ -2443,16 +2648,15 @@ endforeach;
|
|
2443 |
}
|
2444 |
|
2445 |
$migrated = isset( $item['__fa4_migrated']['select_button_icon'] );
|
2446 |
-
$is_new
|
2447 |
|
2448 |
if ( ! empty( $item['button_icon'] ) || ( ! empty( $item['select_button_icon']['value'] ) && $is_new ) ) {
|
2449 |
?>
|
2450 |
<span class="pp-button-icon pp-icon">
|
2451 |
<?php
|
2452 |
if ( $is_new || $migrated ) {
|
2453 |
-
Icons_Manager::render_icon( $item['select_button_icon'],
|
2454 |
-
} else {
|
2455 |
-
?>
|
2456 |
<i class="<?php echo esc_attr( $item['button_icon'] ); ?>" aria-hidden="true"></i>
|
2457 |
<?php } ?>
|
2458 |
</span>
|
@@ -2470,12 +2674,10 @@ endforeach;
|
|
2470 |
protected function render_dots() {
|
2471 |
$settings = $this->get_settings_for_display();
|
2472 |
|
2473 |
-
if ( $settings['dots']
|
2474 |
-
?>
|
2475 |
<!-- Add Pagination -->
|
2476 |
<div class="swiper-pagination swiper-pagination-<?php echo esc_attr( $this->get_id() ); ?>"></div>
|
2477 |
-
|
2478 |
-
}
|
2479 |
}
|
2480 |
|
2481 |
/**
|
@@ -2488,29 +2690,53 @@ endforeach;
|
|
2488 |
protected function render_arrows() {
|
2489 |
$settings = $this->get_settings_for_display();
|
2490 |
|
2491 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2492 |
?>
|
2493 |
<?php
|
2494 |
-
if ( $
|
2495 |
-
$
|
2496 |
-
|
|
|
|
|
|
|
|
|
|
|
2497 |
} else {
|
2498 |
-
$
|
2499 |
-
$
|
2500 |
}
|
2501 |
?>
|
2502 |
-
|
2503 |
-
|
2504 |
-
|
2505 |
-
|
2506 |
-
|
2507 |
-
|
2508 |
-
|
|
|
|
|
|
|
2509 |
<?php
|
2510 |
}
|
2511 |
}
|
2512 |
|
2513 |
-
protected function
|
2514 |
$elementor_bp_tablet = get_option( 'elementor_viewport_lg' );
|
2515 |
$elementor_bp_mobile = get_option( 'elementor_viewport_md' );
|
2516 |
$elementor_bp_lg = get_option( 'elementor_viewport_lg' );
|
@@ -2520,69 +2746,35 @@ endforeach;
|
|
2520 |
$bp_mobile = 320;
|
2521 |
?>
|
2522 |
<#
|
2523 |
-
|
2524 |
-
if ( settings.
|
2525 |
-
|
2526 |
-
|
2527 |
-
|
2528 |
-
}
|
2529 |
-
}
|
2530 |
-
|
2531 |
-
function arrows_template() {
|
2532 |
-
if ( settings.arrows == 'yes' ) {
|
2533 |
-
if ( settings.arrow != '' ) {
|
2534 |
-
var pp_next_arrow = settings.arrow;
|
2535 |
-
var pp_prev_arrow = pp_next_arrow.replace('right', "left");
|
2536 |
-
}
|
2537 |
-
else {
|
2538 |
-
var pp_next_arrow = 'fa fa-angle-right';
|
2539 |
-
var pp_prev_arrow = 'fa fa-angle-left';
|
2540 |
-
}
|
2541 |
-
#>
|
2542 |
-
<div class="swiper-button-next">
|
2543 |
-
<i class="{{ pp_next_arrow }}"></i>
|
2544 |
-
</div>
|
2545 |
-
<div class="swiper-button-prev">
|
2546 |
-
<i class="{{ pp_prev_arrow }}"></i>
|
2547 |
-
</div>
|
2548 |
-
<#
|
2549 |
}
|
2550 |
-
}
|
2551 |
-
|
2552 |
-
function button_icon_template( item, index ) {
|
2553 |
-
var buttonIconHTML = {},
|
2554 |
-
buttonMigrated = {};
|
2555 |
|
2556 |
-
if (
|
2557 |
-
|
2558 |
-
|
2559 |
-
|
2560 |
-
|
2561 |
-
|
2562 |
-
|
2563 |
-
|
2564 |
-
|
2565 |
-
|
2566 |
-
|
2567 |
-
|
|
|
|
|
2568 |
}
|
2569 |
-
}
|
2570 |
|
2571 |
-
|
2572 |
-
|
2573 |
-
var $items = ( settings.items.size !== '' || settings.items.size !== undefined ) ? settings.items.size : 3,
|
2574 |
-
$items_tablet = ( settings.items_tablet.size !== '' || settings.items_tablet.size !== undefined ) ? settings.items_tablet.size : 2,
|
2575 |
-
$items_mobile = ( settings.items_mobile.size !== '' || settings.items_mobile.size !== undefined ) ? settings.items_mobile.size : 1,
|
2576 |
-
$speed = ( settings.slider_speed.size !== '' || settings.slider_speed.size !== undefined ) ? settings.slider_speed.size : 400,
|
2577 |
-
$margin = ( settings.margin.size !== '' || settings.margin.size !== undefined ) ? settings.margin.size : 10,
|
2578 |
-
$margin_tablet = ( settings.margin_tablet.size !== '' || settings.margin_tablet.size !== undefined ) ? settings.margin_tablet.size : 10,
|
2579 |
-
$margin_mobile = ( settings.margin_mobile.size !== '' || settings.margin_mobile.size !== undefined ) ? settings.margin_mobile.size : 10,
|
2580 |
-
$autoplay = ( settings.autoplay == 'yes' && settings.autoplay_speed.size != '' ) ? settings.autoplay_speed.size : 999999;
|
2581 |
|
2582 |
return {
|
2583 |
direction: "horizontal",
|
2584 |
-
speed:
|
2585 |
-
effect:
|
2586 |
slidesPerView: $items,
|
2587 |
spaceBetween: $margin,
|
2588 |
grabCursor: ( settings.grab_cursor === 'yes' ) ? true : false,
|
@@ -2590,6 +2782,7 @@ endforeach;
|
|
2590 |
loop: ( settings.infinite_loop === 'yes' ),
|
2591 |
autoplay: {
|
2592 |
delay: $autoplay,
|
|
|
2593 |
},
|
2594 |
pagination: {
|
2595 |
el: '.swiper-pagination',
|
@@ -2615,64 +2808,119 @@ endforeach;
|
|
2615 |
}
|
2616 |
}
|
2617 |
};
|
2618 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2619 |
|
2620 |
-
|
2621 |
'info-box-carousel-wrap',
|
2622 |
{
|
2623 |
'class': [ 'swiper-container-wrap', 'pp-info-box-carousel-wrap', 'swiper-container-wrap-dots-' + settings.dots_position ],
|
2624 |
}
|
2625 |
-
|
2626 |
-
|
2627 |
-
var slider_options = get_slider_settings( settings );
|
2628 |
|
2629 |
-
|
2630 |
-
|
2631 |
-
|
2632 |
-
#>
|
2633 |
-
<?php if ( is_rtl() ) { ?>
|
2634 |
<# view.addRenderAttribute( 'info-box-carousel', 'dir', 'rtl' ); #>
|
2635 |
-
|
2636 |
-
|
2637 |
-
|
2638 |
-
|
2639 |
view.addRenderAttribute( 'info-box-carousel', 'dir', 'rtl' );
|
2640 |
-
|
2641 |
-
|
2642 |
-
|
2643 |
-
|
|
|
|
|
2644 |
'info-box-carousel',
|
2645 |
{
|
2646 |
'class': [ 'swiper-container', 'pp-info-box', 'pp-info-box-carousel' ],
|
2647 |
'data-pagination': 'swiper-pagination',
|
2648 |
'data-arrow-next': 'swiper-button-next',
|
2649 |
'data-arrow-prev': 'swiper-button-prev',
|
|
|
2650 |
}
|
2651 |
-
|
|
|
|
|
2652 |
|
2653 |
-
|
2654 |
-
|
2655 |
-
var $pp_if_html_tag = 'div',
|
2656 |
$pp_title_html_tag = 'div',
|
2657 |
$pp_button_html_tag = 'div';
|
2658 |
|
2659 |
-
|
2660 |
'pp-info-box-button',
|
2661 |
'elementor-button',
|
2662 |
'elementor-size-' + settings.button_size,
|
2663 |
],
|
2664 |
-
|
2665 |
|
2666 |
-
|
2667 |
view.addRenderAttribute( 'info-box-button', 'class', 'elementor-animation-' + settings.button_hover_animation );
|
2668 |
-
|
2669 |
|
2670 |
-
|
2671 |
|
2672 |
-
|
2673 |
view.addRenderAttribute( 'icon', 'class', 'elementor-animation-' + settings.icon_animation );
|
2674 |
-
|
2675 |
-
|
2676 |
var iconsHTML = {},
|
2677 |
migrated = {};
|
2678 |
#>
|
@@ -2680,11 +2928,11 @@ endforeach;
|
|
2680 |
<div {{{ view.getRenderAttributeString( 'info-box-carousel' ) }}}>
|
2681 |
<div class="swiper-wrapper">
|
2682 |
<#
|
2683 |
-
|
2684 |
|
2685 |
-
|
2686 |
|
2687 |
-
|
2688 |
|
2689 |
if ( item.link_type != 'none' ) {
|
2690 |
if ( item.link.url ) {
|
@@ -2698,10 +2946,10 @@ endforeach;
|
|
2698 |
if ( item.link.nofollow ) {
|
2699 |
view.addRenderAttribute( 'link' + i, 'rel', 'nofollow' );
|
2700 |
}
|
2701 |
-
|
2702 |
if ( item.link_type == 'title' ) {
|
2703 |
$pp_title_html_tag = 'a';
|
2704 |
-
|
2705 |
}
|
2706 |
else if ( item.link_type == 'button' ) {
|
2707 |
$pp_button_html_tag = 'a';
|
@@ -2788,11 +3036,11 @@ endforeach;
|
|
2788 |
{{ item.description }}
|
2789 |
</div>
|
2790 |
<# } #>
|
2791 |
-
<# if ( item.link_type == 'button' ) { #>
|
2792 |
<div class="pp-info-box-footer">
|
2793 |
<{{{ $pp_button_html_tag }}} {{{ view.getRenderAttributeString( 'info-box-button' + i ) }}} {{{ view.getRenderAttributeString( 'link' + i ) }}}>
|
2794 |
<div {{{ view.getRenderAttributeString( 'info-box-button' ) }}}>
|
2795 |
-
<# if ( item.
|
2796 |
<# button_icon_template( item, index ); #>
|
2797 |
<# } #>
|
2798 |
<# if ( item.button_text ) { #>
|
@@ -2810,7 +3058,7 @@ endforeach;
|
|
2810 |
<# if ( item.link_type == 'box' ) { #>
|
2811 |
</a>
|
2812 |
<# } #>
|
2813 |
-
</div
|
2814 |
</div>
|
2815 |
</div>
|
2816 |
<# i++ } ); #>
|
@@ -2822,4 +3070,17 @@ endforeach;
|
|
2822 |
<?php
|
2823 |
}
|
2824 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2825 |
}
|
2 |
namespace PowerpackElementsLite\Modules\InfoBox\Widgets;
|
3 |
|
4 |
use PowerpackElementsLite\Base\Powerpack_Widget;
|
5 |
+
use PowerpackElementsLite\Classes\PP_Config;
|
6 |
|
7 |
// Elementor Classes
|
8 |
use Elementor\Controls_Manager;
|
85 |
* @return array Widget scripts dependencies.
|
86 |
*/
|
87 |
public function get_script_depends() {
|
88 |
+
return [
|
89 |
'jquery-swiper',
|
90 |
'powerpack-frontend',
|
91 |
+
];
|
92 |
+
}
|
93 |
+
|
94 |
+
/**
|
95 |
+
* Register info box carousel widget controls.
|
96 |
+
*
|
97 |
+
* Adds different input fields to allow the user to change and customize the widget settings.
|
98 |
+
*
|
99 |
+
* @access protected
|
100 |
+
*/
|
101 |
+
protected function _register_controls() { // phpcs:ignore PSR2.Methods.MethodDeclaration.Underscore
|
102 |
+
$this->register_controls();
|
103 |
}
|
104 |
|
105 |
/**
|
107 |
*
|
108 |
* Adds different input fields to allow the user to change and customize the widget settings.
|
109 |
*
|
110 |
+
* @since 2.0.3
|
111 |
* @access protected
|
112 |
*/
|
113 |
+
protected function register_controls() {
|
114 |
+
/* Content Tab */
|
115 |
+
$this->register_content_info_boxes_controls();
|
116 |
+
$this->register_content_carousel_settings_controls();
|
117 |
+
$this->register_content_help_docs_controls();
|
118 |
+
$this->register_content_upgrade_controls();
|
119 |
+
|
120 |
+
/* Style Tab */
|
121 |
+
$this->register_style_info_boxes_controls();
|
122 |
+
$this->register_style_icon_controls();
|
123 |
+
$this->register_style_title_controls();
|
124 |
+
$this->register_style_title_divider_controls();
|
125 |
+
$this->register_style_description_controls();
|
126 |
+
$this->register_style_button_controls();
|
127 |
+
$this->register_style_arrows_controls();
|
128 |
+
$this->register_style_dots_controls();
|
129 |
+
$this->register_style_fraction_controls();
|
130 |
+
}
|
131 |
|
132 |
+
/*-----------------------------------------------------------------------------------*/
|
133 |
+
/* CONTENT TAB
|
134 |
+
/*-----------------------------------------------------------------------------------*/
|
|
|
|
|
135 |
|
136 |
+
protected function register_content_info_boxes_controls() {
|
137 |
/**
|
138 |
* Content Tab: Info Boxes
|
139 |
* -------------------------------------------------
|
140 |
*/
|
141 |
$this->start_controls_section(
|
142 |
'section_info_boxes',
|
143 |
+
[
|
144 |
+
'label' => __( 'Info Boxes', 'powerpack' ),
|
145 |
+
]
|
146 |
);
|
147 |
|
148 |
$repeater = new Repeater();
|
149 |
|
150 |
$repeater->start_controls_tabs( 'items_repeater' );
|
151 |
|
152 |
+
$repeater->start_controls_tab( 'tab_content', [ 'label' => __( 'Content', 'powerpack' ) ] );
|
153 |
|
154 |
$repeater->add_control(
|
155 |
'title',
|
156 |
+
[
|
157 |
+
'label' => __( 'Title', 'powerpack' ),
|
158 |
+
'type' => Controls_Manager::TEXT,
|
159 |
+
'dynamic' => [
|
160 |
+
'active' => true,
|
161 |
+
],
|
162 |
+
'default' => __( 'Title', 'powerpack' ),
|
163 |
+
]
|
164 |
);
|
165 |
|
166 |
$repeater->add_control(
|
167 |
'subtitle',
|
168 |
+
[
|
169 |
+
'label' => __( 'Subtitle', 'powerpack' ),
|
170 |
+
'type' => Controls_Manager::TEXT,
|
171 |
+
'dynamic' => [
|
172 |
+
'active' => true,
|
173 |
+
],
|
174 |
+
'default' => __( 'Subtitle', 'powerpack' ),
|
175 |
+
]
|
176 |
);
|
177 |
|
178 |
$repeater->add_control(
|
179 |
'description',
|
180 |
+
[
|
181 |
+
'label' => __( 'Description', 'powerpack' ),
|
182 |
+
'type' => Controls_Manager::TEXTAREA,
|
183 |
+
'dynamic' => [
|
184 |
+
'active' => true,
|
185 |
+
],
|
186 |
+
'default' => __( 'Enter info box description', 'powerpack' ),
|
187 |
+
]
|
188 |
);
|
189 |
|
190 |
$repeater->end_controls_tab();
|
191 |
|
192 |
+
$repeater->start_controls_tab( 'tab_icon', [ 'label' => __( 'Icon', 'powerpack' ) ] );
|
193 |
|
194 |
$repeater->add_control(
|
195 |
'icon_type',
|
196 |
+
[
|
197 |
+
'label' => esc_html__( 'Type', 'powerpack' ),
|
198 |
+
'type' => Controls_Manager::CHOOSE,
|
199 |
+
'label_block' => false,
|
200 |
+
'options' => [
|
201 |
+
'none' => [
|
202 |
'title' => esc_html__( 'None', 'powerpack' ),
|
203 |
+
'icon' => 'fa fa-ban',
|
204 |
+
],
|
205 |
+
'icon' => [
|
206 |
'title' => esc_html__( 'Icon', 'powerpack' ),
|
207 |
+
'icon' => 'fa fa-gear',
|
208 |
+
],
|
209 |
+
'image' => [
|
210 |
'title' => esc_html__( 'Image', 'powerpack' ),
|
211 |
+
'icon' => 'fa fa-picture-o',
|
212 |
+
],
|
213 |
+
'text' => [
|
214 |
'title' => esc_html__( 'Text', 'powerpack' ),
|
215 |
+
'icon' => 'fa fa-font',
|
216 |
+
],
|
217 |
+
],
|
218 |
+
'default' => 'icon',
|
219 |
+
]
|
220 |
);
|
221 |
|
222 |
$repeater->add_control(
|
223 |
'selected_icon',
|
224 |
+
[
|
225 |
+
'label' => __( 'Icon', 'powerpack' ),
|
226 |
+
'type' => Controls_Manager::ICONS,
|
227 |
+
'label_block' => true,
|
228 |
+
'default' => [
|
229 |
+
'value' => 'fas fa-check',
|
230 |
+
'library' => 'fa-solid',
|
231 |
+
],
|
232 |
+
'fa4compatibility' => 'icon',
|
233 |
+
'condition' => [
|
234 |
+
'icon_type' => 'icon',
|
235 |
+
],
|
236 |
+
]
|
237 |
);
|
238 |
|
239 |
$repeater->add_control(
|
240 |
'icon_text',
|
241 |
+
[
|
242 |
+
'label' => __( 'Text', 'powerpack' ),
|
243 |
+
'type' => Controls_Manager::TEXT,
|
244 |
+
'dynamic' => [
|
245 |
+
'active' => true,
|
246 |
+
],
|
247 |
+
'default' => '1',
|
248 |
+
'condition' => [
|
249 |
+
'icon_type' => 'text',
|
250 |
+
],
|
251 |
+
]
|
252 |
);
|
253 |
|
254 |
$repeater->add_control(
|
255 |
'image',
|
256 |
+
[
|
257 |
+
'label' => __( 'Image', 'powerpack' ),
|
258 |
+
'type' => Controls_Manager::MEDIA,
|
259 |
+
'dynamic' => [
|
260 |
+
'active' => true,
|
261 |
+
],
|
262 |
+
'default' => [
|
263 |
'url' => Utils::get_placeholder_image_src(),
|
264 |
+
],
|
265 |
+
'condition' => [
|
266 |
'icon_type' => 'image',
|
267 |
+
],
|
268 |
+
]
|
269 |
);
|
270 |
|
271 |
$repeater->end_controls_tab();
|
272 |
|
273 |
+
$repeater->start_controls_tab( 'tab_link', [ 'label' => __( 'Link', 'powerpack' ) ] );
|
274 |
|
275 |
$repeater->add_control(
|
276 |
'link_type',
|
277 |
+
[
|
278 |
+
'label' => __( 'Link Type', 'powerpack' ),
|
279 |
+
'type' => Controls_Manager::SELECT,
|
280 |
+
'default' => 'none',
|
281 |
+
'options' => [
|
282 |
+
'none' => __( 'None', 'powerpack' ),
|
283 |
+
'box' => __( 'Box', 'powerpack' ),
|
284 |
+
'icon' => __( 'Image/Icon', 'powerpack' ),
|
285 |
+
'title' => __( 'Title', 'powerpack' ),
|
286 |
+
'button' => __( 'Button', 'powerpack' ),
|
287 |
+
],
|
288 |
+
]
|
289 |
);
|
290 |
|
291 |
$repeater->add_control(
|
292 |
'link',
|
293 |
+
[
|
294 |
+
'label' => __( 'Link', 'powerpack' ),
|
295 |
+
'type' => Controls_Manager::URL,
|
296 |
+
'dynamic' => [
|
297 |
+
'active' => true,
|
298 |
+
],
|
299 |
+
'placeholder' => 'https://www.your-link.com',
|
300 |
+
'default' => [
|
301 |
'url' => '#',
|
302 |
+
],
|
303 |
+
'condition' => [
|
304 |
+
'link_type!' => 'none',
|
305 |
+
],
|
306 |
+
]
|
307 |
+
);
|
308 |
+
|
309 |
+
$repeater->add_control(
|
310 |
+
'button_visible',
|
311 |
+
[
|
312 |
+
'label' => __( 'Show Button', 'powerpack' ),
|
313 |
+
'type' => Controls_Manager::SWITCHER,
|
314 |
+
'default' => 'no',
|
315 |
+
'label_on' => __( 'Yes', 'powerpack' ),
|
316 |
+
'label_off' => __( 'No', 'powerpack' ),
|
317 |
+
'return_value' => 'yes',
|
318 |
+
'condition' => [
|
319 |
+
'link_type' => 'box',
|
320 |
+
],
|
321 |
+
]
|
322 |
);
|
323 |
|
324 |
$repeater->add_control(
|
325 |
'button_text',
|
326 |
+
[
|
327 |
+
'label' => __( 'Button Text', 'powerpack' ),
|
328 |
+
'type' => Controls_Manager::TEXT,
|
329 |
+
'dynamic' => [
|
330 |
+
'active' => true,
|
331 |
+
],
|
332 |
+
'default' => __( 'Get Started', 'powerpack' ),
|
333 |
+
'conditions' => [
|
334 |
+
'relation' => 'or',
|
335 |
+
'terms' => [
|
336 |
+
[
|
337 |
+
'name' => 'link_type',
|
338 |
+
'operator' => '==',
|
339 |
+
'value' => 'button',
|
340 |
+
],
|
341 |
+
[
|
342 |
+
'relation' => 'and',
|
343 |
+
'terms' => [
|
344 |
+
[
|
345 |
+
'name' => 'link_type',
|
346 |
+
'operator' => '==',
|
347 |
+
'value' => 'box',
|
348 |
+
],
|
349 |
+
[
|
350 |
+
'name' => 'button_visible',
|
351 |
+
'operator' => '==',
|
352 |
+
'value' => 'yes',
|
353 |
+
],
|
354 |
+
],
|
355 |
+
],
|
356 |
+
],
|
357 |
+
],
|
358 |
+
]
|
359 |
);
|
360 |
|
361 |
$repeater->add_control(
|
362 |
'select_button_icon',
|
363 |
+
[
|
364 |
+
'label' => __( 'Button Icon', 'powerpack' ),
|
365 |
+
'type' => Controls_Manager::ICONS,
|
366 |
+
'label_block' => true,
|
367 |
+
'fa4compatibility' => 'button_icon',
|
368 |
+
'conditions' => [
|
369 |
+
'relation' => 'or',
|
370 |
+
'terms' => [
|
371 |
+
[
|
372 |
+
'name' => 'link_type',
|
373 |
+
'operator' => '==',
|
374 |
+
'value' => 'button',
|
375 |
+
],
|
376 |
+
[
|
377 |
+
'relation' => 'and',
|
378 |
+
'terms' => [
|
379 |
+
[
|
380 |
+
'name' => 'link_type',
|
381 |
+
'operator' => '==',
|
382 |
+
'value' => 'box',
|
383 |
+
],
|
384 |
+
[
|
385 |
+
'name' => 'button_visible',
|
386 |
+
'operator' => '==',
|
387 |
+
'value' => 'yes',
|
388 |
+
],
|
389 |
+
],
|
390 |
+
],
|
391 |
+
],
|
392 |
+
],
|
393 |
+
]
|
394 |
);
|
395 |
|
396 |
$repeater->add_control(
|
397 |
'button_icon_position',
|
398 |
+
[
|
399 |
+
'label' => __( 'Icon Position', 'powerpack' ),
|
400 |
+
'type' => Controls_Manager::SELECT,
|
401 |
+
'default' => 'after',
|
402 |
+
'options' => [
|
403 |
+
'before' => __( 'Before', 'powerpack' ),
|
404 |
+
'after' => __( 'After', 'powerpack' ),
|
405 |
+
],
|
406 |
+
'conditions' => [
|
407 |
+
'relation' => 'or',
|
408 |
+
'terms' => [
|
409 |
+
[
|
410 |
+
'relation' => 'and',
|
411 |
+
'terms' => [
|
412 |
+
[
|
413 |
+
'name' => 'link_type',
|
414 |
+
'operator' => '==',
|
415 |
+
'value' => 'button',
|
416 |
+
],
|
417 |
+
[
|
418 |
+
'name' => 'select_button_icon[value]',
|
419 |
+
'operator' => '!=',
|
420 |
+
'value' => '',
|
421 |
+
],
|
422 |
+
],
|
423 |
+
],
|
424 |
+
[
|
425 |
+
'relation' => 'and',
|
426 |
+
'terms' => [
|
427 |
+
[
|
428 |
+
'name' => 'link_type',
|
429 |
+
'operator' => '==',
|
430 |
+
'value' => 'box',
|
431 |
+
],
|
432 |
+
[
|
433 |
+
'name' => 'button_visible',
|
434 |
+
'operator' => '==',
|
435 |
+
'value' => 'yes',
|
436 |
+
],
|
437 |
+
[
|
438 |
+
'name' => 'select_button_icon[value]',
|
439 |
+
'operator' => '!=',
|
440 |
+
'value' => '',
|
441 |
+
],
|
442 |
+
],
|
443 |
+
],
|
444 |
+
],
|
445 |
+
],
|
446 |
+
]
|
447 |
);
|
448 |
|
449 |
$repeater->end_controls_tab();
|
452 |
|
453 |
$this->add_control(
|
454 |
'pp_info_boxes',
|
455 |
+
[
|
456 |
+
'label' => '',
|
457 |
+
'type' => Controls_Manager::REPEATER,
|
458 |
+
'default' => [
|
459 |
+
[
|
460 |
'title' => __( 'Info Box 1', 'powerpack' ),
|
461 |
+
],
|
462 |
+
[
|
463 |
'title' => __( 'Info Box 2', 'powerpack' ),
|
464 |
+
],
|
465 |
+
[
|
466 |
'title' => __( 'Info Box 3', 'powerpack' ),
|
467 |
+
],
|
468 |
+
],
|
469 |
+
'fields' => $repeater->get_controls(),
|
470 |
+
'title_field' => '{{{ title }}}',
|
471 |
+
]
|
472 |
);
|
473 |
|
474 |
$this->add_group_control(
|
475 |
Group_Control_Image_Size::get_type(),
|
476 |
+
[
|
477 |
+
'name' => 'thumbnail',
|
478 |
+
'label' => __( 'Image Size', 'powerpack' ),
|
479 |
+
'default' => 'full',
|
480 |
+
'separator' => 'before',
|
481 |
+
]
|
482 |
);
|
483 |
|
484 |
$this->add_control(
|
485 |
'divider_title_switch',
|
486 |
+
[
|
487 |
+
'label' => __( 'Title Separator', 'powerpack' ),
|
488 |
+
'type' => Controls_Manager::SWITCHER,
|
489 |
+
'default' => '',
|
490 |
+
'label_on' => __( 'On', 'powerpack' ),
|
491 |
+
'label_off' => __( 'Off', 'powerpack' ),
|
492 |
+
'return_value' => 'yes',
|
493 |
+
]
|
494 |
);
|
495 |
|
496 |
$this->add_control(
|
497 |
'title_html_tag',
|
498 |
+
[
|
499 |
+
'label' => __( 'Title HTML Tag', 'powerpack' ),
|
500 |
+
'type' => Controls_Manager::SELECT,
|
501 |
+
'default' => 'h4',
|
502 |
+
'options' => [
|
503 |
+
'h1' => __( 'H1', 'powerpack' ),
|
504 |
+
'h2' => __( 'H2', 'powerpack' ),
|
505 |
+
'h3' => __( 'H3', 'powerpack' ),
|
506 |
+
'h4' => __( 'H4', 'powerpack' ),
|
507 |
+
'h5' => __( 'H5', 'powerpack' ),
|
508 |
+
'h6' => __( 'H6', 'powerpack' ),
|
509 |
+
'div' => __( 'div', 'powerpack' ),
|
510 |
+
'span' => __( 'span', 'powerpack' ),
|
511 |
+
'p' => __( 'p', 'powerpack' ),
|
512 |
+
],
|
513 |
+
]
|
514 |
);
|
515 |
|
516 |
$this->add_control(
|
517 |
'sub_title_html_tag',
|
518 |
+
[
|
519 |
+
'label' => __( 'Subtitle HTML Tag', 'powerpack' ),
|
520 |
+
'type' => Controls_Manager::SELECT,
|
521 |
+
'default' => 'h5',
|
522 |
+
'options' => [
|
523 |
+
'h1' => __( 'H1', 'powerpack' ),
|
524 |
+
'h2' => __( 'H2', 'powerpack' ),
|
525 |
+
'h3' => __( 'H3', 'powerpack' ),
|
526 |
+
'h4' => __( 'H4', 'powerpack' ),
|
527 |
+
'h5' => __( 'H5', 'powerpack' ),
|
528 |
+
'h6' => __( 'H6', 'powerpack' ),
|
529 |
+
'div' => __( 'div', 'powerpack' ),
|
530 |
+
'span' => __( 'span', 'powerpack' ),
|
531 |
+
'p' => __( 'p', 'powerpack' ),
|
532 |
+
],
|
533 |
+
]
|
534 |
);
|
535 |
|
536 |
$this->add_control(
|
537 |
'equal_height_boxes',
|
538 |
+
[
|
539 |
+
'label' => __( 'Equal Height Boxes', 'powerpack' ),
|
540 |
+
'type' => Controls_Manager::SWITCHER,
|
541 |
+
'default' => '',
|
542 |
+
'label_on' => __( 'On', 'powerpack' ),
|
543 |
+
'label_off' => __( 'Off', 'powerpack' ),
|
544 |
+
'return_value' => 'yes',
|
545 |
+
'frontend_available' => true,
|
546 |
+
]
|
547 |
);
|
548 |
|
549 |
$this->end_controls_section();
|
550 |
+
}
|
551 |
|
552 |
+
protected function register_content_carousel_settings_controls() {
|
553 |
/**
|
554 |
* Content Tab: Carousel Settings
|
555 |
* -------------------------------------------------
|
556 |
*/
|
557 |
$this->start_controls_section(
|
558 |
'section_carousel_settings',
|
559 |
+
[
|
560 |
+
'label' => __( 'Carousel Settings', 'powerpack' ),
|
561 |
+
]
|
562 |
);
|
563 |
|
564 |
$this->add_control(
|
565 |
'carousel_effect',
|
566 |
+
[
|
567 |
+
'label' => __( 'Effect', 'powerpack' ),
|
568 |
+
'description' => __( 'Sets transition effect', 'powerpack' ),
|
569 |
+
'type' => Controls_Manager::SELECT,
|
570 |
+
'default' => 'slide',
|
571 |
+
'options' => [
|
572 |
'slide' => __( 'Slide', 'powerpack' ),
|
573 |
'fade' => __( 'Fade', 'powerpack' ),
|
574 |
'cube' => __( 'Cube', 'powerpack' ),
|
575 |
'coverflow' => __( 'Coverflow', 'powerpack' ),
|
576 |
'flip' => __( 'Flip', 'powerpack' ),
|
577 |
+
],
|
578 |
+
]
|
579 |
);
|
580 |
|
581 |
$this->add_responsive_control(
|
582 |
'items',
|
583 |
+
[
|
584 |
+
'label' => __( 'Visible Items', 'powerpack' ),
|
585 |
+
'description' => __( 'Number of slides visible at the same time on slider\'s container).', 'powerpack' ),
|
586 |
+
'type' => Controls_Manager::SLIDER,
|
587 |
+
'default' => [ 'size' => 3 ],
|
588 |
+
'tablet_default' => [ 'size' => 2 ],
|
589 |
+
'mobile_default' => [ 'size' => 1 ],
|
590 |
+
'range' => [
|
591 |
+
'px' => [
|
592 |
+
'min' => 1,
|
593 |
+
'max' => 10,
|
594 |
+
'step' => 1,
|
595 |
+
],
|
596 |
+
],
|
597 |
+
'size_units' => '',
|
598 |
+
'condition' => [
|
599 |
+
'carousel_effect' => 'slide',
|
600 |
+
],
|
601 |
+
'separator' => 'before',
|
602 |
+
]
|
603 |
);
|
604 |
|
605 |
$this->add_responsive_control(
|
606 |
'margin',
|
607 |
+
[
|
608 |
+
'label' => __( 'Items Gap', 'powerpack' ),
|
609 |
+
'description' => __( 'Distance between slides (in px)', 'powerpack' ),
|
610 |
+
'type' => Controls_Manager::SLIDER,
|
611 |
+
'default' => [ 'size' => 10 ],
|
612 |
+
'tablet_default' => [ 'size' => 10 ],
|
613 |
+
'mobile_default' => [ 'size' => 10 ],
|
614 |
+
'range' => [
|
615 |
+
'px' => [
|
616 |
+
'min' => 0,
|
617 |
+
'max' => 100,
|
618 |
+
'step' => 1,
|
619 |
+
],
|
620 |
+
],
|
621 |
+
'size_units' => '',
|
622 |
+
'condition' => [
|
623 |
+
'carousel_effect' => 'slide',
|
624 |
+
],
|
625 |
+
]
|
626 |
);
|
627 |
|
628 |
$this->add_control(
|
629 |
'slider_speed',
|
630 |
+
[
|
631 |
+
'label' => __( 'Slider Speed', 'powerpack' ),
|
632 |
+
'description' => __( 'Duration of transition between slides (in ms)', 'powerpack' ),
|
633 |
+
'type' => Controls_Manager::SLIDER,
|
634 |
+
'default' => [ 'size' => 600 ],
|
635 |
+
'range' => [
|
636 |
+
'px' => [
|
637 |
+
'min' => 100,
|
638 |
+
'max' => 3000,
|
639 |
+
'step' => 1,
|
640 |
+
],
|
641 |
+
],
|
642 |
+
'size_units' => '',
|
643 |
+
'separator' => 'before',
|
644 |
+
]
|
645 |
);
|
646 |
|
647 |
$this->add_control(
|
648 |
'autoplay',
|
649 |
+
[
|
650 |
+
'label' => __( 'Autoplay', 'powerpack' ),
|
651 |
+
'type' => Controls_Manager::SWITCHER,
|
652 |
+
'default' => 'yes',
|
653 |
+
'label_on' => __( 'Yes', 'powerpack' ),
|
654 |
+
'label_off' => __( 'No', 'powerpack' ),
|
655 |
+
'return_value' => 'yes',
|
656 |
+
'separator' => 'before',
|
657 |
+
]
|
658 |
+
);
|
659 |
+
|
660 |
+
$this->add_control(
|
661 |
+
'pause_on_interaction',
|
662 |
+
[
|
663 |
+
'label' => __( 'Pause on Interaction', 'powerpack' ),
|
664 |
+
'description' => __( 'Disables autoplay completely on first interaction with the carousel.', 'powerpack' ),
|
665 |
+
'type' => Controls_Manager::SWITCHER,
|
666 |
+
'default' => '',
|
667 |
+
'label_on' => __( 'Yes', 'powerpack' ),
|
668 |
+
'label_off' => __( 'No', 'powerpack' ),
|
669 |
+
'return_value' => 'yes',
|
670 |
+
'condition' => [
|
671 |
+
'autoplay' => 'yes',
|
672 |
+
],
|
673 |
+
]
|
674 |
);
|
675 |
|
676 |
$this->add_control(
|
677 |
'autoplay_speed',
|
678 |
+
[
|
679 |
+
'label' => __( 'Autoplay Speed', 'powerpack' ),
|
680 |
+
'type' => Controls_Manager::SLIDER,
|
681 |
+
'default' => [ 'size' => 3000 ],
|
682 |
+
'range' => [
|
683 |
+
'px' => [
|
684 |
+
'min' => 500,
|
685 |
+
'max' => 5000,
|
686 |
+
'step' => 1,
|
687 |
+
],
|
688 |
+
],
|
689 |
+
'size_units' => '',
|
690 |
+
'condition' => [
|
691 |
+
'autoplay' => 'yes',
|
692 |
+
],
|
693 |
+
]
|
694 |
);
|
695 |
|
696 |
$this->add_control(
|
697 |
'infinite_loop',
|
698 |
+
[
|
699 |
+
'label' => __( 'Infinite Loop', 'powerpack' ),
|
700 |
+
'description' => __( 'Enables continuous loop mode', 'powerpack' ),
|
701 |
+
'type' => Controls_Manager::SWITCHER,
|
702 |
+
'default' => 'yes',
|
703 |
+
'label_on' => __( 'Yes', 'powerpack' ),
|
704 |
+
'label_off' => __( 'No', 'powerpack' ),
|
705 |
+
'return_value' => 'yes',
|
706 |
+
]
|
707 |
);
|
708 |
|
709 |
$this->add_control(
|
710 |
'grab_cursor',
|
711 |
+
[
|
712 |
+
'label' => __( 'Grab Cursor', 'powerpack' ),
|
713 |
+
'description' => __( 'Shows grab cursor when you hover over the slider', 'powerpack' ),
|
714 |
+
'type' => Controls_Manager::SWITCHER,
|
715 |
+
'default' => '',
|
716 |
+
'label_on' => __( 'Show', 'powerpack' ),
|
717 |
+
'label_off' => __( 'Hide', 'powerpack' ),
|
718 |
+
'return_value' => 'yes',
|
719 |
+
'separator' => 'before',
|
720 |
+
]
|
721 |
);
|
722 |
|
723 |
$this->add_control(
|
724 |
'navigation_heading',
|
725 |
+
[
|
726 |
+
'label' => __( 'Navigation', 'powerpack' ),
|
727 |
+
'type' => Controls_Manager::HEADING,
|
728 |
+
'separator' => 'before',
|
729 |
+
]
|
730 |
);
|
731 |
|
732 |
$this->add_control(
|
733 |
'arrows',
|
734 |
+
[
|
735 |
+
'label' => __( 'Arrows', 'powerpack' ),
|
736 |
+
'type' => Controls_Manager::SWITCHER,
|
737 |
+
'default' => 'yes',
|
738 |
+
'label_on' => __( 'Yes', 'powerpack' ),
|
739 |
+
'label_off' => __( 'No', 'powerpack' ),
|
740 |
+
'return_value' => 'yes',
|
741 |
+
]
|
742 |
);
|
743 |
|
744 |
$this->add_control(
|
745 |
'dots',
|
746 |
+
[
|
747 |
+
'label' => __( 'Pagination', 'powerpack' ),
|
748 |
+
'type' => Controls_Manager::SWITCHER,
|
749 |
+
'default' => 'yes',
|
750 |
+
'label_on' => __( 'Yes', 'powerpack' ),
|
751 |
+
'label_off' => __( 'No', 'powerpack' ),
|
752 |
+
'return_value' => 'yes',
|
753 |
+
]
|
754 |
);
|
755 |
|
756 |
$this->add_control(
|
757 |
'pagination_type',
|
758 |
+
[
|
759 |
+
'label' => __( 'Pagination Type', 'powerpack' ),
|
760 |
+
'type' => Controls_Manager::SELECT,
|
761 |
+
'default' => 'bullets',
|
762 |
+
'options' => [
|
763 |
+
'bullets' => __( 'Dots', 'powerpack' ),
|
764 |
+
'fraction' => __( 'Fraction', 'powerpack' ),
|
765 |
+
],
|
766 |
+
'condition' => [
|
767 |
+
'dots' => 'yes',
|
768 |
+
],
|
769 |
+
]
|
770 |
);
|
771 |
|
772 |
$this->add_control(
|
773 |
'direction',
|
774 |
+
[
|
775 |
+
'label' => __( 'Direction', 'powerpack' ),
|
776 |
+
'type' => Controls_Manager::SELECT,
|
777 |
+
'default' => 'left',
|
778 |
+
'options' => [
|
779 |
+
'auto' => __( 'Auto', 'powerpack' ),
|
780 |
+
'left' => __( 'Left', 'powerpack' ),
|
781 |
+
'right' => __( 'Right', 'powerpack' ),
|
782 |
+
],
|
783 |
+
'separator' => 'before',
|
784 |
+
]
|
785 |
);
|
786 |
|
787 |
$this->end_controls_section();
|
788 |
+
}
|
789 |
|
790 |
+
protected function register_content_help_docs_controls() {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
791 |
|
792 |
+
$help_docs = PP_Config::get_widget_help_links( 'Info_Box_Carousel' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
793 |
|
794 |
+
if ( ! empty( $help_docs ) ) {
|
795 |
+
|
796 |
+
/**
|
797 |
+
* Content Tab: Help Docs
|
798 |
+
*
|
799 |
+
* @since 1.4.8
|
800 |
+
* @access protected
|
801 |
+
*/
|
802 |
+
$this->start_controls_section(
|
803 |
+
'section_help_docs',
|
804 |
+
[
|
805 |
+
'label' => __( 'Help Docs', 'powerpack' ),
|
806 |
+
]
|
807 |
+
);
|
808 |
|
809 |
+
$hd_counter = 1;
|
810 |
+
foreach ( $help_docs as $hd_title => $hd_link ) {
|
811 |
+
$this->add_control(
|
812 |
+
'help_doc_' . $hd_counter,
|
813 |
+
[
|
814 |
+
'type' => Controls_Manager::RAW_HTML,
|
815 |
+
'raw' => sprintf( '%1$s ' . $hd_title . ' %2$s', '<a href="' . $hd_link . '" target="_blank" rel="noopener">', '</a>' ),
|
816 |
+
'content_classes' => 'pp-editor-doc-links',
|
817 |
+
]
|
818 |
+
);
|
819 |
+
|
820 |
+
$hd_counter++;
|
821 |
+
}
|
822 |
+
|
823 |
+
$this->end_controls_section();
|
824 |
+
}
|
825 |
+
}
|
826 |
+
|
827 |
+
/**
|
828 |
+
* Register PowerPack Upgrade in Content tab
|
829 |
+
*
|
830 |
+
* @return void
|
831 |
+
*/
|
832 |
+
protected function register_content_upgrade_controls() {
|
833 |
if ( ! is_pp_elements_active() ) {
|
834 |
$this->start_controls_section(
|
835 |
'section_upgrade_powerpack',
|
851 |
|
852 |
$this->end_controls_section();
|
853 |
}
|
854 |
+
}
|
855 |
|
856 |
+
/*-----------------------------------------------------------------------------------*/
|
857 |
+
/* STYLE TAB
|
858 |
+
/*-----------------------------------------------------------------------------------*/
|
|
|
|
|
859 |
|
860 |
+
protected function register_style_info_boxes_controls() {
|
861 |
/**
|
862 |
* Style Tab: Info Boxes
|
863 |
* -------------------------------------------------
|
864 |
*/
|
865 |
$this->start_controls_section(
|
866 |
'section_info_box_style',
|
867 |
+
[
|
868 |
+
'label' => __( 'Info Boxes', 'powerpack' ),
|
869 |
+
'tab' => Controls_Manager::TAB_STYLE,
|
870 |
+
]
|
871 |
);
|
872 |
|
873 |
$this->add_responsive_control(
|
874 |
'align',
|
875 |
+
[
|
876 |
+
'label' => __( 'Alignment', 'powerpack' ),
|
877 |
+
'type' => Controls_Manager::CHOOSE,
|
878 |
+
'options' => [
|
879 |
+
'left' => [
|
880 |
'title' => __( 'Left', 'powerpack' ),
|
881 |
'icon' => 'fa fa-align-left',
|
882 |
+
],
|
883 |
+
'center' => [
|
884 |
'title' => __( 'Center', 'powerpack' ),
|
885 |
'icon' => 'fa fa-align-center',
|
886 |
+
],
|
887 |
+
'right' => [
|
888 |
'title' => __( 'Right', 'powerpack' ),
|
889 |
'icon' => 'fa fa-align-right',
|
890 |
+
],
|
891 |
+
'justify' => [
|
892 |
'title' => __( 'Justified', 'powerpack' ),
|
893 |
'icon' => 'fa fa-align-justify',
|
894 |
+
],
|
895 |
+
],
|
896 |
+
'default' => '',
|
897 |
+
'selectors' => [
|
898 |
'{{WRAPPER}} .pp-info-box .swiper-slide' => 'text-align: {{VALUE}};',
|
899 |
+
],
|
900 |
+
]
|
901 |
);
|
902 |
|
903 |
$this->add_group_control(
|
904 |
Group_Control_Background::get_type(),
|
905 |
+
[
|
906 |
+
'name' => 'info_box_background',
|
907 |
+
'types' => [ 'classic', 'gradient' ],
|
908 |
+
'separator' => 'before',
|
909 |
+
'selector' => '{{WRAPPER}} .pp-info-box-content-wrap',
|
910 |
+
]
|
911 |
);
|
912 |
|
913 |
$this->add_group_control(
|
914 |
Group_Control_Border::get_type(),
|
915 |
+
[
|
916 |
+
'name' => 'info_box_border',
|
917 |
+
'label' => __( 'Border', 'powerpack' ),
|
918 |
+
'placeholder' => '1px',
|
919 |
+
'default' => '1px',
|
920 |
+
'separator' => 'before',
|
921 |
+
'selector' => '{{WRAPPER}} .pp-info-box-content-wrap',
|
922 |
+
]
|
923 |
);
|
924 |
|
925 |
$this->add_responsive_control(
|
926 |
'info_box_padding',
|
927 |
+
[
|
928 |
+
'label' => __( 'Padding', 'powerpack' ),
|
929 |
+
'type' => Controls_Manager::DIMENSIONS,
|
930 |
+
'size_units' => [ 'px', '%' ],
|
931 |
+
'separator' => 'before',
|
932 |
+
'selectors' => [
|
933 |
'{{WRAPPER}} .pp-info-box-content-wrap' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
934 |
+
],
|
935 |
+
]
|
936 |
);
|
937 |
|
938 |
$this->end_controls_section();
|
939 |
+
}
|
940 |
|
941 |
+
protected function register_style_icon_controls() {
|
942 |
/**
|
943 |
* Style Tab: Icon Style
|
944 |
* -------------------------------------------------
|
945 |
*/
|
946 |
$this->start_controls_section(
|
947 |
'section_info_box_icon_style',
|
948 |
+
[
|
949 |
+
'label' => __( 'Icon', 'powerpack' ),
|
950 |
+
'tab' => Controls_Manager::TAB_STYLE,
|
951 |
+
]
|
952 |
);
|
953 |
|
954 |
$this->add_responsive_control(
|
955 |
'icon_size',
|
956 |
+
[
|
957 |
+
'label' => __( 'Icon Size', 'powerpack' ),
|
958 |
+
'type' => Controls_Manager::SLIDER,
|
959 |
+
'range' => [
|
960 |
+
'px' => [
|
961 |
+
'min' => 5,
|
962 |
+
'max' => 100,
|
963 |
+
'step' => 1,
|
964 |
+
],
|
965 |
+
],
|
966 |
+
'size_units' => [ 'px', 'em' ],
|
967 |
+
'selectors' => [
|
968 |
'{{WRAPPER}} .pp-info-box-icon' => 'font-size: {{SIZE}}{{UNIT}}',
|
969 |
+
],
|
970 |
+
]
|
971 |
);
|
972 |
|
973 |
$this->start_controls_tabs( 'tabs_icon_style' );
|
974 |
|
975 |
$this->start_controls_tab(
|
976 |
'tab_icon_normal',
|
977 |
+
[
|
978 |
+
'label' => __( 'Normal', 'powerpack' ),
|
979 |
+
]
|
980 |
);
|
981 |
|
982 |
$this->add_control(
|
983 |
'icon_color_normal',
|
984 |
+
[
|
985 |
+
'label' => __( 'Icon Color', 'powerpack' ),
|
986 |
+
'type' => Controls_Manager::COLOR,
|
987 |
+
'default' => '',
|
988 |
+
'selectors' => [
|
989 |
+
'{{WRAPPER}} .pp-info-box-icon' => 'color: {{VALUE}}',
|
990 |
'{{WRAPPER}} .pp-info-box-icon svg' => 'fill: {{VALUE}}',
|
991 |
+
],
|
992 |
+
]
|
993 |
);
|
994 |
|
995 |
$this->add_control(
|
996 |
'icon_bg_color_normal',
|
997 |
+
[
|
998 |
+
'label' => __( 'Background Color', 'powerpack' ),
|
999 |
+
'type' => Controls_Manager::COLOR,
|
1000 |
+
'default' => '',
|
1001 |
+
'selectors' => [
|
1002 |
'{{WRAPPER}} .pp-info-box-icon' => 'background-color: {{VALUE}}',
|
1003 |
+
],
|
1004 |
+
]
|
1005 |
);
|
1006 |
|
1007 |
$this->add_group_control(
|
1008 |
Group_Control_Border::get_type(),
|
1009 |
+
[
|
1010 |
+
'name' => 'icon_border',
|
1011 |
+
'label' => __( 'Border', 'powerpack' ),
|
1012 |
+
'placeholder' => '1px',
|
1013 |
+
'default' => '1px',
|
1014 |
+
'selector' => '{{WRAPPER}} .pp-info-box-icon',
|
1015 |
+
]
|
1016 |
);
|
1017 |
|
1018 |
$this->add_control(
|
1019 |
'icon_border_radius',
|
1020 |
+
[
|
1021 |
+
'label' => __( 'Border Radius', 'powerpack' ),
|
1022 |
+
'type' => Controls_Manager::DIMENSIONS,
|
1023 |
+
'size_units' => [ 'px', '%' ],
|
1024 |
+
'selectors' => [
|
1025 |
'{{WRAPPER}} .pp-info-box-icon, {{WRAPPER}} .pp-info-box-icon img' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
1026 |
+
],
|
1027 |
+
]
|
1028 |
);
|
1029 |
|
1030 |
$this->add_responsive_control(
|
1031 |
'icon_rotation',
|
1032 |
+
[
|
1033 |
+
'label' => __( 'Icon Rotation', 'powerpack' ),
|
1034 |
+
'type' => Controls_Manager::SLIDER,
|
1035 |
+
'range' => [
|
1036 |
+
'px' => [
|
1037 |
+
'min' => 0,
|
1038 |
+
'max' => 360,
|
1039 |
+
'step' => 1,
|
1040 |
+
],
|
1041 |
+
],
|
1042 |
+
'size_units' => '',
|
1043 |
+
'selectors' => [
|
1044 |
'{{WRAPPER}} .pp-info-box-icon' => 'transform: rotate( {{SIZE}}deg );',
|
1045 |
+
],
|
1046 |
+
]
|
1047 |
);
|
1048 |
|
1049 |
$this->add_responsive_control(
|
1050 |
'icon_padding',
|
1051 |
+
[
|
1052 |
+
'label' => __( 'Padding', 'powerpack' ),
|
1053 |
+
'type' => Controls_Manager::SLIDER,
|
1054 |
+
'range' => [
|
1055 |
+
'px' => [
|
1056 |
+
'min' => 0,
|
1057 |
+
'max' => 120,
|
1058 |
+
'step' => 1,
|
1059 |
+
],
|
1060 |
+
],
|
1061 |
+
'size_units' => '',
|
1062 |
+
'selectors' => [
|
1063 |
'{{WRAPPER}} .pp-info-box-icon' => 'padding: {{SIZE}}{{UNIT}};',
|
1064 |
+
],
|
1065 |
+
]
|
1066 |
);
|
1067 |
|
1068 |
$this->add_responsive_control(
|
1069 |
'icon_margin',
|
1070 |
+
[
|
1071 |
+
'label' => __( 'Margin', 'powerpack' ),
|
1072 |
+
'type' => Controls_Manager::DIMENSIONS,
|
1073 |
+
'size_units' => [ 'px', '%' ],
|
1074 |
+
'placeholder' => [
|
1075 |
+
'top' => '',
|
1076 |
+
'right' => '',
|
1077 |
+
'bottom' => '',
|
1078 |
+
'left' => '',
|
1079 |
+
],
|
1080 |
+
'selectors' => [
|
1081 |
'{{WRAPPER}} .pp-info-box-icon' => 'margin-top: {{TOP}}{{UNIT}}; margin-left: {{LEFT}}{{UNIT}}; margin-right: {{RIGHT}}{{UNIT}}; margin-bottom: {{BOTTOM}}{{UNIT}};',
|
1082 |
+
],
|
1083 |
+
]
|
1084 |
);
|
1085 |
|
1086 |
$this->end_controls_tab();
|
1087 |
|
1088 |
$this->start_controls_tab(
|
1089 |
'tab_icon_hover',
|
1090 |
+
[
|
1091 |
+
'label' => __( 'Hover', 'powerpack' ),
|
1092 |
+
]
|
1093 |
);
|
1094 |
|
1095 |
$this->add_control(
|
1096 |
'icon_color_hover',
|
1097 |
+
[
|
1098 |
+
'label' => __( 'Icon Color', 'powerpack' ),
|
1099 |
+
'type' => Controls_Manager::COLOR,
|
1100 |
+
'default' => '',
|
1101 |
+
'selectors' => [
|
1102 |
'{{WRAPPER}} .pp-info-box-icon:hover' => 'color: {{VALUE}}',
|
1103 |
'{{WRAPPER}} .pp-info-box-icon:hover svg' => 'fill: {{VALUE}}',
|
1104 |
+
],
|
1105 |
+
]
|
1106 |
);
|
1107 |
|
1108 |
$this->add_control(
|
1109 |
'icon_bg_color_hover',
|
1110 |
+
[
|
1111 |
+
'label' => __( 'Background Color', 'powerpack' ),
|
1112 |
+
'type' => Controls_Manager::COLOR,
|
1113 |
+
'default' => '',
|
1114 |
+
'selectors' => [
|
1115 |
'{{WRAPPER}} .pp-info-box-icon:hover' => 'background-color: {{VALUE}}',
|
1116 |
+
],
|
1117 |
+
]
|
1118 |
);
|
1119 |
|
1120 |
$this->add_control(
|
1121 |
'icon_border_color_hover',
|
1122 |
+
[
|
1123 |
+
'label' => __( 'Border Color', 'powerpack' ),
|
1124 |
+
'type' => Controls_Manager::COLOR,
|
1125 |
+
'default' => '',
|
1126 |
+
'selectors' => [
|
1127 |
'{{WRAPPER}} .pp-info-box-icon:hover' => 'border-color: {{VALUE}}',
|
1128 |
+
],
|
1129 |
+
]
|
1130 |
);
|
1131 |
|
1132 |
$this->add_responsive_control(
|
1133 |
'icon_rotation_hover',
|
1134 |
+
[
|
1135 |
+
'label' => __( 'Icon Rotation', 'powerpack' ),
|
1136 |
+
'type' => Controls_Manager::SLIDER,
|
1137 |
+
'range' => [
|
1138 |
+
'px' => [
|
1139 |
+
'min' => 0,
|
1140 |
+
'max' => 360,
|
1141 |
+
'step' => 1,
|
1142 |
+
],
|
1143 |
+
],
|
1144 |
+
'size_units' => '',
|
1145 |
+
'selectors' => [
|
1146 |
'{{WRAPPER}} .pp-info-box .pp-info-box-icon-wrap:hover' => 'transform: rotate( {{SIZE}}deg );',
|
1147 |
+
],
|
1148 |
+
]
|
1149 |
);
|
1150 |
|
1151 |
$this->add_control(
|
1152 |
'icon_animation',
|
1153 |
+
[
|
1154 |
+
'label' => __( 'Icon Animation', 'powerpack' ),
|
1155 |
+
'type' => Controls_Manager::HOVER_ANIMATION,
|
1156 |
+
]
|
1157 |
);
|
1158 |
|
1159 |
$this->end_controls_tab();
|
1162 |
|
1163 |
$this->add_control(
|
1164 |
'icon_image_heading',
|
1165 |
+
[
|
1166 |
+
'label' => __( 'Icon Image', 'powerpack' ),
|
1167 |
+
'type' => Controls_Manager::HEADING,
|
1168 |
+
'separator' => 'before',
|
1169 |
+
]
|
1170 |
);
|
1171 |
|
1172 |
$this->add_responsive_control(
|
1173 |
'icon_img_width',
|
1174 |
+
[
|
1175 |
+
'label' => __( 'Width', 'powerpack' ),
|
1176 |
+
'type' => Controls_Manager::SLIDER,
|
1177 |
+
'range' => [
|
1178 |
+
'%' => [
|
1179 |
+
'min' => 25,
|
1180 |
+
'max' => 100,
|
1181 |
+
'step' => 1,
|
1182 |
+
],
|
1183 |
+
],
|
1184 |
+
'size_units' => [ 'px' ],
|
1185 |
+
'selectors' => [
|
1186 |
'{{WRAPPER}} .pp-info-box-icon img' => 'width: {{SIZE}}{{UNIT}}',
|
1187 |
+
],
|
1188 |
+
]
|
1189 |
);
|
1190 |
|
1191 |
$this->add_control(
|
1192 |
'icon_text_heading',
|
1193 |
+
[
|
1194 |
+
'label' => __( 'Icon Text', 'powerpack' ),
|
1195 |
+
'type' => Controls_Manager::HEADING,
|
1196 |
+
'separator' => 'before',
|
1197 |
+
]
|
1198 |
);
|
1199 |
|
1200 |
$this->add_group_control(
|
1201 |
Group_Control_Typography::get_type(),
|
1202 |
+
[
|
1203 |
+
'name' => 'icon_typography',
|
1204 |
+
'label' => __( 'Typography', 'powerpack' ),
|
1205 |
+
'scheme' => Scheme_Typography::TYPOGRAPHY_4,
|
1206 |
+
'selector' => '{{WRAPPER}} .pp-info-box-icon',
|
1207 |
+
]
|
1208 |
);
|
1209 |
|
1210 |
$this->end_controls_section();
|
1211 |
+
}
|
1212 |
|
1213 |
+
protected function register_style_title_controls() {
|
1214 |
/**
|
1215 |
* Style Tab: Title
|
1216 |
* -------------------------------------------------
|
1217 |
*/
|
1218 |
$this->start_controls_section(
|
1219 |
'section_info_box_title_style',
|
1220 |
+
[
|
1221 |
+
'label' => __( 'Title', 'powerpack' ),
|
1222 |
+
'tab' => Controls_Manager::TAB_STYLE,
|
1223 |
+
]
|
1224 |
);
|
1225 |
|
1226 |
$this->add_control(
|
1227 |
'title_color',
|
1228 |
+
[
|
1229 |
+
'label' => __( 'Color', 'powerpack' ),
|
1230 |
+
'type' => Controls_Manager::COLOR,
|
1231 |
+
'default' => '',
|
1232 |
+
'selectors' => [
|
1233 |
'{{WRAPPER}} .pp-info-box-title' => 'color: {{VALUE}}',
|
1234 |
+
],
|
1235 |
+
]
|
1236 |
);
|
1237 |
|
1238 |
$this->add_group_control(
|
1239 |
Group_Control_Typography::get_type(),
|
1240 |
+
[
|
1241 |
+
'name' => 'title_typography',
|
1242 |
+
'label' => __( 'Typography', 'powerpack' ),
|
1243 |
+
'scheme' => Scheme_Typography::TYPOGRAPHY_4,
|
1244 |
+
'selector' => '{{WRAPPER}} .pp-info-box-title',
|
1245 |
+
]
|
1246 |
);
|
1247 |
|
1248 |
$this->add_responsive_control(
|
1249 |
'title_margin',
|
1250 |
+
[
|
1251 |
+
'label' => __( 'Margin Bottom', 'powerpack' ),
|
1252 |
+
'type' => Controls_Manager::SLIDER,
|
1253 |
+
'default' => [
|
1254 |
+
'size' => 20,
|
1255 |
+
],
|
1256 |
+
'range' => [
|
1257 |
+
'px' => [
|
1258 |
+
'min' => 0,
|
1259 |
+
'max' => 100,
|
1260 |
+
'step' => 1,
|
1261 |
+
],
|
1262 |
+
'%' => [
|
1263 |
+
'min' => 0,
|
1264 |
+
'max' => 30,
|
1265 |
+
'step' => 1,
|
1266 |
+
],
|
1267 |
+
],
|
1268 |
+
'size_units' => [ 'px', '%' ],
|
1269 |
+
'selectors' => [
|
1270 |
'{{WRAPPER}} .pp-info-box-title' => 'margin-bottom: {{SIZE}}{{UNIT}}',
|
1271 |
+
],
|
1272 |
+
]
|
1273 |
);
|
1274 |
|
1275 |
$this->add_control(
|
1276 |
'subtitle_heading',
|
1277 |
+
[
|
1278 |
+
'label' => __( 'Sub Title', 'powerpack' ),
|
1279 |
+
'type' => Controls_Manager::HEADING,
|
1280 |
+
'separator' => 'before',
|
1281 |
+
]
|
1282 |
);
|
1283 |
|
1284 |
$this->add_control(
|
1285 |
'subtitle_color',
|
1286 |
+
[
|
1287 |
+
'label' => __( 'Color', 'powerpack' ),
|
1288 |
+
'type' => Controls_Manager::COLOR,
|
1289 |
+
'default' => '',
|
1290 |
+
'selectors' => [
|
1291 |
'{{WRAPPER}} .pp-info-box-subtitle' => 'color: {{VALUE}}',
|
1292 |
+
],
|
1293 |
+
]
|
1294 |
);
|
1295 |
|
1296 |
$this->add_group_control(
|
1297 |
Group_Control_Typography::get_type(),
|
1298 |
+
[
|
1299 |
+
'name' => 'subtitle_typography',
|
1300 |
+
'label' => __( 'Typography', 'powerpack' ),
|
1301 |
+
'scheme' => Scheme_Typography::TYPOGRAPHY_4,
|
1302 |
+
'selector' => '{{WRAPPER}} .pp-info-box-subtitle',
|
1303 |
+
]
|
1304 |
);
|
1305 |
|
1306 |
$this->add_responsive_control(
|
1307 |
'subtitle_margin',
|
1308 |
+
[
|
1309 |
+
'label' => __( 'Margin Bottom', 'powerpack' ),
|
1310 |
+
'type' => Controls_Manager::SLIDER,
|
1311 |
+
'default' => [
|
1312 |
+
'size' => 20,
|
1313 |
+
],
|
1314 |
+
'range' => [
|
1315 |
+
'px' => [
|
1316 |
+
'min' => 0,
|
1317 |
+
'max' => 100,
|
1318 |
+
'step' => 1,
|
1319 |
+
],
|
1320 |
+
'%' => [
|
1321 |
+
'min' => 0,
|
1322 |
+
'max' => 30,
|
1323 |
+
'step' => 1,
|
1324 |
+
],
|
1325 |
+
],
|
1326 |
+
'size_units' => [ 'px', '%' ],
|
1327 |
+
'selectors' => [
|
1328 |
'{{WRAPPER}} .pp-info-box-subtitle' => 'margin-bottom: {{SIZE}}{{UNIT}}',
|
1329 |
+
],
|
1330 |
+
]
|
1331 |
);
|
1332 |
|
1333 |
$this->end_controls_section();
|
1334 |
+
}
|
1335 |
|
1336 |
+
protected function register_style_title_divider_controls() {
|
1337 |
/**
|
1338 |
* Style Tab: Title Separator
|
1339 |
* -------------------------------------------------
|
1340 |
*/
|
1341 |
$this->start_controls_section(
|
1342 |
'section_title_divider_style',
|
1343 |
+
[
|
1344 |
+
'label' => __( 'Title Separator', 'powerpack' ),
|
1345 |
+
'tab' => Controls_Manager::TAB_STYLE,
|
1346 |
+
'condition' => [
|
1347 |
'divider_title_switch' => 'yes',
|
1348 |
+
],
|
1349 |
+
]
|
1350 |
);
|
1351 |
|
1352 |
$this->add_control(
|
1353 |
'divider_title_border_type',
|
1354 |
+
[
|
1355 |
+
'label' => __( 'Border Type', 'powerpack' ),
|
1356 |
+
'type' => Controls_Manager::SELECT,
|
1357 |
+
'default' => 'solid',
|
1358 |
+
'options' => [
|
1359 |
+
'none' => __( 'None', 'powerpack' ),
|
1360 |
+
'solid' => __( 'Solid', 'powerpack' ),
|
1361 |
+
'double' => __( 'Double', 'powerpack' ),
|
1362 |
+
'dotted' => __( 'Dotted', 'powerpack' ),
|
1363 |
+
'dashed' => __( 'Dashed', 'powerpack' ),
|
1364 |
+
],
|
1365 |
+
'selectors' => [
|
1366 |
'{{WRAPPER}} .pp-info-box-divider' => 'border-bottom-style: {{VALUE}}',
|
1367 |
+
],
|
1368 |
+
'condition' => [
|
1369 |
'divider_title_switch' => 'yes',
|
1370 |
+
],
|
1371 |
+
]
|
1372 |
);
|
1373 |
|
1374 |
$this->add_responsive_control(
|
1375 |
'divider_title_width',
|
1376 |
+
[
|
1377 |
+
'label' => __( 'Border Width', 'powerpack' ),
|
1378 |
+
'type' => Controls_Manager::SLIDER,
|
1379 |
+
'default' => [
|
1380 |
+
'size' => 30,
|
1381 |
+
],
|
1382 |
+
'range' => [
|
1383 |
+
'px' => [
|
1384 |
+
'min' => 1,
|
1385 |
+
'max' => 1000,
|
1386 |
+
'step' => 1,
|
1387 |
+
],
|
1388 |
+
'%' => [
|
1389 |
+
'min' => 1,
|
1390 |
+
'max' => 100,
|
1391 |
+
'step' => 1,
|
1392 |
+
],
|
1393 |
+
],
|
1394 |
+
'size_units' => [ 'px', '%' ],
|
1395 |
+
'selectors' => [
|
1396 |
'{{WRAPPER}} .pp-info-box-divider' => 'width: {{SIZE}}{{UNIT}}',
|
1397 |
+
],
|
1398 |
+
'condition' => [
|
1399 |
'divider_title_switch' => 'yes',
|
1400 |
+
],
|
1401 |
+
]
|
1402 |
);
|
1403 |
|
1404 |
$this->add_responsive_control(
|
1405 |
'divider_title_border_height',
|
1406 |
+
[
|
1407 |
+
'label' => __( 'Border Height', 'powerpack' ),
|
1408 |
+
'type' => Controls_Manager::SLIDER,
|
1409 |
+
'default' => [
|
1410 |
+
'size' => 2,
|
1411 |
+
],
|
1412 |
+
'range' => [
|
1413 |
+
'px' => [
|
1414 |
+
'min' => 1,
|
1415 |
+
'max' => 20,
|
1416 |
+
'step' => 1,
|
1417 |
+
],
|
1418 |
+
],
|
1419 |
+
'size_units' => [ 'px' ],
|
1420 |
+
'selectors' => [
|
1421 |
'{{WRAPPER}} .pp-info-box-divider' => 'border-bottom-width: {{SIZE}}{{UNIT}}',
|
1422 |
+
],
|
1423 |
+
'condition' => [
|
1424 |
'divider_title_switch' => 'yes',
|
1425 |
+
],
|
1426 |
+
]
|
1427 |
);
|
1428 |
|
1429 |
$this->add_control(
|
1430 |
'divider_title_border_color',
|
1431 |
+
[
|
1432 |
+
'label' => __( 'Border Color', 'powerpack' ),
|
1433 |
+
'type' => Controls_Manager::COLOR,
|
1434 |
+
'default' => '',
|
1435 |
+
'selectors' => [
|
1436 |
'{{WRAPPER}} .pp-info-box-divider' => 'border-bottom-color: {{VALUE}}',
|
1437 |
+
],
|
1438 |
+
'condition' => [
|
1439 |
'divider_title_switch' => 'yes',
|
1440 |
+
],
|
1441 |
+
]
|
1442 |
);
|
1443 |
|
1444 |
$this->add_responsive_control(
|
1445 |
'divider_title_align',
|
1446 |
+
[
|
1447 |
+
'label' => __( 'Alignment', 'powerpack' ),
|
1448 |
+
'type' => Controls_Manager::CHOOSE,
|
1449 |
+
'options' => [
|
1450 |
+
'left' => [
|
1451 |
'title' => __( 'Left', 'powerpack' ),
|
1452 |
'icon' => 'fa fa-align-left',
|
1453 |
+
],
|
1454 |
+
'center' => [
|
1455 |
'title' => __( 'Center', 'powerpack' ),
|
1456 |
'icon' => 'fa fa-align-center',
|
1457 |
+
],
|
1458 |
+
'right' => [
|
1459 |
'title' => __( 'Right', 'powerpack' ),
|
1460 |
'icon' => 'fa fa-align-right',
|
1461 |
+
],
|
1462 |
+
],
|
1463 |
+
'default' => '',
|
1464 |
+
'selectors' => [
|
1465 |
'{{WRAPPER}} .pp-info-box-divider-wrap' => 'text-align: {{VALUE}};',
|
1466 |
+
],
|
1467 |
+
'condition' => [
|
1468 |
'divider_title_switch' => 'yes',
|
1469 |
+
],
|
1470 |
+
]
|
1471 |
);
|
1472 |
|
1473 |
$this->add_responsive_control(
|
1474 |
'divider_title_margin',
|
1475 |
+
[
|
1476 |
+
'label' => __( 'Margin Bottom', 'powerpack' ),
|
1477 |
+
'type' => Controls_Manager::SLIDER,
|
1478 |
+
'default' => [
|
1479 |
+
'size' => 20,
|
1480 |
+
],
|
1481 |
+
'range' => [
|
1482 |
+
'px' => [
|
1483 |
+
'min' => 0,
|
1484 |
+
'max' => 100,
|
1485 |
+
'step' => 1,
|
1486 |
+
],
|
1487 |
+
'%' => [
|
1488 |
+
'min' => 0,
|
1489 |
+
'max' => 30,
|
1490 |
+
'step' => 1,
|
1491 |
+
],
|
1492 |
+
],
|
1493 |
+
'size_units' => [ 'px', '%' ],
|
1494 |
+
'selectors' => [
|
1495 |
'{{WRAPPER}} .pp-info-box-divider-wrap' => 'margin-bottom: {{SIZE}}{{UNIT}}',
|
1496 |
+
],
|
1497 |
+
'condition' => [
|
1498 |
'divider_title_switch' => 'yes',
|
1499 |
+
],
|
1500 |
+
]
|
1501 |
);
|
1502 |
|
1503 |
$this->end_controls_section();
|
1504 |
+
}
|
1505 |
|
1506 |
+
protected function register_style_description_controls() {
|
1507 |
/**
|
1508 |
* Style Tab: Description
|
1509 |
* -------------------------------------------------
|
1510 |
*/
|
1511 |
$this->start_controls_section(
|
1512 |
'section_info_description_style',
|
1513 |
+
[
|
1514 |
+
'label' => __( 'Description', 'powerpack' ),
|
1515 |
+
'tab' => Controls_Manager::TAB_STYLE,
|
1516 |
+
]
|
1517 |
);
|
1518 |
|
1519 |
$this->add_control(
|
1520 |
'description_color',
|
1521 |
+
[
|
1522 |
+
'label' => __( 'Color', 'powerpack' ),
|
1523 |
+
'type' => Controls_Manager::COLOR,
|
1524 |
+
'default' => '',
|
1525 |
+
'selectors' => [
|
1526 |
'{{WRAPPER}} .pp-info-box-description' => 'color: {{VALUE}}',
|
1527 |
+
],
|
1528 |
+
]
|
1529 |
);
|
1530 |
|
1531 |
$this->add_group_control(
|
1532 |
Group_Control_Typography::get_type(),
|
1533 |
+
[
|
1534 |
+
'name' => 'description_typography',
|
1535 |
+
'label' => __( 'Typography', 'powerpack' ),
|
1536 |
+
'scheme' => Scheme_Typography::TYPOGRAPHY_4,
|
1537 |
+
'selector' => '{{WRAPPER}} .pp-info-box-description',
|
1538 |
+
]
|
1539 |
);
|
1540 |
|
1541 |
$this->add_responsive_control(
|
1542 |
'description_padding',
|
1543 |
+
[
|
1544 |
+
'label' => __( 'Padding', 'powerpack' ),
|
1545 |
+
'type' => Controls_Manager::DIMENSIONS,
|
1546 |
+
'size_units' => [ 'px', '%' ],
|
1547 |
+
'selectors' => [
|
1548 |
'{{WRAPPER}} .pp-info-box-description' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
1549 |
+
],
|
1550 |
+
]
|
1551 |
);
|
1552 |
|
1553 |
$this->add_responsive_control(
|
1554 |
'description_margin',
|
1555 |
+
[
|
1556 |
+
'label' => __( 'Margin Bottom', 'powerpack' ),
|
1557 |
+
'type' => Controls_Manager::SLIDER,
|
1558 |
+
'default' => [
|
1559 |
+
'size' => 20,
|
1560 |
+
],
|
1561 |
+
'range' => [
|
1562 |
+
'px' => [
|
1563 |
+
'min' => 0,
|
1564 |
+
'max' => 100,
|
1565 |
+
'step' => 1,
|
1566 |
+
],
|
1567 |
+
'%' => [
|
1568 |
+
'min' => 0,
|
1569 |
+
'max' => 30,
|
1570 |
+
'step' => 1,
|
1571 |
+
],
|
1572 |
+
],
|
1573 |
+
'size_units' => [ 'px', '%' ],
|
1574 |
+
'selectors' => [
|
1575 |
'{{WRAPPER}} .pp-info-box-description' => 'margin-bottom: {{SIZE}}{{UNIT}}',
|
1576 |
+
],
|
1577 |
+
]
|
1578 |
);
|
1579 |
|
1580 |
$this->end_controls_section();
|
1581 |
+
}
|
1582 |
|
1583 |
+
protected function register_style_button_controls() {
|
1584 |
/**
|
1585 |
* Style Tab: Button
|
1586 |
* -------------------------------------------------
|
1587 |
*/
|
1588 |
$this->start_controls_section(
|
1589 |
'section_info_box_button_style',
|
1590 |
+
[
|
1591 |
+
'label' => __( 'Button', 'powerpack' ),
|
1592 |
+
'tab' => Controls_Manager::TAB_STYLE,
|
1593 |
+
]
|
1594 |
);
|
1595 |
|
1596 |
$this->add_control(
|
1597 |
'button_size',
|
1598 |
+
[
|
1599 |
+
'label' => __( 'Size', 'powerpack' ),
|
1600 |
+
'type' => Controls_Manager::SELECT,
|
1601 |
+
'default' => 'md',
|
1602 |
+
'options' => [
|
1603 |
'xs' => __( 'Extra Small', 'powerpack' ),
|
1604 |
'sm' => __( 'Small', 'powerpack' ),
|
1605 |
'md' => __( 'Medium', 'powerpack' ),
|
1606 |
'lg' => __( 'Large', 'powerpack' ),
|
1607 |
'xl' => __( 'Extra Large', 'powerpack' ),
|
1608 |
+
],
|
1609 |
+
]
|
1610 |
);
|
1611 |
|
1612 |
$this->start_controls_tabs( 'tabs_button_style' );
|
1613 |
|
1614 |
$this->start_controls_tab(
|
1615 |
'tab_button_normal',
|
1616 |
+
[
|
1617 |
+
'label' => __( 'Normal', 'powerpack' ),
|
1618 |
+
]
|
1619 |
);
|
1620 |
|
1621 |
$this->add_control(
|
1622 |
'button_text_color_normal',
|
1623 |
+
[
|
1624 |
+
'label' => __( 'Text Color', 'powerpack' ),
|
1625 |
+
'type' => Controls_Manager::COLOR,
|
1626 |
+
'default' => '',
|
1627 |
+
'selectors' => [
|
1628 |
'{{WRAPPER}} .pp-info-box-button' => 'color: {{VALUE}}',
|
1629 |
'{{WRAPPER}} .pp-info-box-button .pp-icon' => 'fill: {{VALUE}}',
|
1630 |
+
],
|
1631 |
+
]
|
1632 |
);
|
1633 |
|
1634 |
$this->add_control(
|
1635 |
'button_bg_color_normal',
|
1636 |
+
[
|
1637 |
+
'label' => __( 'Background Color', 'powerpack' ),
|
1638 |
+
'type' => Controls_Manager::COLOR,
|
1639 |
+
'default' => '',
|
1640 |
+
'selectors' => [
|
1641 |
'{{WRAPPER}} .pp-info-box-button' => 'background-color: {{VALUE}}',
|
1642 |
+
],
|
1643 |
+
]
|
1644 |
);
|
1645 |
|
1646 |
$this->add_group_control(
|
1647 |
Group_Control_Border::get_type(),
|
1648 |
+
[
|
1649 |
+
'name' => 'button_border_normal',
|
1650 |
+
'label' => __( 'Border', 'powerpack' ),
|
1651 |
+
'placeholder' => '1px',
|
1652 |
+
'default' => '1px',
|
1653 |
+
'selector' => '{{WRAPPER}} .pp-info-box-button',
|
1654 |
+
]
|
1655 |
);
|
1656 |
|
1657 |
$this->add_control(
|
1658 |
'button_border_radius',
|
1659 |
+
[
|
1660 |
+
'label' => __( 'Border Radius', 'powerpack' ),
|
1661 |
+
'type' => Controls_Manager::DIMENSIONS,
|
1662 |
+
'size_units' => [ 'px', '%' ],
|
1663 |
+
'selectors' => [
|
1664 |
'{{WRAPPER}} .pp-info-box-button' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
1665 |
+
],
|
1666 |
+
]
|
1667 |
);
|
1668 |
|
1669 |
$this->add_group_control(
|
1670 |
Group_Control_Typography::get_type(),
|
1671 |
+
[
|
1672 |
+
'name' => 'button_typography',
|
1673 |
+
'label' => __( 'Typography', 'powerpack' ),
|
1674 |
+
'scheme' => Scheme_Typography::TYPOGRAPHY_4,
|
1675 |
+
'selector' => '{{WRAPPER}} .pp-info-box-button',
|
1676 |
+
]
|
1677 |
);
|
1678 |
|
1679 |
$this->add_responsive_control(
|
1680 |
'button_padding',
|
1681 |
+
[
|
1682 |
+
'label' => __( 'Padding', 'powerpack' ),
|
1683 |
+
'type' => Controls_Manager::DIMENSIONS,
|
1684 |
+
'size_units' => [ 'px', 'em', '%' ],
|
1685 |
+
'selectors' => [
|
1686 |
'{{WRAPPER}} .pp-info-box-button' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
1687 |
+
],
|
1688 |
+
]
|
1689 |
);
|
1690 |
|
1691 |
$this->add_group_control(
|
1692 |
Group_Control_Box_Shadow::get_type(),
|
1693 |
+
[
|
1694 |
+
'name' => 'button_box_shadow',
|
1695 |
+
'selector' => '{{WRAPPER}} .pp-info-box-button',
|
1696 |
+
]
|
1697 |
);
|
1698 |
|
1699 |
$this->add_control(
|
1700 |
'info_box_button_icon_heading',
|
1701 |
+
[
|
1702 |
+
'label' => __( 'Button Icon', 'powerpack' ),
|
1703 |
+
'type' => Controls_Manager::HEADING,
|
1704 |
+
'separator' => 'before',
|
1705 |
+
'condition' => [
|
1706 |
+
'button_icon!' => '',
|
1707 |
+
],
|
1708 |
+
]
|
1709 |
);
|
1710 |
|
1711 |
$this->add_responsive_control(
|
1712 |
'button_icon_margin',
|
1713 |
+
[
|
1714 |
+
'label' => __( 'Margin', 'powerpack' ),
|
1715 |
+
'type' => Controls_Manager::DIMENSIONS,
|
1716 |
+
'size_units' => [ 'px', '%' ],
|
1717 |
+
'placeholder' => [
|
1718 |
+
'top' => '',
|
1719 |
+
'right' => '',
|
1720 |
+
'bottom' => '',
|
1721 |
+
'left' => '',
|
1722 |
+
],
|
1723 |
+
'condition' => [
|
1724 |
+
'button_icon!' => '',
|
1725 |
+
],
|
1726 |
+
'selectors' => [
|
1727 |
'{{WRAPPER}} .pp-info-box .pp-button-icon' => 'margin-top: {{TOP}}{{UNIT}}; margin-left: {{LEFT}}{{UNIT}}; margin-right: {{RIGHT}}{{UNIT}}; margin-bottom: {{BOTTOM}}{{UNIT}};',
|
1728 |
+
],
|
1729 |
+
]
|
1730 |
);
|
1731 |
|
1732 |
$this->end_controls_tab();
|
1733 |
|
1734 |
$this->start_controls_tab(
|
1735 |
'tab_button_hover',
|
1736 |
+
[
|
1737 |
+
'label' => __( 'Hover', 'powerpack' ),
|
1738 |
+
]
|
1739 |
);
|
1740 |
|
1741 |
$this->add_control(
|
1742 |
'button_text_color_hover',
|
1743 |
+
[
|
1744 |
+
'label' => __( 'Text Color', 'powerpack' ),
|
1745 |
+
'type' => Controls_Manager::COLOR,
|
1746 |
+
'default' => '',
|
1747 |
+
'selectors' => [
|
1748 |
'{{WRAPPER}} .pp-info-box-button:hover' => 'color: {{VALUE}}',
|
1749 |
'{{WRAPPER}} .pp-info-box-button:hover .pp-icon' => 'fill: {{VALUE}}',
|
1750 |
+
],
|
1751 |
+
]
|
1752 |
);
|
1753 |
|
1754 |
$this->add_control(
|
1755 |
'button_bg_color_hover',
|
1756 |
+
[
|
1757 |
+
'label' => __( 'Background Color', 'powerpack' ),
|
1758 |
+
'type' => Controls_Manager::COLOR,
|
1759 |
+
'default' => '',
|
1760 |
+
'selectors' => [
|
1761 |
'{{WRAPPER}} .pp-info-box-button:hover' => 'background-color: {{VALUE}}',
|
1762 |
+
],
|
1763 |
+
]
|
1764 |
);
|
1765 |
|
1766 |
$this->add_control(
|
1767 |
'button_border_color_hover',
|
1768 |
+
[
|
1769 |
+
'label' => __( 'Border Color', 'powerpack' ),
|
1770 |
+
'type' => Controls_Manager::COLOR,
|
1771 |
+
'default' => '',
|
1772 |
+
'selectors' => [
|
1773 |
'{{WRAPPER}} .pp-info-box-button:hover' => 'border-color: {{VALUE}}',
|
1774 |
+
],
|
1775 |
+
]
|
1776 |
);
|
1777 |
|
1778 |
$this->add_control(
|
1779 |
'button_hover_animation',
|
1780 |
+
[
|
1781 |
+
'label' => __( 'Animation', 'powerpack' ),
|
1782 |
+
'type' => Controls_Manager::HOVER_ANIMATION,
|
1783 |
+
]
|
1784 |
);
|
1785 |
|
1786 |
$this->add_group_control(
|
1787 |
Group_Control_Box_Shadow::get_type(),
|
1788 |
+
[
|
1789 |
+
'name' => 'button_box_shadow_hover',
|
1790 |
+
'selector' => '{{WRAPPER}} .pp-info-box-button:hover',
|
1791 |
+
]
|
1792 |
);
|
1793 |
|
1794 |
$this->end_controls_tab();
|
1795 |
$this->end_controls_tabs();
|
1796 |
|
1797 |
$this->end_controls_section();
|
1798 |
+
}
|
1799 |
|
1800 |
+
protected function register_style_arrows_controls() {
|
1801 |
/**
|
1802 |
* Style Tab: Arrows
|
1803 |
* -------------------------------------------------
|
1804 |
*/
|
1805 |
$this->start_controls_section(
|
1806 |
'section_arrows_style',
|
1807 |
+
[
|
1808 |
+
'label' => __( 'Arrows', 'powerpack' ),
|
1809 |
+
'tab' => Controls_Manager::TAB_STYLE,
|
1810 |
+
'condition' => [
|
1811 |
+
'arrows' => 'yes',
|
1812 |
+
],
|
1813 |
+
]
|
1814 |
);
|
1815 |
|
1816 |
$this->add_control(
|
1817 |
+
'select_arrow',
|
1818 |
+
array(
|
1819 |
+
'label' => __( 'Choose Arrow', 'powerpack' ),
|
1820 |
+
'type' => Controls_Manager::ICONS,
|
1821 |
+
'fa4compatibility' => 'arrow',
|
1822 |
+
'label_block' => false,
|
1823 |
+
'default' => array(
|
1824 |
+
'value' => 'fas fa-angle-right',
|
1825 |
+
'library' => 'fa-solid',
|
1826 |
+
),
|
1827 |
+
'skin' => 'inline',
|
1828 |
+
'exclude_inline_options' => 'svg',
|
1829 |
+
'recommended' => array(
|
1830 |
+
'fa-regular' => array(
|
1831 |
+
'arrow-alt-circle-right',
|
1832 |
+
'caret-square-right',
|
1833 |
+
'hand-point-right',
|
1834 |
+
),
|
1835 |
+
'fa-solid' => array(
|
1836 |
+
'angle-right',
|
1837 |
+
'angle-double-right',
|
1838 |
+
'chevron-right',
|
1839 |
+
'chevron-circle-right',
|
1840 |
+
'arrow-right',
|
1841 |
+
'long-arrow-alt-right',
|
1842 |
+
'caret-right',
|
1843 |
+
'caret-square-right',
|
1844 |
+
'arrow-circle-right',
|
1845 |
+
'arrow-alt-circle-right',
|
1846 |
+
'toggle-right',
|
1847 |
+
'hand-point-right',
|
1848 |
+
),
|
1849 |
),
|
1850 |
)
|
1851 |
);
|
1852 |
|
1853 |
$this->add_responsive_control(
|
1854 |
'arrows_size',
|
1855 |
+
[
|
1856 |
+
'label' => __( 'Arrows Size', 'powerpack' ),
|
1857 |
+
'type' => Controls_Manager::SLIDER,
|
1858 |
+
'default' => [ 'size' => '22' ],
|
1859 |
+
'range' => [
|
1860 |
+
'px' => [
|
1861 |
+
'min' => 15,
|
1862 |
+
'max' => 100,
|
1863 |
+
'step' => 1,
|
1864 |
+
],
|
1865 |
+
],
|
1866 |
+
'size_units' => [ 'px' ],
|
1867 |
+
'selectors' => [
|
1868 |
'{{WRAPPER}} .swiper-container-wrap .swiper-button-next, {{WRAPPER}} .swiper-container-wrap .swiper-button-prev' => 'font-size: {{SIZE}}{{UNIT}};',
|
1869 |
+
],
|
1870 |
+
]
|
1871 |
);
|
1872 |
|
1873 |
$this->add_responsive_control(
|
1874 |
'left_arrow_position',
|
1875 |
+
[
|
1876 |
+
'label' => __( 'Align Left Arrow', 'powerpack' ),
|
1877 |
+
'type' => Controls_Manager::SLIDER,
|
1878 |
+
'range' => [
|
1879 |
+
'px' => [
|
1880 |
+
'min' => -100,
|
1881 |
+
'max' => 40,
|
1882 |
+
'step' => 1,
|
1883 |
+
],
|
1884 |
+
],
|
1885 |
+
'size_units' => [ 'px' ],
|
1886 |
+
'selectors' => [
|
1887 |
'{{WRAPPER}} .swiper-container-wrap .swiper-button-prev' => 'left: {{SIZE}}{{UNIT}};',
|
1888 |
+
],
|
1889 |
+
]
|
1890 |
);
|
1891 |
|
1892 |
$this->add_responsive_control(
|
1893 |
'right_arrow_position',
|
1894 |
+
[
|
1895 |
+
'label' => __( 'Align Right Arrow', 'powerpack' ),
|
1896 |
+
'type' => Controls_Manager::SLIDER,
|
1897 |
+
'range' => [
|
1898 |
+
'px' => [
|
1899 |
+
'min' => -100,
|
1900 |
+
'max' => 40,
|
1901 |
+
'step' => 1,
|
1902 |
+
],
|
1903 |
+
],
|
1904 |
+
'size_units' => [ 'px' ],
|
1905 |
+
'selectors' => [
|
1906 |
'{{WRAPPER}} .swiper-container-wrap .swiper-button-next' => 'right: {{SIZE}}{{UNIT}};',
|
1907 |
+
],
|
1908 |
+
]
|
1909 |
);
|
1910 |
|
1911 |
$this->start_controls_tabs( 'tabs_arrows_style' );
|
1912 |
|
1913 |
$this->start_controls_tab(
|
1914 |
'tab_arrows_normal',
|
1915 |
+
[
|
1916 |
+
'label' => __( 'Normal', 'powerpack' ),
|
1917 |
+
]
|
1918 |
);
|
1919 |
|
1920 |
$this->add_control(
|
1921 |
'arrows_bg_color_normal',
|
1922 |
+
[
|
1923 |
+
'label' => __( 'Background Color', 'powerpack' ),
|
1924 |
+
'type' => Controls_Manager::COLOR,
|
1925 |
+
'default' => '',
|
1926 |
+
'selectors' => [
|
1927 |
'{{WRAPPER}} .swiper-container-wrap .swiper-button-next, {{WRAPPER}} .swiper-container-wrap .swiper-button-prev' => 'background-color: {{VALUE}};',
|
1928 |
+
],
|
1929 |
+
]
|
1930 |
);
|
1931 |
|
1932 |
$this->add_control(
|
1933 |
'arrows_color_normal',
|
1934 |
+
[
|
1935 |
+
'label' => __( 'Color', 'powerpack' ),
|
1936 |
+
'type' => Controls_Manager::COLOR,
|
1937 |
+
'default' => '',
|
1938 |
+
'selectors' => [
|
1939 |
'{{WRAPPER}} .swiper-container-wrap .swiper-button-next, {{WRAPPER}} .swiper-container-wrap .swiper-button-prev' => 'color: {{VALUE}};',
|
1940 |
+
],
|
1941 |
+
]
|
1942 |
);
|
1943 |
|
1944 |
$this->add_group_control(
|
1945 |
Group_Control_Border::get_type(),
|
1946 |
+
[
|
1947 |
+
'name' => 'arrows_border_normal',
|
1948 |
+
'label' => __( 'Border', 'powerpack' ),
|
1949 |
+
'placeholder' => '1px',
|
1950 |
+
'default' => '1px',
|
1951 |
+
'selector' => '{{WRAPPER}} .swiper-container-wrap .swiper-button-next, {{WRAPPER}} .swiper-container-wrap .swiper-button-prev',
|
1952 |
+
]
|
1953 |
);
|
1954 |
|
1955 |
$this->add_control(
|
1956 |
'arrows_border_radius_normal',
|
1957 |
+
[
|
1958 |
+
'label' => __( 'Border Radius', 'powerpack' ),
|
1959 |
+
'type' => Controls_Manager::DIMENSIONS,
|
1960 |
+
'size_units' => [ 'px', '%' ],
|
1961 |
+
'selectors' => [
|
1962 |
'{{WRAPPER}} .swiper-container-wrap .swiper-button-next, {{WRAPPER}} .swiper-container-wrap .swiper-button-prev' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
1963 |
+
],
|
1964 |
+
]
|
1965 |
);
|
1966 |
|
1967 |
$this->end_controls_tab();
|
1968 |
|
1969 |
$this->start_controls_tab(
|
1970 |
+
'tab_arrows_hover',
|
1971 |
+
[
|
1972 |
+
'label' => __( 'Hover', 'powerpack' ),
|
1973 |
+
]
|
1974 |
);
|
1975 |
|
1976 |
$this->add_control(
|
1977 |
'arrows_bg_color_hover',
|
1978 |
+
[
|
1979 |
+
'label' => __( 'Background Color', 'powerpack' ),
|
1980 |
+
'type' => Controls_Manager::COLOR,
|
1981 |
+
'default' => '',
|
1982 |
+
'selectors' => [
|
1983 |
'{{WRAPPER}} .swiper-container-wrap .swiper-button-next:hover, {{WRAPPER}} .swiper-container-wrap .swiper-button-prev:hover' => 'background-color: {{VALUE}};',
|
1984 |
+
],
|
1985 |
+
]
|
1986 |
);
|
1987 |
|
1988 |
$this->add_control(
|
1989 |
'arrows_color_hover',
|
1990 |
+
[
|
1991 |
+
'label' => __( 'Color', 'powerpack' ),
|
1992 |
+
'type' => Controls_Manager::COLOR,
|
1993 |
+
'default' => '',
|
1994 |
+
'selectors' => [
|
1995 |
'{{WRAPPER}} .swiper-container-wrap .swiper-button-next:hover, {{WRAPPER}} .swiper-container-wrap .swiper-button-prev:hover' => 'color: {{VALUE}};',
|
1996 |
+
],
|
1997 |
+
]
|
1998 |
);
|
1999 |
|
2000 |
$this->add_control(
|
2001 |
'arrows_border_color_hover',
|
2002 |
+
[
|
2003 |
+
'label' => __( 'Border Color', 'powerpack' ),
|
2004 |
+
'type' => Controls_Manager::COLOR,
|
2005 |
+
'default' => '',
|
2006 |
+
'selectors' => [
|
2007 |
'{{WRAPPER}} .swiper-container-wrap .swiper-button-next:hover, {{WRAPPER}} .swiper-container-wrap .swiper-button-prev:hover' => 'border-color: {{VALUE}};',
|
2008 |
+
],
|
2009 |
+
]
|
2010 |
);
|
2011 |
|
2012 |
$this->end_controls_tab();
|
2015 |
|
2016 |
$this->add_responsive_control(
|
2017 |
'arrows_padding',
|
2018 |
+
[
|
2019 |
+
'label' => __( 'Padding', 'powerpack' ),
|
2020 |
+
'type' => Controls_Manager::DIMENSIONS,
|
2021 |
+
'size_units' => [ 'px', '%' ],
|
2022 |
+
'selectors' => [
|
2023 |
'{{WRAPPER}} .swiper-container-wrap .swiper-button-next, {{WRAPPER}} .swiper-container-wrap .swiper-button-prev' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
2024 |
+
],
|
2025 |
+
'separator' => 'before',
|
2026 |
+
]
|
2027 |
);
|
2028 |
|
2029 |
$this->end_controls_section();
|
2030 |
+
}
|
2031 |
|
2032 |
+
protected function register_style_dots_controls() {
|
2033 |
/**
|
2034 |
* Style Tab: Pagination: Dots
|
2035 |
* -------------------------------------------------
|
2036 |
*/
|
2037 |
$this->start_controls_section(
|
2038 |
'section_dots_style',
|
2039 |
+
[
|
2040 |
+
'label' => __( 'Pagination: Dots', 'powerpack' ),
|
2041 |
+
'tab' => Controls_Manager::TAB_STYLE,
|
2042 |
+
'condition' => [
|
2043 |
+
'dots' => 'yes',
|
2044 |
+
'pagination_type' => 'bullets',
|
2045 |
+
],
|
2046 |
+
]
|
2047 |
);
|
2048 |
|
2049 |
$this->add_control(
|
2050 |
'dots_position',
|
2051 |
+
[
|
2052 |
+
'label' => __( 'Position', 'powerpack' ),
|
2053 |
+
'type' => Controls_Manager::SELECT,
|
2054 |
+
'options' => [
|
2055 |
+
'inside' => __( 'Inside', 'powerpack' ),
|
2056 |
+
'outside' => __( 'Outside', 'powerpack' ),
|
2057 |
+
],
|
2058 |
+
'default' => 'outside',
|
2059 |
+
'condition' => [
|
2060 |
+
'dots' => 'yes',
|
2061 |
+
'pagination_type' => 'bullets',
|
2062 |
+
],
|
2063 |
+
]
|
2064 |
);
|
2065 |
|
2066 |
$this->add_responsive_control(
|
2067 |
'dots_size',
|
2068 |
+
[
|
2069 |
+
'label' => __( 'Size', 'powerpack' ),
|
2070 |
+
'type' => Controls_Manager::SLIDER,
|
2071 |
+
'range' => [
|
2072 |
+
'px' => [
|
2073 |
+
'min' => 2,
|
2074 |
+
'max' => 40,
|
2075 |
+
'step' => 1,
|
2076 |
+
],
|
2077 |
+
],
|
2078 |
+
'size_units' => '',
|
2079 |
+
'selectors' => [
|
2080 |
'{{WRAPPER}} .swiper-container-wrap .swiper-pagination-bullet' => 'height: {{SIZE}}{{UNIT}}; width: {{SIZE}}{{UNIT}}',
|
2081 |
+
],
|
2082 |
+
'condition' => [
|
2083 |
+
'dots' => 'yes',
|
2084 |
+
'pagination_type' => 'bullets',
|
2085 |
+
],
|
2086 |
+
]
|
2087 |
);
|
2088 |
|
2089 |
$this->add_responsive_control(
|
2090 |
'dots_spacing',
|
2091 |
+
[
|
2092 |
+
'label' => __( 'Spacing', 'powerpack' ),
|
2093 |
+
'type' => Controls_Manager::SLIDER,
|
2094 |
+
'range' => [
|
2095 |
+
'px' => [
|
2096 |
+
'min' => 1,
|
2097 |
+
'max' => 30,
|
2098 |
+
'step' => 1,
|
2099 |
+
],
|
2100 |
+
],
|
2101 |
+
'size_units' => '',
|
2102 |
+
'selectors' => [
|
2103 |
'{{WRAPPER}} .swiper-container-wrap .swiper-pagination-bullet' => 'margin-left: {{SIZE}}{{UNIT}}; margin-right: {{SIZE}}{{UNIT}}',
|
2104 |
+
],
|
2105 |
+
'condition' => [
|
2106 |
+
'dots' => 'yes',
|
2107 |
+
'pagination_type' => 'bullets',
|
2108 |
+
],
|
2109 |
+
]
|
2110 |
);
|
2111 |
|
2112 |
$this->start_controls_tabs( 'tabs_dots_style' );
|
2113 |
|
2114 |
$this->start_controls_tab(
|
2115 |
'tab_dots_normal',
|
2116 |
+
[
|
2117 |
+
'label' => __( 'Normal', 'powerpack' ),
|
2118 |
+
'condition' => [
|
2119 |
+
'dots' => 'yes',
|
2120 |
+
'pagination_type' => 'bullets',
|
2121 |
+
],
|
2122 |
+
]
|
2123 |
);
|
2124 |
|
2125 |
$this->add_control(
|
2126 |
'dots_color_normal',
|
2127 |
+
[
|
2128 |
+
'label' => __( 'Color', 'powerpack' ),
|
2129 |
+
'type' => Controls_Manager::COLOR,
|
2130 |
+
'default' => '',
|
2131 |
+
'selectors' => [
|
2132 |
'{{WRAPPER}} .swiper-container-wrap .swiper-pagination-bullet' => 'background: {{VALUE}};',
|
2133 |
+
],
|
2134 |
+
'condition' => [
|
2135 |
+
'dots' => 'yes',
|
2136 |
+
'pagination_type' => 'bullets',
|
2137 |
+
],
|
2138 |
+
]
|
2139 |
);
|
2140 |
|
2141 |
$this->add_control(
|
2142 |
'active_dot_color_normal',
|
2143 |
+
[
|
2144 |
+
'label' => __( 'Active Color', 'powerpack' ),
|
2145 |
+
'type' => Controls_Manager::COLOR,
|
2146 |
+
'default' => '',
|
2147 |
+
'selectors' => [
|
2148 |
'{{WRAPPER}} .swiper-container-wrap .swiper-pagination-bullet-active' => 'background: {{VALUE}};',
|
2149 |
+
],
|
2150 |
+
'condition' => [
|
2151 |
+
'dots' => 'yes',
|
2152 |
+
'pagination_type' => 'bullets',
|
2153 |
+
],
|
2154 |
+
]
|
2155 |
);
|
2156 |
|
2157 |
$this->add_group_control(
|
2158 |
Group_Control_Border::get_type(),
|
2159 |
+
[
|
2160 |
+
'name' => 'dots_border_normal',
|
2161 |
+
'label' => __( 'Border', 'powerpack' ),
|
2162 |
+
'placeholder' => '1px',
|
2163 |
+
'default' => '1px',
|
2164 |
+
'selector' => '{{WRAPPER}} .swiper-container-wrap .swiper-pagination-bullet',
|
2165 |
+
'condition' => [
|
2166 |
+
'dots' => 'yes',
|
2167 |
+
'pagination_type' => 'bullets',
|
2168 |
+
],
|
2169 |
+
]
|
2170 |
);
|
2171 |
|
2172 |
$this->add_control(
|
2173 |
'dots_border_radius_normal',
|
2174 |
+
[
|
2175 |
+
'label' => __( 'Border Radius', 'powerpack' ),
|
2176 |
+
'type' => Controls_Manager::DIMENSIONS,
|
2177 |
+
'size_units' => [ 'px', '%' ],
|
2178 |
+
'selectors' => [
|
2179 |
'{{WRAPPER}} .swiper-container-wrap .swiper-pagination-bullet' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
2180 |
+
],
|
2181 |
+
'condition' => [
|
2182 |
+
'dots' => 'yes',
|
2183 |
+
'pagination_type' => 'bullets',
|
2184 |
+
],
|
2185 |
+
]
|
2186 |
);
|
2187 |
|
2188 |
$this->add_responsive_control(
|
2189 |
'dots_margin',
|
2190 |
+
[
|
2191 |
+
'label' => __( 'Margin', 'powerpack' ),
|
2192 |
+
'type' => Controls_Manager::DIMENSIONS,
|
2193 |
+
'size_units' => [ 'px', 'em', '%' ],
|
2194 |
+
'allowed_dimensions' => 'vertical',
|
2195 |
+
'placeholder' => [
|
2196 |
+
'top' => '',
|
2197 |
+
'right' => 'auto',
|
2198 |
+
'bottom' => '',
|
2199 |
+
'left' => 'auto',
|
2200 |
+
],
|
2201 |
+
'selectors' => [
|
2202 |
'{{WRAPPER}} .swiper-container-wrap .swiper-pagination-bullets' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
2203 |
+
],
|
2204 |
+
'condition' => [
|
2205 |
+
'dots' => 'yes',
|
2206 |
+
'pagination_type' => 'bullets',
|
2207 |
+
],
|
2208 |
+
]
|
2209 |
);
|
2210 |
|
2211 |
$this->end_controls_tab();
|
2212 |
|
2213 |
$this->start_controls_tab(
|
2214 |
'tab_dots_hover',
|
2215 |
+
[
|
2216 |
+
'label' => __( 'Hover', 'powerpack' ),
|
2217 |
+
'condition' => [
|
2218 |
+
'dots' => 'yes',
|
2219 |
+
'pagination_type' => 'bullets',
|
2220 |
+
],
|
2221 |
+
]
|
2222 |
);
|
2223 |
|
2224 |
$this->add_control(
|
2225 |
'dots_color_hover',
|
2226 |
+
[
|
2227 |
+
'label' => __( 'Color', 'powerpack' ),
|
2228 |
+
'type' => Controls_Manager::COLOR,
|
2229 |
+
'default' => '',
|
2230 |
+
'selectors' => [
|
2231 |
'{{WRAPPER}} .swiper-container-wrap .swiper-pagination-bullet:hover' => 'background: {{VALUE}};',
|
2232 |
+
],
|
2233 |
+
'condition' => [
|
2234 |
+
'dots' => 'yes',
|
2235 |
+
'pagination_type' => 'bullets',
|
2236 |
+
],
|
2237 |
+
]
|
2238 |
);
|
2239 |
|
2240 |
$this->add_control(
|
2241 |
'dots_border_color_hover',
|
2242 |
+
[
|
2243 |
+
'label' => __( 'Border Color', 'powerpack' ),
|
2244 |
+
'type' => Controls_Manager::COLOR,
|
2245 |
+
'default' => '',
|
2246 |
+
'selectors' => [
|
2247 |
'{{WRAPPER}} .swiper-container-wrap .swiper-pagination-bullet:hover' => 'border-color: {{VALUE}};',
|
2248 |
+
],
|
2249 |
+
'condition' => [
|
2250 |
+
'dots' => 'yes',
|
2251 |
+
'pagination_type' => 'bullets',
|
2252 |
+
],
|
2253 |
+
]
|
2254 |
);
|
2255 |
|
2256 |
$this->end_controls_tab();
|
2258 |
$this->end_controls_tabs();
|
2259 |
|
2260 |
$this->end_controls_section();
|
2261 |
+
}
|
2262 |
|
2263 |
+
protected function register_style_fraction_controls() {
|
2264 |
/**
|
2265 |
+
* Style Tab: Pagination: Fraction
|
2266 |
* -------------------------------------------------
|
2267 |
*/
|
2268 |
$this->start_controls_section(
|
2269 |
'section_fraction_style',
|
2270 |
+
[
|
2271 |
+
'label' => __( 'Pagination: Fraction', 'powerpack' ),
|
2272 |
+
'tab' => Controls_Manager::TAB_STYLE,
|
2273 |
+
'condition' => [
|
2274 |
+
'dots' => 'yes',
|
2275 |
+
'pagination_type' => 'fraction',
|
2276 |
+
],
|
2277 |
+
]
|
2278 |
);
|
2279 |
|
2280 |
$this->add_control(
|
2281 |
'fraction_text_color',
|
2282 |
+
[
|
2283 |
+
'label' => __( 'Text Color', 'powerpack' ),
|
2284 |
+
'type' => Controls_Manager::COLOR,
|
2285 |
+
'default' => '',
|
2286 |
+
'selectors' => [
|
2287 |
'{{WRAPPER}} .swiper-pagination-fraction' => 'color: {{VALUE}};',
|
2288 |
+
],
|
2289 |
+
'condition' => [
|
2290 |
+
'dots' => 'yes',
|
2291 |
+
'pagination_type' => 'fraction',
|
2292 |
+
],
|
2293 |
+
]
|
2294 |
);
|
2295 |
|
2296 |
$this->add_group_control(
|
2297 |
Group_Control_Typography::get_type(),
|
2298 |
+
[
|
2299 |
+
'name' => 'fraction_typography',
|
2300 |
+
'label' => __( 'Typography', 'powerpack' ),
|
2301 |
+
'scheme' => Scheme_Typography::TYPOGRAPHY_4,
|
2302 |
+
'selector' => '{{WRAPPER}} .swiper-pagination-fraction',
|
2303 |
+
'condition' => [
|
2304 |
+
'dots' => 'yes',
|
2305 |
+
'pagination_type' => 'fraction',
|
2306 |
+
],
|
2307 |
+
]
|
2308 |
);
|
2309 |
|
2310 |
$this->end_controls_section();
|
2311 |
}
|
2312 |
|
2313 |
/**
|
2314 |
+
* Get swiper slider settings
|
2315 |
*
|
2316 |
* @access public
|
2317 |
+
* @since 2.1.4
|
2318 |
*/
|
2319 |
+
public function get_slider_settings() {
|
2320 |
+
$settings = $this->get_settings_for_display();
|
2321 |
+
$pagination = $settings['dots'];
|
2322 |
+
|
2323 |
+
$effect = ( $settings['carousel_effect'] ) ? $settings['carousel_effect'] : 'slide';
|
2324 |
+
|
2325 |
+
if ( 'slide' === $effect ) {
|
2326 |
+
$items = ( $settings['items']['size'] ) ? absint( $settings['items']['size'] ) : 3;
|
2327 |
+
$items_tablet = ( $settings['items_tablet']['size'] ) ? absint( $settings['items_tablet']['size'] ) : 3;
|
2328 |
+
$items_mobile = ( $settings['items_mobile']['size'] ) ? absint( $settings['items_mobile']['size'] ) : 3;
|
2329 |
+
$margin = ( $settings['margin']['size'] ) ? absint( $settings['margin']['size'] ) : 10;
|
2330 |
+
$margin_tablet = ( $settings['margin_tablet']['size'] ) ? absint( $settings['margin_tablet']['size'] ) : 10;
|
2331 |
+
$margin_mobile = ( $settings['margin_mobile']['size'] ) ? absint( $settings['margin_mobile']['size'] ) : 10;
|
2332 |
+
} else {
|
2333 |
+
$items = 1;
|
2334 |
+
$items_tablet = 1;
|
2335 |
+
$items_mobile = 1;
|
2336 |
+
$margin = 10;
|
2337 |
+
$margin_tablet = 10;
|
2338 |
+
$margin_mobile = 10;
|
2339 |
+
}
|
2340 |
|
2341 |
+
$slider_options = [
|
2342 |
'direction' => 'horizontal',
|
2343 |
+
'effect' => $effect,
|
2344 |
+
'speed' => ( $settings['slider_speed']['size'] ) ? $settings['slider_speed']['size'] : 400,
|
2345 |
+
'slidesPerView' => $items,
|
2346 |
+
'spaceBetween' => $margin,
|
2347 |
+
'grabCursor' => ( 'yes' === $settings['grab_cursor'] ),
|
2348 |
'autoHeight' => true,
|
2349 |
+
'loop' => ( 'yes' === $settings['infinite_loop'] ),
|
2350 |
+
];
|
2351 |
|
2352 |
+
$autoplay_speed = 999999;
|
2353 |
+
|
2354 |
+
if ( 'yes' === $settings['autoplay'] ) {
|
2355 |
+
if ( isset( $settings['autoplay_speed']['size'] ) ) {
|
2356 |
+
$autoplay_speed = $settings['autoplay_speed']['size'];
|
2357 |
+
} elseif ( $settings['autoplay_speed'] ) {
|
2358 |
+
$autoplay_speed = $settings['autoplay_speed'];
|
2359 |
+
}
|
2360 |
}
|
2361 |
|
2362 |
+
$slider_options['autoplay'] = [
|
2363 |
+
'delay' => $autoplay_speed,
|
2364 |
+
'disableOnInteraction' => ( 'yes' === $settings['pause_on_interaction'] ),
|
2365 |
+
];
|
2366 |
|
2367 |
+
if ( 'yes' === $pagination ) {
|
2368 |
+
$slider_options['pagination'] = [
|
2369 |
'el' => '.swiper-pagination-' . esc_attr( $this->get_id() ),
|
2370 |
'type' => $settings['pagination_type'],
|
2371 |
'clickable' => true,
|
2372 |
+
];
|
2373 |
}
|
2374 |
|
2375 |
+
if ( 'yes' === $settings['arrows'] ) {
|
2376 |
+
$slider_options['navigation'] = [
|
2377 |
'nextEl' => '.swiper-button-next-' . esc_attr( $this->get_id() ),
|
2378 |
'prevEl' => '.swiper-button-prev-' . esc_attr( $this->get_id() ),
|
2379 |
+
];
|
2380 |
}
|
2381 |
|
2382 |
$elementor_bp_lg = get_option( 'elementor_viewport_lg' );
|
2385 |
$bp_tablet = ! empty( $elementor_bp_md ) ? $elementor_bp_md : 768;
|
2386 |
$bp_mobile = 320;
|
2387 |
|
2388 |
+
$slider_options['breakpoints'] = [
|
2389 |
+
$bp_desktop => [
|
2390 |
+
'slidesPerView' => $items,
|
2391 |
+
'spaceBetween' => $margin,
|
2392 |
+
],
|
2393 |
+
$bp_tablet => [
|
2394 |
+
'slidesPerView' => $items_tablet,
|
2395 |
+
'spaceBetween' => $margin_tablet,
|
2396 |
+
],
|
2397 |
+
$bp_mobile => [
|
2398 |
+
'slidesPerView' => $items_mobile,
|
2399 |
+
'spaceBetween' => $margin_mobile,
|
2400 |
+
],
|
2401 |
+
];
|
2402 |
+
|
2403 |
+
return $slider_options;
|
|
|
|
|
|
|
|
|
|
|
2404 |
}
|
2405 |
|
2406 |
/**
|
2417 |
|
2418 |
if ( $settings['dots_position'] ) {
|
2419 |
$this->add_render_attribute( 'info-box-carousel-wrap', 'class', 'swiper-container-wrap-dots-' . $settings['dots_position'] );
|
2420 |
+
} elseif ( 'fraction' === $settings['pagination_type'] ) {
|
2421 |
$this->add_render_attribute( 'info-box-carousel-wrap', 'class', 'swiper-container-wrap-dots-outside' );
|
2422 |
}
|
2423 |
|
2424 |
+
if ( 'right' === $settings['direction'] || is_rtl() ) {
|
|
|
|
|
2425 |
$this->add_render_attribute( 'info-box-carousel', 'dir', 'rtl' );
|
2426 |
}
|
2427 |
|
2428 |
+
$slider_options = $this->get_slider_settings();
|
2429 |
+
|
2430 |
$this->add_render_attribute(
|
2431 |
'info-box-carousel',
|
2432 |
+
[
|
2433 |
+
'class' => [ 'pp-info-box', 'pp-info-box-carousel', 'swiper-container', 'swiper-container-' . esc_attr( $this->get_id() ) ],
|
2434 |
+
'data-pagination' => '.swiper-pagination-' . esc_attr( $this->get_id() ),
|
2435 |
+
'data-arrow-next' => '.swiper-button-next-' . esc_attr( $this->get_id() ),
|
2436 |
+
'data-arrow-prev' => '.swiper-button-prev-' . esc_attr( $this->get_id() ),
|
2437 |
+
'data-slider-settings' => wp_json_encode( $slider_options ),
|
2438 |
+
]
|
2439 |
);
|
2440 |
|
2441 |
$this->add_render_attribute( 'info-box-container', 'class', 'pp-info-box-container' );
|
2444 |
$pp_title_html_tag = 'div';
|
2445 |
$pp_button_html_tag = 'div';
|
2446 |
|
2447 |
+
$this->add_render_attribute( 'info-box-button', 'class', [
|
2448 |
+
'pp-info-box-button',
|
2449 |
+
'elementor-button',
|
2450 |
+
'elementor-size-' . $settings['button_size'],
|
2451 |
+
] );
|
|
|
|
|
|
|
|
|
2452 |
|
2453 |
if ( $settings['button_hover_animation'] ) {
|
2454 |
$this->add_render_attribute( 'info-box-button', 'class', 'elementor-animation-' . $settings['button_hover_animation'] );
|
2455 |
}
|
2456 |
|
2457 |
+
$this->add_render_attribute( 'icon', 'class', [ 'pp-info-box-icon', 'pp-icon' ] );
|
2458 |
|
2459 |
if ( $settings['icon_animation'] ) {
|
2460 |
$this->add_render_attribute( 'icon', 'class', 'elementor-animation-' . $settings['icon_animation'] );
|
2470 |
|
2471 |
$this->add_render_attribute( 'title-container' . $i, 'class', 'pp-info-box-title-container' );
|
2472 |
|
2473 |
+
if ( 'none' !== $item['link_type'] ) {
|
2474 |
if ( ! empty( $item['link']['url'] ) ) {
|
2475 |
|
2476 |
$this->add_link_attributes( 'link' . $i, $item['link'] );
|
2477 |
|
2478 |
+
if ( 'title' === $item['link_type'] ) {
|
2479 |
$pp_title_html_tag = 'a';
|
2480 |
$this->add_link_attributes( 'title-container' . $i, $item['link'] );
|
2481 |
+
} elseif ( 'button' === $item['link_type'] ) {
|
2482 |
$pp_button_html_tag = 'a';
|
2483 |
+
} elseif ( $item['link_type'] == 'box' ) {
|
2484 |
+
$pp_button_html_tag = 'div';
|
2485 |
+
}
|
2486 |
}
|
2487 |
}
|
2488 |
?>
|
2489 |
<div class="swiper-slide">
|
2490 |
<div class="pp-info-box-content-wrap">
|
2491 |
+
<?php if ( 'box' === $item['link_type'] ) { ?>
|
2492 |
<a <?php echo $this->get_render_attribute_string( 'link' . $i ); ?>>
|
2493 |
<?php } ?>
|
2494 |
+
<?php if ( 'none' !== $item['icon_type'] ) { ?>
|
2495 |
<div class="pp-info-box-icon-wrap">
|
2496 |
+
<?php if ( 'icon' === $item['link_type'] ) { ?>
|
2497 |
<a <?php echo $this->get_render_attribute_string( 'link' . $i ); ?>>
|
2498 |
<?php } ?>
|
2499 |
<?php $this->render_infobox_icon( $item ); ?>
|
2500 |
+
<?php if ( 'icon' === $item['link_type'] ) { ?>
|
2501 |
</a>
|
2502 |
<?php } ?>
|
2503 |
</div>
|
2521 |
?>
|
2522 |
</div>
|
2523 |
|
2524 |
+
<?php if ( 'yes' === $settings['divider_title_switch'] ) { ?>
|
2525 |
<div class="pp-info-box-divider-wrap">
|
2526 |
<div class="pp-info-box-divider"></div>
|
2527 |
</div>
|
2532 |
<?php echo $this->parse_text_editor( nl2br( $item['description'] ) ); ?>
|
2533 |
</div>
|
2534 |
<?php } ?>
|
2535 |
+
<?php if ( 'button' === $item['link_type'] || ( 'box' === $item['link_type'] && 'yes' === $item['button_visible'] ) ) { ?>
|
2536 |
<div class="pp-info-box-footer">
|
2537 |
<<?php echo $pp_button_html_tag . ' ' . $this->get_render_attribute_string( 'info-box-button' . $i ) . $this->get_render_attribute_string( 'link' . $i ); ?>>
|
2538 |
<div <?php echo $this->get_render_attribute_string( 'info-box-button' ); ?>>
|
2539 |
<?php
|
2540 |
+
if ( 'before' === $item['button_icon_position'] ) {
|
2541 |
$this->render_infobox_button_icon( $item );
|
2542 |
}
|
2543 |
?>
|
2547 |
</span>
|
2548 |
<?php } ?>
|
2549 |
<?php
|
2550 |
+
if ( 'after' === $item['button_icon_position'] ) {
|
2551 |
$this->render_infobox_button_icon( $item );
|
2552 |
}
|
2553 |
?>
|
2555 |
</<?php echo $pp_button_html_tag; ?>>
|
2556 |
</div>
|
2557 |
<?php } ?>
|
2558 |
+
<?php if ( 'box' === $item['link_type'] ) { ?>
|
2559 |
</a>
|
2560 |
<?php } ?>
|
2561 |
+
</div>
|
2562 |
</div>
|
2563 |
</div>
|
2564 |
+
<?php $i++;
|
2565 |
+
endforeach; ?>
|
|
|
|
|
2566 |
</div>
|
2567 |
</div>
|
2568 |
<?php
|
2584 |
protected function render_infobox_icon( $item ) {
|
2585 |
$settings = $this->get_settings_for_display();
|
2586 |
|
2587 |
+
$fallback_defaults = [
|
2588 |
'fa fa-check',
|
2589 |
'fa fa-times',
|
2590 |
'fa fa-dot-circle-o',
|
2591 |
+
];
|
2592 |
|
2593 |
$migration_allowed = Icons_Manager::is_migration_allowed();
|
2594 |
|
2598 |
}
|
2599 |
|
2600 |
$migrated = isset( $item['__fa4_migrated']['selected_icon'] );
|
2601 |
+
$is_new = ! isset( $item['icon'] ) && $migration_allowed;
|
2602 |
|
2603 |
if ( ! empty( $item['icon'] ) || ( ! empty( $item['selected_icon']['value'] ) && $is_new ) || ! empty( $item['image']['url'] ) ) {
|
2604 |
?>
|
2605 |
<span <?php echo $this->get_render_attribute_string( 'icon' ); ?>>
|
2606 |
+
<?php if ( 'icon' === $item['icon_type'] ) { ?>
|
2607 |
<?php
|
2608 |
if ( $is_new || $migrated ) {
|
2609 |
+
Icons_Manager::render_icon( $item['selected_icon'], [ 'aria-hidden' => 'true' ] );
|
2610 |
+
} else { ?>
|
|
|
2611 |
<i class="<?php echo esc_attr( $item['icon'] ); ?>" aria-hidden="true"></i>
|
2612 |
<?php } ?>
|
2613 |
+
<?php } elseif ( 'image' === $item['icon_type'] ) { ?>
|
2614 |
<?php
|
2615 |
if ( ! empty( $item['image']['url'] ) ) {
|
2616 |
$image_url = Group_Control_Image_Size::get_attachment_image_src( $item['image']['id'], 'thumbnail', $settings );
|
2622 |
}
|
2623 |
}
|
2624 |
?>
|
2625 |
+
<?php } elseif ( 'text' === $item['icon_type'] ) {
|
|
|
2626 |
echo $item['icon_text'];
|
2627 |
+
} ?>
|
|
|
2628 |
</span>
|
2629 |
<?php
|
2630 |
}
|
2648 |
}
|
2649 |
|
2650 |
$migrated = isset( $item['__fa4_migrated']['select_button_icon'] );
|
2651 |
+
$is_new = ! isset( $item['button_icon'] ) && $migration_allowed;
|
2652 |
|
2653 |
if ( ! empty( $item['button_icon'] ) || ( ! empty( $item['select_button_icon']['value'] ) && $is_new ) ) {
|
2654 |
?>
|
2655 |
<span class="pp-button-icon pp-icon">
|
2656 |
<?php
|
2657 |
if ( $is_new || $migrated ) {
|
2658 |
+
Icons_Manager::render_icon( $item['select_button_icon'], [ 'aria-hidden' => 'true' ] );
|
2659 |
+
} else { ?>
|
|
|
2660 |
<i class="<?php echo esc_attr( $item['button_icon'] ); ?>" aria-hidden="true"></i>
|
2661 |
<?php } ?>
|
2662 |
</span>
|
2674 |
protected function render_dots() {
|
2675 |
$settings = $this->get_settings_for_display();
|
2676 |
|
2677 |
+
if ( 'yes' === $settings['dots'] ) { ?>
|
|
|
2678 |
<!-- Add Pagination -->
|
2679 |
<div class="swiper-pagination swiper-pagination-<?php echo esc_attr( $this->get_id() ); ?>"></div>
|
2680 |
+
<?php }
|
|
|
2681 |
}
|
2682 |
|
2683 |
/**
|
2690 |
protected function render_arrows() {
|
2691 |
$settings = $this->get_settings_for_display();
|
2692 |
|
2693 |
+
$migration_allowed = Icons_Manager::is_migration_allowed();
|
2694 |
+
|
2695 |
+
if ( ! isset( $settings['arrow'] ) && ! Icons_Manager::is_migration_allowed() ) {
|
2696 |
+
// add old default.
|
2697 |
+
$settings['arrow'] = 'fa fa-angle-right';
|
2698 |
+
}
|
2699 |
+
|
2700 |
+
$has_icon = ! empty( $settings['arrow'] );
|
2701 |
+
|
2702 |
+
if ( ! $has_icon && ! empty( $settings['select_arrow']['value'] ) ) {
|
2703 |
+
$has_icon = true;
|
2704 |
+
}
|
2705 |
+
|
2706 |
+
$migrated = isset( $settings['__fa4_migrated']['select_arrow'] );
|
2707 |
+
$is_new = ! isset( $settings['arrow'] ) && $migration_allowed;
|
2708 |
+
|
2709 |
+
if ( 'yes' === $settings['arrows'] ) {
|
2710 |
?>
|
2711 |
<?php
|
2712 |
+
if ( $has_icon ) {
|
2713 |
+
if ( $is_new || $migrated ) {
|
2714 |
+
$next_arrow = str_replace( 'left', 'right', $settings['select_arrow']['value'] );
|
2715 |
+
$prev_arrow = str_replace( 'right', 'left', $settings['select_arrow']['value'] );
|
2716 |
+
} else {
|
2717 |
+
$next_arrow = $settings['arrow'];
|
2718 |
+
$prev_arrow = str_replace( 'right', 'left', $settings['arrow'] );
|
2719 |
+
}
|
2720 |
} else {
|
2721 |
+
$next_arrow = 'fa fa-angle-right';
|
2722 |
+
$prev_arrow = 'fa fa-angle-left';
|
2723 |
}
|
2724 |
?>
|
2725 |
+
|
2726 |
+
<?php if ( ! empty( $settings['arrow'] ) || ( ! empty( $settings['select_arrow']['value'] ) && $is_new ) ) { ?>
|
2727 |
+
<!-- Add Arrows -->
|
2728 |
+
<div class="swiper-button-prev swiper-button-prev-<?php echo esc_attr( $this->get_id() ); ?>">
|
2729 |
+
<i aria-hidden="true" class="<?php echo esc_attr( $prev_arrow ); ?>"></i>
|
2730 |
+
</div>
|
2731 |
+
<div class="swiper-button-next swiper-button-next-<?php echo esc_attr( $this->get_id() ); ?>">
|
2732 |
+
<i aria-hidden="true" class="<?php echo esc_attr( $next_arrow ); ?>"></i>
|
2733 |
+
</div>
|
2734 |
+
<?php } ?>
|
2735 |
<?php
|
2736 |
}
|
2737 |
}
|
2738 |
|
2739 |
+
protected function content_template() {
|
2740 |
$elementor_bp_tablet = get_option( 'elementor_viewport_lg' );
|
2741 |
$elementor_bp_mobile = get_option( 'elementor_viewport_md' );
|
2742 |
$elementor_bp_lg = get_option( 'elementor_viewport_lg' );
|
2746 |
$bp_mobile = 320;
|
2747 |
?>
|
2748 |
<#
|
2749 |
+
function get_slider_settings( settings ) {
|
2750 |
+
if ( settings.carousel_effect !== 'undefined' ) {
|
2751 |
+
var $effect = settings.carousel_effect;
|
2752 |
+
} else {
|
2753 |
+
var $effect = 'slide';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2754 |
}
|
|
|
|
|
|
|
|
|
|
|
2755 |
|
2756 |
+
if ( $effect == 'slide' ) {
|
2757 |
+
var $items = ( settings.items.size !== '' || settings.items.size !== undefined ) ? settings.items.size : 3,
|
2758 |
+
$items_tablet = ( settings.items_tablet.size !== '' || settings.items_tablet.size !== undefined ) ? settings.items_tablet.size : 2,
|
2759 |
+
$items_mobile = ( settings.items_mobile.size !== '' || settings.items_mobile.size !== undefined ) ? settings.items_mobile.size : 1,
|
2760 |
+
$margin = ( settings.margin.size !== '' || settings.margin.size !== undefined ) ? settings.margin.size : 10,
|
2761 |
+
$margin_tablet = ( settings.margin_tablet.size !== '' || settings.margin_tablet.size !== undefined ) ? settings.margin_tablet.size : 10,
|
2762 |
+
$margin_mobile = ( settings.margin_mobile.size !== '' || settings.margin_mobile.size !== undefined ) ? settings.margin_mobile.size : 10;
|
2763 |
+
} else {
|
2764 |
+
var $items = 1,
|
2765 |
+
$items_tablet = 1,
|
2766 |
+
$items_mobile = 1,
|
2767 |
+
$margin = 10,
|
2768 |
+
$margin_tablet = 10,
|
2769 |
+
$margin_mobile = 10;
|
2770 |
}
|
|
|
2771 |
|
2772 |
+
var $autoplay = ( settings.autoplay == 'yes' && settings.autoplay_speed.size != '' ) ? settings.autoplay_speed.size : 999999;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2773 |
|
2774 |
return {
|
2775 |
direction: "horizontal",
|
2776 |
+
speed: ( settings.slider_speed.size !== '' || settings.slider_speed.size !== undefined ) ? settings.slider_speed.size : 400,
|
2777 |
+
effect: $effect,
|
2778 |
slidesPerView: $items,
|
2779 |
spaceBetween: $margin,
|
2780 |
grabCursor: ( settings.grab_cursor === 'yes' ) ? true : false,
|
2782 |
loop: ( settings.infinite_loop === 'yes' ),
|
2783 |
autoplay: {
|
2784 |
delay: $autoplay,
|
2785 |
+
disableOnInteraction: ( settings.disableOnInteraction === 'yes' ),
|
2786 |
},
|
2787 |
pagination: {
|
2788 |
el: '.swiper-pagination',
|
2808 |
}
|
2809 |
}
|
2810 |
};
|
2811 |
+
};
|
2812 |
+
|
2813 |
+
function dots_template() {
|
2814 |
+
if ( settings.dots == 'yes' ) {
|
2815 |
+
#>
|
2816 |
+
<div class="swiper-pagination"></div>
|
2817 |
+
<#
|
2818 |
+
}
|
2819 |
+
}
|
2820 |
+
|
2821 |
+
function arrows_template() {
|
2822 |
+
var arrowIconHTML = elementor.helpers.renderIcon( view, settings.select_arrow, { 'aria-hidden': true }, 'i' , 'object' ),
|
2823 |
+
arrowMigrated = elementor.helpers.isIconMigrated( settings, 'select_arrow' );
|
2824 |
+
|
2825 |
+
if ( settings.arrows == 'yes' ) {
|
2826 |
+
if ( settings.arrow || settings.select_arrow.value ) {
|
2827 |
+
if ( arrowIconHTML && arrowIconHTML.rendered && ( ! settings.arrow || arrowMigrated ) ) {
|
2828 |
+
var pp_next_arrow = settings.select_arrow.value;
|
2829 |
+
var pp_prev_arrow = pp_next_arrow.replace('right', "left");
|
2830 |
+
} else if ( settings.arrow != '' ) {
|
2831 |
+
var pp_next_arrow = settings.arrow;
|
2832 |
+
var pp_prev_arrow = pp_next_arrow.replace('right', "left");
|
2833 |
+
}
|
2834 |
+
else {
|
2835 |
+
var pp_next_arrow = 'fa fa-angle-right';
|
2836 |
+
var pp_prev_arrow = 'fa fa-angle-left';
|
2837 |
+
}
|
2838 |
+
#>
|
2839 |
+
<div class="swiper-button-next">
|
2840 |
+
<i class="{{ pp_next_arrow }}"></i>
|
2841 |
+
</div>
|
2842 |
+
<div class="swiper-button-prev">
|
2843 |
+
<i class="{{ pp_prev_arrow }}"></i>
|
2844 |
+
</div>
|
2845 |
+
<#
|
2846 |
+
}
|
2847 |
+
}
|
2848 |
+
}
|
2849 |
+
|
2850 |
+
function button_icon_template( item, index ) {
|
2851 |
+
var buttonIconHTML = {},
|
2852 |
+
buttonMigrated = {};
|
2853 |
+
|
2854 |
+
if ( item.button_icon || item.select_button_icon.value ) { #>
|
2855 |
+
<span class="pp-button-icon pp-icon">
|
2856 |
+
<#
|
2857 |
+
buttonIconHTML[ index ] = elementor.helpers.renderIcon( view, item.select_button_icon, { 'aria-hidden': true }, 'i', 'object' );
|
2858 |
+
buttonMigrated[ index ] = elementor.helpers.isIconMigrated( item, 'select_button_icon' );
|
2859 |
+
if ( buttonIconHTML[ index ] && buttonIconHTML[ index ].rendered && ( ! item.button_icon || buttonMigrated[ index ] ) ) { #>
|
2860 |
+
{{{ buttonIconHTML[ index ].value }}}
|
2861 |
+
<# } else { #>
|
2862 |
+
<i class="{{ item.button_icon }}" aria-hidden="true"></i>
|
2863 |
+
<# } #>
|
2864 |
+
</span>
|
2865 |
+
<#
|
2866 |
+
}
|
2867 |
+
}
|
2868 |
|
2869 |
+
view.addRenderAttribute(
|
2870 |
'info-box-carousel-wrap',
|
2871 |
{
|
2872 |
'class': [ 'swiper-container-wrap', 'pp-info-box-carousel-wrap', 'swiper-container-wrap-dots-' + settings.dots_position ],
|
2873 |
}
|
2874 |
+
);
|
|
|
|
|
2875 |
|
2876 |
+
if ( settings.direction == 'auto' ) {
|
2877 |
+
#>
|
2878 |
+
<?php if ( is_rtl() ) { ?>
|
|
|
|
|
2879 |
<# view.addRenderAttribute( 'info-box-carousel', 'dir', 'rtl' ); #>
|
2880 |
+
<?php } ?>
|
2881 |
+
<#
|
2882 |
+
} else {
|
2883 |
+
if ( settings.direction == 'right' ) {
|
2884 |
view.addRenderAttribute( 'info-box-carousel', 'dir', 'rtl' );
|
2885 |
+
}
|
2886 |
+
}
|
2887 |
+
|
2888 |
+
var slider_options = get_slider_settings( settings );
|
2889 |
+
|
2890 |
+
view.addRenderAttribute(
|
2891 |
'info-box-carousel',
|
2892 |
{
|
2893 |
'class': [ 'swiper-container', 'pp-info-box', 'pp-info-box-carousel' ],
|
2894 |
'data-pagination': 'swiper-pagination',
|
2895 |
'data-arrow-next': 'swiper-button-next',
|
2896 |
'data-arrow-prev': 'swiper-button-prev',
|
2897 |
+
'data-slider-settings': JSON.stringify( slider_options )
|
2898 |
}
|
2899 |
+
);
|
2900 |
+
|
2901 |
+
view.addRenderAttribute( 'info-box-container', 'class', 'pp-info-box-container' );
|
2902 |
|
2903 |
+
var $pp_if_html_tag = 'div',
|
|
|
|
|
2904 |
$pp_title_html_tag = 'div',
|
2905 |
$pp_button_html_tag = 'div';
|
2906 |
|
2907 |
+
view.addRenderAttribute( 'info-box-button', 'class', [
|
2908 |
'pp-info-box-button',
|
2909 |
'elementor-button',
|
2910 |
'elementor-size-' + settings.button_size,
|
2911 |
],
|
2912 |
+
);
|
2913 |
|
2914 |
+
if ( settings.button_hover_animation ) {
|
2915 |
view.addRenderAttribute( 'info-box-button', 'class', 'elementor-animation-' + settings.button_hover_animation );
|
2916 |
+
}
|
2917 |
|
2918 |
+
view.addRenderAttribute( 'icon', 'class', ['pp-info-box-icon', 'pp-icon'] );
|
2919 |
|
2920 |
+
if ( settings.icon_animation ) {
|
2921 |
view.addRenderAttribute( 'icon', 'class', 'elementor-animation-' + settings.icon_animation );
|
2922 |
+
}
|
2923 |
+
|
2924 |
var iconsHTML = {},
|
2925 |
migrated = {};
|
2926 |
#>
|
2928 |
<div {{{ view.getRenderAttributeString( 'info-box-carousel' ) }}}>
|
2929 |
<div class="swiper-wrapper">
|
2930 |
<#
|
2931 |
+
var i = 1;
|
2932 |
|
2933 |
+
_.each( settings.pp_info_boxes, function( item, index ) {
|
2934 |
|
2935 |
+
view.addRenderAttribute( 'title-container' + i, 'class', 'pp-info-box-title-container' );
|
2936 |
|
2937 |
if ( item.link_type != 'none' ) {
|
2938 |
if ( item.link.url ) {
|
2946 |
if ( item.link.nofollow ) {
|
2947 |
view.addRenderAttribute( 'link' + i, 'rel', 'nofollow' );
|
2948 |
}
|
2949 |
+
|
2950 |
if ( item.link_type == 'title' ) {
|
2951 |
$pp_title_html_tag = 'a';
|
2952 |
+
view.addRenderAttribute( 'title-container' + i, 'href', item.link.url );
|
2953 |
}
|
2954 |
else if ( item.link_type == 'button' ) {
|
2955 |
$pp_button_html_tag = 'a';
|
3036 |
{{ item.description }}
|
3037 |
</div>
|
3038 |
<# } #>
|
3039 |
+
<# if ( item.link_type == 'button' || ( item.link_type == 'box' && item.button_visible == 'yes' ) ) { #>
|
3040 |
<div class="pp-info-box-footer">
|
3041 |
<{{{ $pp_button_html_tag }}} {{{ view.getRenderAttributeString( 'info-box-button' + i ) }}} {{{ view.getRenderAttributeString( 'link' + i ) }}}>
|
3042 |
<div {{{ view.getRenderAttributeString( 'info-box-button' ) }}}>
|
3043 |
+
<# if ( item.button_icon_position == 'before' ) { #>
|
3044 |
<# button_icon_template( item, index ); #>
|
3045 |
<# } #>
|
3046 |
<# if ( item.button_text ) { #>
|
3058 |
<# if ( item.link_type == 'box' ) { #>
|
3059 |
</a>
|
3060 |
<# } #>
|
3061 |
+
</div>
|
3062 |
</div>
|
3063 |
</div>
|
3064 |
<# i++ } ); #>
|
3070 |
<?php
|
3071 |
}
|
3072 |
|
3073 |
+
/**
|
3074 |
+
* Render info box carousel widget output in the editor.
|
3075 |
+
*
|
3076 |
+
* Written as a Backbone JavaScript template and used to generate the live preview.
|
3077 |
+
*
|
3078 |
+
* Remove this after Elementor v3.3.0
|
3079 |
+
*
|
3080 |
+
* @since 1.0.0
|
3081 |
+
* @access protected
|
3082 |
+
*/
|
3083 |
+
protected function _content_template() { // phpcs:ignore PSR2.Methods.MethodDeclaration.Underscore
|
3084 |
+
$this->content_template();
|
3085 |
+
}
|
3086 |
}
|
modules/info-box/widgets/info-box.php
CHANGED
@@ -1,9 +1,16 @@
|
|
1 |
<?php
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
namespace PowerpackElementsLite\Modules\InfoBox\Widgets;
|
3 |
|
4 |
use PowerpackElementsLite\Base\Powerpack_Widget;
|
|
|
5 |
|
6 |
-
// Elementor Classes
|
7 |
use Elementor\Controls_Manager;
|
8 |
use Elementor\Control_Media;
|
9 |
use Elementor\Utils;
|
@@ -80,14 +87,41 @@ class Info_Box extends Powerpack_Widget {
|
|
80 |
*
|
81 |
* @access protected
|
82 |
*/
|
83 |
-
protected function _register_controls() {
|
|
|
|
|
84 |
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
90 |
|
|
|
|
|
|
|
|
|
|
|
|
|
91 |
/**
|
92 |
* Content Tab: Icon
|
93 |
* -------------------------------------------------
|
@@ -335,7 +369,14 @@ class Info_Box extends Powerpack_Widget {
|
|
335 |
);
|
336 |
|
337 |
$this->end_controls_section();
|
|
|
338 |
|
|
|
|
|
|
|
|
|
|
|
|
|
339 |
/**
|
340 |
* Content Tab: Content
|
341 |
* -------------------------------------------------
|
@@ -375,7 +416,7 @@ class Info_Box extends Powerpack_Widget {
|
|
375 |
'description',
|
376 |
array(
|
377 |
'label' => __( 'Description', 'powerpack' ),
|
378 |
-
'type' => Controls_Manager::
|
379 |
'dynamic' => array(
|
380 |
'active' => true,
|
381 |
),
|
@@ -439,7 +480,14 @@ class Info_Box extends Powerpack_Widget {
|
|
439 |
);
|
440 |
|
441 |
$this->end_controls_section();
|
|
|
442 |
|
|
|
|
|
|
|
|
|
|
|
|
|
443 |
/**
|
444 |
* Content Tab: Link
|
445 |
* -------------------------------------------------
|
@@ -489,17 +537,54 @@ class Info_Box extends Powerpack_Widget {
|
|
489 |
)
|
490 |
);
|
491 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
492 |
$this->add_control(
|
493 |
'button_text',
|
494 |
array(
|
495 |
-
'label'
|
496 |
-
'type'
|
497 |
-
'dynamic'
|
498 |
'active' => true,
|
499 |
),
|
500 |
-
'default'
|
501 |
-
'
|
502 |
-
'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
503 |
),
|
504 |
)
|
505 |
);
|
@@ -510,8 +595,30 @@ class Info_Box extends Powerpack_Widget {
|
|
510 |
'label' => __( 'Button', 'powerpack' ) . ' ' . __( 'Icon', 'powerpack' ),
|
511 |
'type' => Controls_Manager::ICONS,
|
512 |
'fa4compatibility' => 'button_icon',
|
513 |
-
'
|
514 |
-
'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
515 |
),
|
516 |
)
|
517 |
);
|
@@ -526,40 +633,100 @@ class Info_Box extends Powerpack_Widget {
|
|
526 |
'after' => __( 'After', 'powerpack' ),
|
527 |
'before' => __( 'Before', 'powerpack' ),
|
528 |
),
|
529 |
-
'
|
530 |
-
'
|
531 |
-
'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
532 |
),
|
533 |
)
|
534 |
);
|
535 |
|
536 |
$this->end_controls_section();
|
|
|
537 |
|
538 |
-
|
539 |
-
|
540 |
-
|
541 |
-
|
542 |
-
|
543 |
-
|
544 |
-
$this->start_controls_section(
|
545 |
-
'section_help_docs',
|
546 |
-
array(
|
547 |
-
'label' => __( 'Help Docs', 'powerpack' ),
|
548 |
-
)
|
549 |
-
);
|
550 |
|
551 |
-
$
|
552 |
-
'help_doc_1',
|
553 |
-
array(
|
554 |
-
'type' => Controls_Manager::RAW_HTML,
|
555 |
-
/* translators: %1$s doc link */
|
556 |
-
'raw' => sprintf( __( '%1$s Widget Overview %2$s', 'powerpack' ), '<a href="https://powerpackelements.com/docs/powerpack/widgets/info-box/info-box-widget-overview/?utm_source=widget&utm_medium=panel&utm_campaign=userkb" target="_blank" rel="noopener">', '</a>' ),
|
557 |
-
'content_classes' => 'pp-editor-doc-links',
|
558 |
-
)
|
559 |
-
);
|
560 |
|
561 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
562 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
563 |
if ( ! is_pp_elements_active() ) {
|
564 |
$this->start_controls_section(
|
565 |
'section_upgrade_powerpack',
|
@@ -581,13 +748,14 @@ class Info_Box extends Powerpack_Widget {
|
|
581 |
|
582 |
$this->end_controls_section();
|
583 |
}
|
|
|
584 |
|
585 |
-
|
586 |
-
|
587 |
-
|
588 |
-
|
589 |
-
|
590 |
-
|
591 |
/**
|
592 |
* Style Tab: Info Box
|
593 |
* -------------------------------------------------
|
@@ -772,7 +940,14 @@ class Info_Box extends Powerpack_Widget {
|
|
772 |
);
|
773 |
|
774 |
$this->end_controls_section();
|
|
|
775 |
|
|
|
|
|
|
|
|
|
|
|
|
|
776 |
/**
|
777 |
* Style Tab: Icon
|
778 |
* -------------------------------------------------
|
@@ -965,7 +1140,14 @@ class Info_Box extends Powerpack_Widget {
|
|
965 |
$this->end_controls_tabs();
|
966 |
|
967 |
$this->end_controls_section();
|
|
|
968 |
|
|
|
|
|
|
|
|
|
|
|
|
|
969 |
/**
|
970 |
* Style Tab: Title
|
971 |
* -------------------------------------------------
|
@@ -990,6 +1172,21 @@ class Info_Box extends Powerpack_Widget {
|
|
990 |
)
|
991 |
);
|
992 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
993 |
$this->add_group_control(
|
994 |
Group_Control_Typography::get_type(),
|
995 |
array(
|
@@ -1054,6 +1251,21 @@ class Info_Box extends Powerpack_Widget {
|
|
1054 |
)
|
1055 |
);
|
1056 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1057 |
$this->add_group_control(
|
1058 |
Group_Control_Typography::get_type(),
|
1059 |
array(
|
@@ -1098,7 +1310,14 @@ class Info_Box extends Powerpack_Widget {
|
|
1098 |
);
|
1099 |
|
1100 |
$this->end_controls_section();
|
|
|
1101 |
|
|
|
|
|
|
|
|
|
|
|
|
|
1102 |
/**
|
1103 |
* Style Tab: Title Separator
|
1104 |
* -------------------------------------------------
|
@@ -1266,7 +1485,14 @@ class Info_Box extends Powerpack_Widget {
|
|
1266 |
);
|
1267 |
|
1268 |
$this->end_controls_section();
|
|
|
1269 |
|
|
|
|
|
|
|
|
|
|
|
|
|
1270 |
/**
|
1271 |
* Style Tab: Description
|
1272 |
* -------------------------------------------------
|
@@ -1297,6 +1523,21 @@ class Info_Box extends Powerpack_Widget {
|
|
1297 |
)
|
1298 |
);
|
1299 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1300 |
$this->add_group_control(
|
1301 |
Group_Control_Typography::get_type(),
|
1302 |
array(
|
@@ -1341,7 +1582,14 @@ class Info_Box extends Powerpack_Widget {
|
|
1341 |
);
|
1342 |
|
1343 |
$this->end_controls_section();
|
|
|
1344 |
|
|
|
|
|
|
|
|
|
|
|
|
|
1345 |
/**
|
1346 |
* Style Tab: Button
|
1347 |
* -------------------------------------------------
|
@@ -1606,7 +1854,6 @@ class Info_Box extends Powerpack_Widget {
|
|
1606 |
$this->end_controls_tabs();
|
1607 |
|
1608 |
$this->end_controls_section();
|
1609 |
-
|
1610 |
}
|
1611 |
|
1612 |
/**
|
@@ -1629,7 +1876,7 @@ class Info_Box extends Powerpack_Widget {
|
|
1629 |
}
|
1630 |
|
1631 |
if ( ! isset( $settings['icon'] ) && ! Icons_Manager::is_migration_allowed() ) {
|
1632 |
-
// add old default
|
1633 |
$settings['icon'] = 'fa fa-star';
|
1634 |
}
|
1635 |
|
@@ -1646,27 +1893,27 @@ class Info_Box extends Powerpack_Widget {
|
|
1646 |
$migrated = isset( $settings['__fa4_migrated']['selected_icon'] );
|
1647 |
$is_new = ! isset( $settings['icon'] ) && Icons_Manager::is_migration_allowed();
|
1648 |
?>
|
1649 |
-
<span <?php echo $this->get_render_attribute_string( 'icon' ); ?>>
|
1650 |
-
<?php if ( $settings['icon_type']
|
1651 |
<?php
|
1652 |
if ( $is_new || $migrated ) {
|
1653 |
Icons_Manager::render_icon( $settings['selected_icon'], array( 'aria-hidden' => 'true' ) );
|
1654 |
} elseif ( ! empty( $settings['icon'] ) ) {
|
1655 |
?>
|
1656 |
-
<i <?php echo $this->get_render_attribute_string( 'i' ); ?>></i>
|
1657 |
<?php
|
1658 |
}
|
1659 |
?>
|
1660 |
<?php
|
1661 |
-
} elseif ( $settings['icon_type']
|
1662 |
|
1663 |
if ( ! empty( $settings['image']['url'] ) ) {
|
1664 |
-
echo Group_Control_Image_Size::get_attachment_image_html( $settings, 'image', 'image' );
|
1665 |
}
|
1666 |
-
} elseif ( $settings['icon_type']
|
1667 |
?>
|
1668 |
<span class="pp-icon-text">
|
1669 |
-
<?php echo $settings['icon_text']; ?>
|
1670 |
</span>
|
1671 |
<?php } ?>
|
1672 |
</span>
|
@@ -1696,14 +1943,18 @@ class Info_Box extends Powerpack_Widget {
|
|
1696 |
)
|
1697 |
);
|
1698 |
|
1699 |
-
|
|
|
|
|
|
|
|
|
1700 |
|
1701 |
if ( $settings['button_animation'] ) {
|
1702 |
$this->add_render_attribute( 'info-box-button', 'class', 'elementor-animation-' . $settings['button_animation'] );
|
1703 |
}
|
1704 |
|
1705 |
if ( ! isset( $settings['button_icon'] ) && ! Icons_Manager::is_migration_allowed() ) {
|
1706 |
-
// add old default
|
1707 |
$settings['button_icon'] = '';
|
1708 |
}
|
1709 |
|
@@ -1719,44 +1970,44 @@ class Info_Box extends Powerpack_Widget {
|
|
1719 |
}
|
1720 |
$migrated = isset( $settings['__fa4_migrated']['select_button_icon'] );
|
1721 |
$is_new = ! isset( $settings['button_icon'] ) && Icons_Manager::is_migration_allowed();
|
1722 |
-
|
1723 |
-
if ( $settings['link_type']
|
1724 |
?>
|
1725 |
-
<?php if ( $settings['button_text']
|
1726 |
<div class="pp-info-box-footer">
|
1727 |
-
<<?php echo $pp_button_html_tag . ' ' . $this->get_render_attribute_string( 'info-box-button' ) . $this->get_render_attribute_string( 'link' ); ?>>
|
1728 |
-
<?php if ( $settings['button_icon_position']
|
1729 |
<span class='pp-button-icon pp-icon'>
|
1730 |
<?php
|
1731 |
if ( $is_new || $migrated ) {
|
1732 |
Icons_Manager::render_icon( $settings['select_button_icon'], array( 'aria-hidden' => 'true' ) );
|
1733 |
} elseif ( ! empty( $settings['button_icon'] ) ) {
|
1734 |
?>
|
1735 |
-
<i <?php echo $this->get_render_attribute_string( 'button-icon' ); ?>></i>
|
1736 |
<?php
|
1737 |
}
|
1738 |
?>
|
1739 |
</span>
|
1740 |
<?php } ?>
|
1741 |
<?php if ( ! empty( $settings['button_text'] ) ) { ?>
|
1742 |
-
<span <?php echo $this->get_render_attribute_string( 'button_text' ); ?>>
|
1743 |
<?php echo esc_attr( $settings['button_text'] ); ?>
|
1744 |
</span>
|
1745 |
<?php } ?>
|
1746 |
-
<?php if ( $settings['button_icon_position']
|
1747 |
<span class='pp-button-icon pp-icon'>
|
1748 |
<?php
|
1749 |
if ( $is_new || $migrated ) {
|
1750 |
Icons_Manager::render_icon( $settings['select_button_icon'], array( 'aria-hidden' => 'true' ) );
|
1751 |
} elseif ( ! empty( $settings['button_icon'] ) ) {
|
1752 |
?>
|
1753 |
-
<i <?php echo $this->get_render_attribute_string( 'button-icon' ); ?>></i>
|
1754 |
<?php
|
1755 |
}
|
1756 |
?>
|
1757 |
</span>
|
1758 |
<?php } ?>
|
1759 |
-
</<?php echo $pp_button_html_tag; ?>>
|
1760 |
</div>
|
1761 |
<?php } ?>
|
1762 |
<?php
|
@@ -1803,31 +2054,30 @@ class Info_Box extends Powerpack_Widget {
|
|
1803 |
$this->add_inline_editing_attributes( 'sub_heading', 'none' );
|
1804 |
$this->add_inline_editing_attributes( 'description', 'basic' );
|
1805 |
|
1806 |
-
if ( $settings['link_type']
|
1807 |
if ( ! empty( $settings['link']['url'] ) ) {
|
1808 |
$this->add_link_attributes( 'link', $settings['link'] );
|
1809 |
|
1810 |
-
if ( $settings['link_type']
|
1811 |
$pp_if_html_tag = 'a';
|
1812 |
-
} elseif ( $settings['link_type']
|
1813 |
$pp_title_html_tag = 'a';
|
1814 |
-
$this->add_link_attributes( 'title-container', $settings['link'] );
|
1815 |
}
|
1816 |
}
|
1817 |
}
|
1818 |
?>
|
1819 |
-
<<?php echo $pp_if_html_tag . ' ' . $this->get_render_attribute_string( 'info-box-container' ) . $this->get_render_attribute_string( 'link' ); ?>>
|
1820 |
-
<div <?php echo $this->get_render_attribute_string( 'info-box' ); ?>>
|
1821 |
-
<?php if ( $settings['icon_type']
|
1822 |
<div class="pp-info-box-icon-wrap">
|
1823 |
-
<?php if ( $settings['link_type']
|
1824 |
-
<a <?php echo $this->get_render_attribute_string( 'link' ); ?>>
|
1825 |
<?php } ?>
|
1826 |
<?php
|
1827 |
-
// Icon
|
1828 |
$this->render_infobox_icon();
|
1829 |
?>
|
1830 |
-
<?php if ( $settings['link_type']
|
1831 |
</a>
|
1832 |
<?php } ?>
|
1833 |
</div>
|
@@ -1836,39 +2086,39 @@ class Info_Box extends Powerpack_Widget {
|
|
1836 |
<div class="pp-info-box-title-wrap">
|
1837 |
<?php
|
1838 |
if ( ! empty( $settings['heading'] ) ) {
|
1839 |
-
echo '<' . $pp_title_html_tag . ' ' . $this->get_render_attribute_string( 'title-container' ) . '>';
|
1840 |
-
printf( '<%1$s %2$s>', $settings['title_html_tag'], $this->get_render_attribute_string( 'heading' ) );
|
1841 |
-
echo $settings['heading'];
|
1842 |
-
printf( '</%1$s>', $settings['title_html_tag'] );
|
1843 |
-
echo '</' . $pp_title_html_tag . '>';
|
1844 |
}
|
1845 |
|
1846 |
if ( ! empty( $settings['sub_heading'] ) ) {
|
1847 |
-
printf( '<%1$s %2$s>', $settings['sub_title_html_tag'], $this->get_render_attribute_string( 'sub_heading' ) );
|
1848 |
-
echo $settings['sub_heading'];
|
1849 |
-
printf( '</%1$s>', $settings['sub_title_html_tag'] );
|
1850 |
}
|
1851 |
?>
|
1852 |
</div>
|
1853 |
|
1854 |
-
<?php if ( $settings['divider_title_switch']
|
1855 |
<div class="pp-info-box-divider-wrap">
|
1856 |
<div class="pp-info-box-divider"></div>
|
1857 |
</div>
|
1858 |
<?php } ?>
|
1859 |
|
1860 |
<?php if ( ! empty( $settings['description'] ) ) { ?>
|
1861 |
-
<div <?php echo $this->get_render_attribute_string( 'description' ); ?>>
|
1862 |
-
<?php echo $this->parse_text_editor( nl2br( $settings['description'] ) ); ?>
|
1863 |
</div>
|
1864 |
<?php } ?>
|
1865 |
<?php
|
1866 |
-
// Button
|
1867 |
$this->render_infobox_button();
|
1868 |
?>
|
1869 |
</div>
|
1870 |
</div>
|
1871 |
-
</<?php echo $pp_if_html_tag; ?>>
|
1872 |
<?php
|
1873 |
}
|
1874 |
|
@@ -1879,7 +2129,7 @@ class Info_Box extends Powerpack_Widget {
|
|
1879 |
*
|
1880 |
* @access protected
|
1881 |
*/
|
1882 |
-
protected function
|
1883 |
?>
|
1884 |
<#
|
1885 |
var pp_if_html_tag = 'div',
|
@@ -1890,15 +2140,12 @@ class Info_Box extends Powerpack_Widget {
|
|
1890 |
buttonIconHTML = elementor.helpers.renderIcon( view, settings.select_button_icon, { 'aria-hidden': true }, 'i' , 'object' ),
|
1891 |
buttonMigrated = elementor.helpers.isIconMigrated( settings, 'select_button_icon' );
|
1892 |
|
1893 |
-
view.addRenderAttribute( 'title-container', 'class', 'pp-info-box-title-container' );
|
1894 |
-
|
1895 |
if ( settings.link.url != '' ) {
|
1896 |
if ( settings.link_type == 'box' ) {
|
1897 |
var pp_if_html_tag = 'a';
|
1898 |
}
|
1899 |
else if ( settings.link_type == 'title' ) {
|
1900 |
var pp_title_html_tag = 'a';
|
1901 |
-
view.addRenderAttribute( 'title-container', 'href', settings.link.url );
|
1902 |
}
|
1903 |
else if ( settings.link_type == 'button' ) {
|
1904 |
var pp_button_html_tag = 'a';
|
@@ -1947,7 +2194,7 @@ class Info_Box extends Powerpack_Widget {
|
|
1947 |
<div class="pp-info-box-content">
|
1948 |
<div class="pp-info-box-title-wrap">
|
1949 |
<# if ( settings.heading ) { #>
|
1950 |
-
<{{pp_title_html_tag}}
|
1951 |
<{{settings.title_html_tag}} class="pp-info-box-title elementor-inline-editing" data-elementor-setting-key="heading" data-elementor-inline-editing-toolbar="none">
|
1952 |
{{{ settings.heading }}}
|
1953 |
</{{settings.title_html_tag}}>
|
@@ -1971,7 +2218,7 @@ class Info_Box extends Powerpack_Widget {
|
|
1971 |
{{{ settings.description }}}
|
1972 |
</div>
|
1973 |
<# } #>
|
1974 |
-
<# if ( settings.link_type == 'button' ) { #>
|
1975 |
<# if ( settings.button_text != '' || settings.button_icon != '' ) { #>
|
1976 |
<div class="pp-info-box-footer">
|
1977 |
<{{pp_button_html_tag}} href="{{ settings.link.url }}" class="pp-info-box-button elementor-button elementor-size-{{ settings.button_size }} elementor-animation-{{ settings.button_animation }}">
|
@@ -2012,4 +2259,17 @@ class Info_Box extends Powerpack_Widget {
|
|
2012 |
<?php
|
2013 |
}
|
2014 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015 |
}
|
1 |
<?php
|
2 |
+
/**
|
3 |
+
* Info Box Widget
|
4 |
+
*
|
5 |
+
* @package PPE
|
6 |
+
*/
|
7 |
+
|
8 |
namespace PowerpackElementsLite\Modules\InfoBox\Widgets;
|
9 |
|
10 |
use PowerpackElementsLite\Base\Powerpack_Widget;
|
11 |
+
use PowerpackElementsLite\Classes\PP_Config;
|
12 |
|
13 |
+
// Elementor Classes.
|
14 |
use Elementor\Controls_Manager;
|
15 |
use Elementor\Control_Media;
|
16 |
use Elementor\Utils;
|
87 |
*
|
88 |
* @access protected
|
89 |
*/
|
90 |
+
protected function _register_controls() { // phpcs:ignore PSR2.Methods.MethodDeclaration.Underscore
|
91 |
+
$this->register_controls();
|
92 |
+
}
|
93 |
|
94 |
+
/**
|
95 |
+
* Register info box widget controls.
|
96 |
+
*
|
97 |
+
* Adds different input fields to allow the user to change and customize the widget settings.
|
98 |
+
*
|
99 |
+
* @since 2.0.3
|
100 |
+
* @access protected
|
101 |
+
*/
|
102 |
+
protected function register_controls() {
|
103 |
+
/* Content Tab */
|
104 |
+
$this->register_content_icon_controls();
|
105 |
+
$this->register_content_content_controls();
|
106 |
+
$this->register_content_link_controls();
|
107 |
+
$this->register_content_help_docs_controls();
|
108 |
+
$this->register_content_upgrade_controls();
|
109 |
+
|
110 |
+
/* Style Tab */
|
111 |
+
$this->register_style_info_box_controls();
|
112 |
+
$this->register_style_icon_controls();
|
113 |
+
$this->register_style_title_controls();
|
114 |
+
$this->register_style_title_divider_controls();
|
115 |
+
$this->register_style_description_controls();
|
116 |
+
$this->register_style_button_controls();
|
117 |
+
}
|
118 |
|
119 |
+
/**
|
120 |
+
* Register Icon Controls in Content tab
|
121 |
+
*
|
122 |
+
* @return void
|
123 |
+
*/
|
124 |
+
protected function register_content_icon_controls() {
|
125 |
/**
|
126 |
* Content Tab: Icon
|
127 |
* -------------------------------------------------
|
369 |
);
|
370 |
|
371 |
$this->end_controls_section();
|
372 |
+
}
|
373 |
|
374 |
+
/**
|
375 |
+
* Register Info Box Content Controls in Content tab
|
376 |
+
*
|
377 |
+
* @return void
|
378 |
+
*/
|
379 |
+
protected function register_content_content_controls() {
|
380 |
/**
|
381 |
* Content Tab: Content
|
382 |
* -------------------------------------------------
|
416 |
'description',
|
417 |
array(
|
418 |
'label' => __( 'Description', 'powerpack' ),
|
419 |
+
'type' => Controls_Manager::WYSIWYG,
|
420 |
'dynamic' => array(
|
421 |
'active' => true,
|
422 |
),
|
480 |
);
|
481 |
|
482 |
$this->end_controls_section();
|
483 |
+
}
|
484 |
|
485 |
+
/**
|
486 |
+
* Register Link Controls in Content tab
|
487 |
+
*
|
488 |
+
* @return void
|
489 |
+
*/
|
490 |
+
protected function register_content_link_controls() {
|
491 |
/**
|
492 |
* Content Tab: Link
|
493 |
* -------------------------------------------------
|
537 |
)
|
538 |
);
|
539 |
|
540 |
+
$this->add_control(
|
541 |
+
'button_visible',
|
542 |
+
array(
|
543 |
+
'label' => __( 'Show Button', 'powerpack' ),
|
544 |
+
'type' => Controls_Manager::SWITCHER,
|
545 |
+
'default' => 'no',
|
546 |
+
'label_on' => __( 'Yes', 'powerpack' ),
|
547 |
+
'label_off' => __( 'No', 'powerpack' ),
|
548 |
+
'return_value' => 'yes',
|
549 |
+
'condition' => array(
|
550 |
+
'link_type' => 'box'
|
551 |
+
),
|
552 |
+
)
|
553 |
+
);
|
554 |
+
|
555 |
$this->add_control(
|
556 |
'button_text',
|
557 |
array(
|
558 |
+
'label' => __( 'Button', 'powerpack' ) . ' ' . __( 'Text', 'powerpack' ),
|
559 |
+
'type' => Controls_Manager::TEXT,
|
560 |
+
'dynamic' => array(
|
561 |
'active' => true,
|
562 |
),
|
563 |
+
'default' => __( 'Get Started', 'powerpack' ),
|
564 |
+
'conditions' => array(
|
565 |
+
'relation' => 'or',
|
566 |
+
'terms' => array(
|
567 |
+
array(
|
568 |
+
'name' => 'link_type',
|
569 |
+
'operator' => '==',
|
570 |
+
'value' => 'button',
|
571 |
+
),
|
572 |
+
array(
|
573 |
+
'relation' => 'and',
|
574 |
+
'terms' => array(
|
575 |
+
array(
|
576 |
+
'name' => 'link_type',
|
577 |
+
'operator' => '==',
|
578 |
+
'value' => 'box',
|
579 |
+
),
|
580 |
+
array(
|
581 |
+
'name' => 'button_visible',
|
582 |
+
'operator' => '==',
|
583 |
+
'value' => 'yes',
|
584 |
+
),
|
585 |
+
),
|
586 |
+
),
|
587 |
+
),
|
588 |
),
|
589 |
)
|
590 |
);
|
595 |
'label' => __( 'Button', 'powerpack' ) . ' ' . __( 'Icon', 'powerpack' ),
|
596 |
'type' => Controls_Manager::ICONS,
|
597 |
'fa4compatibility' => 'button_icon',
|
598 |
+
'conditions' => array(
|
599 |
+
'relation' => 'or',
|
600 |
+
'terms' => array(
|
601 |
+
array(
|
602 |
+
'name' => 'link_type',
|
603 |
+
'operator' => '==',
|
604 |
+
'value' => 'button',
|
605 |
+
),
|
606 |
+
array(
|
607 |
+
'relation' => 'and',
|
608 |
+
'terms' => array(
|
609 |
+
array(
|
610 |
+
'name' => 'link_type',
|
611 |
+
'operator' => '==',
|
612 |
+
'value' => 'box',
|
613 |
+
),
|
614 |
+
array(
|
615 |
+
'name' => 'button_visible',
|
616 |
+
'operator' => '==',
|
617 |
+
'value' => 'yes',
|
618 |
+
),
|
619 |
+
),
|
620 |
+
),
|
621 |
+
),
|
622 |
),
|
623 |
)
|
624 |
);
|
633 |
'after' => __( 'After', 'powerpack' ),
|
634 |
'before' => __( 'Before', 'powerpack' ),
|
635 |
),
|
636 |
+
'conditions' => array(
|
637 |
+
'relation' => 'or',
|
638 |
+
'terms' => array(
|
639 |
+
array(
|
640 |
+
'relation' => 'and',
|
641 |
+
'terms' => array(
|
642 |
+
array(
|
643 |
+
'name' => 'link_type',
|
644 |
+
'operator' => '==',
|
645 |
+
'value' => 'button',
|
646 |
+
),
|
647 |
+
array(
|
648 |
+
'name' => 'select_button_icon[value]',
|
649 |
+
'operator' => '!=',
|
650 |
+
'value' => '',
|
651 |
+
),
|
652 |
+
),
|
653 |
+
),
|
654 |
+
array(
|
655 |
+
'relation' => 'and',
|
656 |
+
'terms' => array(
|
657 |
+
array(
|
658 |
+
'name' => 'link_type',
|
659 |
+
'operator' => '==',
|
660 |
+
'value' => 'box',
|
661 |
+
),
|
662 |
+
array(
|
663 |
+
'name' => 'button_visible',
|
664 |
+
'operator' => '==',
|
665 |
+
'value' => 'yes',
|
666 |
+
),
|
667 |
+
array(
|
668 |
+
'name' => 'select_button_icon[value]',
|
669 |
+
'operator' => '!=',
|
670 |
+
'value' => '',
|
671 |
+
),
|
672 |
+
),
|
673 |
+
),
|
674 |
+
),
|
675 |
),
|
676 |
)
|
677 |
);
|
678 |
|
679 |
$this->end_controls_section();
|
680 |
+
}
|
681 |
|
682 |
+
/**
|
683 |
+
* Register Help Docs Controls in Content tab
|
684 |
+
*
|
685 |
+
* @return void
|
686 |
+
*/
|
687 |
+
protected function register_content_help_docs_controls() {
|
|
|
|
|
|
|
|
|
|
|
|
|
688 |
|
689 |
+
$help_docs = PP_Config::get_widget_help_links( 'Info_Box' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
690 |
|
691 |
+
if ( ! empty( $help_docs ) ) {
|
692 |
+
|
693 |
+
/**
|
694 |
+
* Content Tab: Help Docs
|
695 |
+
*
|
696 |
+
* @since 1.4.8
|
697 |
+
* @access protected
|
698 |
+
*/
|
699 |
+
$this->start_controls_section(
|
700 |
+
'section_help_docs',
|
701 |
+
array(
|
702 |
+
'label' => __( 'Help Docs', 'powerpack' ),
|
703 |
+
)
|
704 |
+
);
|
705 |
|
706 |
+
$hd_counter = 1;
|
707 |
+
foreach ( $help_docs as $hd_title => $hd_link ) {
|
708 |
+
$this->add_control(
|
709 |
+
'help_doc_' . $hd_counter,
|
710 |
+
array(
|
711 |
+
'type' => Controls_Manager::RAW_HTML,
|
712 |
+
'raw' => sprintf( '%1$s ' . $hd_title . ' %2$s', '<a href="' . $hd_link . '" target="_blank" rel="noopener">', '</a>' ),
|
713 |
+
'content_classes' => 'pp-editor-doc-links',
|
714 |
+
)
|
715 |
+
);
|
716 |
+
|
717 |
+
$hd_counter++;
|
718 |
+
}
|
719 |
+
|
720 |
+
$this->end_controls_section();
|
721 |
+
}
|
722 |
+
}
|
723 |
+
|
724 |
+
/**
|
725 |
+
* Register PowerPack Upgrade in Content tab
|
726 |
+
*
|
727 |
+
* @return void
|
728 |
+
*/
|
729 |
+
protected function register_content_upgrade_controls() {
|
730 |
if ( ! is_pp_elements_active() ) {
|
731 |
$this->start_controls_section(
|
732 |
'section_upgrade_powerpack',
|
748 |
|
749 |
$this->end_controls_section();
|
750 |
}
|
751 |
+
}
|
752 |
|
753 |
+
/**
|
754 |
+
* Register Info Box Controls in Style tab
|
755 |
+
*
|
756 |
+
* @return void
|
757 |
+
*/
|
758 |
+
protected function register_style_info_box_controls() {
|
759 |
/**
|
760 |
* Style Tab: Info Box
|
761 |
* -------------------------------------------------
|
940 |
);
|
941 |
|
942 |
$this->end_controls_section();
|
943 |
+
}
|
944 |
|
945 |
+
/**
|
946 |
+
* Register Icon Controls in Style tab
|
947 |
+
*
|
948 |
+
* @return void
|
949 |
+
*/
|
950 |
+
protected function register_style_icon_controls() {
|
951 |
/**
|
952 |
* Style Tab: Icon
|
953 |
* -------------------------------------------------
|
1140 |
$this->end_controls_tabs();
|
1141 |
|
1142 |
$this->end_controls_section();
|
1143 |
+
}
|
1144 |
|
1145 |
+
/**
|
1146 |
+
* Register Title Controls in Style tab
|
1147 |
+
*
|
1148 |
+
* @return void
|
1149 |
+
*/
|
1150 |
+
protected function register_style_title_controls() {
|
1151 |
/**
|
1152 |
* Style Tab: Title
|
1153 |
* -------------------------------------------------
|
1172 |
)
|
1173 |
);
|
1174 |
|
1175 |
+
$this->add_control(
|
1176 |
+
'title_color_hover',
|
1177 |
+
array(
|
1178 |
+
'label' => __( 'Hover Color', 'powerpack' ),
|
1179 |
+
'type' => Controls_Manager::COLOR,
|
1180 |
+
'default' => '',
|
1181 |
+
'selectors' => array(
|
1182 |
+
'{{WRAPPER}} .pp-info-box-container:hover .pp-info-box-title' => 'color: {{VALUE}}',
|
1183 |
+
),
|
1184 |
+
'condition' => array(
|
1185 |
+
'heading!' => '',
|
1186 |
+
),
|
1187 |
+
)
|
1188 |
+
);
|
1189 |
+
|
1190 |
$this->add_group_control(
|
1191 |
Group_Control_Typography::get_type(),
|
1192 |
array(
|
1251 |
)
|
1252 |
);
|
1253 |
|
1254 |
+
$this->add_control(
|
1255 |
+
'subtitle_color_hover',
|
1256 |
+
array(
|
1257 |
+
'label' => __( 'Hover Color', 'powerpack' ),
|
1258 |
+
'type' => Controls_Manager::COLOR,
|
1259 |
+
'default' => '',
|
1260 |
+
'selectors' => array(
|
1261 |
+
'{{WRAPPER}} .pp-info-box-container:hover .pp-info-box-subtitle' => 'color: {{VALUE}}',
|
1262 |
+
),
|
1263 |
+
'condition' => array(
|
1264 |
+
'sub_heading!' => '',
|
1265 |
+
),
|
1266 |
+
)
|
1267 |
+
);
|
1268 |
+
|
1269 |
$this->add_group_control(
|
1270 |
Group_Control_Typography::get_type(),
|
1271 |
array(
|
1310 |
);
|
1311 |
|
1312 |
$this->end_controls_section();
|
1313 |
+
}
|
1314 |
|
1315 |
+
/**
|
1316 |
+
* Register Title Separator Controls in Style tab
|
1317 |
+
*
|
1318 |
+
* @return void
|
1319 |
+
*/
|
1320 |
+
protected function register_style_title_divider_controls() {
|
1321 |
/**
|
1322 |
* Style Tab: Title Separator
|
1323 |
* -------------------------------------------------
|
1485 |
);
|
1486 |
|
1487 |
$this->end_controls_section();
|
1488 |
+
}
|
1489 |
|
1490 |
+
/**
|
1491 |
+
* Register Description Controls in Style tab
|
1492 |
+
*
|
1493 |
+
* @return void
|
1494 |
+
*/
|
1495 |
+
protected function register_style_description_controls() {
|
1496 |
/**
|
1497 |
* Style Tab: Description
|
1498 |
* -------------------------------------------------
|
1523 |
)
|
1524 |
);
|
1525 |
|
1526 |
+
$this->add_control(
|
1527 |
+
'description_color_hover',
|
1528 |
+
array(
|
1529 |
+
'label' => __( 'Hover Color', 'powerpack' ),
|
1530 |
+
'type' => Controls_Manager::COLOR,
|
1531 |
+
'default' => '',
|
1532 |
+
'selectors' => array(
|
1533 |
+
'{{WRAPPER}} .pp-info-box-container:hover .pp-info-box-description' => 'color: {{VALUE}}',
|
1534 |
+
),
|
1535 |
+
'condition' => array(
|
1536 |
+
'description!' => '',
|
1537 |
+
),
|
1538 |
+
)
|
1539 |
+
);
|
1540 |
+
|
1541 |
$this->add_group_control(
|
1542 |
Group_Control_Typography::get_type(),
|
1543 |
array(
|
1582 |
);
|
1583 |
|
1584 |
$this->end_controls_section();
|
1585 |
+
}
|
1586 |
|
1587 |
+
/**
|
1588 |
+
* Register Button Controls in Style tab
|
1589 |
+
*
|
1590 |
+
* @return void
|
1591 |
+
*/
|
1592 |
+
protected function register_style_button_controls() {
|
1593 |
/**
|
1594 |
* Style Tab: Button
|
1595 |
* -------------------------------------------------
|
1854 |
$this->end_controls_tabs();
|
1855 |
|
1856 |
$this->end_controls_section();
|
|
|
1857 |
}
|
1858 |
|
1859 |
/**
|
1876 |
}
|
1877 |
|
1878 |
if ( ! isset( $settings['icon'] ) && ! Icons_Manager::is_migration_allowed() ) {
|
1879 |
+
// add old default.
|
1880 |
$settings['icon'] = 'fa fa-star';
|
1881 |
}
|
1882 |
|
1893 |
$migrated = isset( $settings['__fa4_migrated']['selected_icon'] );
|
1894 |
$is_new = ! isset( $settings['icon'] ) && Icons_Manager::is_migration_allowed();
|
1895 |
?>
|
1896 |
+
<span <?php echo wp_kses_post( $this->get_render_attribute_string( 'icon' ) ); ?>>
|
1897 |
+
<?php if ( 'icon' === $settings['icon_type'] && $has_icon ) { ?>
|
1898 |
<?php
|
1899 |
if ( $is_new || $migrated ) {
|
1900 |
Icons_Manager::render_icon( $settings['selected_icon'], array( 'aria-hidden' => 'true' ) );
|
1901 |
} elseif ( ! empty( $settings['icon'] ) ) {
|
1902 |
?>
|
1903 |
+
<i <?php echo wp_kses_post( $this->get_render_attribute_string( 'i' ) ); ?>></i>
|
1904 |
<?php
|
1905 |
}
|
1906 |
?>
|
1907 |
<?php
|
1908 |
+
} elseif ( 'image' === $settings['icon_type'] ) {
|
1909 |
|
1910 |
if ( ! empty( $settings['image']['url'] ) ) {
|
1911 |
+
echo wp_kses_post( Group_Control_Image_Size::get_attachment_image_html( $settings, 'image', 'image' ) );
|
1912 |
}
|
1913 |
+
} elseif ( 'text' === $settings['icon_type'] ) {
|
1914 |
?>
|
1915 |
<span class="pp-icon-text">
|
1916 |
+
<?php echo wp_kses_post( $settings['icon_text'] ); ?>
|
1917 |
</span>
|
1918 |
<?php } ?>
|
1919 |
</span>
|
1943 |
)
|
1944 |
);
|
1945 |
|
1946 |
+
if ( 'button' === $settings['link_type'] ) {
|
1947 |
+
$pp_button_html_tag = ( 'button' === $settings['link_type'] ) ? 'a' : 'div';
|
1948 |
+
} else if ( 'box' === $settings['link_type'] && 'yes' === $settings['button_visible'] ) {
|
1949 |
+
$pp_button_html_tag = ( 'button' === $settings['link_type'] ) ? 'div' : 'div';
|
1950 |
+
}
|
1951 |
|
1952 |
if ( $settings['button_animation'] ) {
|
1953 |
$this->add_render_attribute( 'info-box-button', 'class', 'elementor-animation-' . $settings['button_animation'] );
|
1954 |
}
|
1955 |
|
1956 |
if ( ! isset( $settings['button_icon'] ) && ! Icons_Manager::is_migration_allowed() ) {
|
1957 |
+
// add old default.
|
1958 |
$settings['button_icon'] = '';
|
1959 |
}
|
1960 |
|
1970 |
}
|
1971 |
$migrated = isset( $settings['__fa4_migrated']['select_button_icon'] );
|
1972 |
$is_new = ! isset( $settings['button_icon'] ) && Icons_Manager::is_migration_allowed();
|
1973 |
+
|
1974 |
+
if ( 'button' === $settings['link_type'] || ( 'box' === $settings['link_type'] && 'yes' === $settings['button_visible'] ) ) {
|
1975 |
?>
|
1976 |
+
<?php if ( '' !== $settings['button_text'] || $has_icon ) { ?>
|
1977 |
<div class="pp-info-box-footer">
|
1978 |
+
<<?php echo esc_attr( $pp_button_html_tag ) . ' ' . wp_kses_post( $this->get_render_attribute_string( 'info-box-button' ) ) . wp_kses_post( $this->get_render_attribute_string( 'link' ) ); ?>>
|
1979 |
+
<?php if ( 'before' === $settings['button_icon_position'] && $has_icon ) { ?>
|
1980 |
<span class='pp-button-icon pp-icon'>
|
1981 |
<?php
|
1982 |
if ( $is_new || $migrated ) {
|
1983 |
Icons_Manager::render_icon( $settings['select_button_icon'], array( 'aria-hidden' => 'true' ) );
|
1984 |
} elseif ( ! empty( $settings['button_icon'] ) ) {
|
1985 |
?>
|
1986 |
+
<i <?php echo wp_kses_post( $this->get_render_attribute_string( 'button-icon' ) ); ?>></i>
|
1987 |
<?php
|
1988 |
}
|
1989 |
?>
|
1990 |
</span>
|
1991 |
<?php } ?>
|
1992 |
<?php if ( ! empty( $settings['button_text'] ) ) { ?>
|
1993 |
+
<span <?php echo wp_kses_post( $this->get_render_attribute_string( 'button_text' ) ); ?>>
|
1994 |
<?php echo esc_attr( $settings['button_text'] ); ?>
|
1995 |
</span>
|
1996 |
<?php } ?>
|
1997 |
+
<?php if ( 'after' === $settings['button_icon_position'] && $has_icon ) { ?>
|
1998 |
<span class='pp-button-icon pp-icon'>
|
1999 |
<?php
|
2000 |
if ( $is_new || $migrated ) {
|
2001 |
Icons_Manager::render_icon( $settings['select_button_icon'], array( 'aria-hidden' => 'true' ) );
|
2002 |
} elseif ( ! empty( $settings['button_icon'] ) ) {
|
2003 |
?>
|
2004 |
+
<i <?php echo wp_kses_post( $this->get_render_attribute_string( 'button-icon' ) ); ?>></i>
|
2005 |
<?php
|
2006 |
}
|
2007 |
?>
|
2008 |
</span>
|
2009 |
<?php } ?>
|
2010 |
+
</<?php echo esc_attr( $pp_button_html_tag ); ?>>
|
2011 |
</div>
|
2012 |
<?php } ?>
|
2013 |
<?php
|
2054 |
$this->add_inline_editing_attributes( 'sub_heading', 'none' );
|
2055 |
$this->add_inline_editing_attributes( 'description', 'basic' );
|
2056 |
|
2057 |
+
if ( 'none' !== $settings['link_type'] ) {
|
2058 |
if ( ! empty( $settings['link']['url'] ) ) {
|
2059 |
$this->add_link_attributes( 'link', $settings['link'] );
|
2060 |
|
2061 |
+
if ( 'box' === $settings['link_type'] ) {
|
2062 |
$pp_if_html_tag = 'a';
|
2063 |
+
} elseif ( 'title' === $settings['link_type'] ) {
|
2064 |
$pp_title_html_tag = 'a';
|
|
|
2065 |
}
|
2066 |
}
|
2067 |
}
|
2068 |
?>
|
2069 |
+
<<?php echo esc_attr( $pp_if_html_tag ) . ' ' . wp_kses_post( $this->get_render_attribute_string( 'info-box-container' ) ) . wp_kses_post( $this->get_render_attribute_string( 'link' ) ); ?>>
|
2070 |
+
<div <?php echo wp_kses_post( $this->get_render_attribute_string( 'info-box' ) ); ?>>
|
2071 |
+
<?php if ( 'none' !== $settings['icon_type'] ) { ?>
|
2072 |
<div class="pp-info-box-icon-wrap">
|
2073 |
+
<?php if ( 'icon' === $settings['link_type'] ) { ?>
|
2074 |
+
<a <?php echo wp_kses_post( $this->get_render_attribute_string( 'link' ) ); ?>>
|
2075 |
<?php } ?>
|
2076 |
<?php
|
2077 |
+
// Icon.
|
2078 |
$this->render_infobox_icon();
|
2079 |
?>
|
2080 |
+
<?php if ( 'icon' === $settings['link_type'] ) { ?>
|
2081 |
</a>
|
2082 |
<?php } ?>
|
2083 |
</div>
|
2086 |
<div class="pp-info-box-title-wrap">
|
2087 |
<?php
|
2088 |
if ( ! empty( $settings['heading'] ) ) {
|
2089 |
+
echo '<' . esc_attr( $pp_title_html_tag ) . ' ' . wp_kses_post( $this->get_render_attribute_string( 'title-container' ) ) . wp_kses_post( $this->get_render_attribute_string( 'link' ) ) . '>';
|
2090 |
+
printf( '<%1$s %2$s>', esc_attr( $settings['title_html_tag'] ), wp_kses_post( $this->get_render_attribute_string( 'heading' ) ) );
|
2091 |
+
echo wp_kses_post( $settings['heading'] );
|
2092 |
+
printf( '</%1$s>', esc_attr( $settings['title_html_tag'] ) );
|
2093 |
+
echo '</' . esc_attr( $pp_title_html_tag ) . '>';
|
2094 |
}
|
2095 |
|
2096 |
if ( ! empty( $settings['sub_heading'] ) ) {
|
2097 |
+
printf( '<%1$s %2$s>', esc_attr( $settings['sub_title_html_tag'] ), wp_kses_post( $this->get_render_attribute_string( 'sub_heading' ) ) );
|
2098 |
+
echo wp_kses_post( $settings['sub_heading'] );
|
2099 |
+
printf( '</%1$s>', esc_attr( $settings['sub_title_html_tag'] ) );
|
2100 |
}
|
2101 |
?>
|
2102 |
</div>
|
2103 |
|
2104 |
+
<?php if ( 'yes' === $settings['divider_title_switch'] ) { ?>
|
2105 |
<div class="pp-info-box-divider-wrap">
|
2106 |
<div class="pp-info-box-divider"></div>
|
2107 |
</div>
|
2108 |
<?php } ?>
|
2109 |
|
2110 |
<?php if ( ! empty( $settings['description'] ) ) { ?>
|
2111 |
+
<div <?php echo wp_kses_post( $this->get_render_attribute_string( 'description' ) ); ?>>
|
2112 |
+
<?php echo wp_kses_post( $this->parse_text_editor( nl2br( $settings['description'] ) ) ); ?>
|
2113 |
</div>
|
2114 |
<?php } ?>
|
2115 |
<?php
|
2116 |
+
// Button.
|
2117 |
$this->render_infobox_button();
|
2118 |
?>
|
2119 |
</div>
|
2120 |
</div>
|
2121 |
+
</<?php echo esc_attr( $pp_if_html_tag ); ?>>
|
2122 |
<?php
|
2123 |
}
|
2124 |
|
2129 |
*
|
2130 |
* @access protected
|
2131 |
*/
|
2132 |
+
protected function content_template() {
|
2133 |
?>
|
2134 |
<#
|
2135 |
var pp_if_html_tag = 'div',
|
2140 |
buttonIconHTML = elementor.helpers.renderIcon( view, settings.select_button_icon, { 'aria-hidden': true }, 'i' , 'object' ),
|
2141 |
buttonMigrated = elementor.helpers.isIconMigrated( settings, 'select_button_icon' );
|
2142 |
|
|
|
|
|
2143 |
if ( settings.link.url != '' ) {
|
2144 |
if ( settings.link_type == 'box' ) {
|
2145 |
var pp_if_html_tag = 'a';
|
2146 |
}
|
2147 |
else if ( settings.link_type == 'title' ) {
|
2148 |
var pp_title_html_tag = 'a';
|
|
|
2149 |
}
|
2150 |
else if ( settings.link_type == 'button' ) {
|
2151 |
var pp_button_html_tag = 'a';
|
2194 |
<div class="pp-info-box-content">
|
2195 |
<div class="pp-info-box-title-wrap">
|
2196 |
<# if ( settings.heading ) { #>
|
2197 |
+
<{{pp_title_html_tag}} class="pp-info-box-title-container" href="{{settings.link.url}}">
|
2198 |
<{{settings.title_html_tag}} class="pp-info-box-title elementor-inline-editing" data-elementor-setting-key="heading" data-elementor-inline-editing-toolbar="none">
|
2199 |
{{{ settings.heading }}}
|
2200 |
</{{settings.title_html_tag}}>
|
2218 |
{{{ settings.description }}}
|
2219 |
</div>
|
2220 |
<# } #>
|
2221 |
+
<# if ( settings.link_type == 'button' || ( settings.link_type == 'box' && settings.button_visible == 'yes' ) ) { #>
|
2222 |
<# if ( settings.button_text != '' || settings.button_icon != '' ) { #>
|
2223 |
<div class="pp-info-box-footer">
|
2224 |
<{{pp_button_html_tag}} href="{{ settings.link.url }}" class="pp-info-box-button elementor-button elementor-size-{{ settings.button_size }} elementor-animation-{{ settings.button_animation }}">
|
2259 |
<?php
|
2260 |
}
|
2261 |
|
2262 |
+
/**
|
2263 |
+
* Render info box widget output in the editor.
|
2264 |
+
*
|
2265 |
+
* Written as a Backbone JavaScript template and used to generate the live preview.
|
2266 |
+
*
|
2267 |
+
* Remove this after Elementor v3.3.0
|
2268 |
+
*
|
2269 |
+
* @since 1.0.0
|
2270 |
+
* @access protected
|
2271 |
+
*/
|
2272 |
+
protected function _content_template() { // phpcs:ignore PSR2.Methods.MethodDeclaration.Underscore
|
2273 |
+
$this->content_template();
|
2274 |
+
}
|
2275 |
}
|
modules/logos/widgets/logo-grid.php
CHANGED
@@ -2,6 +2,7 @@
|
|
2 |
namespace PowerpackElementsLite\Modules\Logos\Widgets;
|
3 |
|
4 |
use PowerpackElementsLite\Base\Powerpack_Widget;
|
|
|
5 |
|
6 |
// Elementor Classes
|
7 |
use Elementor\Controls_Manager;
|
@@ -79,127 +80,149 @@ class Logo_Grid extends Powerpack_Widget {
|
|
79 |
*
|
80 |
* @access protected
|
81 |
*/
|
82 |
-
protected function _register_controls() {
|
|
|
|
|
83 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
84 |
$this->start_controls_section(
|
85 |
'section_logo_grid',
|
86 |
-
|
87 |
-
'label'
|
88 |
-
|
89 |
);
|
90 |
|
91 |
$repeater = new Repeater();
|
92 |
|
93 |
$repeater->start_controls_tabs( 'items_repeater' );
|
94 |
|
95 |
-
$repeater->start_controls_tab( 'tab_content',
|
96 |
|
97 |
$repeater->add_control(
|
98 |
'logo_image',
|
99 |
-
|
100 |
-
'label'
|
101 |
-
'type'
|
102 |
-
'dynamic'
|
103 |
-
'active'
|
104 |
-
|
105 |
-
'default'
|
106 |
'url' => Utils::get_placeholder_image_src(),
|
107 |
-
|
108 |
-
|
109 |
);
|
110 |
|
111 |
$repeater->add_control(
|
112 |
'title',
|
113 |
-
|
114 |
-
'label'
|
115 |
-
'type'
|
116 |
-
'dynamic'
|
117 |
-
'active'
|
118 |
-
|
119 |
-
|
120 |
);
|
121 |
|
122 |
$repeater->add_control(
|
123 |
'link',
|
124 |
-
|
125 |
-
'label'
|
126 |
-
'type'
|
127 |
-
'dynamic'
|
128 |
-
'active'
|
129 |
-
|
130 |
-
'placeholder'
|
131 |
-
'default'
|
132 |
'url' => '',
|
133 |
-
|
134 |
-
|
135 |
);
|
136 |
|
137 |
$repeater->end_controls_tab();
|
138 |
|
139 |
-
$repeater->start_controls_tab( 'tab_style',
|
140 |
|
141 |
$repeater->add_control(
|
142 |
'custom_style',
|
143 |
-
|
144 |
-
'label'
|
145 |
-
'type'
|
146 |
-
'description'
|
147 |
-
'default'
|
148 |
-
'label_on'
|
149 |
-
'label_off'
|
150 |
-
'return_value'
|
151 |
-
|
152 |
);
|
153 |
|
154 |
$repeater->add_control(
|
155 |
'custom_logo_wrapper_bg',
|
156 |
-
|
157 |
-
'label'
|
158 |
-
'type'
|
159 |
-
'default'
|
160 |
-
'selectors'
|
161 |
'{{WRAPPER}} {{CURRENT_ITEM}}.pp-logo-grid-item-custom' => 'background-color: {{VALUE}}',
|
162 |
-
|
163 |
-
'condition'
|
164 |
-
'custom_style'
|
165 |
-
|
166 |
-
|
167 |
);
|
168 |
|
169 |
$repeater->add_control(
|
170 |
'custom_logo_wrapper_border_color',
|
171 |
-
|
172 |
-
'label'
|
173 |
-
'type'
|
174 |
-
'default'
|
175 |
-
'selectors'
|
176 |
'{{WRAPPER}} {{CURRENT_ITEM}}.pp-logo-grid-item-custom' => 'border-color: {{VALUE}}',
|
177 |
-
|
178 |
-
'condition'
|
179 |
-
'custom_style'
|
180 |
-
|
181 |
-
|
182 |
);
|
183 |
|
184 |
$repeater->add_control(
|
185 |
'custom_logo_border_width',
|
186 |
-
|
187 |
-
'label'
|
188 |
-
'type'
|
189 |
-
'size_units'
|
190 |
-
'range'
|
191 |
-
'px' =>
|
192 |
'min' => 0,
|
193 |
'max' => 20,
|
194 |
-
|
195 |
-
|
196 |
-
'selectors'
|
197 |
'{{WRAPPER}} {{CURRENT_ITEM}}.pp-logo-grid-item-custom' => 'border-width: {{SIZE}}{{UNIT}};',
|
198 |
-
|
199 |
-
'condition'
|
200 |
-
'custom_style'
|
201 |
-
|
202 |
-
|
203 |
);
|
204 |
|
205 |
$repeater->end_controls_tab();
|
@@ -208,218 +231,233 @@ class Logo_Grid extends Powerpack_Widget {
|
|
208 |
|
209 |
$this->add_control(
|
210 |
'pp_logos',
|
211 |
-
|
212 |
-
'label'
|
213 |
-
'type'
|
214 |
-
'default'
|
215 |
-
|
216 |
-
'logo_image' =>
|
217 |
'url' => Utils::get_placeholder_image_src(),
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
'logo_image' =>
|
222 |
'url' => Utils::get_placeholder_image_src(),
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
'logo_image' =>
|
227 |
'url' => Utils::get_placeholder_image_src(),
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
'fields'
|
232 |
-
'title_field'
|
233 |
-
|
234 |
);
|
235 |
|
236 |
$this->add_control(
|
237 |
'title_html_tag',
|
238 |
-
|
239 |
-
'label'
|
240 |
-
'type'
|
241 |
-
'default'
|
242 |
-
'options'
|
243 |
-
'h1'
|
244 |
-
'h2'
|
245 |
-
'h3'
|
246 |
-
'h4'
|
247 |
-
'h5'
|
248 |
-
'h6'
|
249 |
-
'div'
|
250 |
-
'span'
|
251 |
-
'p'
|
252 |
-
|
253 |
-
'separator'
|
254 |
-
|
255 |
);
|
256 |
|
257 |
$this->add_responsive_control(
|
258 |
'columns',
|
259 |
-
|
260 |
-
'label'
|
261 |
-
'type'
|
262 |
-
'default'
|
263 |
-
'tablet_default'
|
264 |
-
'mobile_default'
|
265 |
-
'options'
|
266 |
'1' => '1',
|
267 |
'2' => '2',
|
268 |
'3' => '3',
|
269 |
'4' => '4',
|
270 |
'5' => '5',
|
271 |
'6' => '6',
|
272 |
-
|
273 |
-
'prefix_class'
|
274 |
-
'frontend_available'
|
275 |
-
|
276 |
);
|
277 |
|
278 |
$this->add_responsive_control(
|
279 |
'logos_spacing',
|
280 |
-
|
281 |
-
'label'
|
282 |
-
'type'
|
283 |
-
'size_units'
|
284 |
-
'
|
285 |
-
|
|
|
286 |
'min' => 0,
|
287 |
'max' => 100,
|
288 |
-
|
289 |
-
|
290 |
-
'selectors'
|
291 |
'(desktop){{WRAPPER}} .pp-grid-item-wrap' => 'width: calc( ( 100% - (({{columns.SIZE}} - 1) * {{SIZE}}{{UNIT}}) ) / {{columns.SIZE}} ); margin-right: {{SIZE}}{{UNIT}}; margin-bottom: {{SIZE}}{{UNIT}};',
|
292 |
'(tablet){{WRAPPER}} .pp-grid-item-wrap' => 'width: calc( ( 100% - (({{columns_tablet.SIZE}} - 1) * {{SIZE}}{{UNIT}}) ) / {{columns_tablet.SIZE}} ); margin-right: {{SIZE}}{{UNIT}}; margin-bottom: {{SIZE}}{{UNIT}};',
|
293 |
'(mobile){{WRAPPER}} .pp-grid-item-wrap' => 'width: calc( ( 100% - (({{columns_mobile.SIZE}} - 1) * {{SIZE}}{{UNIT}}) ) / {{columns_mobile.SIZE}} ); margin-right: {{SIZE}}{{UNIT}}; margin-bottom: {{SIZE}}{{UNIT}};',
|
294 |
-
|
295 |
-
|
296 |
);
|
297 |
|
298 |
$this->add_control(
|
299 |
'logos_vertical_align',
|
300 |
-
|
301 |
-
'label'
|
302 |
-
'type'
|
303 |
-
'label_block'
|
304 |
-
'default'
|
305 |
-
'options'
|
306 |
-
'top'
|
307 |
-
'title'
|
308 |
-
'icon'
|
309 |
-
|
310 |
-
'middle'
|
311 |
-
'title'
|
312 |
-
'icon'
|
313 |
-
|
314 |
-
'bottom'
|
315 |
-
'title'
|
316 |
-
'icon'
|
317 |
-
|
318 |
-
|
319 |
-
'selectors'
|
320 |
'{{WRAPPER}} .pp-logo-grid .pp-grid-item-wrap' => 'align-items: {{VALUE}};',
|
321 |
-
|
322 |
-
'selectors_dictionary'
|
323 |
-
'top'
|
324 |
-
'middle'
|
325 |
-
'bottom'
|
326 |
-
|
327 |
-
|
328 |
);
|
329 |
|
330 |
$this->add_control(
|
331 |
'logos_horizontal_align',
|
332 |
-
|
333 |
-
'label'
|
334 |
-
'type'
|
335 |
-
'label_block'
|
336 |
-
'options'
|
337 |
-
'left'
|
338 |
'title' => __( 'Left', 'powerpack' ),
|
339 |
'icon' => 'eicon-h-align-left',
|
340 |
-
|
341 |
-
'center'
|
342 |
'title' => __( 'Center', 'powerpack' ),
|
343 |
'icon' => 'eicon-h-align-center',
|
344 |
-
|
345 |
-
'right'
|
346 |
'title' => __( 'Right', 'powerpack' ),
|
347 |
'icon' => 'eicon-h-align-right',
|
348 |
-
|
349 |
-
|
350 |
-
'default'
|
351 |
-
'selectors_dictionary'
|
352 |
-
'left'
|
353 |
-
'center'
|
354 |
-
'right'
|
355 |
-
|
356 |
-
'selectors'
|
357 |
'{{WRAPPER}} .pp-logo-grid .pp-grid-item-wrap, {{WRAPPER}} .pp-logo-grid .pp-grid-item' => 'justify-content: {{VALUE}};',
|
358 |
-
|
359 |
-
|
360 |
);
|
361 |
|
362 |
$this->add_group_control(
|
363 |
Group_Control_Image_Size::get_type(),
|
364 |
-
|
365 |
-
'name'
|
366 |
-
'label'
|
367 |
-
'default'
|
368 |
-
|
369 |
);
|
370 |
|
371 |
$this->add_responsive_control(
|
372 |
'logos_width',
|
373 |
-
|
374 |
-
'label'
|
375 |
-
'type'
|
376 |
-
'size_units'
|
377 |
-
'range'
|
378 |
-
'px' =>
|
379 |
-
'min'
|
380 |
-
'max'
|
381 |
-
'step'
|
382 |
-
|
383 |
-
|
384 |
-
'selectors'
|
385 |
'{{WRAPPER}} .pp-grid-item img' => 'width: {{SIZE}}{{UNIT}};',
|
386 |
-
|
387 |
-
|
388 |
);
|
389 |
|
390 |
$this->end_controls_section();
|
|
|
391 |
|
392 |
-
|
393 |
-
* Content Tab: Docs Links
|
394 |
-
*
|
395 |
-
* @since 1.4.8
|
396 |
-
* @access protected
|
397 |
-
*/
|
398 |
-
$this->start_controls_section(
|
399 |
-
'section_help_docs',
|
400 |
-
array(
|
401 |
-
'label' => __( 'Help Docs', 'powerpack' ),
|
402 |
-
)
|
403 |
-
);
|
404 |
|
405 |
-
$
|
406 |
-
'help_doc_1',
|
407 |
-
array(
|
408 |
-
'type' => Controls_Manager::RAW_HTML,
|
409 |
-
/* translators: %1$s doc link */
|
410 |
-
'raw' => sprintf( __( '%1$s Widget Overview %2$s', 'powerpack' ), '<a href="https://powerpackelements.com/docs/powerpack/widgets/logo-grid/logo-grid-widget-overview/?utm_source=widget&utm_medium=panel&utm_campaign=userkb" target="_blank" rel="noopener">', '</a>' ),
|
411 |
-
'content_classes' => 'pp-editor-doc-links',
|
412 |
-
)
|
413 |
-
);
|
414 |
|
415 |
-
$
|
416 |
|
417 |
-
if ( ! is_pp_elements_active() ) {
|
418 |
/**
|
419 |
-
* Content Tab:
|
420 |
*
|
421 |
-
* @since 1.
|
|
|
422 |
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
423 |
$this->start_controls_section(
|
424 |
'section_upgrade_powerpack',
|
425 |
array(
|
@@ -440,200 +478,200 @@ class Logo_Grid extends Powerpack_Widget {
|
|
440 |
|
441 |
$this->end_controls_section();
|
442 |
}
|
|
|
443 |
|
444 |
-
|
445 |
-
|
446 |
-
|
447 |
-
STYLE TAB
|
448 |
-
/*-----------------------------------------------------------------------------------*/
|
449 |
|
|
|
450 |
$this->start_controls_section(
|
451 |
'section_logos_style',
|
452 |
-
|
453 |
-
'label'
|
454 |
-
'tab'
|
455 |
-
|
456 |
);
|
457 |
|
458 |
$this->start_controls_tabs( 'tabs_logos_style' );
|
459 |
|
460 |
$this->start_controls_tab(
|
461 |
'tab_logos_normal',
|
462 |
-
|
463 |
-
'label'
|
464 |
-
|
465 |
);
|
466 |
|
467 |
$this->add_group_control(
|
468 |
Group_Control_Background::get_type(),
|
469 |
-
|
470 |
-
'name'
|
471 |
-
'label'
|
472 |
-
'types'
|
473 |
-
'selector'
|
474 |
-
|
475 |
);
|
476 |
|
477 |
$this->add_group_control(
|
478 |
Group_Control_Border::get_type(),
|
479 |
-
|
480 |
-
'name'
|
481 |
-
'label'
|
482 |
-
'placeholder'
|
483 |
-
'default'
|
484 |
-
'selector'
|
485 |
-
|
486 |
);
|
487 |
|
488 |
$this->add_control(
|
489 |
'logo_border_radius',
|
490 |
-
|
491 |
-
'label'
|
492 |
-
'type'
|
493 |
-
'size_units'
|
494 |
-
'selectors'
|
495 |
'{{WRAPPER}} .pp-grid-item-wrap, {{WRAPPER}} .pp-grid-item img' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
496 |
-
|
497 |
-
|
498 |
);
|
499 |
|
500 |
$this->add_responsive_control(
|
501 |
'logo_padding',
|
502 |
-
|
503 |
-
'label'
|
504 |
-
'type'
|
505 |
-
'size_units'
|
506 |
-
'selectors'
|
507 |
'{{WRAPPER}} .pp-grid-item-wrap' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
508 |
-
|
509 |
-
|
510 |
);
|
511 |
|
512 |
$this->add_control(
|
513 |
'grayscale_normal',
|
514 |
-
|
515 |
-
'label'
|
516 |
-
'type'
|
517 |
-
'default'
|
518 |
-
'label_on'
|
519 |
-
'label_off'
|
520 |
-
'return_value'
|
521 |
-
|
522 |
);
|
523 |
|
524 |
$this->add_control(
|
525 |
'opacity_normal',
|
526 |
-
|
527 |
-
'label'
|
528 |
-
'type'
|
529 |
-
'range'
|
530 |
-
'px' =>
|
531 |
-
'min'
|
532 |
-
'max'
|
533 |
-
'step'
|
534 |
-
|
535 |
-
|
536 |
-
'selectors'
|
537 |
'{{WRAPPER}} .pp-grid-item img' => 'opacity: {{SIZE}};',
|
538 |
-
|
539 |
-
|
540 |
);
|
541 |
|
542 |
$this->add_group_control(
|
543 |
Group_Control_Box_Shadow::get_type(),
|
544 |
-
|
545 |
-
'name'
|
546 |
-
'selector'
|
547 |
-
'separator'
|
548 |
-
|
549 |
);
|
550 |
|
551 |
$this->end_controls_tab();
|
552 |
|
553 |
$this->start_controls_tab(
|
554 |
'tab_logos_hover',
|
555 |
-
|
556 |
-
'label'
|
557 |
-
|
558 |
);
|
559 |
|
560 |
$this->add_group_control(
|
561 |
Group_Control_Background::get_type(),
|
562 |
-
|
563 |
-
'name'
|
564 |
-
'label'
|
565 |
-
'types'
|
566 |
-
'selector'
|
567 |
-
|
568 |
);
|
569 |
|
570 |
$this->add_group_control(
|
571 |
Group_Control_Border::get_type(),
|
572 |
-
|
573 |
-
'name'
|
574 |
-
'label'
|
575 |
-
'placeholder'
|
576 |
-
'default'
|
577 |
-
'selector'
|
578 |
-
|
579 |
);
|
580 |
|
581 |
$this->add_responsive_control(
|
582 |
'translate',
|
583 |
-
|
584 |
-
'label'
|
585 |
-
'type'
|
586 |
-
'range'
|
587 |
-
'px' =>
|
588 |
-
'min'
|
589 |
-
'max'
|
590 |
-
'step'
|
591 |
-
|
592 |
-
|
593 |
-
'size_units'
|
594 |
-
'selectors'
|
595 |
'{{WRAPPER}} .pp-grid-item-wrap:hover' => 'transform:translateY({{SIZE}}{{UNIT}})',
|
596 |
-
|
597 |
-
|
598 |
);
|
599 |
|
600 |
$this->add_control(
|
601 |
'grayscale_hover',
|
602 |
-
|
603 |
-
'label'
|
604 |
-
'type'
|
605 |
-
'default'
|
606 |
-
'label_on'
|
607 |
-
'label_off'
|
608 |
-
'return_value'
|
609 |
-
|
610 |
);
|
611 |
|
612 |
$this->add_control(
|
613 |
'opacity_hover',
|
614 |
-
|
615 |
-
'label'
|
616 |
-
'type'
|
617 |
-
'range'
|
618 |
-
'px' =>
|
619 |
-
'min'
|
620 |
-
'max'
|
621 |
-
'step'
|
622 |
-
|
623 |
-
|
624 |
-
'selectors'
|
625 |
'{{WRAPPER}} .pp-grid-item:hover img' => 'opacity: {{SIZE}};',
|
626 |
-
|
627 |
-
|
628 |
);
|
629 |
|
630 |
$this->add_group_control(
|
631 |
Group_Control_Box_Shadow::get_type(),
|
632 |
-
|
633 |
-
'name'
|
634 |
-
'selector'
|
635 |
-
'separator'
|
636 |
-
|
637 |
);
|
638 |
|
639 |
$this->end_controls_tab();
|
@@ -641,53 +679,55 @@ class Logo_Grid extends Powerpack_Widget {
|
|
641 |
$this->end_controls_tabs();
|
642 |
|
643 |
$this->end_controls_section();
|
|
|
644 |
|
|
|
645 |
$this->start_controls_section(
|
646 |
'section_logo_title_style',
|
647 |
-
|
648 |
-
'label'
|
649 |
-
'tab'
|
650 |
-
|
651 |
);
|
652 |
|
653 |
$this->add_control(
|
654 |
'title_color',
|
655 |
-
|
656 |
-
'label'
|
657 |
-
'type'
|
658 |
-
'default'
|
659 |
-
'selectors'
|
660 |
'{{WRAPPER}} .pp-logo-grid-title' => 'color: {{VALUE}}',
|
661 |
-
|
662 |
-
|
663 |
);
|
664 |
|
665 |
$this->add_control(
|
666 |
'title_spacing',
|
667 |
-
|
668 |
-
'label'
|
669 |
-
'type'
|
670 |
-
'size_units'
|
671 |
-
'range'
|
672 |
-
'px' =>
|
673 |
'min' => 0,
|
674 |
'max' => 100,
|
675 |
-
|
676 |
-
|
677 |
-
'selectors'
|
678 |
'{{WRAPPER}} .pp-logo-grid-title' => 'margin-top: {{SIZE}}{{UNIT}};',
|
679 |
-
|
680 |
-
|
681 |
);
|
682 |
|
683 |
$this->add_group_control(
|
684 |
Group_Control_Typography::get_type(),
|
685 |
-
|
686 |
-
'name'
|
687 |
-
'label'
|
688 |
-
'scheme'
|
689 |
-
'selector'
|
690 |
-
|
691 |
);
|
692 |
|
693 |
$this->end_controls_section();
|
@@ -702,15 +742,15 @@ class Logo_Grid extends Powerpack_Widget {
|
|
702 |
*/
|
703 |
protected function render() {
|
704 |
$settings = $this->get_settings_for_display();
|
705 |
-
$i
|
706 |
|
707 |
$this->add_render_attribute( 'logo-grid', 'class', 'pp-logo-grid pp-elementor-grid clearfix' );
|
708 |
|
709 |
-
if ( $settings['grayscale_normal']
|
710 |
$this->add_render_attribute( 'logo-grid', 'class', 'grayscale-normal' );
|
711 |
}
|
712 |
|
713 |
-
if ( $settings['grayscale_hover']
|
714 |
$this->add_render_attribute( 'logo-grid', 'class', 'grayscale-hover' );
|
715 |
}
|
716 |
?>
|
@@ -724,7 +764,7 @@ class Logo_Grid extends Powerpack_Widget {
|
|
724 |
|
725 |
$this->add_render_attribute( 'logo-grid-item-' . $i, 'class', 'pp-grid-item' );
|
726 |
|
727 |
-
if ( $item['custom_style']
|
728 |
$this->add_render_attribute( 'logo-grid-item-wrap-' . $i, 'class', 'pp-logo-grid-item-custom' );
|
729 |
}
|
730 |
|
@@ -760,7 +800,7 @@ class Logo_Grid extends Powerpack_Widget {
|
|
760 |
if ( ! empty( $item['link']['url'] ) ) {
|
761 |
echo '</a>';
|
762 |
}
|
763 |
-
|
764 |
}
|
765 |
?>
|
766 |
</div>
|
@@ -803,12 +843,28 @@ class Logo_Grid extends Powerpack_Widget {
|
|
803 |
*
|
804 |
* @access protected
|
805 |
*/
|
806 |
-
protected function
|
807 |
?>
|
808 |
<#
|
809 |
var i = 1;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
810 |
#>
|
811 |
-
<div
|
812 |
<# _.each( settings.pp_logos, function( item ) { #>
|
813 |
<# if ( item.logo_image.url != '' ) { #>
|
814 |
<#
|
@@ -846,7 +902,7 @@ class Logo_Grid extends Powerpack_Widget {
|
|
846 |
}
|
847 |
#>
|
848 |
<img src="{{{ image_url }}}" alt="{{ item.title }}"/>
|
849 |
-
|
850 |
<# if ( item.link && item.link.url ) { #>
|
851 |
</a>
|
852 |
<# } #>
|
@@ -872,4 +928,18 @@ class Logo_Grid extends Powerpack_Widget {
|
|
872 |
</div>
|
873 |
<?php
|
874 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
875 |
}
|
2 |
namespace PowerpackElementsLite\Modules\Logos\Widgets;
|
3 |
|
4 |
use PowerpackElementsLite\Base\Powerpack_Widget;
|
5 |
+
use PowerpackElementsLite\Classes\PP_Config;
|
6 |
|
7 |
// Elementor Classes
|
8 |
use Elementor\Controls_Manager;
|
80 |
*
|
81 |
* @access protected
|
82 |
*/
|
83 |
+
protected function _register_controls() { // phpcs:ignore PSR2.Methods.MethodDeclaration.Underscore
|
84 |
+
$this->register_controls();
|
85 |
+
}
|
86 |
|
87 |
+
/**
|
88 |
+
* Register logo grid widget controls.
|
89 |
+
*
|
90 |
+
* Adds different input fields to allow the user to change and customize the widget settings.
|
91 |
+
*
|
92 |
+
* @since 2.1.4
|
93 |
+
* @access protected
|
94 |
+
*/
|
95 |
+
protected function register_controls() {
|
96 |
+
/* Content Tab */
|
97 |
+
$this->register_content_logo_grid_controls();
|
98 |
+
$this->register_content_help_docs_controls();
|
99 |
+
$this->register_content_upgrade_controls();
|
100 |
+
|
101 |
+
/* Style Tab */
|
102 |
+
$this->register_content_logos_controls();
|
103 |
+
$this->register_content_title_controls();
|
104 |
+
}
|
105 |
+
|
106 |
+
protected function register_content_logo_grid_controls() {
|
107 |
$this->start_controls_section(
|
108 |
'section_logo_grid',
|
109 |
+
[
|
110 |
+
'label' => __( 'Logo Grid', 'powerpack' ),
|
111 |
+
]
|
112 |
);
|
113 |
|
114 |
$repeater = new Repeater();
|
115 |
|
116 |
$repeater->start_controls_tabs( 'items_repeater' );
|
117 |
|
118 |
+
$repeater->start_controls_tab( 'tab_content', [ 'label' => __( 'Content', 'powerpack' ) ] );
|
119 |
|
120 |
$repeater->add_control(
|
121 |
'logo_image',
|
122 |
+
[
|
123 |
+
'label' => __( 'Upload Logo Image', 'powerpack' ),
|
124 |
+
'type' => Controls_Manager::MEDIA,
|
125 |
+
'dynamic' => [
|
126 |
+
'active' => true,
|
127 |
+
],
|
128 |
+
'default' => [
|
129 |
'url' => Utils::get_placeholder_image_src(),
|
130 |
+
],
|
131 |
+
]
|
132 |
);
|
133 |
|
134 |
$repeater->add_control(
|
135 |
'title',
|
136 |
+
[
|
137 |
+
'label' => __( 'Title', 'powerpack' ),
|
138 |
+
'type' => Controls_Manager::TEXT,
|
139 |
+
'dynamic' => [
|
140 |
+
'active' => true,
|
141 |
+
],
|
142 |
+
]
|
143 |
);
|
144 |
|
145 |
$repeater->add_control(
|
146 |
'link',
|
147 |
+
[
|
148 |
+
'label' => __( 'Link', 'powerpack' ),
|
149 |
+
'type' => Controls_Manager::URL,
|
150 |
+
'dynamic' => [
|
151 |
+
'active' => true,
|
152 |
+
],
|
153 |
+
'placeholder' => 'https://www.your-link.com',
|
154 |
+
'default' => [
|
155 |
'url' => '',
|
156 |
+
],
|
157 |
+
]
|
158 |
);
|
159 |
|
160 |
$repeater->end_controls_tab();
|
161 |
|
162 |
+
$repeater->start_controls_tab( 'tab_style', [ 'label' => __( 'Style', 'powerpack' ) ] );
|
163 |
|
164 |
$repeater->add_control(
|
165 |
'custom_style',
|
166 |
+
[
|
167 |
+
'label' => __( 'Custom Style', 'powerpack' ),
|
168 |
+
'type' => Controls_Manager::SWITCHER,
|
169 |
+
'description' => __( 'Add custom styles which will affect only this item', 'powerpack' ),
|
170 |
+
'default' => '',
|
171 |
+
'label_on' => __( 'On', 'powerpack' ),
|
172 |
+
'label_off' => __( 'Off', 'powerpack' ),
|
173 |
+
'return_value' => 'yes',
|
174 |
+
]
|
175 |
);
|
176 |
|
177 |
$repeater->add_control(
|
178 |
'custom_logo_wrapper_bg',
|
179 |
+
[
|
180 |
+
'label' => __( 'Background Color', 'powerpack' ),
|
181 |
+
'type' => Controls_Manager::COLOR,
|
182 |
+
'default' => '',
|
183 |
+
'selectors' => [
|
184 |
'{{WRAPPER}} {{CURRENT_ITEM}}.pp-logo-grid-item-custom' => 'background-color: {{VALUE}}',
|
185 |
+
],
|
186 |
+
'condition' => [
|
187 |
+
'custom_style' => 'yes',
|
188 |
+
],
|
189 |
+
]
|
190 |
);
|
191 |
|
192 |
$repeater->add_control(
|
193 |
'custom_logo_wrapper_border_color',
|
194 |
+
[
|
195 |
+
'label' => __( 'Border Color', 'powerpack' ),
|
196 |
+
'type' => Controls_Manager::COLOR,
|
197 |
+
'default' => '',
|
198 |
+
'selectors' => [
|
199 |
'{{WRAPPER}} {{CURRENT_ITEM}}.pp-logo-grid-item-custom' => 'border-color: {{VALUE}}',
|
200 |
+
],
|
201 |
+
'condition' => [
|
202 |
+
'custom_style' => 'yes',
|
203 |
+
],
|
204 |
+
]
|
205 |
);
|
206 |
|
207 |
$repeater->add_control(
|
208 |
'custom_logo_border_width',
|
209 |
+
[
|
210 |
+
'label' => __( 'Border Width', 'powerpack' ),
|
211 |
+
'type' => Controls_Manager::SLIDER,
|
212 |
+
'size_units' => [ 'px' ],
|
213 |
+
'range' => [
|
214 |
+
'px' => [
|
215 |
'min' => 0,
|
216 |
'max' => 20,
|
217 |
+
],
|
218 |
+
],
|
219 |
+
'selectors' => [
|
220 |
'{{WRAPPER}} {{CURRENT_ITEM}}.pp-logo-grid-item-custom' => 'border-width: {{SIZE}}{{UNIT}};',
|
221 |
+
],
|
222 |
+
'condition' => [
|
223 |
+
'custom_style' => 'yes',
|
224 |
+
],
|
225 |
+
]
|
226 |
);
|
227 |
|
228 |
$repeater->end_controls_tab();
|
231 |
|
232 |
$this->add_control(
|
233 |
'pp_logos',
|
234 |
+
[
|
235 |
+
'label' => __( 'Add Logos', 'powerpack' ),
|
236 |
+
'type' => Controls_Manager::REPEATER,
|
237 |
+
'default' => [
|
238 |
+
[
|
239 |
+
'logo_image' => [
|
240 |
'url' => Utils::get_placeholder_image_src(),
|
241 |
+
],
|
242 |
+
],
|
243 |
+
[
|
244 |
+
'logo_image' => [
|
245 |
'url' => Utils::get_placeholder_image_src(),
|
246 |
+
],
|
247 |
+
],
|
248 |
+
[
|
249 |
+
'logo_image' => [
|
250 |
'url' => Utils::get_placeholder_image_src(),
|
251 |
+
],
|
252 |
+
],
|
253 |
+
],
|
254 |
+
'fields' => $repeater->get_controls(),
|
255 |
+
'title_field' => __( 'Logo Image', 'powerpack' ),
|
256 |
+
]
|
257 |
);
|
258 |
|
259 |
$this->add_control(
|
260 |
'title_html_tag',
|
261 |
+
[
|
262 |
+
'label' => __( 'Title HTML Tag', 'powerpack' ),
|
263 |
+
'type' => Controls_Manager::SELECT,
|
264 |
+
'default' => 'h4',
|
265 |
+
'options' => [
|
266 |
+
'h1' => __( 'H1', 'powerpack' ),
|
267 |
+
'h2' => __( 'H2', 'powerpack' ),
|
268 |
+
'h3' => __( 'H3', 'powerpack' ),
|
269 |
+
'h4' => __( 'H4', 'powerpack' ),
|
270 |
+
'h5' => __( 'H5', 'powerpack' ),
|
271 |
+
'h6' => __( 'H6', 'powerpack' ),
|
272 |
+
'div' => __( 'div', 'powerpack' ),
|
273 |
+
'span' => __( 'span', 'powerpack' ),
|
274 |
+
'p' => __( 'p', 'powerpack' ),
|
275 |
+
],
|
276 |
+
'separator' => 'before',
|
277 |
+
]
|
278 |
);
|
279 |
|
280 |
$this->add_responsive_control(
|
281 |
'columns',
|
282 |
+
[
|
283 |
+
'label' => __( 'Columns', 'powerpack' ),
|
284 |
+
'type' => Controls_Manager::SELECT,
|
285 |
+
'default' => '3',
|
286 |
+
'tablet_default' => '2',
|
287 |
+
'mobile_default' => '1',
|
288 |
+
'options' => [
|
289 |
'1' => '1',
|
290 |
'2' => '2',
|
291 |
'3' => '3',
|
292 |
'4' => '4',
|
293 |
'5' => '5',
|
294 |
'6' => '6',
|
295 |
+
],
|
296 |
+
'prefix_class' => 'elementor-grid%s-',
|
297 |
+
'frontend_available' => true,
|
298 |
+
]
|
299 |
);
|
300 |
|
301 |
$this->add_responsive_control(
|
302 |
'logos_spacing',
|
303 |
+
[
|
304 |
+
'label' => __( 'Logos Gap', 'powerpack' ),
|
305 |
+
'type' => Controls_Manager::SLIDER,
|
306 |
+
'size_units' => [ 'px' ],
|
307 |
+
'default' => [ 'size' => 10 ],
|
308 |
+
'range' => [
|
309 |
+
'px' => [
|
310 |
'min' => 0,
|
311 |
'max' => 100,
|
312 |
+
],
|
313 |
+
],
|
314 |
+
'selectors' => [
|
315 |
'(desktop){{WRAPPER}} .pp-grid-item-wrap' => 'width: calc( ( 100% - (({{columns.SIZE}} - 1) * {{SIZE}}{{UNIT}}) ) / {{columns.SIZE}} ); margin-right: {{SIZE}}{{UNIT}}; margin-bottom: {{SIZE}}{{UNIT}};',
|
316 |
'(tablet){{WRAPPER}} .pp-grid-item-wrap' => 'width: calc( ( 100% - (({{columns_tablet.SIZE}} - 1) * {{SIZE}}{{UNIT}}) ) / {{columns_tablet.SIZE}} ); margin-right: {{SIZE}}{{UNIT}}; margin-bottom: {{SIZE}}{{UNIT}};',
|
317 |
'(mobile){{WRAPPER}} .pp-grid-item-wrap' => 'width: calc( ( 100% - (({{columns_mobile.SIZE}} - 1) * {{SIZE}}{{UNIT}}) ) / {{columns_mobile.SIZE}} ); margin-right: {{SIZE}}{{UNIT}}; margin-bottom: {{SIZE}}{{UNIT}};',
|
318 |
+
],
|
319 |
+
]
|
320 |
);
|
321 |
|
322 |
$this->add_control(
|
323 |
'logos_vertical_align',
|
324 |
+
[
|
325 |
+
'label' => __( 'Vertical Align', 'powerpack' ),
|
326 |
+
'type' => Controls_Manager::CHOOSE,
|
327 |
+
'label_block' => false,
|
328 |
+
'default' => 'top',
|
329 |
+
'options' => [
|
330 |
+
'top' => [
|
331 |
+
'title' => __( 'Top', 'powerpack' ),
|
332 |
+
'icon' => 'eicon-v-align-top',
|
333 |
+
],
|
334 |
+
'middle' => [
|
335 |
+
'title' => __( 'Center', 'powerpack' ),
|
336 |
+
'icon' => 'eicon-v-align-middle',
|
337 |
+
],
|
338 |
+
'bottom' => [
|
339 |
+
'title' => __( 'Bottom', 'powerpack' ),
|
340 |
+
'icon' => 'eicon-v-align-bottom',
|
341 |
+
],
|
342 |
+
],
|
343 |
+
'selectors' => [
|
344 |
'{{WRAPPER}} .pp-logo-grid .pp-grid-item-wrap' => 'align-items: {{VALUE}};',
|
345 |
+
],
|
346 |
+
'selectors_dictionary' => [
|
347 |
+
'top' => 'flex-start',
|
348 |
+
'middle' => 'center',
|
349 |
+
'bottom' => 'flex-end',
|
350 |
+
],
|
351 |
+
]
|
352 |
);
|
353 |
|
354 |
$this->add_control(
|
355 |
'logos_horizontal_align',
|
356 |
+
[
|
357 |
+
'label' => __( 'Horizontal Align', 'powerpack' ),
|
358 |
+
'type' => Controls_Manager::CHOOSE,
|
359 |
+
'label_block' => false,
|
360 |
+
'options' => [
|
361 |
+
'left' => [
|
362 |
'title' => __( 'Left', 'powerpack' ),
|
363 |
'icon' => 'eicon-h-align-left',
|
364 |
+
],
|
365 |
+
'center' => [
|
366 |
'title' => __( 'Center', 'powerpack' ),
|
367 |
'icon' => 'eicon-h-align-center',
|
368 |
+
],
|
369 |
+
'right' => [
|
370 |
'title' => __( 'Right', 'powerpack' ),
|
371 |
'icon' => 'eicon-h-align-right',
|
372 |
+
],
|
373 |
+
],
|
374 |
+
'default' => 'center',
|
375 |
+
'selectors_dictionary' => [
|
376 |
+
'left' => 'flex-start',
|
377 |
+
'center' => 'center',
|
378 |
+
'right' => 'flex-end',
|
379 |
+
],
|
380 |
+
'selectors' => [
|
381 |
'{{WRAPPER}} .pp-logo-grid .pp-grid-item-wrap, {{WRAPPER}} .pp-logo-grid .pp-grid-item' => 'justify-content: {{VALUE}};',
|
382 |
+
],
|
383 |
+
]
|
384 |
);
|
385 |
|
386 |
$this->add_group_control(
|
387 |
Group_Control_Image_Size::get_type(),
|
388 |
+
[
|
389 |
+
'name' => 'image',
|
390 |
+
'label' => __( 'Image Size', 'powerpack' ),
|
391 |
+
'default' => 'full',
|
392 |
+
]
|
393 |
);
|
394 |
|
395 |
$this->add_responsive_control(
|
396 |
'logos_width',
|
397 |
+
[
|
398 |
+
'label' => __( 'Image Width', 'powerpack' ),
|
399 |
+
'type' => Controls_Manager::SLIDER,
|
400 |
+
'size_units' => [ 'px', '%' ],
|
401 |
+
'range' => [
|
402 |
+
'px' => [
|
403 |
+
'min' => 10,
|
404 |
+
'max' => 800,
|
405 |
+
'step' => 1,
|
406 |
+
],
|
407 |
+
],
|
408 |
+
'selectors' => [
|
409 |
'{{WRAPPER}} .pp-grid-item img' => 'width: {{SIZE}}{{UNIT}};',
|
410 |
+
],
|
411 |
+
]
|
412 |
);
|
413 |
|
414 |
$this->end_controls_section();
|
415 |
+
}
|
416 |
|
417 |
+
protected function register_content_help_docs_controls() {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
418 |
|
419 |
+
$help_docs = PP_Config::get_widget_help_links( 'Logo_Grid' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
420 |
|
421 |
+
if ( ! empty( $help_docs ) ) {
|
422 |
|
|
|
423 |
/**
|
424 |
+
* Content Tab: Help Docs
|
425 |
*
|
426 |
+
* @since 1.4.8
|
427 |
+
* @access protected
|
428 |
*/
|
429 |
+
$this->start_controls_section(
|
430 |
+
'section_help_docs',
|
431 |
+
[
|
432 |
+
'label' => __( 'Help Docs', 'powerpack' ),
|
433 |
+
]
|
434 |
+
);
|
435 |
+
|
436 |
+
$hd_counter = 1;
|
437 |
+
foreach ( $help_docs as $hd_title => $hd_link ) {
|
438 |
+
$this->add_control(
|
439 |
+
'help_doc_' . $hd_counter,
|
440 |
+
[
|
441 |
+
'type' => Controls_Manager::RAW_HTML,
|
442 |
+
'raw' => sprintf( '%1$s ' . $hd_title . ' %2$s', '<a href="' . $hd_link . '" target="_blank" rel="noopener">', '</a>' ),
|
443 |
+
'content_classes' => 'pp-editor-doc-links',
|
444 |
+
]
|
445 |
+
);
|
446 |
+
|
447 |
+
$hd_counter++;
|
448 |
+
}
|
449 |
+
|
450 |
+
$this->end_controls_section();
|
451 |
+
}
|
452 |
+
}
|
453 |
+
|
454 |
+
/**
|
455 |
+
* Register PowerPack Upgrade in Content tab
|
456 |
+
*
|
457 |
+
* @return void
|
458 |
+
*/
|
459 |
+
protected function register_content_upgrade_controls() {
|
460 |
+
if ( ! is_pp_elements_active() ) {
|
461 |
$this->start_controls_section(
|
462 |
'section_upgrade_powerpack',
|
463 |
array(
|
478 |
|
479 |
$this->end_controls_section();
|
480 |
}
|
481 |
+
}
|
482 |
|
483 |
+
/*-----------------------------------------------------------------------------------*/
|
484 |
+
/* STYLE TAB
|
485 |
+
/*-----------------------------------------------------------------------------------*/
|
|
|
|
|
486 |
|
487 |
+
protected function register_content_logos_controls() {
|
488 |
$this->start_controls_section(
|
489 |
'section_logos_style',
|
490 |
+
[
|
491 |
+
'label' => __( 'Logos', 'powerpack' ),
|
492 |
+
'tab' => Controls_Manager::TAB_STYLE,
|
493 |
+
]
|
494 |
);
|
495 |
|
496 |
$this->start_controls_tabs( 'tabs_logos_style' );
|
497 |
|
498 |
$this->start_controls_tab(
|
499 |
'tab_logos_normal',
|
500 |
+
[
|
501 |
+
'label' => __( 'Normal', 'powerpack' ),
|
502 |
+
]
|
503 |
);
|
504 |
|
505 |
$this->add_group_control(
|
506 |
Group_Control_Background::get_type(),
|
507 |
+
[
|
508 |
+
'name' => 'logo_bg',
|
509 |
+
'label' => __( 'Background', 'powerpack' ),
|
510 |
+
'types' => [ 'none', 'classic', 'gradient' ],
|
511 |
+
'selector' => '{{WRAPPER}} .pp-grid-item-wrap',
|
512 |
+
]
|
513 |
);
|
514 |
|
515 |
$this->add_group_control(
|
516 |
Group_Control_Border::get_type(),
|
517 |
+
[
|
518 |
+
'name' => 'logo_border',
|
519 |
+
'label' => __( 'Border', 'powerpack' ),
|
520 |
+
'placeholder' => '1px',
|
521 |
+
'default' => '1px',
|
522 |
+
'selector' => '{{WRAPPER}} .pp-grid-item-wrap',
|
523 |
+
]
|
524 |
);
|
525 |
|
526 |
$this->add_control(
|
527 |
'logo_border_radius',
|
528 |
+
[
|
529 |
+
'label' => __( 'Border Radius', 'powerpack' ),
|
530 |
+
'type' => Controls_Manager::DIMENSIONS,
|
531 |
+
'size_units' => [ 'px', '%' ],
|
532 |
+
'selectors' => [
|
533 |
'{{WRAPPER}} .pp-grid-item-wrap, {{WRAPPER}} .pp-grid-item img' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
534 |
+
],
|
535 |
+
]
|
536 |
);
|
537 |
|
538 |
$this->add_responsive_control(
|
539 |
'logo_padding',
|
540 |
+
[
|
541 |
+
'label' => __( 'Padding', 'powerpack' ),
|
542 |
+
'type' => Controls_Manager::DIMENSIONS,
|
543 |
+
'size_units' => [ 'px', '%' ],
|
544 |
+
'selectors' => [
|
545 |
'{{WRAPPER}} .pp-grid-item-wrap' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
546 |
+
],
|
547 |
+
]
|
548 |
);
|
549 |
|
550 |
$this->add_control(
|
551 |
'grayscale_normal',
|
552 |
+
[
|
553 |
+
'label' => __( 'Grayscale', 'powerpack' ),
|
554 |
+
'type' => Controls_Manager::SWITCHER,
|
555 |
+
'default' => 'no',
|
556 |
+
'label_on' => __( 'Yes', 'powerpack' ),
|
557 |
+
'label_off' => __( 'No', 'powerpack' ),
|
558 |
+
'return_value' => 'yes',
|
559 |
+
]
|
560 |
);
|
561 |
|
562 |
$this->add_control(
|
563 |
'opacity_normal',
|
564 |
+
[
|
565 |
+
'label' => __( 'Opacity', 'powerpack' ),
|
566 |
+
'type' => Controls_Manager::SLIDER,
|
567 |
+
'range' => [
|
568 |
+
'px' => [
|
569 |
+
'min' => 0,
|
570 |
+
'max' => 1,
|
571 |
+
'step' => 0.1,
|
572 |
+
],
|
573 |
+
],
|
574 |
+
'selectors' => [
|
575 |
'{{WRAPPER}} .pp-grid-item img' => 'opacity: {{SIZE}};',
|
576 |
+
],
|
577 |
+
]
|
578 |
);
|
579 |
|
580 |
$this->add_group_control(
|
581 |
Group_Control_Box_Shadow::get_type(),
|
582 |
+
[
|
583 |
+
'name' => 'pp_logo_box_shadow_normal',
|
584 |
+
'selector' => '{{WRAPPER}} .pp-grid-item-wrap',
|
585 |
+
'separator' => 'before',
|
586 |
+
]
|
587 |
);
|
588 |
|
589 |
$this->end_controls_tab();
|
590 |
|
591 |
$this->start_controls_tab(
|
592 |
'tab_logos_hover',
|
593 |
+
[
|
594 |
+
'label' => __( 'Hover', 'powerpack' ),
|
595 |
+
]
|
596 |
);
|
597 |
|
598 |
$this->add_group_control(
|
599 |
Group_Control_Background::get_type(),
|
600 |
+
[
|
601 |
+
'name' => 'logos_bg_hover',
|
602 |
+
'label' => __( 'Background', 'powerpack' ),
|
603 |
+
'types' => [ 'none', 'classic', 'gradient' ],
|
604 |
+
'selector' => '{{WRAPPER}} .pp-grid-item-wrap:hover',
|
605 |
+
]
|
606 |
);
|
607 |
|
608 |
$this->add_group_control(
|
609 |
Group_Control_Border::get_type(),
|
610 |
+
[
|
611 |
+
'name' => 'logo_border_hover',
|
612 |
+
'label' => __( 'Border', 'powerpack' ),
|
613 |
+
'placeholder' => '1px',
|
614 |
+
'default' => '1px',
|
615 |
+
'selector' => '{{WRAPPER}} .pp-grid-item-wrap:hover',
|
616 |
+
]
|
617 |
);
|
618 |
|
619 |
$this->add_responsive_control(
|
620 |
'translate',
|
621 |
+
[
|
622 |
+
'label' => __( 'Slide', 'powerpack' ),
|
623 |
+
'type' => Controls_Manager::SLIDER,
|
624 |
+
'range' => [
|
625 |
+
'px' => [
|
626 |
+
'min' => -40,
|
627 |
+
'max' => 40,
|
628 |
+
'step' => 1,
|
629 |
+
],
|
630 |
+
],
|
631 |
+
'size_units' => '',
|
632 |
+
'selectors' => [
|
633 |
'{{WRAPPER}} .pp-grid-item-wrap:hover' => 'transform:translateY({{SIZE}}{{UNIT}})',
|
634 |
+
],
|
635 |
+
]
|
636 |
);
|
637 |
|
638 |
$this->add_control(
|
639 |
'grayscale_hover',
|
640 |
+
[
|
641 |
+
'label' => __( 'Grayscale', 'powerpack' ),
|
642 |
+
'type' => Controls_Manager::SWITCHER,
|
643 |
+
'default' => 'no',
|
644 |
+
'label_on' => __( 'Yes', 'powerpack' ),
|
645 |
+
'label_off' => __( 'No', 'powerpack' ),
|
646 |
+
'return_value' => 'yes',
|
647 |
+
]
|
648 |
);
|
649 |
|
650 |
$this->add_control(
|
651 |
'opacity_hover',
|
652 |
+
[
|
653 |
+
'label' => __( 'Opacity', 'powerpack' ),
|
654 |
+
'type' => Controls_Manager::SLIDER,
|
655 |
+
'range' => [
|
656 |
+
'px' => [
|
657 |
+
'min' => 0,
|
658 |
+
'max' => 1,
|
659 |
+
'step' => 0.1,
|
660 |
+
],
|
661 |
+
],
|
662 |
+
'selectors' => [
|
663 |
'{{WRAPPER}} .pp-grid-item:hover img' => 'opacity: {{SIZE}};',
|
664 |
+
],
|
665 |
+
]
|
666 |
);
|
667 |
|
668 |
$this->add_group_control(
|
669 |
Group_Control_Box_Shadow::get_type(),
|
670 |
+
[
|
671 |
+
'name' => 'pp_logo_box_shadow_hover',
|
672 |
+
'selector' => '{{WRAPPER}} .pp-grid-item-wrap:hover',
|
673 |
+
'separator' => 'before',
|
674 |
+
]
|
675 |
);
|
676 |
|
677 |
$this->end_controls_tab();
|
679 |
$this->end_controls_tabs();
|
680 |
|
681 |
$this->end_controls_section();
|
682 |
+
}
|
683 |
|
684 |
+
protected function register_content_title_controls() {
|
685 |
$this->start_controls_section(
|
686 |
'section_logo_title_style',
|
687 |
+
[
|
688 |
+
'label' => __( 'Title', 'powerpack' ),
|
689 |
+
'tab' => Controls_Manager::TAB_STYLE,
|
690 |
+
]
|
691 |
);
|
692 |
|
693 |
$this->add_control(
|
694 |
'title_color',
|
695 |
+
[
|
696 |
+
'label' => __( 'Color', 'powerpack' ),
|
697 |
+
'type' => Controls_Manager::COLOR,
|
698 |
+
'default' => '',
|
699 |
+
'selectors' => [
|
700 |
'{{WRAPPER}} .pp-logo-grid-title' => 'color: {{VALUE}}',
|
701 |
+
],
|
702 |
+
]
|
703 |
);
|
704 |
|
705 |
$this->add_control(
|
706 |
'title_spacing',
|
707 |
+
[
|
708 |
+
'label' => __( 'Margin Top', 'powerpack' ),
|
709 |
+
'type' => Controls_Manager::SLIDER,
|
710 |
+
'size_units' => [ 'px' ],
|
711 |
+
'range' => [
|
712 |
+
'px' => [
|
713 |
'min' => 0,
|
714 |
'max' => 100,
|
715 |
+
],
|
716 |
+
],
|
717 |
+
'selectors' => [
|
718 |
'{{WRAPPER}} .pp-logo-grid-title' => 'margin-top: {{SIZE}}{{UNIT}};',
|
719 |
+
],
|
720 |
+
]
|
721 |
);
|
722 |
|
723 |
$this->add_group_control(
|
724 |
Group_Control_Typography::get_type(),
|
725 |
+
[
|
726 |
+
'name' => 'title_typography',
|
727 |
+
'label' => __( 'Typography', 'powerpack' ),
|
728 |
+
'scheme' => Scheme_Typography::TYPOGRAPHY_4,
|
729 |
+
'selector' => '{{WRAPPER}} .pp-logo-grid-title',
|
730 |
+
]
|
731 |
);
|
732 |
|
733 |
$this->end_controls_section();
|
742 |
*/
|
743 |
protected function render() {
|
744 |
$settings = $this->get_settings_for_display();
|
745 |
+
$i = 1;
|
746 |
|
747 |
$this->add_render_attribute( 'logo-grid', 'class', 'pp-logo-grid pp-elementor-grid clearfix' );
|
748 |
|
749 |
+
if ( 'yes' === $settings['grayscale_normal'] ) {
|
750 |
$this->add_render_attribute( 'logo-grid', 'class', 'grayscale-normal' );
|
751 |
}
|
752 |
|
753 |
+
if ( 'yes' === $settings['grayscale_hover'] ) {
|
754 |
$this->add_render_attribute( 'logo-grid', 'class', 'grayscale-hover' );
|
755 |
}
|
756 |
?>
|
764 |
|
765 |
$this->add_render_attribute( 'logo-grid-item-' . $i, 'class', 'pp-grid-item' );
|
766 |
|
767 |
+
if ( 'yes' === $item['custom_style'] ) {
|
768 |
$this->add_render_attribute( 'logo-grid-item-wrap-' . $i, 'class', 'pp-logo-grid-item-custom' );
|
769 |
}
|
770 |
|
800 |
if ( ! empty( $item['link']['url'] ) ) {
|
801 |
echo '</a>';
|
802 |
}
|
803 |
+
printf( '</%1$s>', $settings['title_html_tag'] );
|
804 |
}
|
805 |
?>
|
806 |
</div>
|
843 |
*
|
844 |
* @access protected
|
845 |
*/
|
846 |
+
protected function content_template() {
|
847 |
?>
|
848 |
<#
|
849 |
var i = 1;
|
850 |
+
|
851 |
+
view.addRenderAttribute( 'logo-grid', {
|
852 |
+
'class': 'pp-logo-grid pp-elementor-grid clearfix',
|
853 |
+
});
|
854 |
+
|
855 |
+
if ( settings.grayscale_normal == 'yes' ) {
|
856 |
+
view.addRenderAttribute( 'logo-grid', {
|
857 |
+
'class': 'grayscale-normal',
|
858 |
+
});
|
859 |
+
}
|
860 |
+
|
861 |
+
if ( settings.grayscale_hover == 'yes' ) {
|
862 |
+
view.addRenderAttribute( 'logo-grid', {
|
863 |
+
'class': 'grayscale-hover',
|
864 |
+
});
|
865 |
+
}
|
866 |
#>
|
867 |
+
<div {{{ view.getRenderAttributeString( 'logo-grid' ) }}}>
|
868 |
<# _.each( settings.pp_logos, function( item ) { #>
|
869 |
<# if ( item.logo_image.url != '' ) { #>
|
870 |
<#
|
902 |
}
|
903 |
#>
|
904 |
<img src="{{{ image_url }}}" alt="{{ item.title }}"/>
|
905 |
+
|
906 |
<# if ( item.link && item.link.url ) { #>
|
907 |
</a>
|
908 |
<# } #>
|
928 |
</div>
|
929 |
<?php
|
930 |
}
|
931 |
+
|
932 |
+
/**
|
933 |
+
* Render logo grid widget output in the editor.
|
934 |
+
*
|
935 |
+
* Written as a Backbone JavaScript template and used to generate the live preview.
|
936 |
+
*
|
937 |
+
* Remove this after Elementor v3.3.0
|
938 |
+
*
|
939 |
+
* @since 1.0.0
|
940 |
+
* @access protected
|
941 |
+
*/
|
942 |
+
protected function _content_template() { // phpcs:ignore PSR2.Methods.MethodDeclaration.Underscore
|
943 |
+
$this->content_template();
|
944 |
+
}
|
945 |
}
|
package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
{
|
2 |
"name": "powerpack-lite-for-elementor",
|
3 |
-
"version": "2.1.
|
4 |
"description": "Extend Elementor Page Builder with 50+ Creative Widgets.",
|
5 |
"keywords": [],
|
6 |
"author": "IdeaBox Creations",
|
1 |
{
|
2 |
"name": "powerpack-lite-for-elementor",
|
3 |
+
"version": "2.1.4",
|
4 |
"description": "Extend Elementor Page Builder with 50+ Creative Widgets.",
|
5 |
"keywords": [],
|
6 |
"author": "IdeaBox Creations",
|
powerpack-lite-elementor.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Plugin Name: PowerPack Lite for Elementor
|
4 |
* Plugin URI: https://powerpackelements.com
|
5 |
* Description: Custom addons for Elementor page builder.
|
6 |
-
* Version: 2.1.
|
7 |
* Author: IdeaBox Creations
|
8 |
* Author URI: http://ideabox.io/
|
9 |
* License: GNU General Public License v2.0
|
@@ -14,7 +14,7 @@
|
|
14 |
|
15 |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
16 |
|
17 |
-
define( 'POWERPACK_ELEMENTS_LITE_VER', '2.1.
|
18 |
define( 'POWERPACK_ELEMENTS_LITE_PATH', plugin_dir_path( __FILE__ ) );
|
19 |
define( 'POWERPACK_ELEMENTS_LITE_BASE', plugin_basename( __FILE__ ) );
|
20 |
define( 'POWERPACK_ELEMENTS_LITE_URL', plugins_url( '/', __FILE__ ) );
|
3 |
* Plugin Name: PowerPack Lite for Elementor
|
4 |
* Plugin URI: https://powerpackelements.com
|
5 |
* Description: Custom addons for Elementor page builder.
|
6 |
+
* Version: 2.1.4
|
7 |
* Author: IdeaBox Creations
|
8 |
* Author URI: http://ideabox.io/
|
9 |
* License: GNU General Public License v2.0
|
14 |
|
15 |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
16 |
|
17 |
+
define( 'POWERPACK_ELEMENTS_LITE_VER', '2.1.4' );
|
18 |
define( 'POWERPACK_ELEMENTS_LITE_PATH', plugin_dir_path( __FILE__ ) );
|
19 |
define( 'POWERPACK_ELEMENTS_LITE_BASE', plugin_basename( __FILE__ ) );
|
20 |
define( 'POWERPACK_ELEMENTS_LITE_URL', plugins_url( '/', __FILE__ ) );
|
readme.txt
CHANGED
@@ -1,8 +1,8 @@
|
|
1 |
=== Elementor Addons - PowerPack Addons for Elementor ===
|
2 |
Contributors: ideaboxcreations, simrandeep, puneetsahalot, ibachal, jainnidhi, prash17, nirbhay18
|
3 |
Tags: elementor, addons, elementor addon, elementor widgets, elements, powerpack elementor addon, essential addons
|
4 |
-
Requires at least:
|
5 |
-
Tested up to: 5.
|
6 |
Stable tag: trunk
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
@@ -11,7 +11,7 @@ A collection of 30+ Free Elementor addons widgets. Take Elementor to the next le
|
|
11 |
|
12 |
== Description ==
|
13 |
|
14 |
-
Extend Elementor with 60+ Creative Elementor Widgets and
|
15 |
|
16 |
PowerPack Elementor addon is built by [IdeaBox Creations](https://ideabox.io/?utm_medium=powerpack-lite&utm_source=repo-readme&utm_campaign=repo-demo-link).
|
17 |
|
@@ -28,15 +28,15 @@ Want to connect us with more? We have an active Facebook Group where we keep pos
|
|
28 |
|
29 |
## PowerPack Addons for Elementor Lite - Features
|
30 |
|
31 |
-
1. [Businsess Hours](https://powerpackelements.com/demo/business-hours/?utm_medium=powerpack-lite&utm_source=repo-readme&utm_campaign=repo-demo-link)
|
32 |
-
2. [Counter](https://powerpackelements.com/demo/counter/?utm_medium=powerpack-lite&utm_source=repo-readme&utm_campaign=repo-demo-link)
|
33 |
-
3. [Divider](https://powerpackelements.com/demo/divider/?utm_medium=powerpack-lite&utm_source=repo-readme&utm_campaign=repo-demo-link)
|
34 |
-
4. [Dual Heading](https://powerpackelements.com/demo/dual-heading/?utm_medium=powerpack-lite&utm_source=repo-readme&utm_campaign=repo-demo-link)
|
35 |
-
5. [Image Hotspots](https://powerpackelements.com/demo/image-hotspot/?utm_medium=powerpack-lite&utm_source=repo-readme&utm_campaign=repo-demo-link)
|
36 |
6. [Icon List](https://powerpackelements.com/demo/icon-list/?utm_medium=powerpack-lite&utm_source=repo-readme&utm_campaign=repo-demo-link) – A content widget that allows you to display list of features with font icons or numbers for bullet points.
|
37 |
-
7. [Image Comparison](https://powerpackelements.com/demo/image-comparison/?utm_medium=powerpack-lite&utm_source=repo-readme&utm_campaign=repo-demo-link)
|
38 |
-
8. [Info Box](https://powerpackelements.com/demo/info-box/?utm_medium=powerpack-lite&utm_source=repo-readme&utm_campaign=repo-demo-link)
|
39 |
-
9. [Info Box Carousel](https://powerpackelements.com/demo/info-box-carousel/?utm_medium=powerpack-lite&utm_source=repo-readme&utm_campaign=repo-demo-link)
|
40 |
10. [Info List](https://powerpackelements.com/demo/info-list/?utm_medium=powerpack-lite&utm_source=repo-readme&utm_campaign=repo-demo-link) – Another content widget that allows you to showcase product features and services with icon and description
|
41 |
11. [Info Table](https://powerpackelements.com/demo/info-table/?utm_medium=powerpack-lite&utm_source=repo-readme&utm_campaign=repo-demo-link) – This widget allows you to create beautiful content blocks with **icon, heading, description**, and **call-to-action** button/link.
|
42 |
12. [Instagram Feed](https://powerpackelements.com/demo/instagram-feed/?utm_medium=powerpack-lite&utm_source=repo-readme&utm_campaign=repo-demo-link) – A creative widget that allows you to display Instagram Gallery on your website with various impressive options.
|
@@ -115,7 +115,7 @@ https://www.youtube.com/watch?v=IoSvG1-0f4M
|
|
115 |
|
116 |
PowerPack template library includes 150+ ready-to-use section blocks. All block templates are precise work of our designers that can be used to create any website.
|
117 |
|
118 |
-
###
|
119 |
**Get Special WooCommerce Elementor widgets with PowerPack Pro**
|
120 |
|
121 |
1. [Woo Products](https://powerpackelements.com/demo/woo-product-grid/?utm_source=repo-readme&utm_medium=powerpack-lite&utm_campaign=repo-demo-link) - Multiple layout and styling options to create WooCommerce Product Grid and Carousel layouts on your Elementor website
|
@@ -125,13 +125,15 @@ PowerPack template library includes 150+ ready-to-use section blocks. All block
|
|
125 |
5. [Woo Checkout](https://powerpackelements.com/demo/woo-checkout/?utm_source=repo-readme&utm_medium=powerpack-lite&utm_campaign=repo-demo-link) - Another unique solution for WooCommerce to create beautiful Checkout page with Elementor free version. Create a single column or two column layout for checkout page. Styling options for input fields, form, sections, labels, buttons, etc. [Check out the video](https://www.youtube.com/watch?v=XFE04Mzk_p0)
|
126 |
6. [Woo Mini Cart](https://powerpackelements.com/demo/woo-mini-cart/?utm_source=repo-readme&utm_medium=powerpack-lite&utm_campaign=repo-demo-link) - Add a sleek, mini cart icon to your website's header/menu with Elementor and PowerPack Elementor addons. [Check out the video](https://www.youtube.com/watch?v=jkfzj3qXwGM)
|
127 |
7. [Woo Off-canvas Cart](https://powerpackelements.com/demo/woo-off-canvas-cart/?utm_source=repo-readme&utm_medium=powerpack-lite&utm_campaign=repo-demo-link) - Add a stunning off-canvas cart panel to your WooCommerce website. [Check out the video](https://www.youtube.com/watch?v=u1Wh5z6vpo4)
|
|
|
|
|
128 |
|
129 |
### NEW SCHEMA WIDGETS
|
130 |
**Boost your Search Engine Rankings with new, unique, Schema markup widgets for Elementor.**
|
131 |
|
132 |
1. [FAQ Schema Markup Widget](https://powerpackelements.com/elementor-widgets/faq/?utm_source=repo-readme&utm_medium=powerpack-lite&utm_campaign=repo-demo-link) – Create a search engine optimized FAQ Page for your site with FAQ Schema markup widget and leverage the power of Structured Data.
|
133 |
2. [How-to Schema Markup Widget](https://powerpackelements.com/elementor-widgets/how-to/?utm_source=repo-readme&utm_medium=powerpack-lite&utm_campaign=repo-demo-link) – Easily create stylish How-to Guides, Tutorials, and walk-throughs.
|
134 |
-
|
135 |
### CREATIVE EXTENSIONS
|
136 |
1. **Advanced Display Conditions Functionality**
|
137 |
Use Elementor for advanced cases like timed-content, content for logged in users, special content based on user's browser, display content based on page, post, archive rules, and much more. The most UNIQUE solution for Elementor widgets and sections. [Click here for details.](https://powerpackelements.com/display-conditions/?utm_source=repo-readme&utm_medium=powerpack-lite&utm_campaign=repo-demo-link)
|
@@ -139,7 +141,7 @@ Use Elementor for advanced cases like timed-content, content for logged in users
|
|
139 |
https://www.youtube.com/watch?v=blCGxZujnJg
|
140 |
|
141 |
[Header Footer Builder](https://powerpackelements.com/elementor-widgets/header-footer-builder-elementor/?utm_source=repo-readme&utm_medium=powerpack-lite&utm_campaign=repo-demo-link)
|
142 |
-
Create a custom
|
143 |
[Magic Wand Feature](https://powerpackelements.com/elementor-widgets/cross-domain-copy-paste/?utm_source=repo-readme&utm_medium=powerpack-lite&utm_campaign=repo-demo-link)
|
144 |
Copy-paste content from one domain to another easily.
|
145 |
[BackGround Effects](https://powerpackelements.com/elementor-widgets/background-effects/?utm_source=repo-readme&utm_medium=powerpack-lite&utm_campaign=repo-demo-link)
|
@@ -154,9 +156,11 @@ Self-branding is extremely important when you are working for third-party client
|
|
154 |
|
155 |
- **Light weight, fast, and easy to use**
|
156 |
PowerPack for Elementor boasts of superior code quality optimized for performance. Minimal usage of external scripts helps you maintain superior loading time for your websites.
|
157 |
-
|
|
|
158 |
All the Elementor Widgets included with PowerPack come with well-thought design and styling options. These options make it easy for you to build creative layouts without having to worry about the custom code.
|
159 |
-
|
|
|
160 |
PowerPack Addon for Elementor comes from our team of experts, who always deliver the best and try to fix all of their queries earliest.
|
161 |
|
162 |
## Other Elementor Plugins
|
@@ -197,6 +201,13 @@ Not at all! All the widgets and settings are easy to use with drag & drop interf
|
|
197 |
|
198 |
== Changelog ==
|
199 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
200 |
= 2.1.3 - August 31, 2020 =
|
201 |
* Fixed: Buttons - Tooltip styling options were not working in buttons widget
|
202 |
* Fixed: Info Box Carousel - Icon type image was not showing on frontend
|
1 |
=== Elementor Addons - PowerPack Addons for Elementor ===
|
2 |
Contributors: ideaboxcreations, simrandeep, puneetsahalot, ibachal, jainnidhi, prash17, nirbhay18
|
3 |
Tags: elementor, addons, elementor addon, elementor widgets, elements, powerpack elementor addon, essential addons
|
4 |
+
Requires at least: 5.0
|
5 |
+
Tested up to: 5.5.1
|
6 |
Stable tag: trunk
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
12 |
== Description ==
|
13 |
|
14 |
+
Extend Elementor with 60+ Creative Elementor Widgets and extensions with [PowerPack Elementor addons](https://powerpackelements.com/?utm_medium=powerpack-lite&utm_source=repo-readme&utm_campaign=repo-demo-link) - The fastest growing Elementor addon. Get 30+ Free Elementor widgets with PowerPack Lite. These Elementor widgets are designed with focus on creativity and usability. With PowerPack, building Elementor websites will be faster than ever!
|
15 |
|
16 |
PowerPack Elementor addon is built by [IdeaBox Creations](https://ideabox.io/?utm_medium=powerpack-lite&utm_source=repo-readme&utm_campaign=repo-demo-link).
|
17 |
|
28 |
|
29 |
## PowerPack Addons for Elementor Lite - Features
|
30 |
|
31 |
+
1. [Businsess Hours](https://powerpackelements.com/demo/business-hours/?utm_medium=powerpack-lite&utm_source=repo-readme&utm_campaign=repo-demo-link) - A content widget that allows you to display opening and closing hours with various styling options.
|
32 |
+
2. [Counter](https://powerpackelements.com/demo/counter/?utm_medium=powerpack-lite&utm_source=repo-readme&utm_campaign=repo-demo-link) - An impressive widget that allows you to show important facts on your website.
|
33 |
+
3. [Divider](https://powerpackelements.com/demo/divider/?utm_medium=powerpack-lite&utm_source=repo-readme&utm_campaign=repo-demo-link) - This widget allows you to create a stylish break to your content with fancy dividers.
|
34 |
+
4. [Dual Heading](https://powerpackelements.com/demo/dual-heading/?utm_medium=powerpack-lite&utm_source=repo-readme&utm_campaign=repo-demo-link) - A creative widget that lets you highlight other words in a heading with different color and variation.
|
35 |
+
5. [Image Hotspots](https://powerpackelements.com/demo/image-hotspot/?utm_medium=powerpack-lite&utm_source=repo-readme&utm_campaign=repo-demo-link) - With Image Hotspot widget, you can display feature of the product, create virtual tours, display information easily and interactively.
|
36 |
6. [Icon List](https://powerpackelements.com/demo/icon-list/?utm_medium=powerpack-lite&utm_source=repo-readme&utm_campaign=repo-demo-link) – A content widget that allows you to display list of features with font icons or numbers for bullet points.
|
37 |
+
7. [Image Comparison](https://powerpackelements.com/demo/image-comparison/?utm_medium=powerpack-lite&utm_source=repo-readme&utm_campaign=repo-demo-link) - With this widget, you can compare before and after versions of the image.
|
38 |
+
8. [Info Box](https://powerpackelements.com/demo/info-box/?utm_medium=powerpack-lite&utm_source=repo-readme&utm_campaign=repo-demo-link) - A fantastic content widget that can be used to create beautiful content blocks with **icon, heading, description**, and **call-to-action** button/link.
|
39 |
+
9. [Info Box Carousel](https://powerpackelements.com/demo/info-box-carousel/?utm_medium=powerpack-lite&utm_source=repo-readme&utm_campaign=repo-demo-link) – A creative widget that allows you to create a slider of your infobox content.
|
40 |
10. [Info List](https://powerpackelements.com/demo/info-list/?utm_medium=powerpack-lite&utm_source=repo-readme&utm_campaign=repo-demo-link) – Another content widget that allows you to showcase product features and services with icon and description
|
41 |
11. [Info Table](https://powerpackelements.com/demo/info-table/?utm_medium=powerpack-lite&utm_source=repo-readme&utm_campaign=repo-demo-link) – This widget allows you to create beautiful content blocks with **icon, heading, description**, and **call-to-action** button/link.
|
42 |
12. [Instagram Feed](https://powerpackelements.com/demo/instagram-feed/?utm_medium=powerpack-lite&utm_source=repo-readme&utm_campaign=repo-demo-link) – A creative widget that allows you to display Instagram Gallery on your website with various impressive options.
|
115 |
|
116 |
PowerPack template library includes 150+ ready-to-use section blocks. All block templates are precise work of our designers that can be used to create any website.
|
117 |
|
118 |
+
### WooCommerce Elementor Widgets
|
119 |
**Get Special WooCommerce Elementor widgets with PowerPack Pro**
|
120 |
|
121 |
1. [Woo Products](https://powerpackelements.com/demo/woo-product-grid/?utm_source=repo-readme&utm_medium=powerpack-lite&utm_campaign=repo-demo-link) - Multiple layout and styling options to create WooCommerce Product Grid and Carousel layouts on your Elementor website
|
125 |
5. [Woo Checkout](https://powerpackelements.com/demo/woo-checkout/?utm_source=repo-readme&utm_medium=powerpack-lite&utm_campaign=repo-demo-link) - Another unique solution for WooCommerce to create beautiful Checkout page with Elementor free version. Create a single column or two column layout for checkout page. Styling options for input fields, form, sections, labels, buttons, etc. [Check out the video](https://www.youtube.com/watch?v=XFE04Mzk_p0)
|
126 |
6. [Woo Mini Cart](https://powerpackelements.com/demo/woo-mini-cart/?utm_source=repo-readme&utm_medium=powerpack-lite&utm_campaign=repo-demo-link) - Add a sleek, mini cart icon to your website's header/menu with Elementor and PowerPack Elementor addons. [Check out the video](https://www.youtube.com/watch?v=jkfzj3qXwGM)
|
127 |
7. [Woo Off-canvas Cart](https://powerpackelements.com/demo/woo-off-canvas-cart/?utm_source=repo-readme&utm_medium=powerpack-lite&utm_campaign=repo-demo-link) - Add a stunning off-canvas cart panel to your WooCommerce website. [Check out the video](https://www.youtube.com/watch?v=u1Wh5z6vpo4)
|
128 |
+
8. [Woo My Account](https://powerpackelements.com/elementor-widgets/my-account-widget/?utm_source=repo-readme&utm_medium=powerpack-lite&utm_campaign=repo-demo-link) - Easily customize My Account area of your WooCommerce websites.
|
129 |
+
|
130 |
|
131 |
### NEW SCHEMA WIDGETS
|
132 |
**Boost your Search Engine Rankings with new, unique, Schema markup widgets for Elementor.**
|
133 |
|
134 |
1. [FAQ Schema Markup Widget](https://powerpackelements.com/elementor-widgets/faq/?utm_source=repo-readme&utm_medium=powerpack-lite&utm_campaign=repo-demo-link) – Create a search engine optimized FAQ Page for your site with FAQ Schema markup widget and leverage the power of Structured Data.
|
135 |
2. [How-to Schema Markup Widget](https://powerpackelements.com/elementor-widgets/how-to/?utm_source=repo-readme&utm_medium=powerpack-lite&utm_campaign=repo-demo-link) – Easily create stylish How-to Guides, Tutorials, and walk-throughs.
|
136 |
+
|
137 |
### CREATIVE EXTENSIONS
|
138 |
1. **Advanced Display Conditions Functionality**
|
139 |
Use Elementor for advanced cases like timed-content, content for logged in users, special content based on user's browser, display content based on page, post, archive rules, and much more. The most UNIQUE solution for Elementor widgets and sections. [Click here for details.](https://powerpackelements.com/display-conditions/?utm_source=repo-readme&utm_medium=powerpack-lite&utm_campaign=repo-demo-link)
|
141 |
https://www.youtube.com/watch?v=blCGxZujnJg
|
142 |
|
143 |
[Header Footer Builder](https://powerpackelements.com/elementor-widgets/header-footer-builder-elementor/?utm_source=repo-readme&utm_medium=powerpack-lite&utm_campaign=repo-demo-link)
|
144 |
+
Create a custom Header and Footer layout for your website.
|
145 |
[Magic Wand Feature](https://powerpackelements.com/elementor-widgets/cross-domain-copy-paste/?utm_source=repo-readme&utm_medium=powerpack-lite&utm_campaign=repo-demo-link)
|
146 |
Copy-paste content from one domain to another easily.
|
147 |
[BackGround Effects](https://powerpackelements.com/elementor-widgets/background-effects/?utm_source=repo-readme&utm_medium=powerpack-lite&utm_campaign=repo-demo-link)
|
156 |
|
157 |
- **Light weight, fast, and easy to use**
|
158 |
PowerPack for Elementor boasts of superior code quality optimized for performance. Minimal usage of external scripts helps you maintain superior loading time for your websites.
|
159 |
+
|
160 |
+
- **Extensive styling options**
|
161 |
All the Elementor Widgets included with PowerPack come with well-thought design and styling options. These options make it easy for you to build creative layouts without having to worry about the custom code.
|
162 |
+
|
163 |
+
- **Professional Support**
|
164 |
PowerPack Addon for Elementor comes from our team of experts, who always deliver the best and try to fix all of their queries earliest.
|
165 |
|
166 |
## Other Elementor Plugins
|
201 |
|
202 |
== Changelog ==
|
203 |
|
204 |
+
= 2.1.4 - September 14, 2020 =
|
205 |
+
* Added: Info Box, Info Box Carousel - Option to show button in case of link type box option
|
206 |
+
* Enhancement: Info Box Carousel - Updated Choose Arrow control
|
207 |
+
* Fixed: Logo Grid - Greyscale option was not working in editor
|
208 |
+
* Added: Image Hotspots - Typography option for hotspot type text
|
209 |
+
* Added: Image Hotspots - Option to keep tooltips always open
|
210 |
+
|
211 |
= 2.1.3 - August 31, 2020 =
|
212 |
* Fixed: Buttons - Tooltip styling options were not working in buttons widget
|
213 |
* Fixed: Info Box Carousel - Icon type image was not showing on frontend
|