PluginProbe
ShopBuilder – WooCommerce Builder For Elementor / 3.4.0
ShopBuilder – WooCommerce Builder For Elementor v3.4.0
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.0, at app/Elementor/Widgets/Controls/SliderSettings.php

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