PluginProbe
ShopBuilder – WooCommerce Builder For Elementor / 2.1.9
ShopBuilder – WooCommerce Builder For Elementor v2.1.9
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 / CheckoutPaymentSettings.php

CheckoutPaymentSettings.php in ShopBuilder – WooCommerce Builder For Elementor 2.1.9, at app/Elementor/Widgets/Controls/CheckoutPaymentSettings.php

287 lines 9.3 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 // Do not allow directly accessing this file.
11 if ( ! defined( 'ABSPATH' ) ) {
12 exit( 'This script cannot be accessed directly.' );
13 }
14
15 /**
16 * Product Description class
17 */
18 class CheckoutPaymentSettings {
19
20 /**
21 * Widget Field
22 *
23 * @return array
24 */
25 public static function widget_fields( $widget ) {
26 return self::general_settings( $widget ) + ButtonSettings::style_settings( $widget );
27 }
28
29 /**
30 * Widget Field
31 *
32 * @return array
33 */
34 public static function general_settings( $widget ) {
35 $selector = $widget->selectors;
36 return [
37 'payment_method_start' => [
38 'mode' => 'section_start',
39 'label' => esc_html__( 'Payment Method', 'shopbuilder' ),
40 'tab' => 'style',
41 ],
42
43 'payment_method_wrapper' => [
44 'type' => 'html',
45 'raw' => sprintf(
46 '<h3 class="rtsb-elementor-group-heading">%s</h3>',
47 esc_html__( 'Wrapper', 'shopbuilder' )
48 ),
49 'content_classes' => 'elementor-panel-heading-title',
50 ],
51 'payment_method_wrapper_bg_color' => [
52 'label' => esc_html__( 'Wrapper Background Color', 'shopbuilder' ),
53 'type' => 'color',
54
55 'selectors' => [
56 $selector['payment_method_wrapper_bg_color'] => 'background-color: {{VALUE}};',
57 ],
58 ],
59 'payment_tabs_start' => [
60 'mode' => 'tabs_start',
61 ],
62 'payment_normal' => [
63 'mode' => 'tab_start',
64 'label' => esc_html__( 'Normal', 'shopbuilder' ),
65 ],
66
67 'payment_link_color' => [
68 'label' => esc_html__( 'Link Color', 'shopbuilder' ),
69 'type' => 'color',
70 'selectors' => [
71 $selector['payment_link_color'] => 'color: {{VALUE}};',
72 ],
73 ],
74 'payment_normal_end' => [
75 'mode' => 'tab_end',
76 ],
77 'payment_hover' => [
78 'mode' => 'tab_start',
79 'label' => esc_html__( 'Hover', 'shopbuilder' ),
80 ],
81
82 'payment_link_hover_color' => [
83 'label' => esc_html__( 'Link Color', 'shopbuilder' ),
84 'type' => 'color',
85 'selectors' => [
86 $selector['payment_link_hover_color'] => 'color: {{VALUE}};',
87 ],
88 ],
89 'payment_hover_end' => [
90 'mode' => 'tab_end',
91 ],
92 'payment_tabs_end' => [
93 'mode' => 'tabs_end',
94 ],
95
96 'payment_label_heading' => [
97 'type' => 'html',
98 'raw' => sprintf(
99 '<h3 class="rtsb-elementor-group-heading">%s</h3>',
100 esc_html__( 'Payment Label Text', 'shopbuilder' )
101 ),
102 'content_classes' => 'elementor-panel-heading-title',
103 ],
104
105 'payment_label_typography' => [
106 'mode' => 'group',
107 'type' => 'typography',
108 'label' => esc_html__( 'Label Typography', 'shopbuilder' ),
109 'selector' => $selector['payment_label_typography'],
110 ],
111 'payment_label_color' => [
112 'label' => esc_html__( 'Label Color', 'shopbuilder' ),
113 'type' => 'color',
114 'selectors' => [
115 $selector['payment_label_color'] => 'color: {{VALUE}};',
116 ],
117 ],
118 'payment_label_active_hover_color' => [
119 'label' => esc_html__( 'Label Active/Hover Color', 'shopbuilder' ),
120 'type' => 'color',
121 'selectors' => [
122 $selector['payment_label_active_hover_color'] => 'color: {{VALUE}};',
123 ],
124 ],
125 // 'payment_label_bg_color' => [
126 // 'label' => esc_html__( 'Label Background Color', 'shopbuilder' ),
127 // 'type' => 'color',
128 //
129 // 'selectors' => [
130 // $selector['payment_label_bg_color'] => 'background-color: {{VALUE}};',
131 // ],
132 // ],
133 'payment_method_space_between' => [
134 'label' => esc_html__( 'Space Between (px)', 'shopbuilder' ),
135 'type' => 'slider',
136 'size_units' => [ 'px' ],
137 'range' => [
138 'px' => [
139 'min' => 0,
140 'max' => 100,
141 'step' => 1,
142 ],
143 ],
144 'selectors' => [
145 $selector['payment_method_space_between'] => 'margin-right: {{SIZE}}{{UNIT}} !important',
146 ],
147 ],
148 'payment_method_bacs_padding' => [
149 'label' => esc_html__( 'Padding (px)', 'shopbuilder' ),
150 'mode' => 'responsive',
151 'type' => 'dimensions',
152 'size_units' => [ 'px' ],
153 'selectors' => [
154 $selector['payment_method_bacs_padding'] => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
155 ],
156 ],
157 'payment_method_wrap_padding' => [
158 'label' => esc_html__( 'Wrapper Padding (px)', 'shopbuilder' ),
159 'mode' => 'responsive',
160 'type' => 'dimensions',
161 'size_units' => [ 'px' ],
162 'selectors' => [
163 $selector['payment_method_wrap_padding'] => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}} !important;',
164 ],
165 ],
166 'payment_method_bacs_margin' => [
167 'label' => esc_html__( 'Margin (px)', 'shopbuilder' ),
168 'mode' => 'responsive',
169 'type' => 'dimensions',
170 'size_units' => [ 'px' ],
171 'selectors' => [
172 $selector['payment_method_bacs_margin'] => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
173 ],
174 ],
175
176 'payment_description_heading' => [
177 'type' => 'html',
178 'raw' => sprintf(
179 '<h3 class="rtsb-elementor-group-heading">%s</h3>',
180 esc_html__( 'Payment Description', 'shopbuilder' )
181 ),
182 'content_classes' => 'elementor-panel-heading-title',
183 ],
184 'payment_description_typography' => [
185 'mode' => 'group',
186 'type' => 'typography',
187 'separator' => 'before',
188 'label' => esc_html__( 'Description Typography', 'shopbuilder' ),
189 'selector' => $selector['payment_description_typography'],
190 ],
191 'payment_description_text_color' => [
192 'label' => esc_html__( 'Description Text Color', 'shopbuilder' ),
193 'type' => 'color',
194 'selectors' => [
195 $selector['payment_description_text_color'] => 'color: {{VALUE}};',
196 ],
197 ],
198 'payment_description_bg_color' => [
199 'label' => esc_html__( 'Description Background Color', 'shopbuilder' ),
200 'type' => 'color',
201
202 'selectors' => [
203 $selector['payment_description_bg_color'] => 'background-color: {{VALUE}};',
204 $selector['payment_description_bg_color'] . ':before' => 'border-bottom-color: {{VALUE}};',
205 ],
206 ],
207 'payment_description_border' => [
208 'mode' => 'group',
209 'type' => 'border',
210 'label' => esc_html__( 'Border', 'shopbuilder' ),
211 'selector' => $selector['payment_description_border'],
212 'size_units' => [ 'px' ],
213 ],
214 'payment_method_desc_padding' => [
215 'label' => esc_html__( 'Padding (px)', 'shopbuilder' ),
216 'mode' => 'responsive',
217 'type' => 'dimensions',
218 'size_units' => [ 'px' ],
219 'selectors' => [
220 $selector['payment_method_desc_padding'] => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
221 ],
222 ],
223 'payment_method_desc_margin' => [
224 'label' => esc_html__( 'Margin (px)', 'shopbuilder' ),
225 'mode' => 'responsive',
226 'type' => 'dimensions',
227 'size_units' => [ 'px' ],
228 'selectors' => [
229 $selector['payment_method_desc_margin'] => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
230 ],
231 ],
232 'payment_button_area' => [
233 'type' => 'html',
234 'raw' => sprintf(
235 '<h3 class="rtsb-elementor-group-heading">%s</h3>',
236 esc_html__( 'Payment Button Area', 'shopbuilder' )
237 ),
238 'content_classes' => 'elementor-panel-heading-title',
239 ],
240 'payment_button_description_typography' => [
241 'mode' => 'group',
242 'type' => 'typography',
243 'separator' => 'before',
244 'label' => esc_html__( 'Description Typography', 'shopbuilder' ),
245 'selector' => $selector['payment_button_description_typography'],
246 ],
247 'payment_button_description_text_color' => [
248 'label' => esc_html__( 'Description Text Color', 'shopbuilder' ),
249 'type' => 'color',
250 'selectors' => [
251 $selector['payment_button_description_text_color'] => 'color: {{VALUE}};',
252 ],
253 ],
254 'payment_button_description_bg_color' => [
255 'label' => esc_html__( 'Description Background Color', 'shopbuilder' ),
256 'type' => 'color',
257
258 'selectors' => [
259 $selector['payment_button_description_bg_color'] => 'background-color: {{VALUE}};',
260 ],
261 ],
262 'payment_button_wrapper_padding' => [
263 'label' => esc_html__( 'Padding (px)', 'shopbuilder' ),
264 'mode' => 'responsive',
265 'type' => 'dimensions',
266 'size_units' => [ 'px' ],
267 'selectors' => [
268 $selector['payment_button_wrapper_padding'] => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
269 ],
270 ],
271 'payment_button_wrapper_margin' => [
272 'label' => esc_html__( 'Margin (px)', 'shopbuilder' ),
273 'mode' => 'responsive',
274 'type' => 'dimensions',
275 'size_units' => [ 'px' ],
276 'selectors' => [
277 $selector['payment_button_wrapper_margin'] => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
278 ],
279 ],
280
281 'paymeny_method_end' => [
282 'mode' => 'section_end',
283 ],
284 ];
285 }
286 }
287