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

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

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