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
ablocks / includes / blocks / storeengine-product-review / attributes.php

attributes.php in aBlocks – Gutenberg Blocks, User Dashboard Builder, Popup Builder, Form Builder & Animation Builder 2.14.0, at includes/blocks/storeengine-product-review/attributes.php

151 lines 3.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 use ABlocks\Controls\Typography;
4 use ABlocks\Controls\Background;
5 use ABlocks\Controls\Border;
6 use ABlocks\Controls\Dimensions;
7 use ABlocks\Controls\Range;
8 use ABlocks\Controls\BoxShadow;
9
10 if ( ! defined( 'ABSPATH' ) ) {
11 exit;
12 }
13
14 $attributes = [
15 'block_id' => array(
16 'type' => 'string',
17 'default' => '',
18 ),
19 'blockVersion' => array(
20 'type' => 'number',
21 'default' => 2,
22 ),
23 'product_id' => array(
24 'type' => 'number',
25 'default' => 0,
26 ),
27 'heading_color' => array(
28 'type' => 'string',
29 'default' => '#111',
30 ),
31 'heading_hover_color' => array(
32 'type' => 'string',
33 'default' => '#111',
34 ),
35 'section_bg_hover' => array(
36 'type' => 'string',
37 'default' => '#FFF',
38 ),
39 'section_bg' => array(
40 'type' => 'string',
41 'default' => '#FFF',
42 ),
43 'avg_color' => array(
44 'type' => 'string',
45 'default' => '#111',
46 ),
47 'avg_color_hover' => array(
48 'type' => 'string',
49 'default' => '#111',
50 ),
51 'rating_color_hover' => array(
52 'type' => 'string',
53 'default' => '#f4c150',
54 ),
55 'rating_color' => array(
56 'type' => 'string',
57 'default' => '#f4c150',
58 ),
59 'total_rating_color' => array(
60 'type' => 'string',
61 'default' => '#111',
62 ),
63 'total_rating_hover' => array(
64 'type' => 'string',
65 'default' => '#111',
66 ),
67 'listColor' => array(
68 'type' => 'string',
69 'default' => '#999',
70 ),
71 'listColorH' => array(
72 'type' => 'string',
73 'default' => '#999',
74 ),
75 'starColorH' => array(
76 'type' => 'string',
77 'default' => '#f4c150',
78 ),
79 'starColor' => array(
80 'type' => 'string',
81 'default' => '#f4c150',
82 ),
83 'fillBg' => array(
84 'type' => 'string',
85 'default' => '#e7e7e7',
86 ),
87 'fillBgH' => array(
88 'type' => 'string',
89 'default' => '#e7e7e7',
90 ),
91 'fillABg' => array(
92 'type' => 'string',
93 'default' => '#f4c150',
94 ),
95 'fillABgH' => array(
96 'type' => 'string',
97 'default' => '#f4c150',
98 ),
99 'isCustom' => [
100 'type' => 'boolean',
101 'default' => false,
102 ],
103
104 ];
105
106 $attributes = array_merge(
107 $attributes,
108 Typography::get_attribute( 'heading_typography', true ),
109 Typography::get_attribute( 'listTypography', true ),
110 Typography::get_attribute( 'avg_typography', true ),
111 Typography::get_attribute( 'total_typography', true ),
112 Border::get_attribute( 'border', true ),
113 Dimensions::get_attribute( 'padding', true ),
114 BoxShadow::get_attribute( 'boxShadow', true ),
115 Range::get_attribute([
116 'attributeName' => 'rating_size',
117 'attributeObjectKey' => 'value',
118 'isResponsive' => true,
119 'defaultValue' => 16,
120 'hasUnit' => true,
121 'unitDefaultValue' => 'px',
122 ]),
123 Range::get_attribute([
124 'attributeName' => 'section_height',
125 'attributeObjectKey' => 'value',
126 'isResponsive' => true,
127 'defaultValue' => 100,
128 'hasUnit' => true,
129 'unitDefaultValue' => '%',
130 ]),
131 Range::get_attribute([
132 'attributeName' => 'section_width',
133 'attributeObjectKey' => 'value',
134 'isResponsive' => true,
135 'defaultValue' => 100,
136 'hasUnit' => true,
137 'unitDefaultValue' => '%',
138 ]),
139 Range::get_attribute([
140 'attributeName' => 'startSize',
141 'attributeObjectKey' => 'value',
142 'isResponsive' => true,
143 'defaultValue' => 12,
144 'hasUnit' => true,
145 'unitDefaultValue' => 'px',
146 ]),
147 );
148
149 return array_merge( $attributes, \ABlocks\Classes\BlockGlobal::get_attributes() );
150
151