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

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

213 lines 4.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 if ( ! defined( 'ABSPATH' ) ) {
4 exit;
5 }
6
7 use ABlocks\Controls\TextShadow;
8 use ABlocks\Controls\TextStroke;
9 use ABlocks\Controls\Typography;
10 use ABlocks\Controls\Range;
11
12 $attributes = [
13 'block_id' => [
14 'type' => 'string',
15 'default' => '',
16 ],
17 'blockVersion' => [
18 'type' => 'number',
19 'default' => 2,
20 ],
21 'stickyLabel' => [
22 'type' => 'string',
23 'default' => 'Breaking News',
24 ],
25 'stickyLabelTag' => [
26 'type' => 'string',
27 'default' => 'div',
28 ],
29 'labelPosition' => [
30 'type' => 'string',
31 'default' => 'left',
32 ],
33 'queryType' => [
34 'type' => 'string',
35 'default' => 'customText',
36 ],
37 'selectedPosts' => [
38 'type' => 'array',
39 'default' => [],
40 ],
41 'postLink' => [
42 'type' => 'boolean',
43 'default' => false,
44 ],
45 'selectedPages' => [
46 'type' => 'array',
47 'default' => [],
48 ],
49 'pageLink' => [
50 'type' => 'boolean',
51 'default' => false,
52 ],
53 'customText' => [
54 'type' => 'string',
55 'default' => ''
56 ],
57 'lists' => [
58 'type' => 'array',
59 'default' => [
60 [
61 'id' => 0,
62 'text' => 'Stay updated with the latest trends!',
63 'link' => [
64 'linkDestination' => '',
65 'href' => '',
66 'lightbox' => '',
67 'linkTarget' => '',
68 'rel' => '',
69 'noFollow' => '',
70 'keyValue' => '',
71 'linkClass' => '',
72 ],
73 'isOpen' => false,
74 ]
75 ]
76 ],
77 'markerType' => [
78 'type' => 'string',
79 'default' => 'icon',
80 ],
81 'listIconsClasses' => [
82 'type' => 'array',
83 'default' => [],
84 ],
85 'slideDirection' => [
86 'type' => 'string',
87 'default' => 'ltr',
88 ],
89 'slideSpeed' => [
90 'type' => 'number',
91 'default' => 2,
92 ],
93 'labelColor' => [
94 'type' => 'string',
95 'default' => 'white',
96 ],
97 'labelBackgroundColor' => [
98 'type' => 'string',
99 'default' => 'black',
100 ],
101 'labelColorH' => [
102 'type' => 'string',
103 'default' => '',
104 ],
105 'labelBackgroundColorH' => [
106 'type' => 'string',
107 'default' => '',
108 ],
109 'labelColorTransition' => [
110 'type' => 'number',
111 'default' => '',
112 ],
113 'tickerColor' => [
114 'type' => 'string',
115 'default' => 'black',
116 ],
117 'tickerBgColor' => [
118 'type' => 'string',
119 'default' => '#E5E5E6',
120 ],
121 'tickerColorH' => [
122 'type' => 'string',
123 'default' => '',
124 ],
125 'tickerBgColorH' => [
126 'type' => 'string',
127 'default' => '',
128 ],
129 'tickerColorTransition' => [
130 'type' => 'number',
131 'default' => '',
132 ],
133 'tickerType' => [
134 'type' => 'string',
135 'default' => 'marquee',
136 ],
137 'navigatorBgColor' => [
138 'type' => 'string',
139 'default' => ''
140 ],
141 'navigatorColor' => [
142 'type' => 'string',
143 'default' => '#000000'
144 ],
145 'showTickerNavigator' => [
146 'type' => 'boolean',
147 'default' => false,
148 ],
149 'navigatorPosition' => [
150 'type' => 'string',
151 'default' => 'right'
152 ],
153 'tickerListStyle' => [
154 'type' => 'string',
155 'default' => 'none',
156 ],
157 'isPauseOnOver' => [
158 'type' => 'boolean',
159 'default' => false,
160 ],
161 'isPositionSticky' => [
162 'type' => 'boolean',
163 'default' => false
164 ],
165 'stickyPosition' => [
166 'type' => 'string',
167 'default' => 'up'
168 ],
169 'isShowLabel' => [
170 'type' => 'boolean',
171 'default' => true,
172 ],
173 'tickerLabelShape' => [
174 'type' => 'string',
175 'default' => 'normal',
176 ],
177 'labelPadding' => [
178 'type' => 'number',
179 'default' => 10,
180 ],
181 'isShowTime' => [
182 'type' => 'boolean',
183 'default' => false,
184 ],
185 ];
186 $attributes = array_merge(
187 $attributes,
188 Range::get_attribute([
189 'attributeName' => 'labelPadding',
190 'attributeObjectKey' => 'value',
191 'isResponsive' => true,
192 'hasUnit' => true,
193 'unitDefaultValue' => 'px',
194 'defaultValue' => 10,
195 ]),
196 Range::get_attribute([
197 'attributeName' => 'tickerHeight',
198 'attributeObjectKey' => 'value',
199 'isResponsive' => true,
200 'hasUnit' => true,
201 'unitDefaultValue' => 'px',
202 'defaultValue' => 50,
203 ]),
204 Typography::get_attribute( 'labelTypography', true ),
205 TextShadow::get_attribute( 'labelTextShadow' ),
206 TextStroke::get_attribute( 'labelTextStroke', true ),
207 Typography::get_attribute( 'tickerTypography', true ),
208 TextShadow::get_attribute( 'tickerTextShadow' ),
209 TextStroke::get_attribute( 'tickerTextStroke', true ),
210 );
211
212 return array_merge( $attributes, \ABlocks\Classes\BlockGlobal::get_attributes() );
213