PluginProbe
ShopBuilder – WooCommerce Builder For Elementor / 2.0.1
ShopBuilder – WooCommerce Builder For Elementor v2.0.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
shopbuilder / app / Elementor / Helper / ControlHelper.php

ControlHelper.php in ShopBuilder – WooCommerce Builder For Elementor 2.0.1, at app/Elementor/Helper/ControlHelper.php

653 lines 18.8 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
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-03.png' ) ),
111 'is_pro' => $status,
112 ],
113
114 // TODO: Will be activated later.
115 // 'grid-layout4' => [
116 // 'title' => esc_html__( 'Grid Layout 4', 'shopbuilder' ),
117 // 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout/grid-style-02.png' ) ),
118 // 'is_pro' => $status,
119 // ],
120 //
121 // 'grid-layout5' => [
122 // 'title' => esc_html__( 'Grid Layout 5', 'shopbuilder' ),
123 // 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout/grid-style-01.png' ) ),
124 // 'is_pro' => $status,
125 // ],
126 ]
127 );
128 }
129
130 /**
131 * Single Product Tab Layouts
132 *
133 * @return array
134 */
135 public static function single_product_tab_layouts() {
136 $status = ! rtsb()->has_pro();
137
138 return apply_filters(
139 'rtsb/elements/elementor/single_product_tab_layouts',
140 [
141 'default' => [
142 'title' => esc_html__( 'Default Layout', 'shopbuilder' ),
143 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout/tab-01.png' ) ),
144 ],
145 'custom-layout1' => [
146 'title' => esc_html__( 'Accordion Layout', 'shopbuilder' ),
147 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout/tab-02.png' ) ),
148 'is_pro' => $status,
149 ],
150 'custom-layout2' => [
151 'title' => esc_html__( 'Tab Layout', 'shopbuilder' ),
152 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout/tab-03.png' ) ),
153 'is_pro' => $status,
154 ],
155 ]
156 );
157 }
158
159 /**
160 * Slider Layouts
161 *
162 * @return array
163 */
164 public static function slider_layouts() {
165 $status = ! rtsb()->has_pro();
166
167 return apply_filters(
168 'rtsb/elements/elementor/slider_layouts',
169 [
170 'slider-layout1' => [
171 'title' => esc_html__( 'Slider Layout 1', 'shopbuilder' ),
172 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout/grid-Layout-1.png' ) ),
173 ],
174
175 'slider-layout2' => [
176 'title' => esc_html__( 'Slider Layout 2', 'shopbuilder' ),
177 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout/grid-Layout-2.png' ) ),
178 ],
179
180 // TODO: Will be activated later.
181 // 'slider-layout3' => [
182 // 'title' => esc_html__( 'Slider Layout 3', 'shopbuilder' ),
183 // 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout/grid-style-03.png' ) ),
184 // 'is_pro' => $status,
185 // ],
186 //
187 // 'slider-layout4' => [
188 // 'title' => esc_html__( 'Slider Layout 4', 'shopbuilder' ),
189 // 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout/grid-style-02.png' ) ),
190 // 'is_pro' => $status,
191 // ],
192 //
193 // 'slider-layout5' => [
194 // 'title' => esc_html__( 'Slider Layout 5', 'shopbuilder' ),
195 // 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout/grid-style-01.png' ) ),
196 // 'is_pro' => $status,
197 // ],
198 ]
199 );
200 }
201
202 /**
203 * List Layouts
204 *
205 * @return array
206 */
207 public static function list_layouts() {
208 $status = ! rtsb()->has_pro();
209
210 return apply_filters(
211 'rtsb/elements/elementor/list_layouts',
212 [
213 'list-layout1' => [
214 'title' => esc_html__( 'List Layout 1', 'shopbuilder' ),
215 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout/list-Layout-1.png' ) ),
216 ],
217
218 'list-layout2' => [
219 'title' => esc_html__( 'List Layout 2', 'shopbuilder' ),
220 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout/list-Layout-2.png' ) ),
221 ],
222
223 'list-layout3' => [
224 'title' => esc_html__( 'List Layout 3', 'shopbuilder' ),
225 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout/list-style-02.png' ) ),
226 'is_pro' => $status,
227 ],
228 // TODO: Will be activated later.
229 // 'list-layout4' => [
230 // 'title' => esc_html__( 'List Layout 4', 'shopbuilder' ),
231 // 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout/list-style-01.png' ) ),
232 // 'is_pro' => $status,
233 // ],
234 ]
235 );
236 }
237
238 /**
239 * Category Layouts
240 *
241 * @return array
242 */
243 public static function category_layouts() {
244 $status = ! rtsb()->has_pro();
245
246 return apply_filters(
247 'rtsb/elements/elementor/category_layouts',
248 [
249 'category-layout1' => [
250 'title' => esc_html__( 'Category Layout 1', 'shopbuilder' ),
251 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout/grid-style-01.png' ) ),
252 ],
253
254 'category-layout2' => [
255 'title' => esc_html__( 'Category Layout 2', 'shopbuilder' ),
256 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout/grid-style-01.png' ) ),
257 ],
258
259 // TODO: Will be activated later.
260 // 'category-layout3' => [
261 // 'title' => esc_html__( 'Category Layout 3', 'shopbuilder' ),
262 // 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout/grid-style-01.png' ) ),
263 // 'is_pro' => $status,
264 // ],
265 //
266 // 'category-layout4' => [
267 // 'title' => esc_html__( 'Category Layout 4', 'shopbuilder' ),
268 // 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout/grid-style-01.png' ) ),
269 // 'is_pro' => $status,
270 // ],
271 ]
272 );
273 }
274
275 /**
276 * Category Layouts
277 *
278 * @return array
279 */
280 public static function share_layouts() {
281 $status = ! rtsb()->has_pro();
282
283 return apply_filters(
284 'rtsb/elements/elementor/share_layouts',
285 [
286 'share-layout1' => [
287 'title' => esc_html__( 'Social Share Preset 1', 'shopbuilder' ),
288 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout/share-preset-1.png' ) ),
289 ],
290
291 'share-layout2' => [
292 'title' => esc_html__( 'Social Share Preset 2', 'shopbuilder' ),
293 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout/share-preset-2.png' ) ),
294 ],
295
296 // TODO: Will be activated later.
297 // 'share-layout3' => [
298 // 'title' => esc_html__( 'Social Share Preset 3', 'shopbuilder' ),
299 // 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout/share-preset-1.png' ) ),
300 // 'is_pro' => $status,
301 // ],
302 ]
303 );
304 }
305
306 /**
307 * Action Button Presets
308 *
309 * @return array
310 */
311 public static function action_btn_presets() {
312
313 return apply_filters(
314 'rtsb/elements/elementor/action_btn_presets',
315 [
316 'preset1' => [
317 'title' => esc_html__( 'Preset 1', 'shopbuilder' ),
318 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout/action-preset-1.jpg' ) ),
319 ],
320
321 'preset2' => [
322 'title' => esc_html__( 'Preset 2', 'shopbuilder' ),
323 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout/action-preset-2.jpg' ) ),
324 ],
325
326 'preset3' => [
327 'title' => esc_html__( 'Preset 3', 'shopbuilder' ),
328 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout/action-preset-3.jpg' ) ),
329 ],
330 'preset4' => [
331 'title' => esc_html__( 'Preset 4', 'shopbuilder' ),
332 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout/action-preset-4.jpg' ) ),
333 ],
334 'preset5' => [
335 'title' => esc_html__( 'Preset 5', 'shopbuilder' ),
336 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout/action-preset-5.jpg' ) ),
337 'is_pro' => ! rtsb()->has_pro(),
338 ],
339 'preset6' => [
340 'title' => esc_html__( 'Preset 6', 'shopbuilder' ),
341 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout/action-preset-6.jpg' ) ),
342 'is_pro' => ! rtsb()->has_pro(),
343 ],
344 ]
345 );
346 }
347
348 /**
349 * Badge Presets
350 *
351 * @return array
352 */
353 public static function badge_presets() {
354 $status = ! rtsb()->has_pro();
355
356 return apply_filters(
357 'rtsb/elements/elementor/badge_presets',
358 [
359 'preset1' => [
360 'title' => esc_html__( 'Preset 1', 'shopbuilder' ),
361 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout/badge-preset-1.png' ) ),
362 ],
363
364 'preset2' => [
365 'title' => esc_html__( 'Preset 2', 'shopbuilder' ),
366 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout/badge-preset-2.png' ) ),
367 ],
368
369 'preset3' => [
370 'title' => esc_html__( 'Preset 3', 'shopbuilder' ),
371 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout/badge-preset-3.png' ) ),
372 ],
373
374 'preset4' => [
375 'title' => esc_html__( 'Preset 4', 'shopbuilder' ),
376 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout/badge-preset-4.png' ) ),
377 ],
378 ]
379 );
380 }
381
382 /**
383 * Single Category Layouts
384 *
385 * @return array
386 */
387 public static function single_category_layouts() {
388 $status = ! rtsb()->has_pro();
389
390 return apply_filters(
391 'rtsb/elements/elementor/category_single_layouts',
392 [
393 'category-single-layout1' => [
394 'title' => esc_html__( 'Single Category Layout 1', 'shopbuilder' ),
395 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout/grid-style-01.png' ) ),
396 ],
397
398 // TODO: Will be activated later.
399 // 'category-single-layout2' => [
400 // 'title' => esc_html__( 'Single Category Layout 2', 'shopbuilder' ),
401 // 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout/grid-style-01.png' ) ),
402 // 'is_pro' => $status,
403 // ],
404 //
405 // 'category-single-layout3' => [
406 // 'title' => esc_html__( 'Single Category Layout 3', 'shopbuilder' ),
407 // 'url' => esc_url( rtsb()->get_assets_uri( 'images/layout/grid-style-01.png' ) ),
408 // 'is_pro' => $status,
409 // ],
410 ]
411 );
412 }
413
414 /**
415 * Posts Order By.
416 *
417 * @return array
418 */
419 public static function posts_order_by() {
420 return [
421 'ID' => esc_html__( 'Product ID', 'shopbuilder' ),
422 'title' => esc_html__( 'Product Title', 'shopbuilder' ),
423 'price' => esc_html__( 'Product Price', 'shopbuilder' ),
424 'date' => esc_html__( 'Date', 'shopbuilder' ),
425 'menu_order' => esc_html__( 'Menu Order', 'shopbuilder' ),
426 'rand' => esc_html__( 'Random', 'shopbuilder' ),
427 ];
428 }
429
430 /**
431 * Categories Order By.
432 *
433 * @return array
434 */
435 public static function cats_order_by() {
436 return [
437 'id' => esc_html__( 'Category IDs', 'shopbuilder' ),
438 'name' => esc_html__( 'Category Name', 'shopbuilder' ),
439 'count' => esc_html__( 'Product Count', 'shopbuilder' ),
440 'menu_order' => esc_html__( 'Menu Order', 'shopbuilder' ),
441 ];
442 }
443
444 /**
445 * Posts Order By.
446 *
447 * @return array
448 */
449 public static function posts_order() {
450 return [
451 'ASC' => esc_html__( 'Ascending', 'shopbuilder' ),
452 'DESC' => esc_html__( 'Descending', 'shopbuilder' ),
453 ];
454 }
455
456 /**
457 * Filter products
458 *
459 * @return array
460 */
461 public static function filter_products() {
462 return [
463 'recent' => esc_html__( 'Recent Products', 'shopbuilder' ),
464 'featured' => esc_html__( 'Featured Products', 'shopbuilder' ),
465 'best-selling' => esc_html__( 'Best Selling Products', 'shopbuilder' ),
466 'sale' => esc_html__( 'Sale Products', 'shopbuilder' ),
467 'top-rated' => esc_html__( 'Top Rated Products', 'shopbuilder' ),
468 ];
469 }
470
471 /**
472 * Pagination options
473 *
474 * @return array
475 */
476 public static function pagination_options() {
477 return apply_filters(
478 'rtsb/elementor/pagination_options',
479 [
480 'pagination' => esc_html__( 'Number Pagination', 'shopbuilder' ),
481 ]
482 );
483 }
484
485 /**
486 * Heading Tags
487 *
488 * @return array
489 */
490 public static function heading_tags() {
491 return [
492 'h1' => esc_html__( 'H1', 'shopbuilder' ),
493 'h2' => esc_html__( 'H2', 'shopbuilder' ),
494 'h3' => esc_html__( 'H3', 'shopbuilder' ),
495 'h4' => esc_html__( 'H4', 'shopbuilder' ),
496 'h5' => esc_html__( 'H5', 'shopbuilder' ),
497 'h6' => esc_html__( 'H6', 'shopbuilder' ),
498 'p' => esc_html__( 'p', 'shopbuilder' ),
499 'div' => esc_html__( 'div', 'shopbuilder' ),
500 'span' => esc_html__( 'span', 'shopbuilder' ),
501 ];
502 }
503
504 /**
505 * General Style Section
506 *
507 * @param string $id_prefix Section id prefix.
508 * @param string $title Section title.
509 * @param object $obj Reference object.
510 * @param array $condition Condition.
511 * @param array $selectors CSS electors.
512 * @param array $conditions Conditions.
513 *
514 * @return array
515 */
516 public static function general_elementor_style( $id_prefix, $title, $obj, $condition, $selectors, $conditions = [] ) {
517 $prefix = str_replace( ' ', '_', strtolower( $id_prefix ) ) . '_';
518
519 $fields[ $prefix . 'style_section' ] = $obj->start_section(
520 esc_html( $title ),
521 'style',
522 $conditions,
523 $condition
524 );
525
526 $fields[ $prefix . 'typo_note' ] = $obj->el_heading( esc_html__( 'Typography', 'shopbuilder' ), 'default' );
527
528 $fields[ 'rtsb_el_' . $prefix . 'typography' ] = [
529 'mode' => 'group',
530 'type' => 'typography',
531 'selector' => ! empty( $selectors['typography'] ) ? $selectors['typography'] : [],
532 ];
533
534 $fields[ $prefix . 'alignment' ] = [
535 'mode' => 'responsive',
536 'type' => 'choose',
537 'label' => esc_html__( 'Alignment', 'shopbuilder' ),
538 'options' => [
539 'left' => [
540 'title' => esc_html__( 'Left', 'shopbuilder' ),
541 'icon' => 'eicon-text-align-left',
542 ],
543 'center' => [
544 'title' => esc_html__( 'Center', 'shopbuilder' ),
545 'icon' => 'eicon-text-align-center',
546 ],
547 'right' => [
548 'title' => esc_html__( 'Right', 'shopbuilder' ),
549 'icon' => 'eicon-text-align-right',
550 ],
551 ],
552 'selectors' => ! empty( $selectors['alignment'] ) ? $selectors['alignment'] : [],
553 ];
554
555 $fields[ $prefix . 'color_note' ] = $obj->el_heading( esc_html__( 'Colors', 'shopbuilder' ), 'before' );
556
557 $fields[ $prefix . 'color_tabs' ] = $obj->start_tab_group();
558 $fields[ $prefix . 'color_tab' ] = $obj->start_tab( esc_html__( 'Normal', 'shopbuilder' ) );
559
560 $fields[ $prefix . 'color' ] = [
561 'type' => 'color',
562 'label' => esc_html__( 'Color', 'shopbuilder' ),
563 'selectors' => ! empty( $selectors['color'] ) ? $selectors['color'] : [],
564 'separator' => 'default',
565 ];
566
567 $fields[ $prefix . 'bg_color' ] = [
568 'type' => 'color',
569 'label' => esc_html__( 'Background Color', 'shopbuilder' ),
570 'selectors' => ! empty( $selectors['bg_color'] ) ? $selectors['bg_color'] : [],
571 'separator' => 'default',
572 ];
573
574 $fields[ $prefix . 'color_tab_end' ] = $obj->end_tab();
575 $fields[ $prefix . 'hover_color_tab' ] = $obj->start_tab( esc_html__( 'Hover', 'shopbuilder' ) );
576
577 $fields[ $prefix . 'hover_color' ] = [
578 'type' => 'color',
579 'label' => esc_html__( 'Hover Color', 'shopbuilder' ),
580 'selectors' => ! empty( $selectors['hover_color'] ) ? $selectors['hover_color'] : [],
581 'separator' => 'default',
582 ];
583
584 $fields[ $prefix . 'hover_bg_color' ] = [
585 'type' => 'color',
586 'label' => esc_html__( 'Hover Background Color', 'shopbuilder' ),
587 'selectors' => ! empty( $selectors['hover_bg_color'] ) ? $selectors['hover_bg_color'] : [],
588 'separator' => 'default',
589 ];
590
591 $fields[ $prefix . 'hover_color_tab_end' ] = $obj->end_tab();
592 $fields[ $prefix . 'color_tabs_end' ] = $obj->end_tab_group();
593
594 $fields[ $prefix . 'border_note' ] = $obj->el_heading( esc_html__( 'Border', 'shopbuilder' ), 'before' );
595
596 $fields[ 'rtsb_el_' . $prefix . 'border' ] = [
597 'mode' => 'group',
598 'type' => 'border',
599 'label' => esc_html__( 'Border', 'shopbuilder' ),
600 'selector' => ! empty( $selectors['border'] ) ? $selectors['border'] : [],
601 'fields_options' => [
602 'color' => [
603 'label' => esc_html__( 'Border Color', 'shopbuilder' ),
604 ],
605 ],
606 'separator' => 'default',
607 ];
608
609 $fields[ $prefix . 'border_hover_color' ] = [
610 'type' => 'color',
611 'label' => esc_html__( 'Hover Border Color', 'shopbuilder' ),
612 'condition' => [ 'rtsb_el_' . $prefix . 'border_border!' => [ '' ] ],
613 'selectors' => ! empty( $selectors['border_hover_color'] ) ? $selectors['border_hover_color'] : [],
614 'separator' => 'default',
615 ];
616
617 $fields[ $prefix . 'spacing_note' ] = $obj->el_heading( esc_html__( 'Spacing', 'shopbuilder' ), 'before' );
618
619 $fields[ $prefix . 'padding' ] = [
620 'mode' => 'responsive',
621 'type' => 'dimensions',
622 'label' => esc_html__( 'Padding', 'shopbuilder' ),
623 'size_units' => [ 'px', '%', 'em' ],
624 'selectors' => ! empty( $selectors['padding'] ) ? $selectors['padding'] : [],
625 'separator' => 'default',
626 ];
627
628 $fields[ $prefix . 'margin' ] = [
629 'mode' => 'responsive',
630 'type' => 'dimensions',
631 'label' => esc_html__( 'Margin', 'shopbuilder' ),
632 'size_units' => [ 'px', '%', 'em' ],
633 'selectors' => ! empty( $selectors['margin'] ) ? $selectors['margin'] : [],
634 ];
635
636 $fields[ $prefix . 'style_section_end' ] = $obj->end_section();
637
638 return $fields;
639 }
640
641 /**
642 * Sharing Settings.
643 *
644 * @return array
645 */
646 public static function sharing_settings() {
647 $settings = get_option( 'rtsb_settings' );
648 $share_settings = ! empty( $settings['general']['social_share']['share_platforms'] ) ? $settings['general']['social_share']['share_platforms'] : [];
649
650 return ! empty( $share_settings ) && is_array( $share_settings ) ? $share_settings : [ 'facebook', 'twitter' ];
651 }
652 }
653