Diff: STRATO-apps/wordpress_03/app/wp-content/themes/blocksy/inc/options/general/back-to-top.php

Keine Baseline-Datei – Diff nur gegen leer.
Zur Liste
1 -
1 + <?php
2 + /**
3 + * Back to top options
4 + *
5 + * @copyright 2019-present Creative Themes
6 + * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License
7 + * @package Blocksy
8 + */
9 +
10 + $is_pro = function_exists('blc_site_has_feature') && blc_site_has_feature('base_pro');
11 +
12 + $options = [
13 +
14 + blocksy_rand_md5() => [
15 + 'type' => 'ct-divider',
16 + ],
17 +
18 + 'has_back_top' => [
19 + 'label' => __( 'Scroll to Top', 'blocksy' ),
20 + 'type' => 'ct-panel',
21 + 'switch' => true,
22 + 'value' => 'no',
23 + 'inner-options' => [
24 +
25 + blocksy_rand_md5() => [
26 + 'title' => __( 'General', 'blocksy' ),
27 + 'type' => 'tab',
28 + 'options' => [
29 + $is_pro ? [
30 + 'top_button_icon_source' => [
31 + 'label' => __( 'Icon Source', 'blocksy' ),
32 + 'type' => 'ct-radio',
33 + 'value' => 'default',
34 + 'view' => 'text',
35 + 'design' => 'block',
36 + 'choices' => [
37 + 'default' => __( 'Default', 'blocksy' ),
38 + 'custom' => __( 'Custom', 'blocksy' ),
39 + ],
40 + 'sync' => [
41 + 'selector' => '.ct-back-to-top',
42 + 'container_inclusive' => true,
43 + 'render' => function () {
44 + blocksy_output_back_to_top_link();
45 + }
46 + ]
47 + ],
48 +
49 + blocksy_rand_md5() => [
50 + 'type' => 'ct-condition',
51 + 'condition' => ['top_button_icon_source' => 'custom'],
52 + 'options' => [
53 + 'top_button_icon' => [
54 + 'type' => 'icon-picker',
55 + 'label' => __('Icon', 'blocksy'),
56 + 'design' => 'inline',
57 + 'value' => [
58 + 'icon' => 'blc blc-arrow-up-circle'
59 + ],
60 + 'sync' => [
61 + 'container_inclusive' => true,
62 + 'selector' => '.ct-back-to-top',
63 + 'render' => function () {
64 + blocksy_output_back_to_top_link();
65 + }
66 + ]
67 + ]
68 + ]
69 + ]
70 + ]: [],
71 +
72 + blocksy_rand_md5() => [
73 + 'type' => 'ct-condition',
74 + 'condition' => $is_pro ? [
75 + 'top_button_icon_source' => 'default'
76 + ] : [
77 + 'top_button_icon_source' => '! not_existing'
78 + ],
79 + 'options' => [
80 + 'top_button_type' => [
81 + 'label' => false,
82 + 'type' => 'ct-image-picker',
83 + 'value' => 'type-1',
84 + 'attr' => [
85 + 'data-type' => 'background',
86 + 'data-columns' => '3',
87 + ],
88 + 'setting' => [ 'transport' => 'postMessage' ],
89 + 'choices' => [
90 +
91 + 'type-1' => [
92 + 'src' => blocksy_image_picker_file( 'top-1' ),
93 + 'title' => __( 'Type 1', 'blocksy' ),
94 + ],
95 +
96 + 'type-2' => [
97 + 'src' => blocksy_image_picker_file( 'top-2' ),
98 + 'title' => __( 'Type 2', 'blocksy' ),
99 + ],
100 +
101 + 'type-3' => [
102 + 'src' => blocksy_image_picker_file( 'top-3' ),
103 + 'title' => __( 'Type 3', 'blocksy' ),
104 + ],
105 +
106 + 'type-4' => [
107 + 'src' => blocksy_image_picker_file( 'top-4' ),
108 + 'title' => __( 'Type 4', 'blocksy' ),
109 + ],
110 +
111 + 'type-5' => [
112 + 'src' => blocksy_image_picker_file( 'top-5' ),
113 + 'title' => __( 'Type 5', 'blocksy' ),
114 + ],
115 +
116 + 'type-6' => [
117 + 'src' => blocksy_image_picker_file( 'top-6' ),
118 + 'title' => __( 'Type 6', 'blocksy' ),
119 + ],
120 + ],
121 + 'sync' => [
122 + 'selector' => '.ct-back-to-top',
123 + 'container_inclusive' => true,
124 + 'render' => function () {
125 + blocksy_output_back_to_top_link();
126 + }
127 + ]
128 + ]
129 + ]
130 + ],
131 +
132 + 'top_button_shape' => [
133 + 'label' => __( 'Button Shape', 'blocksy' ),
134 + 'type' => 'ct-radio',
135 + 'value' => 'square',
136 + 'view' => 'text',
137 + 'design' => 'block',
138 + 'divider' => 'top',
139 + 'setting' => [ 'transport' => 'postMessage' ],
140 + 'choices' => [
141 + 'square' => __( 'Square', 'blocksy' ),
142 + 'circle' => __( 'Circle', 'blocksy' ),
143 + ],
144 + ],
145 +
146 + 'topButtonSize' => [
147 + 'label' => __( 'Icon Size', 'blocksy' ),
148 + 'type' => 'ct-slider',
149 + 'min' => 10,
150 + 'max' => 50,
151 + 'value' => 12,
152 + 'responsive' => true,
153 + 'divider' => 'top',
154 + 'setting' => [ 'transport' => 'postMessage' ],
155 + ],
156 +
157 + 'topButtonOffset' => [
158 + 'label' => __( 'Bottom Offset', 'blocksy' ),
159 + 'type' => 'ct-slider',
160 + 'min' => 5,
161 + 'max' => 300,
162 + 'value' => 25,
163 + 'responsive' => true,
164 + 'divider' => 'top',
165 + 'setting' => [ 'transport' => 'postMessage' ],
166 + ],
167 +
168 + 'sideButtonOffset' => [
169 + 'label' => __( 'Side Offset', 'blocksy' ),
170 + 'type' => 'ct-slider',
171 + 'min' => 5,
172 + 'max' => 300,
173 + 'value' => 25,
174 + 'responsive' => true,
175 + 'setting' => [ 'transport' => 'postMessage' ],
176 + ],
177 +
178 + 'top_button_alignment' => [
179 + 'label' => __( 'Alignment', 'blocksy' ),
180 + 'type' => 'ct-radio',
181 + 'value' => 'right',
182 + 'setting' => [ 'transport' => 'postMessage' ],
183 + 'view' => 'text',
184 + 'divider' => 'top',
185 + 'attr' => [ 'data-type' => 'alignment' ],
186 + 'choices' => [
187 + 'left' => '',
188 + 'right' => '',
189 + ],
190 + ],
191 +
192 + blocksy_rand_md5() => [
193 + 'type' => 'ct-divider',
194 + ],
195 +
196 + 'back_top_visibility' => [
197 + 'label' => __( 'Visibility', 'blocksy' ),
198 + 'type' => 'ct-visibility',
199 + 'design' => 'block',
200 + 'setting' => [ 'transport' => 'postMessage' ],
201 + 'value' => blocksy_default_responsive_value([
202 + 'desktop' => true,
203 + 'tablet' => true,
204 + 'mobile' => false,
205 + ]),
206 + 'choices' => blocksy_ordered_keys([
207 + 'desktop' => __( 'Desktop', 'blocksy' ),
208 + 'tablet' => __( 'Tablet', 'blocksy' ),
209 + 'mobile' => __( 'Mobile', 'blocksy' ),
210 + ]),
211 + ],
212 +
213 + ],
214 + ],
215 +
216 + blocksy_rand_md5() => [
217 + 'title' => __( 'Design', 'blocksy' ),
218 + 'type' => 'tab',
219 + 'options' => [
220 +
221 + 'topButtonIconColor' => [
222 + 'label' => __( 'Icon Color', 'blocksy' ),
223 + 'type' => 'ct-color-picker',
224 + 'design' => 'inline',
225 + 'setting' => [ 'transport' => 'postMessage' ],
226 +
227 + 'value' => [
228 + 'default' => [
229 + 'color' => '#ffffff',
230 + ],
231 +
232 + 'hover' => [
233 + 'color' => '#ffffff',
234 + ],
235 + ],
236 +
237 + 'pickers' => [
238 + [
239 + 'title' => __( 'Initial', 'blocksy' ),
240 + 'id' => 'default',
241 + ],
242 +
243 + [
244 + 'title' => __( 'Hover', 'blocksy' ),
245 + 'id' => 'hover',
246 + ],
247 + ],
248 + ],
249 +
250 + 'topButtonShapeBackground' => [
251 + 'label' => __( 'Shape Background Color', 'blocksy' ),
252 + 'type' => 'ct-color-picker',
253 + 'design' => 'inline',
254 + 'setting' => [ 'transport' => 'postMessage' ],
255 +
256 + 'value' => [
257 + 'default' => [
258 + 'color' => Blocksy_Css_Injector::get_skip_rule_keyword('DEFAULT'),
259 + ],
260 +
261 + 'hover' => [
262 + 'color' => Blocksy_Css_Injector::get_skip_rule_keyword('DEFAULT'),
263 + ],
264 + ],
265 +
266 + 'pickers' => [
267 + [
268 + 'title' => __( 'Initial', 'blocksy' ),
269 + 'id' => 'default',
270 + 'inherit' => 'var(--theme-palette-color-3)'
271 + ],
272 +
273 + [
274 + 'title' => __( 'Hover', 'blocksy' ),
275 + 'id' => 'hover',
276 + 'inherit' => 'var(--theme-palette-color-4)'
277 + ],
278 + ],
279 + ],
280 +
281 + blocksy_rand_md5() => [
282 + 'type' => 'ct-condition',
283 + 'condition' => [ 'top_button_shape' => 'square' ],
284 + 'options' => [
285 +
286 + 'topButtonRadius' => [
287 + 'label' => __( 'Shape Border Radius', 'blocksy' ),
288 + 'type' => 'ct-spacing',
289 + 'divider' => 'top',
290 + 'setting' => [ 'transport' => 'postMessage' ],
291 + 'value' => blocksy_spacing_value(),
292 + 'inputAttr' => [
293 + 'placeholder' => '2'
294 + ],
295 + 'min' => 0,
296 + ],
297 +
298 + ],
299 + ],
300 +
301 + 'topButtonShadow' => [
302 + 'label' => __( 'Shadow', 'blocksy' ),
303 + 'type' => 'ct-box-shadow',
304 + 'divider' => 'top',
305 + 'design' => 'inline',
306 + // 'responsive' => true,
307 + 'setting' => [ 'transport' => 'postMessage' ],
308 + 'value' => blocksy_box_shadow_value([
309 + 'enable' => false,
310 + 'h_offset' => 0,
311 + 'v_offset' => 5,
312 + 'blur' => 20,
313 + 'spread' => 0,
314 + 'inset' => false,
315 + 'color' => [
316 + 'color' => 'rgba(210, 213, 218, 0.2)',
317 + ],
318 + ])
319 + ],
320 +
321 + ],
322 + ],
323 +
324 + ],
325 + ],
326 + ];
327 +