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

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

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