PluginProbe
aBlocks – Gutenberg Blocks, User Dashboard Builder, Popup Builder, Form Builder & Animation Builder / 2.11.1
aBlocks – Gutenberg Blocks, User Dashboard Builder, Popup Builder, Form Builder & Animation Builder v2.11.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 / advance-lists / attributes.php

attributes.php in aBlocks – Gutenberg Blocks, User Dashboard Builder, Popup Builder, Form Builder & Animation Builder 2.11.1, at includes/blocks/advance-lists/attributes.php

137 lines 3.4 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\Alignment;
4 use ABlocks\Controls\Dimensions;
5 use ABlocks\Controls\Typography;
6 use ABlocks\Controls\TextShadow;
7 use ABlocks\Controls\TextStroke;
8 use ABlocks\Controls\Border;
9 use ABlocks\Controls\GroupButton;
10 use ABlocks\Controls\Icon;
11 use ABlocks\Controls\Range;
12
13 if ( ! defined( 'ABSPATH' ) ) {
14 exit;
15 }
16
17 $attributes = [
18 'block_id' => [
19 'type' => 'string',
20 'default' => '',
21 ],
22 'markerType' => [
23 'type' => 'string',
24 'default' => 'Icon',
25 ],
26 'shapeType' => [
27 'type' => 'string',
28 'default' => 'dotted',
29 ],
30 'shapeColor' => [
31 'type' => 'string',
32 'default' => 'black',
33 ],
34 'emoji' => [
35 'type' => 'string',
36 'default' => '👍',
37 ],
38 'allowDivider' => [
39 'type' => 'boolean',
40 'default' => false,
41 ],
42 // Text
43 'advanceListItemTextTag' => [
44 'type' => 'string',
45 'default' => 'p',
46 ],
47 'dropCaps' => [
48 'type' => 'boolean',
49 'default' => false,
50 ],
51 'dropCapsTextColor' => [
52 'type' => 'string',
53 'default' => '#0f2aff',
54 ],
55 'advanceListItemTextSize' => [
56 'type' => 'string',
57 'default' => 'md',
58 ],
59 'textColor' => [
60 'type' => 'string',
61 'default' => '#000000',
62 ],
63 // divider related attributes
64 'dividerPatternUrl' => [
65 'type' => 'string',
66 'default' => 'solid',
67 ],
68 'dividerType' => [
69 'type' => 'string',
70 'default' => 'css-style',
71 ],
72 'color' => [
73 'type' => 'string',
74 'default' => 'black',
75 ],
76 ];
77
78 $attributes = array_merge(
79 $attributes,
80 Alignment::get_attribute( 'alignment', true, [ 'value' => 'start' ] ),
81 Icon::get_attribute( 'icon', [
82 'className' => 'fas fa-check',
83 'path' => 'M173.898 439.404l-166.4-166.4c-9.997-9.997-9.997-26.206 0-36.204l36.203-36.204c9.997-9.998 26.207-9.998 36.204 0L192 312.69 432.095 72.596c9.997-9.997 26.207-9.997 36.204 0l36.203 36.204c9.997 9.997 9.997 26.206 0 36.204l-294.4 294.401c-9.998 9.997-26.207 9.997-36.204-.001z',
84 'viewBox' => '0 0 512 512',
85 'size' => '20',
86 'color' => '#000',
87 ] ),
88 Alignment::get_attribute( 'iconAlignment', true, [ 'value' => 'row' ] ),
89 GroupButton::get_attribute( 'listsDirection', true, [
90 'value' => 'column',
91 ] ),
92 Typography::get_attribute( 'listTypography', true ),
93 TextShadow::get_attribute( 'listTextShadow' ),
94 TextStroke::get_attribute( 'listTextStroke', true ),
95 Range::get_attribute([
96 'attributeName' => 'columnGap',
97 'attributeObjectKey' => 'value',
98 'isResponsive' => true,
99 'defaultValue' => 6,
100 'hasUnit' => true,
101 'unitDefaultValue' => 'px',
102 ]),
103 Range::get_attribute([
104 'attributeName' => 'innerGap',
105 'attributeObjectKey' => 'value',
106 'isResponsive' => true,
107 'defaultValue' => 6,
108 'hasUnit' => true,
109 'unitDefaultValue' => 'px',
110 ]),
111 Range::get_attribute( [
112 'attributeName' => 'width',
113 'attributeObjectKey' => 'value',
114 'isResponsive' => true,
115 'defaultValue' => 100,
116 'unitDefaultValue' => '%',
117 'hasUnit' => false,
118 ] ),
119 Range::get_attribute( [
120 'attributeName' => 'weight',
121 'isResponsive' => false,
122 'defaultValue' => 4,
123 ] ),
124 Range::get_attribute( [
125 'attributeName' => 'size',
126 'isResponsive' => false,
127 'defaultValue' => 20,
128 ] ),
129 Range::get_attribute( [
130 'attributeName' => 'shapeSize',
131 'isResponsive' => true,
132 'defaultValue' => 14,
133 ] ),
134 );
135 return array_merge( $attributes, \ABlocks\Classes\BlockGlobal::get_attributes() );
136
137