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

MetaSettings.php in ShopBuilder – WooCommerce Builder For Elementor 3.2.5, at app/Elementor/Widgets/Controls/MetaSettings.php

135 lines 3.6 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Main MetaSettings class.
4 *
5 * @package RadiusTheme\SB
6 */
7
8 namespace RadiusTheme\SB\Elementor\Widgets\Controls;
9
10 use RadiusTheme\SB\Elementor\Helper\ControlHelper;
11
12 // Do not allow directly accessing this file.
13 if ( ! defined( 'ABSPATH' ) ) {
14 exit( 'This script cannot be accessed directly.' );
15 }
16
17 /**
18 * MetaSettings class
19 */
20 class MetaSettings {
21 /**
22 * @param object $widget widget.
23 * @return array
24 */
25 public static function widget_fields( $widget ) {
26 $alignment = ControlHelper::flex_alignment();
27 $fields = [
28 'meta_settings_content' => [
29 'mode' => 'section_start',
30 'label' => esc_html__( 'Settings', 'shopbuilder' ),
31 'tab' => 'content',
32 ],
33
34 'meta_layout' => [
35 'label' => esc_html__( 'Layout', 'shopbuilder' ),
36 'type' => 'choose',
37 'default' => 'column',
38 'options' => [
39 'row' => [
40 'title' => esc_html__( 'Inline', 'shopbuilder' ),
41 'icon' => 'eicon-ellipsis-h',
42 ],
43 'column' => [
44 'title' => esc_html__( 'New Line', 'shopbuilder' ),
45 'icon' => 'eicon-editor-list-ul',
46 ],
47 ],
48
49 'prefix_class' => 'shopbuilder-layout-',
50 'separator' => 'default',
51 'selectors' => [
52 $widget->selectors['meta_layout'] => 'flex-direction: {{VALUE}};',
53 ],
54 ],
55
56 'align' => [
57 'mode' => 'responsive',
58 'label' => esc_html__( 'Alignment', 'shopbuilder' ),
59 'type' => 'choose',
60 'options' => $alignment,
61 'default' => '',
62 'selectors' => [
63 $widget->selectors['align'] => 'align-items: {{VALUE}};justify-content: {{VALUE}};',
64 ],
65 ],
66 'row_gap' => [
67 'label' => esc_html__( 'Meta Row gap(px)', 'shopbuilder' ),
68 'type' => 'slider',
69 'mode' => 'responsive',
70 'size_units' => [ 'px' ],
71 'range' => [
72 'px' => [
73 'min' => 0,
74 'max' => 100,
75 'step' => 1,
76 ],
77 ],
78 'default' => [
79 'size' => 20,
80 ],
81 'selectors' => [
82 $widget->selectors['row_gap'] => 'row-gap: {{SIZE}}{{UNIT}}',
83 ],
84 ],
85 'column_gap' => [
86 'label' => esc_html__( 'Meta Column Gap (px)', 'shopbuilder' ),
87 'type' => 'slider',
88 'mode' => 'responsive',
89 'size_units' => [ 'px' ],
90 'range' => [
91 'px' => [
92 'min' => 0,
93 'max' => 100,
94 'step' => 1,
95 ],
96 ],
97 'default' => [
98 'size' => 15,
99 ],
100 'selectors' => [
101 $widget->selectors['column_gap'] => 'column-gap: {{SIZE}}{{UNIT}}',
102 ],
103 ],
104 'show_sku' => [
105 'label' => esc_html__( 'Show SKU?', 'shopbuilder' ),
106 'type' => 'switch',
107 'description' => esc_html__( 'Switch on to show SKU.', 'shopbuilder' ),
108 'default' => 'yes',
109 ],
110 'show_cat' => [
111 'label' => esc_html__( 'Show Category?', 'shopbuilder' ),
112 'type' => 'switch',
113 'description' => esc_html__( 'Switch on to show category.', 'shopbuilder' ),
114 'default' => 'yes',
115 ],
116 'show_tag' => [
117 'label' => esc_html__( 'Show Tag?', 'shopbuilder' ),
118 'type' => 'switch',
119 'description' => esc_html__( 'Switch on to show tag.', 'shopbuilder' ),
120 'default' => 'yes',
121 ],
122 'show_brand' => [
123 'label' => esc_html__( 'Show Brand?', 'shopbuilder' ),
124 'type' => 'switch',
125 'description' => esc_html__( 'Switch on to show brand.', 'shopbuilder' ),
126 'default' => 'yes',
127 ],
128 'meta_settings_content_end' => [
129 'mode' => 'section_end',
130 ],
131 ];
132 return $fields;
133 }
134 }
135