PluginProbe
ShopBuilder – WooCommerce Builder For Elementor / 2.1.2
ShopBuilder – WooCommerce Builder For Elementor v2.1.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 / Widgets / Controls / OrderReviewSettings.php

OrderReviewSettings.php in ShopBuilder – WooCommerce Builder For Elementor 2.1.2, at app/Elementor/Widgets/Controls/OrderReviewSettings.php

301 lines 8.8 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Main ProductDescription class.
4 *
5 * @package RadiusTheme\SB
6 */
7
8 namespace RadiusTheme\SB\Elementor\Widgets\Controls;
9
10 use Elementor\Controls_Manager;
11 use RadiusTheme\SB\Helpers\Fns;
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 * Product Description class
20 */
21 class OrderReviewSettings {
22 /**
23 * Widget Control Selectors
24 *
25 * @var object
26 */
27 private static $widget = [];
28 /**
29 * Widget Control Selectors
30 *
31 * @var array
32 */
33 private static $selectors = [];
34
35 /**
36 * Controls Settings
37 *
38 * @param object $widget widget object.
39 *
40 * @return array
41 */
42 public static function widget_fields( $widget ) {
43 self::$widget = $widget;
44 self::$selectors = self::$widget->selectors;
45
46 return self::general_settings() + TitleSettings::title_settings( self::$widget ) + self::review_tables();
47 }
48
49 /**
50 * Widget Field
51 *
52 * @return array
53 */
54 public static function general_settings() {
55 // The function will Overwrite.
56 return TitleSettings::general_settings();
57 }
58
59 /**
60 * Widget Field
61 *
62 * @return array
63 */
64 public static function review_tables(): array {
65 // The function will Overwrite.
66 return [
67 'review_table_start' => [
68 'mode' => 'section_start',
69 'tab' => 'style',
70 'label' => esc_html__( 'Review Table', 'shopbuilder' ),
71 ],
72
73 'table_wrapper_border' => [
74 'mode' => 'group',
75 'type' => 'border',
76 'selector' => self::$selectors['table_wrapper_border'],
77 'size_units' => [ 'px' ],
78 'separator' => 'default',
79 'fields_options' => [
80 'border' => [
81 'label' => esc_html__( 'Table Wrapper Border', 'shopbuilder' ),
82 'label_block' => true,
83 'default' => 'solid',
84 ],
85 'width' => [
86 'default' => [
87 'top' => '0',
88 'right' => '0',
89 'bottom' => '0',
90 'left' => '0',
91 'isLinked' => true,
92 ],
93 ],
94 'color' => [
95 'label' => esc_html__( 'Border Color', 'shopbuilder' ),
96 ],
97 ],
98 ],
99
100 'table_border' => [
101 'mode' => 'group',
102 'type' => 'border',
103 'selector' => self::$selectors['table_border'],
104 'size_units' => [ 'px' ],
105 'separator' => 'default',
106 'fields_options' => [
107 'border' => [
108 'label' => esc_html__( 'Table Cell Border', 'shopbuilder' ),
109 'label_block' => true,
110 ],
111 'color' => [
112 'label' => esc_html__( 'Border Color', 'shopbuilder' ),
113 ],
114 ],
115 ],
116
117 'table_wrapper_padding' => [
118 'label' => esc_html__( 'Wrapper Padding (px)', 'shopbuilder' ),
119 'type' => 'dimensions',
120 'mode' => 'responsive',
121 'size_units' => [ 'px' ],
122 'default' => [
123 'top' => '0',
124 'right' => '0',
125 'bottom' => '0',
126 'left' => '0',
127 'unit' => 'px',
128 'isLinked' => true,
129 ],
130 'selectors' => [
131 self::$selectors['table_wrapper_padding'] => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}} !important;',
132 ],
133 ],
134 'table_wrapper_margin' => [
135 'label' => esc_html__( 'Wrapper Margin (px)', 'shopbuilder' ),
136 'type' => 'dimensions',
137 'mode' => 'responsive',
138 'size_units' => [ 'px' ],
139 'selectors' => [
140 self::$selectors['table_wrapper_margin'] => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}} !important;',
141 ],
142 ],
143
144 'table_label' => [
145 'type' => 'html',
146 'raw' => sprintf(
147 '<h3 class="rtsb-elementor-group-heading">%s</h3>',
148 esc_html__( 'Label', 'shopbuilder' )
149 ),
150 'content_classes' => 'elementor-panel-heading-title',
151 'separator' => 'default',
152 ],
153 'label_typo' => [
154 'mode' => 'group',
155 'type' => 'typography',
156 'label' => esc_html__( 'Label Typography', 'shopbuilder' ),
157 'selector' => self::$selectors['label_typo'],
158 ],
159 'label_color' => [
160 'label' => esc_html__( 'Label Color', 'shopbuilder' ),
161 'type' => 'color',
162 'selectors' => [
163 self::$selectors['label_color'] => 'color: {{VALUE}} !important;',
164 ],
165 ],
166 'label_item_padding' => [
167 'label' => esc_html__( 'Item Padding (px)', 'shopbuilder' ),
168 'type' => 'dimensions',
169 'mode' => 'responsive',
170 'size_units' => [ 'px' ],
171 'selectors' => [
172 self::$selectors['label_item_padding'] => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}} !important;',
173 ],
174 ],
175
176 'label_bg_color' => [
177 'label' => esc_html__( 'Background Color', 'shopbuilder' ),
178 'type' => 'color',
179 'alpha' => true,
180 'selectors' => [
181 self::$selectors['label_bg_color'] => 'background-color: {{VALUE}};',
182 ],
183 ],
184 'table_body' => [
185 'type' => 'html',
186 'raw' => sprintf(
187 '<h3 class="rtsb-elementor-group-heading">%s</h3>',
188 esc_html__( 'Table Body', 'shopbuilder' )
189 ),
190 'content_classes' => 'elementor-panel-heading-title',
191 'separator' => 'default',
192 ],
193 'body_text_typo' => [
194 'mode' => 'group',
195 'type' => 'typography',
196 'label' => esc_html__( 'Typography', 'shopbuilder' ),
197 'selector' => self::$selectors['body_text_typo'],
198 ],
199 'table_text_color' => [
200 'label' => esc_html__( 'Body Text Color', 'shopbuilder' ),
201 'type' => 'color',
202 'selectors' => [
203 self::$selectors['body_text_color'] => 'color: {{VALUE}} !important;',
204 ],
205 ],
206 'table_body_bg_color' => [
207 'label' => esc_html__( 'Table Body Background Color', 'shopbuilder' ),
208 'type' => 'color',
209 'alpha' => true,
210 'selectors' => [
211 self::$selectors['table_body_bg_color'] => 'background-color: {{VALUE}};',
212 ],
213 ],
214 'body_item_padding' => [
215 'label' => esc_html__( 'Item Padding (px)', 'shopbuilder' ),
216 'type' => 'dimensions',
217 'mode' => 'responsive',
218 'size_units' => [ 'px' ],
219 'selectors' => [
220 self::$selectors['body_item_padding'] => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}} !important;',
221 ],
222 ],
223 'counter_text_color' => [
224 'label' => esc_html__( 'Counter Text Color', 'shopbuilder' ),
225 'type' => 'color',
226 'selectors' => [
227 self::$selectors['counter_text_color'] => 'color: {{VALUE}} !important;',
228 ],
229 ],
230 'counter_style' => [
231 'label' => esc_html__( 'Counter Style', 'shopbuilder' ),
232 'type' => 'choose',
233 'default' => 'column',
234 'options' => [
235 'auto' => [
236 'title' => esc_html__( 'Inline', 'shopbuilder' ),
237 'icon' => 'eicon-ellipsis-h',
238 ],
239 '100%' => [
240 'title' => esc_html__( 'New Line', 'shopbuilder' ),
241 'icon' => 'eicon-editor-list-ul',
242 ],
243 ],
244 'selectors' => [
245 self::$selectors['counter_style'] => 'width:{{VALUE}};',
246 ],
247 ],
248 'table_footer' => [
249 'type' => 'html',
250 'raw' => sprintf(
251 '<h3 class="rtsb-elementor-group-heading">%s</h3>',
252 esc_html__( 'Table Footer', 'shopbuilder' )
253 ),
254 'content_classes' => 'elementor-panel-heading-title',
255 'separator' => 'default',
256 ],
257 'table_footer_label_typo' => [
258 'mode' => 'group',
259 'type' => 'typography',
260 'label' => esc_html__( 'Footer Typography', 'shopbuilder' ),
261 'selector' => self::$selectors['table_footer_label_typo'],
262 ],
263 'table_footer_label_color' => [
264 'label' => esc_html__( 'Label Color', 'shopbuilder' ),
265 'type' => 'color',
266 'selectors' => [
267 self::$selectors['table_footer_label_color'] => 'color: {{VALUE}} !important;',
268 ],
269 ],
270
271 'table_footer_text_color' => [
272 'label' => esc_html__( 'Value Color', 'shopbuilder' ),
273 'type' => 'color',
274 'selectors' => [
275 self::$selectors['table_footer_text_color'] => 'color: {{VALUE}} !important;',
276 ],
277 ],
278 'table_footer_label_bg_color' => [
279 'label' => esc_html__( 'Footer Background Color', 'shopbuilder' ),
280 'type' => 'color',
281 'alpha' => true,
282 'selectors' => [
283 self::$selectors['table_footer_label_bg_color'] => 'background-color: {{VALUE}};',
284 ],
285 ],
286 'table_footer_item_padding' => [
287 'label' => esc_html__( 'Item Padding (px)', 'shopbuilder' ),
288 'type' => 'dimensions',
289 'mode' => 'responsive',
290 'size_units' => [ 'px' ],
291 'selectors' => [
292 self::$selectors['table_footer_item_padding'] => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}} !important;',
293 ],
294 ],
295 'review_table_end' => [
296 'mode' => 'section_end',
297 ],
298 ];
299 }
300 }
301