PluginProbe
CartFlows – Funnel Builder & Checkout Plugin for WooCommerce / 3.0.1
CartFlows – Funnel Builder & Checkout Plugin for WooCommerce v3.0.1
3.3.0 3.2.1 3.2.0 3.1.4 3.1.3 3.1.2 3.1.1 3.1.0 3.0.1 trunk 1.0.4 1.1.0 1.1.0.1 1.1.1 1.1.10 1.1.11 1.1.12 1.1.13 1.1.14 1.1.15 1.1.16 1.1.17 1.1.18 1.1.19 1.1.2 All 162 releases
cartflows / modules / gutenberg / classes / class-cartflows-block-config.php

class-cartflows-block-config.php in CartFlows – Funnel Builder & Checkout Plugin for WooCommerce 3.0.1, at modules/gutenberg/classes/class-cartflows-block-config.php

760 lines 29.8 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Cartflows Config.
4 *
5 * @package Cartflows
6 */
7
8 if ( ! defined( 'ABSPATH' ) ) {
9 exit; // Exit if accessed directly.
10 }
11
12 if ( ! class_exists( 'Cartflows_Block_Config' ) ) {
13
14 /**
15 * Class Cartflows_Block_Config.
16 */
17 class Cartflows_Block_Config {
18
19 /**
20 * Block Attributes
21 *
22 * @var block_attributes
23 */
24 public static $block_attributes = null;
25
26 /**
27 * Block Assets
28 *
29 * @var block_attributes
30 */
31 public static $block_assets = null;
32
33 /**
34 * Get Widget List.
35 *
36 * @since 1.6.15
37 *
38 * @return array The Widget List.
39 */
40 public static function get_block_attributes() {
41
42 $btn_border_attribute = self::generate_border_attribute( 'btn' );
43
44 $optin_field_border_attribute = self::generate_border_attribute( 'inputField' );
45 $optin_button_border_attribute = self::generate_border_attribute( 'submitButton' );
46
47 $checkout_field_border_attribute = self::generate_border_attribute( 'field' );
48 $checkout_button_border_attribute = self::generate_border_attribute( 'button' );
49
50 if ( null === self::$block_attributes ) {
51 self::$block_attributes = array(
52 'wcfb/next-step-button' => array(
53 'slug' => '',
54 'title' => __( 'Next Step Button', 'cartflows' ),
55 'description' => '',
56 'default' => true,
57 'attributes' => array_merge(
58 $btn_border_attribute,
59 array(
60 'classMigrate' => false,
61 'borderStyle' => 'none',
62 'align' => 'center',
63 'malign' => 'center',
64 'talign' => 'center',
65 'titletextTransform' => 'none',
66 'subtitletextTransform' => 'none',
67 'borderWidth' => '',
68 'borderColor' => '',
69 'borderHoverColor' => '',
70 'borderRadius' => '',
71 'buttonColor' => '',
72 'buttonHoverColor' => '',
73 'paddingTypeDesktop' => 'px',
74 'paddingTypeTablet' => 'px',
75 'paddingTypeMobile' => 'px',
76 'vPaddingDesktop' => '5',
77 'hPaddingDesktop' => '30',
78 'vPaddingTablet' => '5',
79 'hPaddingTablet' => '30',
80 'vPaddingMobile' => '5',
81 'hPaddingMobile' => '30',
82 'textAlignment' => 'center',
83 'textColor' => '#ffffff',
84 'textHoverColor' => '#ffffff',
85 'titleFontFamily' => '',
86 'titleFontSize' => '20',
87 'titleFontWeight' => '500',
88 'titleFontSizeType' => 'px',
89 'titleFontSizeTablet' => '',
90 'titleFontSizeMobile' => '',
91 'titleLineHeightType' => 'em',
92 'titleLineHeight' => '',
93 'titleLineHeightTablet' => '',
94 'titleLineHeightMobile' => '',
95 'subTitleFontFamily' => '',
96 'subTitleFontWeight' => '500',
97 'subTitleFontSize' => '20',
98 'subTitleFontSizeType' => 'px',
99 'subTitleFontSizeTablet' => '',
100 'subTitleFontSizeMobile' => '',
101 'subTitleLineHeightType' => 'em',
102 'subTitleLineHeight' => '',
103 'subTitleLineHeightTablet' => '',
104 'subTitleLineHeightMobile' => '',
105 'titleletterSpacing' => '',
106 'titleLetterSpacingTablet' => '',
107 'titleLetterSpacingMobile' => '',
108 'titleLetterSpacingType' => 'px',
109 'subtitleletterSpacing' => '',
110 'subtitleLetterSpacingTablet' => '',
111 'subtitleLetterSpacingMobile' => '',
112 'subtitleLetterSpacingType' => 'px',
113 'titleBottomSpacing' => '0',
114 'iconSize' => '20',
115 'iconSpacing' => '10',
116 'iconColor' => '',
117 'iconHoverColor' => '',
118 'iconPosition' => 'before_title',
119 'backgroundType' => 'none',
120 'backgroundImage' => '',
121 'backgroundPosition' => 'center-center',
122 'backgroundSize' => 'cover',
123 'backgroundRepeat' => 'no-repeat',
124 'backgroundAttachment' => 'scroll',
125 'backgroundColor' => '#abb8c3',
126 'gradientColor1' => '#abb8c3',
127 'gradientColor2' => '#abb8c3',
128 'gradientType' => 'linear',
129 'gradientLocation1' => '0',
130 'gradientLocation2' => '100',
131 'gradientAngle' => '0',
132 'gradientPosition' => 'center center',
133 'backgroundOpacity' => 100,
134 'backgroundImageColor' => '#abb8c3',
135 'gradientValue' => '',
136 // new attr.
137 'paddingBtnTop' => 5,
138 'paddingBtnBottom' => 5,
139 'paddingBtnLeft' => 30,
140 'paddingBtnRight' => 30,
141 'paddingBtnTopTablet' => '',
142 'paddingBtnRightTablet' => '',
143 'paddingBtnBottomTablet' => '',
144 'paddingBtnLeftTablet' => '',
145 'paddingBtnTopMobile' => '',
146 'paddingBtnRightMobile' => '',
147 'paddingBtnBottomMobile' => '',
148 'paddingBtnLeftMobile' => '',
149 'titleFontFamily' => 'normal',
150 'subTitleFontFamily' => 'normal',
151 )
152 ),
153 ),
154
155 'wcfb/order-detail-form' => array(
156 'slug' => '',
157 'title' => __( 'Order Details Form', 'cartflows' ),
158 'description' => '',
159 'default' => true,
160 'attributes' => array(
161 'classMigrate' => false,
162 'align' => 'center',
163 // Genaral.
164 'orderOverview' => true,
165 'orderDetails' => true,
166 'billingAddress' => true,
167 'shippingAddress' => true,
168 // Spacing.
169 'headingBottomSpacing' => '',
170 'sectionSpacing' => '',
171 // Heading.
172 'thanyouText' => 'center',
173 'headingAlignment' => 'center',
174 'headingColor' => '',
175 'headingFontFamily' => '',
176 'headingFontWeight' => '',
177 'headingFontSize' => '',
178 'headingFontSizeType' => 'px',
179 'headingFontSizeTablet' => '',
180 'headingFontSizeMobile' => '',
181 'headingLineHeightType' => 'em',
182 'headingLineHeight' => '',
183 'headingLineHeightTablet' => '',
184 'headingLineHeightMobile' => '',
185 // Sections.
186 'sectionHeadingColor' => '',
187 'sectionHeadingFontFamily' => '',
188 'sectionHeadingFontWeight' => '',
189 'sectionHeadingFontSize' => '',
190 'sectionHeadingFontSizeType' => 'px',
191 'sectionHeadingFontSizeTablet' => '',
192 'sectionHeadingFontSizeMobile' => '',
193 'sectionHeadingLineHeightType' => '',
194 'sectionHeadingLineHeight' => 'em',
195 'sectionHeadingLineHeightTablet' => '',
196 'sectionHeadingLineHeightMobile' => '',
197 'sectionContentColor' => '',
198 'sectionContentFontFamily' => '',
199 'sectionContentFontWeight' => '',
200 'sectionContentFontSize' => '',
201 'sectionContentFontSizeType' => 'px',
202 'sectionContentFontSizeTablet' => '',
203 'sectionContentFontSizeMobile' => '',
204 'sectionContentLineHeightType' => 'em',
205 'sectionContentLineHeight' => '',
206 'sectionContentLineHeightTablet' => '',
207 'sectionContentLineHeightMobile' => '',
208 'sectionBackgroundColor' => '',
209 // Order Overview.
210 'orderOverviewTextColor' => '',
211 'orderOverviewBackgroundColor' => '',
212 'orderOverviewFontFamily' => '',
213 'orderOverviewFontWeight' => '',
214 'orderOverviewFontSize' => '',
215 'orderOverviewFontSizeType' => 'px',
216 'orderOverviewFontSizeTablet' => '',
217 'orderOverviewFontSizeMobile' => '',
218 'orderOverviewLineHeightType' => 'em',
219 'orderOverviewLineHeight' => '',
220 'orderOverviewLineHeightTablet' => '',
221 'orderOverviewLineHeightMobile' => '',
222 // Downloads.
223 'downloadHeadingColor' => '',
224 'downloadHeadingFontFamily' => '',
225 'downloadHeadingFontWeight' => '',
226 'downloadHeadingFontSize' => '',
227 'downloadHeadingFontSizeType' => 'px',
228 'downloadHeadingFontSizeTablet' => '',
229 'downloadHeadingFontSizeMobile' => '',
230 'downloadHeadingLineHeightType' => 'em',
231 'downloadHeadingLineHeight' => '',
232 'downloadHeadingLineHeightTablet' => '',
233 'downloadHeadingLineHeightMobile' => '',
234 'downloadContentColor' => '',
235 'downloadContentFontFamily' => '',
236 'downloadContentFontWeight' => '',
237 'downloadContentFontSize' => '',
238 'downloadContentFontSizeType' => 'px',
239 'downloadContentFontSizeTablet' => '',
240 'downloadContentFontSizeMobile' => '',
241 'downloadContentLineHeightType' => 'em',
242 'downloadContentLineHeight' => '',
243 'downloadContentLineHeightTablet' => '',
244 'downloadContentLineHeightMobile' => '',
245 'downloadBackgroundColor' => '',
246 // Order Details.
247 'orderDetailHeadingColor' => '',
248 'orderDetailHeadingFontFamily' => '',
249 'orderDetailHeadingFontWeight' => '',
250 'orderDetailHeadingFontSize' => '',
251 'orderDetailHeadingFontSizeType' => 'px',
252 'orderDetailHeadingFontSizeTablet' => '',
253 'orderDetailHeadingFontSizeMobile' => '',
254 'orderDetailHeadingLineHeightType' => 'em',
255 'orderDetailHeadingLineHeight' => '',
256 'orderDetailHeadingLineHeightTablet' => '',
257 'orderDetailHeadingLineHeightMobile' => '',
258 'orderDetailContentColor' => '',
259 'orderDetailContentFontFamily' => '',
260 'orderDetailContentFontWeight' => '',
261 'orderDetailContentFontSize' => '',
262 'orderDetailContentFontSizeType' => 'px',
263 'orderDetailContentFontSizeTablet' => '',
264 'orderDetailContentFontSizeMobile' => '',
265 'orderDetailContentLineHeightType' => 'em',
266 'orderDetailContentLineHeight' => '',
267 'orderDetailContentLineHeightTablet' => '',
268 'orderDetailContentLineHeightMobile' => '',
269 'orderDetailBackgroundColor' => '',
270 // Customer Details.
271 'customerDetailHeadingColor' => '',
272 'customerDetailHeadingFontFamily' => '',
273 'customerDetailHeadingFontWeight' => '',
274 'customerDetailHeadingFontSize' => '',
275 'customerDetailHeadingFontSizeType' => 'px',
276 'customerDetailHeadingFontSizeTablet' => '',
277 'customerDetailHeadingFontSizeMobile' => '',
278 'customerDetailHeadingLineHeightType' => 'em',
279 'customerDetailHeadingLineHeight' => '',
280 'customerDetailHeadingLineHeightTablet' => '',
281 'customerDetailHeadingLineHeightMobile' => '',
282 'customerDetailContentColor' => '',
283 'customerDetailContentFontFamily' => '',
284 'customerDetailContentFontWeight' => '',
285 'customerDetailContentFontSize' => '',
286 'customerDetailContentFontSizeType' => 'px',
287 'customerDetailContentFontSizeTablet' => '',
288 'customerDetailContentFontSizeMobile' => '',
289 'customerDetailContentLineHeightType' => 'em',
290 'customerDetailContentLineHeight' => '',
291 'customerDetailContentLineHeightTablet' => '',
292 'customerDetailContentLineHeightMobile' => '',
293 'customerDetailBackgroundColor' => '',
294 'backgroundType' => 'none',
295 'backgroundImage' => '',
296 'backgroundPosition' => 'center-center',
297 'backgroundSize' => 'cover',
298 'backgroundRepeat' => 'no-repeat',
299 'backgroundAttachment' => 'scroll',
300 'backgroundColor' => '',
301 'backgroundOpacity' => 100,
302 'backgroundImageColor' => '#abb8c3',
303 'odbackgroundType' => 'none',
304 'odbackgroundImage' => '',
305 'odbackgroundPosition' => 'center-center',
306 'odbackgroundSize' => 'cover',
307 'odbackgroundRepeat' => 'no-repeat',
308 'odbackgroundAttachment' => 'scroll',
309 'odbackgroundColor' => '',
310 'odbackgroundOpacity' => 100,
311 'odbackgroundImageColor' => '#abb8c3',
312 'dbackgroundType' => 'none',
313 'dbackgroundImage' => '',
314 'dbackgroundPosition' => 'center-center',
315 'dbackgroundSize' => 'cover',
316 'dbackgroundRepeat' => 'no-repeat',
317 'dbackgroundAttachment' => 'scroll',
318 'dbackgroundColor' => '',
319 'dbackgroundOpacity' => 100,
320 'dbackgroundImageColor' => '#abb8c3',
321 'odetailbackgroundType' => 'none',
322 'odetailbackgroundImage' => '',
323 'odetailbackgroundPosition' => 'center-center',
324 'odetailbackgroundSize' => 'cover',
325 'odetailbackgroundRepeat' => 'no-repeat',
326 'odetailbackgroundAttachment' => 'scroll',
327 'odetailbackgroundColor' => '',
328 'odetailbackgroundOpacity' => 100,
329 'odetailbackgroundImageColor' => '#abb8c3',
330 'cdetailbackgroundType' => 'none',
331 'cdetailbackgroundImage' => '',
332 'cdetailbackgroundPosition' => 'center-center',
333 'cdetailbackgroundSize' => 'cover',
334 'cdetailbackgroundRepeat' => 'no-repeat',
335 'cdetailbackgroundAttachment' => 'scroll',
336 'cdetailbackgroundColor' => '',
337 'cdetailsbackgroundOpacity' => 100,
338 'cdetailsbackgroundImageColor' => '#abb8c3',
339
340 // New attr.
341 'gradientColor1' => '#abb8c3',
342 'gradientColor2' => '#abb8c3',
343 'gradientType' => 'linear',
344 'gradientLocation1' => 0,
345 'gradientLocation2' => 100,
346 'gradientAngle' => 0,
347 'gradientPosition' => 'center center',
348 'gradientValue' => '',
349
350 'odgradientValue' => '',
351 // Download.
352 'dgradientValue' => '',
353 // order details.
354 'odetailgradientValue' => '',
355 // Customer details.
356 'cdetailgradientValue' => '',
357
358 'orderOverviewFontStyle' => '',
359 'orderDetailHeadingFontStyle' => '',
360 'downloadHeadingFontStyle' => '',
361 'sectionHeadingFontStyle' => '',
362 'customerDetailHeadingFontStyle' => '',
363 'headingFontStyle' => '',
364 'orderDetailContentFontStyle' => '',
365 'sectionContentFontStyle' => '',
366 'downloadContentFontStyle' => '',
367 'customerDetailContentFontStyle' => '',
368 ),
369 ),
370
371 'wcfb/checkout-form' => array(
372 'slug' => '',
373 'title' => __( 'Checkout Form', 'cartflows' ),
374 'description' => '',
375 'default' => true,
376 'is_active' => class_exists( 'Cartflows_Checkout_Markup' ),
377 'attributes' => array_merge(
378 $checkout_field_border_attribute,
379 $checkout_button_border_attribute,
380 array(
381 'block_id' => '',
382 'boxShadowColor' => '',
383 'boxShadowHOffset' => 0,
384 'boxShadowVOffset' => 0,
385 'boxShadowBlur' => 0,
386 'boxShadowSpread' => 0,
387 'boxShadowPosition' => 'outset',
388 'headBgColor' => '',
389 'fieldHrPadding' => '',
390 'fieldVrPadding' => '',
391 'fieldBgColor' => '',
392 'fieldLabelColor' => '',
393 'fieldInputColor' => '',
394 'fieldBorderStyle' => 'solid',
395 'fieldBorderWidth' => '',
396 'fieldBorderRadius' => '',
397 'fieldBorderColor' => '',
398 'fieldBorderFocusColor' => '',
399 'buttonAlignment' => 'left',
400 'buttonVrPadding' => '',
401 'buttonHrPadding' => '',
402 'buttonTextColor' => '',
403 'buttonBgColor' => '',
404 'buttonTextHoverColor' => '',
405 'buttonBgHoverColor' => '',
406 'buttonBorderStyle' => 'inherit',
407 'buttonBorderWidth' => '',
408 'buttonBorderRadius' => '',
409 'buttonBorderColor' => '',
410 'buttonBorderHoverColor' => '',
411 'fieldSpacing' => '',
412 'fieldLabelSpacing' => '',
413 'inputFontSize' => '',
414 'inputFontSizeType' => 'px',
415 'inputFontSizeTablet' => '',
416 'inputFontSizeMobile' => '',
417 'inputFontFamily' => 'Default',
418 'inputFontWeight' => '',
419 'inputFontSubset' => '',
420 'inputLineHeightType' => 'px',
421 'inputLineHeight' => '',
422 'inputLineHeightTablet' => '',
423 'inputLineHeightMobile' => '',
424 'inputLoadGoogleFonts' => false,
425 'submitButtonText' => '',
426 'buttonFontSize' => '',
427 'buttonFontSizeType' => 'px',
428 'buttonFontSizeTablet' => '',
429 'buttonFontSizeMobile' => '',
430 'buttonFontFamily' => 'Default',
431 'buttonFontWeight' => '',
432 'buttonFontSubset' => '',
433 'buttonLineHeightType' => 'px',
434 'buttonLineHeight' => '',
435 'buttonLineHeightTablet' => '',
436 'buttonLineHeightMobile' => '',
437 'buttonLoadGoogleFonts' => false,
438 'errorMsgColor' => '',
439 'errorMsgBgColor' => '',
440 'errorMsgBorderColor' => '',
441 'msgBorderSize' => '',
442 'msgBorderRadius' => '',
443 'msgVrPadding' => 10,
444 'msgHrPadding' => 10,
445 'msgBorderRadiusType' => 'px',
446 'fieldBorderRadiusType' => 'px',
447 'buttonBorderRadiusType' => 'px',
448 'paymentdescriptionColor' => '',
449 'paymenttitleColor' => '',
450 'sectionbgColor' => '',
451 'informationbgColor' => '',
452 'sectionhrPadding' => '',
453 'sectionvrPadding' => '',
454 'sectionhrMargin' => '',
455 'sectionvrMargin' => '',
456 'sectionBorderRadius' => '',
457 'headFontSize' => '',
458 'headFontSizeType' => 'px',
459 'headFontSizeTablet' => '',
460 'headFontSizeMobile' => '',
461 'headFontFamily' => 'Default',
462 'headFontWeight' => '',
463 'headFontSubset' => '',
464 'headLineHeightType' => 'px',
465 'headLineHeight' => '',
466 'headLineHeightTablet' => '',
467 'headLineHeightMobile' => '',
468 'headLoadGoogleFonts' => '',
469 'globaltextColor' => '',
470 'globalbgColor' => '',
471 'globalFontSize' => '',
472 'globalFontSizeType' => 'px',
473 'globalFontSizeTablet' => '',
474 'globalFontSizeMobile' => '',
475 'globalFontFamily' => 'Default',
476 'globalFontWeight' => '',
477 'globalFontSubset' => '',
478 'globalLineHeightType' => 'px',
479 'globalLineHeight' => '',
480 'globalLineHeightTablet' => '',
481 'globalLineHeightMobile' => '',
482 'globalLoadGoogleFonts' => false,
483 'backgroundType' => 'color',
484 'backgroundImage' => '',
485 'backgroundPosition' => 'center-center',
486 'backgroundSize' => 'cover',
487 'backgroundRepeat' => 'no-repeat',
488 'backgroundAttachment' => 'scroll',
489 'backgroundColor' => '',
490 'backgroundHoverColor' => '',
491 'gradientColor1' => '#abb8c3',
492 'gradientColor2' => '#abb8c3',
493 'gradientType' => 'linear',
494 'gradientLocation1' => '0',
495 'gradientLocation2' => '100',
496 'gradientAngle' => '0',
497 'gradientPosition' => 'center center',
498 'backgroundOpacity' => 100,
499 'backgroundImageColor' => '#abb8c3',
500 'gradientValue' => '',
501 'errorLabelColor' => '',
502 'errorFieldBorderColor' => '#e2401c',
503 'orderReviewColumnColor' => '#ffffff',
504 'orderReviewColumnTextColor' => '#555',
505
506 // New attrs.
507 'paymentSectionpaddingTop' => '',
508 'paymentSectionpaddingBottom' => '',
509 'paymentSectionpaddingLeft' => '',
510 'paymentSectionpaddingRight' => '',
511 'paymentSectionpaddingTopTablet' => '',
512 'paymentSectionpaddingRightTablet' => '',
513 'paymentSectionpaddingBottomTablet' => '',
514 'paymentSectionpaddingLeftTablet' => '',
515 'paymentSectionpaddingTopMobile' => '',
516 'paymentSectionpaddingRightMobile' => '',
517 'paymentSectionpaddingBottomMobile' => '',
518 'paymentSectionpaddingLeftMobile' => '',
519
520 'paymentSectionpaddingTypeDesktop' => 'px',
521 'paymentSectionpaddingTypeTablet' => 'px',
522 'paymentSectionpaddingTypeMobile' => 'px',
523
524 'paymentSectionMarginTop' => '',
525 'paymentSectionMarginBottom' => '',
526 'paymentSectionMarginLeft' => '',
527 'paymentSectionMarginRight' => '',
528 'paymentSectionMarginTopTablet' => '',
529 'paymentSectionMarginRightTablet' => '',
530 'paymentSectionMarginBottomTablet' => '',
531 'paymentSectionMarginLeftTablet' => '',
532 'paymentSectionMarginTopMobile' => '',
533 'paymentSectionMarginRightMobile' => '',
534 'paymentSectionMarginBottomMobile' => '',
535 'paymentSectionMarginLeftMobile' => '',
536
537 'paymentSectionMarginTypeDesktop' => 'px',
538 'paymentSectionMarginTypeTablet' => 'px',
539 'paymentSectionMarginTypeMobile' => 'px',
540 'spacingLink' => '',
541
542 'fieldBorderHoverColor' => '',
543
544 'buttonFontStyle' => '',
545 'inputFontStyle' => '',
546 'globalFontStyle' => '',
547 'headFontStyle' => '',
548
549 'buttonTransform' => '',
550 'buttonLetterSpacing' => '',
551 'buttonLetterSpacingTablet' => '',
552 'buttonLetterSpacingMobile' => '',
553 'buttonLetterSpacingType' => 'px',
554
555 'inputTransform' => '',
556 'inputLetterSpacing' => '',
557 'inputLetterSpacingTablet' => '',
558 'inputLetterSpacingMobile' => '',
559 'inputLetterSpacingType' => 'px',
560
561 'headTransform' => '',
562 'headLetterSpacing' => '',
563 'headLetterSpacingTablet' => '',
564 'headLetterSpacingMobile' => '',
565 'headLetterSpacingType' => 'px',
566
567 'globalTransform' => 'none',
568 'globalLetterSpacing' => '',
569 'globalLetterSpacingTablet' => '',
570 'globalLetterSpacingMobile' => '',
571 'globalLetterSpacingType' => 'px',
572 )
573 ),
574 ),
575
576 'wcfb/optin-form' => array(
577 'slug' => '',
578 'title' => __( 'Optin Form', 'cartflows' ),
579 'description' => '',
580 'default' => true,
581 'attributes' => array_merge(
582 $optin_field_border_attribute,
583 $optin_button_border_attribute,
584 array(
585 'block_id' => '',
586 'classMigrate' => false,
587 // General.
588 'generalPrimaryColor' => '',
589 'generalFontFamily' => '',
590 'generalFontWeight' => '',
591 'generalFontSize' => '',
592 'generalFontSizeType' => 'px',
593 'generalFontSizeTablet' => '',
594 'generalFontSizeMobile' => '',
595 'generalLineHeightType' => 'em',
596 'generalLineHeight' => '',
597 'generalLineHeightTablet' => '',
598 'generalLineHeightMobile' => '',
599 'generalTransform' => 'none',
600 'generalLetterSpacing' => '',
601 'generalLetterSpacingTablet' => '',
602 'generalLetterSpacingMobile' => '',
603 'generalLetterSpacingType' => 'px',
604 // Input Fields.
605 'inputFieldFontFamily' => '',
606 'inputFieldFontWeight' => '',
607 'inputFieldFontSize' => '',
608 'inputFieldFontSizeType' => 'px',
609 'inputFieldFontSizeTablet' => '',
610 'inputFieldFontSizeMobile' => '',
611 'inputFieldLineHeightType' => 'em',
612 'inputFieldLineHeight' => '',
613 'inputFieldLineHeightTablet' => '',
614 'inputFieldLineHeightMobile' => '',
615 'inputFieldLabelColor' => '',
616 'inputFieldBackgroundColor' => '',
617 'inputFieldTextPlaceholderColor' => '',
618 'inputFieldBorderStyle' => 'solid',
619 'inputFieldBorderWidth' => '',
620 'inputFieldBorderRadius' => '',
621 'inputFieldBorderColor' => '',
622 'inputFieldBorderHoverColor' => '',
623 'inputFieldTransform' => '',
624 'inputFieldLetterSpacing' => '',
625 'inputFieldLetterSpacingTablet' => '',
626 'inputFieldLetterSpacingMobile' => '',
627 'inputFieldLetterSpacingType' => 'px',
628 // Submit Button.
629 'submitButtonFontFamily' => '',
630 'submitButtonFontWeight' => '',
631 'submitButtonFontSize' => '',
632 'submitButtonFontSizeType' => 'px',
633 'submitButtonFontSizeTablet' => '',
634 'submitButtonFontSizeMobile' => '',
635 'submitButtonLineHeightType' => 'em',
636 'submitButtonLineHeight' => '',
637 'submitButtonLineHeightTablet' => '',
638 'submitButtonLineHeightMobile' => '',
639 'submitButtonTextColor' => '',
640 'submitButtonBackgroundColor' => '',
641 'submitButtonTextHoverColor' => '',
642 'submitButtonBackgroundHoverColor' => '',
643 'submitButtonBorderStyle' => '',
644 'submitButtonBorderWidth' => '',
645 'submitButtonBorderRadius' => '',
646 'submitButtonBorderColor' => '',
647 'submitButtonBorderHoverColor' => '',
648 'submitButtonTransform' => '',
649 'submitButtonLetterSpacing' => '',
650 'submitButtonLetterSpacingTablet' => '',
651 'submitButtonLetterSpacingMobile' => '',
652 'submitButtonLetterSpacingType' => 'px',
653 'boxShadowColor' => '',
654 'boxShadowHOffset' => 0,
655 'boxShadowVOffset' => 0,
656 'boxShadowBlur' => 0,
657 'boxShadowSpread' => 0,
658 'boxShadowPosition' => 'outset',
659 'generalFontStyle' => '',
660 'submitButtonFontStyle' => '',
661 'inputFieldFontStyle' => '',
662 )
663 ),
664
665 ),
666
667 );
668 }
669 return apply_filters( 'cartflows_gutenberg_blocks_attributes', self::$block_attributes );
670 }
671
672 /**
673 * Get Block Assets.
674 *
675 * @since 1.6.15
676 *
677 * @return array The Asset List.
678 */
679 public static function get_block_assets() {
680
681 if ( null === self::$block_assets ) {
682 self::$block_assets = array();
683 }
684 return self::$block_assets;
685 }
686
687 /**
688 * Border attribute generation Function.
689 *
690 * @since 2.0.0-beta.3
691 * @param array $prefix Attribute Prefix.
692 * @param array $default_args default attributes args.
693 * @return array
694 */
695 public static function generate_border_attribute( $prefix, $default_args = array() ) {
696 $defaults = wp_parse_args(
697 $default_args,
698 array(
699 // Width.
700 'borderTopWidth' => '',
701 'borderRightWidth' => '',
702 'borderBottomWidth' => '',
703 'borderLeftWidth' => '',
704 'borderTopWidthTablet' => '',
705 'borderRightWidthTablet' => '',
706 'borderBottomWidthTablet' => '',
707 'borderLeftWidthTablet' => '',
708 'borderTopWidthMobile' => '',
709 'borderRightWidthMobile' => '',
710 'borderBottomWidthMobile' => '',
711 'borderLeftWidthMobile' => '',
712 // Radius.
713 'borderTopLeftRadius' => '',
714 'borderTopRightRadius' => '',
715 'borderBottomRightRadius' => '',
716 'borderBottomLeftRadius' => '',
717 'borderTopLeftRadiusTablet' => '',
718 'borderTopRightRadiusTablet' => '',
719 'borderBottomRightRadiusTablet' => '',
720 'borderBottomLeftRadiusTablet' => '',
721 'borderTopLeftRadiusMobile' => '',
722 'borderTopRightRadiusMobile' => '',
723 'borderBottomRightRadiusMobile' => '',
724 'borderBottomLeftRadiusMobile' => '',
725 // unit.
726 'borderRadiusUnit' => 'px',
727 'borderRadiusUnitTablet' => 'px',
728 'borderRadiusUnitMobile' => 'px',
729 // common.
730 'borderStyle' => 'none',
731 'borderColor' => '',
732 'borderHColor' => '',
733 )
734 );
735
736 $border_attr = array();
737
738 $device = array( '', 'Tablet', 'Mobile' );
739
740 foreach ( $device as $slug => $data ) {
741
742 $border_attr[ "{$prefix}BorderTopWidth{$data}" ] = $defaults[ "borderTopWidth{$data}" ];
743 $border_attr[ "{$prefix}BorderLeftWidth{$data}" ] = $defaults[ "borderLeftWidth{$data}" ];
744 $border_attr[ "{$prefix}BorderRightWidth{$data}" ] = $defaults[ "borderRightWidth{$data}" ];
745 $border_attr[ "{$prefix}BorderBottomWidth{$data}" ] = $defaults[ "borderBottomWidth{$data}" ];
746 $border_attr[ "{$prefix}BorderTopLeftRadius{$data}" ] = $defaults[ "borderTopLeftRadius{$data}" ];
747 $border_attr[ "{$prefix}BorderTopRightRadius{$data}" ] = $defaults[ "borderTopRightRadius{$data}" ];
748 $border_attr[ "{$prefix}BorderBottomLeftRadius{$data}" ] = $defaults[ "borderBottomLeftRadius{$data}" ];
749 $border_attr[ "{$prefix}BorderBottomRightRadius{$data}" ] = $defaults[ "borderBottomLeftRadius{$data}" ];
750 $border_attr[ "{$prefix}BorderRadiusUnit{$data}" ] = $defaults[ "borderRadiusUnit{$data}" ];
751 }
752
753 $border_attr[ "{$prefix}BorderStyle" ] = $defaults['borderStyle'];
754 $border_attr[ "{$prefix}BorderColor" ] = $defaults['borderColor'];
755 $border_attr[ "{$prefix}BorderHColor" ] = $defaults['borderHColor'];
756 return $border_attr;
757 }
758 }
759 }
760