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