PluginProbe
ShopBuilder – WooCommerce Builder For Elementor / 1.1.1
ShopBuilder – WooCommerce Builder For Elementor v1.1.1
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
← All changes | app/Elementor/Helper/ControlHelper.php +592 -1367 3.4.0 → 1.1.1 View file →
@@ -1,1367 +1,592 @@
1 -<?php
2 -/**
3 - * BuilderFns class
4 - *
5 - * The builder.
6 - *
7 - * @package RadiusTheme\SB
8 - * @since 1.0.0
9 - */
10 -
11 -namespace RadiusTheme\SB\Elementor\Helper;
12 -
13 -// Do not allow directly accessing this file.
14 -if ( ! defined( 'ABSPATH' ) ) {
15 - exit( 'This script cannot be accessed directly.' );
16 -}
17 -
18 -/**
19 - * BuilderFns class
20 - */
21 -class ControlHelper {
22 - /**
23 - * Widget alignment.
24 - *
25 - * @return array
26 - */
27 - public static function alignment() {
28 - return [
29 - 'left' => [
30 - 'title' => esc_html__( 'Left', 'shopbuilder' ),
31 - 'icon' => 'eicon-text-align-left',
32 - ],
33 - 'center' => [
34 - 'title' => esc_html__( 'Center', 'shopbuilder' ),
35 - 'icon' => 'eicon-text-align-center',
36 - ],
37 - 'right' => [
38 - 'title' => esc_html__( 'Right', 'shopbuilder' ),
39 - 'icon' => 'eicon-text-align-right',
40 - ],
41 - 'justify' => [
42 - 'title' => esc_html__( 'Justified', 'shopbuilder' ),
43 - 'icon' => 'eicon-text-align-justify',
44 - ],
45 - ];
46 - }
47 - /**
48 - * Widget alignment.
49 - *
50 - * @return array
51 - */
52 - public static function flex_alignment() {
53 - return [
54 - 'start' => [
55 - 'title' => esc_html__( 'Start', 'shopbuilder' ),
56 - 'icon' => 'eicon-text-align-left',
57 - ],
58 - 'center' => [
59 - 'title' => esc_html__( 'Center', 'shopbuilder' ),
60 - 'icon' => 'eicon-text-align-center',
61 - ],
62 - 'end' => [
63 - 'title' => esc_html__( 'End', 'shopbuilder' ),
64 - 'icon' => 'eicon-text-align-right',
65 - ],
66 - ];
67 - }
68 - /**
69 - * Grid Layout Columns
70 - *
71 - * @return array
72 - */
73 - public static function layout_columns() {
74 - return [
75 - 0 => esc_html__( 'Layout Default', 'shopbuilder' ),
76 - 1 => esc_html__( '1 Column', 'shopbuilder' ),
77 - 2 => esc_html__( '2 Columns', 'shopbuilder' ),
78 - 3 => esc_html__( '3 Columns', 'shopbuilder' ),
79 - 4 => esc_html__( '4 Columns', 'shopbuilder' ),
80 - 5 => esc_html__( '5 Columns', 'shopbuilder' ),
81 - 6 => esc_html__( '6 Columns', 'shopbuilder' ),
82 - 7 => esc_html__( '7 Columns', 'shopbuilder' ),
83 - 8 => esc_html__( '8 Columns', 'shopbuilder' ),
84 - ];
85 - }
86 -
87 - /**
88 - * Grid Layouts
89 - *
90 - * @return array
91 - */
92 - public static function grid_layouts() {
93 - $status = ! rtsb()->has_pro();
94 -
95 - return apply_filters(
96 - 'rtsb/elements/elementor/grid_layouts',
97 - [
98 - 'grid-layout1' => [
99 - 'title' => esc_html__( 'Grid Layout 1', 'shopbuilder' ),
100 - 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout/grid-Layout-1.png' ) ),
101 - ],
102 -
103 - 'grid-layout2' => [
104 - 'title' => esc_html__( 'Grid Layout 2', 'shopbuilder' ),
105 - 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout/grid-Layout-2.png' ) ),
106 - ],
107 -
108 - 'grid-layout3' => [
109 - 'title' => esc_html__( 'Grid Layout 3', 'shopbuilder' ),
110 - 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout/grid-style-3.png' ) ),
111 - 'is_pro' => $status,
112 - ],
113 - 'grid-layout4' => [
114 - 'title' => esc_html__( 'Grid Layout 4', 'shopbuilder' ),
115 - 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout/grid-style-4.png' ) ),
116 - 'is_pro' => $status,
117 - ],
118 - 'grid-layout5' => [
119 - 'title' => esc_html__( 'Grid Layout 5', 'shopbuilder' ),
120 - 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout/grid-style-5.png' ) ),
121 - 'is_pro' => $status,
122 - ],
123 - 'grid-layout6' => [
124 - 'title' => esc_html__( 'Grid Layout 6', 'shopbuilder' ),
125 - 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout/grid-style-6.png' ) ),
126 - 'is_pro' => $status,
127 - ],
128 - 'grid-layout7' => [
129 - 'title' => esc_html__( 'Grid Layout 7', 'shopbuilder' ),
130 - 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout/grid-style-7.png' ) ),
131 - 'is_pro' => $status,
132 - ],
133 - 'grid-layout8' => [
134 - 'title' => esc_html__( 'Grid Layout 8', 'shopbuilder' ),
135 - 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout/grid-style-8.png' ) ),
136 - 'is_pro' => $status,
137 - ],
138 - 'grid-layout9' => [
139 - 'title' => esc_html__( 'Special Layout 1', 'shopbuilder' ),
140 - 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout/grid-style-9a.png' ) ),
141 - 'is_pro' => $status,
142 - ],
143 - ]
144 - );
145 - }
146 -
147 - /**
148 - * Single Product Tab Layouts
149 - *
150 - * @return array
151 - */
152 - public static function single_product_tab_layouts() {
153 - $status = ! rtsb()->has_pro();
154 -
155 - return apply_filters(
156 - 'rtsb/elements/elementor/single_product_tab_layouts',
157 - [
158 - 'default' => [
159 - 'title' => esc_html__( 'Default Layout', 'shopbuilder' ),
160 - 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout/tab-01.png' ) ),
161 - ],
162 - 'custom-layout1' => [
163 - 'title' => esc_html__( 'Accordion Layout', 'shopbuilder' ),
164 - 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout/tab-02.png' ) ),
165 - 'is_pro' => $status,
166 - ],
167 - 'custom-layout2' => [
168 - 'title' => esc_html__( 'Tab Layout', 'shopbuilder' ),
169 - 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout/tab-03.png' ) ),
170 - 'is_pro' => $status,
171 - ],
172 - ]
173 - );
174 - }
175 -
176 -
177 - /**
178 - * General Widgets Advanced Title Layouts
179 - *
180 - * @return array
181 - */
182 - public static function general_widgets_advanced_title_layouts() {
183 -
184 - return apply_filters(
185 - 'rtsb/elements/elementor/general_widgets_advanced_title_layouts',
186 - [
187 - 'rtsb-advanced-heading-layout1' => [
188 - 'title' => esc_html__( 'Layout 1', 'shopbuilder' ),
189 - 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout/advance-heading-layout-01.png' ) ),
190 - ],
191 - ]
192 - );
193 - }
194 - /**
195 - * General Widgets Advanced Title Layouts
196 - *
197 - * @return array
198 - */
199 - public static function general_widgets_button_layouts() {
200 -
201 - return apply_filters(
202 - 'rtsb/elements/elementor/general_widgets_button_layouts',
203 - [
204 - 'rtsb-sb-button-layout1' => [
205 - 'title' => esc_html__( 'Single Button', 'shopbuilder' ),
206 - 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout/advanced-button-layout-01.png' ) ),
207 - ],
208 - 'rtsb-sb-button-layout2' => [
209 - 'title' => esc_html__( 'Dual Button', 'shopbuilder' ),
210 - 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout/advanced-button-layout-02.png' ) ),
211 - ],
212 - ]
213 - );
214 - }
215 - /**
216 - * General Widgets FlipBox Layouts
217 - *
218 - * @return array
219 - */
220 - public static function general_widgets_flip_box_layouts() {
221 -
222 - return apply_filters(
223 - 'rtsb/elements/elementor/general_widgets_flip_box_layouts',
224 - [
225 - 'rtsb-flip-box-layout1' => [
226 - 'title' => esc_html__( 'Layout 1', 'shopbuilder' ),
227 - 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout/flip-box-layout-01.png' ) ),
228 - ],
229 - ]
230 - );
231 - }
232 - /**
233 - * General Widgets Counter Layouts
234 - *
235 - * @return array
236 - */
237 - public static function general_widgets_counter_layouts() {
238 -
239 - return apply_filters(
240 - 'rtsb/elements/elementor/general_widgets_counter_layouts',
241 - [
242 - 'rtsb-counter-layout1' => [
243 - 'title' => esc_html__( 'Layout 1', 'shopbuilder' ),
244 - 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout/fun-facts-layout-01.png' ) ),
245 - ],
246 - 'rtsb-counter-layout2' => [
247 - 'title' => esc_html__( 'Layout 2', 'shopbuilder' ),
248 - 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout/fun-facts-layout-02.png' ) ),
249 - ],
250 -
251 - ]
252 - );
253 - }
254 - /**
255 - * General Widgets Countdown Layouts
256 - *
257 - * @return array
258 - */
259 - public static function general_widgets_countdown_layouts() {
260 -
261 - return apply_filters(
262 - 'rtsb/elements/elementor/general_widgets_countdown_layouts',
263 - [
264 - 'rtsb-countdown-layout1' => [
265 - 'title' => esc_html__( 'Layout 1', 'shopbuilder' ),
266 - 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout/countdown-layout-01.png' ) ),
267 - ],
268 - 'rtsb-countdown-layout2' => [
269 - 'title' => esc_html__( 'Layout 2', 'shopbuilder' ),
270 - 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout/countdown-layout-02.png' ) ),
271 - ],
272 - 'rtsb-countdown-layout3' => [
273 - 'title' => esc_html__( 'Layout 3', 'shopbuilder' ),
274 - 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout/countdown-layout-03.png' ) ),
275 - ],
276 - 'rtsb-countdown-layout4' => [
277 - 'title' => esc_html__( 'Layout 4', 'shopbuilder' ),
278 - 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout/countdown-layout-04.png' ) ),
279 - ],
280 - 'rtsb-countdown-layout5' => [
281 - 'title' => esc_html__( 'Layout 5', 'shopbuilder' ),
282 - 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout/countdown-layout-05.png' ) ),
283 - ],
284 - 'rtsb-countdown-layout6' => [
285 - 'title' => esc_html__( 'Layout 6', 'shopbuilder' ),
286 - 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout/countdown-layout-06.png' ) ),
287 - ],
288 - ]
289 - );
290 - }
291 -
292 - /**
293 - * General Widgets Progress Bar Layouts
294 - *
295 - * @return array
296 - */
297 - public static function general_widgets_progress_bar_layouts() {
298 -
299 - return apply_filters(
300 - 'rtsb/elements/elementor/general_widgets_progress_bar_layouts',
301 - [
302 - 'rtsb-progress-bar-layout1' => [
303 - 'title' => esc_html__( 'Layout 1', 'shopbuilder' ),
304 - 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout/progressbar-layout-01.png' ) ),
305 - ],
306 - 'rtsb-progress-bar-layout4' => [
307 - 'title' => esc_html__( 'Layout 2', 'shopbuilder' ),
308 - 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout/progressbar-layout-02.png' ) ),
309 - ],
310 - 'rtsb-progress-bar-layout5' => [
311 - 'title' => esc_html__( 'Layout 3', 'shopbuilder' ),
312 - 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout/progressbar-layout-03.png' ) ),
313 - ],
314 - 'rtsb-progress-bar-layout2' => [
315 - 'title' => esc_html__( 'Layout 4', 'shopbuilder' ),
316 - 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout/progressbar-layout-04.png' ) ),
317 - ],
318 - 'rtsb-progress-bar-layout3' => [
319 - 'title' => esc_html__( 'Layout 5', 'shopbuilder' ),
320 - 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout/progressbar-layout-05.png' ) ),
321 - ],
322 - ]
323 - );
324 - }
325 -
326 - /**
327 - * General Widgets ShopBuilder Accordion Layouts
328 - *
329 - * @return array
330 - */
331 - public static function general_widgets_sb_faq_layouts() {
332 -
333 - return apply_filters(
334 - 'rtsb/elements/elementor/general_widgets_sb_faq_layouts',
335 - [
336 - 'rtsb-sb-faq-layout1' => [
337 - 'title' => esc_html__( 'Layout 1', 'shopbuilder' ),
338 - 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout/faqs-layout-01.png' ) ),
339 - ],
340 - 'rtsb-sb-faq-layout3' => [
341 - 'title' => esc_html__( 'Layout 2', 'shopbuilder' ),
342 - 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout/faqs-layout-02.png' ) ),
343 - ],
344 - 'rtsb-sb-faq-layout5' => [
345 - 'title' => esc_html__( 'Layout 3', 'shopbuilder' ),
346 - 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout/faqs-layout-03.png' ) ),
347 - ],
348 - 'rtsb-sb-faq-layout2' => [
349 - 'title' => esc_html__( 'Layout 4', 'shopbuilder' ),
350 - 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout/faqs-layout-04.png' ) ),
351 - ],
352 - 'rtsb-sb-faq-layout4' => [
353 - 'title' => esc_html__( 'Layout 5', 'shopbuilder' ),
354 - 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout/faqs-layout-05.png' ) ),
355 - ],
356 - 'rtsb-sb-faq-layout6' => [
357 - 'title' => esc_html__( 'Layout 6', 'shopbuilder' ),
358 - 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout/faqs-layout-06.png' ) ),
359 - ],
360 -
361 - ]
362 - );
363 - }
364 - /**
365 - * General Widgets Logo Slider And Grid Layouts
366 - *
367 - * @return array
368 - */
369 - public static function general_widgets_logo_slider_grid_layouts() {
370 -
371 - return apply_filters(
372 - 'rtsb/elements/elementor/general_widgets_logo_slider_and_grid_layouts',
373 - [
374 - 'rtsb-logo-layout1' => [
375 - 'title' => esc_html__( 'Layout 1', 'shopbuilder' ),
376 - 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout/logo-slider-layout-01.png' ) ),
377 - ],
378 - 'rtsb-logo-layout2' => [
379 - 'title' => esc_html__( 'Layout 2', 'shopbuilder' ),
380 - 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout/logo-slider-layout-02.png' ) ),
381 - ],
382 - ]
383 - );
384 - }
385 - /**
386 - * General Widgets Logo Slider And Grid Layouts
387 - *
388 - * @return array
389 - */
390 - public static function general_widgets_testimonial() {
391 -
392 - return apply_filters(
393 - 'rtsb/elements/elementor/general_widgets_testimonial_layouts',
394 - [
395 - 'rtsb-testimonial-layout1' => [
396 - 'title' => esc_html__( 'Layout 1', 'shopbuilder' ),
397 - 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout/testimonial-layout-01.png' ) ),
398 - ],
399 - 'rtsb-testimonial-layout2' => [
400 - 'title' => esc_html__( 'Layout 2', 'shopbuilder' ),
401 - 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout/testimonial-layout-02.png' ) ),
402 - ],
403 - 'rtsb-testimonial-layout3' => [
404 - 'title' => esc_html__( 'Layout 3', 'shopbuilder' ),
405 - 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout/testimonial-layout-03.png' ) ),
406 - ],
407 - 'rtsb-testimonial-layout4' => [
408 - 'title' => esc_html__( 'Layout 4', 'shopbuilder' ),
409 - 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout/testimonial-layout-04.png' ) ),
410 - ],
411 - 'rtsb-testimonial-layout5' => [
412 - 'title' => esc_html__( 'Layout 5', 'shopbuilder' ),
413 - 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout/testimonial-layout-05.png' ) ),
414 - ],
415 - ]
416 - );
417 - }
418 - /**
419 - * General Widgets Logo Slider And Grid Layouts
420 - *
421 - * @return array
422 - */
423 - public static function general_widgets_team_member() {
424 -
425 - return apply_filters(
426 - 'rtsb/elements/elementor/general_widgets_team_member_layouts',
427 - [
428 - 'rtsb-team-layout1' => [
429 - 'title' => esc_html__( 'Layout 1', 'shopbuilder' ),
430 - 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout/team-layout-01.png' ) ),
431 - ],
432 - 'rtsb-team-layout2' => [
433 - 'title' => esc_html__( 'Layout 2', 'shopbuilder' ),
434 - 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout/team-layout-02.png' ) ),
435 - ],
436 - 'rtsb-team-layout3' => [
437 - 'title' => esc_html__( 'Layout 3', 'shopbuilder' ),
438 - 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout/team-layout-03.png' ) ),
439 - ],
440 - 'rtsb-team-layout4' => [
441 - 'title' => esc_html__( 'Layout 4', 'shopbuilder' ),
442 - 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout/team-layout-04.png' ) ),
443 - ],
444 - ]
445 - );
446 - }
447 - /**
448 - * General Widgets Post List Layouts
449 - *
450 - * @return array
451 - */
452 - public static function general_widgets_post_list() {
453 -
454 - return apply_filters(
455 - 'rtsb/elements/elementor/general_widgets_post_lists_layouts',
456 - [
457 - 'rtsb-post-list-layout1' => [
458 - 'title' => esc_html__( 'Layout 1', 'shopbuilder' ),
459 - 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout/post-list-layout-01.png' ) ),
460 - ],
461 - 'rtsb-post-list-layout2' => [
462 - 'title' => esc_html__( 'Layout 2', 'shopbuilder' ),
463 - 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout/post-list-layout-02.png' ) ),
464 - ],
465 - ]
466 - );
467 - }
468 - /**
469 - * General Widgets Post Grid Layouts
470 - *
471 - * @return array
472 - */
473 - public static function general_widgets_post_grid() {
474 -
475 - return apply_filters(
476 - 'rtsb/elements/elementor/general_widgets_post_grid_layouts',
477 - [
478 - 'rtsb-post-grid-layout1' => [
479 - 'title' => esc_html__( 'Layout 1', 'shopbuilder' ),
480 - 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout/post-grid-layout-01.png' ) ),
481 - ],
482 - 'rtsb-post-grid-layout2' => [
483 - 'title' => esc_html__( 'Layout 2', 'shopbuilder' ),
484 - 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout/post-grid-layout-02.png' ) ),
485 - ],
486 - 'rtsb-post-grid-layout3' => [
487 - 'title' => esc_html__( 'Layout 3', 'shopbuilder' ),
488 - 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout/post-grid-layout-03.png' ) ),
489 - ],
490 - ]
491 - );
492 - }
493 -
494 - /**
495 - * General Widgets ShopBuilder Accordion Layouts
496 - *
497 - * @return array
498 - */
499 - public static function general_widgets_image_accordion_layouts() {
500 -
501 - return apply_filters(
502 - 'rtsb/elements/elementor/general_widgets_image_accordion_layouts',
503 - [
504 - 'rtsb-image-accordion-layout1' => [
505 - 'title' => esc_html__( 'Layout 1', 'shopbuilder' ),
506 - 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout/image-accordion-layout-01.png' ) ),
507 - ],
508 - 'rtsb-image-accordion-layout2' => [
509 - 'title' => esc_html__( 'Layout 2', 'shopbuilder' ),
510 - 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout/image-accordion-layout-02.png' ) ),
511 - ],
512 - ]
513 - );
514 - }
515 -
516 -
517 - /**
518 - * General Widgets FlipBox Widget Flip Direction
519 - *
520 - * @return array
521 - */
522 - public static function flip_box_widget_flip_direction() {
523 -
524 - return apply_filters(
525 - 'rtsb/elements/elementor/general_widgets_flip_box_flip_direction',
526 - [
527 - 'sb-flip-left' => esc_html__( 'Flip Left', 'shopbuilder' ),
528 - 'sb-flip-right' => esc_html__( 'Flip Right', 'shopbuilder' ),
529 - 'sb-flip-up' => esc_html__( 'Flip Up', 'shopbuilder' ),
530 - 'sb-flip-bottom' => esc_html__( 'Flip Bottom', 'shopbuilder' ),
531 - 'sb-flip-fade-in' => esc_html__( 'Fade In', 'shopbuilder' ),
532 - 'sb-flip-zoom-in' => esc_html__( 'Zoom In', 'shopbuilder' ),
533 - 'sb-flip-zoom-out' => esc_html__( 'Zoom Out', 'shopbuilder' ),
534 - 'sb-flip-3d-left' => esc_html__( 'Flip 3D Left', 'shopbuilder' ),
535 - 'sb-flip-3d-right' => esc_html__( 'Flip 3D Right', 'shopbuilder' ),
536 - 'sb-flip-3d-up' => esc_html__( 'Flip 3D Up', 'shopbuilder' ),
537 - 'sb-flip-3d-bottom' => esc_html__( 'Flip 3D Bottom', 'shopbuilder' ),
538 - ]
539 - );
540 - }
541 -
542 - /**
543 - * General Widgets Button Hover Effects Layouts
544 - *
545 - * @return array
546 - */
547 - public static function general_widgets_button_hover_effect_preset() {
548 -
549 - return apply_filters(
550 - 'rtsb/elements/elementor/general_widgets_button_hover_effects_preset',
551 - [
552 - 'rtsb-sb-button-hover-effect-default' => [
553 - 'title' => esc_html__( 'Default Hover Effect', 'shopbuilder' ),
554 - 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout/button-hover-effect-01.gif' ) ),
555 - ],
556 - 'rtsb-sb-button-hover-effect-preset2' => [
557 - 'title' => esc_html__( 'Hover Effect 1', 'shopbuilder' ),
558 - 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout/button-hover-effect-02.gif' ) ),
559 - ],
560 - 'rtsb-sb-button-hover-effect-preset3' => [
561 - 'title' => esc_html__( 'Hover Effect 2', 'shopbuilder' ),
562 - 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout/button-hover-effect-03.gif' ) ),
563 - ],
564 - ]
565 - );
566 - }
567 - /**
568 - * General Widgets Call To Action Layouts
569 - *
570 - * @return array
571 - */
572 - public static function general_widgets_cta_layouts() {
573 -
574 - return apply_filters(
575 - 'rtsb/elements/elementor/general_widgets_cta_layouts',
576 - [
577 - 'rtsb-cta-layout1' => [
578 - 'title' => esc_html__( 'Layout 1', 'shopbuilder' ),
579 - 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout/call-to-action-layout-01.png' ) ),
580 - ],
581 - 'rtsb-cta-layout2' => [
582 - 'title' => esc_html__( 'Layout 2', 'shopbuilder' ),
583 - 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout/call-to-action-layout-02.png' ) ),
584 - ],
585 - 'rtsb-cta-layout3' => [
586 - 'title' => esc_html__( 'Layout 3', 'shopbuilder' ),
587 - 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout/call-to-action-layout-03.png' ) ),
588 - ],
589 - ]
590 - );
591 - }
592 - /**
593 - * General Widgets Info Box Layouts
594 - *
595 - * @return array
596 - */
597 - public static function general_widgets_info_box_layouts() {
598 -
599 - return apply_filters(
600 - 'rtsb/elements/elementor/general_widgets_info_box_layouts',
601 - [
602 - 'rtsb-info-box-layout1' => [
603 - 'title' => esc_html__( 'Layout 1', 'shopbuilder' ),
604 - 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout/info-box-layout-01.png' ) ),
605 - ],
606 - 'rtsb-info-box-layout3' => [
607 - 'title' => esc_html__( 'Layout 2', 'shopbuilder' ),
608 - 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout/info-box-layout-02.png' ) ),
609 - ],
610 - 'rtsb-info-box-layout4' => [
611 - 'title' => esc_html__( 'Layout 3', 'shopbuilder' ),
612 - 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout/info-box-layout-03.png' ) ),
613 - ],
614 - ]
615 - );
616 - }
617 - /**
618 - * General Widgets Pricing Table Layouts
619 - *
620 - * @return array
621 - */
622 - public static function general_widgets_pricing_table_layouts() {
623 -
624 - return apply_filters(
625 - 'rtsb/elements/elementor/general_widgets_pricing_table_layouts',
626 - [
627 - 'rtsb-pricing-table-layout1' => [
628 - 'title' => esc_html__( 'Layout 1', 'shopbuilder' ),
629 - 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout/pricing-table-layout-01.png' ) ),
630 - ],
631 - 'rtsb-pricing-table-layout2' => [
632 - 'title' => esc_html__( 'Layout 2', 'shopbuilder' ),
633 - 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout/pricing-table-layout-02.png' ) ),
634 - ],
635 - 'rtsb-pricing-table-layout3' => [
636 - 'title' => esc_html__( 'Layout 3', 'shopbuilder' ),
637 - 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout/pricing-table-layout-03.png' ) ),
638 - ],
639 - ]
640 - );
641 - }
642 - /**
643 - * General Widgets Pricing Table Badge Preset
644 - *
645 - * @return array
646 - */
647 - public static function general_widgets_pricing_table_badge_preset() {
648 -
649 - return apply_filters(
650 - 'rtsb/elements/elementor/general_widgets_pricing_table_badge_preset',
651 - [
652 - 'rtsb-pricing-table-badge-preset1' => [
653 - 'title' => esc_html__( 'Preset 1', 'shopbuilder' ),
654 - 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout/pricing-badge-layout-01.png' ) ),
655 - ],
656 - 'rtsb-pricing-table-badge-preset2' => [
657 - 'title' => esc_html__( 'Preset 2', 'shopbuilder' ),
658 - 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout/pricing-badge-layout-02.png' ) ),
659 - ],
660 - 'rtsb-pricing-table-badge-preset3' => [
661 - 'title' => esc_html__( 'Preset 3', 'shopbuilder' ),
662 - 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout/pricing-badge-layout-03.png' ) ),
663 - ],
664 - 'rtsb-pricing-table-badge-preset4' => [
665 - 'title' => esc_html__( 'Preset 4', 'shopbuilder' ),
666 - 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout/pricing-badge-layout-04.png' ) ),
667 - ],
668 - 'rtsb-pricing-table-badge-preset5' => [
669 - 'title' => esc_html__( 'Preset 5', 'shopbuilder' ),
670 - 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout/pricing-badge-layout-04.png' ) ),
671 - ],
672 - ]
673 - );
674 - }
675 - /**
676 - * General Widgets Dropcaps Layouts
677 - *
678 - * @return array
679 - */
680 - public static function general_widgets_dropcaps_layouts() {
681 -
682 - return apply_filters(
683 - 'rtsb/elements/elementor/general_widgets_dropcaps_layouts',
684 - [
685 - 'rtsb-dropcaps-layout1' => [
686 - 'title' => esc_html__( 'Layout 1', 'shopbuilder' ),
687 - 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout/dropcaps-layout-01.png' ) ),
688 - ],
689 - 'rtsb-dropcaps-layout2' => [
690 - 'title' => esc_html__( 'Layout 2', 'shopbuilder' ),
691 - 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout/dropcaps-layout-02.png' ) ),
692 - ],
693 - ]
694 - );
695 - }
696 -
697 - /**
698 - * Multi Step Checkout Layouts
699 - *
700 - * @return array
701 - */
702 - public static function multi_step_checkout_layouts() {
703 -
704 - return apply_filters(
705 - 'rtsb/elements/elementor/single_product_tab_layouts',
706 - [
707 - 'layout1' => [
708 - 'title' => esc_html__( 'Layout 1', 'shopbuilder' ),
709 - 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout-preview/multistep-checkout-layout-1.jpg' ) ),
710 - ],
711 - 'layout2' => [
712 - 'title' => esc_html__( 'Layout 2', 'shopbuilder' ),
713 - 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout-preview/multistep-checkout-lauout-2.jpg' ) ),
714 - ],
715 -
716 - ]
717 - );
718 - }
719 -
720 - /**
721 - * Single Advanced Product Tab Layouts
722 - *
723 - * @return array
724 - */
725 - public static function single_advanced_product_tab_layouts() {
726 - // TODO:: Check If the FUnction Used Or Not.
727 - return apply_filters(
728 - 'rtsb/elements/elementor/single_advanced_product_tab_layouts',
729 - [
730 - 'default' => [
731 - 'title' => esc_html__( 'Default Layout', 'shopbuilder' ),
732 - 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout/tab-01.png' ) ),
733 - ],
734 - 'custom-layout1' => [
735 - 'title' => esc_html__( 'Accordion Layout', 'shopbuilder' ),
736 - 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout/tab-02.png' ) ),
737 - ],
738 - 'custom-layout2' => [
739 - 'title' => esc_html__( 'Tab Layout', 'shopbuilder' ),
740 - 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout/tab-03.png' ) ),
741 - ],
742 - ]
743 - );
744 - }
745 -
746 - /**
747 - * Slider Layouts
748 - *
749 - * @return array
750 - */
751 - public static function slider_layouts() {
752 - $status = ! rtsb()->has_pro();
753 -
754 - return apply_filters(
755 - 'rtsb/elements/elementor/slider_layouts',
756 - [
757 - 'slider-layout1' => [
758 - 'title' => esc_html__( 'Slider Layout 1', 'shopbuilder' ),
759 - 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout/grid-Layout-1.png' ) ),
760 - ],
761 -
762 - 'slider-layout2' => [
763 - 'title' => esc_html__( 'Slider Layout 2', 'shopbuilder' ),
764 - 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout/grid-Layout-2.png' ) ),
765 - ],
766 -
767 - 'slider-layout3' => [
768 - 'title' => esc_html__( 'Slider Layout 3', 'shopbuilder' ),
769 - 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout/slider-style-3.png' ) ),
770 - 'is_pro' => $status,
771 - ],
772 -
773 - 'slider-layout4' => [
774 - 'title' => esc_html__( 'Slider Layout 4', 'shopbuilder' ),
775 - 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout/slider-style-4.png' ) ),
776 - 'is_pro' => $status,
777 - ],
778 - 'slider-layout5' => [
779 - 'title' => esc_html__( 'Slider Layout 5', 'shopbuilder' ),
780 - 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout/slider-style-5.png' ) ),
781 - 'is_pro' => $status,
782 - ],
783 - 'slider-layout6' => [
784 - 'title' => esc_html__( 'Slider Layout 6', 'shopbuilder' ),
785 - 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout/slider-style-6.png' ) ),
786 - 'is_pro' => $status,
787 - ],
788 - 'slider-layout7' => [
789 - 'title' => esc_html__( 'Slider Layout 7', 'shopbuilder' ),
790 - 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout/slider-style-7.png' ) ),
791 - 'is_pro' => $status,
792 - ],
793 - 'slider-layout8' => [
794 - 'title' => esc_html__( 'Slider Layout 8', 'shopbuilder' ),
795 - 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout/list-style-6.png' ) ),
796 - 'is_pro' => $status,
797 - ],
798 - 'slider-layout9' => [
799 - 'title' => esc_html__( 'Slider Layout 9', 'shopbuilder' ),
800 - 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout/grid-style-8.png' ) ),
801 - 'is_pro' => $status,
802 - ],
803 - ]
804 - );
805 - }
806 -
807 - /**
808 - * List Layouts
809 - *
810 - * @return array
811 - */
812 - public static function list_layouts() {
813 - $status = ! rtsb()->has_pro();
814 -
815 - return apply_filters(
816 - 'rtsb/elements/elementor/list_layouts',
817 - [
818 - 'list-layout1' => [
819 - 'title' => esc_html__( 'List Layout 1', 'shopbuilder' ),
820 - 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout/list-Layout-1.png' ) ),
821 - ],
822 - 'list-layout2' => [
823 - 'title' => esc_html__( 'List Layout 2', 'shopbuilder' ),
824 - 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout/list-Layout-2.png' ) ),
825 - ],
826 - 'list-layout3' => [
827 - 'title' => esc_html__( 'List Layout 3', 'shopbuilder' ),
828 - 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout/list-style-3.png' ) ),
829 - 'is_pro' => $status,
830 - ],
831 - 'list-layout4' => [
832 - 'title' => esc_html__( 'List Layout 4', 'shopbuilder' ),
833 - 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout/list-style-4.png' ) ),
834 - 'is_pro' => $status,
835 - ],
836 - 'list-layout5' => [
837 - 'title' => esc_html__( 'List Layout 5', 'shopbuilder' ),
838 - 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout/list-style-5.png' ) ),
839 - 'is_pro' => $status,
840 - ],
841 - 'list-layout6' => [
842 - 'title' => esc_html__( 'List Layout 6', 'shopbuilder' ),
843 - 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout/list-style-6.png' ) ),
844 - 'is_pro' => $status,
845 - ],
846 - 'list-layout7' => [
847 - 'title' => esc_html__( 'List Layout 7', 'shopbuilder' ),
848 - 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout/list-style-7.png' ) ),
849 - 'is_pro' => $status,
850 - ],
851 - ]
852 - );
853 - }
854 -
855 - /**
856 - * Category Layouts
857 - *
858 - * @return array
859 - */
860 - public static function category_layouts() {
861 - $status = ! rtsb()->has_pro();
862 -
863 - return apply_filters(
864 - 'rtsb/elements/elementor/category_layouts',
865 - [
866 - 'category-layout1' => [
867 - 'title' => esc_html__( 'Category Layout 1', 'shopbuilder' ),
868 - 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout/categories-1.png' ) ),
869 - ],
870 -
871 - 'category-layout2' => [
872 - 'title' => esc_html__( 'Category Layout 2', 'shopbuilder' ),
873 - 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout/categories-2.png' ) ),
874 - ],
875 - 'category-layout3' => [
876 - 'title' => esc_html__( 'Category Layout 3', 'shopbuilder' ),
877 - 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout/categories-3.png' ) ),
878 - 'is_pro' => $status,
879 - ],
880 - 'category-layout4' => [
881 - 'title' => esc_html__( 'Category Layout 4', 'shopbuilder' ),
882 - 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout/categories-3.png' ) ),
883 - 'is_pro' => $status,
884 - ],
885 -
886 - ]
887 - );
888 - }
889 -
890 - /**
891 - * Category Layouts
892 - *
893 - * @return array
894 - */
895 - public static function share_layouts() {
896 - $status = ! rtsb()->has_pro();
897 -
898 - return apply_filters(
899 - 'rtsb/elements/elementor/share_layouts',
900 - [
901 - 'share-layout1' => [
902 - 'title' => esc_html__( 'Social Share Preset 1', 'shopbuilder' ),
903 - 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout/share-preset-1.png' ) ),
904 - ],
905 -
906 - 'share-layout2' => [
907 - 'title' => esc_html__( 'Social Share Preset 2', 'shopbuilder' ),
908 - 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout/share-preset-2.png' ) ),
909 - ],
910 -
911 - // TODO: Will be activated later.
912 - // 'share-layout3' => [
913 - // 'title' => esc_html__( 'Social Share Preset 3', 'shopbuilder' ),
914 - // 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout/share-preset-1.png' ) ),
915 - // 'is_pro' => $status,
916 - // ],
917 - ]
918 - );
919 - }
920 -
921 - /**
922 - * Action Button Presets
923 - *
924 - * @return array
925 - */
926 - public static function action_btn_presets() {
927 -
928 - return apply_filters(
929 - 'rtsb/elements/elementor/action_btn_presets',
930 - [
931 - 'preset1' => [
932 - 'title' => esc_html__( 'Preset 1', 'shopbuilder' ),
933 - 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout/action-preset-1.jpg' ) ),
934 - ],
935 -
936 - 'preset2' => [
937 - 'title' => esc_html__( 'Preset 2', 'shopbuilder' ),
938 - 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout/action-preset-2.jpg' ) ),
939 - ],
940 -
941 - 'preset3' => [
942 - 'title' => esc_html__( 'Preset 3', 'shopbuilder' ),
943 - 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout/action-preset-3.jpg' ) ),
944 - ],
945 - 'preset4' => [
946 - 'title' => esc_html__( 'Preset 4', 'shopbuilder' ),
947 - 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout/action-preset-4.jpg' ) ),
948 - ],
949 - 'preset5' => [
950 - 'title' => esc_html__( 'Preset 5', 'shopbuilder' ),
951 - 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout/action-preset-5.jpg' ) ),
952 - 'is_pro' => ! rtsb()->has_pro(),
953 - ],
954 - 'preset6' => [
955 - 'title' => esc_html__( 'Preset 6', 'shopbuilder' ),
956 - 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout/action-preset-6.jpg' ) ),
957 - 'is_pro' => ! rtsb()->has_pro(),
958 - ],
959 - ]
960 - );
961 - }
962 -
963 - /**
964 - * Badge Presets
965 - *
966 - * @return array
967 - */
968 - public static function badge_presets() {
969 - $status = ! rtsb()->has_pro();
970 -
971 - return apply_filters(
972 - 'rtsb/elements/elementor/badge_presets',
973 - [
974 - 'preset1' => [
975 - 'title' => esc_html__( 'Preset 1', 'shopbuilder' ),
976 - 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout/badge-preset-1.png' ) ),
977 - ],
978 -
979 - 'preset2' => [
980 - 'title' => esc_html__( 'Preset 2', 'shopbuilder' ),
981 - 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout/badge-preset-2.png' ) ),
982 - ],
983 -
984 - 'preset3' => [
985 - 'title' => esc_html__( 'Preset 3', 'shopbuilder' ),
986 - 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout/badge-preset-3.png' ) ),
987 - ],
988 -
989 - 'preset4' => [
990 - 'title' => esc_html__( 'Preset 4', 'shopbuilder' ),
991 - 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout/badge-preset-4.png' ) ),
992 - ],
993 - ]
994 - );
995 - }
996 -
997 - /**
998 - * Single Category Layouts
999 - *
1000 - * @return array
1001 - */
1002 - public static function single_category_layouts() {
1003 - $status = ! rtsb()->has_pro();
1004 -
1005 - return apply_filters(
1006 - 'rtsb/elements/elementor/category_single_layouts',
1007 - [
1008 - 'category-single-layout1' => [
1009 - 'title' => esc_html__( 'Single Category Layout 1', 'shopbuilder' ),
1010 - 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout/single-category-1.png' ) ),
1011 - ],
1012 -
1013 - 'category-single-layout2' => [
1014 - 'title' => esc_html__( 'Single Category Layout 2', 'shopbuilder' ),
1015 - 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout/single-category-2.png' ) ),
1016 - 'is_pro' => $status,
1017 - ],
1018 - ]
1019 - );
1020 - }
1021 -
1022 -
1023 - /**
1024 - * Posts Order By.
1025 - *
1026 - * @return array
1027 - */
1028 - public static function posts_order_by() {
1029 - return [
1030 - 'ID' => esc_html__( 'Product ID', 'shopbuilder' ),
1031 - 'title' => esc_html__( 'Product Title', 'shopbuilder' ),
1032 - 'price' => esc_html__( 'Product Price', 'shopbuilder' ),
1033 - 'date' => esc_html__( 'Date', 'shopbuilder' ),
1034 - 'menu_order' => esc_html__( 'Menu Order', 'shopbuilder' ),
1035 - 'rand' => esc_html__( 'Random', 'shopbuilder' ),
1036 - ];
1037 - }
1038 -
1039 - /**
1040 - * Categories Order By.
1041 - *
1042 - * @return array
1043 - */
1044 - public static function cats_order_by() {
1045 - return [
1046 - 'id' => esc_html__( 'Category IDs', 'shopbuilder' ),
1047 - 'name' => esc_html__( 'Category Name', 'shopbuilder' ),
1048 - 'count' => esc_html__( 'Product Count', 'shopbuilder' ),
1049 - 'menu_order' => esc_html__( 'Menu Order', 'shopbuilder' ),
1050 - ];
1051 - }
1052 -
1053 - /**
1054 - * Posts Order By.
1055 - *
1056 - * @return array
1057 - */
1058 - public static function posts_order() {
1059 - return [
1060 - 'ASC' => esc_html__( 'Ascending', 'shopbuilder' ),
1061 - 'DESC' => esc_html__( 'Descending', 'shopbuilder' ),
1062 - ];
1063 - }
1064 -
1065 - /**
1066 - * Filter products
1067 - *
1068 - * @return array
1069 - */
1070 - public static function filter_products() {
1071 - return [
1072 - 'recent' => esc_html__( 'Default', 'shopbuilder' ),
1073 - 'featured' => esc_html__( 'Featured Products', 'shopbuilder' ),
1074 - 'best-selling' => esc_html__( 'Best Selling Products', 'shopbuilder' ),
1075 - 'sale' => esc_html__( 'On Sale Products', 'shopbuilder' ),
1076 - 'top-rated' => esc_html__( 'Top Rated Products', 'shopbuilder' ),
1077 - 'recently-viewed' => esc_html__( 'Recently Viewed Products', 'shopbuilder' ),
1078 - ];
1079 - }
1080 -
1081 - /**
1082 - * Pagination options
1083 - *
1084 - * @return array
1085 - */
1086 - public static function pagination_options() {
1087 - return apply_filters(
1088 - 'rtsb/elementor/pagination_options',
1089 - [
1090 - 'pagination' => esc_html__( 'Number Pagination', 'shopbuilder' ),
1091 - ]
1092 - );
1093 - }
1094 -
1095 - /**
1096 - * Heading Tags
1097 - *
1098 - * @return array
1099 - */
1100 - public static function heading_tags() {
1101 - return [
1102 - 'h1' => esc_html__( 'H1', 'shopbuilder' ),
1103 - 'h2' => esc_html__( 'H2', 'shopbuilder' ),
1104 - 'h3' => esc_html__( 'H3', 'shopbuilder' ),
1105 - 'h4' => esc_html__( 'H4', 'shopbuilder' ),
1106 - 'h5' => esc_html__( 'H5', 'shopbuilder' ),
1107 - 'h6' => esc_html__( 'H6', 'shopbuilder' ),
1108 - 'p' => esc_html__( 'p', 'shopbuilder' ),
1109 - 'div' => esc_html__( 'div', 'shopbuilder' ),
1110 - 'span' => esc_html__( 'span', 'shopbuilder' ),
1111 - ];
1112 - }
1113 -
1114 - /**
1115 - * General Style Section
1116 - *
1117 - * @param string $id_prefix Section id prefix.
1118 - * @param string $title Section title.
1119 - * @param object $obj Reference object.
1120 - * @param array $condition Condition.
1121 - * @param array $selectors CSS electors.
1122 - * @param array $conditions Conditions.
1123 - *
1124 - * @return array
1125 - */
1126 - public static function general_elementor_style( $id_prefix, $title, $obj, $condition, $selectors, $conditions = [] ) {
1127 - $prefix = str_replace( ' ', '_', strtolower( $id_prefix ) ) . '_';
1128 -
1129 - $fields[ $prefix . 'style_section' ] = $obj->start_section(
1130 - esc_html( $title ),
1131 - 'style',
1132 - $conditions,
1133 - $condition
1134 - );
1135 -
1136 - $fields[ $prefix . 'typo_note' ] = $obj->el_heading( esc_html__( 'Typography', 'shopbuilder' ), 'default' );
1137 -
1138 - $fields[ 'rtsb_el_' . $prefix . 'typography' ] = [
1139 - 'mode' => 'group',
1140 - 'type' => 'typography',
1141 - 'selector' => ! empty( $selectors['typography'] ) ? $selectors['typography'] : [],
1142 - ];
1143 -
1144 - $fields[ $prefix . 'alignment' ] = [
1145 - 'mode' => 'responsive',
1146 - 'type' => 'choose',
1147 - 'label' => esc_html__( 'Alignment', 'shopbuilder' ),
1148 - 'options' => [
1149 - 'left' => [
1150 - 'title' => esc_html__( 'Left', 'shopbuilder' ),
1151 - 'icon' => 'eicon-text-align-left',
1152 - ],
1153 - 'center' => [
1154 - 'title' => esc_html__( 'Center', 'shopbuilder' ),
1155 - 'icon' => 'eicon-text-align-center',
1156 - ],
1157 - 'right' => [
1158 - 'title' => esc_html__( 'Right', 'shopbuilder' ),
1159 - 'icon' => 'eicon-text-align-right',
1160 - ],
1161 - ],
1162 - 'selectors' => ! empty( $selectors['alignment'] ) ? $selectors['alignment'] : [],
1163 - ];
1164 -
1165 - $fields[ $prefix . 'color_note' ] = $obj->el_heading( esc_html__( 'Colors', 'shopbuilder' ), 'before' );
1166 -
1167 - $fields[ $prefix . 'color_tabs' ] = $obj->start_tab_group();
1168 - $fields[ $prefix . 'color_tab' ] = $obj->start_tab( esc_html__( 'Normal', 'shopbuilder' ) );
1169 -
1170 - $fields[ $prefix . 'color' ] = [
1171 - 'type' => 'color',
1172 - 'label' => esc_html__( 'Color', 'shopbuilder' ),
1173 - 'selectors' => ! empty( $selectors['color'] ) ? $selectors['color'] : [],
1174 - 'separator' => 'default',
1175 - ];
1176 -
1177 - $fields[ $prefix . 'bg_color' ] = [
1178 - 'type' => 'color',
1179 - 'label' => esc_html__( 'Background Color', 'shopbuilder' ),
1180 - 'selectors' => ! empty( $selectors['bg_color'] ) ? $selectors['bg_color'] : [],
1181 - 'separator' => 'default',
1182 - ];
1183 -
1184 - $fields[ $prefix . 'color_tab_end' ] = $obj->end_tab();
1185 - $fields[ $prefix . 'hover_color_tab' ] = $obj->start_tab( esc_html__( 'Hover', 'shopbuilder' ) );
1186 -
1187 - $fields[ $prefix . 'hover_color' ] = [
1188 - 'type' => 'color',
1189 - 'label' => esc_html__( 'Hover Color', 'shopbuilder' ),
1190 - 'selectors' => ! empty( $selectors['hover_color'] ) ? $selectors['hover_color'] : [],
1191 - 'separator' => 'default',
1192 - ];
1193 -
1194 - $fields[ $prefix . 'hover_bg_color' ] = [
1195 - 'type' => 'color',
1196 - 'label' => esc_html__( 'Hover Background Color', 'shopbuilder' ),
1197 - 'selectors' => ! empty( $selectors['hover_bg_color'] ) ? $selectors['hover_bg_color'] : [],
1198 - 'separator' => 'default',
1199 - ];
1200 -
1201 - $fields[ $prefix . 'hover_color_tab_end' ] = $obj->end_tab();
1202 - $fields[ $prefix . 'color_tabs_end' ] = $obj->end_tab_group();
1203 -
1204 - $fields[ $prefix . 'border_note' ] = $obj->el_heading( esc_html__( 'Border', 'shopbuilder' ), 'before' );
1205 -
1206 - $fields[ 'rtsb_el_' . $prefix . 'border' ] = [
1207 - 'mode' => 'group',
1208 - 'type' => 'border',
1209 - 'label' => esc_html__( 'Border', 'shopbuilder' ),
1210 - 'selector' => ! empty( $selectors['border'] ) ? $selectors['border'] : [],
1211 - 'fields_options' => [
1212 - 'color' => [
1213 - 'label' => esc_html__( 'Border Color', 'shopbuilder' ),
1214 - ],
1215 - ],
1216 - 'separator' => 'default',
1217 - ];
1218 -
1219 - $fields[ $prefix . 'border_hover_color' ] = [
1220 - 'type' => 'color',
1221 - 'label' => esc_html__( 'Hover Border Color', 'shopbuilder' ),
1222 - 'condition' => [ 'rtsb_el_' . $prefix . 'border_border!' => [ '' ] ],
1223 - 'selectors' => ! empty( $selectors['border_hover_color'] ) ? $selectors['border_hover_color'] : [],
1224 - 'separator' => 'default',
1225 - ];
1226 -
1227 - $fields[ $prefix . 'spacing_note' ] = $obj->el_heading( esc_html__( 'Spacing', 'shopbuilder' ), 'before' );
1228 -
1229 - $fields[ $prefix . 'padding' ] = [
1230 - 'mode' => 'responsive',
1231 - 'type' => 'dimensions',
1232 - 'label' => esc_html__( 'Padding', 'shopbuilder' ),
1233 - 'size_units' => [ 'px', '%', 'em' ],
1234 - 'selectors' => ! empty( $selectors['padding'] ) ? $selectors['padding'] : [],
1235 - 'separator' => 'default',
1236 - ];
1237 -
1238 - $fields[ $prefix . 'margin' ] = [
1239 - 'mode' => 'responsive',
1240 - 'type' => 'dimensions',
1241 - 'label' => esc_html__( 'Margin', 'shopbuilder' ),
1242 - 'size_units' => [ 'px', '%', 'em' ],
1243 - 'selectors' => ! empty( $selectors['margin'] ) ? $selectors['margin'] : [],
1244 - ];
1245 -
1246 - $fields[ $prefix . 'style_section_end' ] = $obj->end_section();
1247 -
1248 - return $fields;
1249 - }
1250 -
1251 - /**
1252 - * Sharing Settings.
1253 - *
1254 - * @return array
1255 - */
1256 - public static function sharing_settings() {
1257 - $settings = get_option( 'rtsb_settings' );
1258 - $share_settings = ! empty( $settings['general']['social_share']['share_platforms'] ) ? $settings['general']['social_share']['share_platforms'] : [];
1259 -
1260 - return ! empty( $share_settings ) && is_array( $share_settings ) ? $share_settings : [ 'facebook', 'twitter' ];
1261 - }
1262 - /**
1263 - * General Widgets Social Media List
1264 - *
1265 - * @return array
1266 - */
1267 - public static function social_media_field() {
1268 - $social_media_lists = self::social_media_profile_list();
1269 - $fields = [];
1270 - foreach ( $social_media_lists as $key => $social_media_list ) {
1271 - $fields[ $key . '_url' ] = [
1272 - 'label' => $social_media_list['name'],
1273 - 'type' => 'url',
1274 - 'label_block' => true,
1275 - ];
1276 - switch ( $key ) {
1277 - case 'facebook':
1278 - $fields[ $key . '_url' ]['default'] = [
1279 - 'url' => 'https://www.facebook.com/',
1280 - 'is_external' => true,
1281 - 'nofollow' => true,
1282 - ];
1283 - break;
1284 - case 'twitter':
1285 - $fields[ $key . '_url' ]['default'] = [
1286 - 'url' => 'https://www.x.com/',
1287 - 'is_external' => true,
1288 - 'nofollow' => true,
1289 - ];
1290 - break;
1291 - case 'youtube':
1292 - $fields[ $key . '_url' ]['default'] = [
1293 - 'url' => 'https://www.youtube.com/',
1294 - 'is_external' => true,
1295 - 'nofollow' => true,
1296 - ];
1297 - break;
1298 - default:
1299 - break;
1300 - }
1301 - }
1302 - return $fields;
1303 - }
1304 - /**
1305 - * General Widgets Social Media Profile List
1306 - *
1307 - * @return array
1308 - */
1309 - public static function social_media_profile_list() {
1310 - return apply_filters(
1311 - 'rtsb/general/widgets/social_media_lists',
1312 - [
1313 - 'facebook' => [
1314 - 'icon' => '<svg xmlns="http://www.w3.org/2000/svg" width="18" height="20" viewBox="0 0 602 1024"><path d="M548 6.857v150.857h-89.714q-49.143 0-66.286 20.571t-17.143 61.714v108h167.429l-22.286 169.143h-145.143v433.714h-174.857v-433.714h-145.714v-169.143h145.714v-124.571q0-106.286 59.429-164.857t158.286-58.571q84 0 130.286 6.857z"></path></svg>',
1315 - 'name' => esc_html__( 'Facebook', 'shopbuilder' ),
1316 - ],
1317 - 'twitter' => [
1318 - 'icon' => '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" width="20" height="20"><path d="M389.2 48h70.6L305.6 224.2 487 464H345L233.7 318.6 106.5 464H35.8L200.7 275.5 26.8 48H172.4L272.9 180.9 389.2 48zM364.4 421.8h39.1L151.1 88h-42L364.4 421.8z"/></svg>',
1319 - 'name' => esc_html__( 'Twitter', 'shopbuilder' ),
1320 - ],
1321 - 'linkedin' => [
1322 - 'icon' => '<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 878 1024"><path d="M199.429 357.143v566.286h-188.571v-566.286h188.571zM211.429 182.286q0.571 41.714-28.857 69.714t-77.429 28h-1.143q-46.857 0-75.429-28t-28.571-69.714q0-42.286 29.429-70t76.857-27.714 76 27.714 29.143 70zM877.714 598.857v324.571h-188v-302.857q0-60-23.143-94t-72.286-34q-36 0-60.286 19.714t-36.286 48.857q-6.286 17.143-6.286 46.286v316h-188q1.143-228 1.143-369.714t-0.571-169.143l-0.571-27.429h188v82.286h-1.143q11.429-18.286 23.429-32t32.286-29.714 49.714-24.857 65.429-8.857q97.714 0 157.143 64.857t59.429 190z"></path></svg>',
1323 - 'name' => esc_html__( 'Linkedin', 'shopbuilder' ),
1324 - ],
1325 - 'instagram' => [
1326 - 'icon' => '<svg viewBox="0 0 448 512" xmlns="http://www.w3.org/2000/svg" width="20" height="20">
1327 - <path d="M224.1 141c-63.6 0-114.9 51.3-114.9 114.9s51.3 114.9 114.9 114.9S339 319.5 339 255.9 287.7 141 224.1 141zm0 189.6c-41.1 0-74.7-33.5-74.7-74.7s33.5-74.7 74.7-74.7 74.7 33.5 74.7 74.7-33.6 74.7-74.7 74.7zm146.4-194.3c0 14.9-12 26.8-26.8 26.8-14.9 0-26.8-12-26.8-26.8s12-26.8 26.8-26.8 26.8 12 26.8 26.8zm76.1 27.2c-1.7-35.9-9.9-67.7-36.2-93.9-26.2-26.2-58-34.4-93.9-36.2-37-2.1-147.9-2.1-184.9 0-35.8 1.7-67.6 9.9-93.9 36.1s-34.4 58-36.2 93.9c-2.1 37-2.1 147.9 0 184.9 1.7 35.9 9.9 67.7 36.2 93.9s58 34.4 93.9 36.2c37 2.1 147.9 2.1 184.9 0 35.9-1.7 67.7-9.9 93.9-36.2 26.2-26.2 34.4-58 36.2-93.9 2.1-37 2.1-147.8 0-184.8zM398.8 388c-7.8 19.6-22.9 34.7-42.6 42.6-29.5 11.7-99.5 9-132.1 9s-102.7 2.6-132.1-9c-19.6-7.8-34.7-22.9-42.6-42.6-11.7-29.5-9-99.5-9-132.1s-2.6-102.7 9-132.1c7.8-19.6 22.9-34.7 42.6-42.6 29.5-11.7 99.5-9 132.1-9s102.7-2.6 132.1 9c19.6 7.8 34.7 22.9 42.6 42.6 11.7 29.5 9 99.5 9 132.1s2.7 102.7-9 132.1z"/>
1328 - </svg>',
1329 - 'name' => esc_html__( 'Instagram', 'shopbuilder' ),
1330 - ],
1331 - 'tiktok' => [
1332 - 'icon' => '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512" width="20" height="20"><path d="M448 209.9a210.1 210.1 0 0 1 -122.8-39.3V349.4A162.6 162.6 0 1 1 185 188.3V278.2a74.6 74.6 0 1 0 52.2 71.2V0l88 0a121.2 121.2 0 0 0 1.9 22.2h0A122.2 122.2 0 0 0 381 102.4a121.4 121.4 0 0 0 67 20.1z"/></svg>',
1333 - 'name' => esc_html__( 'Tiktok', 'shopbuilder' ),
1334 - ],
1335 - 'youtube' => [
1336 - 'icon' => '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512" width="22" height="24"><path d="M549.7 124.1c-6.3-23.7-24.8-42.3-48.3-48.6C458.8 64 288 64 288 64S117.2 64 74.6 75.5c-23.5 6.3-42 24.9-48.3 48.6-11.4 42.9-11.4 132.3-11.4 132.3s0 89.4 11.4 132.3c6.3 23.7 24.8 41.5 48.3 47.8C117.2 448 288 448 288 448s170.8 0 213.4-11.5c23.5-6.3 42-24.2 48.3-47.8 11.4-42.9 11.4-132.3 11.4-132.3s0-89.4-11.4-132.3zm-317.5 213.5V175.2l142.7 81.2-142.7 81.2z"/></svg>',
1337 - 'name' => esc_html__( 'Youtube', 'shopbuilder' ),
1338 - ],
1339 - 'skype' => [
1340 - 'icon' => '<svg id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="24px" height="24px" viewBox="0 0 24 24" enable-background="new 0 0 24 24" xml:space="preserve" class="eapps-social-share-buttons-item-icon"> <path d="M23.016,13.971c0.111-0.638,0.173-1.293,0.173-1.963 c0-6.213-5.014-11.249-11.199-11.249c-0.704,0-1.393,0.068-2.061,0.193C8.939,0.348,7.779,0,6.536,0C2.926,0,0,2.939,0,6.565 c0,1.264,0.357,2.443,0.973,3.445c-0.116,0.649-0.18,1.316-0.18,1.999c0,6.212,5.014,11.25,11.198,11.25 c0.719,0,1.419-0.071,2.099-0.201C15.075,23.656,16.229,24,17.465,24C21.074,24,24,21.061,24,17.435 C24,16.163,23.639,14.976,23.016,13.971z M12.386,19.88c-3.19,0-6.395-1.453-6.378-3.953c0.005-0.754,0.565-1.446,1.312-1.446 c1.877,0,1.86,2.803,4.85,2.803c2.098,0,2.814-1.15,2.814-1.95c0-2.894-9.068-1.12-9.068-6.563c0-2.945,2.409-4.977,6.196-4.753 c3.61,0.213,5.727,1.808,5.932,3.299c0.102,0.973-0.543,1.731-1.662,1.731c-1.633,0-1.8-2.188-4.613-2.188 c-1.269,0-2.341,0.53-2.341,1.679c0,2.402,9.014,1.008,9.014,6.295C18.441,17.882,16.012,19.88,12.386,19.88z"></path> </svg>',
1341 - 'name' => esc_html__( 'Skype', 'shopbuilder' ),
1342 - ],
1343 - 'behance' => [
1344 - 'icon' => '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512" width="20" height="20"><path d="M155.3 318.4c17.2 0 31.2-6.1 31.2-25.4c0-19.7-11.7-27.4-30.3-27.5h-46v52.9h45.1zm-5.4-129.6H110.3v44.8H153c15.1 0 25.8-6.6 25.8-22.9c0-17.7-13.7-21.9-28.9-21.9zm129.5 74.8h62.2c-1.7-18.5-11.3-29.7-30.5-29.7c-18.3 0-30.5 11.4-31.7 29.7zM384 32H64C28.7 32 0 60.7 0 96V416c0 35.3 28.7 64 64 64H384c35.3 0 64-28.7 64-64V96c0-35.3-28.7-64-64-64zM349.5 185H271.7V166.1h77.8V185zM193.7 243.7c23.6 6.7 35 27.5 35 51.6c0 39-32.7 55.7-67.6 55.9H68v-192h90.5c32.9 0 61.4 9.3 61.4 47.5c0 19.3-9 28.8-26.2 37zm118.7-38.6c43.5 0 67.6 34.3 67.6 75.4c0 1.6-.1 3.3-.2 5c0 .8-.1 1.5-.1 2.2H279.5c0 22.2 11.7 35.3 34.1 35.3c11.6 0 26.5-6.2 30.2-18.1h33.7c-10.4 31.9-31.9 46.8-65.1 46.8c-43.8 0-71.1-29.7-71.1-73c0-41.8 28.7-73.6 71.1-73.6z"/></svg>',
1345 - 'name' => esc_html__( 'Behance', 'shopbuilder' ),
1346 - ],
1347 - 'pinterest' => [
1348 - 'icon' => '<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 731 1024"><path d="M0 341.143q0-61.714 21.429-116.286t59.143-95.143 86.857-70.286 105.714-44.571 115.429-14.857q90.286 0 168 38t126.286 110.571 48.571 164q0 54.857-10.857 107.429t-34.286 101.143-57.143 85.429-82.857 58.857-108 22q-38.857 0-77.143-18.286t-54.857-50.286q-5.714 22.286-16 64.286t-13.429 54.286-11.714 40.571-14.857 40.571-18.286 35.714-26.286 44.286-35.429 49.429l-8 2.857-5.143-5.714q-8.571-89.714-8.571-107.429 0-52.571 12.286-118t38-164.286 29.714-116q-18.286-37.143-18.286-96.571 0-47.429 29.714-89.143t75.429-41.714q34.857 0 54.286 23.143t19.429 58.571q0 37.714-25.143 109.143t-25.143 106.857q0 36 25.714 59.714t62.286 23.714q31.429 0 58.286-14.286t44.857-38.857 32-54.286 21.714-63.143 11.429-63.429 3.714-56.857q0-98.857-62.571-154t-163.143-55.143q-114.286 0-190.857 74t-76.571 187.714q0 25.143 7.143 48.571t15.429 37.143 15.429 26 7.143 17.429q0 16-8.571 41.714t-21.143 25.714q-1.143 0-9.714-1.714-29.143-8.571-51.714-32t-34.857-54-18.571-61.714-6.286-60.857z"></path></svg>',
1349 - 'name' => esc_html__( 'Pinterest', 'shopbuilder' ),
1350 - ],
1351 - 'whatsapp' => [
1352 - 'icon' => '<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" fill="currentColor" class="bi bi-whatsapp" viewBox="0 0 16 16"> <path d="M13.601 2.326A7.854 7.854 0 0 0 7.994 0C3.627 0 .068 3.558.064 7.926c0 1.399.366 2.76 1.057 3.965L0 16l4.204-1.102a7.933 7.933 0 0 0 3.79.965h.004c4.368 0 7.926-3.558 7.93-7.93A7.898 7.898 0 0 0 13.6 2.326zM7.994 14.521a6.573 6.573 0 0 1-3.356-.92l-.24-.144-2.494.654.666-2.433-.156-.251a6.56 6.56 0 0 1-1.007-3.505c0-3.626 2.957-6.584 6.591-6.584a6.56 6.56 0 0 1 4.66 1.931 6.557 6.557 0 0 1 1.928 4.66c-.004 3.639-2.961 6.592-6.592 6.592zm3.615-4.934c-.197-.099-1.17-.578-1.353-.646-.182-.065-.315-.099-.445.099-.133.197-.513.646-.627.775-.114.133-.232.148-.43.05-.197-.1-.836-.308-1.592-.985-.59-.525-.985-1.175-1.103-1.372-.114-.198-.011-.304.088-.403.087-.088.197-.232.296-.346.1-.114.133-.198.198-.33.065-.134.034-.248-.015-.347-.05-.099-.445-1.076-.612-1.47-.16-.389-.323-.335-.445-.34-.114-.007-.247-.007-.38-.007a.729.729 0 0 0-.529.247c-.182.198-.691.677-.691 1.654 0 .977.71 1.916.81 2.049.098.133 1.394 2.132 3.383 2.992.47.205.84.326 1.129.418.475.152.904.129 1.246.08.38-.058 1.171-.48 1.338-.943.164-.464.164-.86.114-.943-.049-.084-.182-.133-.38-.232z"/> </svg>',
1353 - 'name' => esc_html__( 'Whatsapp', 'shopbuilder' ),
1354 - ],
1355 - 'dribble' => [
1356 - 'icon' => '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" width="20" height="20"><path d="M86.6 64l85.2 85.2C194.5 121.7 208 86.4 208 48c0-14.7-2-28.9-5.7-42.4C158.6 15 119 35.5 86.6 64zM64 86.6C35.5 119 15 158.6 5.6 202.3C19.1 206 33.3 208 48 208c38.4 0 73.7-13.5 101.3-36.1L64 86.6zM256 0c-7.3 0-14.6 .3-21.8 .9C238 16 240 31.8 240 48c0 47.3-17.1 90.5-45.4 124L256 233.4 425.4 64C380.2 24.2 320.9 0 256 0zM48 240c-16.2 0-32-2-47.1-5.8C.3 241.4 0 248.7 0 256c0 64.9 24.2 124.2 64 169.4L233.4 256 172 194.6C138.5 222.9 95.3 240 48 240zm463.1 37.8c.6-7.2 .9-14.5 .9-21.8c0-64.9-24.2-124.2-64-169.4L278.6 256 340 317.4c33.4-28.3 76.7-45.4 124-45.4c16.2 0 32 2 47.1 5.8zm-4.7 31.9C492.9 306 478.7 304 464 304c-38.4 0-73.7 13.5-101.3 36.1L448 425.4c28.5-32.3 49.1-71.9 58.4-115.7zM340.1 362.7C317.5 390.3 304 425.6 304 464c0 14.7 2 28.9 5.7 42.4C353.4 497 393 476.5 425.4 448l-85.2-85.2zM317.4 340L256 278.6 86.6 448c45.1 39.8 104.4 64 169.4 64c7.3 0 14.6-.3 21.8-.9C274 496 272 480.2 272 464c0-47.3 17.1-90.5 45.4-124z"/></svg>',
1357 - 'name' => esc_html__( 'Dribble', 'shopbuilder' ),
1358 - ],
1359 - 'reddit' => [
1360 - 'icon' => '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 512 512"><path d="M324,256a36,36,0,1,0,36,36A36,36,0,0,0,324,256Z"/><circle cx="188" cy="292" r="36" transform="translate(-97.43 94.17) rotate(-22.5)"/><path d="M496,253.77c0-31.19-25.14-56.56-56-56.56a55.72,55.72,0,0,0-35.61,12.86c-35-23.77-80.78-38.32-129.65-41.27l22-79L363.15,103c1.9,26.48,24,47.49,50.65,47.49,28,0,50.78-23,50.78-51.21S441,48,413,48c-19.53,0-36.31,11.19-44.85,28.77l-90-17.89L247.05,168.4l-4.63.13c-50.63,2.21-98.34,16.93-134.77,41.53A55.38,55.38,0,0,0,72,197.21c-30.89,0-56,25.37-56,56.56a56.43,56.43,0,0,0,28.11,49.06,98.65,98.65,0,0,0-.89,13.34c.11,39.74,22.49,77,63,105C146.36,448.77,199.51,464,256,464s109.76-15.23,149.83-42.89c40.53-28,62.85-65.27,62.85-105.06a109.32,109.32,0,0,0-.84-13.3A56.32,56.32,0,0,0,496,253.77ZM414,75a24,24,0,1,1-24,24A24,24,0,0,1,414,75ZM42.72,253.77a29.6,29.6,0,0,1,29.42-29.71,29,29,0,0,1,13.62,3.43c-15.5,14.41-26.93,30.41-34.07,47.68A30.23,30.23,0,0,1,42.72,253.77ZM390.82,399c-35.74,24.59-83.6,38.14-134.77,38.14S157,423.61,121.29,399c-33-22.79-51.24-52.26-51.24-83A78.5,78.5,0,0,1,75,288.72c5.68-15.74,16.16-30.48,31.15-43.79a155.17,155.17,0,0,1,14.76-11.53l.3-.21,0,0,.24-.17c35.72-24.52,83.52-38,134.61-38s98.9,13.51,134.62,38l.23.17.34.25A156.57,156.57,0,0,1,406,244.92c15,13.32,25.48,28.05,31.16,43.81a85.44,85.44,0,0,1,4.31,17.67,77.29,77.29,0,0,1,.6,9.65C442.06,346.77,423.86,376.24,390.82,399Zm69.6-123.92c-7.13-17.28-18.56-33.29-34.07-47.72A29.09,29.09,0,0,1,440,224a29.59,29.59,0,0,1,29.41,29.71A30.07,30.07,0,0,1,460.42,275.1Z"/><path d="M323.23,362.22c-.25.25-25.56,26.07-67.15,26.27-42-.2-66.28-25.23-67.31-26.27h0a4.14,4.14,0,0,0-5.83,0l-13.7,13.47a4.15,4.15,0,0,0,0,5.89h0c3.4,3.4,34.7,34.23,86.78,34.45,51.94-.22,83.38-31.05,86.78-34.45h0a4.16,4.16,0,0,0,0-5.9l-13.71-13.47a4.13,4.13,0,0,0-5.81,0Z"/></svg>',
1361 - 'name' => esc_html__( 'Reddit', 'shopbuilder' ),
1362 - ],
1363 -
1364 - ]
1365 - );
1366 - }
1367 -}
1 +<?php
2 +/**
3 + * BuilderFns class
4 + *
5 + * The builder.
6 + *
7 + * @package RadiusTheme\SB
8 + * @since 1.0.0
9 + */
10 +
11 +namespace RadiusTheme\SB\Elementor\Helper;
12 +
13 +// Do not allow directly accessing this file.
14 +if ( ! defined( 'ABSPATH' ) ) {
15 + exit( 'This script cannot be accessed directly.' );
16 +}
17 +
18 +/**
19 + * BuilderFns class
20 + */
21 +class ControlHelper {
22 + /**
23 + * Widget alignment.
24 + *
25 + * @return array
26 + */
27 + public static function alignment() {
28 + return [
29 + 'left' => [
30 + 'title' => esc_html__( 'Left', 'shopbuilder' ),
31 + 'icon' => 'eicon-text-align-left',
32 + ],
33 + 'center' => [
34 + 'title' => esc_html__( 'Center', 'shopbuilder' ),
35 + 'icon' => 'eicon-text-align-center',
36 + ],
37 + 'right' => [
38 + 'title' => esc_html__( 'Right', 'shopbuilder' ),
39 + 'icon' => 'eicon-text-align-right',
40 + ],
41 + 'justify' => [
42 + 'title' => esc_html__( 'Justified', 'shopbuilder' ),
43 + 'icon' => 'eicon-text-align-justify',
44 + ],
45 + ];
46 + }
47 + /**
48 + * Widget alignment.
49 + *
50 + * @return array
51 + */
52 + public static function flex_alignment() {
53 + return [
54 + 'start' => [
55 + 'title' => esc_html__( 'Start', 'shopbuilder' ),
56 + 'icon' => 'eicon-text-align-left',
57 + ],
58 + 'center' => [
59 + 'title' => esc_html__( 'Center', 'shopbuilder' ),
60 + 'icon' => 'eicon-text-align-center',
61 + ],
62 + 'end' => [
63 + 'title' => esc_html__( 'End', 'shopbuilder' ),
64 + 'icon' => 'eicon-text-align-right',
65 + ],
66 + ];
67 + }
68 + /**
69 + * Grid Layout Columns
70 + *
71 + * @return array
72 + */
73 + public static function layout_columns() {
74 + return [
75 + 0 => esc_html__( 'Layout Default', 'shopbuilder' ),
76 + 1 => esc_html__( '1 Column', 'shopbuilder' ),
77 + 2 => esc_html__( '2 Columns', 'shopbuilder' ),
78 + 3 => esc_html__( '3 Columns', 'shopbuilder' ),
79 + 4 => esc_html__( '4 Columns', 'shopbuilder' ),
80 + 5 => esc_html__( '5 Columns', 'shopbuilder' ),
81 + 6 => esc_html__( '6 Columns', 'shopbuilder' ),
82 + ];
83 + }
84 +
85 + /**
86 + * Grid Layouts
87 + *
88 + * @return array
89 + */
90 + public static function grid_layouts() {
91 + $status = ! rtsb()->has_pro();
92 +
93 + return apply_filters(
94 + 'rtsb/elements/elementor/grid_layouts',
95 + [
96 + 'grid-layout1' => [
97 + 'title' => esc_html__( 'Grid Layout 1', 'shopbuilder' ),
98 + 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout/grid-style-01.png' ) ),
99 + ],
100 +
101 + 'grid-layout2' => [
102 + 'title' => esc_html__( 'Grid Layout 2', 'shopbuilder' ),
103 + 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout/grid-style-02.png' ) ),
104 + ],
105 +
106 + // TODO: Will be activated later.
107 + // 'grid-layout3' => [
108 + // 'title' => esc_html__( 'Grid Layout 3', 'shopbuilder' ),
109 + // 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout/grid-style-03.png' ) ),
110 + // 'is_pro' => $status,
111 + // ],
112 +
113 + // 'grid-layout4' => [
114 + // 'title' => esc_html__( 'Grid Layout 4', 'shopbuilder' ),
115 + // 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout/grid-style-02.png' ) ),
116 + // 'is_pro' => $status,
117 + // ],
118 + //
119 + // 'grid-layout5' => [
120 + // 'title' => esc_html__( 'Grid Layout 5', 'shopbuilder' ),
121 + // 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout/grid-style-01.png' ) ),
122 + // 'is_pro' => $status,
123 + // ],
124 + ]
125 + );
126 + }
127 +
128 + /**
129 + * Slider Layouts
130 + *
131 + * @return array
132 + */
133 + public static function slider_layouts() {
134 + $status = ! rtsb()->has_pro();
135 +
136 + return apply_filters(
137 + 'rtsb/elements/elementor/slider_layouts',
138 + [
139 + 'slider-layout1' => [
140 + 'title' => esc_html__( 'Slider Layout 1', 'shopbuilder' ),
141 + 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout/grid-style-01.png' ) ),
142 + ],
143 +
144 + 'slider-layout2' => [
145 + 'title' => esc_html__( 'Slider Layout 2', 'shopbuilder' ),
146 + 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout/grid-style-02.png' ) ),
147 + ],
148 +
149 + // TODO: Will be activated later.
150 + // 'slider-layout3' => [
151 + // 'title' => esc_html__( 'Slider Layout 3', 'shopbuilder' ),
152 + // 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout/grid-style-03.png' ) ),
153 + // 'is_pro' => $status,
154 + // ],
155 + //
156 + // 'slider-layout4' => [
157 + // 'title' => esc_html__( 'Slider Layout 4', 'shopbuilder' ),
158 + // 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout/grid-style-02.png' ) ),
159 + // 'is_pro' => $status,
160 + // ],
161 + //
162 + // 'slider-layout5' => [
163 + // 'title' => esc_html__( 'Slider Layout 5', 'shopbuilder' ),
164 + // 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout/grid-style-01.png' ) ),
165 + // 'is_pro' => $status,
166 + // ],
167 + ]
168 + );
169 + }
170 +
171 + /**
172 + * List Layouts
173 + *
174 + * @return array
175 + */
176 + public static function list_layouts() {
177 + $status = ! rtsb()->has_pro();
178 +
179 + return apply_filters(
180 + 'rtsb/elements/elementor/list_layouts',
181 + [
182 + 'list-layout1' => [
183 + 'title' => esc_html__( 'List Layout 1', 'shopbuilder' ),
184 + 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout/list-style-01.png' ) ),
185 + ],
186 +
187 + 'list-layout2' => [
188 + 'title' => esc_html__( 'List Layout 2', 'shopbuilder' ),
189 + 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout/list-style-02.png' ) ),
190 + ],
191 +
192 + // TODO: Will be activated later.
193 + // 'list-layout3' => [
194 + // 'title' => esc_html__( 'List Layout 3', 'shopbuilder' ),
195 + // 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout/list-style-02.png' ) ),
196 + // 'is_pro' => $status,
197 + // ],
198 + //
199 + // 'list-layout4' => [
200 + // 'title' => esc_html__( 'List Layout 4', 'shopbuilder' ),
201 + // 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout/list-style-01.png' ) ),
202 + // 'is_pro' => $status,
203 + // ],
204 + ]
205 + );
206 + }
207 +
208 + /**
209 + * Category Layouts
210 + *
211 + * @return array
212 + */
213 + public static function category_layouts() {
214 + $status = ! rtsb()->has_pro();
215 +
216 + return apply_filters(
217 + 'rtsb/elements/elementor/category_layouts',
218 + [
219 + 'category-layout1' => [
220 + 'title' => esc_html__( 'Category Layout 1', 'shopbuilder' ),
221 + 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout/grid-style-01.png' ) ),
222 + ],
223 +
224 + 'category-layout2' => [
225 + 'title' => esc_html__( 'Category Layout 2', 'shopbuilder' ),
226 + 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout/grid-style-01.png' ) ),
227 + ],
228 +
229 + // TODO: Will be activated later.
230 + // 'category-layout3' => [
231 + // 'title' => esc_html__( 'Category Layout 3', 'shopbuilder' ),
232 + // 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout/grid-style-01.png' ) ),
233 + // 'is_pro' => $status,
234 + // ],
235 + //
236 + // 'category-layout4' => [
237 + // 'title' => esc_html__( 'Category Layout 4', 'shopbuilder' ),
238 + // 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout/grid-style-01.png' ) ),
239 + // 'is_pro' => $status,
240 + // ],
241 + ]
242 + );
243 + }
244 +
245 + /**
246 + * Category Layouts
247 + *
248 + * @return array
249 + */
250 + public static function share_layouts() {
251 + $status = ! rtsb()->has_pro();
252 +
253 + return apply_filters(
254 + 'rtsb/elements/elementor/share_layouts',
255 + [
256 + 'share-layout1' => [
257 + 'title' => esc_html__( 'Social Share Preset 1', 'shopbuilder' ),
258 + 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout/share-preset-1.png' ) ),
259 + ],
260 +
261 + 'share-layout2' => [
262 + 'title' => esc_html__( 'Social Share Preset 2', 'shopbuilder' ),
263 + 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout/share-preset-2.png' ) ),
264 + ],
265 +
266 + // TODO: Will be activated later.
267 + // 'share-layout3' => [
268 + // 'title' => esc_html__( 'Social Share Preset 3', 'shopbuilder' ),
269 + // 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout/share-preset-1.png' ) ),
270 + // 'is_pro' => $status,
271 + // ],
272 + ]
273 + );
274 + }
275 +
276 + /**
277 + * Action Button Presets
278 + *
279 + * @return array
280 + */
281 + public static function action_btn_presets() {
282 +
283 + return apply_filters(
284 + 'rtsb/elements/elementor/action_btn_presets',
285 + [
286 + 'preset1' => [
287 + 'title' => esc_html__( 'Preset 1', 'shopbuilder' ),
288 + 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout/action-preset-1.png' ) ),
289 + ],
290 +
291 + 'preset2' => [
292 + 'title' => esc_html__( 'Preset 2', 'shopbuilder' ),
293 + 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout/action-preset-2.png' ) ),
294 + ],
295 +
296 + 'preset3' => [
297 + 'title' => esc_html__( 'Preset 3', 'shopbuilder' ),
298 + 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout/action-preset-3.png' ) ),
299 + ],
300 + 'preset4' => [
301 + 'title' => esc_html__( 'Preset 4', 'shopbuilder' ),
302 + 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout/action-preset-4.png' ) ),
303 + ],
304 + ]
305 + );
306 + }
307 +
308 + /**
309 + * Badge Presets
310 + *
311 + * @return array
312 + */
313 + public static function badge_presets() {
314 + $status = ! rtsb()->has_pro();
315 +
316 + return apply_filters(
317 + 'rtsb/elements/elementor/badge_presets',
318 + [
319 + 'preset1' => [
320 + 'title' => esc_html__( 'Preset 1', 'shopbuilder' ),
321 + 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout/badge-preset-1.png' ) ),
322 + ],
323 +
324 + 'preset2' => [
325 + 'title' => esc_html__( 'Preset 2', 'shopbuilder' ),
326 + 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout/badge-preset-2.png' ) ),
327 + ],
328 +
329 + 'preset3' => [
330 + 'title' => esc_html__( 'Preset 3', 'shopbuilder' ),
331 + 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout/badge-preset-3.png' ) ),
332 + ],
333 +
334 + 'preset4' => [
335 + 'title' => esc_html__( 'Preset 4', 'shopbuilder' ),
336 + 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout/badge-preset-4.png' ) ),
337 + ],
338 + ]
339 + );
340 + }
341 +
342 + /**
343 + * Single Category Layouts
344 + *
345 + * @return array
346 + */
347 + public static function single_category_layouts() {
348 + $status = ! rtsb()->has_pro();
349 +
350 + return apply_filters(
351 + 'rtsb/elements/elementor/category_single_layouts',
352 + [
353 + 'category-single-layout1' => [
354 + 'title' => esc_html__( 'Single Category Layout 1', 'shopbuilder' ),
355 + 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout/grid-style-01.png' ) ),
356 + ],
357 +
358 +// TODO: Will be activated later.
359 +// 'category-single-layout2' => [
360 +// 'title' => esc_html__( 'Single Category Layout 2', 'shopbuilder' ),
361 +// 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout/grid-style-01.png' ) ),
362 +// 'is_pro' => $status,
363 +// ],
364 +//
365 +// 'category-single-layout3' => [
366 +// 'title' => esc_html__( 'Single Category Layout 3', 'shopbuilder' ),
367 +// 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout/grid-style-01.png' ) ),
368 +// 'is_pro' => $status,
369 +// ],
370 + ]
371 + );
372 + }
373 +
374 + /**
375 + * Posts Order By.
376 + *
377 + * @return array
378 + */
379 + public static function posts_order_by() {
380 + return [
381 + 'ID' => esc_html__( 'Product ID', 'shopbuilder' ),
382 + 'title' => esc_html__( 'Product Title', 'shopbuilder' ),
383 + 'price' => esc_html__( 'Product Price', 'shopbuilder' ),
384 + 'date' => esc_html__( 'Date', 'shopbuilder' ),
385 + 'menu_order' => esc_html__( 'Menu Order', 'shopbuilder' ),
386 + 'rand' => esc_html__( 'Random', 'shopbuilder' ),
387 + ];
388 + }
389 +
390 + /**
391 + * Categories Order By.
392 + *
393 + * @return array
394 + */
395 + public static function cats_order_by() {
396 + return [
397 + 'id' => esc_html__( 'Category IDs', 'shopbuilder' ),
398 + 'name' => esc_html__( 'Category Name', 'shopbuilder' ),
399 + 'count' => esc_html__( 'Category Count', 'shopbuilder' ),
400 + 'menu_order' => esc_html__( 'Menu Order', 'shopbuilder' ),
401 + ];
402 + }
403 +
404 + /**
405 + * Posts Order By.
406 + *
407 + * @return array
408 + */
409 + public static function posts_order() {
410 + return [
411 + 'ASC' => esc_html__( 'Ascending', 'shopbuilder' ),
412 + 'DESC' => esc_html__( 'Descending', 'shopbuilder' ),
413 + ];
414 + }
415 +
416 + /**
417 + * Filter products
418 + *
419 + * @return array
420 + */
421 + public static function filter_products() {
422 + return [
423 + 'recent' => esc_html__( 'Recent Products', 'shopbuilder' ),
424 + 'featured' => esc_html__( 'Featured Products', 'shopbuilder' ),
425 + 'best-selling' => esc_html__( 'Best Selling Products', 'shopbuilder' ),
426 + 'sale' => esc_html__( 'Sale Products', 'shopbuilder' ),
427 + 'top-rated' => esc_html__( 'Top Rated Products', 'shopbuilder' ),
428 + ];
429 + }
430 +
431 + /**
432 + * Heading Tags
433 + *
434 + * @return array
435 + */
436 + public static function heading_tags() {
437 + return [
438 + 'h1' => esc_html__( 'H1', 'shopbuilder' ),
439 + 'h2' => esc_html__( 'H2', 'shopbuilder' ),
440 + 'h3' => esc_html__( 'H3', 'shopbuilder' ),
441 + 'h4' => esc_html__( 'H4', 'shopbuilder' ),
442 + 'h5' => esc_html__( 'H5', 'shopbuilder' ),
443 + 'h6' => esc_html__( 'H6', 'shopbuilder' ),
444 + 'p' => esc_html__( 'p', 'shopbuilder' ),
445 + 'div' => esc_html__( 'div', 'shopbuilder' ),
446 + 'span' => esc_html__( 'span', 'shopbuilder' ),
447 + ];
448 + }
449 +
450 + /**
451 + * General Style Section
452 + *
453 + * @param string $id_prefix Section id prefix.
454 + * @param string $title Section title.
455 + * @param object $obj Reference object.
456 + * @param array $condition Condition.
457 + * @param array $selectors CSS electors.
458 + * @param array $conditions Conditions.
459 + *
460 + * @return array
461 + */
462 + public static function general_elementor_style( $id_prefix, $title, $obj, $condition, $selectors, $conditions = [] ) {
463 + $prefix = str_replace( ' ', '_', strtolower( $id_prefix ) ) . '_';
464 +
465 + $fields[ $prefix . 'style_section' ] = $obj->start_section(
466 + esc_html( $title ),
467 + 'style',
468 + $conditions,
469 + $condition
470 + );
471 +
472 + $fields[ $prefix . 'typo_note' ] = $obj->el_heading( esc_html__( 'Typography', 'shopbuilder' ), 'default' );
473 +
474 + $fields[ 'rtsb_el_' . $prefix . 'typography' ] = [
475 + 'mode' => 'group',
476 + 'type' => 'typography',
477 + 'selector' => ! empty( $selectors['typography'] ) ? $selectors['typography'] : [],
478 + ];
479 +
480 + $fields[ $prefix . 'alignment' ] = [
481 + 'mode' => 'responsive',
482 + 'type' => 'choose',
483 + 'label' => esc_html__( 'Alignment', 'shopbuilder' ),
484 + 'options' => [
485 + 'left' => [
486 + 'title' => esc_html__( 'Left', 'shopbuilder' ),
487 + 'icon' => 'eicon-text-align-left',
488 + ],
489 + 'center' => [
490 + 'title' => esc_html__( 'Center', 'shopbuilder' ),
491 + 'icon' => 'eicon-text-align-center',
492 + ],
493 + 'right' => [
494 + 'title' => esc_html__( 'Right', 'shopbuilder' ),
495 + 'icon' => 'eicon-text-align-right',
496 + ],
497 + ],
498 + 'selectors' => ! empty( $selectors['alignment'] ) ? $selectors['alignment'] : [],
499 + ];
500 +
501 + $fields[ $prefix . 'color_note' ] = $obj->el_heading( esc_html__( 'Colors', 'shopbuilder' ), 'before' );
502 +
503 + $fields[ $prefix . 'color_tabs' ] = $obj->start_tab_group();
504 + $fields[ $prefix . 'color_tab' ] = $obj->start_tab( esc_html__( 'Normal', 'shopbuilder' ) );
505 +
506 + $fields[ $prefix . 'color' ] = [
507 + 'type' => 'color',
508 + 'label' => esc_html__( 'Color', 'shopbuilder' ),
509 + 'selectors' => ! empty( $selectors['color'] ) ? $selectors['color'] : [],
510 + 'separator' => 'default',
511 + ];
512 +
513 + $fields[ $prefix . 'bg_color' ] = [
514 + 'type' => 'color',
515 + 'label' => esc_html__( 'Background Color', 'shopbuilder' ),
516 + 'selectors' => ! empty( $selectors['bg_color'] ) ? $selectors['bg_color'] : [],
517 + 'separator' => 'default',
518 + ];
519 +
520 + $fields[ $prefix . 'color_tab_end' ] = $obj->end_tab();
521 + $fields[ $prefix . 'hover_color_tab' ] = $obj->start_tab( esc_html__( 'Hover', 'shopbuilder' ) );
522 +
523 + $fields[ $prefix . 'hover_color' ] = [
524 + 'type' => 'color',
525 + 'label' => esc_html__( 'Hover Color', 'shopbuilder' ),
526 + 'selectors' => ! empty( $selectors['hover_color'] ) ? $selectors['hover_color'] : [],
527 + 'separator' => 'default',
528 + ];
529 +
530 + $fields[ $prefix . 'hover_bg_color' ] = [
531 + 'type' => 'color',
532 + 'label' => esc_html__( 'Hover Background Color', 'shopbuilder' ),
533 + 'selectors' => ! empty( $selectors['hover_bg_color'] ) ? $selectors['hover_bg_color'] : [],
534 + 'separator' => 'default',
535 + ];
536 +
537 + $fields[ $prefix . 'hover_color_tab_end' ] = $obj->end_tab();
538 + $fields[ $prefix . 'color_tabs_end' ] = $obj->end_tab_group();
539 +
540 + $fields[ $prefix . 'border_note' ] = $obj->el_heading( esc_html__( 'Border', 'shopbuilder' ), 'before' );
541 +
542 + $fields[ 'rtsb_el_' . $prefix . 'border' ] = [
543 + 'mode' => 'group',
544 + 'type' => 'border',
545 + 'label' => esc_html__( 'Border', 'shopbuilder' ),
546 + 'selector' => ! empty( $selectors['border'] ) ? $selectors['border'] : [],
547 + 'separator' => 'default',
548 + ];
549 +
550 + $fields[ $prefix . 'border_hover_color' ] = [
551 + 'type' => 'color',
552 + 'label' => esc_html__( 'Hover Color', 'shopbuilder' ),
553 + 'condition' => [ 'rtsb_el_' . $prefix . 'border_border!' => [ '' ] ],
554 + 'selectors' => ! empty( $selectors['border_hover_color'] ) ? $selectors['border_hover_color'] : [],
555 + ];
556 +
557 + $fields[ $prefix . 'spacing_note' ] = $obj->el_heading( esc_html__( 'Spacing', 'shopbuilder' ), 'before' );
558 +
559 + $fields[ $prefix . 'padding' ] = [
560 + 'mode' => 'responsive',
561 + 'type' => 'dimensions',
562 + 'label' => esc_html__( 'Padding', 'shopbuilder' ),
563 + 'size_units' => [ 'px', '%', 'em' ],
564 + 'selectors' => ! empty( $selectors['padding'] ) ? $selectors['padding'] : [],
565 + 'separator' => 'default',
566 + ];
567 +
568 + $fields[ $prefix . 'margin' ] = [
569 + 'mode' => 'responsive',
570 + 'type' => 'dimensions',
571 + 'label' => esc_html__( 'Margin', 'shopbuilder' ),
572 + 'size_units' => [ 'px', '%', 'em' ],
573 + 'selectors' => ! empty( $selectors['margin'] ) ? $selectors['margin'] : [],
574 + ];
575 +
576 + $fields[ $prefix . 'style_section_end' ] = $obj->end_section();
577 +
578 + return $fields;
579 + }
580 +
581 + /**
582 + * Sharing Settings.
583 + *
584 + * @return array
585 + */
586 + public static function sharing_settings() {
587 + $settings = get_option( 'rtsb_settings' );
588 + $share_settings = ! empty( $settings['general']['social_share']['share_platforms'] ) ? $settings['general']['social_share']['share_platforms'] : [];
589 +
590 + return ! empty( $share_settings ) && is_array( $share_settings ) ? $share_settings : [ 'facebook', 'twitter' ];
591 + }
592 +}