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

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

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