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 / divider / attributes.php

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

105 lines 2.5 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 namespace ABlocks\Blocks\Divider;
3
4 use ABlocks\Controls\Alignment;
5 use ABlocks\Controls\TextStroke;
6 use ABlocks\Controls\Typography;
7 use ABlocks\Controls\Range;
8 use ABlocks\Controls\Icon;
9 use ABlocks\Components\ButtonGroup;
10
11
12 $attributes = [
13 'block_id' => [
14 'type' => 'string',
15 'default' => '',
16 ],
17 'dividerPatternUrl' => [
18 'type' => 'string',
19 'default' => 'solid',
20 ],
21 'dividerType' => [
22 'type' => 'string',
23 'default' => 'css-style',
24 ],
25 'color' => [
26 'type' => 'string',
27 'default' => '#000000',
28 ],
29 'elementText' => [
30 'type' => 'string',
31 'default' => 'Divider',
32 ],
33 'elementTextColor' => [
34 'type' => 'string',
35 'default' => '#000000',
36 ],
37 'elementTextPosition' => [
38 'type' => 'string',
39 'default' => 'center',
40 ],
41
42 'elementIconPosition' => [
43 'type' => 'string',
44 'default' => 'center',
45 ],
46
47
48 ];
49
50 $attributes = array_merge(
51 Typography::get_attribute( 'elementTextTypography', true ),
52 TextStroke::get_attribute( 'elementTextStroke', true ),
53 Alignment::get_attribute( 'alignment', true, [ 'value' => 'left' ] ),
54 Icon::get_attribute(),
55 ButtonGroup::get_attribute( 'element', false, [
56 'value' => 'none',
57 ] ),
58 Range::get_attribute( [
59 'attributeName' => 'width',
60 'attributeObjectKey' => 'value',
61 'isResponsive' => true,
62 'defaultValue' => 100,
63 'hasUnit' => true,
64 'unitDefaultValue' => '%',
65 ] ),
66 Range::get_attribute( [
67 'attributeName' => 'weight',
68 'isResponsive' => false,
69 'defaultValue' => 4,
70 ] ),
71 Range::get_attribute( [
72 'attributeName' => 'size',
73 'isResponsive' => false,
74 'defaultValue' => 20,
75 ] ),
76 Range::get_attribute( [
77 'attributeName' => 'gap',
78 'attributeObjectKey' => 'value',
79 'isResponsive' => true,
80 'defaultValue' => 10,
81 ] ),
82 Range::get_attribute( [
83 'attributeName' => 'elementTextSpacing',
84 'attributeObjectKey' => 'value',
85 'isResponsive' => true,
86 'defaultValue' => 0,
87 'hasUnit' => true,
88 'unitDefaultValue' => 'px',
89 ] ),
90 Range::get_attribute( [
91 'attributeName' => 'elementIconSpacing',
92 'attributeObjectKey' => 'value',
93 'isResponsive' => true,
94 'defaultValue' => 0,
95 'defaultValueMobile' => 0,
96 'defaultValueTablet' => 0,
97 'hasUnit' => true,
98 'unitDefaultValue' => 'px',
99 ] ),
100 $attributes
101 );
102
103 return array_merge( $attributes, \ABlocks\Classes\BlockGlobal::get_attributes() );
104
105