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/social-shares/attributes.php +244 -0 2.7.4 → 2.14.0 View file →
@@ -1,0 +1,244 @@
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 +use ABlocks\Controls\BoxShadow;
17 +
18 +$attributes = [
19 + 'block_id' => [
20 + 'type' => 'string',
21 + 'default' => '',
22 + ],
23 + 'blockVersion' => array(
24 + 'type' => 'number',
25 + 'default' => '',
26 + ),
27 + 'buttonType' => [
28 + 'type' => 'string',
29 + 'default' => 'Facebook',
30 + ],
31 + 'viewButton' => [
32 + 'type' => 'string',
33 + 'default' => 'Icon & Text',
34 + ],
35 + 'shape' => [
36 + 'type' => 'string',
37 + 'default' => 'Square',
38 + ],
39 + 'lists' => [
40 + 'type' => 'array',
41 + 'default' => [
42 + [
43 + 'id' => 0,
44 + 'text' => 'Facebook',
45 + 'icon' => [
46 + 'viewBox' => '0 0 320 512',
47 + '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'
48 + ],
49 + 'buttonBackgroundColor' => 'ablocks-social-share-item--facebook-bg',
50 + 'iconBackgroundColor' => 'ablocks-social-share-item--facebook-icon-bg',
51 + 'link' => 'https://www.facebook.com/sharer.php?u=',
52 + 'isOpen' => false,
53 + 'backgroundH' => '#2d4373',
54 + 'buttonType' => 'Facebook'
55 + ],
56 + [
57 + 'id' => 1,
58 + 'text' => 'Twitter',
59 + 'icon' => [
60 + 'viewBox' => '0 0 512 512',
61 + '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'
62 + ],
63 + 'buttonBackgroundColor' => 'ablocks-social-share-item--twitter-bg',
64 + 'iconBackgroundColor' => 'ablocks-social-share-item--twitter-icon-bg',
65 + 'link' => 'https://twitter.com/intent/tweet?url=',
66 + 'isOpen' => false,
67 + 'backgroundH' => '#1da1f2',
68 + 'buttonType' => 'Twitter'
69 + ],
70 + [
71 + 'id' => 2,
72 + 'text' => 'Telegram',
73 + 'icon' => [
74 + 'viewBox' => '0 0 448 512',
75 + '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'
76 + ],
77 + 'buttonBackgroundColor' => 'ablocks-social-share-item--telegram-bg',
78 + 'iconBackgroundColor' => 'ablocks-social-share-item--telegram-icon-bg',
79 + 'link' => 'https://t.me/share/url?url=',
80 + 'isOpen' => false,
81 + 'backgroundH' => '#007ab8',
82 + 'buttonType' => 'Telegram'
83 + ]
84 + ]
85 + ],
86 +
87 + 'listIconsClasses' => [
88 + 'type' => 'array',
89 + 'default' => [],
90 + ],
91 + 'iconType' => [
92 + 'type' => 'string',
93 + 'default' => 'default',
94 + ],
95 + 'iconShape' => [
96 + 'type' => 'string',
97 + 'default' => 'circle',
98 + ],
99 + 'windowsPopUp' => [
100 + 'type' => 'boolean',
101 + 'default' => false,
102 +
103 + ],
104 + 'buttonBackground' => [
105 + 'type' => 'string',
106 + 'default' => '',
107 +
108 + ],
109 + 'buttonHover' => [
110 + 'type' => 'string',
111 + 'default' => '',
112 +
113 + ],
114 + // Share Button
115 + 'shareBar' => [
116 + 'type' => 'boolean',
117 + 'default' => true,
118 + ],
119 + 'shareBgColor' => [
120 + 'type' => 'string',
121 + 'default' => '',
122 + ],
123 + 'iconFillColor' => [
124 + 'type' => 'string',
125 + 'default' => '#ffffff',
126 + ],
127 + 'shareTextBgColor' => [
128 + 'type' => 'string',
129 + 'default' => '',
130 + ],
131 + 'shareIconH' => [
132 + 'type' => 'string',
133 + 'default' => '',
134 + ],
135 + 'shareTextH' => [
136 + 'type' => 'string',
137 + 'default' => '',
138 + ],
139 + 'backgroundColor' => [
140 + 'type' => 'string',
141 + 'default' => '',
142 + ],
143 + 'backgroundColorH' => [
144 + 'type' => 'string',
145 + 'default' => '',
146 + ],
147 + 'shareButtonIconColor' => [
148 + 'type' => 'string',
149 + 'default' => '#170a1b',
150 + ],
151 + 'shareButtonIconColorH' => [
152 + 'type' => 'string',
153 + 'default' => '',
154 + ],
155 + 'belowItem' => [
156 + 'type' => 'number',
157 + 'default' => 0,
158 + ],
159 +];
160 +$attributes = array_merge(
161 + $attributes,
162 + Alignment::get_attribute( 'position', true, [ 'value' => 'center' ] ),
163 + TextStroke::get_attribute( 'textStroke', true ),
164 + Typography::get_attribute( 'typography', true ),
165 + Alignment::get_attribute( 'horizontalAlignment', true, [ 'value' => 'flex-start' ] ),
166 + Width::get_attribute( 'width', false ),
167 + Dimensions::get_attribute( 'radius', false ),
168 + Border::get_attribute( 'border', true ),
169 + Border::get_attribute( 'itemBorder', true ),
170 + BoxShadow::get_attribute( 'shareItemShadow', true ),
171 + ButtonGroup::get_attribute( 'stack', false, [
172 + 'value' => 'horizontal',
173 + ] ),
174 + ButtonGroup::get_attribute( 'verticalAlignment', false, [
175 + 'value' => 'flex-start',
176 + ] ),
177 + Range::get_attribute( [
178 + 'attributeName' => 'spaceBetween',
179 + 'attributeObjectKey' => 'value',
180 + 'isResponsive' => true,
181 + 'defaultValue' => 16,
182 + 'hasUnit' => true,
183 + 'unitDefaultValue' => 'px',
184 + ]),
185 + Range::get_attribute( [
186 + 'attributeName' => 'shareSize',
187 + 'isResponsive' => false,
188 + 'defaultValue' => 48,
189 + 'attributeObjectKey' => 'value',
190 + 'hasUnit' => true,
191 + 'unitDefaultValue' => 'px',
192 + ]),
193 + Range::get_attribute( [
194 + 'attributeName' => 'shareIconSize',
195 + 'isResponsive' => false,
196 + 'defaultValue' => 16,
197 + 'attributeObjectKey' => 'value',
198 + 'hasUnit' => true,
199 + 'unitDefaultValue' => 'px',
200 + ]),
201 + Range::get_attribute( [
202 + 'attributeName' => 'shareItemIconSize',
203 + 'isResponsive' => false,
204 + 'defaultValue' => 25,
205 + 'attributeObjectKey' => 'value',
206 + 'hasUnit' => true,
207 + 'unitDefaultValue' => 'px',
208 + ]),
209 + Range::get_attribute( [
210 + 'attributeName' => 'itemIconWidth',
211 + 'isResponsive' => false,
212 + 'defaultValue' => 43,
213 + 'attributeObjectKey' => 'value',
214 + 'hasUnit' => true,
215 + 'unitDefaultValue' => 'px',
216 + ]),
217 + Range::get_attribute( [
218 + 'attributeName' => 'itemIconHeight',
219 + 'isResponsive' => false,
220 + 'defaultValue' => 42,
221 + 'attributeObjectKey' => 'value',
222 + 'hasUnit' => true,
223 + 'unitDefaultValue' => 'px',
224 + ]),
225 + Range::get_attribute( [
226 + 'attributeName' => 'itemTextWidth',
227 + 'isResponsive' => false,
228 + 'defaultValue' => 80,
229 + 'attributeObjectKey' => 'value',
230 + 'hasUnit' => true,
231 + 'unitDefaultValue' => 'px',
232 + ]),
233 + Range::get_attribute( [
234 + 'attributeName' => 'itemTextHeight',
235 + 'isResponsive' => false,
236 + 'defaultValue' => 42,
237 + 'attributeObjectKey' => 'value',
238 + 'hasUnit' => true,
239 + 'unitDefaultValue' => 'px',
240 + ]),
241 +);
242 +
243 +return array_merge( $attributes, \ABlocks\Classes\BlockGlobal::get_attributes() );
244 +