PluginProbe
ShopBuilder – WooCommerce Builder For Elementor / 3.4.2
ShopBuilder – WooCommerce Builder For Elementor v3.4.2
3.4.2 3.4.1 3.4.0 2.0.1 2.0.2 2.0.3 2.1.0 2.1.1 2.1.10 2.1.11 2.1.12 2.1.13 2.1.14 2.1.15 2.1.2 2.1.3 2.1.4 2.1.5 2.1.6 2.1.7 2.1.8 2.1.9 2.2.0 2.2.1 2.2.2 All 63 releases
shopbuilder / app / Elementor / Widgets / Controls / SliderSettings.php

SliderSettings.php in ShopBuilder – WooCommerce Builder For Elementor 3.4.2, at app/Elementor/Widgets/Controls/SliderSettings.php

362 lines 9.5 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Main ProductDescription class.
4 *
5 * @package RadiusTheme\SB
6 */
7
8 namespace RadiusTheme\SB\Elementor\Widgets\Controls;
9
10 use Elementor\Controls_Manager;
11 use RadiusTheme\SB\Elementor\Helper\ControlSelectors;
12 use RadiusTheme\SB\Helpers\Fns;
13
14 // Do not allow directly accessing this file.
15 if ( ! defined( 'ABSPATH' ) ) {
16 exit( 'This script cannot be accessed directly.' );
17 }
18
19 /**
20 * Product Description class
21 */
22 class SliderSettings {
23 /**
24 * Widget Field
25 *
26 * @param object $widget Widget instance.
27 *
28 * @return array
29 */
30 public static function slider_style( $widget ) {
31 $selector = $widget->selectors;
32 $fields = [
33 'slider_style_start' => [
34 'mode' => 'section_start',
35 'tab' => 'style',
36 'label' => esc_html__( 'Slider Style', 'shopbuilder' ),
37 'condition' => [
38 'slider_activate!' => '',
39 ],
40 ],
41 'slider_arrows_style' => [
42 'type' => 'html',
43 'raw' => sprintf(
44 '<h3 class="rtsb-elementor-group-heading">%s</h3>',
45 esc_html__( 'Arrows', 'shopbuilder' )
46 ),
47 'content_classes' => 'elementor-panel-heading-title',
48 'separator' => 'default',
49 'condition' => [
50 'show_arrows!' => '',
51 ],
52 ],
53
54 'slider_arrow_icon_size' => [
55 'label' => esc_html__( 'Icon Size (px)', 'shopbuilder' ),
56 'type' => 'slider',
57 'size_units' => [ 'px' ],
58 'range' => [
59 'px' => [
60 'min' => 0,
61 'max' => 100,
62 'step' => 5,
63 ],
64 ],
65 'default' => [
66 'unit' => 'px',
67 'size' => 25,
68 ],
69 'selectors' => [
70 $selector['slider_arrow_icon_size']['icon'] => 'font-size: {{SIZE}}{{UNIT}};',
71 $selector['slider_arrow_icon_size']['svg'] => 'width: {{SIZE}}{{UNIT}};',
72 ],
73 'condition' => [
74 'show_arrows!' => '',
75 ],
76 ],
77 'slider_arrow_size' => [
78 'label' => esc_html__( 'Arrow Size (px)', 'shopbuilder' ),
79 'type' => 'slider',
80 'size_units' => [ 'px' ],
81 'range' => [
82 'px' => [
83 'min' => 0,
84 'max' => 100,
85 'step' => 5,
86 ],
87 ],
88 'default' => [
89 'unit' => 'px',
90 'size' => 40,
91 ],
92 'selectors' => [
93 $selector['slider_arrow_size'] => 'width: {{SIZE}}{{UNIT}};height: {{SIZE}}{{UNIT}}; line-height: {{SIZE}}{{UNIT}};',
94 ],
95 'condition' => [
96 'show_arrows!' => '',
97 ],
98 ],
99
100 'arrows_tabs_start' => [
101 'mode' => 'tabs_start',
102 ],
103 // Tab For normal view.
104 'arrows_normal' => [
105 'mode' => 'tab_start',
106 'label' => esc_html__( 'Normal', 'shopbuilder' ),
107 'condition' => [
108 'show_arrows!' => '',
109 ],
110 ],
111 'arrows_color' => [
112 'label' => esc_html__( 'Color', 'shopbuilder' ),
113 'type' => 'color',
114
115 'selectors' => [
116 $selector['arrows_color'] => 'color: {{VALUE}};',
117 ],
118 ],
119 'arrows_bg_color' => [
120 'label' => esc_html__( 'Background Color', 'shopbuilder' ),
121 'type' => 'color',
122 'selectors' => [
123 $selector['arrows_bg_color'] => 'background-color: {{VALUE}};',
124 ],
125 ],
126 'arrows_border_color' => [
127 'label' => esc_html__( 'Border Color', 'shopbuilder' ),
128 'type' => 'color',
129
130 'selectors' => [
131 $selector['arrows_border_color'] => 'border-color: {{VALUE}};',
132 ],
133 ],
134 'arrows_normal_end' => [
135 'mode' => 'tab_end',
136 ],
137 'arrows_hover' => [
138 'mode' => 'tab_start',
139 'label' => esc_html__( 'Hover', 'shopbuilder' ),
140 'condition' => [
141 'show_arrows!' => '',
142 ],
143 ],
144 'arrows_hover_color' => [
145 'label' => esc_html__( 'Color', 'shopbuilder' ),
146 'type' => 'color',
147 'selectors' => [
148 $selector['arrows_hover_color'] => 'color: {{VALUE}};',
149 ],
150 ],
151 'arrows_hover_bg_color' => [
152 'label' => esc_html__( 'Background Color', 'shopbuilder' ),
153 'type' => 'color',
154 'selectors' => [
155 $selector['arrows_hover_color'] => 'background-color: {{VALUE}};',
156 ],
157 ],
158 'arrows_hover_border_color' => [
159 'label' => esc_html__( 'Border Color', 'shopbuilder' ),
160 'type' => 'color',
161
162 'selectors' => [
163 $selector['arrows_hover_border_color'] => 'border-color: {{VALUE}};',
164 ],
165 ],
166 'arrows_hover_end' => [
167 'mode' => 'tab_end',
168 ],
169 'arrows_tabs_end' => [
170 'mode' => 'tabs_end',
171 ],
172 'slider_dots_style' => [
173 'type' => 'html',
174 'raw' => sprintf(
175 '<h3 class="rtsb-elementor-group-heading">%s</h3>',
176 esc_html__( 'Dot\'s', 'shopbuilder' )
177 ),
178 'content_classes' => 'elementor-panel-heading-title',
179 'separator' => 'default',
180 'condition' => [
181 'show_arrows!' => '',
182 ],
183 ],
184 'dots_gap' => [
185 'label' => esc_html__( 'Dot\'s Spacing (px)', 'shopbuilder' ),
186 'type' => 'slider',
187 'size_units' => [ 'px' ],
188 'range' => [
189 'px' => [
190 'min' => 0,
191 'max' => 100,
192 'step' => 1,
193 ],
194 ],
195 'selectors' => [
196 $selector['dots_gap'] => 'margin-left: calc({{SIZE}}{{UNIT}} / 2); margin-right: calc({{SIZE}}{{UNIT}} / 2);',
197 ],
198 'condition' => [
199 'show_dots!' => '',
200 ],
201 ],
202 'dots_size' => [
203 'label' => esc_html__( 'Dot\'s Size (px)', 'shopbuilder' ),
204 'type' => 'slider',
205 'size_units' => [ 'px' ],
206 'range' => [
207 'px' => [
208 'min' => 0,
209 'max' => 50,
210 'step' => 1,
211 ],
212 ],
213 'default' => [
214 'unit' => 'px',
215 'size' => 6,
216 ],
217 'selectors' => [
218 $selector['dots_size'] => 'width: {{SIZE}}{{UNIT}};height: {{SIZE}}{{UNIT}};',
219 ],
220 'condition' => [
221 'show_dots!' => '',
222 ],
223 ],
224 'dot_color' => [
225 'label' => esc_html__( 'Dot\'s Color', 'shopbuilder' ),
226 'type' => 'color',
227
228 'selectors' => [
229 $selector['dot_color'] => 'background: {{VALUE}};',
230 ],
231 ],
232 'dot_active_color' => [
233 'label' => esc_html__( 'Dot\'s Active Color', 'shopbuilder' ),
234 'type' => 'color',
235
236 'selectors' => [
237 $selector['dot_active_color'] => 'background: {{VALUE}};',
238 ],
239 ],
240 'slider_style_end' => [
241 'mode' => 'section_end',
242 ],
243 ];
244 return $fields;
245 }
246 /**
247 * Widget Field
248 *
249 * @return array
250 */
251 public static function slider_controls() {
252 $fields = [
253 'slider_section_start' => [
254 'mode' => 'section_start',
255 'label' => esc_html__( 'Slider', 'shopbuilder' ),
256 'condition' => [
257 'slider_activate!' => '',
258 ],
259 ],
260 'space_between' => [
261 'label' => esc_html__( 'Space between', 'shopbuilder' ),
262 'type' => 'number',
263 'separator' => 'default',
264 'default' => 10,
265 'min' => 1,
266 'max' => 100,
267 ],
268 'loop' => [
269 'label' => esc_html__( 'Loop', 'shopbuilder' ),
270 'type' => 'switch',
271 'label_on' => esc_html__( 'Yes', 'shopbuilder' ),
272 'label_off' => esc_html__( 'No', 'shopbuilder' ),
273 'default' => '',
274 'return_value' => 'yes',
275 ],
276 'speed' => [
277 'label' => esc_html__( 'Slide Speed', 'shopbuilder' ),
278 'type' => 'number',
279 'default' => 2000,
280 'min' => 0,
281 'max' => 10000,
282 ],
283 'autoplay' => [
284 'label' => esc_html__( 'Autoplay', 'shopbuilder' ),
285 'type' => 'switch',
286 'label_on' => esc_html__( 'Yes', 'shopbuilder' ),
287 'label_off' => esc_html__( 'No', 'shopbuilder' ),
288 'default' => 'yes',
289 'return_value' => 'yes',
290 ],
291 'autoplay_delay' => [
292 'label' => esc_html__( 'Slide Delay', 'shopbuilder' ),
293 'type' => 'number',
294 'default' => 3000,
295 'min' => 0,
296 'max' => 10000,
297 'condition' => [
298 'autoplay' => 'yes',
299 ],
300 ],
301
302 'pauseon_mouseenter' => [
303 'label' => esc_html__( 'Pause On Mouse Enter', 'shopbuilder' ),
304 'type' => 'switch',
305 'label_on' => esc_html__( 'Yes', 'shopbuilder' ),
306 'label_off' => esc_html__( 'No', 'shopbuilder' ),
307 'default' => 'yes',
308 'return_value' => 'yes',
309 'condition' => [
310 'autoplay' => 'yes',
311 ],
312 ],
313 'show_arrows' => [
314 'label' => esc_html__( 'Show Arrows', 'shopbuilder' ),
315 'type' => 'switch',
316 'label_off' => esc_html__( 'Show', 'shopbuilder' ),
317 'label_on' => esc_html__( 'Hide', 'shopbuilder' ),
318 'default' => 'yes',
319 'return_value' => 'yes',
320 ],
321 'show_dots' => [
322 'label' => esc_html__( 'Show Dots', 'shopbuilder' ),
323 'type' => 'switch',
324 'label_off' => esc_html__( 'Show', 'shopbuilder' ),
325 'label_on' => esc_html__( 'Hide', 'shopbuilder' ),
326 'default' => 'yes',
327 'return_value' => 'yes',
328 ],
329 'left_arrow_icon' => [
330 'label' => esc_html__( 'Left Arrow', 'shopbuilder' ),
331 'type' => 'icons',
332 'fa4compatibility' => 'icon',
333 'default' => [
334 'value' => 'fas fa-chevron-left',
335 'library' => 'fa-solid',
336 ],
337 'condition' => [
338 'show_arrows' => 'yes',
339 ],
340 ],
341 'right_arrow_icon' => [
342 'label' => esc_html__( 'Right Arrow', 'shopbuilder' ),
343 'type' => 'icons',
344 'fa4compatibility' => 'icon',
345 'default' => [
346 'value' => 'fas fa-chevron-right',
347 'library' => 'fa-solid',
348 ],
349 'condition' => [
350 'show_arrows' => 'yes',
351 ],
352 ],
353
354 'slider_section_end' => [
355 'mode' => 'section_end',
356 ],
357 ];
358
359 return $fields;
360 }
361 }
362