PluginProbe
ShopBuilder – WooCommerce Builder For Elementor / 2.0.3
ShopBuilder – WooCommerce Builder For Elementor v2.0.3
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.3, at app/Elementor/Helper/ControlHelper.php

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