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 / social-shares / attributes.php

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

239 lines 7.1 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\Alignment;
8 use ABlocks\Controls\Dimensions;
9 use ABlocks\Controls\Width;
10 use ABlocks\Controls\Border;
11 use ABlocks\Controls\Range;
12 use ABlocks\Controls\Typography;
13 use ABlocks\Controls\TextShadow;
14 use ABlocks\Controls\TextStroke;
15 use ABlocks\Components\ButtonGroup;
16
17 $attributes = [
18 'block_id' => [
19 'type' => 'string',
20 'default' => '',
21 ],
22 'buttonType' => [
23 'type' => 'string',
24 'default' => 'Facebook',
25 ],
26 'viewButton' => [
27 'type' => 'string',
28 'default' => 'Icon & Text',
29 ],
30 'shape' => [
31 'type' => 'string',
32 'default' => 'Square',
33 ],
34 'lists' => [
35 'type' => 'array',
36 'default' => [
37 [
38 'id' => 0,
39 'text' => 'Facebook',
40 'icon' => [
41 'viewBox' => '0 0 320 512',
42 'path' => 'M279.14 288l14.22-92.66h-88.91v-60.13c0-25.35 12.42-50.06 52.24-50.06h40.42V6.26S260.43 0 225.36 0c-73.22 0-121.08 44.38-121.08 124.72v70.62H22.89V288h81.39v224h100.17V288z'
43 ],
44 'buttonBackgroundColor' => 'ablocks-social-share-item--facebook-bg',
45 'iconBackgroundColor' => 'ablocks-social-share-item--facebook-icon-bg',
46 'link' => 'https://www.facebook.com/sharer.php?u=',
47 'isOpen' => false,
48 'backgroundH' => '#2d4373',
49 'buttonType' => 'Facebook'
50 ],
51 [
52 'id' => 1,
53 'text' => 'Twitter',
54 'icon' => [
55 'viewBox' => '0 0 512 512',
56 'path' => 'M459.37 151.716c.325 4.548.325 9.097.325 13.645 0 138.72-105.583 298.558-298.558 298.558-59.452 0-114.68-17.219-161.137-47.106 8.447.974 16.568 1.299 25.34 1.299 49.055 0 94.213-16.568 130.274-44.832-46.132-.975-84.792-31.188-98.112-72.772 6.498.974 12.995 1.624 19.818 1.624 9.421 0 18.843-1.3 27.614-3.573-48.081-9.747-84.143-51.98-84.143-102.985v-1.299c13.969 7.797 30.214 12.67 47.431 13.319-28.264-18.843-46.781-51.005-46.781-87.391 0-19.492 5.197-37.36 14.294-52.954 51.655 63.675 129.3 105.258 216.365 109.807-1.624-7.797-2.599-15.918-2.599-24.04 0-57.828 46.782-104.934 104.934-104.934 30.213 0 57.502 12.67 76.67 33.137 23.715-4.548 46.456-13.32 66.599-25.34-7.798 24.366-24.366 44.833-46.132 57.827 21.117-2.273 41.584-8.122 60.426-16.243-14.292 20.791-32.161 39.308-52.628 54.253z'
57 ],
58 'buttonBackgroundColor' => 'ablocks-social-share-item--twitter-bg',
59 'iconBackgroundColor' => 'ablocks-social-share-item--twitter-icon-bg',
60 'link' => 'https://twitter.com/intent/tweet?url=',
61 'isOpen' => false,
62 'backgroundH' => '#1da1f2',
63 'buttonType' => 'Twitter'
64 ],
65 [
66 'id' => 2,
67 'text' => 'Telegram',
68 'icon' => [
69 'viewBox' => '0 0 448 512',
70 'path' => 'M446.7 98.6l-67.6 318.8c-5.1 22.5-18.4 28.1-37.3 17.5l-103-75.9-49.7 47.8c-5.5 5.5-10.1 10.1-20.7 10.1l7.4-104.9 190.9-172.5c8.3-7.4-1.8-11.5-12.9-4.1L117.8 284 16.2 252.2c-22.1-6.9-22.5-22.1 4.6-32.7L418.2 66.4c18.4-6.9 34.5 4.1 28.5 32.2z'
71 ],
72 'buttonBackgroundColor' => 'ablocks-social-share-item--telegram-bg',
73 'iconBackgroundColor' => 'ablocks-social-share-item--telegram-icon-bg',
74 'link' => 'https://t.me/share/url?url=',
75 'isOpen' => false,
76 'backgroundH' => '#007ab8',
77 'buttonType' => 'Telegram'
78 ]
79 ]
80 ],
81
82 'listIconsClasses' => [
83 'type' => 'array',
84 'default' => [],
85 ],
86 'iconType' => [
87 'type' => 'string',
88 'default' => 'default',
89 ],
90 'iconShape' => [
91 'type' => 'string',
92 'default' => 'circle',
93 ],
94 'windowsPopUp' => [
95 'type' => 'boolean',
96 'default' => false,
97
98 ],
99 'buttonBackground' => [
100 'type' => 'string',
101 'default' => '',
102
103 ],
104 'buttonHover' => [
105 'type' => 'string',
106 'default' => '',
107
108 ],
109 // Share Button
110 'shareBar' => [
111 'type' => 'boolean',
112 'default' => true,
113 ],
114 'shareBgColor' => [
115 'type' => 'string',
116 'default' => '',
117 ],
118 'iconFillColor' => [
119 'type' => 'string',
120 'default' => '#ffffff',
121 ],
122 'shareTextBgColor' => [
123 'type' => 'string',
124 'default' => '',
125 ],
126 'shareIconH' => [
127 'type' => 'string',
128 'default' => '',
129 ],
130 'shareTextH' => [
131 'type' => 'string',
132 'default' => '',
133 ],
134 'backgroundColor' => [
135 'type' => 'string',
136 'default' => '',
137 ],
138 'backgroundColorH' => [
139 'type' => 'string',
140 'default' => '',
141 ],
142 'shareButtonIconColor' => [
143 'type' => 'string',
144 'default' => '#170a1b',
145 ],
146 'shareButtonIconColorH' => [
147 'type' => 'string',
148 'default' => '',
149 ],
150 'belowItem' => [
151 'type' => 'number',
152 'default' => 0,
153 ],
154 ];
155 $attributes = array_merge(
156 $attributes,
157 Alignment::get_attribute( 'position', true, [ 'value' => 'center' ] ),
158 TextStroke::get_attribute( 'textStroke', true ),
159 Typography::get_attribute( 'typography', true ),
160 Alignment::get_attribute( 'horizontalAlignment', true, [ 'value' => 'flex-start' ] ),
161 Width::get_attribute( 'width', false ),
162 Dimensions::get_attribute( 'radius', false ),
163 Border::get_attribute( 'border', true ),
164 Border::get_attribute( 'itemBorder', true ),
165 ButtonGroup::get_attribute( 'stack', false, [
166 'value' => 'horizontal',
167 ] ),
168 ButtonGroup::get_attribute( 'verticalAlignment', false, [
169 'value' => 'flex-start',
170 ] ),
171 Range::get_attribute( [
172 'attributeName' => 'spaceBetween',
173 'attributeObjectKey' => 'value',
174 'isResponsive' => true,
175 'defaultValue' => 16,
176 'hasUnit' => true,
177 'unitDefaultValue' => 'px',
178 ]),
179 Range::get_attribute( [
180 'attributeName' => 'shareSize',
181 'isResponsive' => false,
182 'defaultValue' => 48,
183 'attributeObjectKey' => 'value',
184 'hasUnit' => true,
185 'unitDefaultValue' => 'px',
186 ]),
187 Range::get_attribute( [
188 'attributeName' => 'shareIconSize',
189 'isResponsive' => false,
190 'defaultValue' => 16,
191 'attributeObjectKey' => 'value',
192 'hasUnit' => true,
193 'unitDefaultValue' => 'px',
194 ]),
195 Range::get_attribute( [
196 'attributeName' => 'shareItemIconSize',
197 'isResponsive' => false,
198 'defaultValue' => 25,
199 'attributeObjectKey' => 'value',
200 'hasUnit' => true,
201 'unitDefaultValue' => 'px',
202 ]),
203 Range::get_attribute( [
204 'attributeName' => 'itemIconWidth',
205 'isResponsive' => false,
206 'defaultValue' => 43,
207 'attributeObjectKey' => 'value',
208 'hasUnit' => true,
209 'unitDefaultValue' => 'px',
210 ]),
211 Range::get_attribute( [
212 'attributeName' => 'itemIconHeight',
213 'isResponsive' => false,
214 'defaultValue' => 42,
215 'attributeObjectKey' => 'value',
216 'hasUnit' => true,
217 'unitDefaultValue' => 'px',
218 ]),
219 Range::get_attribute( [
220 'attributeName' => 'itemTextWidth',
221 'isResponsive' => false,
222 'defaultValue' => 80,
223 'attributeObjectKey' => 'value',
224 'hasUnit' => true,
225 'unitDefaultValue' => 'px',
226 ]),
227 Range::get_attribute( [
228 'attributeName' => 'itemTextHeight',
229 'isResponsive' => false,
230 'defaultValue' => 42,
231 'attributeObjectKey' => 'value',
232 'hasUnit' => true,
233 'unitDefaultValue' => 'px',
234 ]),
235 );
236
237 return array_merge( $attributes, \ABlocks\Classes\BlockGlobal::get_attributes() );
238
239