PluginProbe
aBlocks – Gutenberg Blocks, User Dashboard Builder, Popup Builder, Form Builder & Animation Builder / 2.14.0
aBlocks – Gutenberg Blocks, User Dashboard Builder, Popup Builder, Form Builder & Animation Builder v2.14.0
2.14.0 2.13.0 2.13.1 2.12.0 2.11.1 2.11.0 2.10.0 2.9.0 2.7.4 2.7.5 2.7.6 2.7.7 2.8.0 2.8.1 2.9.1 trunk 1.0 1.0-beta1 1.0-beta2 1.0-beta3 1.0.1 1.0.2 1.0.3 1.1.0 1.1.1 All 81 releases
← All changes | includes/blocks/storeengine-cart-button/attributes.php +146 -0 2.7.4 → 2.14.0 View file →
@@ -1,0 +1,146 @@
1 +<?php
2 +
3 +use ABlocks\Controls\Typography;
4 +use ABlocks\Controls\Range;
5 +use ABlocks\Controls\Dimensions;
6 +use ABlocks\Controls\Border;
7 +use ABlocks\Controls\BoxShadow;
8 +use ABlocks\Controls\Alignment;
9 +
10 +
11 +if ( ! defined( 'ABSPATH' ) ) {
12 + exit;
13 +}
14 +
15 +$attributes = [
16 + 'block_id' => [
17 + 'type' => 'string',
18 + 'default' => '',
19 + ],
20 + 'blockVersion' => [
21 + 'type' => 'number',
22 + 'default' => 2,
23 + ],
24 + 'quantity' => [
25 + 'type' => 'number',
26 + ],
27 + 'product_id' => [
28 + 'type' => 'number',
29 + ],
30 + 'price_display' => [
31 + 'type' => 'string',
32 + 'default' => 'radio',
33 + ],
34 + 'label' => [
35 + 'type' => 'string',
36 + 'default' => 'Buy Now',
37 + ],
38 + 'direct_checkout' => [
39 + 'type' => 'boolean',
40 + 'default' => true,
41 + ],
42 + 'button_color' => [
43 + 'type' => 'string',
44 + 'default' => '#fff',
45 + ],
46 + 'button_color_hover' => [
47 + 'type' => 'string',
48 + 'default' => '#fff',
49 + ],
50 + 'button_bg_hover' => [
51 + 'type' => 'string',
52 + 'default' => '#008DFF',
53 + ],
54 + 'button_bg' => [
55 + 'type' => 'string',
56 + 'default' => '#008DFF',
57 + ],
58 + 'priceColor' => [
59 + 'type' => 'string',
60 + 'default' => '#111',
61 + ],
62 + 'priceColorH' => [
63 + 'type' => 'string',
64 + 'default' => '#111',
65 + ],
66 + 'priceNameColor' => [
67 + 'type' => 'string',
68 + 'default' => '#101828',
69 + ],
70 + 'priceNameColorH' => [
71 + 'type' => 'string',
72 + 'default' => '#101828',
73 + ],
74 + 'button_display' => [
75 + 'type' => 'string',
76 + 'default' => 'yes',
77 + ],
78 + 'boxBackground' => [
79 + 'type' => 'string',
80 + 'default' => '#fff',
81 + ],
82 + 'boxBackgroundH' => [
83 + 'type' => 'string',
84 + 'default' => '#fff',
85 + ],
86 +
87 +];
88 +
89 +$attributes = array_merge(
90 + $attributes,
91 + Dimensions::get_attribute( 'padding', true ),
92 + Typography::get_attribute( 'btn_typography', true ),
93 + Typography::get_attribute( 'priceTypography', true ),
94 + Typography::get_attribute( 'priceNameTypography', true ),
95 + Typography::get_attribute( 'priceTypography', true ),
96 + Border::get_attribute( 'buttonBorder', true ),
97 + BoxShadow::get_attribute( 'boxShadow', true ),
98 + Dimensions::get_attribute( 'boxPadding', true ),
99 + Border::get_attribute( 'boxBorder', true ),
100 + Alignment::get_attribute( 'buttonAlign', true, [ 'value' => 'left' ] ),
101 + Alignment::get_attribute( 'priceAlign', true, [ 'value' => 'left' ] ),
102 + Alignment::get_attribute( 'buttonTextAlign', true, [ 'value' => 'center' ] ),
103 + Range::get_attribute( [
104 + 'attributeName' => 'button_width',
105 + 'attributeObjectKey' => 'value',
106 + 'isResponsive' => true,
107 + 'defaultValue' => 100,
108 + 'hasUnit' => true,
109 + 'unitDefaultValue' => '%',
110 + ]),
111 + Range::get_attribute( [
112 + 'attributeName' => 'boxWidth',
113 + 'attributeObjectKey' => 'value',
114 + 'isResponsive' => true,
115 + 'defaultValue' => 100,
116 + 'hasUnit' => true,
117 + 'unitDefaultValue' => '%',
118 + ]),
119 + Range::get_attribute( [
120 + 'attributeName' => 'radioWidth',
121 + 'attributeObjectKey' => 'value',
122 + 'isResponsive' => true,
123 + 'defaultValue' => 15,
124 + 'hasUnit' => true,
125 + 'unitDefaultValue' => 'px',
126 + ]),
127 + Range::get_attribute( [
128 + 'attributeName' => 'radioHeight',
129 + 'attributeObjectKey' => 'value',
130 + 'isResponsive' => true,
131 + 'defaultValue' => 15,
132 + 'hasUnit' => true,
133 + 'unitDefaultValue' => 'px',
134 + ]),
135 + Range::get_attribute( [
136 + 'attributeName' => 'elementGap',
137 + 'attributeObjectKey' => 'value',
138 + 'isResponsive' => true,
139 + 'defaultValue' => 12,
140 + 'hasUnit' => true,
141 + 'unitDefaultValue' => 'px',
142 + ]),
143 +);
144 +
145 +return array_merge( $attributes, \ABlocks\Classes\BlockGlobal::get_attributes() );
146 +