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

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

155 lines 3.8 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\GroupButton;
5 use ABlocks\Controls\Dimensions;
6 use ABlocks\Controls\Typography;
7 use ABlocks\Controls\TextShadow;
8 use ABlocks\Controls\TextStroke;
9 use ABlocks\Controls\Border;
10 use ABlocks\Controls\Range;
11 use ABlocks\Controls\Icon;
12 if ( ! defined( 'ABSPATH' ) ) {
13 exit;
14 }
15
16 $attributes = [
17 'block_id' => [
18 'type' => 'string',
19 'default' => '',
20 ],
21 'changedAttributes' => array(
22 'type' => 'array',
23 'default' => array(),
24 ),
25 'device' => [
26 'type' => 'string',
27 'default' => '',
28 ],
29 'markerType' => [
30 'type' => 'string',
31 'default' => 'Icon',
32 ],
33 'shapeType' => [
34 'type' => 'string',
35 'default' => 'dotted',
36 ],
37 'shapeColor' => [
38 'type' => 'string',
39 'default' => 'black',
40 ],
41 'markerColor' => [
42 'type' => 'string',
43 'default' => '',
44 ],
45 'allowDivider' => [
46 'type' => 'boolean',
47 'default' => false,
48 ],
49 'isLastChild' => [
50 'type' => 'boolean',
51 'default' => false,
52 ],
53 'emoji' => [
54 'type' => 'string',
55 'default' => '👍',
56 ],
57 'advanceListItemText' => [
58 'type' => 'string',
59 'source' => 'html',
60 'selector' => '.ablocks-advance-list-item-text',
61 'default' => 'Task Checklist',
62 ],
63 'advanceListItemTextTag' => [
64 'type' => 'string',
65 'default' => 'p',
66 ],
67 'dropCaps' => [
68 'type' => 'boolean',
69 'default' => false,
70 ],
71 'dropCapsTextColor' => [
72 'type' => 'string',
73 'default' => '',
74 ],
75 'advanceListItemTextSize' => [
76 'type' => 'string',
77 'default' => 'md',
78 ],
79 'textColor' => [
80 'type' => 'string',
81 'default' => '',
82 ],
83 // divider related attributes
84 'dividerPatternUrl' => [
85 'type' => 'string',
86 'default' => '',
87 ],
88 'dividerType' => [
89 'type' => 'string',
90 'default' => '',
91 ],
92 'color' => [
93 'type' => 'string',
94 'default' => '',
95 ],
96 ];
97
98 $attributes = array_merge(
99 $attributes,
100 Icon::get_attribute( 'icon', [
101 'className' => 'fas fa-check',
102 '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',
103 'viewBox' => '0 0 512 512',
104 'size' => '20',
105 'color' => '#000',
106 ] ),
107 Alignment::get_attribute( 'iconAlignment', true, [ 'value' => 'row' ] ),
108 Alignment::get_attribute( 'alignment', true, [ 'value' => '' ] ),
109 GroupButton::get_attribute( 'listsDirection', true, [
110 'value' => 'column',
111 ] ),
112 Typography::get_attribute( 'listTypography', true ),
113 TextShadow::get_attribute( 'listTextShadow' ),
114 TextStroke::get_attribute( 'listTextStroke', true ),
115 Range::get_attribute( [
116 'attributeName' => 'markerSize',
117 'attributeObjectKey' => 'value',
118 'defaultValue' => 10,
119 'hasUnit' => false,
120 ] ),
121 Range::get_attribute( [
122 'attributeName' => 'innerGap',
123 'attributeObjectKey' => 'value',
124 'isResponsive' => true,
125 'defaultValue' => 6,
126 'hasUnit' => true,
127 'unitDefaultValue' => 'px',
128 ] ),
129 Range::get_attribute( [
130 'attributeName' => 'width',
131 'attributeObjectKey' => 'value',
132 'isResponsive' => true,
133 'defaultValue' => null,
134 'unitDefaultValue' => '%',
135 'hasUnit' => false,
136 ] ),
137 Range::get_attribute( [
138 'attributeName' => 'weight',
139 'isResponsive' => false,
140 'defaultValue' => null,
141 ] ),
142 Range::get_attribute( [
143 'attributeName' => 'size',
144 'isResponsive' => false,
145 'defaultValue' => null,
146 ] ),
147 Range::get_attribute( [
148 'attributeName' => 'shapeSize',
149 'isResponsive' => true,
150 'defaultValue' => 14,
151 ] ),
152 );
153 return array_merge( $attributes, \ABlocks\Classes\BlockGlobal::get_attributes() );
154
155