PluginProbe
aBlocks – Gutenberg Blocks, User Dashboard Builder, Popup Builder, Form Builder & Animation Builder / 2.9.1
aBlocks – Gutenberg Blocks, User Dashboard Builder, Popup Builder, Form Builder & Animation Builder v2.9.1
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 1.1.2 All 80 releases
ablocks / includes / blocks / container / attributes.php

attributes.php in aBlocks – Gutenberg Blocks, User Dashboard Builder, Popup Builder, Form Builder & Animation Builder 2.9.1, at includes/blocks/container/attributes.php

150 lines 3.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 if ( ! defined( 'ABSPATH' ) ) {
3 exit;
4 }
5 use ABlocks\Controls\Range;
6 use ABlocks\Controls\BackgroundOverlay;
7 use ABlocks\Components\ButtonGroup;
8
9 $attributes = [
10 'block_id' => array(
11 'type' => 'string',
12 'default' => ''
13 ),
14 'className' => [
15 'type' => 'string',
16 'default' => '',
17 ],
18 'isRootContainer' => [
19 'type' => 'boolean',
20 'default' => false,
21 ],
22 'variationSelected' => [
23 'type' => 'boolean',
24 'default' => false,
25 ],
26
27 'direction' => [
28 'type' => 'string',
29 'default' => 'column',
30 ],
31 'directionTablet' => [
32 'type' => 'string',
33 'default' => '',
34 ],
35 'directionMobile' => [
36 'type' => 'string',
37 'default' => '',
38 ],
39 'justify' => [
40 'type' => 'string',
41 'default' => '',
42 ],
43 'justifyTablet' => [
44 'type' => 'string',
45 'default' => '',
46 ],
47 'justifyMobile' => [
48 'type' => 'string',
49 'default' => '',
50 ],
51 'align' => [
52 'type' => 'string',
53 'default' => '',
54 ],
55 'alignTablet' => [
56 'type' => 'string',
57 'default' => '',
58 ],
59 'alignMobile' => [
60 'type' => 'string',
61 'default' => '',
62 ],
63 'wrap' => [
64 'type' => 'string',
65 'default' => '',
66 ],
67 'wrapTablet' => [
68 'type' => 'string',
69 'default' => '',
70 ],
71 'wrapMobile' => [
72 'type' => 'string',
73 'default' => '',
74 ],
75
76 ];
77
78 $columnGap = Range::get_attribute([
79 'attributeName' => 'gap',
80 'attributeObjectKey' => 'columnGap',
81 'isResponsive' => true,
82 'defaultValue' => 0,
83 'hasUnit' => true,
84 'unitDefaultValue' => 'px',
85 ]);
86 $rowGap = Range::get_attribute([
87 'attributeName' => 'gap',
88 'attributeObjectKey' => 'rowGap',
89 'isResponsive' => true,
90 'defaultValue' => 0,
91 'hasUnit' => true,
92 'unitDefaultValue' => 'px',
93 ]);
94
95
96 $attributes = array_merge(
97 $attributes,
98 [
99 'gap' => [
100 'type' => 'object',
101 'default' => array_merge( $columnGap['gap']['default'], $rowGap['gap']['default'] ),
102 ]
103 ],
104 ButtonGroup::get_attribute( 'containerWidthType', false, [
105 'value' => 'boxed',
106 ] ),
107 ButtonGroup::get_attribute( 'overflow', false, [
108 'value' => 'visible',
109 ] ),
110 ButtonGroup::get_attribute( 'dir', true, [
111 'value' => 'column',
112 ] ),
113 ButtonGroup::get_attribute( 'justification', true, [
114 'value' => '',
115 ] ),
116 ButtonGroup::get_attribute( 'alignment', true, [
117 'value' => '',
118 ] ),
119 ButtonGroup::get_attribute( 'wrapping', true, [
120 'value' => '',
121 ] ),
122 Range::get_attribute( [
123 'attributeName' => 'minimumHeight',
124 'attributeObjectKey' => 'value',
125 'isResponsive' => true,
126 'defaultValue' => null,
127 'hasUnit' => true,
128 'unitDefaultValue' => 'px',
129 ] ),
130 Range::get_attribute([
131 'attributeName' => 'containerWidth',
132 'attributeObjectKey' => 'value',
133 'isResponsive' => true,
134 'defaultValue' => 100,
135 'hasUnit' => true,
136 'unitDefaultValue' => '%',
137 ]),
138 Range::get_attribute([
139 'attributeName' => 'containerContentWidth',
140 'attributeObjectKey' => 'value',
141 'isResponsive' => true,
142 'defaultValue' => '',
143 'hasUnit' => true,
144 'unitDefaultValue' => 'px',
145 ]),
146 BackgroundOverlay::get_attribute( '_backgroundOverlay', true ),
147 );
148
149 return array_merge( $attributes, \ABlocks\Classes\BlockGlobal::get_attributes() );
150