Version Description
- Bug Fix
- Fixed behavior in multisite networks where Imagify options would not get saved when the plugin wasn't network-activated, but only activated for specific sites within the network.
Download this release
Release Info
Developer | wp_media |
Plugin | Imagify Image Optimizer |
Version | 1.3.3 |
Comparing to | |
See all releases |
Version 1.3.3
- assets/css/admin-bar.css +108 -0
- assets/css/admin-bar.min.css +1 -0
- assets/css/admin.css +2118 -0
- assets/css/admin.min.css +1 -0
- assets/css/sweetalert.css +930 -0
- assets/css/sweetalert.min.css +1 -0
- assets/css/twentytwenty.css +200 -0
- assets/css/twentytwenty.min.css +1 -0
- assets/images/bear-aggressive.jpg +0 -0
- assets/images/bear-normal.jpg +0 -0
- assets/images/bear-original.jpg +0 -0
- assets/images/bear-ultra.jpg +0 -0
- assets/images/bulk.svg +1 -0
- assets/images/check-mini.svg +14 -0
- assets/images/check.svg +14 -0
- assets/images/cloudy-sun.svg +22 -0
- assets/images/facebook_c.svg +1 -0
- assets/images/gear.svg +1 -0
- assets/images/imagify-logo.png +0 -0
- assets/images/imagify-menu-bar.jpg +0 -0
- assets/images/key.svg +1 -0
- assets/images/loader-balls.svg +144 -0
- assets/images/mail.svg +1 -0
- assets/images/penseur-aggressive.jpg +0 -0
- assets/images/penseur-normal.jpg +0 -0
- assets/images/penseur-original.jpg +0 -0
- assets/images/penseur-ultra.jpg +0 -0
- assets/images/phone.svg +1 -0
- assets/images/popin-loader.svg +29 -0
- assets/images/sidebar-wp-rocket.jpg +0 -0
- assets/images/spinner.gif +0 -0
- assets/images/stormy.svg +1 -0
- assets/images/sun.svg +1 -0
- assets/images/twitter_c.svg +1 -0
- assets/images/upload-image.png +0 -0
- assets/images/user.svg +1 -0
- assets/js/admin.js +166 -0
- assets/js/admin.min.js +6 -0
- assets/js/bulk.js +334 -0
- assets/js/bulk.min.js +15 -0
- assets/js/chart.min.js +11 -0
- assets/js/imagify.min.js +2 -0
- assets/js/jquery.event.move.js +586 -0
- assets/js/jquery.event.move.min.js +10 -0
- assets/js/jquery.twentytwenty.js +319 -0
- assets/js/jquery.twentytwenty.min.js +15 -0
- assets/js/options.js +98 -0
- assets/js/options.min.js +4 -0
- assets/js/sweetalert.min.js +1 -0
- assets/js/upload.js +145 -0
- assets/js/upload.min.js +6 -0
- contributors.txt +9 -0
- imagify.php +97 -0
- inc/3rd-party/3rd-party.php +4 -0
- inc/3rd-party/wp-retina-2x.php +54 -0
- inc/admin/ajax.php +466 -0
- inc/admin/enqueue.php +234 -0
- inc/admin/media.php +25 -0
- inc/admin/menu.php +25 -0
- inc/admin/meta-boxes.php +32 -0
- inc/admin/options.php +147 -0
- inc/admin/plugins.php +17 -0
- inc/admin/ui/bulk.php +293 -0
- inc/admin/ui/notices.php +259 -0
- inc/admin/ui/options.php +487 -0
- inc/admin/upgrader.php +126 -0
- inc/admin/upload.php +110 -0
- inc/api/imagify.php +313 -0
- inc/classes/class-attachment.php +606 -0
- inc/classes/class-user.php +201 -0
- inc/common/admin-bar.php +73 -0
- inc/common/attachments.php +33 -0
- inc/compat.php +20 -0
- inc/functions/admin-stats.php +214 -0
- inc/functions/admin-ui.php +182 -0
- inc/functions/admin.php +138 -0
- inc/functions/api.php +61 -0
- inc/functions/attachments.php +46 -0
- inc/functions/files.php +16 -0
- inc/functions/formatting.php +31 -0
- inc/functions/options.php +78 -0
- inc/functions/process.php +139 -0
- languages/imagify-es_ES.mo +0 -0
- languages/imagify-es_ES.po +945 -0
- languages/imagify-fr_FR.mo +0 -0
- languages/imagify-fr_FR.po +1179 -0
- readme.txt +236 -0
- uninstall.php +12 -0
assets/css/admin-bar.css
ADDED
@@ -0,0 +1,108 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
#wpadminbar #wp-admin-bar-imagify-profile * {
|
2 |
+
line-height: 1.5;
|
3 |
+
white-space: initial;
|
4 |
+
}
|
5 |
+
#wpadminbar #wp-admin-bar-imagify .ab-submenu {
|
6 |
+
padding-bottom: 0;
|
7 |
+
}
|
8 |
+
#wpadminbar #wp-admin-bar-imagify-profile .ab-item {
|
9 |
+
height: auto;
|
10 |
+
padding: 0 13px;
|
11 |
+
}
|
12 |
+
#wpadminbar #wp-admin-bar-imagify-profile {
|
13 |
+
min-width: 200px;
|
14 |
+
padding: 15px 0 10px;
|
15 |
+
margin-top: 0.7em;
|
16 |
+
background: #222;
|
17 |
+
}
|
18 |
+
#wp-admin-bar-imagify .dashicons {
|
19 |
+
font-family: "dashicons";
|
20 |
+
font-size: 18px;
|
21 |
+
vertical-align: middle;
|
22 |
+
margin: 0 5px 0 0;
|
23 |
+
}
|
24 |
+
#wp-admin-bar-imagify .button-text {
|
25 |
+
display: inline-block;
|
26 |
+
vertical-align: middle;
|
27 |
+
}
|
28 |
+
#wp-admin-bar-imagify .imagify-abq-row {
|
29 |
+
display: table;
|
30 |
+
width: 100%;
|
31 |
+
}
|
32 |
+
#wp-admin-bar-imagify .imagify-abq-row + .imagify-abq-row {
|
33 |
+
margin-top: .75em;
|
34 |
+
}
|
35 |
+
#wp-admin-bar-imagify .imagify-abq-row > * {
|
36 |
+
display: table-cell;
|
37 |
+
}
|
38 |
+
#wp-admin-bar-imagify-profile .imagify-meteo-icon {
|
39 |
+
padding-right: 7px;
|
40 |
+
}
|
41 |
+
#wp-admin-bar-imagify-profile .imagify-meteo-icon img {
|
42 |
+
width: 37px;
|
43 |
+
}
|
44 |
+
#wp-admin-bar-imagify-profile .imagify-meteo-title {
|
45 |
+
font-size: 17px;
|
46 |
+
}
|
47 |
+
#wp-admin-bar-imagify-profile .imagify-meteo-subs {
|
48 |
+
color: #72889F;
|
49 |
+
}
|
50 |
+
#wpadminbar #wp-admin-bar-imagify-profile strong {
|
51 |
+
font-weight: bold;
|
52 |
+
}
|
53 |
+
#wpadminbar #wp-admin-bar-imagify-profile .imagify-user-plan,
|
54 |
+
#wpadminbar #wp-admin-bar-imagify-profile a {
|
55 |
+
padding: 0;
|
56 |
+
color: #40B1D0;
|
57 |
+
}
|
58 |
+
#wpadminbar #wp-admin-bar-imagify-profile .imagify-account-link {
|
59 |
+
display: table;
|
60 |
+
}
|
61 |
+
#wpadminbar #wp-admin-bar-imagify-profile .imagify-account-link > * {
|
62 |
+
display: table-cell;
|
63 |
+
}
|
64 |
+
#wpadminbar #wp-admin-bar-imagify-profile .imagify-space-left {
|
65 |
+
max-width: 210px;
|
66 |
+
min-width: 210px;
|
67 |
+
width: 210px;
|
68 |
+
}
|
69 |
+
#wpadminbar #wp-admin-bar-imagify-profile .imagify-space-left p {
|
70 |
+
font-size: 12px;
|
71 |
+
}
|
72 |
+
#wp-admin-bar-imagify-profile .imagify-error,
|
73 |
+
#wp-admin-bar-imagify-profile .imagify-warning {
|
74 |
+
padding: 10px;
|
75 |
+
margin: 0 -13px -13px;
|
76 |
+
}
|
77 |
+
#wp-admin-bar-imagify-profile .imagify-error p + p,
|
78 |
+
#wp-admin-bar-imagify-profile .imagify-warning p + p {
|
79 |
+
margin-top: .5em;
|
80 |
+
}
|
81 |
+
#wp-admin-bar-imagify-profile .imagify-error p + p + p,
|
82 |
+
#wp-admin-bar-imagify-profile .imagify-warning p + p + p {
|
83 |
+
margin-top: 1em;
|
84 |
+
}
|
85 |
+
|
86 |
+
#wpadminbar #wp-admin-bar-imagify-profile .btn-ghost {
|
87 |
+
display: inline-block;
|
88 |
+
height: auto;
|
89 |
+
padding: 7px 10px;
|
90 |
+
border: 1px solid #FFF;
|
91 |
+
text-align: center;
|
92 |
+
background: transparent;
|
93 |
+
color: #FFF;
|
94 |
+
border-radius: 3px;
|
95 |
+
transition: all .275s;
|
96 |
+
}
|
97 |
+
|
98 |
+
#wpadminbar #wp-admin-bar-imagify-profile .btn-ghost:hover,
|
99 |
+
#wpadminbar #wp-admin-bar-imagify-profile .btn-ghost:focus {
|
100 |
+
background: #FFF;
|
101 |
+
color: #888;
|
102 |
+
}
|
103 |
+
|
104 |
+
#wpadminbar .imagify-warning * {
|
105 |
+
background: #f5a623;
|
106 |
+
color: #FFF;
|
107 |
+
text-shadow: 0 0 2px rgba(0, 0, 0, 0.2);
|
108 |
+
}
|
assets/css/admin-bar.min.css
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
#wpadminbar #wp-admin-bar-imagify-profile *{line-height:1.5;white-space:initial}#wpadminbar #wp-admin-bar-imagify .ab-submenu{padding-bottom:0}#wpadminbar #wp-admin-bar-imagify-profile .ab-item{height:auto;padding:0 13px}#wpadminbar #wp-admin-bar-imagify-profile{min-width:200px;padding:15px 0 10px;margin-top:0.7em;background:#222}#wp-admin-bar-imagify .dashicons{font-family:"dashicons";font-size:18px;vertical-align:middle;margin:0 5px 0 0}#wp-admin-bar-imagify .button-text{display:inline-block;vertical-align:middle}#wp-admin-bar-imagify .imagify-abq-row{display:table;width:100%}#wp-admin-bar-imagify .imagify-abq-row+.imagify-abq-row{margin-top:.75em}#wp-admin-bar-imagify .imagify-abq-row >*{display:table-cell}#wp-admin-bar-imagify-profile .imagify-meteo-icon{padding-right:7px}#wp-admin-bar-imagify-profile .imagify-meteo-icon img{width:37px}#wp-admin-bar-imagify-profile .imagify-meteo-title{font-size:17px}#wp-admin-bar-imagify-profile .imagify-meteo-subs{color:#72889F}#wpadminbar #wp-admin-bar-imagify-profile strong{font-weight:bold}#wpadminbar #wp-admin-bar-imagify-profile .imagify-user-plan,#wpadminbar #wp-admin-bar-imagify-profile a{padding:0;color:#40B1D0}#wpadminbar #wp-admin-bar-imagify-profile .imagify-account-link{display:table}#wpadminbar #wp-admin-bar-imagify-profile .imagify-account-link >* {display:table-cell}#wpadminbar #wp-admin-bar-imagify-profile .imagify-space-left{max-width:210px;min-width:210px;width:210px}#wpadminbar #wp-admin-bar-imagify-profile .imagify-space-left p{font-size:12px}#wp-admin-bar-imagify-profile .imagify-error,#wp-admin-bar-imagify-profile .imagify-warning{padding:10px;margin:0 -13px -13px}#wp-admin-bar-imagify-profile .imagify-error p+p,#wp-admin-bar-imagify-profile .imagify-warning p+p{margin-top:.5em}#wp-admin-bar-imagify-profile .imagify-error p+p+p,#wp-admin-bar-imagify-profile .imagify-warning p+p+p{margin-top:1em}#wpadminbar #wp-admin-bar-imagify-profile .btn-ghost{display:inline-block;height:auto;padding:7px 10px;border:1px solid #FFF;text-align:center;background:transparent;color:#FFF;border-radius:3px;transition:all .275s}#wpadminbar #wp-admin-bar-imagify-profile .btn-ghost:hover,#wpadminbar #wp-admin-bar-imagify-profile .btn-ghost:focus{background:#FFF;color:#888}#wpadminbar .imagify-warning *{background:#f5a623;color:#FFF;text-shadow:0 0 2px rgba(0,0,0,0.2)}
|
assets/css/admin.css
ADDED
@@ -0,0 +1,2118 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
.imagify-plugins-error {
|
2 |
+
overflow:hidden;
|
3 |
+
padding-left:20px;
|
4 |
+
list-style-type:disc
|
5 |
+
}
|
6 |
+
|
7 |
+
.imagify-plugins-error li {
|
8 |
+
width:300px;
|
9 |
+
line-height:30px
|
10 |
+
}
|
11 |
+
@media (max-width: 570px) {
|
12 |
+
.imagify-plugins-error li {
|
13 |
+
width: auto;
|
14 |
+
}
|
15 |
+
}
|
16 |
+
|
17 |
+
.imagify-notice-dismiss.notice-dismiss {
|
18 |
+
text-decoration: none;
|
19 |
+
}
|
20 |
+
|
21 |
+
.imagify-spinner {
|
22 |
+
display: inline-block;
|
23 |
+
width: 20px;
|
24 |
+
height: 20px;
|
25 |
+
margin-right: 5px;
|
26 |
+
vertical-align: middle;
|
27 |
+
background: rgba(0, 0, 0, 0) url("../images/spinner.gif") no-repeat scroll 0 0 / 20px 20px;
|
28 |
+
opacity: 0.7;
|
29 |
+
}
|
30 |
+
|
31 |
+
.misc-pub-section.misc-pub-imagify h4 {
|
32 |
+
font-size: 14px;
|
33 |
+
margin-top: 5px;
|
34 |
+
margin-bottom: 0;
|
35 |
+
}
|
36 |
+
|
37 |
+
/* Some Sweet alert styles */
|
38 |
+
.imagify-sweet-alert button {
|
39 |
+
margin-top: 17px !important;
|
40 |
+
height: 45px !important;
|
41 |
+
letter-spacing: 3px;
|
42 |
+
text-transform: uppercase !important;
|
43 |
+
border-radius: 3px !important;
|
44 |
+
background-color: #40b1d0 !important;
|
45 |
+
box-shadow: 0 3px 0 #338ea6 !important;
|
46 |
+
}
|
47 |
+
.imagify-sweet-alert button.cancel {
|
48 |
+
background: #777 !important;
|
49 |
+
box-shadow: 0 3px 0 #444 !important;
|
50 |
+
}
|
51 |
+
.imagify-sweet-alert-signup .sa-confirm-button-container {
|
52 |
+
width: 40%;
|
53 |
+
}
|
54 |
+
.imagify-sweet-alert-signup button {
|
55 |
+
width: 100%;
|
56 |
+
padding: 0 !important;
|
57 |
+
}
|
58 |
+
.imagify-sweet-alert .sa-input-error:before,
|
59 |
+
.imagify-sweet-alert .sa-input-error:after,
|
60 |
+
.imagify-sweet-alert .la-ball-fall {
|
61 |
+
top: 25% !important;
|
62 |
+
}
|
63 |
+
|
64 |
+
#wpwrap {
|
65 |
+
transition: all .4s;
|
66 |
+
}
|
67 |
+
.stop-scrolling #wpwrap {
|
68 |
+
filter: blur(2px);
|
69 |
+
}
|
70 |
+
.stop-scrolling #wpwrap #wpadminbar {
|
71 |
+
top: -32px;
|
72 |
+
}
|
73 |
+
|
74 |
+
/* Some basic colors */
|
75 |
+
.imagify-primary {
|
76 |
+
color: #40b1d0;
|
77 |
+
}
|
78 |
+
.imagify-secondary {
|
79 |
+
color: #8cc152;
|
80 |
+
}
|
81 |
+
|
82 |
+
#imagify-check-api-container {
|
83 |
+
font-weight: bold;
|
84 |
+
}
|
85 |
+
|
86 |
+
#imagify-check-api-container .dashicons {
|
87 |
+
font-size: 25px;
|
88 |
+
}
|
89 |
+
|
90 |
+
#imagify-check-api-container .dashicons-no:before {
|
91 |
+
color: #f06e57;
|
92 |
+
vertical-align: -1px;
|
93 |
+
}
|
94 |
+
|
95 |
+
#imagify-check-api-container .dashicons-yes:before {
|
96 |
+
color: #8BC34A;
|
97 |
+
vertical-align: -1px;
|
98 |
+
}
|
99 |
+
.imagify-valid {
|
100 |
+
color: #8BC34A;
|
101 |
+
}
|
102 |
+
|
103 |
+
.imagify-chart {
|
104 |
+
width: 33.33%;
|
105 |
+
position: relative;
|
106 |
+
}
|
107 |
+
#imagify-overview-chart-legend {
|
108 |
+
overflow: hidden;
|
109 |
+
}
|
110 |
+
.imagify-doughnut-legend {
|
111 |
+
margin-top: 38px;
|
112 |
+
list-style: none;
|
113 |
+
}
|
114 |
+
|
115 |
+
.imagify-doughnut-legend li {
|
116 |
+
display: block;
|
117 |
+
padding-left: 30px;
|
118 |
+
position: relative;
|
119 |
+
margin-bottom: 15px;
|
120 |
+
border-radius: 5px;
|
121 |
+
padding: 3px 8px 2px 31px;
|
122 |
+
font-size: 14px;
|
123 |
+
font-weight: 600;
|
124 |
+
cursor: default;
|
125 |
+
-webkit-transition: background-color 200ms ease-in-out;
|
126 |
+
-moz-transition: background-color 200ms ease-in-out;
|
127 |
+
-o-transition: background-color 200ms ease-in-out;
|
128 |
+
transition: background-color 200ms ease-in-out;
|
129 |
+
}
|
130 |
+
|
131 |
+
.imagify-doughnut-legend li span {
|
132 |
+
display: block;
|
133 |
+
position: absolute;
|
134 |
+
left: 0; top: 0;
|
135 |
+
width: 25px;
|
136 |
+
height: 25px;
|
137 |
+
border-radius: 50%;
|
138 |
+
}
|
139 |
+
|
140 |
+
.imagify-chart {
|
141 |
+
float: left;
|
142 |
+
margin-bottom: 20px;
|
143 |
+
}
|
144 |
+
td .imagify-chart {
|
145 |
+
float: none;
|
146 |
+
margin-bottom: 0;
|
147 |
+
}
|
148 |
+
|
149 |
+
.imagify-chart-container {
|
150 |
+
position: relative;
|
151 |
+
width: 180px;
|
152 |
+
float: left;
|
153 |
+
margin-right: 40px;
|
154 |
+
}
|
155 |
+
td .imagify-chart-container {
|
156 |
+
width: 18px;
|
157 |
+
height: 18px;
|
158 |
+
float: none;
|
159 |
+
margin-right: 10px;
|
160 |
+
}
|
161 |
+
td .imagify-chart {
|
162 |
+
top: 4px;
|
163 |
+
}
|
164 |
+
|
165 |
+
.imagify-chart-percent {
|
166 |
+
position: absolute;
|
167 |
+
left: 0; right: 0;
|
168 |
+
top: 50%;
|
169 |
+
margin-top: -14px;
|
170 |
+
text-align: center;
|
171 |
+
font-size: 55px;
|
172 |
+
font-weight: bold;
|
173 |
+
color: #46B1CE;
|
174 |
+
}
|
175 |
+
.imagify-chart-percent span {
|
176 |
+
font-size: 20px;
|
177 |
+
vertical-align: super;
|
178 |
+
}
|
179 |
+
|
180 |
+
.media_page_imagify-bulk-optimization .media-item {
|
181 |
+
margin: 0;
|
182 |
+
}
|
183 |
+
|
184 |
+
.media_page_imagify-bulk-optimization .media-item .progress {
|
185 |
+
float: none;
|
186 |
+
width: 100%;
|
187 |
+
margin: 0;
|
188 |
+
background: #1F2331;
|
189 |
+
box-shadow: 0;
|
190 |
+
border-radius: 0;
|
191 |
+
}
|
192 |
+
|
193 |
+
.media_page_imagify-bulk-optimization .media-item .percent {
|
194 |
+
width: auto;
|
195 |
+
padding: 0 5px;
|
196 |
+
line-height: 1.85;
|
197 |
+
font-size: 12px;
|
198 |
+
}
|
199 |
+
|
200 |
+
.media_page_imagify-bulk-optimization .media-item .progress,
|
201 |
+
.media_page_imagify-bulk-optimization .media-item .percent {
|
202 |
+
text-align: right;
|
203 |
+
}
|
204 |
+
.media_page_imagify-bulk-optimization .media-item .progress .bar {
|
205 |
+
width: 1px;
|
206 |
+
height: 22px;
|
207 |
+
margin-top: 0;
|
208 |
+
background: #46B1CE;
|
209 |
+
border-radius: 0;
|
210 |
+
overflow: visible;
|
211 |
+
-webkit-transition: width .5s;
|
212 |
+
transition: width .5s;
|
213 |
+
}
|
214 |
+
|
215 |
+
|
216 |
+
/*
|
217 |
+
*
|
218 |
+
* == Settings page
|
219 |
+
*
|
220 |
+
*/
|
221 |
+
|
222 |
+
|
223 |
+
/* Basic HTML elements */
|
224 |
+
|
225 |
+
.imagify-settings a,
|
226 |
+
.imagify-settings .button,
|
227 |
+
.imagify-settings input,
|
228 |
+
.imagify-welcome a,
|
229 |
+
.imagify-welcome .button,
|
230 |
+
.imagify-weolcome input {
|
231 |
+
-webkit-transition: all .275s;
|
232 |
+
transition: all .275s;
|
233 |
+
}
|
234 |
+
.imagify-settings a {
|
235 |
+
color: #40b1d0;
|
236 |
+
}
|
237 |
+
|
238 |
+
.imagify-options-title {
|
239 |
+
padding-bottom: .5em;
|
240 |
+
border-bottom: 3px solid #F2F2F2;
|
241 |
+
font-size: 13px;
|
242 |
+
font-weight: 500;
|
243 |
+
text-transform: uppercase;
|
244 |
+
letter-spacing: 0.025em;
|
245 |
+
color: #40b1d0;
|
246 |
+
}
|
247 |
+
|
248 |
+
.imagify-settings,
|
249 |
+
.imagify-settings p,
|
250 |
+
.imagify-settings th {
|
251 |
+
color: #5F758E;
|
252 |
+
}
|
253 |
+
@media (max-width: 782px) {
|
254 |
+
.imagify-settings .form-table th {
|
255 |
+
padding-top: 2em;
|
256 |
+
padding-bottom: .5em;
|
257 |
+
}
|
258 |
+
}
|
259 |
+
.imagify-settings .form-table td {
|
260 |
+
vertical-align: top;
|
261 |
+
}
|
262 |
+
.imagify-settings .form-table th span {
|
263 |
+
cursor: pointer;
|
264 |
+
}
|
265 |
+
.imagify-middle th {
|
266 |
+
padding-top: 35px;
|
267 |
+
}
|
268 |
+
.imagify-settings .button,
|
269 |
+
.imagify-welcome .button,
|
270 |
+
.imagify-notice .button {
|
271 |
+
height: auto;
|
272 |
+
padding: 8px 20px;
|
273 |
+
border: 0 none;
|
274 |
+
font-size: 14px;
|
275 |
+
font-weight: 600;
|
276 |
+
box-shadow: 0 3px 0 rgba(0, 0, 0, .15);
|
277 |
+
}
|
278 |
+
.imagify-notice .button-mini {
|
279 |
+
padding: 2px 10px;
|
280 |
+
font-size: 13px;
|
281 |
+
}
|
282 |
+
.button-primary.button-mini {
|
283 |
+
padding: 2px 10px;
|
284 |
+
}
|
285 |
+
.imagify-settings .button.button-mini-flat {
|
286 |
+
padding: 3px 6px 5px;
|
287 |
+
font-size: 12px;
|
288 |
+
box-shadow: none!important;
|
289 |
+
line-height: 1.2;
|
290 |
+
}
|
291 |
+
.imagify-settings .button.button-mini-flat:hover,
|
292 |
+
.imagify-settings .button.button-mini-flat:focus {
|
293 |
+
box-shadow: none!important;
|
294 |
+
}
|
295 |
+
|
296 |
+
.imagify-title .button-ghost.button-ghost {
|
297 |
+
padding: 2px 9px;
|
298 |
+
border: 1px solid #40B1D0;
|
299 |
+
font-size: 12px;
|
300 |
+
font-weight: normal;
|
301 |
+
color: #40B1D0;
|
302 |
+
background: transparent;
|
303 |
+
}
|
304 |
+
.imagify-title .button-ghost.button-ghost:hover,
|
305 |
+
.imagify-title .button-ghost.button-ghost:focus {
|
306 |
+
border-color: transparent;
|
307 |
+
color: #000;
|
308 |
+
background: #40B1D0;
|
309 |
+
}
|
310 |
+
.button .dashicons {
|
311 |
+
margin-right: 5px;
|
312 |
+
vertical-align: middle;
|
313 |
+
}
|
314 |
+
.imagify-settings .button-primary.button-primary,
|
315 |
+
.imagify-welcome .button-primary.button-primary {
|
316 |
+
background: #40B1D0;
|
317 |
+
color: #FFF;
|
318 |
+
box-shadow: 0 3px 0 rgba(51, 142, 166, 1);
|
319 |
+
text-shadow: 0 -1px 1px #006799, 1px 0 1px #006799, 0 1px 1px #006799, -1px 0 1px #006799
|
320 |
+
}
|
321 |
+
.imagify-settings .button-primary:hover,
|
322 |
+
.imagify-settings .button-primary:focus,
|
323 |
+
.imagify-welcome .button-primary:hover,
|
324 |
+
.imagify-welcome .button-primary:focus {
|
325 |
+
background: rgb(51, 142, 166);
|
326 |
+
box-shadow: 0 3px 0 rgb(31, 122, 146);
|
327 |
+
}
|
328 |
+
.imagify-settings input[type="text"] {
|
329 |
+
color: #4A4A4A;
|
330 |
+
font-weight: 600;
|
331 |
+
box-shadow: none;
|
332 |
+
}
|
333 |
+
.imagify-settings p.submit .button-primary {
|
334 |
+
margin-left: 240px;
|
335 |
+
}
|
336 |
+
@media (max-width: 850px) {
|
337 |
+
.imagify-settings p.submit .button-primary {
|
338 |
+
margin-left: 0px;
|
339 |
+
}
|
340 |
+
.imagify-settings p.submit {
|
341 |
+
text-align: center;
|
342 |
+
}
|
343 |
+
}
|
344 |
+
|
345 |
+
|
346 |
+
/* Header & Subheader */
|
347 |
+
|
348 |
+
.imagify-title.imagify-title {
|
349 |
+
position: relative;
|
350 |
+
padding: 30px 50px;
|
351 |
+
font-size: 23px;
|
352 |
+
background: #2E3243;
|
353 |
+
color: #FFF;
|
354 |
+
}
|
355 |
+
.imagify-settings .imagify-title + .imagify-notice {
|
356 |
+
margin: 0;
|
357 |
+
border-right: 1px solid #D9D9D9;
|
358 |
+
padding-top: 15px;
|
359 |
+
padding-bottom: 15px;
|
360 |
+
}
|
361 |
+
.imagify-logo {
|
362 |
+
vertical-align: top;
|
363 |
+
}
|
364 |
+
.imagify-sub-header,
|
365 |
+
.imagify-sub-title.imagify-sub-title,
|
366 |
+
.imagify-settings div.submit { /* heavier is better */
|
367 |
+
margin: 0;
|
368 |
+
padding: 20px;
|
369 |
+
background: #F2F5F7;
|
370 |
+
}
|
371 |
+
|
372 |
+
.imagify-bulk-info {
|
373 |
+
margin: 1em 1em 1em 240px;
|
374 |
+
transition: margin .3s;
|
375 |
+
}
|
376 |
+
@media (max-width: 850px) {
|
377 |
+
.imagify-bulk-info {
|
378 |
+
margin: 1em;
|
379 |
+
}
|
380 |
+
}
|
381 |
+
.imagify-bulk-info p {
|
382 |
+
display: inline-block;
|
383 |
+
text-align: left;
|
384 |
+
width: 400px;
|
385 |
+
max-width: 100%;
|
386 |
+
font-weight: bold;
|
387 |
+
}
|
388 |
+
|
389 |
+
@media (min-width: 1500px) {
|
390 |
+
.imagify-settings div.submit {
|
391 |
+
display: table;
|
392 |
+
width: 100%;
|
393 |
+
}
|
394 |
+
.imagify-settings div.submit > * {
|
395 |
+
display: table-cell;
|
396 |
+
vertical-align: middle;
|
397 |
+
}
|
398 |
+
.imagify-bulk-info {
|
399 |
+
padding: 0 25px;
|
400 |
+
text-align: right;
|
401 |
+
}
|
402 |
+
}
|
403 |
+
.imagify-settings div.submit {
|
404 |
+
margin-top: 2em;
|
405 |
+
padding: 20px 0;
|
406 |
+
}
|
407 |
+
.imagify-sub-header th {
|
408 |
+
text-align: right;
|
409 |
+
}
|
410 |
+
.imagify-sub-header .form-table {
|
411 |
+
margin: 0;
|
412 |
+
}
|
413 |
+
.imagify-sub-header th,
|
414 |
+
.imagify-sub-header td {
|
415 |
+
padding-top: 0;
|
416 |
+
padding-bottom: 0;
|
417 |
+
}
|
418 |
+
[for="api_key"] {
|
419 |
+
padding-top: 5px;
|
420 |
+
}
|
421 |
+
|
422 |
+
.imagify-notice .imagify-rate-us.imagify-rate-us {
|
423 |
+
position: relative;
|
424 |
+
bottom: 0; right: 0;
|
425 |
+
text-align: left;
|
426 |
+
}
|
427 |
+
|
428 |
+
.imagify-notice .imagify-rate-us .stars {
|
429 |
+
margin: 0;
|
430 |
+
}
|
431 |
+
|
432 |
+
.imagify-rate-us.imagify-rate-us {
|
433 |
+
position: absolute;
|
434 |
+
bottom: 50%;
|
435 |
+
right: 20px;
|
436 |
+
text-align: right;
|
437 |
+
margin-bottom: -2.4em;
|
438 |
+
color: #FFF;
|
439 |
+
}
|
440 |
+
.imagify-rate-us a {
|
441 |
+
color: #40B1D0;
|
442 |
+
}
|
443 |
+
.imagify-rate-us .stars {
|
444 |
+
display: inline-block;
|
445 |
+
margin: 2px 0 0 10px;
|
446 |
+
text-decoration: none;
|
447 |
+
letter-spacing: .2em;
|
448 |
+
vertical-align: -1px;
|
449 |
+
}
|
450 |
+
.imagify-rate-us .stars .dashicons:before {
|
451 |
+
font-size: 18px;
|
452 |
+
}
|
453 |
+
.imagify-rate-us a:hover,
|
454 |
+
.imagify-rate-us a:focus {
|
455 |
+
color: #FEE102;
|
456 |
+
}
|
457 |
+
@media (max-width: 1220px) {
|
458 |
+
.imagify-rate-us.imagify-rate-us {
|
459 |
+
position: static;
|
460 |
+
margin-bottom: 0;
|
461 |
+
text-align: left;
|
462 |
+
}
|
463 |
+
.imagify-rate-us.imagify-rate-us br {
|
464 |
+
display: none;
|
465 |
+
}
|
466 |
+
.imagify-rate-us .stars {
|
467 |
+
display: block;
|
468 |
+
margin-left: 0;
|
469 |
+
}
|
470 |
+
}
|
471 |
+
|
472 |
+
|
473 |
+
/* Sections */
|
474 |
+
|
475 |
+
.imagify-settings-section {
|
476 |
+
padding: 10px 20px;
|
477 |
+
}
|
478 |
+
[id="imagify-settings"],
|
479 |
+
.imagify-welcome .imagify-settings-section {
|
480 |
+
border: 1px solid #D9D9D9;
|
481 |
+
border-top: 0 none;
|
482 |
+
background: #FFF;
|
483 |
+
}
|
484 |
+
.imagify-br {
|
485 |
+
line-height: 2;
|
486 |
+
}
|
487 |
+
|
488 |
+
|
489 |
+
/* Some colors */
|
490 |
+
.imagify-important {
|
491 |
+
color: #F5A623;
|
492 |
+
}
|
493 |
+
.imagify-info,
|
494 |
+
.imagify-info a {
|
495 |
+
color: #40B1D0;
|
496 |
+
font-size: 12px;
|
497 |
+
}
|
498 |
+
.imagify-info {
|
499 |
+
position: relative;
|
500 |
+
display: inline-block;
|
501 |
+
padding-left: 25px;
|
502 |
+
vertical-align: top;
|
503 |
+
}
|
504 |
+
.imagify-info .dashicons {
|
505 |
+
position: absolute;
|
506 |
+
left: 0; top: -1px;
|
507 |
+
}
|
508 |
+
label + .imagify-info,
|
509 |
+
label + .imagify-options-line,
|
510 |
+
.imagify-visual-label {
|
511 |
+
display: inline-block;
|
512 |
+
max-width: 70%;
|
513 |
+
margin-left: 15px;
|
514 |
+
margin-top: 2px!important;
|
515 |
+
-webkit-transition: opacity .3s;
|
516 |
+
transition: opacity .3s;
|
517 |
+
}
|
518 |
+
.imagify-visual-label {
|
519 |
+
vertical-align: -5px;
|
520 |
+
}
|
521 |
+
label[for="imagify_sizes_full"] + .imagify-info {
|
522 |
+
vertical-align: middle;
|
523 |
+
}
|
524 |
+
|
525 |
+
.imagify-settings.imagify-settings [type="checkbox"]:not(:checked) + label + .imagify-options-line,
|
526 |
+
.imagify-settings.imagify-settings [type="checkbox"]:not(:checked) + label .imagify-visual-label {
|
527 |
+
opacity: .5;
|
528 |
+
}
|
529 |
+
.imagify-settings.imagify-settings [type="checkbox"]:checked + label + .imagify-options-line,
|
530 |
+
.imagify-settings.imagify-settings [type="checkbox"]:checked + label .imagify-visual-label {
|
531 |
+
opacity: 1;
|
532 |
+
}
|
533 |
+
|
534 |
+
.imagify-checkbox-marged {
|
535 |
+
max-width: 500px;
|
536 |
+
margin-left: 45px;
|
537 |
+
}
|
538 |
+
|
539 |
+
|
540 |
+
|
541 |
+
/* Custom checkboxes in CSS */
|
542 |
+
|
543 |
+
.imagify-settings.imagify-settings [type="checkbox"]:not(:checked),
|
544 |
+
.imagify-settings.imagify-settings [type="checkbox"]:checked {
|
545 |
+
opacity: 0.01;
|
546 |
+
}
|
547 |
+
.imagify-settings.imagify-settings [type="checkbox"]:not(:checked):focus,
|
548 |
+
.imagify-settings.imagify-settings [type="checkbox"]:checked:focus {
|
549 |
+
box-shadow: none!important; /* system value to override */
|
550 |
+
outline: none!important;
|
551 |
+
border: 0 none!important;
|
552 |
+
}
|
553 |
+
|
554 |
+
.imagify-settings [type="checkbox"]:not(:checked) + label,
|
555 |
+
.imagify-settings [type="checkbox"]:checked + label {
|
556 |
+
position: relative;
|
557 |
+
padding-left: 6px;
|
558 |
+
cursor: pointer;
|
559 |
+
vertical-align: top;
|
560 |
+
}
|
561 |
+
|
562 |
+
/* checkbox aspect */
|
563 |
+
.imagify-settings [type="checkbox"]:not(:checked) + label:before,
|
564 |
+
.imagify-settings [type="checkbox"]:checked + label:before {
|
565 |
+
content: '';
|
566 |
+
position: absolute;
|
567 |
+
left: 0; top: 0;
|
568 |
+
width: 28px; height: 28px;
|
569 |
+
margin: 0 0 0 -24px;
|
570 |
+
border: 2px solid #8BA6B4;
|
571 |
+
background: #FFFFFF;
|
572 |
+
border-radius: 4px;
|
573 |
+
}
|
574 |
+
/* checked mark aspect */
|
575 |
+
.imagify-settings [type="checkbox"]:not(:checked) + label:after,
|
576 |
+
.imagify-settings [type="checkbox"]:checked + label:after {
|
577 |
+
content: url('../images/check.svg');
|
578 |
+
position: absolute;
|
579 |
+
top: 8px; left: -16px;
|
580 |
+
-webkit-transition: all .2s;
|
581 |
+
-moz-transition: all .2s;
|
582 |
+
-ms-transition: all .2s;
|
583 |
+
transition: all .2s;
|
584 |
+
}
|
585 |
+
/* disabled aspect */
|
586 |
+
.imagify-settings [type="checkbox"][disabled]:not(:checked) + label:before,
|
587 |
+
.imagify-settings [type="checkbox"][disabled]:checked + label:before {
|
588 |
+
border-color: #ccc;
|
589 |
+
background: #ddd;
|
590 |
+
}
|
591 |
+
/* checked mark aspect changes */
|
592 |
+
.imagify-settings [type="checkbox"]:not(:checked) + label:after {
|
593 |
+
opacity: 0;
|
594 |
+
-webkit-transform: scale(0);
|
595 |
+
-moz-transform: scale(0);
|
596 |
+
-ms-transform: scale(0);
|
597 |
+
transform: scale(0);
|
598 |
+
}
|
599 |
+
.imagify-settings [type="checkbox"]:checked + label:after {
|
600 |
+
opacity: 1;
|
601 |
+
-webkit-transform: scale(1);
|
602 |
+
-moz-transform: scale(1);
|
603 |
+
-ms-transform: scale(1);
|
604 |
+
transform: scale(1);
|
605 |
+
}
|
606 |
+
input[id^="imagify_sizes_"]:checked + label {
|
607 |
+
font-weight: bold;
|
608 |
+
}
|
609 |
+
|
610 |
+
/* mini version */
|
611 |
+
.imagify-settings .mini[type="checkbox"]:not(:checked) + label:before,
|
612 |
+
.imagify-settings .mini[type="checkbox"]:checked + label:before {
|
613 |
+
width: 15px;
|
614 |
+
height: 15px;
|
615 |
+
border-width: 1px;
|
616 |
+
border-radius: 2px;
|
617 |
+
margin-top: 0;
|
618 |
+
}
|
619 |
+
.imagify-settings .mini[type="checkbox"]:not(:checked) + label:after,
|
620 |
+
.imagify-settings .mini[type="checkbox"]:checked + label:after {
|
621 |
+
content: url("../images/check-mini.svg");
|
622 |
+
left: -19px;
|
623 |
+
top: -1px;
|
624 |
+
}
|
625 |
+
/* focus aspect */
|
626 |
+
.imagify-settings [type="checkbox"]:not(:checked):focus + label:before,
|
627 |
+
.imagify-settings [type="checkbox"]:checked:focus + label:before {
|
628 |
+
border-style: dotted;
|
629 |
+
border-color: #40b1d0;
|
630 |
+
}
|
631 |
+
|
632 |
+
/* Custom radio in CSS */
|
633 |
+
.imagify-inline-options {
|
634 |
+
position: relative;
|
635 |
+
display: table;
|
636 |
+
width: 100%;
|
637 |
+
max-width: 600px;
|
638 |
+
border-collapse: collapse;
|
639 |
+
}
|
640 |
+
.imagify-inline-options:after {
|
641 |
+
content: "";
|
642 |
+
display: table;
|
643 |
+
clear: both;
|
644 |
+
}
|
645 |
+
.imagify-inline-options input[type="radio"]:not(:checked),
|
646 |
+
.imagify-inline-options input[type="radio"]:checked {
|
647 |
+
position: absolute;
|
648 |
+
left: 5px; top: 5px;
|
649 |
+
display: none;
|
650 |
+
}
|
651 |
+
.imagify-inline-options input[type="radio"]:not(:checked) + label,
|
652 |
+
.imagify-inline-options input[type="radio"]:checked + label {
|
653 |
+
position: relative;
|
654 |
+
/*
|
655 |
+
float: left;
|
656 |
+
padding: 13px 40px;
|
657 |
+
*/
|
658 |
+
display: table-cell;
|
659 |
+
padding: 13px 10px;
|
660 |
+
text-align: center;
|
661 |
+
|
662 |
+
font-weight: 600;
|
663 |
+
font-size: 16px;
|
664 |
+
text-transform: uppercase;
|
665 |
+
letter-spacing: 0.1em;
|
666 |
+
color: #FFF;
|
667 |
+
background: #2E3243;
|
668 |
+
border-left: 1px solid rgba(255, 255, 255, 0.2);
|
669 |
+
box-shadow: 0 -3px 0 rgba(0, 0, 0, 0.1) inset, inset -1px 0 0 rgba(255, 255, 255, 0.2);
|
670 |
+
z-index: 2;
|
671 |
+
-webkit-transition: all .275s;
|
672 |
+
transition: all .275s;
|
673 |
+
}
|
674 |
+
.imagify-bulk-submit .imagify-inline-options input[type="radio"]:not(:checked) + label,
|
675 |
+
.imagify-bulk-submit .imagify-inline-options input[type="radio"]:checked + label {
|
676 |
+
margin-bottom: 1.75em;
|
677 |
+
}
|
678 |
+
.imagify-inline-options input[type="radio"]:not(:checked) + label:first-of-type,
|
679 |
+
.imagify-inline-options input[type="radio"]:checked + label:first-of-type {
|
680 |
+
border-radius: 3px 0 0 3px;
|
681 |
+
}
|
682 |
+
.imagify-inline-options input[type="radio"]:not(:checked) + label:last-of-type,
|
683 |
+
.imagify-inline-options input[type="radio"]:checked + label:last-of-type {
|
684 |
+
border-radius: 0 3px 3px 0;
|
685 |
+
}
|
686 |
+
|
687 |
+
.imagify-inline-options input[type="radio"]:checked + label {
|
688 |
+
background: #8BC34A
|
689 |
+
}
|
690 |
+
|
691 |
+
.imagify-inline-options .imagify-info {
|
692 |
+
margin-top: 15px;
|
693 |
+
}
|
694 |
+
.imagify-btn-info {
|
695 |
+
display: block;
|
696 |
+
font-size: 0.7em;
|
697 |
+
letter-spacing: 0;
|
698 |
+
line-height: 1;
|
699 |
+
text-transform: none;
|
700 |
+
}
|
701 |
+
|
702 |
+
/* Some inputs */
|
703 |
+
#describe-resize-larger input {
|
704 |
+
width: 5em;
|
705 |
+
}
|
706 |
+
|
707 |
+
/* Ads & columns */
|
708 |
+
.imagify-col {
|
709 |
+
overflow: hidden;
|
710 |
+
}
|
711 |
+
.imagify-sidebar {
|
712 |
+
float: right;
|
713 |
+
width: 280px;
|
714 |
+
margin-left: 25px;
|
715 |
+
}
|
716 |
+
.imagify-sidebar-section {
|
717 |
+
border: 1px solid #BBB;
|
718 |
+
background: #FFF;
|
719 |
+
}
|
720 |
+
.imagify-sidebar-section + .imagify-sidebar-section {
|
721 |
+
margin-top: 2em;
|
722 |
+
}
|
723 |
+
@media (max-width: 760px) {
|
724 |
+
.imagify-settings {
|
725 |
+
display: flex;
|
726 |
+
flex-direction: column;
|
727 |
+
}
|
728 |
+
.imagify-sidebar {
|
729 |
+
order: 2;
|
730 |
+
float: none;
|
731 |
+
width: auto;
|
732 |
+
margin-left: 0;
|
733 |
+
margin-top: 25px;
|
734 |
+
}
|
735 |
+
.wp-media-products {
|
736 |
+
text-align: center;
|
737 |
+
}
|
738 |
+
.wp-media-products li {
|
739 |
+
display: inline-block;
|
740 |
+
width: 100%;
|
741 |
+
max-width: 276px;
|
742 |
+
}
|
743 |
+
}
|
744 |
+
.imagify-sidebar-title {
|
745 |
+
display: block;
|
746 |
+
padding: 20px 15px;
|
747 |
+
border-bottom: 1px solid #BBB;
|
748 |
+
font-size: 14px;
|
749 |
+
font-weight: bold;
|
750 |
+
color: #23282d;
|
751 |
+
background: #F2F5F7;
|
752 |
+
}
|
753 |
+
.imagify-sidebar-title img {
|
754 |
+
vertical-align: top;
|
755 |
+
margin-right: 5px;
|
756 |
+
}
|
757 |
+
.imagify-sidebar .wp-media-products {
|
758 |
+
margin-top: 0;
|
759 |
+
margin-bottom: -.5em;
|
760 |
+
}
|
761 |
+
.imagify-sidebar .wp-media-products .links {
|
762 |
+
display: block;
|
763 |
+
padding: 85px 25px 24px;
|
764 |
+
text-align: center;
|
765 |
+
background-color: #2E3243;
|
766 |
+
background-size: contain;
|
767 |
+
background-repeat: no-repeat;
|
768 |
+
background-position: 50% 0;
|
769 |
+
text-decoration: none;
|
770 |
+
}
|
771 |
+
.imagify-sidebar .wp-media-products .links p {
|
772 |
+
margin: 1.5em auto;
|
773 |
+
color: #FFF;
|
774 |
+
}
|
775 |
+
.imagify-sidebar .wp-media-products .wprocket-link {
|
776 |
+
background-image: linear-gradient(to bottom, rgba(59, 30, 78 ,0), rgba(59, 30, 78 ,0) 130px, rgba(59 ,30 ,78 , 1) 210px), url("../images/sidebar-wp-rocket.jpg");
|
777 |
+
background-color: #3B1E4E;
|
778 |
+
background-repeat: repeat-x, no-repeat;
|
779 |
+
}
|
780 |
+
|
781 |
+
.imagify-sidebar-content {
|
782 |
+
padding: 10px 20px;
|
783 |
+
}
|
784 |
+
|
785 |
+
.imagify-mark-styled {
|
786 |
+
display: inline-block;
|
787 |
+
padding: 1px 2px 1px 4px;
|
788 |
+
line-height: 1.3;
|
789 |
+
font-weight: bold;
|
790 |
+
background: #F7A933;
|
791 |
+
transform-origine: 50% 50%;
|
792 |
+
transform: rotateZ(-2deg) rotateX(-10deg) skewX(-2deg) skewY(-3deg);
|
793 |
+
text-shadow: 1px 1px 0 rgba(0,0,0,0.2);
|
794 |
+
}
|
795 |
+
.imagify-mark-styled span {
|
796 |
+
display: inline-block;
|
797 |
+
transform: rotateZ(2deg) rotateX(10deg) skewX(2deg) skewY(3deg);
|
798 |
+
}
|
799 |
+
|
800 |
+
.imagify-discount-code {
|
801 |
+
margin: 0.35em 0 .5em;
|
802 |
+
display: block;
|
803 |
+
font-size: 2em;
|
804 |
+
letter-spacing: .05em;
|
805 |
+
font-weight: bold;
|
806 |
+
text-align: center;
|
807 |
+
text-shadow: 1px 1px 0 rgba(0,0,0,0.2);
|
808 |
+
}
|
809 |
+
.imagify-big-text {
|
810 |
+
font-size: 15px;
|
811 |
+
font-weight: bold;
|
812 |
+
}
|
813 |
+
.imagify-big-text strong {
|
814 |
+
font-size: 20px;
|
815 |
+
}
|
816 |
+
a.btn-rocket {
|
817 |
+
display: block;
|
818 |
+
font-size: 1.15em;
|
819 |
+
padding: 12px;
|
820 |
+
background: #F7A933;
|
821 |
+
box-shadow: 0 3px 0 #D69626;
|
822 |
+
border-radius: 3px;
|
823 |
+
color: #FFF;
|
824 |
+
text-transform: uppercase;
|
825 |
+
font-weight: bold;
|
826 |
+
text-shadow: 1px 1px 0 rgba(0,0,0,0.2);
|
827 |
+
text-decoration: none;
|
828 |
+
}
|
829 |
+
a.btn-rocket:hover,
|
830 |
+
a.btn-rocket:focus {
|
831 |
+
background: darkorange;
|
832 |
+
box-shadow: 0 3px 0 darkorange;
|
833 |
+
}
|
834 |
+
|
835 |
+
|
836 |
+
/*
|
837 |
+
* == Welcome section
|
838 |
+
*/
|
839 |
+
|
840 |
+
.imagify-welcome {
|
841 |
+
margin: 30px 20px 0 0;
|
842 |
+
}
|
843 |
+
.imagify-welcome .baseline {
|
844 |
+
display: inline-block;
|
845 |
+
margin: .2em 0 0 2em;
|
846 |
+
font-size: 17px;
|
847 |
+
}
|
848 |
+
.imagify-welcome .imagify-logo {
|
849 |
+
vertical-align: middle;
|
850 |
+
}
|
851 |
+
.imagify-welcome-remove {
|
852 |
+
position: absolute;
|
853 |
+
top: 50%; right: 15px;
|
854 |
+
margin-top: -8px;
|
855 |
+
color: #FFF;
|
856 |
+
text-decoration: none;
|
857 |
+
}
|
858 |
+
.imagify-columns {
|
859 |
+
overflow: hidden;
|
860 |
+
padding: 15px 0;
|
861 |
+
counter-reset: cols;
|
862 |
+
}
|
863 |
+
.imagify-columns [class^="col-"] {
|
864 |
+
float: left;
|
865 |
+
-webkit-box-sizing: border-box;
|
866 |
+
-moz-box-sizing: border-box;
|
867 |
+
box-sizing: border-box;
|
868 |
+
}
|
869 |
+
.imagify-columns .col-1-3 {
|
870 |
+
width: 33.333%;
|
871 |
+
padding-left: 28px;
|
872 |
+
}
|
873 |
+
.imagify-columns .col-1-2 {
|
874 |
+
width: 50%;
|
875 |
+
padding: 0 20px;
|
876 |
+
}
|
877 |
+
.imagify-columns .col-informations {
|
878 |
+
width: 41.6%;
|
879 |
+
padding-right: 30px;
|
880 |
+
}
|
881 |
+
.imagify-columns .col-statistics {
|
882 |
+
width: 25%;
|
883 |
+
}
|
884 |
+
@media (max-width: 830px) {
|
885 |
+
.imagify-columns [class^="col-"] {
|
886 |
+
float: none;
|
887 |
+
margin-bottom: 1.5em;
|
888 |
+
}
|
889 |
+
.imagify-columns .col-1-3,
|
890 |
+
.imagify-columns .col-1-2 {
|
891 |
+
width: auto;
|
892 |
+
padding: 0 28px;
|
893 |
+
clear: both;
|
894 |
+
padding-top: 1em;
|
895 |
+
}
|
896 |
+
}
|
897 |
+
.imagify-columns [class^="col-"] img {
|
898 |
+
float: left;
|
899 |
+
margin-right: 18px;
|
900 |
+
}
|
901 |
+
.imagify-col-content {
|
902 |
+
overflow: hidden;
|
903 |
+
}
|
904 |
+
.imagify-col-title {
|
905 |
+
margin: 0 0 15px 0;
|
906 |
+
font-size: 23px;
|
907 |
+
}
|
908 |
+
.counter .imagify-col-title:before {
|
909 |
+
counter-increment: cols;
|
910 |
+
content: counter(cols) ". ";
|
911 |
+
color: #40B1D0;
|
912 |
+
}
|
913 |
+
.imagify-col-desc {
|
914 |
+
color: #5F758E;
|
915 |
+
margin-bottom: 2em;
|
916 |
+
}
|
917 |
+
|
918 |
+
|
919 |
+
/*
|
920 |
+
* == Imagify Notices
|
921 |
+
*/
|
922 |
+
.imagify-notice.imagify-notice {
|
923 |
+
position: relative;
|
924 |
+
display: -webkit-box;
|
925 |
+
display: -webkit-flex;
|
926 |
+
display: -ms-flexbox;
|
927 |
+
display: flex;
|
928 |
+
padding: 0;
|
929 |
+
margin: 10px 20px 10px 2px;
|
930 |
+
border: 0 none;
|
931 |
+
background: #2E3243;
|
932 |
+
box-shadow: none;
|
933 |
+
color: #FFF;
|
934 |
+
}
|
935 |
+
@media (max-width:782px) {
|
936 |
+
.imagify-notice.imagify-notice,
|
937 |
+
.imagify-welcome {
|
938 |
+
margin-right: 12px;
|
939 |
+
}
|
940 |
+
}
|
941 |
+
@media (max-width: 450px) {
|
942 |
+
.imagify-notice.imagify-notice {
|
943 |
+
-webkit-box-orient: vertical;
|
944 |
+
-webkit-box-direction: normal;
|
945 |
+
-webkit-flex-direction: column;
|
946 |
+
-ms-flex-direction: column;
|
947 |
+
flex-direction: column;
|
948 |
+
}
|
949 |
+
}
|
950 |
+
.wrap .imagify-notice {
|
951 |
+
margin: 5px 15px 2px;
|
952 |
+
position: relative;
|
953 |
+
}
|
954 |
+
.imagify-notice-logo {
|
955 |
+
padding: 18px 23px;
|
956 |
+
background: #40B1D0;
|
957 |
+
}
|
958 |
+
.updated .imagify-notice-logo {
|
959 |
+
background: #8BC34A;
|
960 |
+
}
|
961 |
+
.error .imagify-notice-logo {
|
962 |
+
background: #D0021B;
|
963 |
+
}
|
964 |
+
|
965 |
+
.imagify-notice-title {
|
966 |
+
font-size: 15px;
|
967 |
+
}
|
968 |
+
|
969 |
+
.imagify-notice-content {
|
970 |
+
padding: 5px 23px;
|
971 |
+
}
|
972 |
+
.imagify-notice-content.imagify-notice-content p {
|
973 |
+
margin: 0.65em 0;
|
974 |
+
}
|
975 |
+
.imagify-notice a {
|
976 |
+
color: #40B1D0;
|
977 |
+
}
|
978 |
+
.imagify-notice a:hover,
|
979 |
+
.imagify-notice a:focus {
|
980 |
+
color: #FEE102;
|
981 |
+
}
|
982 |
+
|
983 |
+
.imagify-notice code {
|
984 |
+
background: rgba(0, 0, 0, 0.4) none repeat scroll 0 0;
|
985 |
+
}
|
986 |
+
|
987 |
+
/*
|
988 |
+
* == Custom column & Metabox
|
989 |
+
*/
|
990 |
+
.column-imagify_optimized_file.column-imagify_optimized_file {
|
991 |
+
width: 300px;
|
992 |
+
text-align: center;
|
993 |
+
vertical-align: middle;
|
994 |
+
}
|
995 |
+
.column-imagify_optimized_file > * {
|
996 |
+
max-width: 235px;
|
997 |
+
margin: 0 auto;
|
998 |
+
}
|
999 |
+
ul.imagify-datas-list.imagify-datas-list {
|
1000 |
+
margin: 0 auto;
|
1001 |
+
color: #555;
|
1002 |
+
font-size: 10px;
|
1003 |
+
}
|
1004 |
+
.compat-field-imagify .label {
|
1005 |
+
vertical-align: top;
|
1006 |
+
}
|
1007 |
+
.compat-field-imagify ul.imagify-datas-list {
|
1008 |
+
margin-top: 7px;
|
1009 |
+
font-size: 11px;
|
1010 |
+
}
|
1011 |
+
ul.imagify-datas-list .big {
|
1012 |
+
font-size: 12px;
|
1013 |
+
color: #40B1D0;
|
1014 |
+
}
|
1015 |
+
.imagify-data-item {
|
1016 |
+
overflow: hidden;
|
1017 |
+
}
|
1018 |
+
.imagify-data-item .imagify-chart {
|
1019 |
+
display: inline-block;
|
1020 |
+
top: 1px;
|
1021 |
+
width: 20px;
|
1022 |
+
vertical-align: middle;
|
1023 |
+
margin-bottom: 0;
|
1024 |
+
}
|
1025 |
+
li.imagify-data-item {
|
1026 |
+
clear: both;
|
1027 |
+
margin-bottom: 2px;
|
1028 |
+
}
|
1029 |
+
ul.imagify-datas-list .imagify-data-item span.data,
|
1030 |
+
ul.imagify-datas-list .imagify-data-item strong {
|
1031 |
+
float: left;
|
1032 |
+
width: 50%;
|
1033 |
+
-webkit-box-sizing: border-box;
|
1034 |
+
-moz-box-sizing: border-box;
|
1035 |
+
box-sizing: border-box;
|
1036 |
+
}
|
1037 |
+
ul.imagify-datas-list .imagify-data-item span.data {
|
1038 |
+
text-align: left;
|
1039 |
+
padding-right: 5px;
|
1040 |
+
}
|
1041 |
+
.compat-field-imagify .imagify-datas-list .imagify-data-item .data {
|
1042 |
+
width: 130px;
|
1043 |
+
text-align: left;
|
1044 |
+
font-weight: bold;
|
1045 |
+
}
|
1046 |
+
ul.imagify-datas-list .imagify-data-item strong {
|
1047 |
+
text-align: left;
|
1048 |
+
padding-left: 5px;
|
1049 |
+
}
|
1050 |
+
|
1051 |
+
.imagify-datas-more-action.imagify-datas-more-action {
|
1052 |
+
margin: .4em auto;
|
1053 |
+
background: linear-gradient(to bottom, transparent, transparent 49%, rgba(0,0,0,.075) 50%, rgba(0,0,0,.075) 58%, transparent 58%, transparent);
|
1054 |
+
}
|
1055 |
+
.imagify-datas-more-action a {
|
1056 |
+
display: inline-block;
|
1057 |
+
padding: 0 5px;
|
1058 |
+
background: #40B1D0;
|
1059 |
+
color: #FFF;
|
1060 |
+
text-transform: uppercase;
|
1061 |
+
font-size: 9px;
|
1062 |
+
font-weight: bold;
|
1063 |
+
line-height: 1.9;
|
1064 |
+
text-decoration: none;
|
1065 |
+
}
|
1066 |
+
.imagify-datas-more-action a.is-open {
|
1067 |
+
background: #555;
|
1068 |
+
}
|
1069 |
+
.imagify-datas-more-action a.is-open .dashicons {
|
1070 |
+
transform: rotate(180deg);
|
1071 |
+
}
|
1072 |
+
.imagify-datas-more-action a .dashicons {
|
1073 |
+
font-size: 14px;
|
1074 |
+
vertical-align: middle;
|
1075 |
+
line-height: .8;
|
1076 |
+
}
|
1077 |
+
.imagify-datas-more-action a .dashicons:before {
|
1078 |
+
vertical-align: middle;
|
1079 |
+
line-height: 20px;
|
1080 |
+
}
|
1081 |
+
.imagify-datas-more-action .the-text {
|
1082 |
+
display: inline-block;
|
1083 |
+
vertical-align: middle;
|
1084 |
+
height: 20px;
|
1085 |
+
line-height: 20px;
|
1086 |
+
}
|
1087 |
+
|
1088 |
+
ul.imagify-datas-details.imagify-datas-details {
|
1089 |
+
margin: .7em auto;
|
1090 |
+
}
|
1091 |
+
.imagify-datas-details strong {
|
1092 |
+
color: #40B1D0;
|
1093 |
+
}
|
1094 |
+
.imagify-datas-details .original {
|
1095 |
+
color: #555;
|
1096 |
+
}
|
1097 |
+
|
1098 |
+
.imagify-datas-actions-links {
|
1099 |
+
overflow: hidden;
|
1100 |
+
border-top: 2px solid transparent;
|
1101 |
+
padding-top: 5px;
|
1102 |
+
font-size: 8px;
|
1103 |
+
}
|
1104 |
+
.imagify-datas-actions-links a {
|
1105 |
+
position: relative;
|
1106 |
+
display: inline-block;
|
1107 |
+
padding-left: 17px;
|
1108 |
+
text-decoration: none;
|
1109 |
+
font-weight: 600;
|
1110 |
+
}
|
1111 |
+
.compat-field-imagify .imagify-datas-actions-links {
|
1112 |
+
max-width: 300px;
|
1113 |
+
}
|
1114 |
+
.misc-pub-imagify .imagify-datas-actions-links {
|
1115 |
+
border-top: 2px solid #f2f2f2;
|
1116 |
+
padding-bottom: 5px;
|
1117 |
+
}
|
1118 |
+
/* Media edition */
|
1119 |
+
.compat-field-imagify .imagify-datas-actions-links a,
|
1120 |
+
.misc-pub-imagify .imagify-datas-actions-links a {
|
1121 |
+
font-size: 10px;
|
1122 |
+
float: left;
|
1123 |
+
width: 50%;
|
1124 |
+
}
|
1125 |
+
/* Medias list */
|
1126 |
+
.column-imagify_optimized_file .imagify-datas-actions-links a {
|
1127 |
+
margin: 0 .7em;
|
1128 |
+
padding-left: 15px;
|
1129 |
+
}
|
1130 |
+
.imagify-datas-actions-links a:only-child {
|
1131 |
+
float: none;
|
1132 |
+
width: auto;
|
1133 |
+
}
|
1134 |
+
.imagify-datas-details.is-open + .imagify-datas-actions-links {
|
1135 |
+
border-top-color: rgba(0,0,0,.075);
|
1136 |
+
}
|
1137 |
+
.imagify-datas-actions-links .dashicons {
|
1138 |
+
position: absolute;
|
1139 |
+
left: 0; top: 4px;
|
1140 |
+
width: 12px;
|
1141 |
+
margin-right: 2px;
|
1142 |
+
font-size: 11px;
|
1143 |
+
}
|
1144 |
+
|
1145 |
+
/*
|
1146 |
+
* == Bulk page
|
1147 |
+
*/
|
1148 |
+
|
1149 |
+
.imagify-title > h1 {
|
1150 |
+
padding: 0;
|
1151 |
+
}
|
1152 |
+
.imagify-title-right {
|
1153 |
+
display: table;
|
1154 |
+
float: right;
|
1155 |
+
margin-top: -10px;
|
1156 |
+
}
|
1157 |
+
.imagify-title-right p {
|
1158 |
+
margin: 0;
|
1159 |
+
}
|
1160 |
+
.imagify-title-right a {
|
1161 |
+
font-weight: bold;
|
1162 |
+
text-decoration: none;
|
1163 |
+
}
|
1164 |
+
.imagify-title-right > div {
|
1165 |
+
display: table-cell;
|
1166 |
+
vertical-align: middle;
|
1167 |
+
}
|
1168 |
+
.imagify-title-right .dashicons-arrow-down-alt2 {
|
1169 |
+
vertical-align: -4px;
|
1170 |
+
margin-left: 2px;
|
1171 |
+
}
|
1172 |
+
@media (max-width: 1200px) {
|
1173 |
+
.imagify-bulk .imagify-title {
|
1174 |
+
display: -webkit-box;
|
1175 |
+
display: -webkit-flex;
|
1176 |
+
display: -ms-flexbox;
|
1177 |
+
display: flex;
|
1178 |
+
-webkit-box-orient: vertical;
|
1179 |
+
-webkit-box-direction: normal;
|
1180 |
+
-webkit-flex-direction: column;
|
1181 |
+
-ms-flex-direction: column;
|
1182 |
+
flex-direction: column;
|
1183 |
+
}
|
1184 |
+
.imagify-title-right {
|
1185 |
+
-webkit-box-ordinal-group: 3;
|
1186 |
+
-webkit-order: 2;
|
1187 |
+
-ms-flex-order: 2;
|
1188 |
+
order: 2;
|
1189 |
+
margin-top: 20px;
|
1190 |
+
}
|
1191 |
+
}
|
1192 |
+
.imagify-account,
|
1193 |
+
.imagify-account-link {
|
1194 |
+
padding-right: 15px;
|
1195 |
+
}
|
1196 |
+
.imagify-sep-v {
|
1197 |
+
width: 1px;
|
1198 |
+
background: rgba(255, 255, 255, .2);
|
1199 |
+
}
|
1200 |
+
.imagify-credit-left {
|
1201 |
+
position: relative;
|
1202 |
+
min-width: 280px;
|
1203 |
+
padding-left: 15px;
|
1204 |
+
}
|
1205 |
+
.imagify-meteo-icon {
|
1206 |
+
display: inline-block;
|
1207 |
+
height: 38px;
|
1208 |
+
vertical-align: middle;
|
1209 |
+
margin-right: 10px;
|
1210 |
+
}
|
1211 |
+
.imagify-user-plan {
|
1212 |
+
color: #40b1d0;
|
1213 |
+
}
|
1214 |
+
|
1215 |
+
@media (max-width: 630px) {
|
1216 |
+
.imagify-title-right {
|
1217 |
+
display: block;
|
1218 |
+
width: auto;
|
1219 |
+
}
|
1220 |
+
.imagify-title-right > div {
|
1221 |
+
display: block;
|
1222 |
+
width: auto;
|
1223 |
+
margin-top: 10px;
|
1224 |
+
max-width: 100%;
|
1225 |
+
}
|
1226 |
+
.imagify-credit-left {
|
1227 |
+
padding-left: 0;
|
1228 |
+
}
|
1229 |
+
}
|
1230 |
+
/*
|
1231 |
+
.imagify-meteo-icon:after {
|
1232 |
+
opacity: 0;
|
1233 |
+
visibility: hidden;
|
1234 |
+
content: attr(data-title);
|
1235 |
+
position: absolute;
|
1236 |
+
top: 100%;
|
1237 |
+
left: 50%;
|
1238 |
+
font-size: 11px;
|
1239 |
+
line-height: 1.3;
|
1240 |
+
width: 150px;
|
1241 |
+
margin-left: -80px;
|
1242 |
+
padding: 6px 12px;
|
1243 |
+
background: #60758d;
|
1244 |
+
border-radius: 4px;
|
1245 |
+
-webkit-transition: opacity .3s;
|
1246 |
+
transition: opacity .3s;
|
1247 |
+
}
|
1248 |
+
.imagify-meteo-icon:hover:after,
|
1249 |
+
.imagify-meteo-icon:focus:after {
|
1250 |
+
opacity: 1;
|
1251 |
+
visibility: visible;
|
1252 |
+
}
|
1253 |
+
*/
|
1254 |
+
.imagify-meteo-title.imagify-meteo-title {
|
1255 |
+
color: #FFF;
|
1256 |
+
font-size: 17px;
|
1257 |
+
}
|
1258 |
+
.imagify-space-left {
|
1259 |
+
display: inline-block;
|
1260 |
+
min-height: 38px;
|
1261 |
+
min-width: 245px;
|
1262 |
+
vertical-align: middle;
|
1263 |
+
}
|
1264 |
+
.imagify-space-left > p {
|
1265 |
+
color: #FFF;
|
1266 |
+
}
|
1267 |
+
[class^="imagify-bar-"],
|
1268 |
+
#wp-admin-bar-imagify-profile [class^="imagify-bar-"] {
|
1269 |
+
position: relative;
|
1270 |
+
height: 15px;
|
1271 |
+
width: 100%;
|
1272 |
+
background: #60758D;
|
1273 |
+
color: #FFF;
|
1274 |
+
font-size: 10px;
|
1275 |
+
}
|
1276 |
+
.base-transparent {
|
1277 |
+
background: transparent;
|
1278 |
+
}
|
1279 |
+
[class^="imagify-bar-"].right-outside-number {
|
1280 |
+
-webkit-box-sizing: border-box;
|
1281 |
+
box-sizing: border-box;
|
1282 |
+
padding-right: 45px;
|
1283 |
+
}
|
1284 |
+
.right-outside-number .imagify-barnb {
|
1285 |
+
display: block;
|
1286 |
+
margin-right: -45px;
|
1287 |
+
text-align: right;
|
1288 |
+
font-weight: bold;
|
1289 |
+
line-height: 15px;
|
1290 |
+
}
|
1291 |
+
.imagify-progress-value,
|
1292 |
+
#wp-admin-bar-imagify-profile .imagify-progress-value {
|
1293 |
+
position: absolute;
|
1294 |
+
top: 0; right: 0; left: 0; bottom: 0;
|
1295 |
+
text-align: center;
|
1296 |
+
line-height: 13px;
|
1297 |
+
font-weight: bold;
|
1298 |
+
}
|
1299 |
+
.imagify-progress,
|
1300 |
+
#wp-admin-bar-imagify-profile .imagify-progress {
|
1301 |
+
height: 15px;
|
1302 |
+
}
|
1303 |
+
.imagify-bar-positive .imagify-progress {
|
1304 |
+
background: #8CC152;
|
1305 |
+
}
|
1306 |
+
.imagify-bar-positive .imagify-barnb {
|
1307 |
+
color: #8CC152;
|
1308 |
+
}
|
1309 |
+
.imagify-bar-negative .imagify-progress {
|
1310 |
+
background: #73818C;
|
1311 |
+
}
|
1312 |
+
.imagify-bar-negative .imagify-barnb {
|
1313 |
+
color: #73818C;
|
1314 |
+
}
|
1315 |
+
.imagify-bar-neutral .imagify-progress {
|
1316 |
+
background: #F5A623;
|
1317 |
+
}
|
1318 |
+
.imagify-space-left .imagify-bar-negative .imagify-progress {
|
1319 |
+
background: #D0021B;
|
1320 |
+
}
|
1321 |
+
|
1322 |
+
/* admin bar version */
|
1323 |
+
#wpadminbar #wp-admin-bar-imagify-profile * {
|
1324 |
+
line-height: 1.5;
|
1325 |
+
white-space: initial;
|
1326 |
+
}
|
1327 |
+
#wpadminbar #wp-admin-bar-imagify .ab-submenu {
|
1328 |
+
padding-bottom: 0;
|
1329 |
+
}
|
1330 |
+
#wpadminbar #wp-admin-bar-imagify-profile .ab-item {
|
1331 |
+
height: auto;
|
1332 |
+
padding: 0 13px;
|
1333 |
+
}
|
1334 |
+
#wpadminbar #wp-admin-bar-imagify-profile {
|
1335 |
+
min-width: 200px;
|
1336 |
+
padding: 15px 0 10px;
|
1337 |
+
margin-top: 0.7em;
|
1338 |
+
background: #222;
|
1339 |
+
}
|
1340 |
+
#wp-admin-bar-imagify .dashicons {
|
1341 |
+
font-family: "dashicons";
|
1342 |
+
font-size: 18px;
|
1343 |
+
vertical-align: middle;
|
1344 |
+
margin: 0 5px 0 0;
|
1345 |
+
}
|
1346 |
+
#wp-admin-bar-imagify .button-text {
|
1347 |
+
display: inline-block;
|
1348 |
+
vertical-align: middle;
|
1349 |
+
}
|
1350 |
+
#wp-admin-bar-imagify .imagify-abq-row {
|
1351 |
+
display: table;
|
1352 |
+
width: 100%;
|
1353 |
+
}
|
1354 |
+
#wp-admin-bar-imagify .imagify-abq-row + .imagify-abq-row {
|
1355 |
+
margin-top: .75em;
|
1356 |
+
}
|
1357 |
+
#wp-admin-bar-imagify .imagify-abq-row > * {
|
1358 |
+
display: table-cell;
|
1359 |
+
}
|
1360 |
+
#wp-admin-bar-imagify-profile .imagify-meteo-icon {
|
1361 |
+
padding-right: 7px;
|
1362 |
+
}
|
1363 |
+
#wp-admin-bar-imagify-profile .imagify-meteo-icon img {
|
1364 |
+
width: 37px;
|
1365 |
+
}
|
1366 |
+
#wp-admin-bar-imagify-profile .imagify-meteo-title {
|
1367 |
+
font-size: 17px;
|
1368 |
+
}
|
1369 |
+
#wp-admin-bar-imagify-profile .imagify-meteo-subs {
|
1370 |
+
color: #72889F;
|
1371 |
+
}
|
1372 |
+
#wpadminbar #wp-admin-bar-imagify-profile strong {
|
1373 |
+
font-weight: bold;
|
1374 |
+
}
|
1375 |
+
#wpadminbar #wp-admin-bar-imagify-profile .imagify-user-plan,
|
1376 |
+
#wpadminbar #wp-admin-bar-imagify-profile a {
|
1377 |
+
padding: 0;
|
1378 |
+
color: #40B1D0;
|
1379 |
+
}
|
1380 |
+
#wpadminbar #wp-admin-bar-imagify-profile .imagify-account-link {
|
1381 |
+
display: table;
|
1382 |
+
}
|
1383 |
+
#wpadminbar #wp-admin-bar-imagify-profile .imagify-account-link > * {
|
1384 |
+
display: table-cell;
|
1385 |
+
}
|
1386 |
+
#wpadminbar #wp-admin-bar-imagify-profile .imagify-space-left {
|
1387 |
+
max-width: 210px;
|
1388 |
+
min-width: 210px;
|
1389 |
+
width: 210px;
|
1390 |
+
}
|
1391 |
+
#wpadminbar #wp-admin-bar-imagify-profile .imagify-space-left p {
|
1392 |
+
font-size: 12px;
|
1393 |
+
}
|
1394 |
+
#wp-admin-bar-imagify-profile .imagify-error,
|
1395 |
+
#wp-admin-bar-imagify-profile .imagify-warning {
|
1396 |
+
padding: 10px;
|
1397 |
+
margin: 0 -13px -13px;
|
1398 |
+
}
|
1399 |
+
#wp-admin-bar-imagify-profile .imagify-error p + p,
|
1400 |
+
#wp-admin-bar-imagify-profile .imagify-warning p + p {
|
1401 |
+
margin-top: .5em;
|
1402 |
+
}
|
1403 |
+
#wp-admin-bar-imagify-profile .imagify-error p + p + p,
|
1404 |
+
#wp-admin-bar-imagify-profile .imagify-warning p + p + p {
|
1405 |
+
margin-top: 1em;
|
1406 |
+
}
|
1407 |
+
|
1408 |
+
.btn-ghost,
|
1409 |
+
#wpadminbar #wp-admin-bar-imagify-profile .btn-ghost {
|
1410 |
+
display: inline-block;
|
1411 |
+
height: auto;
|
1412 |
+
padding: 7px 10px;
|
1413 |
+
border: 1px solid #FFF;
|
1414 |
+
text-align: center;
|
1415 |
+
background: transparent;
|
1416 |
+
color: #FFF;
|
1417 |
+
border-radius: 3px;
|
1418 |
+
transition: all .275s;
|
1419 |
+
}
|
1420 |
+
|
1421 |
+
.btn-ghost:hover,
|
1422 |
+
.btn-ghost:focus,
|
1423 |
+
#wpadminbar #wp-admin-bar-imagify-profile .btn-ghost:hover,
|
1424 |
+
#wpadminbar #wp-admin-bar-imagify-profile .btn-ghost:focus {
|
1425 |
+
background: #FFF;
|
1426 |
+
color: #888;
|
1427 |
+
}
|
1428 |
+
|
1429 |
+
.txt-center {
|
1430 |
+
text-align: center;
|
1431 |
+
}
|
1432 |
+
|
1433 |
+
.imagify-list-dash li {
|
1434 |
+
position: relative;
|
1435 |
+
padding-left: 24px;
|
1436 |
+
}
|
1437 |
+
.imagify-list-dash li:before {
|
1438 |
+
content: "";
|
1439 |
+
position: absolute;
|
1440 |
+
left: 0; top: 9px;
|
1441 |
+
height: 1px; width: 12px;
|
1442 |
+
background: #5f758e;
|
1443 |
+
}
|
1444 |
+
|
1445 |
+
.imagify-sub-title.imagify-sub-title {
|
1446 |
+
font-size: 23px;
|
1447 |
+
background: #FFF;
|
1448 |
+
color: #2E3243;
|
1449 |
+
border-left: 1px solid #D9D9D9;
|
1450 |
+
border-right: 1px solid #D9D9D9;
|
1451 |
+
font-weight: lighter;
|
1452 |
+
}
|
1453 |
+
.imagify-sub-title .icon-bulk {
|
1454 |
+
margin-right: 10px;
|
1455 |
+
vertical-align: middle;
|
1456 |
+
}
|
1457 |
+
.imagify-sub-title .title-text {
|
1458 |
+
display: inline-block;
|
1459 |
+
line-height: 1;
|
1460 |
+
vertical-align: middle;
|
1461 |
+
}
|
1462 |
+
.imagify-bulk .imagify-settings-section {
|
1463 |
+
border: 1px solid #D9D9D9;
|
1464 |
+
border-top: 0;
|
1465 |
+
background: #F2F5F7;
|
1466 |
+
color: #4A4A4A;
|
1467 |
+
}
|
1468 |
+
.imagify-bulk .imagify-settings-section p,
|
1469 |
+
.imagify-bulk .imagify-settings-section li,
|
1470 |
+
.imagify-bulk .imagify-settings-section h3 {
|
1471 |
+
color: #4A4A4A;
|
1472 |
+
}
|
1473 |
+
.imagify-bulk .imagify-settings-section h3 {
|
1474 |
+
margin-bottom: 2em;
|
1475 |
+
}
|
1476 |
+
|
1477 |
+
.imagify-bulk-submit {
|
1478 |
+
margin-top: 4em;
|
1479 |
+
}
|
1480 |
+
#imagify-bulk-action {
|
1481 |
+
float: left;
|
1482 |
+
}
|
1483 |
+
#imagify-bulk-action + .imagify-tooltips {
|
1484 |
+
overflow: hidden;
|
1485 |
+
display: block;
|
1486 |
+
}
|
1487 |
+
.imagify-title .imagify-tooltips {
|
1488 |
+
position: absolute;
|
1489 |
+
top: 100%;
|
1490 |
+
left: 0;
|
1491 |
+
}
|
1492 |
+
.imagify-tooltips .icon-round {
|
1493 |
+
float: left;
|
1494 |
+
display: inline-block;
|
1495 |
+
width: 28px;
|
1496 |
+
height: 28px;
|
1497 |
+
border: 1px solid #FFF;
|
1498 |
+
margin-right: 8px;
|
1499 |
+
margin-bottom: 8px;
|
1500 |
+
font-size: 17px;
|
1501 |
+
font-style: italic;
|
1502 |
+
line-height: 29px;
|
1503 |
+
font-weight: bold;
|
1504 |
+
text-align: center;
|
1505 |
+
border-radius: 50%;
|
1506 |
+
}
|
1507 |
+
.imagify-tooltips .tooltip-content {
|
1508 |
+
display: block;
|
1509 |
+
position: relative;
|
1510 |
+
max-width: 250px;
|
1511 |
+
padding: 7px 15px 8px;
|
1512 |
+
background: #2e3242;
|
1513 |
+
color: #FFF;
|
1514 |
+
font-size: 10px;
|
1515 |
+
border-radius: 3px;
|
1516 |
+
}
|
1517 |
+
.imagify-tooltips.right .tooltip-content {
|
1518 |
+
margin-left: 12px;
|
1519 |
+
}
|
1520 |
+
.imagify-tooltips.bottom .tooltip-content {
|
1521 |
+
margin-top: 4px;
|
1522 |
+
}
|
1523 |
+
.imagify-inline-options label .tooltip-content {
|
1524 |
+
position: absolute;
|
1525 |
+
left: 0; right: 0;
|
1526 |
+
top: 100%;
|
1527 |
+
text-transform: none;
|
1528 |
+
font-size: 10px;
|
1529 |
+
letter-spacing: 0;
|
1530 |
+
text-align: center;
|
1531 |
+
}
|
1532 |
+
.imagify-tooltips .tooltip-content:after {
|
1533 |
+
content: "";
|
1534 |
+
position: absolute;
|
1535 |
+
}
|
1536 |
+
.imagify-tooltips.right .tooltip-content:after {
|
1537 |
+
top: 16px; left: -6px;
|
1538 |
+
border-right: 8px solid #2e3242;
|
1539 |
+
border-top: 6px solid transparent;
|
1540 |
+
border-bottom: 6px solid transparent;
|
1541 |
+
}
|
1542 |
+
.imagify-tooltips.bottom .tooltip-content:after {
|
1543 |
+
top: -5px; left: 50%;
|
1544 |
+
margin-left: -3px;
|
1545 |
+
border-bottom: 6px solid #2e3242;
|
1546 |
+
border-left: 6px solid transparent;
|
1547 |
+
border-right: 6px solid transparent;
|
1548 |
+
}
|
1549 |
+
.imagify-space-tooltips .tooltip-content {
|
1550 |
+
max-width: 280px;
|
1551 |
+
margin-top: 20px;
|
1552 |
+
margin-left: 0;
|
1553 |
+
padding: 5px 15px 5px;
|
1554 |
+
font-size: 13px;
|
1555 |
+
background: #40B1D0;
|
1556 |
+
box-shadow: 0 3px 0 #338EA6;
|
1557 |
+
}
|
1558 |
+
.imagify-space-tooltips .tooltip-content:after {
|
1559 |
+
top: -14px;
|
1560 |
+
left: 50%;
|
1561 |
+
margin-left: -7px;
|
1562 |
+
border: 0 none;
|
1563 |
+
border-bottom: 15px solid #40B1D0;
|
1564 |
+
border-left: 15px solid transparent;
|
1565 |
+
border-right: 15px solid transparent;
|
1566 |
+
}
|
1567 |
+
.tooltip-content.tooltip-table {
|
1568 |
+
display: table;
|
1569 |
+
width: 100%;
|
1570 |
+
}
|
1571 |
+
.tooltip-content.tooltip-table > * {
|
1572 |
+
display: table-cell;
|
1573 |
+
vertical-align: middle;
|
1574 |
+
}
|
1575 |
+
.tooltip-content .cell-icon {
|
1576 |
+
width: 28px;
|
1577 |
+
}
|
1578 |
+
.tooltip-content .cell-icon .icon {
|
1579 |
+
margin-bottom: 0;
|
1580 |
+
}
|
1581 |
+
.tooltip-content .cell-text {
|
1582 |
+
padding: 5px 10px 5px 0;
|
1583 |
+
line-height: 1.3;
|
1584 |
+
}
|
1585 |
+
.tooltip-content .cell-sep {
|
1586 |
+
width: 1px;
|
1587 |
+
background: rgba(255, 255, 255, .4);
|
1588 |
+
}
|
1589 |
+
.tooltip-content .cell-cta {
|
1590 |
+
padding-left: 10px;
|
1591 |
+
}
|
1592 |
+
.tooltip-content .cell-cta a {
|
1593 |
+
display: block;
|
1594 |
+
color: #FFF;
|
1595 |
+
width: 100%;
|
1596 |
+
height: 100%;
|
1597 |
+
white-space: nowrap;
|
1598 |
+
}
|
1599 |
+
|
1600 |
+
.imagify-number-you-optimized .number {
|
1601 |
+
float: left;
|
1602 |
+
margin-right: 15px;
|
1603 |
+
font-size: 36px;
|
1604 |
+
font-weight: bold;
|
1605 |
+
line-height: 1.1;
|
1606 |
+
}
|
1607 |
+
.imagify-number-you-optimized .text {
|
1608 |
+
display: block;
|
1609 |
+
overflow: hidden;
|
1610 |
+
font-size: 12px;
|
1611 |
+
}
|
1612 |
+
.imagify-number-you-optimized {
|
1613 |
+
padding-bottom: 0.85em;
|
1614 |
+
margin-bottom: 1.35em;
|
1615 |
+
overflow: hidden;
|
1616 |
+
border-bottom: 1px solid rgba(0,0,0, 0.05);
|
1617 |
+
}
|
1618 |
+
.imagify-bars p {
|
1619 |
+
font-weight: bold;
|
1620 |
+
font-size: 12px;
|
1621 |
+
margin-bottom: 0;
|
1622 |
+
}
|
1623 |
+
.imagify-bars + .imagify-number-you-optimized {
|
1624 |
+
border-bottom: 0;
|
1625 |
+
padding-top: 0.85em;
|
1626 |
+
}
|
1627 |
+
.imagify-bars + .imagify-number-you-optimized p {
|
1628 |
+
color: #46b1ce;
|
1629 |
+
}
|
1630 |
+
|
1631 |
+
/*
|
1632 |
+
* == Bulk table
|
1633 |
+
*/
|
1634 |
+
.imagify-bulk-table {
|
1635 |
+
margin-top: 2em;
|
1636 |
+
max-height: 600px;
|
1637 |
+
max-height: 60vh;
|
1638 |
+
overflow: auto;
|
1639 |
+
}
|
1640 |
+
.imagify-bulk-table table {
|
1641 |
+
width: 100%;
|
1642 |
+
border-spacing: 0;
|
1643 |
+
border-collapse: collapse;
|
1644 |
+
border: 1px solid #D3D3D3;
|
1645 |
+
}
|
1646 |
+
.imagify-bulk-table td {
|
1647 |
+
padding: 8px 15px;
|
1648 |
+
}
|
1649 |
+
.imagify-bulk-table thead tr,
|
1650 |
+
.imagify-bulk-table thead th {
|
1651 |
+
background: #2E3242;
|
1652 |
+
}
|
1653 |
+
.imagify-bulk-table tfoot tr,
|
1654 |
+
.imagify-bulk-table tfoot th {
|
1655 |
+
background: #73818C;
|
1656 |
+
}
|
1657 |
+
.imagify-bulk-table thead th {
|
1658 |
+
padding: 14px 15px;
|
1659 |
+
text-align: left;
|
1660 |
+
color: #F2F5F7;
|
1661 |
+
font-weight: bold;
|
1662 |
+
font-size: 14px;
|
1663 |
+
}
|
1664 |
+
.imagify-bulk-table tfoot td {
|
1665 |
+
padding: 14px 15px;
|
1666 |
+
color: #F9FAFA;
|
1667 |
+
}
|
1668 |
+
|
1669 |
+
.imagify-bulk-table tbody tr,
|
1670 |
+
.imagify-bulk-table tbody td {
|
1671 |
+
background: #FFF;
|
1672 |
+
}
|
1673 |
+
.imagify-bulk-table tbody tr:nth-child(odd),
|
1674 |
+
.imagify-bulk-table tbody tr:nth-child(odd) td {
|
1675 |
+
background: #F2F5F7;
|
1676 |
+
}
|
1677 |
+
|
1678 |
+
.imagify-bulk-table .imagify-row-progress {
|
1679 |
+
display: none;
|
1680 |
+
}
|
1681 |
+
|
1682 |
+
.imagify-bulk-table .imagify-row-progress,
|
1683 |
+
.imagify-bulk-table .imagify-row-progress td {
|
1684 |
+
height: 15px;
|
1685 |
+
padding: 0;
|
1686 |
+
}
|
1687 |
+
.imagify-bulk-table .imagify-no-uploaded-yet td {
|
1688 |
+
height: 200px;
|
1689 |
+
font-size: 17px;
|
1690 |
+
letter-spacing: .1em;
|
1691 |
+
word-spacing: .12em;
|
1692 |
+
vertical-align: middle;
|
1693 |
+
text-transform: uppercase;
|
1694 |
+
font-weight: bold;
|
1695 |
+
text-align: center;
|
1696 |
+
color: #999;
|
1697 |
+
background-color: #FFF;
|
1698 |
+
}
|
1699 |
+
|
1700 |
+
.imagify-row-complete {
|
1701 |
+
padding: 35px 20px;
|
1702 |
+
margin-top: 2em;
|
1703 |
+
background: #8BC34A;
|
1704 |
+
color: #FFF;
|
1705 |
+
text-shadow: 0 0 2px rgba(0,0,0,.1);
|
1706 |
+
}
|
1707 |
+
.imagify-row-complete .imagify-ac-chart {
|
1708 |
+
margin-top: 3px;
|
1709 |
+
}
|
1710 |
+
.imagify-row-complete p {
|
1711 |
+
color: #FFF;
|
1712 |
+
margin: 0;
|
1713 |
+
}
|
1714 |
+
|
1715 |
+
@-webkit-keyframes congrate {
|
1716 |
+
0% {
|
1717 |
+
opacity: 0;
|
1718 |
+
-webkit-transform: scale(1);
|
1719 |
+
}
|
1720 |
+
50% {
|
1721 |
+
-webkit-transform: scale(1.05);
|
1722 |
+
opacity: 1;
|
1723 |
+
}
|
1724 |
+
100% {
|
1725 |
+
-webkit-transform: scale(1);
|
1726 |
+
opacity: 1;
|
1727 |
+
}
|
1728 |
+
}
|
1729 |
+
|
1730 |
+
@keyframes congrate {
|
1731 |
+
0% {
|
1732 |
+
opacity: 0;
|
1733 |
+
transform: scale(1);
|
1734 |
+
}
|
1735 |
+
50% {
|
1736 |
+
transform: scale(1.05);
|
1737 |
+
opacity: 1;
|
1738 |
+
}
|
1739 |
+
100% {
|
1740 |
+
transform: scale(1);
|
1741 |
+
opacity: 1;
|
1742 |
+
}
|
1743 |
+
}
|
1744 |
+
|
1745 |
+
|
1746 |
+
.imagify-row-complete.done {
|
1747 |
+
-webkit-animation: congrate 500ms ease-in-out;
|
1748 |
+
animation: congrate 500ms ease-in-out;
|
1749 |
+
}
|
1750 |
+
|
1751 |
+
.imagify-all-complete {
|
1752 |
+
margin: 1.5em 0;
|
1753 |
+
}
|
1754 |
+
.imagify-all-complete > div {
|
1755 |
+
display: inline-block;
|
1756 |
+
vertical-align: middle;
|
1757 |
+
}
|
1758 |
+
.imagify-ac-report {
|
1759 |
+
min-width: 310px;
|
1760 |
+
}
|
1761 |
+
.imagify-ac-chart {
|
1762 |
+
width: 46px;
|
1763 |
+
height: 46px;
|
1764 |
+
float: left;
|
1765 |
+
margin: 0 20px 0 10px;
|
1766 |
+
}
|
1767 |
+
.imagify-ac-report-text {
|
1768 |
+
overflow: hidden;
|
1769 |
+
}
|
1770 |
+
.imagify-ac-report-text p {
|
1771 |
+
line-height: 1.3;
|
1772 |
+
}
|
1773 |
+
.imagify-ac-rt-big {
|
1774 |
+
font-weight: bold;
|
1775 |
+
font-size: 24px;
|
1776 |
+
letter-spacing: 0.15em;
|
1777 |
+
word-spacing: 0.15em;
|
1778 |
+
text-transform: uppercase;
|
1779 |
+
}
|
1780 |
+
.imagify-ac-share {
|
1781 |
+
text-align: right;
|
1782 |
+
}
|
1783 |
+
.imagify-ac-share-content {
|
1784 |
+
display: inline-block;
|
1785 |
+
padding: 10px 15px;
|
1786 |
+
background: rgba(255,255,255,.2);
|
1787 |
+
}
|
1788 |
+
.imagify-ac-share-content > * {
|
1789 |
+
display: inline-block;
|
1790 |
+
vertical-align: middle;
|
1791 |
+
}
|
1792 |
+
.imagify-bulk-table .imagify-ac-share-content p {
|
1793 |
+
margin-right: 5px;
|
1794 |
+
}
|
1795 |
+
.imagify-share-networks,
|
1796 |
+
.imagify-share-networks li {
|
1797 |
+
margin: 0;
|
1798 |
+
}
|
1799 |
+
.imagify-share-networks li {
|
1800 |
+
display: inline-block;
|
1801 |
+
}
|
1802 |
+
.imagify-share-networks a {
|
1803 |
+
display: inline-block;
|
1804 |
+
vertical-align: -7px;
|
1805 |
+
margin: 0 5px;
|
1806 |
+
text-decoration: none;
|
1807 |
+
color: #FFF;
|
1808 |
+
}
|
1809 |
+
|
1810 |
+
/* TD's width */
|
1811 |
+
.imagify-cell-filename {
|
1812 |
+
max-width: 200px;
|
1813 |
+
}
|
1814 |
+
.imagify-cell-status {
|
1815 |
+
max-width: 145px;
|
1816 |
+
}
|
1817 |
+
.imagify-cell-status .dashicons-warning {
|
1818 |
+
margin-right: 2px;
|
1819 |
+
}
|
1820 |
+
.imagify-cell-thumbnails {
|
1821 |
+
max-width: 120px;
|
1822 |
+
}
|
1823 |
+
|
1824 |
+
td.imagify-cell-filename {
|
1825 |
+
text-overflow: clip; /* ellipsis replace all the text by ... :`/ */
|
1826 |
+
white-space: nowrap;
|
1827 |
+
overflow: hidden;
|
1828 |
+
}
|
1829 |
+
.imagify-bulk-table td.imagify-cell-totaloriginal {
|
1830 |
+
padding-right: 78px;
|
1831 |
+
}
|
1832 |
+
|
1833 |
+
.imagiuploaded,
|
1834 |
+
.imagifilename {
|
1835 |
+
display: inline-block;
|
1836 |
+
vertical-align: middle;
|
1837 |
+
}
|
1838 |
+
.imagifilename {
|
1839 |
+
font-size: 12px;
|
1840 |
+
}
|
1841 |
+
.imagiuploaded {
|
1842 |
+
width: 33px;
|
1843 |
+
height: 33px;
|
1844 |
+
margin-right: 5px;
|
1845 |
+
margin-left: -8px;
|
1846 |
+
overflow: hidden;
|
1847 |
+
background: url(../images/upload-image.png) 0 0 no-repeat;
|
1848 |
+
background-size: cover;
|
1849 |
+
}
|
1850 |
+
.imagiuploaded img {
|
1851 |
+
max-widht: 100%;
|
1852 |
+
height: auto;
|
1853 |
+
}
|
1854 |
+
|
1855 |
+
.imagistatus {
|
1856 |
+
color: #8CA6B3;
|
1857 |
+
text-transform: uppercase;
|
1858 |
+
font-weight: bold;
|
1859 |
+
}
|
1860 |
+
.status-compressing {
|
1861 |
+
color: #46B1CE;
|
1862 |
+
}
|
1863 |
+
.status-error {
|
1864 |
+
color: #CE0B24;
|
1865 |
+
}
|
1866 |
+
.status-warning {
|
1867 |
+
color: #f5a623;
|
1868 |
+
}
|
1869 |
+
.status-complete {
|
1870 |
+
color: #8CC152;
|
1871 |
+
}
|
1872 |
+
.imagify-error {
|
1873 |
+
background: #D0021B;
|
1874 |
+
color: #FFF;
|
1875 |
+
}
|
1876 |
+
.imagify-warning,
|
1877 |
+
#wpadminbar .imagify-warning * {
|
1878 |
+
background: #f5a623;
|
1879 |
+
color: #FFF;
|
1880 |
+
text-shadow: 0 0 2px rgba(0, 0, 0, 0.2);
|
1881 |
+
}
|
1882 |
+
.imagify-bulk-table .imagify-cell-thumbnails {
|
1883 |
+
text-align: center;
|
1884 |
+
}
|
1885 |
+
.imagify-cell-percentage,
|
1886 |
+
.imagify-cell-savings {
|
1887 |
+
color: #46B1CE;
|
1888 |
+
font-weight: bold;
|
1889 |
+
}
|
1890 |
+
.imagify-cell-optimized {
|
1891 |
+
font-weight: bold;
|
1892 |
+
}
|
1893 |
+
|
1894 |
+
.imagify-cell-totaloriginal {
|
1895 |
+
text-align: right;
|
1896 |
+
}
|
1897 |
+
|
1898 |
+
/* icon rotate */
|
1899 |
+
.dashicons.rotate {
|
1900 |
+
-webkit-animation: icon-rotate 2.6s infinite linear;
|
1901 |
+
animation: icon-rotate 2.6s infinite linear;
|
1902 |
+
}
|
1903 |
+
.dashicons-admin-generic {
|
1904 |
+
transform-origin: 48.75% 51.75%;
|
1905 |
+
}
|
1906 |
+
|
1907 |
+
|
1908 |
+
/* Imagify Modal */
|
1909 |
+
.imagify-modal {
|
1910 |
+
display: flex;
|
1911 |
+
flex-direction: column;
|
1912 |
+
align-items: center;
|
1913 |
+
justify-content: center;
|
1914 |
+
}
|
1915 |
+
.js .imagify-modal {
|
1916 |
+
display: none;
|
1917 |
+
position: fixed;
|
1918 |
+
top: 0; right: 0; bottom: 0; left: 0;
|
1919 |
+
background-color: #1F2332;
|
1920 |
+
background-color: rgba(31,35,50,.95);
|
1921 |
+
z-index: 99999;
|
1922 |
+
}
|
1923 |
+
.imagify-modal-content {
|
1924 |
+
-webkit-box-sizing: border-box;
|
1925 |
+
-moz-box-sizing: border-box;
|
1926 |
+
box-sizing: border-box;
|
1927 |
+
position: relative;
|
1928 |
+
width: 800px;
|
1929 |
+
max-width: 95%;
|
1930 |
+
max-height: 90vw;
|
1931 |
+
overflow: auto;
|
1932 |
+
padding: 20px 25px;
|
1933 |
+
margin: 1em auto;
|
1934 |
+
background: #FFF;
|
1935 |
+
box-shadow: 1px 1px 4px rgba(0,0,0,.7);
|
1936 |
+
border-radius: 3px;
|
1937 |
+
}
|
1938 |
+
#imagify-visual-comparison .imagify-modal-content {
|
1939 |
+
max-width: 1400px;
|
1940 |
+
background: transparent;
|
1941 |
+
padding: 5px;
|
1942 |
+
box-shadow: none;
|
1943 |
+
border-radius: 0;
|
1944 |
+
}
|
1945 |
+
.imagify-modal .h2 {
|
1946 |
+
margin: .5em 0;
|
1947 |
+
color: #8ba6b4;
|
1948 |
+
font-weight: normal;
|
1949 |
+
font-size: 24px;
|
1950 |
+
letter-spacing: 0.075em;
|
1951 |
+
text-align: center;
|
1952 |
+
}
|
1953 |
+
.imagify-modal .h3 {
|
1954 |
+
color: #40b1d0;
|
1955 |
+
font-weight: normal;
|
1956 |
+
font-size: 18px;
|
1957 |
+
letter-spacing: 0.075em;
|
1958 |
+
text-align: center;
|
1959 |
+
}
|
1960 |
+
.text-justify {
|
1961 |
+
text-align: justify;
|
1962 |
+
}
|
1963 |
+
|
1964 |
+
.imagify-modal .close-btn {
|
1965 |
+
display: none;
|
1966 |
+
visibility: hidden;
|
1967 |
+
position: absolute;
|
1968 |
+
right: 20px; top: 20px;
|
1969 |
+
font-size: 1.2em;
|
1970 |
+
border: 0;
|
1971 |
+
background: transparent none;
|
1972 |
+
border-radius: 0;
|
1973 |
+
cursor: pointer;
|
1974 |
+
}
|
1975 |
+
.imagify-modal .close-btn:hover,
|
1976 |
+
.imagify-modal .close-btn:focus {
|
1977 |
+
color: #40b1d0;
|
1978 |
+
}
|
1979 |
+
.js .imagify-modal .close-btn {
|
1980 |
+
display: block;
|
1981 |
+
visibility: visible;
|
1982 |
+
}
|
1983 |
+
#imagify-visual-comparison .close-btn {
|
1984 |
+
top: 50px;
|
1985 |
+
right: 5px;
|
1986 |
+
width: 33px;
|
1987 |
+
height: 33px;
|
1988 |
+
padding: 1px 0 0 2px;
|
1989 |
+
border: 1px solid #F2F2F2;
|
1990 |
+
color: #F2F2F2;
|
1991 |
+
line-height: 19px;
|
1992 |
+
text-align: center;
|
1993 |
+
border-radius: 50%;
|
1994 |
+
}
|
1995 |
+
|
1996 |
+
.imagify-modal .imagify-comparison-title {
|
1997 |
+
font-size: 28px;
|
1998 |
+
margin-bottom: 1em;
|
1999 |
+
color: #F2F2F2;
|
2000 |
+
text-align: left;
|
2001 |
+
}
|
2002 |
+
.imagify-modal .imagify-comparison-title .twentytwenty-duo-buttons {
|
2003 |
+
position: static;
|
2004 |
+
margin: 0 10px 0 15px;
|
2005 |
+
}
|
2006 |
+
.imagify-comparison-title .twentytwenty-duo-buttons button {
|
2007 |
+
float: none;
|
2008 |
+
padding: 6px 12px;
|
2009 |
+
font-size: 16px;
|
2010 |
+
text-transform: none;
|
2011 |
+
border: 1px solid #40B1D0;
|
2012 |
+
color: #888899;
|
2013 |
+
letter-spacing: 0;
|
2014 |
+
}
|
2015 |
+
.imagify-comparison-title .twentytwenty-duo-buttons button:focus {
|
2016 |
+
outline: none;
|
2017 |
+
box-shadow: none;
|
2018 |
+
}
|
2019 |
+
.imagify-comparison-title .twentytwenty-duo-buttons .selected {
|
2020 |
+
border: 1px solid #40B1D0;
|
2021 |
+
color: #FFF;
|
2022 |
+
background: #40B1D0;
|
2023 |
+
}
|
2024 |
+
|
2025 |
+
.imagify-comparison-levels {
|
2026 |
+
margin: 15px 0;
|
2027 |
+
overflow: hidden;
|
2028 |
+
}
|
2029 |
+
.imagify-comparison-levels div {
|
2030 |
+
display: none;
|
2031 |
+
min-width: 175px;
|
2032 |
+
font-size: 11px;
|
2033 |
+
}
|
2034 |
+
.imagify-comparison-levels .imagify-chart,
|
2035 |
+
.imagify-comparison-levels .imagify-chart-container {
|
2036 |
+
width: 25px;
|
2037 |
+
float: none;
|
2038 |
+
margin: 0;
|
2039 |
+
}
|
2040 |
+
.imagify-c-level.go-left {
|
2041 |
+
float: left;
|
2042 |
+
}
|
2043 |
+
.imagify-c-level.go-right {
|
2044 |
+
float: right;
|
2045 |
+
}
|
2046 |
+
.imagify-c-level.go-right,
|
2047 |
+
.imagify-c-level.go-left {
|
2048 |
+
display: table;
|
2049 |
+
}
|
2050 |
+
.imagify-c-level .imagify-c-level-row {
|
2051 |
+
display: table-row;
|
2052 |
+
margin: 0;
|
2053 |
+
color: #FFF;
|
2054 |
+
}
|
2055 |
+
.imagify-c-level-row > span {
|
2056 |
+
display: table-cell;
|
2057 |
+
padding: 2px 0;
|
2058 |
+
}
|
2059 |
+
.imagify-c-level-row .value {
|
2060 |
+
text-align: right;
|
2061 |
+
padding-left: 5px;
|
2062 |
+
}
|
2063 |
+
.imagify-c-level-row .value.level {
|
2064 |
+
color: #40b1d0;
|
2065 |
+
}
|
2066 |
+
.imagify-c-level-row .value.size {
|
2067 |
+
color: #8bc34a;
|
2068 |
+
font-weight: bold;
|
2069 |
+
}
|
2070 |
+
.imagify-c-level-row .value .imagify-chart {
|
2071 |
+
top: 1px;
|
2072 |
+
}
|
2073 |
+
|
2074 |
+
@-webkit-keyframes icon-rotate {
|
2075 |
+
from {
|
2076 |
+
-webkit-transform: rotate(0deg);
|
2077 |
+
transform: rotate(0deg);
|
2078 |
+
}
|
2079 |
+
to {
|
2080 |
+
-webkit-transform: rotate(360deg);
|
2081 |
+
transform: rotate(360deg);
|
2082 |
+
}
|
2083 |
+
}
|
2084 |
+
@keyframes icon-rotate {
|
2085 |
+
from {
|
2086 |
+
transform: rotate(0deg);
|
2087 |
+
}
|
2088 |
+
to {
|
2089 |
+
transform: rotate(360deg);
|
2090 |
+
}
|
2091 |
+
}
|
2092 |
+
|
2093 |
+
.imagify-menu-bar-img {
|
2094 |
+
margin-top: 1em;
|
2095 |
+
}
|
2096 |
+
|
2097 |
+
/**
|
2098 |
+
* Visual Comparison
|
2099 |
+
*/
|
2100 |
+
.imagify-modal .loader {
|
2101 |
+
position: absolute;
|
2102 |
+
top: 50%;
|
2103 |
+
left: 50%;
|
2104 |
+
margin: -32px 0 0 -32px;
|
2105 |
+
opacity: 0;
|
2106 |
+
visibility: hidden;
|
2107 |
+
transition: opacity .4s;
|
2108 |
+
}
|
2109 |
+
.imagify-modal .loading .loader {
|
2110 |
+
visibility: visible;
|
2111 |
+
opacity: 1;
|
2112 |
+
}
|
2113 |
+
|
2114 |
+
.imagify-settings .imagify-visual-comparison-text {
|
2115 |
+
margin-top: 1em;
|
2116 |
+
color: #40b1d0;
|
2117 |
+
font-weight: bold;
|
2118 |
+
}
|
assets/css/admin.min.css
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
.imagify-plugins-error{overflow:hidden;padding-left:20px;list-style-type:disc}.imagify-plugins-error li{width:300px;line-height:30px}@media (max-width:570px){.imagify-plugins-error li{width:auto}}.imagify-notice-dismiss.notice-dismiss{text-decoration:none}.imagify-spinner{display:inline-block;width:20px;height:20px;margin-right:5px;vertical-align:middle;background:rgba(0,0,0,0) url("../images/spinner.gif") no-repeat scroll 0 0 / 20px 20px;opacity:0.7}.misc-pub-section.misc-pub-imagify h4{font-size:14px;margin-top:5px;margin-bottom:0}.imagify-sweet-alert button{margin-top:17px !important;height:45px !important;letter-spacing:3px;text-transform:uppercase !important;border-radius:3px !important;background-color:#40b1d0 !important;box-shadow:0 3px 0 #338ea6 !important}.imagify-sweet-alert button.cancel{background:#777 !important;box-shadow:0 3px 0 #444 !important}.imagify-sweet-alert-signup .sa-confirm-button-container{width:40%}.imagify-sweet-alert-signup button{width:100%;padding:0 !important}.imagify-sweet-alert .sa-input-error:before,.imagify-sweet-alert .sa-input-error:after,.imagify-sweet-alert .la-ball-fall{top:25% !important}#wpwrap{transition:all .4s}.stop-scrolling #wpwrap{filter:blur(2px)}.stop-scrolling #wpwrap #wpadminbar{top:-32px}.imagify-primary{color:#40b1d0}.imagify-secondary{color:#8cc152}#imagify-check-api-container{font-weight:bold}#imagify-check-api-container .dashicons{font-size:25px}#imagify-check-api-container .dashicons-no:before{color:#f06e57;vertical-align:-1px}#imagify-check-api-container .dashicons-yes:before{color:#8BC34A;vertical-align:-1px}.imagify-valid{color:#8BC34A}.imagify-chart{width:33.33%;position:relative}#imagify-overview-chart-legend{overflow:hidden}.imagify-doughnut-legend{margin-top:38px;list-style:none}.imagify-doughnut-legend li{display:block;padding-left:30px;position:relative;margin-bottom:15px;border-radius:5px;padding:3px 8px 2px 31px;font-size:14px;font-weight:600;cursor:default;-webkit-transition:background-color 200ms ease-in-out;-moz-transition:background-color 200ms ease-in-out;-o-transition:background-color 200ms ease-in-out;transition:background-color 200ms ease-in-out}.imagify-doughnut-legend li span{display:block;position:absolute;left:0;top:0;width:25px;height:25px;border-radius:50%}.imagify-chart{float:left;margin-bottom:20px}td .imagify-chart{float:none;margin-bottom:0}.imagify-chart-container{position:relative;width:180px;float:left;margin-right:40px}td .imagify-chart-container{width:18px;height:18px;float:none;margin-right:10px}td .imagify-chart{top:4px}.imagify-chart-percent{position:absolute;left:0;right:0;top:50%;margin-top:-14px;text-align:center;font-size:55px;font-weight:bold;color:#46B1CE}.imagify-chart-percent span{font-size:20px;vertical-align:super}.media_page_imagify-bulk-optimization .media-item{margin:0}.media_page_imagify-bulk-optimization .media-item .progress{float:none;width:100%;margin:0;background:#1F2331;box-shadow:0;border-radius:0}.media_page_imagify-bulk-optimization .media-item .percent{width:auto;padding:0 5px;line-height:1.85;font-size:12px}.media_page_imagify-bulk-optimization .media-item .progress,.media_page_imagify-bulk-optimization .media-item .percent{text-align:right}.media_page_imagify-bulk-optimization .media-item .progress .bar{width:1px;height:22px;margin-top:0;background:#46B1CE;border-radius:0;overflow:visible;-webkit-transition:width .5s;transition:width .5s}.imagify-settings a,.imagify-settings .button,.imagify-settings input,.imagify-welcome a,.imagify-welcome .button,.imagify-weolcome input{-webkit-transition:all .275s;transition:all .275s}.imagify-settings a{color:#40b1d0}.imagify-options-title{padding-bottom:.5em;border-bottom:3px solid #F2F2F2;font-size:13px;font-weight:500;text-transform:uppercase;letter-spacing:0.025em;color:#40b1d0}.imagify-settings,.imagify-settings p,.imagify-settings th{color:#5F758E}@media (max-width:782px){.imagify-settings .form-table th{padding-top:2em;padding-bottom:.5em}}.imagify-settings .form-table td{vertical-align:top}.imagify-settings .form-table th span{cursor:pointer}.imagify-middle th{padding-top:35px}.imagify-settings .button,.imagify-welcome .button,.imagify-notice .button{height:auto;padding:8px 20px;border:0 none;font-size:14px;font-weight:600;box-shadow:0 3px 0 rgba(0,0,0,.15)}.imagify-notice .button-mini{padding:2px 10px;font-size:13px}.button-primary.button-mini{padding:2px 10px}.imagify-settings .button.button-mini-flat{padding:3px 6px 5px;font-size:12px;box-shadow:none!important;line-height:1.2}.imagify-settings .button.button-mini-flat:hover,.imagify-settings .button.button-mini-flat:focus{box-shadow:none!important}.imagify-title .button-ghost.button-ghost{padding:2px 9px;border:1px solid #40B1D0;font-size:12px;font-weight:normal;color:#40B1D0;background:transparent}.imagify-title .button-ghost.button-ghost:hover,.imagify-title .button-ghost.button-ghost:focus{border-color:transparent;color:#000;background:#40B1D0}.button .dashicons{margin-right:5px;vertical-align:middle}.imagify-settings .button-primary.button-primary,.imagify-welcome .button-primary.button-primary{background:#40B1D0;color:#FFF;box-shadow:0 3px 0 rgba(51,142,166,1);text-shadow:0 -1px 1px #006799,1px 0 1px #006799,0 1px 1px #006799,-1px 0 1px #006799}.imagify-settings .button-primary:hover,.imagify-settings .button-primary:focus,.imagify-welcome .button-primary:hover,.imagify-welcome .button-primary:focus{background:rgb(51,142,166);box-shadow:0 3px 0 rgb(31,122,146)}.imagify-settings input[type="text"]{color:#4A4A4A;font-weight:600;box-shadow:none}.imagify-settings p.submit .button-primary{margin-left:240px}@media (max-width:850px){.imagify-settings p.submit .button-primary{margin-left:0px}.imagify-settings p.submit{text-align:center}}.imagify-title.imagify-title{position:relative;padding:30px 50px;font-size:23px;background:#2E3243;color:#FFF}.imagify-settings .imagify-title+.imagify-notice{margin:0;border-right:1px solid #D9D9D9;padding-top:15px;padding-bottom:15px}.imagify-logo{vertical-align:top}.imagify-sub-header,.imagify-sub-title.imagify-sub-title,.imagify-settings div.submit{margin:0;padding:20px;background:#F2F5F7}.imagify-bulk-info{margin:1em 1em 1em 240px;transition:margin .3s}@media (max-width:850px){.imagify-bulk-info{margin:1em}}.imagify-bulk-info p{display:inline-block;text-align:left;width:400px;max-width:100%;font-weight:bold}@media (min-width:1500px){.imagify-settings div.submit{display:table;width:100%}.imagify-settings div.submit >*{display:table-cell;vertical-align:middle}.imagify-bulk-info{padding:0 25px;text-align:right}}.imagify-settings div.submit{margin-top:2em;padding:20px 0}.imagify-sub-header th{text-align:right}.imagify-sub-header .form-table{margin:0}.imagify-sub-header th,.imagify-sub-header td{padding-top:0;padding-bottom:0}[for="api_key"]{padding-top:5px}.imagify-notice .imagify-rate-us.imagify-rate-us{position:relative;bottom:0;right:0;text-align:left}.imagify-notice .imagify-rate-us .stars{margin:0}.imagify-rate-us.imagify-rate-us{position:absolute;bottom:50%;right:20px;text-align:right;margin-bottom:-2.4em;color:#FFF}.imagify-rate-us a{color:#40B1D0}.imagify-rate-us .stars{display:inline-block;margin:2px 0 0 10px;text-decoration:none;letter-spacing:.2em;vertical-align:-1px}.imagify-rate-us .stars .dashicons:before{font-size:18px}.imagify-rate-us a:hover,.imagify-rate-us a:focus{color:#FEE102}@media (max-width:1220px){.imagify-rate-us.imagify-rate-us{position:static;margin-bottom:0;text-align:left}.imagify-rate-us.imagify-rate-us br{display:none}.imagify-rate-us .stars{display:block;margin-left:0}}.imagify-settings-section{padding:10px 20px}[id="imagify-settings"],.imagify-welcome .imagify-settings-section{border:1px solid #D9D9D9;border-top:0 none;background:#FFF}.imagify-br{line-height:2}.imagify-important{color:#F5A623}.imagify-info,.imagify-info a{color:#40B1D0;font-size:12px}.imagify-info{position:relative;display:inline-block;padding-left:25px;vertical-align:top}.imagify-info .dashicons{position:absolute;left:0;top:-1px}label+.imagify-info,label+.imagify-options-line,.imagify-visual-label{display:inline-block;max-width:70%;margin-left:15px;margin-top:2px!important;-webkit-transition:opacity .3s;transition:opacity .3s}.imagify-visual-label{vertical-align:-5px}label[for="imagify_sizes_full"]+.imagify-info{vertical-align:middle}.imagify-settings.imagify-settings [type="checkbox"]:not(:checked)+label+.imagify-options-line,.imagify-settings.imagify-settings [type="checkbox"]:not(:checked)+label .imagify-visual-label{opacity:.5}.imagify-settings.imagify-settings [type="checkbox"]:checked+label+.imagify-options-line,.imagify-settings.imagify-settings [type="checkbox"]:checked+label .imagify-visual-label{opacity:1}.imagify-checkbox-marged{max-width:500px;margin-left:45px}.imagify-settings.imagify-settings [type="checkbox"]:not(:checked),.imagify-settings.imagify-settings [type="checkbox"]:checked{opacity:0.01}.imagify-settings.imagify-settings [type="checkbox"]:not(:checked):focus,.imagify-settings.imagify-settings [type="checkbox"]:checked:focus{box-shadow:none!important;outline:none!important;border:0 none!important}.imagify-settings [type="checkbox"]:not(:checked)+label,.imagify-settings [type="checkbox"]:checked+label{position:relative;padding-left:6px;cursor:pointer;vertical-align:top}.imagify-settings [type="checkbox"]:not(:checked)+label:before,.imagify-settings [type="checkbox"]:checked+label:before{content:'';position:absolute;left:0;top:0;width:28px;height:28px;margin:0 0 0 -24px;border:2px solid #8BA6B4;background:#FFF;border-radius:4px}.imagify-settings [type="checkbox"]:not(:checked)+label:after,.imagify-settings [type="checkbox"]:checked+label:after{content:url('../images/check.svg');position:absolute;top:8px;left:-16px;-webkit-transition:all .2s;-moz-transition:all .2s;-ms-transition:all .2s;transition:all .2s}.imagify-settings [type="checkbox"][disabled]:not(:checked)+label:before,.imagify-settings [type="checkbox"][disabled]:checked+label:before{border-color:#ccc;background:#ddd}.imagify-settings [type="checkbox"]:not(:checked)+label:after{opacity:0;-webkit-transform:scale(0);-moz-transform:scale(0);-ms-transform:scale(0);transform:scale(0)}.imagify-settings [type="checkbox"]:checked+label:after{opacity:1;-webkit-transform:scale(1);-moz-transform:scale(1);-ms-transform:scale(1);transform:scale(1)}input[id^="imagify_sizes_"]:checked+label{font-weight:bold}.imagify-settings .mini[type="checkbox"]:not(:checked)+label:before,.imagify-settings .mini[type="checkbox"]:checked+label:before{width:15px;height:15px;border-width:1px;border-radius:2px;margin-top:0}.imagify-settings .mini[type="checkbox"]:not(:checked)+label:after,.imagify-settings .mini[type="checkbox"]:checked+label:after{content:url("../images/check-mini.svg");left:-19px;top:-1px}.imagify-settings [type="checkbox"]:not(:checked):focus+label:before,.imagify-settings [type="checkbox"]:checked:focus+label:before{border-style:dotted;border-color:#40b1d0}.imagify-inline-options{position:relative;display:table;width:100%;max-width:600px;border-collapse:collapse}.imagify-inline-options:after{content:"";display:table;clear:both}.imagify-inline-options input[type="radio"]:not(:checked),.imagify-inline-options input[type="radio"]:checked{position:absolute;left:5px;top:5px;display:none}.imagify-inline-options input[type="radio"]:not(:checked)+label,.imagify-inline-options input[type="radio"]:checked+label{position:relative;display:table-cell;padding:13px 10px;text-align:center;font-weight:600;font-size:16px;text-transform:uppercase;letter-spacing:0.1em;color:#FFF;background:#2E3243;border-left:1px solid rgba(255,255,255,0.2);box-shadow:0 -3px 0 rgba(0,0,0,0.1) inset,inset -1px 0 0 rgba(255,255,255,0.2);z-index:2;-webkit-transition:all .275s;transition:all .275s}.imagify-bulk-submit .imagify-inline-options input[type="radio"]:not(:checked)+label,.imagify-bulk-submit .imagify-inline-options input[type="radio"]:checked+label{margin-bottom:1.75em}.imagify-inline-options input[type="radio"]:not(:checked)+label:first-of-type,.imagify-inline-options input[type="radio"]:checked+label:first-of-type{border-radius:3px 0 0 3px}.imagify-inline-options input[type="radio"]:not(:checked)+label:last-of-type,.imagify-inline-options input[type="radio"]:checked+label:last-of-type{border-radius:0 3px 3px 0}.imagify-inline-options input[type="radio"]:checked+label{background:#8BC34A}.imagify-inline-options .imagify-info{margin-top:15px}.imagify-btn-info{display:block;font-size:0.7em;letter-spacing:0;line-height:1;text-transform:none}#describe-resize-larger input{width:5em}.imagify-col{overflow:hidden}.imagify-sidebar{float:right;width:280px;margin-left:25px}.imagify-sidebar-section{border:1px solid #BBB;background:#FFF}.imagify-sidebar-section+.imagify-sidebar-section{margin-top:2em}@media (max-width:760px){.imagify-settings{display:flex;flex-direction:column}.imagify-sidebar{order:2;float:none;width:auto;margin-left:0;margin-top:25px}.wp-media-products{text-align:center}.wp-media-products li{display:inline-block;width:100%;max-width:276px}}.imagify-sidebar-title{display:block;padding:20px 15px;border-bottom:1px solid #BBB;font-size:14px;font-weight:bold;color:#23282d;background:#F2F5F7}.imagify-sidebar-title img{vertical-align:top;margin-right:5px}.imagify-sidebar .wp-media-products{margin-top:0;margin-bottom:-.5em}.imagify-sidebar .wp-media-products .links{display:block;padding:85px 25px 24px;text-align:center;background-color:#2E3243;background-size:contain;background-repeat:no-repeat;background-position:50% 0;text-decoration:none}.imagify-sidebar .wp-media-products .links p{margin:1.5em auto;color:#FFF}.imagify-sidebar .wp-media-products .wprocket-link{background-image:linear-gradient(to bottom,rgba(59,30,78,0),rgba(59,30,78,0) 130px,rgba(59,30,78,1) 210px),url("../images/sidebar-wp-rocket.jpg");background-color:#3B1E4E;background-repeat:repeat-x,no-repeat}.imagify-sidebar-content{padding:10px 20px}.imagify-mark-styled{display:inline-block;padding:1px 2px 1px 4px;line-height:1.3;font-weight:bold;background:#F7A933;transform-origine:50% 50%;transform:rotateZ(-2deg) rotateX(-10deg) skewX(-2deg) skewY(-3deg);text-shadow:1px 1px 0 rgba(0,0,0,0.2)}.imagify-mark-styled span{display:inline-block;transform:rotateZ(2deg) rotateX(10deg) skewX(2deg) skewY(3deg)}.imagify-discount-code{margin:0.35em 0 .5em;display:block;font-size:2em;letter-spacing:.05em;font-weight:bold;text-align:center;text-shadow:1px 1px 0 rgba(0,0,0,0.2)}.imagify-big-text{font-size:15px;font-weight:bold}.imagify-big-text strong{font-size:20px}a.btn-rocket{display:block;font-size:1.15em;padding:12px;background:#F7A933;box-shadow:0 3px 0 #D69626;border-radius:3px;color:#FFF;text-transform:uppercase;font-weight:bold;text-shadow:1px 1px 0 rgba(0,0,0,0.2);text-decoration:none}a.btn-rocket:hover,a.btn-rocket:focus{background:darkorange;box-shadow:0 3px 0 darkorange}.imagify-welcome{margin:30px 20px 0 0}.imagify-welcome .baseline{display:inline-block;margin:.2em 0 0 2em;font-size:17px}.imagify-welcome .imagify-logo{vertical-align:middle}.imagify-welcome-remove{position:absolute;top:50%;right:15px;margin-top:-8px;color:#FFF;text-decoration:none}.imagify-columns{overflow:hidden;padding:15px 0;counter-reset:cols}.imagify-columns [class^="col-"]{float:left;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.imagify-columns .col-1-3{width:33.333%;padding-left:28px}.imagify-columns .col-1-2{width:50%;padding:0 20px}.imagify-columns .col-informations{width:41.6%;padding-right:30px}.imagify-columns .col-statistics{width:25%}@media (max-width:830px){.imagify-columns [class^="col-"]{float:none;margin-bottom:1.5em}.imagify-columns .col-1-3,.imagify-columns .col-1-2{width:auto;padding:0 28px;clear:both;padding-top:1em}}.imagify-columns [class^="col-"] img{float:left;margin-right:18px}.imagify-col-content{overflow:hidden}.imagify-col-title{margin:0 0 15px 0;font-size:23px}.counter .imagify-col-title:before{counter-increment:cols;content:counter(cols) ". ";color:#40B1D0}.imagify-col-desc{color:#5F758E;margin-bottom:2em}.imagify-notice.imagify-notice{position:relative;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;padding:0;margin:10px 20px 10px 2px;border:0 none;background:#2E3243;box-shadow:none;color:#FFF}@media (max-width:782px){.imagify-notice.imagify-notice,.imagify-welcome{margin-right:12px}}@media (max-width:450px){.imagify-notice.imagify-notice{-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column; -ms-flex-direction:column; flex-direction:column}}.wrap .imagify-notice{margin:5px 15px 2px;position:relative}.imagify-notice-logo{padding:18px 23px;background:#40B1D0}.updated .imagify-notice-logo{background:#8BC34A}.error .imagify-notice-logo{background:#D0021B}.imagify-notice-title{font-size:15px}.imagify-notice-content{padding:5px 23px}.imagify-notice-content.imagify-notice-content p{margin:0.65em 0}.imagify-notice a{color:#40B1D0}.imagify-notice a:hover,.imagify-notice a:focus{color:#FEE102}.imagify-notice code{background:rgba(0,0,0,0.4) none repeat scroll 0 0}.column-imagify_optimized_file.column-imagify_optimized_file{width:300px;text-align:center;vertical-align:middle}.column-imagify_optimized_file >*{max-width:235px;margin:0 auto}ul.imagify-datas-list.imagify-datas-list{margin:0 auto;color:#555;font-size:10px}.compat-field-imagify .label{vertical-align:top}.compat-field-imagify ul.imagify-datas-list{margin-top:7px;font-size:11px}ul.imagify-datas-list .big{font-size:12px;color:#40B1D0}.imagify-data-item{overflow:hidden}.imagify-data-item .imagify-chart{display:inline-block;top:1px;width:20px;vertical-align:middle;margin-bottom:0}li.imagify-data-item{clear:both;margin-bottom:2px}ul.imagify-datas-list .imagify-data-item span.data,ul.imagify-datas-list .imagify-data-item strong{float:left;width:50%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}ul.imagify-datas-list .imagify-data-item span.data{text-align:left;padding-right:5px}.compat-field-imagify .imagify-datas-list .imagify-data-item .data{width:130px;text-align:left;font-weight:bold}ul.imagify-datas-list .imagify-data-item strong{text-align:left;padding-left:5px}.imagify-datas-more-action.imagify-datas-more-action{margin:.4em auto;background:linear-gradient(to bottom,transparent,transparent 49%,rgba(0,0,0,.075) 50%,rgba(0,0,0,.075) 58%,transparent 58%,transparent)}.imagify-datas-more-action a{display:inline-block;padding:0 5px;background:#40B1D0;color:#FFF;text-transform:uppercase;font-size:9px;font-weight:bold;line-height:1.9;text-decoration:none}.imagify-datas-more-action a.is-open{background:#555}.imagify-datas-more-action a.is-open .dashicons{transform:rotate(180deg)}.imagify-datas-more-action a .dashicons{font-size:14px;vertical-align:middle;line-height:.8}.imagify-datas-more-action a .dashicons:before{vertical-align:middle;line-height:20px}.imagify-datas-more-action .the-text{display:inline-block;vertical-align:middle;height:20px;line-height:20px}ul.imagify-datas-details.imagify-datas-details{margin:.7em auto}.imagify-datas-details strong{color:#40B1D0}.imagify-datas-details .original{color:#555}.imagify-datas-actions-links{overflow:hidden;border-top:2px solid transparent;padding-top:5px;font-size:8px}.imagify-datas-actions-links a{position:relative;display:inline-block;padding-left:17px;text-decoration:none;font-weight:600}.compat-field-imagify .imagify-datas-actions-links{max-width:300px}.misc-pub-imagify .imagify-datas-actions-links{border-top:2px solid #f2f2f2;padding-bottom:5px}.compat-field-imagify .imagify-datas-actions-links a,.misc-pub-imagify .imagify-datas-actions-links a{font-size:10px;float:left;width:50%}.column-imagify_optimized_file .imagify-datas-actions-links a{margin:0 .7em;padding-left:15px}.imagify-datas-actions-links a:only-child{float:none;width:auto}.imagify-datas-details.is-open+.imagify-datas-actions-links{border-top-color:rgba(0,0,0,.075)}.imagify-datas-actions-links .dashicons{position:absolute;left:0;top:4px;width:12px;margin-right:2px;font-size:11px}.imagify-title >h1{padding:0}.imagify-title-right{display:table;float:right;margin-top:-10px}.imagify-title-right p{margin:0}.imagify-title-right a{font-weight:bold;text-decoration:none}.imagify-title-right >div{display:table-cell;vertical-align:middle}.imagify-title-right .dashicons-arrow-down-alt2{vertical-align:-4px;margin-left:2px}@media (max-width:1200px){.imagify-bulk .imagify-title{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column}.imagify-title-right{-webkit-box-ordinal-group:3;-webkit-order:2;-ms-flex-order:2;order:2;margin-top:20px}}.imagify-account,.imagify-account-link{padding-right:15px}.imagify-sep-v{width:1px;background:rgba(255,255,255,.2)}.imagify-credit-left{position:relative;min-width:280px;padding-left:15px}.imagify-meteo-icon{display:inline-block;height:38px;vertical-align:middle;margin-right:10px}.imagify-user-plan{color:#40b1d0}@media (max-width:630px){.imagify-title-right{display:block;width:auto}.imagify-title-right >div{display:block;width:auto;margin-top:10px;max-width:100%}.imagify-credit-left{padding-left:0}}.imagify-meteo-title.imagify-meteo-title{color:#FFF;font-size:17px}.imagify-space-left{display:inline-block;min-height:38px;min-width:245px;vertical-align:middle}.imagify-space-left >p{color:#FFF}[class^="imagify-bar-"],#wp-admin-bar-imagify-profile [class^="imagify-bar-"]{position:relative;height:15px;width:100%;background:#60758D;color:#FFF;font-size:10px}.base-transparent{background:transparent}[class^="imagify-bar-"].right-outside-number{-webkit-box-sizing:border-box;box-sizing:border-box;padding-right:45px}.right-outside-number .imagify-barnb{display:block;margin-right:-45px;text-align:right;font-weight:bold;line-height:15px}.imagify-progress-value,#wp-admin-bar-imagify-profile .imagify-progress-value{position:absolute;top:0;right:0;left:0;bottom:0;text-align:center;line-height:13px;font-weight:bold}.imagify-progress,#wp-admin-bar-imagify-profile .imagify-progress{height:15px}.imagify-bar-positive .imagify-progress{background:#8CC152}.imagify-bar-positive .imagify-barnb{color:#8CC152}.imagify-bar-negative .imagify-progress{background:#73818C}.imagify-bar-negative .imagify-barnb{color:#73818C}.imagify-bar-neutral .imagify-progress{background:#F5A623}.imagify-space-left .imagify-bar-negative .imagify-progress{background:#D0021B}#wpadminbar #wp-admin-bar-imagify-profile *{line-height:1.5;white-space:initial}#wpadminbar #wp-admin-bar-imagify .ab-submenu{padding-bottom:0}#wpadminbar #wp-admin-bar-imagify-profile .ab-item{height:auto;padding:0 13px}#wpadminbar #wp-admin-bar-imagify-profile{min-width:200px;padding:15px 0 10px;margin-top:0.7em;background:#222}#wp-admin-bar-imagify .dashicons{font-family:"dashicons";font-size:18px;vertical-align:middle;margin:0 5px 0 0}#wp-admin-bar-imagify .button-text{display:inline-block;vertical-align:middle}#wp-admin-bar-imagify .imagify-abq-row{display:table;width:100%}#wp-admin-bar-imagify .imagify-abq-row+.imagify-abq-row{margin-top:.75em}#wp-admin-bar-imagify .imagify-abq-row >*{display:table-cell}#wp-admin-bar-imagify-profile .imagify-meteo-icon{padding-right:7px}#wp-admin-bar-imagify-profile .imagify-meteo-icon img{width:37px}#wp-admin-bar-imagify-profile .imagify-meteo-title{font-size:17px}#wp-admin-bar-imagify-profile .imagify-meteo-subs{color:#72889F}#wpadminbar #wp-admin-bar-imagify-profile strong{font-weight:bold}#wpadminbar #wp-admin-bar-imagify-profile .imagify-user-plan,#wpadminbar #wp-admin-bar-imagify-profile a{padding:0;color:#40B1D0}#wpadminbar #wp-admin-bar-imagify-profile .imagify-account-link{display:table}#wpadminbar #wp-admin-bar-imagify-profile .imagify-account-link >* {display:table-cell}#wpadminbar #wp-admin-bar-imagify-profile .imagify-space-left{max-width:210px;min-width:210px;width:210px}#wpadminbar #wp-admin-bar-imagify-profile .imagify-space-left p{font-size:12px}#wp-admin-bar-imagify-profile .imagify-error,#wp-admin-bar-imagify-profile .imagify-warning{padding:10px;margin:0 -13px -13px}#wp-admin-bar-imagify-profile .imagify-error p+p,#wp-admin-bar-imagify-profile .imagify-warning p+p{margin-top:.5em}#wp-admin-bar-imagify-profile .imagify-error p+p+p,#wp-admin-bar-imagify-profile .imagify-warning p+p+p{margin-top:1em}.btn-ghost,#wpadminbar #wp-admin-bar-imagify-profile .btn-ghost{display:inline-block;height:auto;padding:7px 10px;border:1px solid #FFF;text-align:center;background:transparent;color:#FFF;border-radius:3px;transition:all .275s}.btn-ghost:hover,.btn-ghost:focus,#wpadminbar #wp-admin-bar-imagify-profile .btn-ghost:hover,#wpadminbar #wp-admin-bar-imagify-profile .btn-ghost:focus{background:#FFF;color:#888}.txt-center{text-align:center}.imagify-list-dash li{position:relative;padding-left:24px}.imagify-list-dash li:before{content:"";position:absolute;left:0;top:9px;height:1px;width:12px;background:#5f758e}.imagify-sub-title.imagify-sub-title{font-size:23px;background:#FFF;color:#2E3243;border-left:1px solid #D9D9D9;border-right:1px solid #D9D9D9;font-weight:lighter}.imagify-sub-title .icon-bulk{margin-right:10px;vertical-align:middle}.imagify-sub-title .title-text{display:inline-block;line-height:1;vertical-align:middle}.imagify-bulk .imagify-settings-section{border:1px solid #D9D9D9;border-top:0;background:#F2F5F7;color:#4A4A4A}.imagify-bulk .imagify-settings-section p,.imagify-bulk .imagify-settings-section li,.imagify-bulk .imagify-settings-section h3{color:#4A4A4A}.imagify-bulk .imagify-settings-section h3{margin-bottom:2em}.imagify-bulk-submit{margin-top:4em}#imagify-bulk-action{float:left}#imagify-bulk-action+.imagify-tooltips{overflow:hidden;display:block}.imagify-title .imagify-tooltips{position:absolute;top:100%;left:0}.imagify-tooltips .icon-round{float:left;display:inline-block;width:28px;height:28px;border:1px solid #FFF;margin-right:8px;margin-bottom:8px;font-size:17px;font-style:italic;line-height:29px;font-weight:bold;text-align:center;border-radius:50%}.imagify-tooltips .tooltip-content{display:block;position:relative;max-width:250px;padding:7px 15px 8px;background:#2e3242;color:#FFF;font-size:10px;border-radius:3px}.imagify-tooltips.right .tooltip-content{margin-left:12px}.imagify-tooltips.bottom .tooltip-content{margin-top:4px}.imagify-inline-options label .tooltip-content{position:absolute;left:0;right:0;top:100%;text-transform:none;font-size:10px;letter-spacing:0;text-align:center}.imagify-tooltips .tooltip-content:after{content:"";position:absolute}.imagify-tooltips.right .tooltip-content:after{top:16px;left:-6px;border-right:8px solid #2e3242;border-top:6px solid transparent;border-bottom:6px solid transparent}.imagify-tooltips.bottom .tooltip-content:after{top:-5px;left:50%;margin-left:-3px;border-bottom:6px solid #2e3242;border-left:6px solid transparent;border-right:6px solid transparent}.imagify-space-tooltips .tooltip-content{max-width:280px;margin-top:20px;margin-left:0;padding:5px 15px 5px;font-size:13px;background:#40B1D0;box-shadow:0 3px 0 #338EA6}.imagify-space-tooltips .tooltip-content:after{top:-14px;left:50%;margin-left:-7px;border:0 none;border-bottom:15px solid #40B1D0;border-left:15px solid transparent;border-right:15px solid transparent}.tooltip-content.tooltip-table{display:table;width:100%}.tooltip-content.tooltip-table >*{display:table-cell;vertical-align:middle}.tooltip-content .cell-icon{width:28px}.tooltip-content .cell-icon .icon{margin-bottom:0}.tooltip-content .cell-text{padding:5px 10px 5px 0;line-height:1.3}.tooltip-content .cell-sep{width:1px;background:rgba(255,255,255,.4)}.tooltip-content .cell-cta{padding-left:10px}.tooltip-content .cell-cta a{display:block;color:#FFF;width:100%;height:100%;white-space:nowrap}.imagify-number-you-optimized .number{float:left;margin-right:15px;font-size:36px;font-weight:bold;line-height:1.1}.imagify-number-you-optimized .text{display:block;overflow:hidden;font-size:12px}.imagify-number-you-optimized{padding-bottom:0.85em;margin-bottom:1.35em;overflow:hidden;border-bottom:1px solid rgba(0,0,0,0.05)}.imagify-bars p{font-weight:bold;font-size:12px;margin-bottom:0}.imagify-bars+.imagify-number-you-optimized{border-bottom:0;padding-top:0.85em}.imagify-bars+.imagify-number-you-optimized p{color:#46b1ce}.imagify-bulk-table{margin-top:2em;max-height:600px;max-height:60vh;overflow:auto}.imagify-bulk-table table{width:100%;border-spacing:0;border-collapse:collapse;border:1px solid #D3D3D3}.imagify-bulk-table td{padding:8px 15px}.imagify-bulk-table thead tr,.imagify-bulk-table thead th{background:#2E3242}.imagify-bulk-table tfoot tr,.imagify-bulk-table tfoot th{background:#73818C}.imagify-bulk-table thead th{padding:14px 15px;text-align:left;color:#F2F5F7;font-weight:bold;font-size:14px}.imagify-bulk-table tfoot td{padding:14px 15px;color:#F9FAFA}.imagify-bulk-table tbody tr,.imagify-bulk-table tbody td{background:#FFF}.imagify-bulk-table tbody tr:nth-child(odd),.imagify-bulk-table tbody tr:nth-child(odd) td{background:#F2F5F7}.imagify-bulk-table .imagify-row-progress{display:none}.imagify-bulk-table .imagify-row-progress,.imagify-bulk-table .imagify-row-progress td{height:15px;padding:0}.imagify-bulk-table .imagify-no-uploaded-yet td{height:200px;font-size:17px;letter-spacing:.1em;word-spacing:.12em;vertical-align:middle;text-transform:uppercase;font-weight:bold;text-align:center;color:#999;background-color:#FFF}.imagify-row-complete{padding:35px 20px;margin-top:2em;background:#8BC34A;color:#FFF;text-shadow:0 0 2px rgba(0,0,0,.1)}.imagify-row-complete .imagify-ac-chart{margin-top:3px}.imagify-row-complete p{color:#FFF;margin:0}@-webkit-keyframes congrate{ 0%{opacity:0;-webkit-transform:scale(1)} 50%{-webkit-transform:scale(1.05);opacity:1} 100%{-webkit-transform:scale(1);opacity:1}}​@keyframes congrate{ 0%{opacity:0;transform:scale(1)} 50%{transform:scale(1.05);opacity:1} 100%{transform:scale(1);opacity:1}}.imagify-row-complete.done{-webkit-animation:congrate 500ms ease-in-out;animation:congrate 500ms ease-in-out}.imagify-all-complete{margin:1.5em 0}.imagify-all-complete >div{display:inline-block;vertical-align:middle}.imagify-ac-report{min-width:310px}.imagify-ac-chart{width:46px;height:46px;float:left;margin:0 20px 0 10px}.imagify-ac-report-text{overflow:hidden}.imagify-ac-report-text p{line-height:1.3}.imagify-ac-rt-big{font-weight:bold;font-size:24px;letter-spacing:0.15em;word-spacing:0.15em;text-transform:uppercase}.imagify-ac-share{text-align:right}.imagify-ac-share-content{display:inline-block;padding:10px 15px;background:rgba(255,255,255,.2)}.imagify-ac-share-content >*{display:inline-block;vertical-align:middle}.imagify-bulk-table .imagify-ac-share-content p{margin-right:5px}.imagify-share-networks,.imagify-share-networks li{margin:0}.imagify-share-networks li{display:inline-block}.imagify-share-networks a{display:inline-block;vertical-align:-7px;margin:0 5px;text-decoration:none;color:#FFF}.imagify-cell-filename{max-width:200px}.imagify-cell-status{max-width:145px}.imagify-cell-status .dashicons-warning{margin-right:2px}.imagify-cell-thumbnails{max-width:120px}td.imagify-cell-filename{text-overflow:clip;white-space:nowrap;overflow:hidden}.imagify-bulk-table td.imagify-cell-totaloriginal{padding-right:78px}.imagiuploaded,.imagifilename{display:inline-block;vertical-align:middle}.imagifilename{font-size:12px}.imagiuploaded{width:33px;height:33px;margin-right:5px;margin-left:-8px;overflow:hidden;background:url(../images/upload-image.png) 0 0 no-repeat;background-size:cover}.imagiuploaded img{max-widht:100%;height:auto}.imagistatus{color:#8CA6B3;text-transform:uppercase;font-weight:bold}.status-compressing{color:#46B1CE}.status-error{color:#CE0B24}.status-warning{color:#f5a623}.status-complete{color:#8CC152}.imagify-error{background:#D0021B;color:#FFF}.imagify-warning,#wpadminbar .imagify-warning *{background:#f5a623;color:#FFF;text-shadow:0 0 2px rgba(0,0,0,0.2)}.imagify-bulk-table .imagify-cell-thumbnails{text-align:center}.imagify-cell-percentage,.imagify-cell-savings{color:#46B1CE;font-weight:bold}.imagify-cell-optimized{font-weight:bold}.imagify-cell-totaloriginal{text-align:right}.dashicons.rotate{-webkit-animation:icon-rotate 2.6s infinite linear;animation:icon-rotate 2.6s infinite linear}.dashicons-admin-generic{transform-origin:48.75% 51.75%}.imagify-modal{display:flex;flex-direction:column;align-items:center;justify-content:center}.js .imagify-modal{display:none;position:fixed;top:0;right:0;bottom:0;left:0;background-color:#1F2332;background-color:rgba(31,35,50,.95);z-index:99999}.imagify-modal-content{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;position:relative;width:800px;max-width:95%;max-height:90vw;overflow:auto;padding:20px 25px;margin:1em auto;background:#FFF;box-shadow:1px 1px 4px rgba(0,0,0,.7);border-radius:3px}#imagify-visual-comparison .imagify-modal-content{max-width:1400px;background:transparent;padding:5px;box-shadow:none;border-radius:0}.imagify-modal .h2{margin:.5em 0;color:#8ba6b4;font-weight:normal;font-size:24px;letter-spacing:0.075em;text-align:center}.imagify-modal .h3{color:#40b1d0;font-weight:normal;font-size:18px;letter-spacing:0.075em;text-align:center}.text-justify{text-align:justify}.imagify-modal .close-btn{display:none;visibility:hidden;position:absolute;right:20px;top:20px;font-size:1.2em;border:0;background:transparent none;border-radius:0;cursor:pointer}.imagify-modal .close-btn:hover,.imagify-modal .close-btn:focus{color:#40b1d0}.js .imagify-modal .close-btn{display:block;visibility:visible}#imagify-visual-comparison .close-btn{top:50px;right:5px;width:33px;height:33px;padding:1px 0 0 2px;border:1px solid #F2F2F2;color:#F2F2F2;line-height:19px;text-align:center;border-radius:50%}.imagify-modal .imagify-comparison-title{font-size:28px;margin-bottom:1em;color:#F2F2F2;text-align:left}.imagify-modal .imagify-comparison-title .twentytwenty-duo-buttons{position:static;margin:0 10px 0 15px}.imagify-comparison-title .twentytwenty-duo-buttons button{float:none;padding:6px 12px;font-size:16px;text-transform:none;border:1px solid #40B1D0;color:#889;letter-spacing:0}.imagify-comparison-title .twentytwenty-duo-buttons button:focus{outline:none;box-shadow:none}.imagify-comparison-title .twentytwenty-duo-buttons .selected{border:1px solid #40B1D0;color:#FFF;background:#40B1D0}.imagify-comparison-levels{margin:15px 0;overflow:hidden}.imagify-comparison-levels div{display:none;min-width:175px;font-size:11px}.imagify-comparison-levels .imagify-chart,.imagify-comparison-levels .imagify-chart-container{width:25px;float:none;margin:0}.imagify-c-level.go-left{float:left}.imagify-c-level.go-right{float:right}.imagify-c-level.go-right,.imagify-c-level.go-left{display:table}.imagify-c-level .imagify-c-level-row{display:table-row;margin:0;color:#FFF}.imagify-c-level-row >span{display:table-cell;padding:2px 0}.imagify-c-level-row .value{text-align:right;padding-left:5px}.imagify-c-level-row .value.level{color:#40b1d0}.imagify-c-level-row .value.size{color:#8bc34a;font-weight:bold}.imagify-c-level-row .value .imagify-chart{top:1px}@-webkit-keyframes icon-rotate{from{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes icon-rotate{from{transform:rotate(0deg)}to{transform:rotate(360deg)}}.imagify-menu-bar-img{margin-top:1em}.imagify-modal .loader{position:absolute;top:50%;left:50%;margin:-32px 0 0 -32px;opacity:0;visibility:hidden;transition:opacity .4s}.imagify-modal .loading .loader{visibility:visible;opacity:1}.imagify-settings .imagify-visual-comparison-text{margin-top:1em;color:#40b1d0;font-weight:bold}
|
assets/css/sweetalert.css
ADDED
@@ -0,0 +1,930 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
body.stop-scrolling {
|
2 |
+
height: 100%;
|
3 |
+
overflow: hidden; }
|
4 |
+
|
5 |
+
.sweet-overlay {
|
6 |
+
background-color: black;
|
7 |
+
/* IE8 */
|
8 |
+
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=40)";
|
9 |
+
/* IE8 */
|
10 |
+
background-color: rgba(0, 0, 0, 0.4);
|
11 |
+
position: fixed;
|
12 |
+
left: 0;
|
13 |
+
right: 0;
|
14 |
+
top: 0;
|
15 |
+
bottom: 0;
|
16 |
+
display: none;
|
17 |
+
z-index: 10000; }
|
18 |
+
|
19 |
+
.sweet-alert {
|
20 |
+
background-color: white;
|
21 |
+
font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
|
22 |
+
width: 478px;
|
23 |
+
padding: 17px;
|
24 |
+
border-radius: 5px;
|
25 |
+
text-align: center;
|
26 |
+
position: fixed;
|
27 |
+
left: 50%;
|
28 |
+
top: 50%;
|
29 |
+
margin-left: -256px;
|
30 |
+
margin-top: -200px;
|
31 |
+
overflow: hidden;
|
32 |
+
display: none;
|
33 |
+
z-index: 99999; }
|
34 |
+
@media all and (max-width: 540px) {
|
35 |
+
.sweet-alert {
|
36 |
+
width: auto;
|
37 |
+
margin-left: 0;
|
38 |
+
margin-right: 0;
|
39 |
+
left: 15px;
|
40 |
+
right: 15px; } }
|
41 |
+
.sweet-alert h2 {
|
42 |
+
color: #575757;
|
43 |
+
font-size: 30px;
|
44 |
+
text-align: center;
|
45 |
+
font-weight: 600;
|
46 |
+
text-transform: none;
|
47 |
+
position: relative;
|
48 |
+
margin: 25px 0;
|
49 |
+
padding: 0;
|
50 |
+
line-height: 40px;
|
51 |
+
display: block; }
|
52 |
+
.sweet-alert p {
|
53 |
+
color: #797979;
|
54 |
+
font-size: 16px;
|
55 |
+
text-align: center;
|
56 |
+
font-weight: 300;
|
57 |
+
position: relative;
|
58 |
+
text-align: inherit;
|
59 |
+
float: none;
|
60 |
+
margin: 0;
|
61 |
+
padding: 0;
|
62 |
+
line-height: normal; }
|
63 |
+
.sweet-alert fieldset {
|
64 |
+
border: none;
|
65 |
+
position: relative; }
|
66 |
+
.sweet-alert .sa-error-container {
|
67 |
+
background-color: #f1f1f1;
|
68 |
+
margin-left: -17px;
|
69 |
+
margin-right: -17px;
|
70 |
+
overflow: hidden;
|
71 |
+
padding: 0 10px;
|
72 |
+
max-height: 0;
|
73 |
+
webkit-transition: padding 0.15s, max-height 0.15s;
|
74 |
+
transition: padding 0.15s, max-height 0.15s; }
|
75 |
+
.sweet-alert .sa-error-container.show {
|
76 |
+
padding: 10px 0;
|
77 |
+
max-height: 100px;
|
78 |
+
webkit-transition: padding 0.2s, max-height 0.2s;
|
79 |
+
transition: padding 0.25s, max-height 0.25s; }
|
80 |
+
.sweet-alert .sa-error-container .icon {
|
81 |
+
display: inline-block;
|
82 |
+
width: 24px;
|
83 |
+
height: 24px;
|
84 |
+
border-radius: 50%;
|
85 |
+
background-color: #ea7d7d;
|
86 |
+
color: white;
|
87 |
+
line-height: 24px;
|
88 |
+
text-align: center;
|
89 |
+
margin-right: 3px; }
|
90 |
+
.sweet-alert .sa-error-container p {
|
91 |
+
display: inline-block; }
|
92 |
+
.sweet-alert .sa-input-error {
|
93 |
+
position: absolute;
|
94 |
+
top: 29px;
|
95 |
+
right: 26px;
|
96 |
+
width: 20px;
|
97 |
+
height: 20px;
|
98 |
+
opacity: 0;
|
99 |
+
-webkit-transform: scale(0.5);
|
100 |
+
transform: scale(0.5);
|
101 |
+
-webkit-transform-origin: 50% 50%;
|
102 |
+
transform-origin: 50% 50%;
|
103 |
+
-webkit-transition: all 0.1s;
|
104 |
+
transition: all 0.1s; }
|
105 |
+
.sweet-alert .sa-input-error::before, .sweet-alert .sa-input-error::after {
|
106 |
+
content: "";
|
107 |
+
width: 20px;
|
108 |
+
height: 6px;
|
109 |
+
background-color: #f06e57;
|
110 |
+
border-radius: 3px;
|
111 |
+
position: absolute;
|
112 |
+
top: 50%;
|
113 |
+
margin-top: -4px;
|
114 |
+
left: 50%;
|
115 |
+
margin-left: -9px; }
|
116 |
+
.sweet-alert .sa-input-error::before {
|
117 |
+
-webkit-transform: rotate(-45deg);
|
118 |
+
transform: rotate(-45deg); }
|
119 |
+
.sweet-alert .sa-input-error::after {
|
120 |
+
-webkit-transform: rotate(45deg);
|
121 |
+
transform: rotate(45deg); }
|
122 |
+
.sweet-alert .sa-input-error.show {
|
123 |
+
opacity: 1;
|
124 |
+
-webkit-transform: scale(1);
|
125 |
+
transform: scale(1); }
|
126 |
+
.sweet-alert input {
|
127 |
+
width: 100%;
|
128 |
+
box-sizing: border-box;
|
129 |
+
border-radius: 3px;
|
130 |
+
border: 1px solid #d7d7d7;
|
131 |
+
height: 43px;
|
132 |
+
margin-top: 10px;
|
133 |
+
margin-bottom: 17px;
|
134 |
+
font-size: 18px;
|
135 |
+
box-shadow: inset 0px 1px 1px rgba(0, 0, 0, 0.06);
|
136 |
+
padding: 0 12px;
|
137 |
+
display: none;
|
138 |
+
-webkit-transition: all 0.3s;
|
139 |
+
transition: all 0.3s; }
|
140 |
+
.sweet-alert input:focus {
|
141 |
+
outline: none;
|
142 |
+
box-shadow: 0px 0px 3px #c4e6f5;
|
143 |
+
border: 1px solid #b4dbed; }
|
144 |
+
.sweet-alert input:focus::-moz-placeholder {
|
145 |
+
transition: opacity 0.3s 0.03s ease;
|
146 |
+
opacity: 0.5; }
|
147 |
+
.sweet-alert input:focus:-ms-input-placeholder {
|
148 |
+
transition: opacity 0.3s 0.03s ease;
|
149 |
+
opacity: 0.5; }
|
150 |
+
.sweet-alert input:focus::-webkit-input-placeholder {
|
151 |
+
transition: opacity 0.3s 0.03s ease;
|
152 |
+
opacity: 0.5; }
|
153 |
+
.sweet-alert input::-moz-placeholder {
|
154 |
+
color: #bdbdbd; }
|
155 |
+
.sweet-alert input:-ms-input-placeholder {
|
156 |
+
color: #bdbdbd; }
|
157 |
+
.sweet-alert input::-webkit-input-placeholder {
|
158 |
+
color: #bdbdbd; }
|
159 |
+
.sweet-alert.show-input input {
|
160 |
+
display: block; }
|
161 |
+
.sweet-alert .sa-confirm-button-container {
|
162 |
+
display: inline-block;
|
163 |
+
position: relative; }
|
164 |
+
.sweet-alert .la-ball-fall {
|
165 |
+
position: absolute;
|
166 |
+
left: 50%;
|
167 |
+
top: 50%;
|
168 |
+
margin-left: -27px;
|
169 |
+
margin-top: 4px;
|
170 |
+
opacity: 0;
|
171 |
+
visibility: hidden; }
|
172 |
+
.sweet-alert button {
|
173 |
+
background-color: #8CD4F5;
|
174 |
+
color: white;
|
175 |
+
border: none;
|
176 |
+
box-shadow: none;
|
177 |
+
font-size: 17px;
|
178 |
+
font-weight: 500;
|
179 |
+
-webkit-border-radius: 4px;
|
180 |
+
border-radius: 5px;
|
181 |
+
padding: 10px 32px;
|
182 |
+
margin: 26px 5px 0 5px;
|
183 |
+
cursor: pointer; }
|
184 |
+
.sweet-alert button:focus {
|
185 |
+
outline: none;
|
186 |
+
box-shadow: 0 0 2px rgba(128, 179, 235, 0.5), inset 0 0 0 1px rgba(0, 0, 0, 0.05); }
|
187 |
+
.sweet-alert button:hover {
|
188 |
+
background-color: #7ecff4; }
|
189 |
+
.sweet-alert button:active {
|
190 |
+
background-color: #5dc2f1; }
|
191 |
+
.sweet-alert button.cancel {
|
192 |
+
background-color: #C1C1C1; }
|
193 |
+
.sweet-alert button.cancel:hover {
|
194 |
+
background-color: #b9b9b9; }
|
195 |
+
.sweet-alert button.cancel:active {
|
196 |
+
background-color: #a8a8a8; }
|
197 |
+
.sweet-alert button.cancel:focus {
|
198 |
+
box-shadow: rgba(197, 205, 211, 0.8) 0px 0px 2px, rgba(0, 0, 0, 0.0470588) 0px 0px 0px 1px inset !important; }
|
199 |
+
.sweet-alert button[disabled] {
|
200 |
+
opacity: .6;
|
201 |
+
cursor: default; }
|
202 |
+
.sweet-alert button.confirm[disabled] {
|
203 |
+
color: transparent; }
|
204 |
+
.sweet-alert button.confirm[disabled] ~ .la-ball-fall {
|
205 |
+
opacity: 1;
|
206 |
+
visibility: visible;
|
207 |
+
transition-delay: 0s; }
|
208 |
+
.sweet-alert button::-moz-focus-inner {
|
209 |
+
border: 0; }
|
210 |
+
.sweet-alert[data-has-confirm-button=false][data-has-cancel-button=false] {
|
211 |
+
padding-bottom: 40px; }
|
212 |
+
.sweet-alert .sa-icon {
|
213 |
+
width: 80px;
|
214 |
+
height: 80px;
|
215 |
+
border: 4px solid gray;
|
216 |
+
-webkit-border-radius: 40px;
|
217 |
+
border-radius: 40px;
|
218 |
+
border-radius: 50%;
|
219 |
+
margin: 20px auto;
|
220 |
+
padding: 0;
|
221 |
+
position: relative;
|
222 |
+
box-sizing: content-box; }
|
223 |
+
.sweet-alert .sa-icon.sa-error {
|
224 |
+
border-color: #F27474; }
|
225 |
+
.sweet-alert .sa-icon.sa-error .sa-x-mark {
|
226 |
+
position: relative;
|
227 |
+
display: block; }
|
228 |
+
.sweet-alert .sa-icon.sa-error .sa-line {
|
229 |
+
position: absolute;
|
230 |
+
height: 5px;
|
231 |
+
width: 47px;
|
232 |
+
background-color: #F27474;
|
233 |
+
display: block;
|
234 |
+
top: 37px;
|
235 |
+
border-radius: 2px; }
|
236 |
+
.sweet-alert .sa-icon.sa-error .sa-line.sa-left {
|
237 |
+
-webkit-transform: rotate(45deg);
|
238 |
+
transform: rotate(45deg);
|
239 |
+
left: 17px; }
|
240 |
+
.sweet-alert .sa-icon.sa-error .sa-line.sa-right {
|
241 |
+
-webkit-transform: rotate(-45deg);
|
242 |
+
transform: rotate(-45deg);
|
243 |
+
right: 16px; }
|
244 |
+
.sweet-alert .sa-icon.sa-warning {
|
245 |
+
border-color: #F8BB86; }
|
246 |
+
.sweet-alert .sa-icon.sa-warning .sa-body {
|
247 |
+
position: absolute;
|
248 |
+
width: 5px;
|
249 |
+
height: 47px;
|
250 |
+
left: 50%;
|
251 |
+
top: 10px;
|
252 |
+
-webkit-border-radius: 2px;
|
253 |
+
border-radius: 2px;
|
254 |
+
margin-left: -2px;
|
255 |
+
background-color: #F8BB86; }
|
256 |
+
.sweet-alert .sa-icon.sa-warning .sa-dot {
|
257 |
+
position: absolute;
|
258 |
+
width: 7px;
|
259 |
+
height: 7px;
|
260 |
+
-webkit-border-radius: 50%;
|
261 |
+
border-radius: 50%;
|
262 |
+
margin-left: -3px;
|
263 |
+
left: 50%;
|
264 |
+
bottom: 10px;
|
265 |
+
background-color: #F8BB86; }
|
266 |
+
.sweet-alert .sa-icon.sa-info {
|
267 |
+
border-color: #C9DAE1; }
|
268 |
+
.sweet-alert .sa-icon.sa-info::before {
|
269 |
+
content: "";
|
270 |
+
position: absolute;
|
271 |
+
width: 5px;
|
272 |
+
height: 29px;
|
273 |
+
left: 50%;
|
274 |
+
bottom: 17px;
|
275 |
+
border-radius: 2px;
|
276 |
+
margin-left: -2px;
|
277 |
+
background-color: #C9DAE1; }
|
278 |
+
.sweet-alert .sa-icon.sa-info::after {
|
279 |
+
content: "";
|
280 |
+
position: absolute;
|
281 |
+
width: 7px;
|
282 |
+
height: 7px;
|
283 |
+
border-radius: 50%;
|
284 |
+
margin-left: -3px;
|
285 |
+
top: 19px;
|
286 |
+
background-color: #C9DAE1; }
|
287 |
+
.sweet-alert .sa-icon.sa-success {
|
288 |
+
border-color: #A5DC86; }
|
289 |
+
.sweet-alert .sa-icon.sa-success::before, .sweet-alert .sa-icon.sa-success::after {
|
290 |
+
content: '';
|
291 |
+
-webkit-border-radius: 40px;
|
292 |
+
border-radius: 40px;
|
293 |
+
border-radius: 50%;
|
294 |
+
position: absolute;
|
295 |
+
width: 60px;
|
296 |
+
height: 120px;
|
297 |
+
background: white;
|
298 |
+
-webkit-transform: rotate(45deg);
|
299 |
+
transform: rotate(45deg); }
|
300 |
+
.sweet-alert .sa-icon.sa-success::before {
|
301 |
+
-webkit-border-radius: 120px 0 0 120px;
|
302 |
+
border-radius: 120px 0 0 120px;
|
303 |
+
top: -7px;
|
304 |
+
left: -33px;
|
305 |
+
-webkit-transform: rotate(-45deg);
|
306 |
+
transform: rotate(-45deg);
|
307 |
+
-webkit-transform-origin: 60px 60px;
|
308 |
+
transform-origin: 60px 60px; }
|
309 |
+
.sweet-alert .sa-icon.sa-success::after {
|
310 |
+
-webkit-border-radius: 0 120px 120px 0;
|
311 |
+
border-radius: 0 120px 120px 0;
|
312 |
+
top: -11px;
|
313 |
+
left: 30px;
|
314 |
+
-webkit-transform: rotate(-45deg);
|
315 |
+
transform: rotate(-45deg);
|
316 |
+
-webkit-transform-origin: 0px 60px;
|
317 |
+
transform-origin: 0px 60px; }
|
318 |
+
.sweet-alert .sa-icon.sa-success .sa-placeholder {
|
319 |
+
width: 80px;
|
320 |
+
height: 80px;
|
321 |
+
border: 4px solid rgba(165, 220, 134, 0.2);
|
322 |
+
-webkit-border-radius: 40px;
|
323 |
+
border-radius: 40px;
|
324 |
+
border-radius: 50%;
|
325 |
+
box-sizing: content-box;
|
326 |
+
position: absolute;
|
327 |
+
left: -4px;
|
328 |
+
top: -4px;
|
329 |
+
z-index: 2; }
|
330 |
+
.sweet-alert .sa-icon.sa-success .sa-fix {
|
331 |
+
width: 5px;
|
332 |
+
height: 90px;
|
333 |
+
background-color: white;
|
334 |
+
position: absolute;
|
335 |
+
left: 28px;
|
336 |
+
top: 8px;
|
337 |
+
z-index: 1;
|
338 |
+
-webkit-transform: rotate(-45deg);
|
339 |
+
transform: rotate(-45deg); }
|
340 |
+
.sweet-alert .sa-icon.sa-success .sa-line {
|
341 |
+
height: 5px;
|
342 |
+
background-color: #A5DC86;
|
343 |
+
display: block;
|
344 |
+
border-radius: 2px;
|
345 |
+
position: absolute;
|
346 |
+
z-index: 2; }
|
347 |
+
.sweet-alert .sa-icon.sa-success .sa-line.sa-tip {
|
348 |
+
width: 25px;
|
349 |
+
left: 14px;
|
350 |
+
top: 46px;
|
351 |
+
-webkit-transform: rotate(45deg);
|
352 |
+
transform: rotate(45deg); }
|
353 |
+
.sweet-alert .sa-icon.sa-success .sa-line.sa-long {
|
354 |
+
width: 47px;
|
355 |
+
right: 8px;
|
356 |
+
top: 38px;
|
357 |
+
-webkit-transform: rotate(-45deg);
|
358 |
+
transform: rotate(-45deg); }
|
359 |
+
.sweet-alert .sa-icon.sa-custom {
|
360 |
+
background-size: contain;
|
361 |
+
border-radius: 0;
|
362 |
+
border: none;
|
363 |
+
background-position: center center;
|
364 |
+
background-repeat: no-repeat; }
|
365 |
+
|
366 |
+
/*
|
367 |
+
* Animations
|
368 |
+
*/
|
369 |
+
@-webkit-keyframes showSweetAlert {
|
370 |
+
0% {
|
371 |
+
transform: scale(0.7);
|
372 |
+
-webkit-transform: scale(0.7); }
|
373 |
+
45% {
|
374 |
+
transform: scale(1.05);
|
375 |
+
-webkit-transform: scale(1.05); }
|
376 |
+
80% {
|
377 |
+
transform: scale(0.95);
|
378 |
+
-webkit-transform: scale(0.95); }
|
379 |
+
100% {
|
380 |
+
transform: scale(1);
|
381 |
+
-webkit-transform: scale(1); } }
|
382 |
+
|
383 |
+
@keyframes showSweetAlert {
|
384 |
+
0% {
|
385 |
+
transform: scale(0.7);
|
386 |
+
-webkit-transform: scale(0.7); }
|
387 |
+
45% {
|
388 |
+
transform: scale(1.05);
|
389 |
+
-webkit-transform: scale(1.05); }
|
390 |
+
80% {
|
391 |
+
transform: scale(0.95);
|
392 |
+
-webkit-transform: scale(0.95); }
|
393 |
+
100% {
|
394 |
+
transform: scale(1);
|
395 |
+
-webkit-transform: scale(1); } }
|
396 |
+
|
397 |
+
@-webkit-keyframes hideSweetAlert {
|
398 |
+
0% {
|
399 |
+
transform: scale(1);
|
400 |
+
-webkit-transform: scale(1); }
|
401 |
+
100% {
|
402 |
+
transform: scale(0.5);
|
403 |
+
-webkit-transform: scale(0.5); } }
|
404 |
+
|
405 |
+
@keyframes hideSweetAlert {
|
406 |
+
0% {
|
407 |
+
transform: scale(1);
|
408 |
+
-webkit-transform: scale(1); }
|
409 |
+
100% {
|
410 |
+
transform: scale(0.5);
|
411 |
+
-webkit-transform: scale(0.5); } }
|
412 |
+
|
413 |
+
@-webkit-keyframes slideFromTop {
|
414 |
+
0% {
|
415 |
+
top: 0%; }
|
416 |
+
100% {
|
417 |
+
top: 50%; } }
|
418 |
+
|
419 |
+
@keyframes slideFromTop {
|
420 |
+
0% {
|
421 |
+
top: 0%; }
|
422 |
+
100% {
|
423 |
+
top: 50%; } }
|
424 |
+
|
425 |
+
@-webkit-keyframes slideToTop {
|
426 |
+
0% {
|
427 |
+
top: 50%; }
|
428 |
+
100% {
|
429 |
+
top: 0%; } }
|
430 |
+
|
431 |
+
@keyframes slideToTop {
|
432 |
+
0% {
|
433 |
+
top: 50%; }
|
434 |
+
100% {
|
435 |
+
top: 0%; } }
|
436 |
+
|
437 |
+
@-webkit-keyframes slideFromBottom {
|
438 |
+
0% {
|
439 |
+
top: 70%; }
|
440 |
+
100% {
|
441 |
+
top: 50%; } }
|
442 |
+
|
443 |
+
@keyframes slideFromBottom {
|
444 |
+
0% {
|
445 |
+
top: 70%; }
|
446 |
+
100% {
|
447 |
+
top: 50%; } }
|
448 |
+
|
449 |
+
@-webkit-keyframes slideToBottom {
|
450 |
+
0% {
|
451 |
+
top: 50%; }
|
452 |
+
100% {
|
453 |
+
top: 70%; } }
|
454 |
+
|
455 |
+
@keyframes slideToBottom {
|
456 |
+
0% {
|
457 |
+
top: 50%; }
|
458 |
+
100% {
|
459 |
+
top: 70%; } }
|
460 |
+
|
461 |
+
.showSweetAlert[data-animation=pop] {
|
462 |
+
-webkit-animation: showSweetAlert 0.3s;
|
463 |
+
animation: showSweetAlert 0.3s; }
|
464 |
+
|
465 |
+
.showSweetAlert[data-animation=none] {
|
466 |
+
-webkit-animation: none;
|
467 |
+
animation: none; }
|
468 |
+
|
469 |
+
.showSweetAlert[data-animation=slide-from-top] {
|
470 |
+
-webkit-animation: slideFromTop 0.3s;
|
471 |
+
animation: slideFromTop 0.3s; }
|
472 |
+
|
473 |
+
.showSweetAlert[data-animation=slide-from-bottom] {
|
474 |
+
-webkit-animation: slideFromBottom 0.3s;
|
475 |
+
animation: slideFromBottom 0.3s; }
|
476 |
+
|
477 |
+
.hideSweetAlert[data-animation=pop] {
|
478 |
+
-webkit-animation: hideSweetAlert 0.2s;
|
479 |
+
animation: hideSweetAlert 0.2s; }
|
480 |
+
|
481 |
+
.hideSweetAlert[data-animation=none] {
|
482 |
+
-webkit-animation: none;
|
483 |
+
animation: none; }
|
484 |
+
|
485 |
+
.hideSweetAlert[data-animation=slide-from-top] {
|
486 |
+
-webkit-animation: slideToTop 0.4s;
|
487 |
+
animation: slideToTop 0.4s; }
|
488 |
+
|
489 |
+
.hideSweetAlert[data-animation=slide-from-bottom] {
|
490 |
+
-webkit-animation: slideToBottom 0.3s;
|
491 |
+
animation: slideToBottom 0.3s; }
|
492 |
+
|
493 |
+
@-webkit-keyframes animateSuccessTip {
|
494 |
+
0% {
|
495 |
+
width: 0;
|
496 |
+
left: 1px;
|
497 |
+
top: 19px; }
|
498 |
+
54% {
|
499 |
+
width: 0;
|
500 |
+
left: 1px;
|
501 |
+
top: 19px; }
|
502 |
+
70% {
|
503 |
+
width: 50px;
|
504 |
+
left: -8px;
|
505 |
+
top: 37px; }
|
506 |
+
84% {
|
507 |
+
width: 17px;
|
508 |
+
left: 21px;
|
509 |
+
top: 48px; }
|
510 |
+
100% {
|
511 |
+
width: 25px;
|
512 |
+
left: 14px;
|
513 |
+
top: 45px; } }
|
514 |
+
|
515 |
+
@keyframes animateSuccessTip {
|
516 |
+
0% {
|
517 |
+
width: 0;
|
518 |
+
left: 1px;
|
519 |
+
top: 19px; }
|
520 |
+
54% {
|
521 |
+
width: 0;
|
522 |
+
left: 1px;
|
523 |
+
top: 19px; }
|
524 |
+
70% {
|
525 |
+
width: 50px;
|
526 |
+
left: -8px;
|
527 |
+
top: 37px; }
|
528 |
+
84% {
|
529 |
+
width: 17px;
|
530 |
+
left: 21px;
|
531 |
+
top: 48px; }
|
532 |
+
100% {
|
533 |
+
width: 25px;
|
534 |
+
left: 14px;
|
535 |
+
top: 45px; } }
|
536 |
+
|
537 |
+
@-webkit-keyframes animateSuccessLong {
|
538 |
+
0% {
|
539 |
+
width: 0;
|
540 |
+
right: 46px;
|
541 |
+
top: 54px; }
|
542 |
+
65% {
|
543 |
+
width: 0;
|
544 |
+
right: 46px;
|
545 |
+
top: 54px; }
|
546 |
+
84% {
|
547 |
+
width: 55px;
|
548 |
+
right: 0px;
|
549 |
+
top: 35px; }
|
550 |
+
100% {
|
551 |
+
width: 47px;
|
552 |
+
right: 8px;
|
553 |
+
top: 38px; } }
|
554 |
+
|
555 |
+
@keyframes animateSuccessLong {
|
556 |
+
0% {
|
557 |
+
width: 0;
|
558 |
+
right: 46px;
|
559 |
+
top: 54px; }
|
560 |
+
65% {
|
561 |
+
width: 0;
|
562 |
+
right: 46px;
|
563 |
+
top: 54px; }
|
564 |
+
84% {
|
565 |
+
width: 55px;
|
566 |
+
right: 0px;
|
567 |
+
top: 35px; }
|
568 |
+
100% {
|
569 |
+
width: 47px;
|
570 |
+
right: 8px;
|
571 |
+
top: 38px; } }
|
572 |
+
|
573 |
+
@-webkit-keyframes rotatePlaceholder {
|
574 |
+
0% {
|
575 |
+
transform: rotate(-45deg);
|
576 |
+
-webkit-transform: rotate(-45deg); }
|
577 |
+
5% {
|
578 |
+
transform: rotate(-45deg);
|
579 |
+
-webkit-transform: rotate(-45deg); }
|
580 |
+
12% {
|
581 |
+
transform: rotate(-405deg);
|
582 |
+
-webkit-transform: rotate(-405deg); }
|
583 |
+
100% {
|
584 |
+
transform: rotate(-405deg);
|
585 |
+
-webkit-transform: rotate(-405deg); } }
|
586 |
+
|
587 |
+
@keyframes rotatePlaceholder {
|
588 |
+
0% {
|
589 |
+
transform: rotate(-45deg);
|
590 |
+
-webkit-transform: rotate(-45deg); }
|
591 |
+
5% {
|
592 |
+
transform: rotate(-45deg);
|
593 |
+
-webkit-transform: rotate(-45deg); }
|
594 |
+
12% {
|
595 |
+
transform: rotate(-405deg);
|
596 |
+
-webkit-transform: rotate(-405deg); }
|
597 |
+
100% {
|
598 |
+
transform: rotate(-405deg);
|
599 |
+
-webkit-transform: rotate(-405deg); } }
|
600 |
+
|
601 |
+
.animateSuccessTip {
|
602 |
+
-webkit-animation: animateSuccessTip 0.75s;
|
603 |
+
animation: animateSuccessTip 0.75s; }
|
604 |
+
|
605 |
+
.animateSuccessLong {
|
606 |
+
-webkit-animation: animateSuccessLong 0.75s;
|
607 |
+
animation: animateSuccessLong 0.75s; }
|
608 |
+
|
609 |
+
.sa-icon.sa-success.animate::after {
|
610 |
+
-webkit-animation: rotatePlaceholder 4.25s ease-in;
|
611 |
+
animation: rotatePlaceholder 4.25s ease-in; }
|
612 |
+
|
613 |
+
@-webkit-keyframes animateErrorIcon {
|
614 |
+
0% {
|
615 |
+
transform: rotateX(100deg);
|
616 |
+
-webkit-transform: rotateX(100deg);
|
617 |
+
opacity: 0; }
|
618 |
+
100% {
|
619 |
+
transform: rotateX(0deg);
|
620 |
+
-webkit-transform: rotateX(0deg);
|
621 |
+
opacity: 1; } }
|
622 |
+
|
623 |
+
@keyframes animateErrorIcon {
|
624 |
+
0% {
|
625 |
+
transform: rotateX(100deg);
|
626 |
+
-webkit-transform: rotateX(100deg);
|
627 |
+
opacity: 0; }
|
628 |
+
100% {
|
629 |
+
transform: rotateX(0deg);
|
630 |
+
-webkit-transform: rotateX(0deg);
|
631 |
+
opacity: 1; } }
|
632 |
+
|
633 |
+
.animateErrorIcon {
|
634 |
+
-webkit-animation: animateErrorIcon 0.5s;
|
635 |
+
animation: animateErrorIcon 0.5s; }
|
636 |
+
|
637 |
+
@-webkit-keyframes animateXMark {
|
638 |
+
0% {
|
639 |
+
transform: scale(0.4);
|
640 |
+
-webkit-transform: scale(0.4);
|
641 |
+
margin-top: 26px;
|
642 |
+
opacity: 0; }
|
643 |
+
50% {
|
644 |
+
transform: scale(0.4);
|
645 |
+
-webkit-transform: scale(0.4);
|
646 |
+
margin-top: 26px;
|
647 |
+
opacity: 0; }
|
648 |
+
80% {
|
649 |
+
transform: scale(1.15);
|
650 |
+
-webkit-transform: scale(1.15);
|
651 |
+
margin-top: -6px; }
|
652 |
+
100% {
|
653 |
+
transform: scale(1);
|
654 |
+
-webkit-transform: scale(1);
|
655 |
+
margin-top: 0;
|
656 |
+
opacity: 1; } }
|
657 |
+
|
658 |
+
@keyframes animateXMark {
|
659 |
+
0% {
|
660 |
+
transform: scale(0.4);
|
661 |
+
-webkit-transform: scale(0.4);
|
662 |
+
margin-top: 26px;
|
663 |
+
opacity: 0; }
|
664 |
+
50% {
|
665 |
+
transform: scale(0.4);
|
666 |
+
-webkit-transform: scale(0.4);
|
667 |
+
margin-top: 26px;
|
668 |
+
opacity: 0; }
|
669 |
+
80% {
|
670 |
+
transform: scale(1.15);
|
671 |
+
-webkit-transform: scale(1.15);
|
672 |
+
margin-top: -6px; }
|
673 |
+
100% {
|
674 |
+
transform: scale(1);
|
675 |
+
-webkit-transform: scale(1);
|
676 |
+
margin-top: 0;
|
677 |
+
opacity: 1; } }
|
678 |
+
|
679 |
+
.animateXMark {
|
680 |
+
-webkit-animation: animateXMark 0.5s;
|
681 |
+
animation: animateXMark 0.5s; }
|
682 |
+
|
683 |
+
@-webkit-keyframes pulseWarning {
|
684 |
+
0% {
|
685 |
+
border-color: #F8D486; }
|
686 |
+
100% {
|
687 |
+
border-color: #F8BB86; } }
|
688 |
+
|
689 |
+
@keyframes pulseWarning {
|
690 |
+
0% {
|
691 |
+
border-color: #F8D486; }
|
692 |
+
100% {
|
693 |
+
border-color: #F8BB86; } }
|
694 |
+
|
695 |
+
.pulseWarning {
|
696 |
+
-webkit-animation: pulseWarning 0.75s infinite alternate;
|
697 |
+
animation: pulseWarning 0.75s infinite alternate; }
|
698 |
+
|
699 |
+
@-webkit-keyframes pulseWarningIns {
|
700 |
+
0% {
|
701 |
+
background-color: #F8D486; }
|
702 |
+
100% {
|
703 |
+
background-color: #F8BB86; } }
|
704 |
+
|
705 |
+
@keyframes pulseWarningIns {
|
706 |
+
0% {
|
707 |
+
background-color: #F8D486; }
|
708 |
+
100% {
|
709 |
+
background-color: #F8BB86; } }
|
710 |
+
|
711 |
+
.pulseWarningIns {
|
712 |
+
-webkit-animation: pulseWarningIns 0.75s infinite alternate;
|
713 |
+
animation: pulseWarningIns 0.75s infinite alternate; }
|
714 |
+
|
715 |
+
@-webkit-keyframes rotate-loading {
|
716 |
+
0% {
|
717 |
+
transform: rotate(0deg); }
|
718 |
+
100% {
|
719 |
+
transform: rotate(360deg); } }
|
720 |
+
|
721 |
+
@keyframes rotate-loading {
|
722 |
+
0% {
|
723 |
+
transform: rotate(0deg); }
|
724 |
+
100% {
|
725 |
+
transform: rotate(360deg); } }
|
726 |
+
|
727 |
+
/* Internet Explorer 9 has some special quirks that are fixed here */
|
728 |
+
/* The icons are not animated. */
|
729 |
+
/* This file is automatically merged into sweet-alert.min.js through Gulp */
|
730 |
+
/* Error icon */
|
731 |
+
.sweet-alert .sa-icon.sa-error .sa-line.sa-left {
|
732 |
+
-ms-transform: rotate(45deg) \9; }
|
733 |
+
|
734 |
+
.sweet-alert .sa-icon.sa-error .sa-line.sa-right {
|
735 |
+
-ms-transform: rotate(-45deg) \9; }
|
736 |
+
|
737 |
+
/* Success icon */
|
738 |
+
.sweet-alert .sa-icon.sa-success {
|
739 |
+
border-color: transparent\9; }
|
740 |
+
|
741 |
+
.sweet-alert .sa-icon.sa-success .sa-line.sa-tip {
|
742 |
+
-ms-transform: rotate(45deg) \9; }
|
743 |
+
|
744 |
+
.sweet-alert .sa-icon.sa-success .sa-line.sa-long {
|
745 |
+
-ms-transform: rotate(-45deg) \9; }
|
746 |
+
|
747 |
+
/*!
|
748 |
+
* Load Awesome v1.1.0 (http://github.danielcardoso.net/load-awesome/)
|
749 |
+
* Copyright 2015 Daniel Cardoso <@DanielCardoso>
|
750 |
+
* Licensed under MIT
|
751 |
+
*/
|
752 |
+
.la-ball-fall,
|
753 |
+
.la-ball-fall > div {
|
754 |
+
position: relative;
|
755 |
+
-webkit-box-sizing: border-box;
|
756 |
+
-moz-box-sizing: border-box;
|
757 |
+
box-sizing: border-box; }
|
758 |
+
|
759 |
+
.la-ball-fall {
|
760 |
+
display: block;
|
761 |
+
font-size: 0;
|
762 |
+
color: #fff; }
|
763 |
+
|
764 |
+
.la-ball-fall.la-dark {
|
765 |
+
color: #333; }
|
766 |
+
|
767 |
+
.la-ball-fall > div {
|
768 |
+
display: inline-block;
|
769 |
+
float: none;
|
770 |
+
background-color: currentColor;
|
771 |
+
border: 0 solid currentColor; }
|
772 |
+
|
773 |
+
.la-ball-fall {
|
774 |
+
width: 54px;
|
775 |
+
height: 18px; }
|
776 |
+
|
777 |
+
.la-ball-fall > div {
|
778 |
+
width: 10px;
|
779 |
+
height: 10px;
|
780 |
+
margin: 4px;
|
781 |
+
border-radius: 100%;
|
782 |
+
opacity: 0;
|
783 |
+
-webkit-animation: ball-fall 1s ease-in-out infinite;
|
784 |
+
-moz-animation: ball-fall 1s ease-in-out infinite;
|
785 |
+
-o-animation: ball-fall 1s ease-in-out infinite;
|
786 |
+
animation: ball-fall 1s ease-in-out infinite; }
|
787 |
+
|
788 |
+
.la-ball-fall > div:nth-child(1) {
|
789 |
+
-webkit-animation-delay: -200ms;
|
790 |
+
-moz-animation-delay: -200ms;
|
791 |
+
-o-animation-delay: -200ms;
|
792 |
+
animation-delay: -200ms; }
|
793 |
+
|
794 |
+
.la-ball-fall > div:nth-child(2) {
|
795 |
+
-webkit-animation-delay: -100ms;
|
796 |
+
-moz-animation-delay: -100ms;
|
797 |
+
-o-animation-delay: -100ms;
|
798 |
+
animation-delay: -100ms; }
|
799 |
+
|
800 |
+
.la-ball-fall > div:nth-child(3) {
|
801 |
+
-webkit-animation-delay: 0ms;
|
802 |
+
-moz-animation-delay: 0ms;
|
803 |
+
-o-animation-delay: 0ms;
|
804 |
+
animation-delay: 0ms; }
|
805 |
+
|
806 |
+
.la-ball-fall.la-sm {
|
807 |
+
width: 26px;
|
808 |
+
height: 8px; }
|
809 |
+
|
810 |
+
.la-ball-fall.la-sm > div {
|
811 |
+
width: 4px;
|
812 |
+
height: 4px;
|
813 |
+
margin: 2px; }
|
814 |
+
|
815 |
+
.la-ball-fall.la-2x {
|
816 |
+
width: 108px;
|
817 |
+
height: 36px; }
|
818 |
+
|
819 |
+
.la-ball-fall.la-2x > div {
|
820 |
+
width: 20px;
|
821 |
+
height: 20px;
|
822 |
+
margin: 8px; }
|
823 |
+
|
824 |
+
.la-ball-fall.la-3x {
|
825 |
+
width: 162px;
|
826 |
+
height: 54px; }
|
827 |
+
|
828 |
+
.la-ball-fall.la-3x > div {
|
829 |
+
width: 30px;
|
830 |
+
height: 30px;
|
831 |
+
margin: 12px; }
|
832 |
+
|
833 |
+
/*
|
834 |
+
* Animation
|
835 |
+
*/
|
836 |
+
@-webkit-keyframes ball-fall {
|
837 |
+
0% {
|
838 |
+
opacity: 0;
|
839 |
+
-webkit-transform: translateY(-145%);
|
840 |
+
transform: translateY(-145%); }
|
841 |
+
10% {
|
842 |
+
opacity: .5; }
|
843 |
+
20% {
|
844 |
+
opacity: 1;
|
845 |
+
-webkit-transform: translateY(0);
|
846 |
+
transform: translateY(0); }
|
847 |
+
80% {
|
848 |
+
opacity: 1;
|
849 |
+
-webkit-transform: translateY(0);
|
850 |
+
transform: translateY(0); }
|
851 |
+
90% {
|
852 |
+
opacity: .5; }
|
853 |
+
100% {
|
854 |
+
opacity: 0;
|
855 |
+
-webkit-transform: translateY(145%);
|
856 |
+
transform: translateY(145%); } }
|
857 |
+
|
858 |
+
@-moz-keyframes ball-fall {
|
859 |
+
0% {
|
860 |
+
opacity: 0;
|
861 |
+
-moz-transform: translateY(-145%);
|
862 |
+
transform: translateY(-145%); }
|
863 |
+
10% {
|
864 |
+
opacity: .5; }
|
865 |
+
20% {
|
866 |
+
opacity: 1;
|
867 |
+
-moz-transform: translateY(0);
|
868 |
+
transform: translateY(0); }
|
869 |
+
80% {
|
870 |
+
opacity: 1;
|
871 |
+
-moz-transform: translateY(0);
|
872 |
+
transform: translateY(0); }
|
873 |
+
90% {
|
874 |
+
opacity: .5; }
|
875 |
+
100% {
|
876 |
+
opacity: 0;
|
877 |
+
-moz-transform: translateY(145%);
|
878 |
+
transform: translateY(145%); } }
|
879 |
+
|
880 |
+
@-o-keyframes ball-fall {
|
881 |
+
0% {
|
882 |
+
opacity: 0;
|
883 |
+
-o-transform: translateY(-145%);
|
884 |
+
transform: translateY(-145%); }
|
885 |
+
10% {
|
886 |
+
opacity: .5; }
|
887 |
+
20% {
|
888 |
+
opacity: 1;
|
889 |
+
-o-transform: translateY(0);
|
890 |
+
transform: translateY(0); }
|
891 |
+
80% {
|
892 |
+
opacity: 1;
|
893 |
+
-o-transform: translateY(0);
|
894 |
+
transform: translateY(0); }
|
895 |
+
90% {
|
896 |
+
opacity: .5; }
|
897 |
+
100% {
|
898 |
+
opacity: 0;
|
899 |
+
-o-transform: translateY(145%);
|
900 |
+
transform: translateY(145%); } }
|
901 |
+
|
902 |
+
@keyframes ball-fall {
|
903 |
+
0% {
|
904 |
+
opacity: 0;
|
905 |
+
-webkit-transform: translateY(-145%);
|
906 |
+
-moz-transform: translateY(-145%);
|
907 |
+
-o-transform: translateY(-145%);
|
908 |
+
transform: translateY(-145%); }
|
909 |
+
10% {
|
910 |
+
opacity: .5; }
|
911 |
+
20% {
|
912 |
+
opacity: 1;
|
913 |
+
-webkit-transform: translateY(0);
|
914 |
+
-moz-transform: translateY(0);
|
915 |
+
-o-transform: translateY(0);
|
916 |
+
transform: translateY(0); }
|
917 |
+
80% {
|
918 |
+
opacity: 1;
|
919 |
+
-webkit-transform: translateY(0);
|
920 |
+
-moz-transform: translateY(0);
|
921 |
+
-o-transform: translateY(0);
|
922 |
+
transform: translateY(0); }
|
923 |
+
90% {
|
924 |
+
opacity: .5; }
|
925 |
+
100% {
|
926 |
+
opacity: 0;
|
927 |
+
-webkit-transform: translateY(145%);
|
928 |
+
-moz-transform: translateY(145%);
|
929 |
+
-o-transform: translateY(145%);
|
930 |
+
transform: translateY(145%); } }
|
assets/css/sweetalert.min.css
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
body.stop-scrolling{ height:100%; overflow:hidden}.sweet-overlay{ background-color:black; -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=40)"; background-color:rgba(0,0,0,0.4); position:fixed; left:0; right:0; top:0; bottom:0; display:none; z-index:10000}.sweet-alert{ background-color:white; font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif; width:478px; padding:17px; border-radius:5px; text-align:center; position:fixed; left:50%; top:50%; margin-left:-256px; margin-top:-200px; overflow:hidden; display:none; z-index:99999} @media all and (max-width:540px){ .sweet-alert{ width:auto; margin-left:0; margin-right:0; left:15px; right:15px}} .sweet-alert h2{ color:#575757; font-size:30px; text-align:center; font-weight:600; text-transform:none; position:relative; margin:25px 0; padding:0; line-height:40px; display:block} .sweet-alert p{ color:#797979; font-size:16px; text-align:center; font-weight:300; position:relative; text-align:inherit; float:none; margin:0; padding:0; line-height:normal} .sweet-alert fieldset{ border:none; position:relative} .sweet-alert .sa-error-container{ background-color:#f1f1f1; margin-left:-17px; margin-right:-17px; overflow:hidden; padding:0 10px; max-height:0; webkit-transition:padding 0.15s,max-height 0.15s; transition:padding 0.15s,max-height 0.15s} .sweet-alert .sa-error-container.show{ padding:10px 0; max-height:100px; webkit-transition:padding 0.2s,max-height 0.2s; transition:padding 0.25s,max-height 0.25s} .sweet-alert .sa-error-container .icon{ display:inline-block; width:24px; height:24px; border-radius:50%; background-color:#ea7d7d; color:white; line-height:24px; text-align:center; margin-right:3px} .sweet-alert .sa-error-container p{ display:inline-block} .sweet-alert .sa-input-error{ position:absolute; top:29px; right:26px; width:20px; height:20px; opacity:0; -webkit-transform:scale(0.5); transform:scale(0.5); -webkit-transform-origin:50% 50%; transform-origin:50% 50%; -webkit-transition:all 0.1s; transition:all 0.1s} .sweet-alert .sa-input-error::before,.sweet-alert .sa-input-error::after{ content:""; width:20px; height:6px; background-color:#f06e57; border-radius:3px; position:absolute; top:50%; margin-top:-4px; left:50%; margin-left:-9px} .sweet-alert .sa-input-error::before{ -webkit-transform:rotate(-45deg); transform:rotate(-45deg)} .sweet-alert .sa-input-error::after{ -webkit-transform:rotate(45deg); transform:rotate(45deg)} .sweet-alert .sa-input-error.show{ opacity:1; -webkit-transform:scale(1); transform:scale(1)} .sweet-alert input{ width:100%; box-sizing:border-box; border-radius:3px; border:1px solid #d7d7d7; height:43px; margin-top:10px; margin-bottom:17px; font-size:18px; box-shadow:inset 0px 1px 1px rgba(0,0,0,0.06); padding:0 12px; display:none; -webkit-transition:all 0.3s; transition:all 0.3s} .sweet-alert input:focus{ outline:none; box-shadow:0px 0px 3px #c4e6f5; border:1px solid #b4dbed} .sweet-alert input:focus::-moz-placeholder{ transition:opacity 0.3s 0.03s ease; opacity:0.5} .sweet-alert input:focus:-ms-input-placeholder{ transition:opacity 0.3s 0.03s ease; opacity:0.5} .sweet-alert input:focus::-webkit-input-placeholder{ transition:opacity 0.3s 0.03s ease; opacity:0.5} .sweet-alert input::-moz-placeholder{ color:#bdbdbd} .sweet-alert input:-ms-input-placeholder{ color:#bdbdbd} .sweet-alert input::-webkit-input-placeholder{ color:#bdbdbd} .sweet-alert.show-input input{ display:block} .sweet-alert .sa-confirm-button-container{ display:inline-block; position:relative} .sweet-alert .la-ball-fall{ position:absolute; left:50%; top:50%; margin-left:-27px; margin-top:4px; opacity:0; visibility:hidden} .sweet-alert button{ background-color:#8CD4F5; color:white; border:none; box-shadow:none; font-size:17px; font-weight:500; -webkit-border-radius:4px; border-radius:5px; padding:10px 32px; margin:26px 5px 0 5px; cursor:pointer} .sweet-alert button:focus{ outline:none; box-shadow:0 0 2px rgba(128,179,235,0.5),inset 0 0 0 1px rgba(0,0,0,0.05)} .sweet-alert button:hover{ background-color:#7ecff4} .sweet-alert button:active{ background-color:#5dc2f1} .sweet-alert button.cancel{ background-color:#C1C1C1} .sweet-alert button.cancel:hover{ background-color:#b9b9b9} .sweet-alert button.cancel:active{ background-color:#a8a8a8} .sweet-alert button.cancel:focus{ box-shadow:rgba(197,205,211,0.8) 0px 0px 2px,rgba(0,0,0,0.0470588) 0px 0px 0px 1px inset !important} .sweet-alert button[disabled]{ opacity:.6; cursor:default} .sweet-alert button.confirm[disabled]{ color:transparent} .sweet-alert button.confirm[disabled] ~ .la-ball-fall{ opacity:1; visibility:visible; transition-delay:0s} .sweet-alert button::-moz-focus-inner{ border:0} .sweet-alert[data-has-confirm-button=false][data-has-cancel-button=false]{ padding-bottom:40px} .sweet-alert .sa-icon{ width:80px; height:80px; border:4px solid gray; -webkit-border-radius:40px; border-radius:40px; border-radius:50%; margin:20px auto; padding:0; position:relative; box-sizing:content-box} .sweet-alert .sa-icon.sa-error{ border-color:#F27474} .sweet-alert .sa-icon.sa-error .sa-x-mark{ position:relative; display:block} .sweet-alert .sa-icon.sa-error .sa-line{ position:absolute; height:5px; width:47px; background-color:#F27474; display:block; top:37px; border-radius:2px} .sweet-alert .sa-icon.sa-error .sa-line.sa-left{ -webkit-transform:rotate(45deg); transform:rotate(45deg); left:17px} .sweet-alert .sa-icon.sa-error .sa-line.sa-right{ -webkit-transform:rotate(-45deg); transform:rotate(-45deg); right:16px} .sweet-alert .sa-icon.sa-warning{ border-color:#F8BB86} .sweet-alert .sa-icon.sa-warning .sa-body{ position:absolute; width:5px; height:47px; left:50%; top:10px; -webkit-border-radius:2px; border-radius:2px; margin-left:-2px; background-color:#F8BB86} .sweet-alert .sa-icon.sa-warning .sa-dot{ position:absolute; width:7px; height:7px; -webkit-border-radius:50%; border-radius:50%; margin-left:-3px; left:50%; bottom:10px; background-color:#F8BB86} .sweet-alert .sa-icon.sa-info{ border-color:#C9DAE1} .sweet-alert .sa-icon.sa-info::before{ content:""; position:absolute; width:5px; height:29px; left:50%; bottom:17px; border-radius:2px; margin-left:-2px; background-color:#C9DAE1} .sweet-alert .sa-icon.sa-info::after{ content:""; position:absolute; width:7px; height:7px; border-radius:50%; margin-left:-3px; top:19px; background-color:#C9DAE1} .sweet-alert .sa-icon.sa-success{ border-color:#A5DC86} .sweet-alert .sa-icon.sa-success::before,.sweet-alert .sa-icon.sa-success::after{ content:''; -webkit-border-radius:40px; border-radius:40px; border-radius:50%; position:absolute; width:60px; height:120px; background:white; -webkit-transform:rotate(45deg); transform:rotate(45deg)} .sweet-alert .sa-icon.sa-success::before{ -webkit-border-radius:120px 0 0 120px; border-radius:120px 0 0 120px; top:-7px; left:-33px; -webkit-transform:rotate(-45deg); transform:rotate(-45deg); -webkit-transform-origin:60px 60px; transform-origin:60px 60px} .sweet-alert .sa-icon.sa-success::after{ -webkit-border-radius:0 120px 120px 0; border-radius:0 120px 120px 0; top:-11px; left:30px; -webkit-transform:rotate(-45deg); transform:rotate(-45deg); -webkit-transform-origin:0px 60px; transform-origin:0px 60px} .sweet-alert .sa-icon.sa-success .sa-placeholder{ width:80px; height:80px; border:4px solid rgba(165,220,134,0.2); -webkit-border-radius:40px; border-radius:40px; border-radius:50%; box-sizing:content-box; position:absolute; left:-4px; top:-4px; z-index:2} .sweet-alert .sa-icon.sa-success .sa-fix{ width:5px; height:90px; background-color:white; position:absolute; left:28px; top:8px; z-index:1; -webkit-transform:rotate(-45deg); transform:rotate(-45deg)} .sweet-alert .sa-icon.sa-success .sa-line{ height:5px; background-color:#A5DC86; display:block; border-radius:2px; position:absolute; z-index:2} .sweet-alert .sa-icon.sa-success .sa-line.sa-tip{ width:25px; left:14px; top:46px; -webkit-transform:rotate(45deg); transform:rotate(45deg)} .sweet-alert .sa-icon.sa-success .sa-line.sa-long{ width:47px; right:8px; top:38px; -webkit-transform:rotate(-45deg); transform:rotate(-45deg)} .sweet-alert .sa-icon.sa-custom{ background-size:contain; border-radius:0; border:none; background-position:center center; background-repeat:no-repeat}@-webkit-keyframes showSweetAlert{ 0%{ transform:scale(0.7); -webkit-transform:scale(0.7)} 45%{ transform:scale(1.05); -webkit-transform:scale(1.05)} 80%{ transform:scale(0.95); -webkit-transform:scale(0.95)} 100%{ transform:scale(1); -webkit-transform:scale(1)}}@keyframes showSweetAlert{ 0%{ transform:scale(0.7); -webkit-transform:scale(0.7)} 45%{ transform:scale(1.05); -webkit-transform:scale(1.05)} 80%{ transform:scale(0.95); -webkit-transform:scale(0.95)} 100%{ transform:scale(1); -webkit-transform:scale(1)}}@-webkit-keyframes hideSweetAlert{ 0%{ transform:scale(1); -webkit-transform:scale(1)} 100%{ transform:scale(0.5); -webkit-transform:scale(0.5)}}@keyframes hideSweetAlert{ 0%{ transform:scale(1); -webkit-transform:scale(1)} 100%{ transform:scale(0.5); -webkit-transform:scale(0.5)}}@-webkit-keyframes slideFromTop{ 0%{ top:0%} 100%{ top:50%}}@keyframes slideFromTop{ 0%{ top:0%} 100%{ top:50%}}@-webkit-keyframes slideToTop{ 0%{ top:50%} 100%{ top:0%}}@keyframes slideToTop{ 0%{ top:50%} 100%{ top:0%}}@-webkit-keyframes slideFromBottom{ 0%{ top:70%} 100%{ top:50%}}@keyframes slideFromBottom{ 0%{ top:70%} 100%{ top:50%}}@-webkit-keyframes slideToBottom{ 0%{ top:50%} 100%{ top:70%}}@keyframes slideToBottom{ 0%{ top:50%} 100%{ top:70%}}.showSweetAlert[data-animation=pop]{ -webkit-animation:showSweetAlert 0.3s; animation:showSweetAlert 0.3s}.showSweetAlert[data-animation=none]{ -webkit-animation:none; animation:none}.showSweetAlert[data-animation=slide-from-top]{ -webkit-animation:slideFromTop 0.3s; animation:slideFromTop 0.3s}.showSweetAlert[data-animation=slide-from-bottom]{ -webkit-animation:slideFromBottom 0.3s; animation:slideFromBottom 0.3s}.hideSweetAlert[data-animation=pop]{ -webkit-animation:hideSweetAlert 0.2s; animation:hideSweetAlert 0.2s}.hideSweetAlert[data-animation=none]{ -webkit-animation:none; animation:none}.hideSweetAlert[data-animation=slide-from-top]{ -webkit-animation:slideToTop 0.4s; animation:slideToTop 0.4s}.hideSweetAlert[data-animation=slide-from-bottom]{ -webkit-animation:slideToBottom 0.3s; animation:slideToBottom 0.3s}@-webkit-keyframes animateSuccessTip{ 0%{ width:0; left:1px; top:19px} 54%{ width:0; left:1px; top:19px} 70%{ width:50px; left:-8px; top:37px} 84%{ width:17px; left:21px; top:48px} 100%{ width:25px; left:14px; top:45px}}@keyframes animateSuccessTip{ 0%{ width:0; left:1px; top:19px} 54%{ width:0; left:1px; top:19px} 70%{ width:50px; left:-8px; top:37px} 84%{ width:17px; left:21px; top:48px} 100%{ width:25px; left:14px; top:45px}}@-webkit-keyframes animateSuccessLong{ 0%{ width:0; right:46px; top:54px} 65%{ width:0; right:46px; top:54px} 84%{ width:55px; right:0px; top:35px} 100%{ width:47px; right:8px; top:38px}}@keyframes animateSuccessLong{ 0%{ width:0; right:46px; top:54px} 65%{ width:0; right:46px; top:54px} 84%{ width:55px; right:0px; top:35px} 100%{ width:47px; right:8px; top:38px}}@-webkit-keyframes rotatePlaceholder{ 0%{ transform:rotate(-45deg); -webkit-transform:rotate(-45deg)} 5%{ transform:rotate(-45deg); -webkit-transform:rotate(-45deg)} 12%{ transform:rotate(-405deg); -webkit-transform:rotate(-405deg)} 100%{ transform:rotate(-405deg); -webkit-transform:rotate(-405deg)}}@keyframes rotatePlaceholder{ 0%{ transform:rotate(-45deg); -webkit-transform:rotate(-45deg)} 5%{ transform:rotate(-45deg); -webkit-transform:rotate(-45deg)} 12%{ transform:rotate(-405deg); -webkit-transform:rotate(-405deg)} 100%{ transform:rotate(-405deg); -webkit-transform:rotate(-405deg)}}.animateSuccessTip{ -webkit-animation:animateSuccessTip 0.75s; animation:animateSuccessTip 0.75s}.animateSuccessLong{ -webkit-animation:animateSuccessLong 0.75s; animation:animateSuccessLong 0.75s}.sa-icon.sa-success.animate::after{ -webkit-animation:rotatePlaceholder 4.25s ease-in; animation:rotatePlaceholder 4.25s ease-in}@-webkit-keyframes animateErrorIcon{ 0%{ transform:rotateX(100deg); -webkit-transform:rotateX(100deg); opacity:0} 100%{ transform:rotateX(0deg); -webkit-transform:rotateX(0deg); opacity:1}}@keyframes animateErrorIcon{ 0%{ transform:rotateX(100deg); -webkit-transform:rotateX(100deg); opacity:0} 100%{ transform:rotateX(0deg); -webkit-transform:rotateX(0deg); opacity:1}}.animateErrorIcon{ -webkit-animation:animateErrorIcon 0.5s; animation:animateErrorIcon 0.5s}@-webkit-keyframes animateXMark{ 0%{ transform:scale(0.4); -webkit-transform:scale(0.4); margin-top:26px; opacity:0} 50%{ transform:scale(0.4); -webkit-transform:scale(0.4); margin-top:26px; opacity:0} 80%{ transform:scale(1.15); -webkit-transform:scale(1.15); margin-top:-6px} 100%{ transform:scale(1); -webkit-transform:scale(1); margin-top:0; opacity:1}}@keyframes animateXMark{ 0%{ transform:scale(0.4); -webkit-transform:scale(0.4); margin-top:26px; opacity:0} 50%{ transform:scale(0.4); -webkit-transform:scale(0.4); margin-top:26px; opacity:0} 80%{ transform:scale(1.15); -webkit-transform:scale(1.15); margin-top:-6px} 100%{ transform:scale(1); -webkit-transform:scale(1); margin-top:0; opacity:1}}.animateXMark{ -webkit-animation:animateXMark 0.5s; animation:animateXMark 0.5s}@-webkit-keyframes pulseWarning{ 0%{ border-color:#F8D486} 100%{ border-color:#F8BB86}}@keyframes pulseWarning{ 0%{ border-color:#F8D486} 100%{ border-color:#F8BB86}}.pulseWarning{ -webkit-animation:pulseWarning 0.75s infinite alternate; animation:pulseWarning 0.75s infinite alternate}@-webkit-keyframes pulseWarningIns{ 0%{ background-color:#F8D486} 100%{ background-color:#F8BB86}}@keyframes pulseWarningIns{ 0%{ background-color:#F8D486} 100%{ background-color:#F8BB86}}.pulseWarningIns{ -webkit-animation:pulseWarningIns 0.75s infinite alternate; animation:pulseWarningIns 0.75s infinite alternate}@-webkit-keyframes rotate-loading{ 0%{ transform:rotate(0deg)} 100%{ transform:rotate(360deg)}}@keyframes rotate-loading{ 0%{ transform:rotate(0deg)} 100%{ transform:rotate(360deg)}}.sweet-alert .sa-icon.sa-error .sa-line.sa-left{ -ms-transform:rotate(45deg) \9}.sweet-alert .sa-icon.sa-error .sa-line.sa-right{ -ms-transform:rotate(-45deg) \9}.sweet-alert .sa-icon.sa-success{ border-color:transparent\9}.sweet-alert .sa-icon.sa-success .sa-line.sa-tip{ -ms-transform:rotate(45deg) \9}.sweet-alert .sa-icon.sa-success .sa-line.sa-long{ -ms-transform:rotate(-45deg) \9}.la-ball-fall,.la-ball-fall >div{ position:relative; -webkit-box-sizing:border-box; -moz-box-sizing:border-box; box-sizing:border-box}.la-ball-fall{ display:block; font-size:0; color:#fff}.la-ball-fall.la-dark{ color:#333}.la-ball-fall >div{ display:inline-block; float:none; background-color:currentColor; border:0 solid currentColor}.la-ball-fall{ width:54px; height:18px}.la-ball-fall >div{ width:10px; height:10px; margin:4px; border-radius:100%; opacity:0; -webkit-animation:ball-fall 1s ease-in-out infinite; -moz-animation:ball-fall 1s ease-in-out infinite; -o-animation:ball-fall 1s ease-in-out infinite; animation:ball-fall 1s ease-in-out infinite}.la-ball-fall >div:nth-child(1){ -webkit-animation-delay:-200ms; -moz-animation-delay:-200ms; -o-animation-delay:-200ms; animation-delay:-200ms}.la-ball-fall >div:nth-child(2){ -webkit-animation-delay:-100ms; -moz-animation-delay:-100ms; -o-animation-delay:-100ms; animation-delay:-100ms}.la-ball-fall >div:nth-child(3){ -webkit-animation-delay:0ms; -moz-animation-delay:0ms; -o-animation-delay:0ms; animation-delay:0ms}.la-ball-fall.la-sm{ width:26px; height:8px}.la-ball-fall.la-sm >div{ width:4px; height:4px; margin:2px}.la-ball-fall.la-2x{ width:108px; height:36px}.la-ball-fall.la-2x >div{ width:20px; height:20px; margin:8px}.la-ball-fall.la-3x{ width:162px; height:54px}.la-ball-fall.la-3x >div{ width:30px; height:30px; margin:12px}@-webkit-keyframes ball-fall{ 0%{ opacity:0; -webkit-transform:translateY(-145%); transform:translateY(-145%)} 10%{ opacity:.5} 20%{ opacity:1; -webkit-transform:translateY(0); transform:translateY(0)} 80%{ opacity:1; -webkit-transform:translateY(0); transform:translateY(0)} 90%{ opacity:.5} 100%{ opacity:0; -webkit-transform:translateY(145%); transform:translateY(145%)}}@-moz-keyframes ball-fall{ 0%{ opacity:0; -moz-transform:translateY(-145%); transform:translateY(-145%)} 10%{ opacity:.5} 20%{ opacity:1; -moz-transform:translateY(0); transform:translateY(0)} 80%{ opacity:1; -moz-transform:translateY(0); transform:translateY(0)} 90%{ opacity:.5} 100%{ opacity:0; -moz-transform:translateY(145%); transform:translateY(145%)}}@-o-keyframes ball-fall{ 0%{ opacity:0; -o-transform:translateY(-145%); transform:translateY(-145%)} 10%{ opacity:.5} 20%{ opacity:1; -o-transform:translateY(0); transform:translateY(0)} 80%{ opacity:1; -o-transform:translateY(0); transform:translateY(0)} 90%{ opacity:.5} 100%{ opacity:0; -o-transform:translateY(145%); transform:translateY(145%)}}@keyframes ball-fall{ 0%{ opacity:0; -webkit-transform:translateY(-145%); -moz-transform:translateY(-145%); -o-transform:translateY(-145%); transform:translateY(-145%)} 10%{ opacity:.5} 20%{ opacity:1; -webkit-transform:translateY(0); -moz-transform:translateY(0); -o-transform:translateY(0); transform:translateY(0)} 80%{ opacity:1; -webkit-transform:translateY(0); -moz-transform:translateY(0); -o-transform:translateY(0); transform:translateY(0)} 90%{ opacity:.5} 100%{ opacity:0; -webkit-transform:translateY(145%); -moz-transform:translateY(145%); -o-transform:translateY(145%); transform:translateY(145%)}}
|
assets/css/twentytwenty.css
ADDED
@@ -0,0 +1,200 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* Twentwenty image comparison
|
3 |
+
*/
|
4 |
+
.twentytwenty-handle {
|
5 |
+
z-index: 40;
|
6 |
+
position: absolute;
|
7 |
+
left: 50%;
|
8 |
+
top: 50%;
|
9 |
+
height: 64px;
|
10 |
+
width: 64px;
|
11 |
+
margin-left: -32px;
|
12 |
+
margin-top: -32px;
|
13 |
+
border-radius: 50%;
|
14 |
+
box-shadow: 0 3px 0 #338EA6;
|
15 |
+
background: #40B1D0;
|
16 |
+
cursor: pointer;
|
17 |
+
}
|
18 |
+
.twentytwenty-horizontal .twentytwenty-handle:before,
|
19 |
+
.twentytwenty-horizontal .twentytwenty-handle:after {
|
20 |
+
left: 50%;
|
21 |
+
width: 2px;
|
22 |
+
height: 9999px;
|
23 |
+
margin-left: -1px;
|
24 |
+
}
|
25 |
+
|
26 |
+
.twentytwenty-horizontal .twentytwenty-handle:before {
|
27 |
+
bottom: 50%;
|
28 |
+
margin-bottom: 32px;
|
29 |
+
box-shadow: 0 3px 0 white, 0px 0px 12px rgba(51, 51, 51, 0.5);
|
30 |
+
}
|
31 |
+
|
32 |
+
.twentytwenty-horizontal .twentytwenty-handle:after {
|
33 |
+
top: 50%;
|
34 |
+
margin-top: 34px;
|
35 |
+
box-shadow: 0 -3px 0 white, 0px 0px 12px rgba(51, 51, 51, 0.5);
|
36 |
+
}
|
37 |
+
|
38 |
+
.twentytwenty-horizontal .twentytwenty-handle:before,
|
39 |
+
.twentytwenty-horizontal .twentytwenty-handle:after {
|
40 |
+
content: "";
|
41 |
+
position: absolute;
|
42 |
+
z-index: 30;
|
43 |
+
display: block;
|
44 |
+
background: #F2F5F7;
|
45 |
+
box-shadow: 0px 0px 12px rgba(51, 51, 51, 0.5);
|
46 |
+
}
|
47 |
+
|
48 |
+
.twentytwenty-labels,
|
49 |
+
.twentytwenty-overlay {
|
50 |
+
position: absolute;
|
51 |
+
top: 0;
|
52 |
+
width: 100%;
|
53 |
+
height: 100%;
|
54 |
+
-webkit-transition-duration: 0.5s;
|
55 |
+
transition-duration: 0.5s;
|
56 |
+
}
|
57 |
+
|
58 |
+
.twentytwenty-labels {
|
59 |
+
opacity: 1;
|
60 |
+
-webkit-transition-property: opacity;
|
61 |
+
transition-property: opacity;
|
62 |
+
}
|
63 |
+
|
64 |
+
.twentytwenty-labels .twentytwenty-label-content {
|
65 |
+
position: absolute;
|
66 |
+
padding: 0 12px;
|
67 |
+
font-size: 13px;
|
68 |
+
letter-spacing: 0.1em;
|
69 |
+
line-height: 38px;
|
70 |
+
color: white;
|
71 |
+
background: #1F2332;
|
72 |
+
border-radius: 2px;
|
73 |
+
}
|
74 |
+
|
75 |
+
.twentytwenty-horizontal .twentytwenty-labels .twentytwenty-label-content {
|
76 |
+
bottom: 15px;
|
77 |
+
}
|
78 |
+
|
79 |
+
.twentytwenty-after-label .twentytwenty-label-content {
|
80 |
+
background: #40B1D0;
|
81 |
+
}
|
82 |
+
|
83 |
+
.twentytwenty-left-arrow,
|
84 |
+
.twentytwenty-right-arrow {
|
85 |
+
position: absolute;
|
86 |
+
width: 0;
|
87 |
+
height: 0;
|
88 |
+
border: 8px inset transparent;
|
89 |
+
}
|
90 |
+
|
91 |
+
.twentytwenty-left-arrow,
|
92 |
+
.twentytwenty-right-arrow {
|
93 |
+
top: 50%;
|
94 |
+
margin-top: -8px;
|
95 |
+
}
|
96 |
+
|
97 |
+
.twentytwenty-container {
|
98 |
+
box-sizing: content-box;
|
99 |
+
position: relative;
|
100 |
+
z-index: 0;
|
101 |
+
overflow: hidden;
|
102 |
+
box-shadow: 0 5px 10px rgba(0, 0, 0, 0.15);
|
103 |
+
opacity: 0;
|
104 |
+
-webkit-transition: opacity 0.4s;
|
105 |
+
transition: opacity 0.4s;
|
106 |
+
-webkit-user-select: none;
|
107 |
+
-moz-user-select: none;
|
108 |
+
}
|
109 |
+
.twentytwenty-container * {
|
110 |
+
box-sizing: content-box;
|
111 |
+
}
|
112 |
+
|
113 |
+
.twentytwenty-container img {
|
114 |
+
position: absolute;
|
115 |
+
top: 0;
|
116 |
+
display: block;
|
117 |
+
width: 100%;
|
118 |
+
height: auto;
|
119 |
+
}
|
120 |
+
|
121 |
+
.loaded .twentytwenty-container {
|
122 |
+
opacity: 1;
|
123 |
+
}
|
124 |
+
|
125 |
+
.twentytwenty-container.active .twentytwenty-overlay .twentytwenty-labels,
|
126 |
+
.twentytwenty-container.active .twentytwenty-overlay:hover .twentytwenty-labels {
|
127 |
+
opacity: 0;
|
128 |
+
}
|
129 |
+
|
130 |
+
.twentytwenty-horizontal .twentytwenty-before-label .twentytwenty-label-content {
|
131 |
+
left: 15px;
|
132 |
+
}
|
133 |
+
|
134 |
+
.twentytwenty-horizontal .twentytwenty-after-label .twentytwenty-label-content {
|
135 |
+
right: 15px;
|
136 |
+
}
|
137 |
+
|
138 |
+
.twentytwenty-overlay {
|
139 |
+
z-index: 25;
|
140 |
+
}
|
141 |
+
.twentytwenty-before {
|
142 |
+
z-index: 20;
|
143 |
+
}
|
144 |
+
.twentytwenty-after {
|
145 |
+
z-index: 10;
|
146 |
+
}
|
147 |
+
|
148 |
+
/* Buttons for image choices */
|
149 |
+
.twentytwenty-duo-buttons {
|
150 |
+
position: absolute;
|
151 |
+
top: 10px;
|
152 |
+
z-index: 30;
|
153 |
+
overflow: hidden;
|
154 |
+
}
|
155 |
+
.twentytwenty-duo-buttons button {
|
156 |
+
float: left;
|
157 |
+
padding: 2px 6px;
|
158 |
+
font-size: 11px;
|
159 |
+
text-transform: uppercase;
|
160 |
+
letter-spacing: 0.125em;
|
161 |
+
font-weight: bold;
|
162 |
+
border: 0;
|
163 |
+
background: #1f2332;
|
164 |
+
color: #FFF;
|
165 |
+
transition: all .3s;
|
166 |
+
cursor: pointer;
|
167 |
+
}
|
168 |
+
.twentytwenty-duo-buttons button:hover,
|
169 |
+
.twentytwenty-duo-buttons button:focus {
|
170 |
+
background: #444;
|
171 |
+
}
|
172 |
+
.twentytwenty-duo-buttons button:first-child {
|
173 |
+
border-radius: 3px 0 0 3px;
|
174 |
+
}
|
175 |
+
.twentytwenty-duo-buttons button:last-child {
|
176 |
+
border-radius: 0 3px 3px 0;
|
177 |
+
}
|
178 |
+
.twentytwenty-duo-buttons button.selected {
|
179 |
+
background: #8bc34a;
|
180 |
+
text-shadow: 0 0 1px rgba(0,0,0,.2);
|
181 |
+
cursor: default;
|
182 |
+
}
|
183 |
+
.twentytwenty-duo-left {
|
184 |
+
left: 10px;
|
185 |
+
}
|
186 |
+
.twentytwenty-duo-right {
|
187 |
+
right: 10px;
|
188 |
+
}
|
189 |
+
|
190 |
+
.twentytwenty-left-arrow {
|
191 |
+
left: 50%;
|
192 |
+
margin-left: -22px;
|
193 |
+
border-right: 8px solid white;
|
194 |
+
}
|
195 |
+
|
196 |
+
.twentytwenty-right-arrow {
|
197 |
+
right: 50%;
|
198 |
+
margin-right: -22px;
|
199 |
+
border-left: 8px solid white;
|
200 |
+
}
|
assets/css/twentytwenty.min.css
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
.twentytwenty-handle{z-index:40;position:absolute;left:50%;top:50%;height:64px;width:64px;margin-left:-32px;margin-top:-32px;border-radius:50%;box-shadow:0 3px 0 #338EA6;background:#40B1D0;cursor:pointer}.twentytwenty-horizontal .twentytwenty-handle:before,.twentytwenty-horizontal .twentytwenty-handle:after{left:50%;width:2px;height:9999px;margin-left:-1px}.twentytwenty-horizontal .twentytwenty-handle:before{bottom:50%;margin-bottom:32px;box-shadow:0 3px 0 white,0px 0px 12px rgba(51,51,51,0.5)}.twentytwenty-horizontal .twentytwenty-handle:after{top:50%;margin-top:34px;box-shadow:0 -3px 0 white,0px 0px 12px rgba(51,51,51,0.5)}.twentytwenty-horizontal .twentytwenty-handle:before,.twentytwenty-horizontal .twentytwenty-handle:after{content:"";position:absolute;z-index:30;display:block;background:#F2F5F7;box-shadow:0px 0px 12px rgba(51,51,51,0.5)}.twentytwenty-labels,.twentytwenty-overlay{position:absolute;top:0;width:100%;height:100%;-webkit-transition-duration:0.5s;transition-duration:0.5s}.twentytwenty-labels{opacity:1;-webkit-transition-property:opacity;transition-property:opacity}.twentytwenty-labels .twentytwenty-label-content{position:absolute;padding:0 12px;font-size:13px;letter-spacing:0.1em;line-height:38px;color:white;background:#1F2332;border-radius:2px}.twentytwenty-horizontal .twentytwenty-labels .twentytwenty-label-content{bottom:15px}.twentytwenty-after-label .twentytwenty-label-content{background:#40B1D0}.twentytwenty-left-arrow,.twentytwenty-right-arrow{position:absolute;width:0;height:0;border:8px inset transparent}.twentytwenty-left-arrow,.twentytwenty-right-arrow{top:50%;margin-top:-8px}.twentytwenty-container{box-sizing:content-box;position:relative;z-index:0;overflow:hidden;box-shadow:0 5px 10px rgba(0,0,0,0.15);opacity:0;-webkit-transition:opacity 0.4s;transition:opacity 0.4s;-webkit-user-select:none;-moz-user-select:none}.twentytwenty-container *{box-sizing:content-box}.twentytwenty-container img{position:absolute;top:0;display:block;width:100%;height:auto}.loaded .twentytwenty-container{opacity:1}.twentytwenty-container.active .twentytwenty-overlay .twentytwenty-labels,.twentytwenty-container.active .twentytwenty-overlay:hover .twentytwenty-labels{opacity:0}.twentytwenty-horizontal .twentytwenty-before-label .twentytwenty-label-content{left:15px}.twentytwenty-horizontal .twentytwenty-after-label .twentytwenty-label-content{right:15px}.twentytwenty-overlay{z-index:25}.twentytwenty-before{z-index:20}.twentytwenty-after{z-index:10}.twentytwenty-duo-buttons{position:absolute;top:10px;z-index:30;overflow:hidden}.twentytwenty-duo-buttons button{float:left;padding:2px 6px;font-size:11px;text-transform:uppercase;letter-spacing:0.125em;font-weight:bold;border:0;background:#1f2332;color:#FFF;transition:all .3s;cursor:pointer}.twentytwenty-duo-buttons button:hover,.twentytwenty-duo-buttons button:focus{background:#444}.twentytwenty-duo-buttons button:first-child{border-radius:3px 0 0 3px}.twentytwenty-duo-buttons button:last-child{border-radius:0 3px 3px 0}.twentytwenty-duo-buttons button.selected{background:#8bc34a;text-shadow:0 0 1px rgba(0,0,0,.2);cursor:default}.twentytwenty-duo-left{left:10px}.twentytwenty-duo-right{right:10px}.twentytwenty-left-arrow{left:50%;margin-left:-22px;border-right:8px solid white}.twentytwenty-right-arrow{right:50%;margin-right:-22px;border-left:8px solid white}
|
assets/images/bear-aggressive.jpg
ADDED
Binary file
|
assets/images/bear-normal.jpg
ADDED
Binary file
|
assets/images/bear-original.jpg
ADDED
Binary file
|
assets/images/bear-ultra.jpg
ADDED
Binary file
|
assets/images/bulk.svg
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
<svg viewBox="0 0 38 36" xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="evenodd"><path d="m233.09 177.21l-5.52 10.248c-.08.145-.018.272-.023.388-.074.193-.033.4-.033.619v21.615c0 .952.601 1.429 1.552 1.429h33.897c.952 0 1.962-.478 1.962-1.429v-21.615c0-.487-.323-.925-.649-1.24l-5.623-9.976c-.405-.726-1.202-1.179-2.034-1.182l-21.486-.068c-.849 0-1.64.464-2.043 1.211m30.424 32.869c0 .173-.378.018-.551.018h-33.897c-.172 0-.14.155-.14-.018v-21.576l33.961-.281c.066.008.186.09.263.128.054.027.205.049.258.073.002.014.106.027.106.041v21.615m-6.153-32.11l4.91 8.835h-14.992v-9.354l9.306.045c.322.001.619.192.776.474m-11.494-.523v9.358h-16.306l4.773-8.892c.155-.289.456-.484.787-.484l10.746.018m7.06 17.12c0 .39-.316.706-.706.706h-12.706c-.39 0-.706-.316-.706-.706 0-.39.316-.706.706-.706h12.706c.39 0 .706.316.706.706" transform="translate(-227-176)" fill="#7a8996"/></g></svg>
|
assets/images/check-mini.svg
ADDED
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
2 |
+
<svg width="8px" height="8px" viewBox="0 0 8 8" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sketch="http://www.bohemiancoding.com/sketch/ns">
|
3 |
+
<!-- Generator: Sketch 3.3.2 (12043) - http://www.bohemiancoding.com/sketch -->
|
4 |
+
<title>Path</title>
|
5 |
+
<desc>Created with Sketch.</desc>
|
6 |
+
<defs></defs>
|
7 |
+
<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" sketch:type="MSPage">
|
8 |
+
<g id="Imagify-Settings-Page" sketch:type="MSArtboardGroup" transform="translate(-409.000000, -548.000000)" fill="#8BA6B4">
|
9 |
+
<g id="checkboxes" sketch:type="MSLayerGroup" transform="translate(403.000000, 347.000000)">
|
10 |
+
<path d="M13.3901875,201.101875 C13.12075,200.944375 12.7770625,201.04 12.6218125,201.304375 L9.024625,207.536875 L7.012,205.680625 C6.799375,205.455625 6.4433125,205.444375 6.216625,205.658125 C5.9899375,205.86625 5.978125,206.22625 6.19075,206.45125 L8.7625,208.825 C8.9745625,209.05 9.330625,209.06125 9.5573125,208.8475 C9.6259375,208.785625 13.5960625,201.866875 13.5960625,201.866875 C13.7513125,201.6025 13.6590625,201.25375 13.3901875,201.101875 L13.3901875,201.101875 Z" id="Path" sketch:type="MSShapeGroup"></path>
|
11 |
+
</g>
|
12 |
+
</g>
|
13 |
+
</g>
|
14 |
+
</svg>
|
assets/images/check.svg
ADDED
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
2 |
+
<svg width="15px" height="16px" viewBox="0 0 15 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sketch="http://www.bohemiancoding.com/sketch/ns">
|
3 |
+
<!-- Generator: Sketch 3.3.2 (12043) - http://www.bohemiancoding.com/sketch -->
|
4 |
+
<title>Path</title>
|
5 |
+
<desc>Created with Sketch.</desc>
|
6 |
+
<defs></defs>
|
7 |
+
<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" sketch:type="MSPage">
|
8 |
+
<g id="Imagify-Settings-Page" sketch:type="MSArtboardGroup" transform="translate(-411.000000, -355.000000)" fill="#8BA6B4">
|
9 |
+
<g id="checkboxes" sketch:type="MSLayerGroup" transform="translate(403.000000, 347.000000)">
|
10 |
+
<path d="M22.027,9.07 C21.548,8.79 20.937,8.96 20.661,9.43 L14.266,20.51 L10.688,17.21 C10.31,16.81 9.677,16.79 9.274,17.17 C8.871,17.54 8.85,18.18 9.228,18.58 L13.8,22.8 C14.177,23.2 14.81,23.22 15.213,22.84 C15.335,22.73 22.393,10.43 22.393,10.43 C22.669,9.96 22.505,9.34 22.027,9.07 L22.027,9.07 Z" id="Path" sketch:type="MSShapeGroup"></path>
|
11 |
+
</g>
|
12 |
+
</g>
|
13 |
+
</g>
|
14 |
+
</svg>
|
assets/images/cloudy-sun.svg
ADDED
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0" encoding="utf-8"?>
|
2 |
+
<!-- Generator: Adobe Illustrator 19.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
3 |
+
<svg version="1.1" id="Calque_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
4 |
+
viewBox="0 0 74 63.3" style="enable-background:new 0 0 74 63.3;" xml:space="preserve">
|
5 |
+
<style type="text/css">
|
6 |
+
.st0{fill:#F5A623;}
|
7 |
+
</style>
|
8 |
+
<g>
|
9 |
+
<circle class="st0" cx="41.9" cy="11.5" r="1.2"/>
|
10 |
+
<circle class="st0" cx="27.7" cy="5.7" r="1.2"/>
|
11 |
+
<circle class="st0" cx="7.1" cy="26.3" r="1.2"/>
|
12 |
+
<circle class="st0" cx="13.3" cy="11.7" r="1.2"/>
|
13 |
+
</g>
|
14 |
+
<path class="st0" d="M45.8,16.1c-1.9,0-3.7,0.2-5.5,0.7c-2.9-3.8-7.5-6.3-12.7-6.3c-8.8,0-15.9,7.1-15.9,15.9c0,2.6,0.6,5.1,1.8,7.2
|
15 |
+
c-1.6,0.7-3,1.7-4.3,3c-5.9,5.9-6,15.4-0.2,21.2c2.3,2.3,5.3,2.9,7.6,3.1c0.5,0.1,12.1,0.3,20.9,0.3c1.6,0,3,0,4.3,0
|
16 |
+
c1.2,0,2.3,0,3.2,0c1.9,0,3.2-0.1,4.3-0.3c0,0,0,0,0,0c0,0,0,0,0,0C60,58.8,68.1,49.3,68.1,38.9C68.1,26.3,58.1,16.1,45.8,16.1z
|
17 |
+
M13.7,26.4c0-7.7,6.2-13.9,13.9-13.9c4.3,0,8.1,2,10.6,5c-6.7,2.5-12.1,8.1-14.2,15.2c-2.9-0.8-5.9-0.7-8.8,0.2
|
18 |
+
C14.3,31,13.7,28.8,13.7,26.4z M48.9,59.2C48.9,59.2,48.9,59.2,48.9,59.2c-1.3,0.3-3.7,0.2-7,0.2c-1.3,0-2.8,0-4.4,0
|
19 |
+
c-9.3,0-20.1-0.3-20.6-0.3c-2.2-0.2-4.6-0.7-6.4-2.6c-5-5-4.9-13.3,0.2-18.4c3.6-3.6,9-4.9,13.7-3.2c0.5,0.2,1.1-0.1,1.3-0.6
|
20 |
+
c0-0.1,0-0.1,0-0.2c0.1-0.1,0.2-0.2,0.2-0.4c2.4-9,10.8-15.6,19.9-15.6c11.2,0,20.2,9.3,20.2,20.8C66.1,48.3,58.7,57.1,48.9,59.2z"
|
21 |
+
/>
|
22 |
+
</svg>
|
assets/images/facebook_c.svg
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
<svg viewBox="0 0 18 18" xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="evenodd"><path d="m203.25 10h-16.5c-.415 0-.75.336-.75.75v16.5c0 .414.336.75.75.75h8.812v-6.75h-2.25v-2.813h2.25v-2.25c0-2.325 1.472-3.469 3.546-3.469.993 0 1.847.074 2.096.107v2.43h-1.438c-1.128 0-1.391.536-1.391 1.322v1.859h2.813l-.563 2.813h-2.25l.045 6.75h4.83c.414 0 .75-.336.75-.75v-16.5c0-.414-.336-.75-.75-.75" transform="translate(-186-10)" fill="#fff"/></g></svg>
|
assets/images/gear.svg
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
<svg viewBox="0 0 49 48" xmlns="http://www.w3.org/2000/svg"><g fill="#7a8996" fill-rule="evenodd" transform="translate(.868)"><path d="m3 29.25h2.875c.647 0 1.22.413 1.424 1.027l.547 1.64c.182.543.043 1.132-.361 1.537l-1.925 1.924c-.567.567-.88 1.321-.88 2.123 0 .802.313 1.556.88 2.123l2.815 2.816c.567.567 1.321.88 2.123.88.802 0 1.556-.313 2.123-.88l1.924-1.924c.399-.398 1-.54 1.536-.362l1.641.547c.614.205 1.027.777 1.027 1.424v2.876c0 1.655 1.346 3 3 3h4.497c1.655 0 3-1.346 3-3v-2.876c0-.647.413-1.219 1.027-1.424l1.641-.547c.535-.178 1.138-.036 1.536.362l1.924 1.924c.567.567 1.321.88 2.123.88.802 0 1.556-.313 2.123-.88l2.816-2.816c.567-.567.88-1.321.88-2.123 0-.802-.313-1.556-.88-2.123l-1.924-1.924c-.405-.405-.544-.994-.362-1.537l.546-1.64c.205-.614.778-1.027 1.425-1.027h2.876c1.655 0 3-1.346 3-3v-4.497c0-1.655-1.346-3-3-3h-2.876c-.647 0-1.22-.413-1.424-1.027l-.547-1.64c-.181-.543-.043-1.132.362-1.537l1.924-1.924c.567-.567.88-1.321.88-2.123 0-.802-.313-1.556-.88-2.123l-2.816-2.815c-.567-.567-1.321-.88-2.123-.88-.802 0-1.556.313-2.123.88l-1.924 1.924c-.398.399-1 .541-1.536.362l-1.641-.547c-.614-.205-1.027-.777-1.027-1.424v-2.875c0-1.655-1.346-3-3-3h-4.497c-1.655 0-3 1.346-3 3v2.875c0 .647-.413 1.22-1.027 1.424l-1.641.547c-.533.179-1.137.037-1.536-.362l-1.924-1.924c-.567-.567-1.321-.88-2.123-.88-.802 0-1.556.313-2.123.88l-2.815 2.815c-.567.567-.88 1.321-.88 2.123 0 .802.313 1.556.88 2.123l1.925 1.924c.404.405.543.994.361 1.537l-.546 1.64c-.205.614-.778 1.027-1.425 1.027h-2.875c-1.655 0-3 1.346-3 3v4.497c0 1.655 1.346 3 3 3m-1.502-7.499c0-.828.674-1.502 1.502-1.502h2.875c1.294 0 2.438-.825 2.849-2.053l.546-1.64c.361-1.085.084-2.262-.724-3.071l-1.925-1.924c-.283-.284-.44-.661-.44-1.062 0-.401.157-.778.44-1.062l2.816-2.816c.567-.567 1.557-.567 2.124 0l1.924 1.924c.796.796 2 1.082 3.071.725l1.641-.547c1.227-.409 2.052-1.553 2.052-2.848v-2.875c0-.828.674-1.502 1.502-1.502h4.497c.827 0 1.502.674 1.502 1.502v2.875c0 1.295.825 2.438 2.052 2.848l1.641.547c1.067.356 2.276.071 3.071-.725l1.924-1.924c.567-.567 1.557-.567 2.124 0l2.816 2.816c.284.284.44.661.44 1.062 0 .401-.157.778-.44 1.062l-1.924 1.924c-.809.809-1.087 1.986-.725 3.071l.547 1.641c.41 1.227 1.554 2.052 2.848 2.052h2.876c.828 0 1.502.674 1.502 1.502v4.497c0 .828-.673 1.502-1.502 1.502h-2.876c-1.294 0-2.438.825-2.848 2.053l-.546 1.64c-.361 1.085-.084 2.262.725 3.071l1.924 1.924c.284.284.44.661.44 1.062 0 .401-.157.778-.44 1.062l-2.816 2.816c-.567.567-1.557.567-2.124 0l-1.924-1.924c-.795-.796-2-1.081-3.071-.725l-1.641.547c-1.227.41-2.052 1.553-2.052 2.848v2.876c0 .828-.674 1.502-1.502 1.502h-4.497c-.828 0-1.502-.673-1.502-1.502v-2.876c0-1.294-.825-2.438-2.052-2.848l-1.641-.547c-.307-.102-.626-.154-.949-.154-.802 0-1.556.312-2.123.879l-1.924 1.924c-.567.567-1.557.567-2.124 0l-2.816-2.816c-.283-.284-.44-.661-.44-1.062 0-.401.157-.778.44-1.062l1.925-1.924c.808-.809 1.086-1.986.724-3.071l-.547-1.641c-.409-1.227-1.554-2.052-2.848-2.052h-2.875c-.827 0-1.502-.674-1.502-1.502v-4.497"/><path d="m24 29.25c.396 0 .797-.044 1.192-.132 1.951-.433 3.493-1.974 3.925-3.926.354-1.595-.019-3.226-1.021-4.475-1.251-1.558-3.293-2.279-5.289-1.834-1.951.433-3.493 1.974-3.925 3.926-.354 1.595.019 3.225 1.021 4.474 1 1.25 2.496 1.967 4.096 1.967m-3.653-6.117c.302-1.364 1.422-2.484 2.786-2.787.289-.063.581-.096.867-.096 1.144 0 2.209.512 2.927 1.405.716.893.982 2.064.727 3.212-.302 1.364-1.422 2.484-2.786 2.787-.289.063-.58.096-.866.096-1.144 0-2.21-.512-2.927-1.406-.716-.893-.982-2.064-.727-3.212"/></g></svg>
|
assets/images/imagify-logo.png
ADDED
Binary file
|
assets/images/imagify-menu-bar.jpg
ADDED
Binary file
|
assets/images/key.svg
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
<svg viewBox="0 0 51 50" xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="evenodd" transform="translate(1.5 1)"><path d="m41.36 22.552h-23.986c-.323-2.979-2.74-5.302-5.666-5.302-3.146 0-5.705 2.684-5.705 5.982 0 3.299 2.559 5.982 5.705 5.982 2.951 0 5.386-2.361 5.676-5.376h17.547v3.857c0 .355.287.643.643.643.355 0 .643-.287.643-.643v-3.857h4.499l-.009 5.703c-.001.355.287.726.642.726.355 0 .644-.368.644-.723l.01-6.306c0-.17-.067-.355-.188-.475-.12-.122-.284-.21-.455-.21m-29.652 5.376c-2.436 0-4.419-2.107-4.419-4.696 0-2.59 1.983-4.697 4.419-4.697 2.437 0 4.42 2.107 4.42 4.697 0 2.589-1.983 4.696-4.42 4.696" fill="#7a8996"/><circle stroke="#7a8996" stroke-width="2" cx="24" cy="24" r="24"/></g></svg>
|
assets/images/loader-balls.svg
ADDED
@@ -0,0 +1,144 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" width="32" height="32" fill="#7a8996">
|
2 |
+
<circle transform="translate(8 0)" cx="0" cy="16" r="0">
|
3 |
+
<animate attributeName="r" values="0; 4; 0; 0" dur="1.2s" repeatCount="indefinite" begin="0" keytimes="0;0.2;0.7;1" keySplines="0.2 0.2 0.4 0.8;0.2 0.6 0.4 0.8;0.2 0.6 0.4 0.8" calcMode="spline"/>
|
4 |
+
</circle>
|
5 |
+
<circle transform="translate(16 0)" cx="0" cy="16" r="0">
|
6 |
+
<animate attributeName="r" values="0; 4; 0; 0" dur="1.2s" repeatCount="indefinite" begin="0.3" keytimes="0;0.2;0.7;1" keySplines="0.2 0.2 0.4 0.8;0.2 0.6 0.4 0.8;0.2 0.6 0.4 0.8" calcMode="spline"/>
|
7 |
+
</circle>
|
8 |
+
<circle transform="translate(24 0)" cx="0" cy="16" r="0">
|
9 |
+
<animate attributeName="r" values="0; 4; 0; 0" dur="1.2s" repeatCount="indefinite" begin="0.6" keytimes="0;0.2;0.7;1" keySplines="0.2 0.2 0.4 0.8;0.2 0.6 0.4 0.8;0.2 0.6 0.4 0.8" calcMode="spline"/>
|
10 |
+
</circle>
|
11 |
+
<style xmlns="http://www.w3.org/1999/xhtml" charset="utf-8" type="text/css" class="firebugResetStyles">/* See license.txt for terms of usage */
|
12 |
+
/** reset styling **/
|
13 |
+
.firebugResetStyles {
|
14 |
+
z-index: 2147483646 !important;
|
15 |
+
top: 0 !important;
|
16 |
+
left: 0 !important;
|
17 |
+
display: block !important;
|
18 |
+
border: 0 none !important;
|
19 |
+
margin: 0 !important;
|
20 |
+
padding: 0 !important;
|
21 |
+
outline: 0 !important;
|
22 |
+
min-width: 0 !important;
|
23 |
+
max-width: none !important;
|
24 |
+
min-height: 0 !important;
|
25 |
+
max-height: none !important;
|
26 |
+
position: fixed !important;
|
27 |
+
transform: rotate(0deg) !important;
|
28 |
+
transform-origin: 50% 50% !important;
|
29 |
+
border-radius: 0 !important;
|
30 |
+
box-shadow: none !important;
|
31 |
+
background: transparent none !important;
|
32 |
+
pointer-events: none !important;
|
33 |
+
white-space: normal !important;
|
34 |
+
}
|
35 |
+
style.firebugResetStyles {
|
36 |
+
display: none !important;
|
37 |
+
}
|
38 |
+
|
39 |
+
.firebugBlockBackgroundColor {
|
40 |
+
background-color: transparent !important;
|
41 |
+
}
|
42 |
+
|
43 |
+
.firebugResetStyles:before, .firebugResetStyles:after {
|
44 |
+
content: "" !important;
|
45 |
+
}
|
46 |
+
/**actual styling to be modified by firebug theme**/
|
47 |
+
.firebugCanvas {
|
48 |
+
display: none !important;
|
49 |
+
}
|
50 |
+
|
51 |
+
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
52 |
+
.firebugLayoutBox {
|
53 |
+
width: auto !important;
|
54 |
+
position: static !important;
|
55 |
+
}
|
56 |
+
|
57 |
+
.firebugLayoutBoxOffset {
|
58 |
+
opacity: 0.8 !important;
|
59 |
+
position: fixed !important;
|
60 |
+
}
|
61 |
+
|
62 |
+
.firebugLayoutLine {
|
63 |
+
opacity: 0.4 !important;
|
64 |
+
background-color: #000000 !important;
|
65 |
+
}
|
66 |
+
|
67 |
+
.firebugLayoutLineLeft, .firebugLayoutLineRight {
|
68 |
+
width: 1px !important;
|
69 |
+
height: 100% !important;
|
70 |
+
}
|
71 |
+
|
72 |
+
.firebugLayoutLineTop, .firebugLayoutLineBottom {
|
73 |
+
width: 100% !important;
|
74 |
+
height: 1px !important;
|
75 |
+
}
|
76 |
+
|
77 |
+
.firebugLayoutLineTop {
|
78 |
+
margin-top: -1px !important;
|
79 |
+
border-top: 1px solid #999999 !important;
|
80 |
+
}
|
81 |
+
|
82 |
+
.firebugLayoutLineRight {
|
83 |
+
border-right: 1px solid #999999 !important;
|
84 |
+
}
|
85 |
+
|
86 |
+
.firebugLayoutLineBottom {
|
87 |
+
border-bottom: 1px solid #999999 !important;
|
88 |
+
}
|
89 |
+
|
90 |
+
.firebugLayoutLineLeft {
|
91 |
+
margin-left: -1px !important;
|
92 |
+
border-left: 1px solid #999999 !important;
|
93 |
+
}
|
94 |
+
|
95 |
+
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
96 |
+
.firebugLayoutBoxParent {
|
97 |
+
border-top: 0 none !important;
|
98 |
+
border-right: 1px dashed #E00 !important;
|
99 |
+
border-bottom: 1px dashed #E00 !important;
|
100 |
+
border-left: 0 none !important;
|
101 |
+
position: fixed !important;
|
102 |
+
width: auto !important;
|
103 |
+
}
|
104 |
+
|
105 |
+
.firebugRuler{
|
106 |
+
position: absolute !important;
|
107 |
+
}
|
108 |
+
|
109 |
+
.firebugRulerH {
|
110 |
+
top: -15px !important;
|
111 |
+
left: 0 !important;
|
112 |
+
width: 100% !important;
|
113 |
+
height: 14px !important;
|
114 |
+
background: url("data:image/png,%89PNG%0D%0A%1A%0A%00%00%00%0DIHDR%00%00%13%88%00%00%00%0E%08%02%00%00%00L%25a%0A%00%00%00%04gAMA%00%00%D6%D8%D4OX2%00%00%00%19tEXtSoftware%00Adobe%20ImageReadyq%C9e%3C%00%00%04%F8IDATx%DA%EC%DD%D1n%E2%3A%00E%D1%80%F8%FF%EF%E2%AF2%95%D0D4%0E%C1%14%B0%8Fa-%E9%3E%CC%9C%87n%B9%81%A6W0%1C%A6i%9A%E7y%0As8%1CT%A9R%A5J%95*U%AAT%A9R%A5J%95*U%AAT%A9R%A5J%95*U%AAT%A9R%A5J%95*U%AAT%A9R%A5J%95*U%AAT%A9R%A5J%95*U%AAT%A9R%A5J%95*U%AATE9%FE%FCw%3E%9F%AF%2B%2F%BA%97%FDT%1D~K(%5C%9D%D5%EA%1B%5C%86%B5%A9%BDU%B5y%80%ED%AB*%03%FAV9%AB%E1%CEj%E7%82%EF%FB%18%BC%AEJ8%AB%FA'%D2%BEU9%D7U%ECc0%E1%A2r%5DynwVi%CFW%7F%BB%17%7Dy%EACU%CD%0E%F0%FA%3BX%FEbV%FEM%9B%2B%AD%BE%AA%E5%95v%AB%AA%E3E5%DCu%15rV9%07%B5%7F%B5w%FCm%BA%BE%AA%FBY%3D%14%F0%EE%C7%60%0EU%AAT%A9R%A5J%95*U%AAT%A9R%A5J%95*U%AAT%A9R%A5J%95*U%AAT%A9R%A5J%95*U%AAT%A9R%A5JU%88%D3%F5%1F%AE%DF%3B%1B%F2%3E%DAUCNa%F92%D02%AC%7Dm%F9%3A%D4%F2%8B6%AE*%BF%5C%C2Ym~9g5%D0Y%95%17%7C%C8c%B0%7C%18%26%9CU%CD%13i%F7%AA%90%B3Z%7D%95%B4%C7%60%E6E%B5%BC%05%B4%FBY%95U%9E%DB%FD%1C%FC%E0%9F%83%7F%BE%17%7DkjMU%E3%03%AC%7CWj%DF%83%9An%BCG%AE%F1%95%96yQ%0Dq%5Dy%00%3Et%B5'%FC6%5DS%95pV%95%01%81%FF'%07%00%00%00%00%00%00%00%00%00%F8x%C7%F0%BE%9COp%5D%C9%7C%AD%E7%E6%EBV%FB%1E%E0(%07%E5%AC%C6%3A%ABi%9C%8F%C6%0E9%AB%C0'%D2%8E%9F%F99%D0E%B5%99%14%F5%0D%CD%7F%24%C6%DEH%B8%E9rV%DFs%DB%D0%F7%00k%FE%1D%84%84%83J%B8%E3%BA%FB%EF%20%84%1C%D7%AD%B0%8E%D7U%C8Y%05%1E%D4t%EF%AD%95Q%BF8w%BF%E9%0A%BF%EB%03%00%00%00%00%00%00%00%00%00%B8vJ%8E%BB%F5%B1u%8Cx%80%E1o%5E%CA9%AB%CB%CB%8E%03%DF%1D%B7T%25%9C%D5(%EFJM8%AB%CC'%D2%B2*%A4s%E7c6%FB%3E%FA%A2%1E%80~%0E%3E%DA%10x%5D%95Uig%15u%15%ED%7C%14%B6%87%A1%3B%FCo8%A8%D8o%D3%ADO%01%EDx%83%1A~%1B%9FpP%A3%DC%C6'%9C%95gK%00%00%00%00%00%00%00%00%00%20%D9%C9%11%D0%C0%40%AF%3F%EE%EE%92%94%D6%16X%B5%BCMH%15%2F%BF%D4%A7%C87%F1%8E%F2%81%AE%AAvzr%DA2%ABV%17%7C%E63%83%E7I%DC%C6%0Bs%1B%EF6%1E%00%00%00%00%00%00%00%00%00%80cr%9CW%FF%7F%C6%01%0E%F1%CE%A5%84%B3%CA%BC%E0%CB%AA%84%CE%F9%BF)%EC%13%08WU%AE%AB%B1%AE%2BO%EC%8E%CBYe%FE%8CN%ABr%5Dy%60~%CFA%0D%F4%AE%D4%BE%C75%CA%EDVB%EA(%B7%F1%09g%E5%D9%12%00%00%00%00%00%00%00%00%00H%F6%EB%13S%E7y%5E%5E%FB%98%F0%22%D1%B2'%A7%F0%92%B1%BC%24z3%AC%7Dm%60%D5%92%B4%7CEUO%5E%F0%AA*%3BU%B9%AE%3E%A0j%94%07%A0%C7%A0%AB%FD%B5%3F%A0%F7%03T%3Dy%D7%F7%D6%D4%C0%AAU%D2%E6%DFt%3F%A8%CC%AA%F2%86%B9%D7%F5%1F%18%E6%01%F8%CC%D5%9E%F0%F3z%88%AA%90%EF%20%00%00%00%00%00%00%00%00%00%C0%A6%D3%EA%CFi%AFb%2C%7BB%0A%2B%C3%1A%D7%06V%D5%07%A8r%5D%3D%D9%A6%CAu%F5%25%CF%A2%99%97zNX%60%95%AB%5DUZ%D5%FBR%03%AB%1C%D4k%9F%3F%BB%5C%FF%81a%AE%AB'%7F%F3%EA%FE%F3z%94%AA%D8%DF%5B%01%00%00%00%00%00%00%00%00%00%8E%FB%F3%F2%B1%1B%8DWU%AAT%A9R%A5J%95*U%AAT%A9R%A5J%95*U%AAT%A9R%A5J%95*U%AAT%A9R%A5J%95*U%AAT%A9R%A5J%95*U%AAT%A9R%A5J%95*U%AAT%A9R%A5J%95*UiU%C7%BBe%E7%F3%B9%CB%AAJ%95*U%AAT%A9R%A5J%95*U%AAT%A9R%A5J%95*U%AAT%A9R%A5J%95*U%AAT%A9R%A5J%95*U%AAT%A9R%A5J%95*U%AAT%A9R%A5J%95*U%AAT%A9R%A5*%AAj%FD%C6%D4%5Eo%90%B5Z%ADV%AB%D5j%B5Z%ADV%AB%D5j%B5Z%ADV%AB%D5j%B5Z%ADV%AB%D5j%B5Z%ADV%AB%D5j%B5Z%ADV%AB%D5j%B5Z%ADV%AB%D5j%B5%86%AF%1B%9F%98%DA%EBm%BBV%AB%D5j%B5Z%ADV%AB%D5j%B5Z%ADV%AB%D5j%B5Z%ADV%AB%D5j%B5Z%ADV%AB%D5j%B5Z%ADV%AB%D5j%B5Z%ADV%AB%D5j%B5Z%AD%D6%E4%F58%01%00%00%00%00%00%00%00%00%00%00%00%00%00%40%85%7F%02%0C%008%C2%D0H%16j%8FX%00%00%00%00IEND%AEB%60%82") repeat-x !important;
|
115 |
+
border-top: 1px solid #BBBBBB !important;
|
116 |
+
border-right: 1px dashed #BBBBBB !important;
|
117 |
+
border-bottom: 1px solid #000000 !important;
|
118 |
+
}
|
119 |
+
|
120 |
+
.firebugRulerV {
|
121 |
+
top: 0 !important;
|
122 |
+
left: -15px !important;
|
123 |
+
width: 14px !important;
|
124 |
+
height: 100% !important;
|
125 |
+
background: url("data:image/png,%89PNG%0D%0A%1A%0A%00%00%00%0DIHDR%00%00%00%0E%00%00%13%88%08%02%00%00%00%0E%F5%CB%10%00%00%00%04gAMA%00%00%D6%D8%D4OX2%00%00%00%19tEXtSoftware%00Adobe%20ImageReadyq%C9e%3C%00%00%06~IDATx%DA%EC%DD%D1v%A20%14%40Qt%F1%FF%FF%E4%97%D9%07%3BT%19%92%DC%40(%90%EEy%9A5%CB%B6%E8%F6%9Ac%A4%CC0%84%FF%DC%9E%CF%E7%E3%F1%88%DE4%F8%5D%C7%9F%2F%BA%DD%5E%7FI%7D%F18%DDn%BA%C5%FB%DF%97%BFk%F2%10%FF%FD%B4%F2M%A7%FB%FD%FD%B3%22%07p%8F%3F%AE%E3%F4S%8A%8F%40%EEq%9D%BE8D%F0%0EY%A1Uq%B7%EA%1F%81%88V%E8X%3F%B4%CEy%B7h%D1%A2E%EBohU%FC%D9%AF2fO%8BBeD%BE%F7X%0C%97%A4%D6b7%2Ck%A5%12%E3%9B%60v%B7r%C7%1AI%8C%BD%2B%23r%00c0%B2v%9B%AD%CA%26%0C%1Ek%05A%FD%93%D0%2B%A1u%8B%16-%95q%5Ce%DCSO%8E%E4M%23%8B%F7%C2%FE%40%BB%BD%8C%FC%8A%B5V%EBu%40%F9%3B%A72%FA%AE%8C%D4%01%CC%B5%DA%13%9CB%AB%E2I%18%24%B0n%A9%0CZ*Ce%9C%A22%8E%D8NJ%1E%EB%FF%8F%AE%CAP%19*%C3%BAEKe%AC%D1%AAX%8C*%DEH%8F%C5W%A1e%AD%D4%B7%5C%5B%19%C5%DB%0D%EF%9F%19%1D%7B%5E%86%BD%0C%95%A12%AC%5B*%83%96%CAP%19%F62T%86%CAP%19*%83%96%CA%B8Xe%BC%FE)T%19%A1%17xg%7F%DA%CBP%19*%C3%BA%A52T%86%CAP%19%F62T%86%CA%B0n%A9%0CZ%1DV%C6%3D%F3%FCH%DE%B4%B8~%7F%5CZc%F1%D6%1F%AF%84%F9%0F6%E6%EBVt9%0E~%BEr%AF%23%B0%97%A12T%86%CAP%19%B4T%86%CA%B8Re%D8%CBP%19*%C3%BA%A52huX%19%AE%CA%E5%BC%0C%7B%19*CeX%B7h%A9%0C%95%E1%BC%0C%7B%19*CeX%B7T%06%AD%CB%5E%95%2B%BF.%8F%C5%97%D5%E4%7B%EE%82%D6%FB%CF-%9C%FD%B9%CF%3By%7B%19%F62T%86%CA%B0n%D1R%19*%A3%D3%CA%B0%97%A12T%86uKe%D0%EA%B02*%3F1%99%5DB%2B%A4%B5%F8%3A%7C%BA%2B%8Co%7D%5C%EDe%A8%0C%95a%DDR%19%B4T%C66%82fA%B2%ED%DA%9FC%FC%17GZ%06%C9%E1%B3%E5%2C%1A%9FoiB%EB%96%CA%A0%D5qe4%7B%7D%FD%85%F7%5B%ED_%E0s%07%F0k%951%ECr%0D%B5C%D7-g%D1%A8%0C%EB%96%CA%A0%A52T%C6)*%C3%5E%86%CAP%19%D6-%95A%EB*%95q%F8%BB%E3%F9%AB%F6%E21%ACZ%B7%22%B7%9B%3F%02%85%CB%A2%5B%B7%BA%5E%B7%9C%97%E1%BC%0C%EB%16-%95%A12z%AC%0C%BFc%A22T%86uKe%D0%EA%B02V%DD%AD%8A%2B%8CWhe%5E%AF%CF%F5%3B%26%CE%CBh%5C%19%CE%CB%B0%F3%A4%095%A1%CAP%19*Ce%A8%0C%3BO*Ce%A8%0C%95%A12%3A%AD%8C%0A%82%7B%F0v%1F%2FD%A9%5B%9F%EE%EA%26%AF%03%CA%DF9%7B%19*Ce%A8%0C%95%A12T%86%CA%B8Ze%D8%CBP%19*Ce%A8%0C%95%D1ae%EC%F7%89I%E1%B4%D7M%D7P%8BjU%5C%BB%3E%F2%20%D8%CBP%19*Ce%A8%0C%95%A12T%C6%D5*%C3%5E%86%CAP%19*Ce%B4O%07%7B%F0W%7Bw%1C%7C%1A%8C%B3%3B%D1%EE%AA%5C%D6-%EBV%83%80%5E%D0%CA%10%5CU%2BD%E07YU%86%CAP%19*%E3%9A%95%91%D9%A0%C8%AD%5B%EDv%9E%82%FFKOee%E4%8FUe%A8%0C%95%A12T%C6%1F%A9%8C%C8%3D%5B%A5%15%FD%14%22r%E7B%9F%17l%F8%BF%ED%EAf%2B%7F%CF%ECe%D8%CBP%19*Ce%A8%0C%95%E1%93~%7B%19%F62T%86%CAP%19*Ce%A8%0C%E7%13%DA%CBP%19*Ce%A8%0CZf%8B%16-Z%B4h%D1R%19f%8B%16-Z%B4h%D1R%19%B4%CC%16-Z%B4h%D1R%19%B4%CC%16-Z%B4h%D1%A2%A52%CC%16-Z%B4h%D1%A2%A52h%99-Z%B4h%D1%A2%A52h%99-Z%B4h%D1%A2EKe%98-Z%B4h%D1%A2EKe%D02%5B%B4h%D1%A2EKe%D02%5B%B4h%D1%A2E%8B%96%CA0%5B%B4h%D1%A2E%8B%96%CA%A0e%B6h%D1%A2E%8B%96%CA%A0e%B6h%D1%A2E%8B%16-%95a%B6h%D1%A2E%8B%16-%95A%CBl%D1%A2E%8B%16-%95A%CBl%D1%A2E%8B%16-Z*%C3l%D1%A2E%8B%16-Z*%83%96%D9%A2E%8B%16-Z*%83%96%D9%A2E%8B%16-Z%B4T%86%D9%A2E%8B%16-Z%B4T%06-%B3E%8B%16-Z%B4T%06-%B3E%8B%16-Z%B4h%A9%0C%B3E%8B%16-Z%B4h%A9%0CZf%8B%16-Z%B4h%A9%0CZf%8B%16-Z%B4h%D1R%19f%8B%16-Z%B4h%D1R%19%B4%CC%16-Z%B4h%D1R%19%B4%CC%16-Z%B4h%D1%A2%A52%CC%16-Z%B4h%D1%A2%A52h%99-Z%B4h%D1%A2%A52h%99-Z%B4h%D1%A2EKe%98-Z%B4h%D1%A2EKe%D02%5B%B4h%D1%A2EKe%D02%5B%B4h%D1%A2E%8B%96%CA0%5B%B4h%D1%A2E%8B%96%CA%A0e%B6h%D1%A2E%8B%96%CA%A0e%B6h%D1%A2E%8B%16-%95a%B6h%D1%A2E%8B%16-%95A%CBl%D1%A2E%8B%16-%95A%CBl%D1%A2E%8B%16-Z*%C3l%D1%A2E%8B%16-Z*%83%96%D9%A2E%8B%16-Z*%83%96%D9%A2E%8B%16-Z%B4T%86%D9%A2E%8B%16-Z%B4T%06-%B3E%8B%16-Z%B4T%06-%B3E%8B%16-Z%B4h%A9%0C%B3E%8B%16-Z%B4h%A9%0CZf%8B%16-Z%B4h%A9%0CZf%8B%16-Z%B4h%D1R%19f%8B%16-Z%B4h%D1R%19%B4%CC%16-Z%B4h%D1R%19%B4%CC%16-Z%B4h%D1%A2%A52%CC%16-Z%B4h%D1%A2%A52h%99-Z%B4h%D1%A2%A52h%99-Z%B4h%D1%A2EKe%98-Z%B4h%D1%A2EKe%D02%5B%B4h%D1%A2EKe%D02%5B%B4h%D1%A2E%8B%96%CA0%5B%B4h%D1%A2E%8B%96%CA%A0e%B6h%D1%A2E%8B%96%CA%A0e%B6h%D1%A2E%8B%16-%95a%B6h%D1%A2E%8B%16-%95A%CBl%D1%A2E%8B%16-%95A%CBl%D1%A2E%8B%16-Z*%C3l%D1%A2E%8B%16-Z*%83%96%D9%A2E%8B%16-Z*%83%96%D9%A2E%8B%16-Z%B4T%86%D9%A2E%8B%16-Z%B4T%06-%B3E%8B%16-Z%B4%AE%A4%F5%25%C0%00%DE%BF%5C'%0F%DA%B8q%00%00%00%00IEND%AEB%60%82") repeat-y !important;
|
126 |
+
border-left: 1px solid #BBBBBB !important;
|
127 |
+
border-right: 1px solid #000000 !important;
|
128 |
+
border-bottom: 1px dashed #BBBBBB !important;
|
129 |
+
}
|
130 |
+
|
131 |
+
.overflowRulerX > .firebugRulerV {
|
132 |
+
left: 0 !important;
|
133 |
+
}
|
134 |
+
|
135 |
+
.overflowRulerY > .firebugRulerH {
|
136 |
+
top: 0 !important;
|
137 |
+
}
|
138 |
+
|
139 |
+
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
140 |
+
.fbProxyElement {
|
141 |
+
position: fixed !important;
|
142 |
+
pointer-events: auto !important;
|
143 |
+
}
|
144 |
+
</style></svg>
|
assets/images/mail.svg
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
<svg viewBox="0 0 21 18" xmlns="http://www.w3.org/2000/svg"><g fill="#40b1d0" fill-rule="evenodd"><path d="m1.967 5.913c.259.183 1.041.726 2.344 1.629 1.304.903 2.302 1.599 2.996 2.087.076.053.238.17.486.349.248.179.454.324.617.435.164.11.362.234.595.372.233.137.452.24.658.308.206.069.396.103.572.103h.012.012c.175 0 .366-.034.572-.103.206-.068.425-.172.658-.308.232-.137.431-.261.595-.372.164-.11.37-.255.617-.435.248-.179.41-.295.486-.349.701-.488 2.485-1.727 5.351-3.716.556-.389 1.021-.858 1.395-1.406.374-.549.56-1.124.56-1.726 0-.503-.181-.934-.543-1.292-.362-.358-.791-.537-1.286-.537h-16.832c-.587 0-1.039.198-1.355.595-.316.396-.475.892-.475 1.487 0 .48.21 1 .629 1.561.419.56.865 1 1.338 1.321"/><path d="m19.348 7.136c-2.5 1.692-4.399 3.01-5.694 3.945-.435.32-.787.57-1.058.749-.271.179-.631.362-1.081.549-.45.187-.869.28-1.258.28h-.012-.012c-.389 0-.808-.093-1.258-.28-.45-.187-.81-.37-1.081-.549-.271-.179-.623-.429-1.058-.749-1.029-.755-2.924-2.07-5.683-3.945-.435-.29-.82-.621-1.155-.995v9.08c0 .503.179.934.537 1.292.358.358.789.538 1.292.538h16.832c.503 0 .934-.179 1.292-.538.358-.358.537-.789.537-1.292v-9.08c-.328.366-.709.698-1.144.995"/></g></svg>
|
assets/images/penseur-aggressive.jpg
ADDED
Binary file
|
assets/images/penseur-normal.jpg
ADDED
Binary file
|
assets/images/penseur-original.jpg
ADDED
Binary file
|
assets/images/penseur-ultra.jpg
ADDED
Binary file
|
assets/images/phone.svg
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
<svg viewBox="0 0 19 16" xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="evenodd"><path d="m18.15 5.733c-.259-.259-.571-.388-.937-.388v-3.973c0-.359-.131-.669-.393-.931-.262-.262-.573-.393-.931-.393-3.18 2.649-6.27 3.973-9.27 3.973h-4.966c-.455 0-.845.162-1.169.486-.324.324-.486.714-.486 1.169v1.986c0 .455.162.845.486 1.169.324.324.714.486 1.169.486h1.262c-.117.373-.193.754-.228 1.143-.034.39-.046.729-.036 1.019.01.29.062.638.155 1.045.093.407.172.714.238.921.066.207.176.533.331.978.155.445.257.747.305.905.317.29.772.481 1.366.574.593.093 1.174.053 1.743-.119.569-.172.954-.459 1.154-.859-.262-.207-.474-.381-.636-.523-.162-.141-.328-.314-.497-.517-.169-.203-.284-.393-.347-.569-.062-.176-.083-.376-.062-.6.021-.224.1-.45.238-.678-.262-.269-.4-.588-.414-.957-.014-.369.093-.716.321-1.04.228-.324.541-.552.941-.683 2.725.228 5.525 1.538 8.401 3.931.358 0 .669-.131.931-.393.262-.262.393-.573.393-.931v-3.973c.366 0 .678-.129.937-.388.258-.259.388-.571.388-.936 0-.366-.13-.678-.388-.936m-2.261 5.861c-2.697-2.062-5.345-3.238-7.946-3.528v-2.793c2.579-.283 5.228-1.466 7.946-3.549v9.87" fill="#40b1d0"/></g></svg>
|
assets/images/popin-loader.svg
ADDED
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" width="64" height="64" fill="white">
|
2 |
+
<circle fill="#66748c" cx="16" cy="3" r="0">
|
3 |
+
<animate attributeName="r" values="0;3;0;0" dur="1s" repeatCount="indefinite" begin="0" keySplines="0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8" calcMode="spline" />
|
4 |
+
</circle>
|
5 |
+
<circle fill="#66748c" transform="rotate(45 16 16)" cx="16" cy="3" r="0">
|
6 |
+
<animate attributeName="r" values="0;3;0;0" dur="1s" repeatCount="indefinite" begin="0.125s" keySplines="0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8" calcMode="spline" />
|
7 |
+
</circle>
|
8 |
+
<circle fill="#66748c" transform="rotate(90 16 16)" cx="16" cy="3" r="0">
|
9 |
+
<animate attributeName="r" values="0;3;0;0" dur="1s" repeatCount="indefinite" begin="0.25s" keySplines="0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8" calcMode="spline" />
|
10 |
+
</circle>
|
11 |
+
<circle fill="#66748c" transform="rotate(135 16 16)" cx="16" cy="3" r="0">
|
12 |
+
<animate attributeName="r" values="0;3;0;0" dur="1s" repeatCount="indefinite" begin="0.375s" keySplines="0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8" calcMode="spline" />
|
13 |
+
</circle>
|
14 |
+
<circle fill="#66748c" transform="rotate(180 16 16)" cx="16" cy="3" r="0">
|
15 |
+
<animate attributeName="r" values="0;3;0;0" dur="1s" repeatCount="indefinite" begin="0.5s" keySplines="0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8" calcMode="spline" />
|
16 |
+
</circle>
|
17 |
+
<circle fill="#66748c" transform="rotate(225 16 16)" cx="16" cy="3" r="0">
|
18 |
+
<animate attributeName="r" values="0;3;0;0" dur="1s" repeatCount="indefinite" begin="0.625s" keySplines="0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8" calcMode="spline" />
|
19 |
+
</circle>
|
20 |
+
<circle fill="#66748c" transform="rotate(270 16 16)" cx="16" cy="3" r="0">
|
21 |
+
<animate attributeName="r" values="0;3;0;0" dur="1s" repeatCount="indefinite" begin="0.75s" keySplines="0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8" calcMode="spline" />
|
22 |
+
</circle>
|
23 |
+
<circle fill="#66748c" transform="rotate(315 16 16)" cx="16" cy="3" r="0">
|
24 |
+
<animate attributeName="r" values="0;3;0;0" dur="1s" repeatCount="indefinite" begin="0.875s" keySplines="0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8" calcMode="spline" />
|
25 |
+
</circle>
|
26 |
+
<circle fill="#66748c" transform="rotate(180 16 16)" cx="16" cy="3" r="0">
|
27 |
+
<animate attributeName="r" values="0;3;0;0" dur="1s" repeatCount="indefinite" begin="0.5s" keySplines="0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8" calcMode="spline" />
|
28 |
+
</circle>
|
29 |
+
</svg>
|
assets/images/sidebar-wp-rocket.jpg
ADDED
Binary file
|
assets/images/spinner.gif
ADDED
Binary file
|
assets/images/stormy.svg
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
<svg viewBox="0 0 39 36" xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="evenodd"><path d="m1273.12 126.78c-.12 0-.24-.06-.36-.12-.24-.18-.3-.6-.12-.84l5.58-7.26h-3.84c-.48 0-.9-.24-1.08-.66-.18-.42-.18-.9.12-1.26l2.16-2.82c.18-.24.6-.3.84-.12.24.18.3.6.12.84l-2.16 2.82h3.84c.48 0 .9.24 1.08.66.18.42.18.9-.12 1.26l-5.58 7.26c-.12.18-.3.24-.48.24m11.76-8.34c6.12-1.32 10.56-6.96 10.56-13.38 0-7.56-6-13.68-13.32-13.68-6 0-11.52 4.32-13.14 10.26-.06.3.12.66.42.72.3.06.66-.12.72-.42 1.44-5.4 6.48-9.36 11.94-9.36 6.72 0 12.12 5.58 12.12 12.48 0 5.88-4.02 10.98-9.6 12.18-.3.06-.54.42-.48.72.06.3.3.48.6.48h.18m-18.66 0c0-.36-.24-.6-.54-.66-1.8-.12-3.54-.9-4.8-2.22-3-3-2.94-7.98.12-11.04 2.16-2.16 5.4-2.94 8.22-1.92.3.12.66-.06.78-.36.12-.3-.06-.66-.36-.78-3.24-1.08-6.96-.24-9.48 2.28-3.54 3.54-3.6 9.24-.12 12.72 1.5 1.5 3.48 2.4 5.58 2.52h.06c.3.06.54-.18.54-.54" transform="translate(-1257-91)" fill="#d0011b"/></g></svg>
|
assets/images/sun.svg
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
<svg viewBox="0 0 37 38" xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="evenodd"><path d="m1107.26 119.4c0 .555-.449 1-1 1-.554 0-1-.449-1-1 0-.554.45-1 1-1 .555 0 1 .45 1 1m3.716-13.671c-.554 0-1 .449-1 1 0 .555.45 1 1 1 .555 0 1-.449 1-1 0-.555-.449-1-1-1m-4.779-12.667c-.555 0-1 .45-1 1 0 .555.449 1 1 1 .554 0 1-.449 1-1 0-.554-.45-1-1-1m-12.38-5.067c-.555 0-1 .45-1 1 0 .555.449 1 1 1 .554 0 1-.449 1-1 0-.554-.45-1-1-1m-17.818 17.949c-.554 0-1 .449-1 1 0 .555.45 1 1 1 .555 0 1-.449 1-1 0-.555-.449-1-1-1m5.354-12.667c-.555 0-1 .45-1 1 0 .555.45 1 1 1 .554 0 1-.449 1-1 0-.554-.45-1-1-1m.287 24.7c-.554 0-1 .45-1 1 0 .555.45 1 1 1 .554 0 1-.449 1-1 0-.554-.45-1-1-1m11.949 5.485c-.554 0-1 .45-1 1 0 .555.45 1 1 1 .555 0 1-.449 1-1 0-.554-.449-1-1-1m13.829-16.436c0-7.496-6.098-13.593-13.593-13.593-7.495 0-13.593 6.098-13.593 13.593 0 7.495 6.098 13.593 13.593 13.593 7.495 0 13.593-6.098 13.593-13.593m-1.267 0c0 6.796-5.53 12.326-12.326 12.326-6.797 0-12.327-5.53-12.327-12.326 0-6.796 5.53-12.327 12.327-12.327 6.796 0 12.326 5.53 12.326 12.327" transform="translate(-1075-88)" fill="#f8e81c"/></g></svg>
|
assets/images/twitter_c.svg
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
<svg viewBox="0 0 23 18" xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="evenodd"><path d="m244.15 12.13c-.815.361-1.691.606-2.61.716.939-.563 1.659-1.453 1.998-2.514-.878.521-1.851.898-2.886 1.103-.829-.883-2.01-1.435-3.317-1.435-2.51 0-4.544 2.034-4.544 4.544 0 .356.04.703.118 1.035-3.777-.19-7.125-1.999-9.367-4.748-.391.671-.615 1.452-.615 2.285 0 1.576.802 2.967 2.02 3.782-.745-.024-1.445-.228-2.058-.568-.001.019-.001.038-.001.057 0 2.202 1.566 4.04 3.646 4.456-.381.104-.783.159-1.197.159-.293 0-.577-.028-.855-.081.578 1.805 2.256 3.119 4.245 3.156-1.555 1.219-3.515 1.945-5.644 1.945-.367 0-.728-.021-1.084-.063 2.01 1.289 4.399 2.041 6.966 2.041 8.359 0 12.929-6.925 12.929-12.929 0-.197-.004-.393-.013-.588.888-.64 1.658-1.44 2.268-2.352" transform="translate(-222-10)" fill="#fff"/></g></svg>
|
assets/images/upload-image.png
ADDED
Binary file
|
assets/images/user.svg
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
<svg viewBox="0 0 48 48" xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="evenodd"><path d="m247.84 188c-13.145 0-23.839 10.694-23.839 23.838 0 13.145 10.694 23.838 23.839 23.838 13.145 0 23.838-10.694 23.838-23.838 0-13.145-10.693-23.838-23.838-23.838m-11.709 42.879c.843-.346 1.89-.371 3.466-.371h2.247c.244 0 .473-.12.61-.322l2.581-3.785c.104-.151.135-.328.116-.498.85.42 1.75.668 2.68.668.952 0 1.873-.261 2.741-.701-.029.182.007.375.122.538l2.643 3.784c.137.199.363.316.605.316h2.694c1.443 0 2.281.018 2.969.336-3.42 2.125-7.45 3.356-11.764 3.356-4.29 0-8.301-1.217-11.709-3.321m19.223-25.11c.839 2.898 1.558 8-.083 9.361-.17.14-.267.349-.267.569 0 4.144-3.378 9.399-7.173 9.399-3.796 0-7.173-5.256-7.173-9.399 0-.102-.021-.203-.062-.297-2.169-4.94-.335-9.511-.316-9.556.037-.09.056-.186.056-.283 0-2.455.442-4.333 5.999-4.333.138 0 .272-.038.39-.112 1.589-.986 3.1-1.486 4.49-1.486 1.567 0 2.878.649 3.692 1.827.778 1.127.953 2.562.467 3.841-.056.149-.062.314-.018.467m5.598 24.17c-1.224-.91-2.546-.905-4.321-.905h-2.305l-2.423-3.468c-.095-.136-.23-.218-.377-.266 2.8-1.955 4.827-5.837 4.948-9.277 2.363-2.479.772-8.944.363-10.435.55-1.671.288-3.511-.718-4.968-1.081-1.566-2.869-2.464-4.906-2.464-1.614 0-3.325.537-5.089 1.597-6.28.058-7.237 2.737-7.266 5.668-.326.87-1.821 5.403.323 10.432.06 3.491 2.118 7.48 4.976 9.461-.133.052-.256.131-.343.257l-2.361 3.462h-1.857c-1.924 0-3.483.009-4.844.922-5.613-4.067-9.274-10.669-9.274-18.11 0-12.331 10.03-22.362 22.362-22.362 12.33 0 22.361 10.03 22.361 22.362 0 7.435-3.651 14.03-9.249 18.1" transform="translate(-224-188)" fill="#7a8996"/></g></svg>
|
assets/js/admin.js
ADDED
@@ -0,0 +1,166 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
jQuery(function($){
|
2 |
+
/*
|
3 |
+
* Create a new Imagify account
|
4 |
+
*/
|
5 |
+
$('#imagify-signup').click( function(e){
|
6 |
+
e.preventDefault();
|
7 |
+
|
8 |
+
// Display the sign up form
|
9 |
+
swal({
|
10 |
+
title: imagify.signupTitle,
|
11 |
+
text: imagify.signupText,
|
12 |
+
confirmButtonText: imagify.signupConfirmButtonText,
|
13 |
+
type: "input",
|
14 |
+
closeOnConfirm: false,
|
15 |
+
allowOutsideClick: true,
|
16 |
+
showLoaderOnConfirm: true,
|
17 |
+
customClass: "imagify-sweet-alert imagify-sweet-alert-signup"
|
18 |
+
},
|
19 |
+
function(inputValue){
|
20 |
+
if ($.trim(inputValue) == "" || ! inputValue) {
|
21 |
+
swal.showInputError(imagify.signupErrorEmptyEmail);
|
22 |
+
return false;
|
23 |
+
}
|
24 |
+
|
25 |
+
$.get(ajaxurl + "?action=imagify_signup&email=" +inputValue + "&imagifysignupnonce="+ $('#imagifysignupnonce').val())
|
26 |
+
.done(function(response){
|
27 |
+
if( !response.success ) {
|
28 |
+
swal.showInputError(response.data);
|
29 |
+
} else {
|
30 |
+
swal({
|
31 |
+
title:imagify.signupSuccessTitle,
|
32 |
+
text: imagify.signupSuccessText,
|
33 |
+
type: "success",
|
34 |
+
customClass: "imagify-sweet-alert"
|
35 |
+
});
|
36 |
+
}
|
37 |
+
});
|
38 |
+
});
|
39 |
+
});
|
40 |
+
|
41 |
+
/*
|
42 |
+
* Check and save the Imagify API Key
|
43 |
+
*/
|
44 |
+
$('#imagify-save-api-key').click( function(e){
|
45 |
+
e.preventDefault();
|
46 |
+
|
47 |
+
// Display the sign up form
|
48 |
+
swal({
|
49 |
+
title: imagify.saveApiKeyTitle,
|
50 |
+
text: imagify.saveApiKeyText,
|
51 |
+
confirmButtonText: imagify.saveApiKeyConfirmButtonText,
|
52 |
+
type: "input",
|
53 |
+
closeOnConfirm: false,
|
54 |
+
allowOutsideClick: true,
|
55 |
+
showLoaderOnConfirm: true,
|
56 |
+
customClass: "imagify-sweet-alert imagify-sweet-alert-signup"
|
57 |
+
},
|
58 |
+
function(inputValue){
|
59 |
+
if ($.trim(inputValue) == "" || ! inputValue) {
|
60 |
+
swal.showInputError(imagify.signupErrorEmptyEmail);
|
61 |
+
return false;
|
62 |
+
}
|
63 |
+
|
64 |
+
$.get(ajaxurl + "?action=imagify_check_api_key_validity&api_key=" +inputValue + "&imagifycheckapikeynonce="+ $('#imagifycheckapikeynonce').val())
|
65 |
+
.done(function(response){
|
66 |
+
if( !response.success ) {
|
67 |
+
swal.showInputError(response.data);
|
68 |
+
} else {
|
69 |
+
swal({
|
70 |
+
title:imagify.ApiKeyCheckSuccessTitle,
|
71 |
+
text: imagify.ApiKeyCheckSuccessText,
|
72 |
+
type: "success",
|
73 |
+
customClass: "imagify-sweet-alert"
|
74 |
+
});
|
75 |
+
}
|
76 |
+
});
|
77 |
+
});
|
78 |
+
});
|
79 |
+
|
80 |
+
/*
|
81 |
+
* Toggle an Imagify notice
|
82 |
+
*/
|
83 |
+
$('.imagify-notice-dismiss').click( function( e ) {
|
84 |
+
e.preventDefault();
|
85 |
+
|
86 |
+
var obj = $(this),
|
87 |
+
parent = obj.parents('.imagify-welcome, .imagify-notice'),
|
88 |
+
href = obj.attr('href');
|
89 |
+
|
90 |
+
// Hide the notice
|
91 |
+
parent.fadeTo( 100 , 0, function() {
|
92 |
+
$(this).slideUp( 100, function() {
|
93 |
+
$(this).remove();
|
94 |
+
});
|
95 |
+
});
|
96 |
+
|
97 |
+
// Save the dismiss notice
|
98 |
+
$.get( href.replace( 'admin-post.php', 'admin-ajax.php' ) );
|
99 |
+
});
|
100 |
+
|
101 |
+
|
102 |
+
/*
|
103 |
+
* Imagify Light modal
|
104 |
+
*/
|
105 |
+
|
106 |
+
if ( $('.imagify-modal-trigger').length > 0 ) {
|
107 |
+
|
108 |
+
// accessibility
|
109 |
+
$('.imagify-modal').attr('aria-hidden', 'true');
|
110 |
+
|
111 |
+
// on click on modal trigger
|
112 |
+
$('.imagify-modal-trigger').on('click', function(){
|
113 |
+
var the_target = $(this).attr('href') || $(this).data('target');
|
114 |
+
|
115 |
+
$( the_target ).css('display', 'flex').hide().fadeIn(400).attr('aria-hidden', 'false').attr('tabindex', '0').focus().removeAttr('tabindex').addClass('modal-is-open');
|
116 |
+
|
117 |
+
return false;
|
118 |
+
});
|
119 |
+
|
120 |
+
// on click on close button
|
121 |
+
$('.imagify-modal').find('.close-btn').on('click', function(){
|
122 |
+
$(this).closest('.imagify-modal').fadeOut(400).attr('aria-hidden', 'true').removeClass('modal-is-open');
|
123 |
+
})
|
124 |
+
.on('blur', function(){
|
125 |
+
var $modal = $(this).closest('.imagify-modal');
|
126 |
+
if ( $modal.attr('aria-hidden') === 'false' ) {
|
127 |
+
$modal.attr('tabindex', '0').focus().removeAttr('tabindex');
|
128 |
+
}
|
129 |
+
});
|
130 |
+
|
131 |
+
// `Esc` key binding
|
132 |
+
$(window).on('keydown', function(e){
|
133 |
+
if ( e.keyCode == 27 && $('.imagify-modal.modal-is-open').length > 0 ) {
|
134 |
+
|
135 |
+
e.preventDefault();
|
136 |
+
|
137 |
+
// trigger the event
|
138 |
+
$('.imagify-modal.modal-is-open').find('.close-btn').trigger('click');
|
139 |
+
|
140 |
+
return false;
|
141 |
+
}
|
142 |
+
});
|
143 |
+
}
|
144 |
+
|
145 |
+
var busy = false,
|
146 |
+
xhr = false;
|
147 |
+
|
148 |
+
$('#wp-admin-bar-imagify').hover( function() {
|
149 |
+
if ( true === busy ) {
|
150 |
+
xhr.abort();
|
151 |
+
}
|
152 |
+
|
153 |
+
busy = true;
|
154 |
+
|
155 |
+
var $adminBarProfile = $('#wp-admin-bar-imagify-profile-content');
|
156 |
+
|
157 |
+
if( $adminBarProfile.is(':empty') ) {
|
158 |
+
xhr = $.get(ajaxurl + "?action=imagify_get_admin_bar_profile&imagifygetadminbarprofilenonce="+ $('#imagifygetadminbarprofilenonce').val())
|
159 |
+
.done(function(response){
|
160 |
+
$adminBarProfile.html(response.data);
|
161 |
+
$('#wp-admin-bar-imagify-profile-loading').remove();
|
162 |
+
busy = false;
|
163 |
+
});
|
164 |
+
}
|
165 |
+
});
|
166 |
+
});
|
assets/js/admin.min.js
ADDED
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
jQuery(function(a){a("#imagify-signup").click(function(b){b.preventDefault();swal({title:imagify.signupTitle,text:imagify.signupText,confirmButtonText:imagify.signupConfirmButtonText,type:"input",closeOnConfirm:!1,allowOutsideClick:!0,showLoaderOnConfirm:!0,customClass:"imagify-sweet-alert imagify-sweet-alert-signup"},function(b){if(""==a.trim(b)||!b)return swal.showInputError(imagify.signupErrorEmptyEmail),!1;a.get(ajaxurl+"?action=imagify_signup&email="+b+"&imagifysignupnonce="+a("#imagifysignupnonce").val()).done(function(a){a.success?
|
2 |
+
swal({title:imagify.signupSuccessTitle,text:imagify.signupSuccessText,type:"success",customClass:"imagify-sweet-alert"}):swal.showInputError(a.data)})})});a("#imagify-save-api-key").click(function(b){b.preventDefault();swal({title:imagify.saveApiKeyTitle,text:imagify.saveApiKeyText,confirmButtonText:imagify.saveApiKeyConfirmButtonText,type:"input",closeOnConfirm:!1,allowOutsideClick:!0,showLoaderOnConfirm:!0,customClass:"imagify-sweet-alert imagify-sweet-alert-signup"},function(b){if(""==a.trim(b)||
|
3 |
+
!b)return swal.showInputError(imagify.signupErrorEmptyEmail),!1;a.get(ajaxurl+"?action=imagify_check_api_key_validity&api_key="+b+"&imagifycheckapikeynonce="+a("#imagifycheckapikeynonce").val()).done(function(a){a.success?swal({title:imagify.ApiKeyCheckSuccessTitle,text:imagify.ApiKeyCheckSuccessText,type:"success",customClass:"imagify-sweet-alert"}):swal.showInputError(a.data)})})});a(".imagify-notice-dismiss").click(function(b){b.preventDefault();var c=a(this);b=c.parents(".imagify-welcome, .imagify-notice");
|
4 |
+
c=c.attr("href");b.fadeTo(100,0,function(){a(this).slideUp(100,function(){a(this).remove()})});a.get(c.replace("admin-post.php","admin-ajax.php"))});0<a(".imagify-modal-trigger").length&&(a(".imagify-modal").attr("aria-hidden","true"),a(".imagify-modal-trigger").on("click",function(){var b=a(this).attr("href")||a(this).data("target");a(b).css("display","flex").hide().fadeIn(400).attr("aria-hidden","false").attr("tabindex","0").focus().removeAttr("tabindex").addClass("modal-is-open");return!1}),a(".imagify-modal").find(".close-btn").on("click",
|
5 |
+
function(){a(this).closest(".imagify-modal").fadeOut(400).attr("aria-hidden","true").removeClass("modal-is-open")}).on("blur",function(){var b=a(this).closest(".imagify-modal");"false"===b.attr("aria-hidden")&&b.attr("tabindex","0").focus().removeAttr("tabindex")}),a(window).on("keydown",function(b){if(27==b.keyCode&&0<a(".imagify-modal.modal-is-open").length)return b.preventDefault(),a(".imagify-modal.modal-is-open").find(".close-btn").trigger("click"),!1}));var d=!1,e=!1;a("#wp-admin-bar-imagify").hover(function(){!0===
|
6 |
+
d&&e.abort();d=!0;var b=a("#wp-admin-bar-imagify-profile-content");b.is(":empty")&&(e=a.get(ajaxurl+"?action=imagify_get_admin_bar_profile&imagifygetadminbarprofilenonce="+a("#imagifygetadminbarprofilenonce").val()).done(function(c){b.html(c.data);a("#wp-admin-bar-imagify-profile-loading").remove();d=!1}))})});
|
assets/js/bulk.js
ADDED
@@ -0,0 +1,334 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
jQuery(function($){
|
2 |
+
|
3 |
+
// avoid error on IE
|
4 |
+
var imagify = {
|
5 |
+
log: function (content) {
|
6 |
+
if (console !== 'undefined') console.log(content);
|
7 |
+
}
|
8 |
+
};
|
9 |
+
|
10 |
+
var overviewCanvas = document.getElementById("imagify-overview-chart");
|
11 |
+
var overviewData = [
|
12 |
+
{
|
13 |
+
value: imagifyBulk.totalUnoptimizedAttachments,
|
14 |
+
color:"#D9E4EB",
|
15 |
+
highlight: "#D9E4EB",
|
16 |
+
label: imagifyBulk.overviewChartLabels.unoptimized
|
17 |
+
},
|
18 |
+
{
|
19 |
+
value: imagifyBulk.totalOptimizedAttachments,
|
20 |
+
color: "#46B1CE",
|
21 |
+
highlight: "#46B1CE",
|
22 |
+
label: imagifyBulk.overviewChartLabels.optimized
|
23 |
+
},
|
24 |
+
{
|
25 |
+
value: imagifyBulk.totalErrorsAttachments,
|
26 |
+
color: "#2E3242",
|
27 |
+
highlight: "#2E3242",
|
28 |
+
label: imagifyBulk.overviewChartLabels.error
|
29 |
+
}
|
30 |
+
]
|
31 |
+
|
32 |
+
// to avoid JS error
|
33 |
+
if ( overviewCanvas ) {
|
34 |
+
var overviewDoughnut = new Chart(overviewCanvas.getContext("2d")).Doughnut(overviewData, {
|
35 |
+
segmentStrokeColor : "transparent",
|
36 |
+
segmentStrokeWidth : 0,
|
37 |
+
animateRotate : true,
|
38 |
+
animation: true,
|
39 |
+
percentageInnerCutout: 85,
|
40 |
+
legendTemplate : "<ul class=\"imagify-<%=name.toLowerCase()%>-legend\"><% for (var i=0; i<segments.length; i++){%><li><span style=\"background-color:<%=segments[i].fillColor%>\"></span><%if(segments[i].label){%><%=segments[i].label%><%}%></li><%}%></ul>",
|
41 |
+
tooltipTemplate: "<%= value %>"
|
42 |
+
});
|
43 |
+
|
44 |
+
//then you just need to generate the legend
|
45 |
+
var overviewLegend = overviewDoughnut.generateLegend();
|
46 |
+
|
47 |
+
//and append it to your page somewhere
|
48 |
+
document.getElementById("imagify-overview-chart-legend").innerHTML = overviewLegend;
|
49 |
+
}
|
50 |
+
|
51 |
+
// Simulate a click on the "Imagif'em all" button
|
52 |
+
$('#imagify-simulate-bulk-action').click(function(e){
|
53 |
+
e.preventDefault();
|
54 |
+
$('#imagify-bulk-action').trigger('click');
|
55 |
+
});
|
56 |
+
|
57 |
+
$('#imagify-bulk-action').click(function(){
|
58 |
+
var $obj = $(this),
|
59 |
+
$optimization_level = $('[name="optimization_level"]:checked').val();
|
60 |
+
|
61 |
+
if (typeof $optimization_level === "undefined") {
|
62 |
+
$optimization_level = -1;
|
63 |
+
}
|
64 |
+
|
65 |
+
if ( $obj.attr('disabled') ) {
|
66 |
+
return false;
|
67 |
+
}
|
68 |
+
|
69 |
+
$obj.attr('disabled', 'disabled');
|
70 |
+
$obj.find('.dashicons').addClass('rotate');
|
71 |
+
|
72 |
+
|
73 |
+
confirmMessage = function(){
|
74 |
+
return "Imagify is processing. Are your sure you want to quit this page?";
|
75 |
+
};
|
76 |
+
$(window).on('beforeunload', confirmMessage);
|
77 |
+
|
78 |
+
// Display an alert to wait
|
79 |
+
swal({
|
80 |
+
title:imagifyBulk.waitTitle,
|
81 |
+
text: imagifyBulk.waitText,
|
82 |
+
closeOnConfirm: false,
|
83 |
+
showConfirmButton: false,
|
84 |
+
imageUrl: imagifyBulk.waitImageUrl
|
85 |
+
});
|
86 |
+
|
87 |
+
$.get(ajaxurl+"?action=imagify_get_unoptimized_attachment_ids&optimization_level="+$optimization_level+"&imagifybulkuploadnonce="+$('#imagifybulkuploadnonce').val())
|
88 |
+
.done(function(response) {
|
89 |
+
if( !response.success ) {
|
90 |
+
$obj.removeAttr('disabled');
|
91 |
+
$obj.find('.dashicons').removeClass('rotate');
|
92 |
+
|
93 |
+
// remove confirm dialog before quit the page
|
94 |
+
$(window).off('beforeunload', confirmMessage);
|
95 |
+
|
96 |
+
imagify.log(response);
|
97 |
+
|
98 |
+
if ( response.data.message == 'over-quota' ) {
|
99 |
+
// Display an alert to warn that the monthly quota is consumed
|
100 |
+
swal({
|
101 |
+
title:imagifyBulk.overQuotaTitle,
|
102 |
+
text: imagifyBulk.overQuotaText,
|
103 |
+
type: "error",
|
104 |
+
customClass: "imagify-sweet-alert",
|
105 |
+
html: true
|
106 |
+
});
|
107 |
+
}
|
108 |
+
|
109 |
+
if ( response.data.message == 'no-images' ) {
|
110 |
+
// Display an alert to warn that all images has been optimized
|
111 |
+
swal({
|
112 |
+
title:imagifyBulk.noAttachmentToOptimizeTitle,
|
113 |
+
text: imagifyBulk.noAttachmentToOptimizeText,
|
114 |
+
type: "info",
|
115 |
+
customClass: "imagify-sweet-alert"
|
116 |
+
});
|
117 |
+
}
|
118 |
+
|
119 |
+
} else {
|
120 |
+
swal.close();
|
121 |
+
|
122 |
+
var config = {
|
123 |
+
'lib': ajaxurl+"?action=imagify_bulk_upload&imagifybulkuploadnonce="+$('#imagifybulkuploadnonce').val(),
|
124 |
+
'images': response.data
|
125 |
+
}
|
126 |
+
|
127 |
+
var table = $('.imagify-bulk-table table tbody'),
|
128 |
+
files = 0,
|
129 |
+
errors = 0,
|
130 |
+
original_overall_size = 0,
|
131 |
+
overall_saving = 0;
|
132 |
+
|
133 |
+
$('.imagify-row-progress').slideDown();
|
134 |
+
$('.imagify-no-uploaded-yet, .imagify-row-complete').hide(200);
|
135 |
+
|
136 |
+
Optimizer = new ImagifyGulp(config);
|
137 |
+
|
138 |
+
// before the attachment optimization
|
139 |
+
Optimizer.before(function(data) {
|
140 |
+
table.append('<tr id="attachment-'+data.id+'"><td class="imagify-cell-filename"><span class="imagiuploaded"><img src="'+data.thumbnail+'"/>"</span><span class="imagifilename">'+data.filename+'</span></td><td class="imagify-cell-status"><span class="imagistatus status-compressing"><span class="dashicons dashicons-admin-generic rotate"></span>Compressing<span></span></span></td><td class="imagify-cell-original"></td><td class="imagify-cell-optimized"></td><td class="imagify-cell-percentage"></td><td class="imagify-cell-thumbnails"></td><td class="imagify-cell-savings"></td></tr>');
|
141 |
+
})
|
142 |
+
// after the attachment optimization
|
143 |
+
.each(function (data) {
|
144 |
+
var $progress = $('#imagify-progress-bar');
|
145 |
+
$progress.css({'width': data.progress + '%'});
|
146 |
+
$progress.find('.percent').html(data.progress + '%');
|
147 |
+
|
148 |
+
if ( data.success ) {
|
149 |
+
$('#attachment-'+data.image+' .imagify-cell-status').html('<span class="imagistatus status-complete"><span class="dashicons dashicons-yes"></span>Complete</span>');
|
150 |
+
$('#attachment-'+data.image+' .imagify-cell-original').html(data.original_size_human);
|
151 |
+
$('#attachment-'+data.image+' .imagify-cell-optimized').html(data.new_size_human);
|
152 |
+
$('#attachment-'+data.image+' .imagify-cell-percentage').html('<span class="imagify-chart"><span class="imagify-chart-container"><canvas height="18" width="18" id="imagify-consumption-chart" style="width: 18px; height: 18px;"></canvas></span></span><span class="imagipercent">'+data.percent+'</span>%');
|
153 |
+
draw_me_a_chart( $('#attachment-'+data.image+' .imagify-cell-percentage').find('canvas') );
|
154 |
+
$('#attachment-'+data.image+' .imagify-cell-thumbnails').html(data.thumbnails);
|
155 |
+
$('#attachment-'+data.image+' .imagify-cell-savings').html(Optimizer.toHumanSize(data.overall_saving, 1));
|
156 |
+
|
157 |
+
// The overview chart percent
|
158 |
+
$('#imagify-overview-chart-percent').html(data.global_optimized_attachments_percent + '<span>%</span>');
|
159 |
+
// The total optimized images
|
160 |
+
$('#imagify-total-optimized-attachments').html(data.global_already_optimized_attachments);
|
161 |
+
|
162 |
+
// The comsuption bar
|
163 |
+
$('.imagify-unconsumed-percent').html(data.global_unconsumed_quota + '%');
|
164 |
+
$('.imagify-unconsumed-bar').animate({'width': data.global_unconsumed_quota + '%'});
|
165 |
+
|
166 |
+
// The original bar
|
167 |
+
$('#imagify-original-bar').find('.imagify-barnb')
|
168 |
+
.html(data.global_original_human);
|
169 |
+
|
170 |
+
// The optimized bar
|
171 |
+
$('#imagify-optimized-bar').animate({'width': data.global_optimized_percent+"%"})
|
172 |
+
$('#imagify-optimized-bar').find('.imagify-barnb')
|
173 |
+
.html(data.global_optimized_human);
|
174 |
+
|
175 |
+
// The Percent data
|
176 |
+
$('#imagify-total-optimized-attachments-pct').html( data.global_optimized_percent + '%' );
|
177 |
+
|
178 |
+
// The table footer total optimized files
|
179 |
+
files = files + data.thumbnails + 1;
|
180 |
+
$('.imagify-cell-nb-files').html(files + ' file(s)');
|
181 |
+
|
182 |
+
// The table footer original size
|
183 |
+
original_overall_size = original_overall_size + data.original_overall_size;
|
184 |
+
$('.imagify-total-original').html(Optimizer.toHumanSize(original_overall_size, 1));
|
185 |
+
|
186 |
+
// The table footer overall saving
|
187 |
+
overall_saving = overall_saving + data.overall_saving;
|
188 |
+
$('.imagify-total-gain').html(Optimizer.toHumanSize(overall_saving, 1));
|
189 |
+
|
190 |
+
} else {
|
191 |
+
error_class = 'error';
|
192 |
+
error_dashincon = 'dismiss';
|
193 |
+
error_message = 'Error';
|
194 |
+
|
195 |
+
if ( data.error.indexOf("This image is already compressed") ) {
|
196 |
+
error_class = 'warning';
|
197 |
+
error_dashicon = 'warning';
|
198 |
+
error_message = 'Notice';
|
199 |
+
} else {
|
200 |
+
errors++;
|
201 |
+
$('.imagify-cell-errors').html(errors + ' error(s)');
|
202 |
+
}
|
203 |
+
|
204 |
+
$('#attachment-'+data.image).after('<tr><td colspan="7"><span class="status-'+error_class+'">'+data.error+'</span></td></tr>');
|
205 |
+
|
206 |
+
$('#attachment-'+data.image+' .imagify-cell-status').html('<span class="imagistatus status-'+error_class+'"><span class="dashicons dashicons-'+error_dashicon+'"></span>'+error_message+'</span>');
|
207 |
+
|
208 |
+
|
209 |
+
}
|
210 |
+
|
211 |
+
overviewDoughnut.segments[0].value = data.global_unoptimized_attachments;
|
212 |
+
overviewDoughnut.segments[1].value = data.global_optimized_attachments;
|
213 |
+
overviewDoughnut.segments[2].value = data.global_errors_attachments;
|
214 |
+
overviewDoughnut.update();
|
215 |
+
})
|
216 |
+
// after all attachments optimization
|
217 |
+
.done(function (data) {
|
218 |
+
$obj.removeAttr('disabled');
|
219 |
+
$obj.find('.dashicons').removeClass('rotate');
|
220 |
+
|
221 |
+
// remove confirm dialog before quit the page
|
222 |
+
$(window).off('beforeunload', confirmMessage);
|
223 |
+
|
224 |
+
// Hide the progress bar
|
225 |
+
$('.imagify-row-progress').slideUp();
|
226 |
+
|
227 |
+
if ( data.global_percent !== 'NaN' ) {
|
228 |
+
// Display the complete section
|
229 |
+
$('.imagify-row-complete').removeClass('hidden')
|
230 |
+
.addClass( 'done' )
|
231 |
+
.attr('aria-hidden', 'false');
|
232 |
+
$('html, body').animate({
|
233 |
+
scrollTop: $('.imagify-row-complete').offset().top
|
234 |
+
}, 200);
|
235 |
+
|
236 |
+
$('.imagify-ac-rt-total-gain').html(data.global_gain_human);
|
237 |
+
$('.imagify-ac-rt-total-original').html(data.global_original_size_human);
|
238 |
+
|
239 |
+
text2share = imagifyBulk.textToShare;
|
240 |
+
text2share = text2share.replace( '%1$s', data.global_gain_human );
|
241 |
+
text2share = text2share.replace( '%2$s', data.global_original_size_human );
|
242 |
+
text2share = encodeURIComponent(text2share);
|
243 |
+
|
244 |
+
$('.imagify-sn-twitter').attr( 'href', 'https://twitter.com/intent/tweet?source=webclient&original_referer=' + imagifyBulk.pluginURL + '&text=' + text2share + '&url=' + imagifyBulk.pluginURL + '&related=imagify&hastags=performance,web,wordpress' );
|
245 |
+
|
246 |
+
$('.imagify-ac-chart').attr('data-percent', data.global_percent);
|
247 |
+
draw_me_complete_chart( $('.imagify-ac-chart').find('canvas') );
|
248 |
+
}
|
249 |
+
})
|
250 |
+
.error(function (id) {
|
251 |
+
imagify.log('Can\'t optimize image with id ' + id);
|
252 |
+
})
|
253 |
+
.run();
|
254 |
+
}
|
255 |
+
});
|
256 |
+
});
|
257 |
+
|
258 |
+
/*
|
259 |
+
* Mini chart
|
260 |
+
* You can use draw_me_a_chart() function with AJAX calls
|
261 |
+
*
|
262 |
+
* @param {element} canvas
|
263 |
+
*/
|
264 |
+
function draw_me_a_chart( canvas ) {
|
265 |
+
canvas.each(function(){
|
266 |
+
|
267 |
+
var the_value = parseInt( $(this).closest('.imagify-chart').next('.imagipercent').text() ),
|
268 |
+
overviewData = [
|
269 |
+
{
|
270 |
+
value: the_value,
|
271 |
+
color: "#00B3D3"
|
272 |
+
},
|
273 |
+
{
|
274 |
+
value: 100 - the_value,
|
275 |
+
color:"#D8D8D8"
|
276 |
+
}
|
277 |
+
],
|
278 |
+
overviewDoughnut = new Chart( $(this)[0].getContext("2d")).Doughnut(overviewData, {
|
279 |
+
segmentStrokeColor : "#FFF",
|
280 |
+
segmentStrokeWidth : 1,
|
281 |
+
animateRotate : true,
|
282 |
+
tooltipEvents: []
|
283 |
+
});
|
284 |
+
});
|
285 |
+
}
|
286 |
+
|
287 |
+
/*
|
288 |
+
* Complete Chart
|
289 |
+
* You can use draw_me_complete_chart() function with AJAX calls
|
290 |
+
*
|
291 |
+
* @param {element} canvas
|
292 |
+
*/
|
293 |
+
function draw_me_complete_chart( canvas ) {
|
294 |
+
canvas.each(function(){
|
295 |
+
|
296 |
+
var the_value = parseInt( $(this).closest('.imagify-ac-chart').attr('data-percent') ),
|
297 |
+
overviewData = [
|
298 |
+
{
|
299 |
+
value: the_value,
|
300 |
+
color: "#40B1D0"
|
301 |
+
},
|
302 |
+
{
|
303 |
+
value: 100 - the_value,
|
304 |
+
color:"#FFFFFF"
|
305 |
+
}
|
306 |
+
],
|
307 |
+
overviewDoughnut = new Chart( $(this)[0].getContext("2d")).Doughnut(overviewData, {
|
308 |
+
segmentStrokeColor : "transparent",
|
309 |
+
segmentStrokeWidth : 0,
|
310 |
+
animateRotate : true,
|
311 |
+
animation: true,
|
312 |
+
percentageInnerCutout: 70,
|
313 |
+
tooltipEvents: []
|
314 |
+
});
|
315 |
+
});
|
316 |
+
}
|
317 |
+
});
|
318 |
+
|
319 |
+
var width = 700, height = 290;
|
320 |
+
if ( window.innerWidth ) {
|
321 |
+
var clientLeft = (window.innerWidth-width)/2;
|
322 |
+
var clientTop = (window.innerHeight-height)/2;
|
323 |
+
}
|
324 |
+
else {
|
325 |
+
var clientLeft = (document.body.clientWidth-width)/2;
|
326 |
+
var clientTop = (document.body.clientHeight-height)/2;
|
327 |
+
}
|
328 |
+
|
329 |
+
[].forEach.call( document.querySelectorAll('.imagify-share-networks a'), function(el) {
|
330 |
+
el.addEventListener('click', function(evt) {
|
331 |
+
window.open(this.href,'',"status=no, scrollbars=no, menubar=no, top="+clientTop+", left="+clientLeft+", width="+width+", height="+height);
|
332 |
+
evt.preventDefault();
|
333 |
+
}, false);
|
334 |
+
});
|
assets/js/bulk.min.js
ADDED
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
jQuery(function(a){function n(c){c.each(function(){var c=parseInt(a(this).closest(".imagify-chart").next(".imagipercent").text()),c=[{value:c,color:"#00B3D3"},{value:100-c,color:"#D8D8D8"}];(new Chart(a(this)[0].getContext("2d"))).Doughnut(c,{segmentStrokeColor:"#FFF",segmentStrokeWidth:1,animateRotate:!0,tooltipEvents:[]})})}function p(c){c.each(function(){var c=parseInt(a(this).closest(".imagify-ac-chart").attr("data-percent")),c=[{value:c,color:"#40B1D0"},{value:100-c,color:"#FFFFFF"}];(new Chart(a(this)[0].getContext("2d"))).Doughnut(c,
|
2 |
+
{segmentStrokeColor:"transparent",segmentStrokeWidth:0,animateRotate:!0,animation:!0,percentageInnerCutout:70,tooltipEvents:[]})})}var l={log:function(a){"undefined"!==console&&console.log(a)}},d=document.getElementById("imagify-overview-chart"),f=[{value:imagifyBulk.totalUnoptimizedAttachments,color:"#D9E4EB",highlight:"#D9E4EB",label:imagifyBulk.overviewChartLabels.unoptimized},{value:imagifyBulk.totalOptimizedAttachments,color:"#46B1CE",highlight:"#46B1CE",label:imagifyBulk.overviewChartLabels.optimized},
|
3 |
+
{value:imagifyBulk.totalErrorsAttachments,color:"#2E3242",highlight:"#2E3242",label:imagifyBulk.overviewChartLabels.error}];if(d){var e=(new Chart(d.getContext("2d"))).Doughnut(f,{segmentStrokeColor:"transparent",segmentStrokeWidth:0,animateRotate:!0,animation:!0,percentageInnerCutout:85,legendTemplate:'<ul class="imagify-<%=name.toLowerCase()%>-legend"><% for (var i=0; i<segments.length; i++){%><li><span style="background-color:<%=segments[i].fillColor%>"></span><%if(segments[i].label){%><%=segments[i].label%><%}%></li><%}%></ul>',
|
4 |
+
tooltipTemplate:"<%= value %>"}),d=e.generateLegend();document.getElementById("imagify-overview-chart-legend").innerHTML=d}a("#imagify-simulate-bulk-action").click(function(c){c.preventDefault();a("#imagify-bulk-action").trigger("click")});a("#imagify-bulk-action").click(function(){var c=a(this),d=a('[name="optimization_level"]:checked').val();"undefined"===typeof d&&(d=-1);if(c.attr("disabled"))return!1;c.attr("disabled","disabled");c.find(".dashicons").addClass("rotate");confirmMessage=function(){return"Imagify is processing. Are your sure you want to quit this page?"};
|
5 |
+
a(window).on("beforeunload",confirmMessage);swal({title:imagifyBulk.waitTitle,text:imagifyBulk.waitText,closeOnConfirm:!1,showConfirmButton:!1,imageUrl:imagifyBulk.waitImageUrl});a.get(ajaxurl+"?action=imagify_get_unoptimized_attachment_ids&optimization_level="+d+"&imagifybulkuploadnonce="+a("#imagifybulkuploadnonce").val()).done(function(d){if(d.success){swal.close();d={lib:ajaxurl+"?action=imagify_bulk_upload&imagifybulkuploadnonce="+a("#imagifybulkuploadnonce").val(),images:d.data};var f=a(".imagify-bulk-table table tbody"),
|
6 |
+
g=0,m=0,h=0,k=0;a(".imagify-row-progress").slideDown();a(".imagify-no-uploaded-yet, .imagify-row-complete").hide(200);Optimizer=new ImagifyGulp(d);Optimizer.before(function(a){f.append('<tr id="attachment-'+a.id+'"><td class="imagify-cell-filename"><span class="imagiuploaded"><img src="'+a.thumbnail+'"/>"</span><span class="imagifilename">'+a.filename+'</span></td><td class="imagify-cell-status"><span class="imagistatus status-compressing"><span class="dashicons dashicons-admin-generic rotate"></span>Compressing<span></span></span></td><td class="imagify-cell-original"></td><td class="imagify-cell-optimized"></td><td class="imagify-cell-percentage"></td><td class="imagify-cell-thumbnails"></td><td class="imagify-cell-savings"></td></tr>')}).each(function(b){var c=
|
7 |
+
a("#imagify-progress-bar");c.css({width:b.progress+"%"});c.find(".percent").html(b.progress+"%");b.success?(a("#attachment-"+b.image+" .imagify-cell-status").html('<span class="imagistatus status-complete"><span class="dashicons dashicons-yes"></span>Complete</span>'),a("#attachment-"+b.image+" .imagify-cell-original").html(b.original_size_human),a("#attachment-"+b.image+" .imagify-cell-optimized").html(b.new_size_human),a("#attachment-"+b.image+" .imagify-cell-percentage").html('<span class="imagify-chart"><span class="imagify-chart-container"><canvas height="18" width="18" id="imagify-consumption-chart" style="width: 18px; height: 18px;"></canvas></span></span><span class="imagipercent">'+
|
8 |
+
b.percent+"</span>%"),n(a("#attachment-"+b.image+" .imagify-cell-percentage").find("canvas")),a("#attachment-"+b.image+" .imagify-cell-thumbnails").html(b.thumbnails),a("#attachment-"+b.image+" .imagify-cell-savings").html(Optimizer.toHumanSize(b.overall_saving,1)),a("#imagify-overview-chart-percent").html(b.global_optimized_attachments_percent+"<span>%</span>"),a("#imagify-total-optimized-attachments").html(b.global_already_optimized_attachments),a(".imagify-unconsumed-percent").html(b.global_unconsumed_quota+
|
9 |
+
"%"),a(".imagify-unconsumed-bar").animate({width:b.global_unconsumed_quota+"%"}),a("#imagify-original-bar").find(".imagify-barnb").html(b.global_original_human),a("#imagify-optimized-bar").animate({width:b.global_optimized_percent+"%"}),a("#imagify-optimized-bar").find(".imagify-barnb").html(b.global_optimized_human),a("#imagify-total-optimized-attachments-pct").html(b.global_optimized_percent+"%"),g=g+b.thumbnails+1,a(".imagify-cell-nb-files").html(g+" file(s)"),h+=b.original_overall_size,a(".imagify-total-original").html(Optimizer.toHumanSize(h,
|
10 |
+
1)),k+=b.overall_saving,a(".imagify-total-gain").html(Optimizer.toHumanSize(k,1))):(error_class="error",error_dashincon="dismiss",error_message="Error",b.error.indexOf("This image is already compressed")?(error_dashicon=error_class="warning",error_message="Notice"):(m++,a(".imagify-cell-errors").html(m+" error(s)")),a("#attachment-"+b.image).after('<tr><td colspan="7"><span class="status-'+error_class+'">'+b.error+"</span></td></tr>"),a("#attachment-"+b.image+" .imagify-cell-status").html('<span class="imagistatus status-'+
|
11 |
+
error_class+'"><span class="dashicons dashicons-'+error_dashicon+'"></span>'+error_message+"</span>"));e.segments[0].value=b.global_unoptimized_attachments;e.segments[1].value=b.global_optimized_attachments;e.segments[2].value=b.global_errors_attachments;e.update()}).done(function(b){c.removeAttr("disabled");c.find(".dashicons").removeClass("rotate");a(window).off("beforeunload",confirmMessage);a(".imagify-row-progress").slideUp();"NaN"!==b.global_percent&&(a(".imagify-row-complete").removeClass("hidden").addClass("done").attr("aria-hidden",
|
12 |
+
"false"),a("html, body").animate({scrollTop:a(".imagify-row-complete").offset().top},200),a(".imagify-ac-rt-total-gain").html(b.global_gain_human),a(".imagify-ac-rt-total-original").html(b.global_original_size_human),text2share=imagifyBulk.textToShare,text2share=text2share.replace("%1$s",b.global_gain_human),text2share=text2share.replace("%2$s",b.global_original_size_human),text2share=encodeURIComponent(text2share),a(".imagify-sn-twitter").attr("href","https://twitter.com/intent/tweet?source=webclient&original_referer="+
|
13 |
+
imagifyBulk.pluginURL+"&text="+text2share+"&url="+imagifyBulk.pluginURL+"&related=imagify&hastags=performance,web,wordpress"),a(".imagify-ac-chart").attr("data-percent",b.global_percent),p(a(".imagify-ac-chart").find("canvas")))}).error(function(a){l.log("Can't optimize image with id "+a)}).run()}else c.removeAttr("disabled"),c.find(".dashicons").removeClass("rotate"),a(window).off("beforeunload",confirmMessage),l.log(d),"over-quota"==d.data.message&&swal({title:imagifyBulk.overQuotaTitle,
|
14 |
+
text:imagifyBulk.overQuotaText,type:"error",customClass:"imagify-sweet-alert",html:!0}),"no-images"==d.data.message&&swal({title:imagifyBulk.noAttachmentToOptimizeTitle,text:imagifyBulk.noAttachmentToOptimizeText,type:"info",customClass:"imagify-sweet-alert"})})})});var width=700,height=290;if(window.innerWidth)var clientLeft=(window.innerWidth-width)/2,clientTop=(window.innerHeight-height)/2;else clientLeft=(document.body.clientWidth-width)/2,clientTop=(document.body.clientHeight-height)/2;
|
15 |
+
[].forEach.call(document.querySelectorAll(".imagify-share-networks a"),function(a){a.addEventListener("click",function(a){window.open(this.href,"","status=no, scrollbars=no, menubar=no, top="+clientTop+", left="+clientLeft+", width="+width+", height="+height);a.preventDefault()},!1)});
|
assets/js/chart.min.js
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*!
|
2 |
+
* Chart.js
|
3 |
+
* http://chartjs.org/
|
4 |
+
* Version: 1.0.2
|
5 |
+
*
|
6 |
+
* Copyright 2015 Nick Downie
|
7 |
+
* Released under the MIT license
|
8 |
+
* https://github.com/nnnick/Chart.js/blob/master/LICENSE.md
|
9 |
+
*/
|
10 |
+
(function(){"use strict";var t=this,i=t.Chart,e=function(t){this.canvas=t.canvas,this.ctx=t;var i=function(t,i){return t["offset"+i]?t["offset"+i]:document.defaultView.getComputedStyle(t).getPropertyValue(i)},e=this.width=i(t.canvas,"Width"),n=this.height=i(t.canvas,"Height");t.canvas.width=e,t.canvas.height=n;var e=this.width=t.canvas.width,n=this.height=t.canvas.height;return this.aspectRatio=this.width/this.height,s.retinaScale(this),this};e.defaults={global:{animation:!0,animationSteps:60,animationEasing:"easeOutQuart",showScale:!0,scaleOverride:!1,scaleSteps:null,scaleStepWidth:null,scaleStartValue:null,scaleLineColor:"rgba(0,0,0,.1)",scaleLineWidth:1,scaleShowLabels:!0,scaleLabel:"<%=value%>",scaleIntegersOnly:!0,scaleBeginAtZero:!1,scaleFontFamily:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",scaleFontSize:12,scaleFontStyle:"normal",scaleFontColor:"#666",responsive:!1,maintainAspectRatio:!0,showTooltips:!0,customTooltips:!1,tooltipEvents:["mousemove","touchstart","touchmove","mouseout"],tooltipFillColor:"rgba(0,0,0,0.8)",tooltipFontFamily:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",tooltipFontSize:14,tooltipFontStyle:"normal",tooltipFontColor:"#fff",tooltipTitleFontFamily:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",tooltipTitleFontSize:14,tooltipTitleFontStyle:"bold",tooltipTitleFontColor:"#fff",tooltipYPadding:6,tooltipXPadding:6,tooltipCaretSize:8,tooltipCornerRadius:6,tooltipXOffset:10,tooltipTemplate:"<%if (label){%><%=label%>: <%}%><%= value %>",multiTooltipTemplate:"<%= value %>",multiTooltipKeyBackground:"#fff",onAnimationProgress:function(){},onAnimationComplete:function(){}}},e.types={};var s=e.helpers={},n=s.each=function(t,i,e){var s=Array.prototype.slice.call(arguments,3);if(t)if(t.length===+t.length){var n;for(n=0;n<t.length;n++)i.apply(e,[t[n],n].concat(s))}else for(var o in t)i.apply(e,[t[o],o].concat(s))},o=s.clone=function(t){var i={};return n(t,function(e,s){t.hasOwnProperty(s)&&(i[s]=e)}),i},a=s.extend=function(t){return n(Array.prototype.slice.call(arguments,1),function(i){n(i,function(e,s){i.hasOwnProperty(s)&&(t[s]=e)})}),t},h=s.merge=function(){var t=Array.prototype.slice.call(arguments,0);return t.unshift({}),a.apply(null,t)},l=s.indexOf=function(t,i){if(Array.prototype.indexOf)return t.indexOf(i);for(var e=0;e<t.length;e++)if(t[e]===i)return e;return-1},r=(s.where=function(t,i){var e=[];return s.each(t,function(t){i(t)&&e.push(t)}),e},s.findNextWhere=function(t,i,e){e||(e=-1);for(var s=e+1;s<t.length;s++){var n=t[s];if(i(n))return n}},s.findPreviousWhere=function(t,i,e){e||(e=t.length);for(var s=e-1;s>=0;s--){var n=t[s];if(i(n))return n}},s.inherits=function(t){var i=this,e=t&&t.hasOwnProperty("constructor")?t.constructor:function(){return i.apply(this,arguments)},s=function(){this.constructor=e};return s.prototype=i.prototype,e.prototype=new s,e.extend=r,t&&a(e.prototype,t),e.__super__=i.prototype,e}),c=s.noop=function(){},u=s.uid=function(){var t=0;return function(){return"chart-"+t++}}(),d=s.warn=function(t){window.console&&"function"==typeof window.console.warn&&console.warn(t)},p=s.amd="function"==typeof define&&define.amd,f=s.isNumber=function(t){return!isNaN(parseFloat(t))&&isFinite(t)},g=s.max=function(t){return Math.max.apply(Math,t)},m=s.min=function(t){return Math.min.apply(Math,t)},v=(s.cap=function(t,i,e){if(f(i)){if(t>i)return i}else if(f(e)&&e>t)return e;return t},s.getDecimalPlaces=function(t){return t%1!==0&&f(t)?t.toString().split(".")[1].length:0}),S=s.radians=function(t){return t*(Math.PI/180)},x=(s.getAngleFromPoint=function(t,i){var e=i.x-t.x,s=i.y-t.y,n=Math.sqrt(e*e+s*s),o=2*Math.PI+Math.atan2(s,e);return 0>e&&0>s&&(o+=2*Math.PI),{angle:o,distance:n}},s.aliasPixel=function(t){return t%2===0?0:.5}),y=(s.splineCurve=function(t,i,e,s){var n=Math.sqrt(Math.pow(i.x-t.x,2)+Math.pow(i.y-t.y,2)),o=Math.sqrt(Math.pow(e.x-i.x,2)+Math.pow(e.y-i.y,2)),a=s*n/(n+o),h=s*o/(n+o);return{inner:{x:i.x-a*(e.x-t.x),y:i.y-a*(e.y-t.y)},outer:{x:i.x+h*(e.x-t.x),y:i.y+h*(e.y-t.y)}}},s.calculateOrderOfMagnitude=function(t){return Math.floor(Math.log(t)/Math.LN10)}),C=(s.calculateScaleRange=function(t,i,e,s,n){var o=2,a=Math.floor(i/(1.5*e)),h=o>=a,l=g(t),r=m(t);l===r&&(l+=.5,r>=.5&&!s?r-=.5:l+=.5);for(var c=Math.abs(l-r),u=y(c),d=Math.ceil(l/(1*Math.pow(10,u)))*Math.pow(10,u),p=s?0:Math.floor(r/(1*Math.pow(10,u)))*Math.pow(10,u),f=d-p,v=Math.pow(10,u),S=Math.round(f/v);(S>a||a>2*S)&&!h;)if(S>a)v*=2,S=Math.round(f/v),S%1!==0&&(h=!0);else if(n&&u>=0){if(v/2%1!==0)break;v/=2,S=Math.round(f/v)}else v/=2,S=Math.round(f/v);return h&&(S=o,v=f/S),{steps:S,stepValue:v,min:p,max:p+S*v}},s.template=function(t,i){function e(t,i){var e=/\W/.test(t)?new Function("obj","var p=[],print=function(){p.push.apply(p,arguments);};with(obj){p.push('"+t.replace(/[\r\t\n]/g," ").split("<%").join(" ").replace(/((^|%>)[^\t]*)'/g,"$1\r").replace(/\t=(.*?)%>/g,"',$1,'").split(" ").join("');").split("%>").join("p.push('").split("\r").join("\\'")+"');}return p.join('');"):s[t]=s[t];return i?e(i):e}if(t instanceof Function)return t(i);var s={};return e(t,i)}),w=(s.generateLabels=function(t,i,e,s){var o=new Array(i);return labelTemplateString&&n(o,function(i,n){o[n]=C(t,{value:e+s*(n+1)})}),o},s.easingEffects={linear:function(t){return t},easeInQuad:function(t){return t*t},easeOutQuad:function(t){return-1*t*(t-2)},easeInOutQuad:function(t){return(t/=.5)<1?.5*t*t:-0.5*(--t*(t-2)-1)},easeInCubic:function(t){return t*t*t},easeOutCubic:function(t){return 1*((t=t/1-1)*t*t+1)},easeInOutCubic:function(t){return(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2)},easeInQuart:function(t){return t*t*t*t},easeOutQuart:function(t){return-1*((t=t/1-1)*t*t*t-1)},easeInOutQuart:function(t){return(t/=.5)<1?.5*t*t*t*t:-0.5*((t-=2)*t*t*t-2)},easeInQuint:function(t){return 1*(t/=1)*t*t*t*t},easeOutQuint:function(t){return 1*((t=t/1-1)*t*t*t*t+1)},easeInOutQuint:function(t){return(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)},easeInSine:function(t){return-1*Math.cos(t/1*(Math.PI/2))+1},easeOutSine:function(t){return 1*Math.sin(t/1*(Math.PI/2))},easeInOutSine:function(t){return-0.5*(Math.cos(Math.PI*t/1)-1)},easeInExpo:function(t){return 0===t?1:1*Math.pow(2,10*(t/1-1))},easeOutExpo:function(t){return 1===t?1:1*(-Math.pow(2,-10*t/1)+1)},easeInOutExpo:function(t){return 0===t?0:1===t?1:(t/=.5)<1?.5*Math.pow(2,10*(t-1)):.5*(-Math.pow(2,-10*--t)+2)},easeInCirc:function(t){return t>=1?t:-1*(Math.sqrt(1-(t/=1)*t)-1)},easeOutCirc:function(t){return 1*Math.sqrt(1-(t=t/1-1)*t)},easeInOutCirc:function(t){return(t/=.5)<1?-0.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},easeInElastic:function(t){var i=1.70158,e=0,s=1;return 0===t?0:1==(t/=1)?1:(e||(e=.3),s<Math.abs(1)?(s=1,i=e/4):i=e/(2*Math.PI)*Math.asin(1/s),-(s*Math.pow(2,10*(t-=1))*Math.sin(2*(1*t-i)*Math.PI/e)))},easeOutElastic:function(t){var i=1.70158,e=0,s=1;return 0===t?0:1==(t/=1)?1:(e||(e=.3),s<Math.abs(1)?(s=1,i=e/4):i=e/(2*Math.PI)*Math.asin(1/s),s*Math.pow(2,-10*t)*Math.sin(2*(1*t-i)*Math.PI/e)+1)},easeInOutElastic:function(t){var i=1.70158,e=0,s=1;return 0===t?0:2==(t/=.5)?1:(e||(e=.3*1.5),s<Math.abs(1)?(s=1,i=e/4):i=e/(2*Math.PI)*Math.asin(1/s),1>t?-.5*s*Math.pow(2,10*(t-=1))*Math.sin(2*(1*t-i)*Math.PI/e):s*Math.pow(2,-10*(t-=1))*Math.sin(2*(1*t-i)*Math.PI/e)*.5+1)},easeInBack:function(t){var i=1.70158;return 1*(t/=1)*t*((i+1)*t-i)},easeOutBack:function(t){var i=1.70158;return 1*((t=t/1-1)*t*((i+1)*t+i)+1)},easeInOutBack:function(t){var i=1.70158;return(t/=.5)<1?.5*t*t*(((i*=1.525)+1)*t-i):.5*((t-=2)*t*(((i*=1.525)+1)*t+i)+2)},easeInBounce:function(t){return 1-w.easeOutBounce(1-t)},easeOutBounce:function(t){return(t/=1)<1/2.75?7.5625*t*t:2/2.75>t?1*(7.5625*(t-=1.5/2.75)*t+.75):2.5/2.75>t?1*(7.5625*(t-=2.25/2.75)*t+.9375):1*(7.5625*(t-=2.625/2.75)*t+.984375)},easeInOutBounce:function(t){return.5>t?.5*w.easeInBounce(2*t):.5*w.easeOutBounce(2*t-1)+.5}}),b=s.requestAnimFrame=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(t){return window.setTimeout(t,1e3/60)}}(),P=s.cancelAnimFrame=function(){return window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||window.oCancelAnimationFrame||window.msCancelAnimationFrame||function(t){return window.clearTimeout(t,1e3/60)}}(),L=(s.animationLoop=function(t,i,e,s,n,o){var a=0,h=w[e]||w.linear,l=function(){a++;var e=a/i,r=h(e);t.call(o,r,e,a),s.call(o,r,e),i>a?o.animationFrame=b(l):n.apply(o)};b(l)},s.getRelativePosition=function(t){var i,e,s=t.originalEvent||t,n=t.currentTarget||t.srcElement,o=n.getBoundingClientRect();return s.touches?(i=s.touches[0].clientX-o.left,e=s.touches[0].clientY-o.top):(i=s.clientX-o.left,e=s.clientY-o.top),{x:i,y:e}},s.addEvent=function(t,i,e){t.addEventListener?t.addEventListener(i,e):t.attachEvent?t.attachEvent("on"+i,e):t["on"+i]=e}),k=s.removeEvent=function(t,i,e){t.removeEventListener?t.removeEventListener(i,e,!1):t.detachEvent?t.detachEvent("on"+i,e):t["on"+i]=c},F=(s.bindEvents=function(t,i,e){t.events||(t.events={}),n(i,function(i){t.events[i]=function(){e.apply(t,arguments)},L(t.chart.canvas,i,t.events[i])})},s.unbindEvents=function(t,i){n(i,function(i,e){k(t.chart.canvas,e,i)})}),R=s.getMaximumWidth=function(t){var i=t.parentNode;return i.clientWidth},T=s.getMaximumHeight=function(t){var i=t.parentNode;return i.clientHeight},A=(s.getMaximumSize=s.getMaximumWidth,s.retinaScale=function(t){var i=t.ctx,e=t.canvas.width,s=t.canvas.height;window.devicePixelRatio&&(i.canvas.style.width=e+"px",i.canvas.style.height=s+"px",i.canvas.height=s*window.devicePixelRatio,i.canvas.width=e*window.devicePixelRatio,i.scale(window.devicePixelRatio,window.devicePixelRatio))}),M=s.clear=function(t){t.ctx.clearRect(0,0,t.width,t.height)},W=s.fontString=function(t,i,e){return i+" "+t+"px "+e},z=s.longestText=function(t,i,e){t.font=i;var s=0;return n(e,function(i){var e=t.measureText(i).width;s=e>s?e:s}),s},B=s.drawRoundedRectangle=function(t,i,e,s,n,o){t.beginPath(),t.moveTo(i+o,e),t.lineTo(i+s-o,e),t.quadraticCurveTo(i+s,e,i+s,e+o),t.lineTo(i+s,e+n-o),t.quadraticCurveTo(i+s,e+n,i+s-o,e+n),t.lineTo(i+o,e+n),t.quadraticCurveTo(i,e+n,i,e+n-o),t.lineTo(i,e+o),t.quadraticCurveTo(i,e,i+o,e),t.closePath()};e.instances={},e.Type=function(t,i,s){this.options=i,this.chart=s,this.id=u(),e.instances[this.id]=this,i.responsive&&this.resize(),this.initialize.call(this,t)},a(e.Type.prototype,{initialize:function(){return this},clear:function(){return M(this.chart),this},stop:function(){return P(this.animationFrame),this},resize:function(t){this.stop();var i=this.chart.canvas,e=R(this.chart.canvas),s=this.options.maintainAspectRatio?e/this.chart.aspectRatio:T(this.chart.canvas);return i.width=this.chart.width=e,i.height=this.chart.height=s,A(this.chart),"function"==typeof t&&t.apply(this,Array.prototype.slice.call(arguments,1)),this},reflow:c,render:function(t){return t&&this.reflow(),this.options.animation&&!t?s.animationLoop(this.draw,this.options.animationSteps,this.options.animationEasing,this.options.onAnimationProgress,this.options.onAnimationComplete,this):(this.draw(),this.options.onAnimationComplete.call(this)),this},generateLegend:function(){return C(this.options.legendTemplate,this)},destroy:function(){this.clear(),F(this,this.events);var t=this.chart.canvas;t.width=this.chart.width,t.height=this.chart.height,t.style.removeProperty?(t.style.removeProperty("width"),t.style.removeProperty("height")):(t.style.removeAttribute("width"),t.style.removeAttribute("height")),delete e.instances[this.id]},showTooltip:function(t,i){"undefined"==typeof this.activeElements&&(this.activeElements=[]);var o=function(t){var i=!1;return t.length!==this.activeElements.length?i=!0:(n(t,function(t,e){t!==this.activeElements[e]&&(i=!0)},this),i)}.call(this,t);if(o||i){if(this.activeElements=t,this.draw(),this.options.customTooltips&&this.options.customTooltips(!1),t.length>0)if(this.datasets&&this.datasets.length>1){for(var a,h,r=this.datasets.length-1;r>=0&&(a=this.datasets[r].points||this.datasets[r].bars||this.datasets[r].segments,h=l(a,t[0]),-1===h);r--);var c=[],u=[],d=function(){var t,i,e,n,o,a=[],l=[],r=[];return s.each(this.datasets,function(i){t=i.points||i.bars||i.segments,t[h]&&t[h].hasValue()&&a.push(t[h])}),s.each(a,function(t){l.push(t.x),r.push(t.y),c.push(s.template(this.options.multiTooltipTemplate,t)),u.push({fill:t._saved.fillColor||t.fillColor,stroke:t._saved.strokeColor||t.strokeColor})},this),o=m(r),e=g(r),n=m(l),i=g(l),{x:n>this.chart.width/2?n:i,y:(o+e)/2}}.call(this,h);new e.MultiTooltip({x:d.x,y:d.y,xPadding:this.options.tooltipXPadding,yPadding:this.options.tooltipYPadding,xOffset:this.options.tooltipXOffset,fillColor:this.options.tooltipFillColor,textColor:this.options.tooltipFontColor,fontFamily:this.options.tooltipFontFamily,fontStyle:this.options.tooltipFontStyle,fontSize:this.options.tooltipFontSize,titleTextColor:this.options.tooltipTitleFontColor,titleFontFamily:this.options.tooltipTitleFontFamily,titleFontStyle:this.options.tooltipTitleFontStyle,titleFontSize:this.options.tooltipTitleFontSize,cornerRadius:this.options.tooltipCornerRadius,labels:c,legendColors:u,legendColorBackground:this.options.multiTooltipKeyBackground,title:t[0].label,chart:this.chart,ctx:this.chart.ctx,custom:this.options.customTooltips}).draw()}else n(t,function(t){var i=t.tooltipPosition();new e.Tooltip({x:Math.round(i.x),y:Math.round(i.y),xPadding:this.options.tooltipXPadding,yPadding:this.options.tooltipYPadding,fillColor:this.options.tooltipFillColor,textColor:this.options.tooltipFontColor,fontFamily:this.options.tooltipFontFamily,fontStyle:this.options.tooltipFontStyle,fontSize:this.options.tooltipFontSize,caretHeight:this.options.tooltipCaretSize,cornerRadius:this.options.tooltipCornerRadius,text:C(this.options.tooltipTemplate,t),chart:this.chart,custom:this.options.customTooltips}).draw()},this);return this}},toBase64Image:function(){return this.chart.canvas.toDataURL.apply(this.chart.canvas,arguments)}}),e.Type.extend=function(t){var i=this,s=function(){return i.apply(this,arguments)};if(s.prototype=o(i.prototype),a(s.prototype,t),s.extend=e.Type.extend,t.name||i.prototype.name){var n=t.name||i.prototype.name,l=e.defaults[i.prototype.name]?o(e.defaults[i.prototype.name]):{};e.defaults[n]=a(l,t.defaults),e.types[n]=s,e.prototype[n]=function(t,i){var o=h(e.defaults.global,e.defaults[n],i||{});return new s(t,o,this)}}else d("Name not provided for this chart, so it hasn't been registered");return i},e.Element=function(t){a(this,t),this.initialize.apply(this,arguments),this.save()},a(e.Element.prototype,{initialize:function(){},restore:function(t){return t?n(t,function(t){this[t]=this._saved[t]},this):a(this,this._saved),this},save:function(){return this._saved=o(this),delete this._saved._saved,this},update:function(t){return n(t,function(t,i){this._saved[i]=this[i],this[i]=t},this),this},transition:function(t,i){return n(t,function(t,e){this[e]=(t-this._saved[e])*i+this._saved[e]},this),this},tooltipPosition:function(){return{x:this.x,y:this.y}},hasValue:function(){return f(this.value)}}),e.Element.extend=r,e.Point=e.Element.extend({display:!0,inRange:function(t,i){var e=this.hitDetectionRadius+this.radius;return Math.pow(t-this.x,2)+Math.pow(i-this.y,2)<Math.pow(e,2)},draw:function(){if(this.display){var t=this.ctx;t.beginPath(),t.arc(this.x,this.y,this.radius,0,2*Math.PI),t.closePath(),t.strokeStyle=this.strokeColor,t.lineWidth=this.strokeWidth,t.fillStyle=this.fillColor,t.fill(),t.stroke()}}}),e.Arc=e.Element.extend({inRange:function(t,i){var e=s.getAngleFromPoint(this,{x:t,y:i}),n=e.angle>=this.startAngle&&e.angle<=this.endAngle,o=e.distance>=this.innerRadius&&e.distance<=this.outerRadius;return n&&o},tooltipPosition:function(){var t=this.startAngle+(this.endAngle-this.startAngle)/2,i=(this.outerRadius-this.innerRadius)/2+this.innerRadius;return{x:this.x+Math.cos(t)*i,y:this.y+Math.sin(t)*i}},draw:function(t){var i=this.ctx;i.beginPath(),i.arc(this.x,this.y,this.outerRadius,this.startAngle,this.endAngle),i.arc(this.x,this.y,this.innerRadius,this.endAngle,this.startAngle,!0),i.closePath(),i.strokeStyle=this.strokeColor,i.lineWidth=this.strokeWidth,i.fillStyle=this.fillColor,i.fill(),i.lineJoin="bevel",this.showStroke&&i.stroke()}}),e.Rectangle=e.Element.extend({draw:function(){var t=this.ctx,i=this.width/2,e=this.x-i,s=this.x+i,n=this.base-(this.base-this.y),o=this.strokeWidth/2;this.showStroke&&(e+=o,s-=o,n+=o),t.beginPath(),t.fillStyle=this.fillColor,t.strokeStyle=this.strokeColor,t.lineWidth=this.strokeWidth,t.moveTo(e,this.base),t.lineTo(e,n),t.lineTo(s,n),t.lineTo(s,this.base),t.fill(),this.showStroke&&t.stroke()},height:function(){return this.base-this.y},inRange:function(t,i){return t>=this.x-this.width/2&&t<=this.x+this.width/2&&i>=this.y&&i<=this.base}}),e.Tooltip=e.Element.extend({draw:function(){var t=this.chart.ctx;t.font=W(this.fontSize,this.fontStyle,this.fontFamily),this.xAlign="center",this.yAlign="above";var i=this.caretPadding=2,e=t.measureText(this.text).width+2*this.xPadding,s=this.fontSize+2*this.yPadding,n=s+this.caretHeight+i;this.x+e/2>this.chart.width?this.xAlign="left":this.x-e/2<0&&(this.xAlign="right"),this.y-n<0&&(this.yAlign="below");var o=this.x-e/2,a=this.y-n;if(t.fillStyle=this.fillColor,this.custom)this.custom(this);else{switch(this.yAlign){case"above":t.beginPath(),t.moveTo(this.x,this.y-i),t.lineTo(this.x+this.caretHeight,this.y-(i+this.caretHeight)),t.lineTo(this.x-this.caretHeight,this.y-(i+this.caretHeight)),t.closePath(),t.fill();break;case"below":a=this.y+i+this.caretHeight,t.beginPath(),t.moveTo(this.x,this.y+i),t.lineTo(this.x+this.caretHeight,this.y+i+this.caretHeight),t.lineTo(this.x-this.caretHeight,this.y+i+this.caretHeight),t.closePath(),t.fill()}switch(this.xAlign){case"left":o=this.x-e+(this.cornerRadius+this.caretHeight);break;case"right":o=this.x-(this.cornerRadius+this.caretHeight)}B(t,o,a,e,s,this.cornerRadius),t.fill(),t.fillStyle=this.textColor,t.textAlign="center",t.textBaseline="middle",t.fillText(this.text,o+e/2,a+s/2)}}}),e.MultiTooltip=e.Element.extend({initialize:function(){this.font=W(this.fontSize,this.fontStyle,this.fontFamily),this.titleFont=W(this.titleFontSize,this.titleFontStyle,this.titleFontFamily),this.height=this.labels.length*this.fontSize+(this.labels.length-1)*(this.fontSize/2)+2*this.yPadding+1.5*this.titleFontSize,this.ctx.font=this.titleFont;var t=this.ctx.measureText(this.title).width,i=z(this.ctx,this.font,this.labels)+this.fontSize+3,e=g([i,t]);this.width=e+2*this.xPadding;var s=this.height/2;this.y-s<0?this.y=s:this.y+s>this.chart.height&&(this.y=this.chart.height-s),this.x>this.chart.width/2?this.x-=this.xOffset+this.width:this.x+=this.xOffset},getLineHeight:function(t){var i=this.y-this.height/2+this.yPadding,e=t-1;return 0===t?i+this.titleFontSize/2:i+(1.5*this.fontSize*e+this.fontSize/2)+1.5*this.titleFontSize},draw:function(){if(this.custom)this.custom(this);else{B(this.ctx,this.x,this.y-this.height/2,this.width,this.height,this.cornerRadius);var t=this.ctx;t.fillStyle=this.fillColor,t.fill(),t.closePath(),t.textAlign="left",t.textBaseline="middle",t.fillStyle=this.titleTextColor,t.font=this.titleFont,t.fillText(this.title,this.x+this.xPadding,this.getLineHeight(0)),t.font=this.font,s.each(this.labels,function(i,e){t.fillStyle=this.textColor,t.fillText(i,this.x+this.xPadding+this.fontSize+3,this.getLineHeight(e+1)),t.fillStyle=this.legendColorBackground,t.fillRect(this.x+this.xPadding,this.getLineHeight(e+1)-this.fontSize/2,this.fontSize,this.fontSize),t.fillStyle=this.legendColors[e].fill,t.fillRect(this.x+this.xPadding,this.getLineHeight(e+1)-this.fontSize/2,this.fontSize,this.fontSize)},this)}}}),e.Scale=e.Element.extend({initialize:function(){this.fit()},buildYLabels:function(){this.yLabels=[];for(var t=v(this.stepValue),i=0;i<=this.steps;i++)this.yLabels.push(C(this.templateString,{value:(this.min+i*this.stepValue).toFixed(t)}));this.yLabelWidth=this.display&&this.showLabels?z(this.ctx,this.font,this.yLabels):0},addXLabel:function(t){this.xLabels.push(t),this.valuesCount++,this.fit()},removeXLabel:function(){this.xLabels.shift(),this.valuesCount--,this.fit()},fit:function(){this.startPoint=this.display?this.fontSize:0,this.endPoint=this.display?this.height-1.5*this.fontSize-5:this.height,this.startPoint+=this.padding,this.endPoint-=this.padding;var t,i=this.endPoint-this.startPoint;for(this.calculateYRange(i),this.buildYLabels(),this.calculateXLabelRotation();i>this.endPoint-this.startPoint;)i=this.endPoint-this.startPoint,t=this.yLabelWidth,this.calculateYRange(i),this.buildYLabels(),t<this.yLabelWidth&&this.calculateXLabelRotation()},calculateXLabelRotation:function(){this.ctx.font=this.font;var t,i,e=this.ctx.measureText(this.xLabels[0]).width,s=this.ctx.measureText(this.xLabels[this.xLabels.length-1]).width;if(this.xScalePaddingRight=s/2+3,this.xScalePaddingLeft=e/2>this.yLabelWidth+10?e/2:this.yLabelWidth+10,this.xLabelRotation=0,this.display){var n,o=z(this.ctx,this.font,this.xLabels);this.xLabelWidth=o;for(var a=Math.floor(this.calculateX(1)-this.calculateX(0))-6;this.xLabelWidth>a&&0===this.xLabelRotation||this.xLabelWidth>a&&this.xLabelRotation<=90&&this.xLabelRotation>0;)n=Math.cos(S(this.xLabelRotation)),t=n*e,i=n*s,t+this.fontSize/2>this.yLabelWidth+8&&(this.xScalePaddingLeft=t+this.fontSize/2),this.xScalePaddingRight=this.fontSize/2,this.xLabelRotation++,this.xLabelWidth=n*o;this.xLabelRotation>0&&(this.endPoint-=Math.sin(S(this.xLabelRotation))*o+3)}else this.xLabelWidth=0,this.xScalePaddingRight=this.padding,this.xScalePaddingLeft=this.padding},calculateYRange:c,drawingArea:function(){return this.startPoint-this.endPoint},calculateY:function(t){var i=this.drawingArea()/(this.min-this.max);return this.endPoint-i*(t-this.min)},calculateX:function(t){var i=(this.xLabelRotation>0,this.width-(this.xScalePaddingLeft+this.xScalePaddingRight)),e=i/Math.max(this.valuesCount-(this.offsetGridLines?0:1),1),s=e*t+this.xScalePaddingLeft;return this.offsetGridLines&&(s+=e/2),Math.round(s)},update:function(t){s.extend(this,t),this.fit()},draw:function(){var t=this.ctx,i=(this.endPoint-this.startPoint)/this.steps,e=Math.round(this.xScalePaddingLeft);this.display&&(t.fillStyle=this.textColor,t.font=this.font,n(this.yLabels,function(n,o){var a=this.endPoint-i*o,h=Math.round(a),l=this.showHorizontalLines;t.textAlign="right",t.textBaseline="middle",this.showLabels&&t.fillText(n,e-10,a),0!==o||l||(l=!0),l&&t.beginPath(),o>0?(t.lineWidth=this.gridLineWidth,t.strokeStyle=this.gridLineColor):(t.lineWidth=this.lineWidth,t.strokeStyle=this.lineColor),h+=s.aliasPixel(t.lineWidth),l&&(t.moveTo(e,h),t.lineTo(this.width,h),t.stroke(),t.closePath()),t.lineWidth=this.lineWidth,t.strokeStyle=this.lineColor,t.beginPath(),t.moveTo(e-5,h),t.lineTo(e,h),t.stroke(),t.closePath()},this),n(this.xLabels,function(i,e){var s=this.calculateX(e)+x(this.lineWidth),n=this.calculateX(e-(this.offsetGridLines?.5:0))+x(this.lineWidth),o=this.xLabelRotation>0,a=this.showVerticalLines;0!==e||a||(a=!0),a&&t.beginPath(),e>0?(t.lineWidth=this.gridLineWidth,t.strokeStyle=this.gridLineColor):(t.lineWidth=this.lineWidth,t.strokeStyle=this.lineColor),a&&(t.moveTo(n,this.endPoint),t.lineTo(n,this.startPoint-3),t.stroke(),t.closePath()),t.lineWidth=this.lineWidth,t.strokeStyle=this.lineColor,t.beginPath(),t.moveTo(n,this.endPoint),t.lineTo(n,this.endPoint+5),t.stroke(),t.closePath(),t.save(),t.translate(s,o?this.endPoint+12:this.endPoint+8),t.rotate(-1*S(this.xLabelRotation)),t.font=this.font,t.textAlign=o?"right":"center",t.textBaseline=o?"middle":"top",t.fillText(i,0,0),t.restore()},this))}}),e.RadialScale=e.Element.extend({initialize:function(){this.size=m([this.height,this.width]),this.drawingArea=this.display?this.size/2-(this.fontSize/2+this.backdropPaddingY):this.size/2},calculateCenterOffset:function(t){var i=this.drawingArea/(this.max-this.min);return(t-this.min)*i},update:function(){this.lineArc?this.drawingArea=this.display?this.size/2-(this.fontSize/2+this.backdropPaddingY):this.size/2:this.setScaleSize(),this.buildYLabels()},buildYLabels:function(){this.yLabels=[];for(var t=v(this.stepValue),i=0;i<=this.steps;i++)this.yLabels.push(C(this.templateString,{value:(this.min+i*this.stepValue).toFixed(t)}))},getCircumference:function(){return 2*Math.PI/this.valuesCount},setScaleSize:function(){var t,i,e,s,n,o,a,h,l,r,c,u,d=m([this.height/2-this.pointLabelFontSize-5,this.width/2]),p=this.width,g=0;for(this.ctx.font=W(this.pointLabelFontSize,this.pointLabelFontStyle,this.pointLabelFontFamily),i=0;i<this.valuesCount;i++)t=this.getPointPosition(i,d),e=this.ctx.measureText(C(this.templateString,{value:this.labels[i]})).width+5,0===i||i===this.valuesCount/2?(s=e/2,t.x+s>p&&(p=t.x+s,n=i),t.x-s<g&&(g=t.x-s,a=i)):i<this.valuesCount/2?t.x+e>p&&(p=t.x+e,n=i):i>this.valuesCount/2&&t.x-e<g&&(g=t.x-e,a=i);l=g,r=Math.ceil(p-this.width),o=this.getIndexAngle(n),h=this.getIndexAngle(a),c=r/Math.sin(o+Math.PI/2),u=l/Math.sin(h+Math.PI/2),c=f(c)?c:0,u=f(u)?u:0,this.drawingArea=d-(u+c)/2,this.setCenterPoint(u,c)},setCenterPoint:function(t,i){var e=this.width-i-this.drawingArea,s=t+this.drawingArea;this.xCenter=(s+e)/2,this.yCenter=this.height/2},getIndexAngle:function(t){var i=2*Math.PI/this.valuesCount;return t*i-Math.PI/2},getPointPosition:function(t,i){var e=this.getIndexAngle(t);return{x:Math.cos(e)*i+this.xCenter,y:Math.sin(e)*i+this.yCenter}},draw:function(){if(this.display){var t=this.ctx;if(n(this.yLabels,function(i,e){if(e>0){var s,n=e*(this.drawingArea/this.steps),o=this.yCenter-n;if(this.lineWidth>0)if(t.strokeStyle=this.lineColor,t.lineWidth=this.lineWidth,this.lineArc)t.beginPath(),t.arc(this.xCenter,this.yCenter,n,0,2*Math.PI),t.closePath(),t.stroke();else{t.beginPath();for(var a=0;a<this.valuesCount;a++)s=this.getPointPosition(a,this.calculateCenterOffset(this.min+e*this.stepValue)),0===a?t.moveTo(s.x,s.y):t.lineTo(s.x,s.y);t.closePath(),t.stroke()}if(this.showLabels){if(t.font=W(this.fontSize,this.fontStyle,this.fontFamily),this.showLabelBackdrop){var h=t.measureText(i).width;t.fillStyle=this.backdropColor,t.fillRect(this.xCenter-h/2-this.backdropPaddingX,o-this.fontSize/2-this.backdropPaddingY,h+2*this.backdropPaddingX,this.fontSize+2*this.backdropPaddingY)}t.textAlign="center",t.textBaseline="middle",t.fillStyle=this.fontColor,t.fillText(i,this.xCenter,o)}}},this),!this.lineArc){t.lineWidth=this.angleLineWidth,t.strokeStyle=this.angleLineColor;for(var i=this.valuesCount-1;i>=0;i--){if(this.angleLineWidth>0){var e=this.getPointPosition(i,this.calculateCenterOffset(this.max));t.beginPath(),t.moveTo(this.xCenter,this.yCenter),t.lineTo(e.x,e.y),t.stroke(),t.closePath()}var s=this.getPointPosition(i,this.calculateCenterOffset(this.max)+5);t.font=W(this.pointLabelFontSize,this.pointLabelFontStyle,this.pointLabelFontFamily),t.fillStyle=this.pointLabelFontColor;var o=this.labels.length,a=this.labels.length/2,h=a/2,l=h>i||i>o-h,r=i===h||i===o-h;t.textAlign=0===i?"center":i===a?"center":a>i?"left":"right",t.textBaseline=r?"middle":l?"bottom":"top",t.fillText(this.labels[i],s.x,s.y)}}}}}),s.addEvent(window,"resize",function(){var t;return function(){clearTimeout(t),t=setTimeout(function(){n(e.instances,function(t){t.options.responsive&&t.resize(t.render,!0)})},50)}}()),p?define(function(){return e}):"object"==typeof module&&module.exports&&(module.exports=e),t.Chart=e,e.noConflict=function(){return t.Chart=i,e}}).call(this),function(){"use strict";var t=this,i=t.Chart,e=i.helpers,s={scaleBeginAtZero:!0,scaleShowGridLines:!0,scaleGridLineColor:"rgba(0,0,0,.05)",scaleGridLineWidth:1,scaleShowHorizontalLines:!0,scaleShowVerticalLines:!0,barShowStroke:!0,barStrokeWidth:2,barValueSpacing:5,barDatasetSpacing:1,legendTemplate:'<ul class="<%=name.toLowerCase()%>-legend"><% for (var i=0; i<datasets.length; i++){%><li><span style="background-color:<%=datasets[i].fillColor%>"></span><%if(datasets[i].label){%><%=datasets[i].label%><%}%></li><%}%></ul>'};i.Type.extend({name:"Bar",defaults:s,initialize:function(t){var s=this.options;this.ScaleClass=i.Scale.extend({offsetGridLines:!0,calculateBarX:function(t,i,e){var n=this.calculateBaseWidth(),o=this.calculateX(e)-n/2,a=this.calculateBarWidth(t);return o+a*i+i*s.barDatasetSpacing+a/2},calculateBaseWidth:function(){return this.calculateX(1)-this.calculateX(0)-2*s.barValueSpacing},calculateBarWidth:function(t){var i=this.calculateBaseWidth()-(t-1)*s.barDatasetSpacing;return i/t}}),this.datasets=[],this.options.showTooltips&&e.bindEvents(this,this.options.tooltipEvents,function(t){var i="mouseout"!==t.type?this.getBarsAtEvent(t):[];this.eachBars(function(t){t.restore(["fillColor","strokeColor"])}),e.each(i,function(t){t.fillColor=t.highlightFill,t.strokeColor=t.highlightStroke}),this.showTooltip(i)}),this.BarClass=i.Rectangle.extend({strokeWidth:this.options.barStrokeWidth,showStroke:this.options.barShowStroke,ctx:this.chart.ctx}),e.each(t.datasets,function(i){var s={label:i.label||null,fillColor:i.fillColor,strokeColor:i.strokeColor,bars:[]};this.datasets.push(s),e.each(i.data,function(e,n){s.bars.push(new this.BarClass({value:e,label:t.labels[n],datasetLabel:i.label,strokeColor:i.strokeColor,fillColor:i.fillColor,highlightFill:i.highlightFill||i.fillColor,highlightStroke:i.highlightStroke||i.strokeColor}))},this)},this),this.buildScale(t.labels),this.BarClass.prototype.base=this.scale.endPoint,this.eachBars(function(t,i,s){e.extend(t,{width:this.scale.calculateBarWidth(this.datasets.length),x:this.scale.calculateBarX(this.datasets.length,s,i),y:this.scale.endPoint}),t.save()},this),this.render()},update:function(){this.scale.update(),e.each(this.activeElements,function(t){t.restore(["fillColor","strokeColor"])}),this.eachBars(function(t){t.save()}),this.render()},eachBars:function(t){e.each(this.datasets,function(i,s){e.each(i.bars,t,this,s)},this)},getBarsAtEvent:function(t){for(var i,s=[],n=e.getRelativePosition(t),o=function(t){s.push(t.bars[i])},a=0;a<this.datasets.length;a++)for(i=0;i<this.datasets[a].bars.length;i++)if(this.datasets[a].bars[i].inRange(n.x,n.y))return e.each(this.datasets,o),s;return s},buildScale:function(t){var i=this,s=function(){var t=[];return i.eachBars(function(i){t.push(i.value)}),t},n={templateString:this.options.scaleLabel,height:this.chart.height,width:this.chart.width,ctx:this.chart.ctx,textColor:this.options.scaleFontColor,fontSize:this.options.scaleFontSize,fontStyle:this.options.scaleFontStyle,fontFamily:this.options.scaleFontFamily,valuesCount:t.length,beginAtZero:this.options.scaleBeginAtZero,integersOnly:this.options.scaleIntegersOnly,calculateYRange:function(t){var i=e.calculateScaleRange(s(),t,this.fontSize,this.beginAtZero,this.integersOnly);e.extend(this,i)},xLabels:t,font:e.fontString(this.options.scaleFontSize,this.options.scaleFontStyle,this.options.scaleFontFamily),lineWidth:this.options.scaleLineWidth,lineColor:this.options.scaleLineColor,showHorizontalLines:this.options.scaleShowHorizontalLines,showVerticalLines:this.options.scaleShowVerticalLines,gridLineWidth:this.options.scaleShowGridLines?this.options.scaleGridLineWidth:0,gridLineColor:this.options.scaleShowGridLines?this.options.scaleGridLineColor:"rgba(0,0,0,0)",padding:this.options.showScale?0:this.options.barShowStroke?this.options.barStrokeWidth:0,showLabels:this.options.scaleShowLabels,display:this.options.showScale};this.options.scaleOverride&&e.extend(n,{calculateYRange:e.noop,steps:this.options.scaleSteps,stepValue:this.options.scaleStepWidth,min:this.options.scaleStartValue,max:this.options.scaleStartValue+this.options.scaleSteps*this.options.scaleStepWidth}),this.scale=new this.ScaleClass(n)},addData:function(t,i){e.each(t,function(t,e){this.datasets[e].bars.push(new this.BarClass({value:t,label:i,x:this.scale.calculateBarX(this.datasets.length,e,this.scale.valuesCount+1),y:this.scale.endPoint,width:this.scale.calculateBarWidth(this.datasets.length),base:this.scale.endPoint,strokeColor:this.datasets[e].strokeColor,fillColor:this.datasets[e].fillColor}))
|
11 |
+
},this),this.scale.addXLabel(i),this.update()},removeData:function(){this.scale.removeXLabel(),e.each(this.datasets,function(t){t.bars.shift()},this),this.update()},reflow:function(){e.extend(this.BarClass.prototype,{y:this.scale.endPoint,base:this.scale.endPoint});var t=e.extend({height:this.chart.height,width:this.chart.width});this.scale.update(t)},draw:function(t){var i=t||1;this.clear();this.chart.ctx;this.scale.draw(i),e.each(this.datasets,function(t,s){e.each(t.bars,function(t,e){t.hasValue()&&(t.base=this.scale.endPoint,t.transition({x:this.scale.calculateBarX(this.datasets.length,s,e),y:this.scale.calculateY(t.value),width:this.scale.calculateBarWidth(this.datasets.length)},i).draw())},this)},this)}})}.call(this),function(){"use strict";var t=this,i=t.Chart,e=i.helpers,s={segmentShowStroke:!0,segmentStrokeColor:"#fff",segmentStrokeWidth:2,percentageInnerCutout:50,animationSteps:100,animationEasing:"easeOutBounce",animateRotate:!0,animateScale:!1,legendTemplate:'<ul class="<%=name.toLowerCase()%>-legend"><% for (var i=0; i<segments.length; i++){%><li><span style="background-color:<%=segments[i].fillColor%>"></span><%if(segments[i].label){%><%=segments[i].label%><%}%></li><%}%></ul>'};i.Type.extend({name:"Doughnut",defaults:s,initialize:function(t){this.segments=[],this.outerRadius=(e.min([this.chart.width,this.chart.height])-this.options.segmentStrokeWidth/2)/2,this.SegmentArc=i.Arc.extend({ctx:this.chart.ctx,x:this.chart.width/2,y:this.chart.height/2}),this.options.showTooltips&&e.bindEvents(this,this.options.tooltipEvents,function(t){var i="mouseout"!==t.type?this.getSegmentsAtEvent(t):[];e.each(this.segments,function(t){t.restore(["fillColor"])}),e.each(i,function(t){t.fillColor=t.highlightColor}),this.showTooltip(i)}),this.calculateTotal(t),e.each(t,function(t,i){this.addData(t,i,!0)},this),this.render()},getSegmentsAtEvent:function(t){var i=[],s=e.getRelativePosition(t);return e.each(this.segments,function(t){t.inRange(s.x,s.y)&&i.push(t)},this),i},addData:function(t,i,e){var s=i||this.segments.length;this.segments.splice(s,0,new this.SegmentArc({value:t.value,outerRadius:this.options.animateScale?0:this.outerRadius,innerRadius:this.options.animateScale?0:this.outerRadius/100*this.options.percentageInnerCutout,fillColor:t.color,highlightColor:t.highlight||t.color,showStroke:this.options.segmentShowStroke,strokeWidth:this.options.segmentStrokeWidth,strokeColor:this.options.segmentStrokeColor,startAngle:1.5*Math.PI,circumference:this.options.animateRotate?0:this.calculateCircumference(t.value),label:t.label})),e||(this.reflow(),this.update())},calculateCircumference:function(t){return 2*Math.PI*(Math.abs(t)/this.total)},calculateTotal:function(t){this.total=0,e.each(t,function(t){this.total+=Math.abs(t.value)},this)},update:function(){this.calculateTotal(this.segments),e.each(this.activeElements,function(t){t.restore(["fillColor"])}),e.each(this.segments,function(t){t.save()}),this.render()},removeData:function(t){var i=e.isNumber(t)?t:this.segments.length-1;this.segments.splice(i,1),this.reflow(),this.update()},reflow:function(){e.extend(this.SegmentArc.prototype,{x:this.chart.width/2,y:this.chart.height/2}),this.outerRadius=(e.min([this.chart.width,this.chart.height])-this.options.segmentStrokeWidth/2)/2,e.each(this.segments,function(t){t.update({outerRadius:this.outerRadius,innerRadius:this.outerRadius/100*this.options.percentageInnerCutout})},this)},draw:function(t){var i=t?t:1;this.clear(),e.each(this.segments,function(t,e){t.transition({circumference:this.calculateCircumference(t.value),outerRadius:this.outerRadius,innerRadius:this.outerRadius/100*this.options.percentageInnerCutout},i),t.endAngle=t.startAngle+t.circumference,t.draw(),0===e&&(t.startAngle=1.5*Math.PI),e<this.segments.length-1&&(this.segments[e+1].startAngle=t.endAngle)},this)}}),i.types.Doughnut.extend({name:"Pie",defaults:e.merge(s,{percentageInnerCutout:0})})}.call(this),function(){"use strict";var t=this,i=t.Chart,e=i.helpers,s={scaleShowGridLines:!0,scaleGridLineColor:"rgba(0,0,0,.05)",scaleGridLineWidth:1,scaleShowHorizontalLines:!0,scaleShowVerticalLines:!0,bezierCurve:!0,bezierCurveTension:.4,pointDot:!0,pointDotRadius:4,pointDotStrokeWidth:1,pointHitDetectionRadius:20,datasetStroke:!0,datasetStrokeWidth:2,datasetFill:!0,legendTemplate:'<ul class="<%=name.toLowerCase()%>-legend"><% for (var i=0; i<datasets.length; i++){%><li><span style="background-color:<%=datasets[i].strokeColor%>"></span><%if(datasets[i].label){%><%=datasets[i].label%><%}%></li><%}%></ul>'};i.Type.extend({name:"Line",defaults:s,initialize:function(t){this.PointClass=i.Point.extend({strokeWidth:this.options.pointDotStrokeWidth,radius:this.options.pointDotRadius,display:this.options.pointDot,hitDetectionRadius:this.options.pointHitDetectionRadius,ctx:this.chart.ctx,inRange:function(t){return Math.pow(t-this.x,2)<Math.pow(this.radius+this.hitDetectionRadius,2)}}),this.datasets=[],this.options.showTooltips&&e.bindEvents(this,this.options.tooltipEvents,function(t){var i="mouseout"!==t.type?this.getPointsAtEvent(t):[];this.eachPoints(function(t){t.restore(["fillColor","strokeColor"])}),e.each(i,function(t){t.fillColor=t.highlightFill,t.strokeColor=t.highlightStroke}),this.showTooltip(i)}),e.each(t.datasets,function(i){var s={label:i.label||null,fillColor:i.fillColor,strokeColor:i.strokeColor,pointColor:i.pointColor,pointStrokeColor:i.pointStrokeColor,points:[]};this.datasets.push(s),e.each(i.data,function(e,n){s.points.push(new this.PointClass({value:e,label:t.labels[n],datasetLabel:i.label,strokeColor:i.pointStrokeColor,fillColor:i.pointColor,highlightFill:i.pointHighlightFill||i.pointColor,highlightStroke:i.pointHighlightStroke||i.pointStrokeColor}))},this),this.buildScale(t.labels),this.eachPoints(function(t,i){e.extend(t,{x:this.scale.calculateX(i),y:this.scale.endPoint}),t.save()},this)},this),this.render()},update:function(){this.scale.update(),e.each(this.activeElements,function(t){t.restore(["fillColor","strokeColor"])}),this.eachPoints(function(t){t.save()}),this.render()},eachPoints:function(t){e.each(this.datasets,function(i){e.each(i.points,t,this)},this)},getPointsAtEvent:function(t){var i=[],s=e.getRelativePosition(t);return e.each(this.datasets,function(t){e.each(t.points,function(t){t.inRange(s.x,s.y)&&i.push(t)})},this),i},buildScale:function(t){var s=this,n=function(){var t=[];return s.eachPoints(function(i){t.push(i.value)}),t},o={templateString:this.options.scaleLabel,height:this.chart.height,width:this.chart.width,ctx:this.chart.ctx,textColor:this.options.scaleFontColor,fontSize:this.options.scaleFontSize,fontStyle:this.options.scaleFontStyle,fontFamily:this.options.scaleFontFamily,valuesCount:t.length,beginAtZero:this.options.scaleBeginAtZero,integersOnly:this.options.scaleIntegersOnly,calculateYRange:function(t){var i=e.calculateScaleRange(n(),t,this.fontSize,this.beginAtZero,this.integersOnly);e.extend(this,i)},xLabels:t,font:e.fontString(this.options.scaleFontSize,this.options.scaleFontStyle,this.options.scaleFontFamily),lineWidth:this.options.scaleLineWidth,lineColor:this.options.scaleLineColor,showHorizontalLines:this.options.scaleShowHorizontalLines,showVerticalLines:this.options.scaleShowVerticalLines,gridLineWidth:this.options.scaleShowGridLines?this.options.scaleGridLineWidth:0,gridLineColor:this.options.scaleShowGridLines?this.options.scaleGridLineColor:"rgba(0,0,0,0)",padding:this.options.showScale?0:this.options.pointDotRadius+this.options.pointDotStrokeWidth,showLabels:this.options.scaleShowLabels,display:this.options.showScale};this.options.scaleOverride&&e.extend(o,{calculateYRange:e.noop,steps:this.options.scaleSteps,stepValue:this.options.scaleStepWidth,min:this.options.scaleStartValue,max:this.options.scaleStartValue+this.options.scaleSteps*this.options.scaleStepWidth}),this.scale=new i.Scale(o)},addData:function(t,i){e.each(t,function(t,e){this.datasets[e].points.push(new this.PointClass({value:t,label:i,x:this.scale.calculateX(this.scale.valuesCount+1),y:this.scale.endPoint,strokeColor:this.datasets[e].pointStrokeColor,fillColor:this.datasets[e].pointColor}))},this),this.scale.addXLabel(i),this.update()},removeData:function(){this.scale.removeXLabel(),e.each(this.datasets,function(t){t.points.shift()},this),this.update()},reflow:function(){var t=e.extend({height:this.chart.height,width:this.chart.width});this.scale.update(t)},draw:function(t){var i=t||1;this.clear();var s=this.chart.ctx,n=function(t){return null!==t.value},o=function(t,i,s){return e.findNextWhere(i,n,s)||t},a=function(t,i,s){return e.findPreviousWhere(i,n,s)||t};this.scale.draw(i),e.each(this.datasets,function(t){var h=e.where(t.points,n);e.each(t.points,function(t,e){t.hasValue()&&t.transition({y:this.scale.calculateY(t.value),x:this.scale.calculateX(e)},i)},this),this.options.bezierCurve&&e.each(h,function(t,i){var s=i>0&&i<h.length-1?this.options.bezierCurveTension:0;t.controlPoints=e.splineCurve(a(t,h,i),t,o(t,h,i),s),t.controlPoints.outer.y>this.scale.endPoint?t.controlPoints.outer.y=this.scale.endPoint:t.controlPoints.outer.y<this.scale.startPoint&&(t.controlPoints.outer.y=this.scale.startPoint),t.controlPoints.inner.y>this.scale.endPoint?t.controlPoints.inner.y=this.scale.endPoint:t.controlPoints.inner.y<this.scale.startPoint&&(t.controlPoints.inner.y=this.scale.startPoint)},this),s.lineWidth=this.options.datasetStrokeWidth,s.strokeStyle=t.strokeColor,s.beginPath(),e.each(h,function(t,i){if(0===i)s.moveTo(t.x,t.y);else if(this.options.bezierCurve){var e=a(t,h,i);s.bezierCurveTo(e.controlPoints.outer.x,e.controlPoints.outer.y,t.controlPoints.inner.x,t.controlPoints.inner.y,t.x,t.y)}else s.lineTo(t.x,t.y)},this),s.stroke(),this.options.datasetFill&&h.length>0&&(s.lineTo(h[h.length-1].x,this.scale.endPoint),s.lineTo(h[0].x,this.scale.endPoint),s.fillStyle=t.fillColor,s.closePath(),s.fill()),e.each(h,function(t){t.draw()})},this)}})}.call(this),function(){"use strict";var t=this,i=t.Chart,e=i.helpers,s={scaleShowLabelBackdrop:!0,scaleBackdropColor:"rgba(255,255,255,0.75)",scaleBeginAtZero:!0,scaleBackdropPaddingY:2,scaleBackdropPaddingX:2,scaleShowLine:!0,segmentShowStroke:!0,segmentStrokeColor:"#fff",segmentStrokeWidth:2,animationSteps:100,animationEasing:"easeOutBounce",animateRotate:!0,animateScale:!1,legendTemplate:'<ul class="<%=name.toLowerCase()%>-legend"><% for (var i=0; i<segments.length; i++){%><li><span style="background-color:<%=segments[i].fillColor%>"></span><%if(segments[i].label){%><%=segments[i].label%><%}%></li><%}%></ul>'};i.Type.extend({name:"PolarArea",defaults:s,initialize:function(t){this.segments=[],this.SegmentArc=i.Arc.extend({showStroke:this.options.segmentShowStroke,strokeWidth:this.options.segmentStrokeWidth,strokeColor:this.options.segmentStrokeColor,ctx:this.chart.ctx,innerRadius:0,x:this.chart.width/2,y:this.chart.height/2}),this.scale=new i.RadialScale({display:this.options.showScale,fontStyle:this.options.scaleFontStyle,fontSize:this.options.scaleFontSize,fontFamily:this.options.scaleFontFamily,fontColor:this.options.scaleFontColor,showLabels:this.options.scaleShowLabels,showLabelBackdrop:this.options.scaleShowLabelBackdrop,backdropColor:this.options.scaleBackdropColor,backdropPaddingY:this.options.scaleBackdropPaddingY,backdropPaddingX:this.options.scaleBackdropPaddingX,lineWidth:this.options.scaleShowLine?this.options.scaleLineWidth:0,lineColor:this.options.scaleLineColor,lineArc:!0,width:this.chart.width,height:this.chart.height,xCenter:this.chart.width/2,yCenter:this.chart.height/2,ctx:this.chart.ctx,templateString:this.options.scaleLabel,valuesCount:t.length}),this.updateScaleRange(t),this.scale.update(),e.each(t,function(t,i){this.addData(t,i,!0)},this),this.options.showTooltips&&e.bindEvents(this,this.options.tooltipEvents,function(t){var i="mouseout"!==t.type?this.getSegmentsAtEvent(t):[];e.each(this.segments,function(t){t.restore(["fillColor"])}),e.each(i,function(t){t.fillColor=t.highlightColor}),this.showTooltip(i)}),this.render()},getSegmentsAtEvent:function(t){var i=[],s=e.getRelativePosition(t);return e.each(this.segments,function(t){t.inRange(s.x,s.y)&&i.push(t)},this),i},addData:function(t,i,e){var s=i||this.segments.length;this.segments.splice(s,0,new this.SegmentArc({fillColor:t.color,highlightColor:t.highlight||t.color,label:t.label,value:t.value,outerRadius:this.options.animateScale?0:this.scale.calculateCenterOffset(t.value),circumference:this.options.animateRotate?0:this.scale.getCircumference(),startAngle:1.5*Math.PI})),e||(this.reflow(),this.update())},removeData:function(t){var i=e.isNumber(t)?t:this.segments.length-1;this.segments.splice(i,1),this.reflow(),this.update()},calculateTotal:function(t){this.total=0,e.each(t,function(t){this.total+=t.value},this),this.scale.valuesCount=this.segments.length},updateScaleRange:function(t){var i=[];e.each(t,function(t){i.push(t.value)});var s=this.options.scaleOverride?{steps:this.options.scaleSteps,stepValue:this.options.scaleStepWidth,min:this.options.scaleStartValue,max:this.options.scaleStartValue+this.options.scaleSteps*this.options.scaleStepWidth}:e.calculateScaleRange(i,e.min([this.chart.width,this.chart.height])/2,this.options.scaleFontSize,this.options.scaleBeginAtZero,this.options.scaleIntegersOnly);e.extend(this.scale,s,{size:e.min([this.chart.width,this.chart.height]),xCenter:this.chart.width/2,yCenter:this.chart.height/2})},update:function(){this.calculateTotal(this.segments),e.each(this.segments,function(t){t.save()}),this.reflow(),this.render()},reflow:function(){e.extend(this.SegmentArc.prototype,{x:this.chart.width/2,y:this.chart.height/2}),this.updateScaleRange(this.segments),this.scale.update(),e.extend(this.scale,{xCenter:this.chart.width/2,yCenter:this.chart.height/2}),e.each(this.segments,function(t){t.update({outerRadius:this.scale.calculateCenterOffset(t.value)})},this)},draw:function(t){var i=t||1;this.clear(),e.each(this.segments,function(t,e){t.transition({circumference:this.scale.getCircumference(),outerRadius:this.scale.calculateCenterOffset(t.value)},i),t.endAngle=t.startAngle+t.circumference,0===e&&(t.startAngle=1.5*Math.PI),e<this.segments.length-1&&(this.segments[e+1].startAngle=t.endAngle),t.draw()},this),this.scale.draw()}})}.call(this),function(){"use strict";var t=this,i=t.Chart,e=i.helpers;i.Type.extend({name:"Radar",defaults:{scaleShowLine:!0,angleShowLineOut:!0,scaleShowLabels:!1,scaleBeginAtZero:!0,angleLineColor:"rgba(0,0,0,.1)",angleLineWidth:1,pointLabelFontFamily:"'Arial'",pointLabelFontStyle:"normal",pointLabelFontSize:10,pointLabelFontColor:"#666",pointDot:!0,pointDotRadius:3,pointDotStrokeWidth:1,pointHitDetectionRadius:20,datasetStroke:!0,datasetStrokeWidth:2,datasetFill:!0,legendTemplate:'<ul class="<%=name.toLowerCase()%>-legend"><% for (var i=0; i<datasets.length; i++){%><li><span style="background-color:<%=datasets[i].strokeColor%>"></span><%if(datasets[i].label){%><%=datasets[i].label%><%}%></li><%}%></ul>'},initialize:function(t){this.PointClass=i.Point.extend({strokeWidth:this.options.pointDotStrokeWidth,radius:this.options.pointDotRadius,display:this.options.pointDot,hitDetectionRadius:this.options.pointHitDetectionRadius,ctx:this.chart.ctx}),this.datasets=[],this.buildScale(t),this.options.showTooltips&&e.bindEvents(this,this.options.tooltipEvents,function(t){var i="mouseout"!==t.type?this.getPointsAtEvent(t):[];this.eachPoints(function(t){t.restore(["fillColor","strokeColor"])}),e.each(i,function(t){t.fillColor=t.highlightFill,t.strokeColor=t.highlightStroke}),this.showTooltip(i)}),e.each(t.datasets,function(i){var s={label:i.label||null,fillColor:i.fillColor,strokeColor:i.strokeColor,pointColor:i.pointColor,pointStrokeColor:i.pointStrokeColor,points:[]};this.datasets.push(s),e.each(i.data,function(e,n){var o;this.scale.animation||(o=this.scale.getPointPosition(n,this.scale.calculateCenterOffset(e))),s.points.push(new this.PointClass({value:e,label:t.labels[n],datasetLabel:i.label,x:this.options.animation?this.scale.xCenter:o.x,y:this.options.animation?this.scale.yCenter:o.y,strokeColor:i.pointStrokeColor,fillColor:i.pointColor,highlightFill:i.pointHighlightFill||i.pointColor,highlightStroke:i.pointHighlightStroke||i.pointStrokeColor}))},this)},this),this.render()},eachPoints:function(t){e.each(this.datasets,function(i){e.each(i.points,t,this)},this)},getPointsAtEvent:function(t){var i=e.getRelativePosition(t),s=e.getAngleFromPoint({x:this.scale.xCenter,y:this.scale.yCenter},i),n=2*Math.PI/this.scale.valuesCount,o=Math.round((s.angle-1.5*Math.PI)/n),a=[];return(o>=this.scale.valuesCount||0>o)&&(o=0),s.distance<=this.scale.drawingArea&&e.each(this.datasets,function(t){a.push(t.points[o])}),a},buildScale:function(t){this.scale=new i.RadialScale({display:this.options.showScale,fontStyle:this.options.scaleFontStyle,fontSize:this.options.scaleFontSize,fontFamily:this.options.scaleFontFamily,fontColor:this.options.scaleFontColor,showLabels:this.options.scaleShowLabels,showLabelBackdrop:this.options.scaleShowLabelBackdrop,backdropColor:this.options.scaleBackdropColor,backdropPaddingY:this.options.scaleBackdropPaddingY,backdropPaddingX:this.options.scaleBackdropPaddingX,lineWidth:this.options.scaleShowLine?this.options.scaleLineWidth:0,lineColor:this.options.scaleLineColor,angleLineColor:this.options.angleLineColor,angleLineWidth:this.options.angleShowLineOut?this.options.angleLineWidth:0,pointLabelFontColor:this.options.pointLabelFontColor,pointLabelFontSize:this.options.pointLabelFontSize,pointLabelFontFamily:this.options.pointLabelFontFamily,pointLabelFontStyle:this.options.pointLabelFontStyle,height:this.chart.height,width:this.chart.width,xCenter:this.chart.width/2,yCenter:this.chart.height/2,ctx:this.chart.ctx,templateString:this.options.scaleLabel,labels:t.labels,valuesCount:t.datasets[0].data.length}),this.scale.setScaleSize(),this.updateScaleRange(t.datasets),this.scale.buildYLabels()},updateScaleRange:function(t){var i=function(){var i=[];return e.each(t,function(t){t.data?i=i.concat(t.data):e.each(t.points,function(t){i.push(t.value)})}),i}(),s=this.options.scaleOverride?{steps:this.options.scaleSteps,stepValue:this.options.scaleStepWidth,min:this.options.scaleStartValue,max:this.options.scaleStartValue+this.options.scaleSteps*this.options.scaleStepWidth}:e.calculateScaleRange(i,e.min([this.chart.width,this.chart.height])/2,this.options.scaleFontSize,this.options.scaleBeginAtZero,this.options.scaleIntegersOnly);e.extend(this.scale,s)},addData:function(t,i){this.scale.valuesCount++,e.each(t,function(t,e){var s=this.scale.getPointPosition(this.scale.valuesCount,this.scale.calculateCenterOffset(t));this.datasets[e].points.push(new this.PointClass({value:t,label:i,x:s.x,y:s.y,strokeColor:this.datasets[e].pointStrokeColor,fillColor:this.datasets[e].pointColor}))},this),this.scale.labels.push(i),this.reflow(),this.update()},removeData:function(){this.scale.valuesCount--,this.scale.labels.shift(),e.each(this.datasets,function(t){t.points.shift()},this),this.reflow(),this.update()},update:function(){this.eachPoints(function(t){t.save()}),this.reflow(),this.render()},reflow:function(){e.extend(this.scale,{width:this.chart.width,height:this.chart.height,size:e.min([this.chart.width,this.chart.height]),xCenter:this.chart.width/2,yCenter:this.chart.height/2}),this.updateScaleRange(this.datasets),this.scale.setScaleSize(),this.scale.buildYLabels()},draw:function(t){var i=t||1,s=this.chart.ctx;this.clear(),this.scale.draw(),e.each(this.datasets,function(t){e.each(t.points,function(t,e){t.hasValue()&&t.transition(this.scale.getPointPosition(e,this.scale.calculateCenterOffset(t.value)),i)},this),s.lineWidth=this.options.datasetStrokeWidth,s.strokeStyle=t.strokeColor,s.beginPath(),e.each(t.points,function(t,i){0===i?s.moveTo(t.x,t.y):s.lineTo(t.x,t.y)},this),s.closePath(),s.stroke(),s.fillStyle=t.fillColor,s.fill(),e.each(t.points,function(t){t.hasValue()&&t.draw()})},this)}})}.call(this);
|
assets/js/imagify.min.js
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
1 |
+
var ImagifyGulp;ImagifyGulp=function(){function a(a){var b,c;return this.cnf=a,this.images=[],this.formatted_image_id=0,this.current_image_id=0,this.total_original_size=0,this.total_optimized_size=0,this.total_gain=0,this.total_percent=0,this.global_original_size=0,this.global_optimized_size=0,this.global_gain=0,this.global_percent=0,this.callbackEach=function(){},this.callbackBefore=function(){},this.callbackError=function(){},this.callbackDone=function(){},this.defaultThumb="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACMAAAAjCAIAAACRuyQOAAACy0lEQVRIx+1XS1PTUBTuT/MB1NGF3bhyhys3Pv+Ai8pCF6Bb3bsWq8xAh8441I2TSlKwPIKQJsI40IbSV0pJ6qe3OeZ1b9PaYViQyaJzc+757j3nO985TVx5v3o+b+IS6XyQUgtrj/NqWtJmZf3lavnpl53bC2vjRLqRUV4pxqbZcnrBx3F6G2ZzTjFg879IMwWtanV7g56K1Z2RtBGRpj7IWb0a8HhqOz9O2rjHfrOD34GvWcPEruGQkhmlcFgnF7bjABVJmvA4uj4vY2VJr545/yClw/okBywaadF/m63j1gT/sNO5DbXW8t4sLtJzSQtnAme/ys/BrU9FpdIgY2R3MBLidtQ+ZRt2T9qZvQrtf/N9X5BwbEQKmSVIFGZjEGlWNojB93KbCBolDNl49nVPAIYwUs5QGAOQwCtmuuyGG5ExGhZbtM7s+5+3BGC5nyazhB8RElSAePRwRaX1u9nScadfVYjtncV1HtKDlW0KQMqvID4kCAydHST2fgKhu24B7dTaSY4oYBf2MjN44yK9+FZmRnrdCnuhr3jyB7Vr89G8L9f7oU77VSPhp4POjNarzUgv77Z/ERh+R9oUXbqDXFyktFtJ5ag74cU9cBsCwy3DNoht5Fcf0pO8ysuTt27IFzKH/Hm/Qopi5ekP99zzgkU8goF7VN21ThfM9BKHylHEPbzoQ8wUlSGoG1QVnR3Vhppj66hCtgg/Ayr3tdLXCFQ7al4ABr2gAEBHoCbQFDu+RkCvqPVBx5LCZvq2dEDsgELuDqV7rM/SfvmocfNjkYcEdV8Kdcu4Wh6QLzzoPQKtQ9DQvQL9ZYhOiCYteXougo/9UEIv9YHxKK+iZ9qenouE8QIunCMMMzxHYIIomU2ksBOaI5ZHmCO8OavEnI0K2hjmvTnevPe3bjBlTvKvMsoMi4kVAgO/qBXMGvidGu8Me/lf4yIg/QYbLcmjDg4bKwAAAABJRU5ErkJggg==",this.images=function(){var a,d;a=this.cnf.images,d=[];for(c in a)b=a[c],d.push(c);return d}.call(this),this.total_images=this.images.length,this.total_images?this:!1}return a.prototype.run=function(){return this.loop(),this},a.prototype.toHumanSize=function(a,b,c){var d,e;return null==b&&(b=1),null==c&&(c=!0),0===a?"0"+(c===!0?"kb":""):(e=["b","kb","mb"],d=parseInt(Math.floor(Math.log(a)/Math.log(1024))),(a/Math.pow(1024,d)).toFixed(b)+e[d])},a.prototype.each=function(a){return this.callbackEach=a,this},a.prototype.before=function(a){return this.callbackBefore=a,this},a.prototype.error=function(a){return this.callbackError=a,this},a.prototype.done=function(a){return this.callbackDone=a,this},a.prototype.createThumb=function(a,b){var c,d;return d=this,c=new Image,c.onerror=function(){return b.thumbnail=d.defaultThumb,d.callbackBefore(b),d.send()},c.onload=function(){var a,e,f,g,h,i,j,k,l,m;j=33,i=33,h=c.width,g=c.height,g>h?(m=j/h,l=j,k=g*m):(m=i/g,k=i,l=h*m),a=document.createElement("canvas"),a.width=l,a.height=k,c.width=l,c.height=k,e=a.getContext("2d"),e.drawImage(this,0,0,l,k);try{b.thumbnail=a.toDataURL("image/jpeg")}catch(n){f=n,b.thumbnail=d.defaultThumb}return d.callbackBefore(b),d.send()},c.src=a},a.prototype.loop=function(){var a,b;return this.formatted_image_id=this.images[this.current_image_id].toString().substr(1),this.current_image=this.images[this.current_image_id],b=this.cnf.images[this.current_image],a=b.split("/").pop(),this.createThumb(b,{id:this.formatted_image_id,filename:a})},a.prototype.send=function(){var a,b;return a=this,b=new XMLHttpRequest,b.onreadystatechange=function(){var b,c,d,e;return 4===this.readyState?(c=JSON.parse(this.responseText),b=c.data,d={success:b.success,image:parseInt(a.formatted_image_id),progress:Math.floor((a.current_image_id+1)/a.images.length*100),global_optimized_attachments:b.global_optimized_attachments,global_unoptimized_attachments:b.global_unoptimized_attachments,global_errors_attachments:b.global_errors_attachments,global_optimized_percent:b.global_optimized_percent},b.success!==!1?(a.total_original_size+=b.original_size,a.total_optimized_size+=b.new_size,a.total_gain+=b.original_size-b.new_size,a.total_percent=(a.total_optimized_size/a.total_original_size*100).toFixed(2),a.global_original_size+=b.original_overall_size,a.global_optimized_size+=b.new_overall_size,a.global_gain+=b.overall_saving,a.global_percent=(100-a.global_optimized_size/a.global_optimized_size*100).toFixed(2),d.original_size_human=a.toHumanSize(b.original_size),d.new_size_human=a.toHumanSize(b.new_size),d.percent=(100-b.new_size/b.original_size*100).toFixed(2),d.thumbnails=b.thumbnails,d.global_optimized_attachments_percent=b.global_optimized_attachments_percent,d.global_optimized_human=b.global_optimized_human,d.global_unconsumed_quota=b.global_unconsumed_quota,d.global_original_human=b.global_original_human,d.overall_saving=b.overall_saving,d.original_overall_size=b.original_overall_size,d.global_already_optimized_attachments=b.global_already_optimized_attachments):d.error=b.error,a.callbackEach(d),a.current_image_id++,a.current_image_id>=a.images.length?(e=0===a.global_original_size?0:(100-100*(a.global_optimized_size/a.global_original_size)).toFixed(2),a.callbackDone({global_original_size_human:a.toHumanSize(a.global_original_size),global_gain_human:a.toHumanSize(a.global_gain),global_percent:e})):a.loop()):void 0},b.open("POST",this.cnf.lib,!0),b.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),b.send("image="+a.formatted_image_id),this},a}();
|
2 |
+
//# sourceMappingURL=imagify.min.js.map
|
assets/js/jquery.event.move.js
ADDED
@@ -0,0 +1,586 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
// jquery.event.move
|
2 |
+
//
|
3 |
+
// 1.3.6
|
4 |
+
//
|
5 |
+
// Stephen Band
|
6 |
+
//
|
7 |
+
// Triggers 'movestart', 'move' and 'moveend' events after
|
8 |
+
// mousemoves following a mousedown cross a distance threshold,
|
9 |
+
// similar to the native 'dragstart', 'drag' and 'dragend' events.
|
10 |
+
// Move events are throttled to animation frames. Move event objects
|
11 |
+
// have the properties:
|
12 |
+
//
|
13 |
+
// pageX:
|
14 |
+
// pageY: Page coordinates of pointer.
|
15 |
+
// startX:
|
16 |
+
// startY: Page coordinates of pointer at movestart.
|
17 |
+
// distX:
|
18 |
+
// distY: Distance the pointer has moved since movestart.
|
19 |
+
// deltaX:
|
20 |
+
// deltaY: Distance the finger has moved since last event.
|
21 |
+
// velocityX:
|
22 |
+
// velocityY: Average velocity over last few events.
|
23 |
+
|
24 |
+
|
25 |
+
(function (module) {
|
26 |
+
if (typeof define === 'function' && define.amd) {
|
27 |
+
// AMD. Register as an anonymous module.
|
28 |
+
define(['jquery'], module);
|
29 |
+
} else {
|
30 |
+
// Browser globals
|
31 |
+
module(jQuery);
|
32 |
+
}
|
33 |
+
})(function(jQuery, undefined){
|
34 |
+
|
35 |
+
var // Number of pixels a pressed pointer travels before movestart
|
36 |
+
// event is fired.
|
37 |
+
threshold = 6,
|
38 |
+
|
39 |
+
add = jQuery.event.add,
|
40 |
+
|
41 |
+
remove = jQuery.event.remove,
|
42 |
+
|
43 |
+
// Just sugar, so we can have arguments in the same order as
|
44 |
+
// add and remove.
|
45 |
+
trigger = function(node, type, data) {
|
46 |
+
jQuery.event.trigger(type, data, node);
|
47 |
+
},
|
48 |
+
|
49 |
+
// Shim for requestAnimationFrame, falling back to timer. See:
|
50 |
+
// see http://paulirish.com/2011/requestanimationframe-for-smart-animating/
|
51 |
+
requestFrame = (function(){
|
52 |
+
return (
|
53 |
+
window.requestAnimationFrame ||
|
54 |
+
window.webkitRequestAnimationFrame ||
|
55 |
+
window.mozRequestAnimationFrame ||
|
56 |
+
window.oRequestAnimationFrame ||
|
57 |
+
window.msRequestAnimationFrame ||
|
58 |
+
function(fn, element){
|
59 |
+
return window.setTimeout(function(){
|
60 |
+
fn();
|
61 |
+
}, 25);
|
62 |
+
}
|
63 |
+
);
|
64 |
+
})(),
|
65 |
+
|
66 |
+
ignoreTags = {
|
67 |
+
textarea: true,
|
68 |
+
input: true,
|
69 |
+
select: true,
|
70 |
+
button: true
|
71 |
+
},
|
72 |
+
|
73 |
+
mouseevents = {
|
74 |
+
move: 'mousemove',
|
75 |
+
cancel: 'mouseup dragstart',
|
76 |
+
end: 'mouseup'
|
77 |
+
},
|
78 |
+
|
79 |
+
touchevents = {
|
80 |
+
move: 'touchmove',
|
81 |
+
cancel: 'touchend',
|
82 |
+
end: 'touchend'
|
83 |
+
};
|
84 |
+
|
85 |
+
|
86 |
+
// Constructors
|
87 |
+
|
88 |
+
function Timer(fn){
|
89 |
+
var callback = fn,
|
90 |
+
active = false,
|
91 |
+
running = false;
|
92 |
+
|
93 |
+
function trigger(time) {
|
94 |
+
if (active){
|
95 |
+
callback();
|
96 |
+
requestFrame(trigger);
|
97 |
+
running = true;
|
98 |
+
active = false;
|
99 |
+
}
|
100 |
+
else {
|
101 |
+
running = false;
|
102 |
+
}
|
103 |
+
}
|
104 |
+
|
105 |
+
this.kick = function(fn) {
|
106 |
+
active = true;
|
107 |
+
if (!running) { trigger(); }
|
108 |
+
};
|
109 |
+
|
110 |
+
this.end = function(fn) {
|
111 |
+
var cb = callback;
|
112 |
+
|
113 |
+
if (!fn) { return; }
|
114 |
+
|
115 |
+
// If the timer is not running, simply call the end callback.
|
116 |
+
if (!running) {
|
117 |
+
fn();
|
118 |
+
}
|
119 |
+
// If the timer is running, and has been kicked lately, then
|
120 |
+
// queue up the current callback and the end callback, otherwise
|
121 |
+
// just the end callback.
|
122 |
+
else {
|
123 |
+
callback = active ?
|
124 |
+
function(){ cb(); fn(); } :
|
125 |
+
fn ;
|
126 |
+
|
127 |
+
active = true;
|
128 |
+
}
|
129 |
+
};
|
130 |
+
}
|
131 |
+
|
132 |
+
|
133 |
+
// Functions
|
134 |
+
|
135 |
+
function returnTrue() {
|
136 |
+
return true;
|
137 |
+
}
|
138 |
+
|
139 |
+
function returnFalse() {
|
140 |
+
return false;
|
141 |
+
}
|
142 |
+
|
143 |
+
function preventDefault(e) {
|
144 |
+
e.preventDefault();
|
145 |
+
}
|
146 |
+
|
147 |
+
function preventIgnoreTags(e) {
|
148 |
+
// Don't prevent interaction with form elements.
|
149 |
+
if (ignoreTags[ e.target.tagName.toLowerCase() ]) { return; }
|
150 |
+
|
151 |
+
e.preventDefault();
|
152 |
+
}
|
153 |
+
|
154 |
+
function isLeftButton(e) {
|
155 |
+
// Ignore mousedowns on any button other than the left (or primary)
|
156 |
+
// mouse button, or when a modifier key is pressed.
|
157 |
+
return (e.which === 1 && !e.ctrlKey && !e.altKey);
|
158 |
+
}
|
159 |
+
|
160 |
+
function identifiedTouch(touchList, id) {
|
161 |
+
var i, l;
|
162 |
+
|
163 |
+
if (touchList.identifiedTouch) {
|
164 |
+
return touchList.identifiedTouch(id);
|
165 |
+
}
|
166 |
+
|
167 |
+
// touchList.identifiedTouch() does not exist in
|
168 |
+
// webkit yet… we must do the search ourselves...
|
169 |
+
|
170 |
+
i = -1;
|
171 |
+
l = touchList.length;
|
172 |
+
|
173 |
+
while (++i < l) {
|
174 |
+
if (touchList[i].identifier === id) {
|
175 |
+
return touchList[i];
|
176 |
+
}
|
177 |
+
}
|
178 |
+
}
|
179 |
+
|
180 |
+
function changedTouch(e, event) {
|
181 |
+
var touch = identifiedTouch(e.changedTouches, event.identifier);
|
182 |
+
|
183 |
+
// This isn't the touch you're looking for.
|
184 |
+
if (!touch) { return; }
|
185 |
+
|
186 |
+
// Chrome Android (at least) includes touches that have not
|
187 |
+
// changed in e.changedTouches. That's a bit annoying. Check
|
188 |
+
// that this touch has changed.
|
189 |
+
if (touch.pageX === event.pageX && touch.pageY === event.pageY) { return; }
|
190 |
+
|
191 |
+
return touch;
|
192 |
+
}
|
193 |
+
|
194 |
+
|
195 |
+
// Handlers that decide when the first movestart is triggered
|
196 |
+
|
197 |
+
function mousedown(e){
|
198 |
+
var data;
|
199 |
+
|
200 |
+
if (!isLeftButton(e)) { return; }
|
201 |
+
|
202 |
+
data = {
|
203 |
+
target: e.target,
|
204 |
+
startX: e.pageX,
|
205 |
+
startY: e.pageY,
|
206 |
+
timeStamp: e.timeStamp
|
207 |
+
};
|
208 |
+
|
209 |
+
add(document, mouseevents.move, mousemove, data);
|
210 |
+
add(document, mouseevents.cancel, mouseend, data);
|
211 |
+
}
|
212 |
+
|
213 |
+
function mousemove(e){
|
214 |
+
var data = e.data;
|
215 |
+
|
216 |
+
checkThreshold(e, data, e, removeMouse);
|
217 |
+
}
|
218 |
+
|
219 |
+
function mouseend(e) {
|
220 |
+
removeMouse();
|
221 |
+
}
|
222 |
+
|
223 |
+
function removeMouse() {
|
224 |
+
remove(document, mouseevents.move, mousemove);
|
225 |
+
remove(document, mouseevents.cancel, mouseend);
|
226 |
+
}
|
227 |
+
|
228 |
+
function touchstart(e) {
|
229 |
+
var touch, template;
|
230 |
+
|
231 |
+
// Don't get in the way of interaction with form elements.
|
232 |
+
if (ignoreTags[ e.target.tagName.toLowerCase() ]) { return; }
|
233 |
+
|
234 |
+
touch = e.changedTouches[0];
|
235 |
+
|
236 |
+
// iOS live updates the touch objects whereas Android gives us copies.
|
237 |
+
// That means we can't trust the touchstart object to stay the same,
|
238 |
+
// so we must copy the data. This object acts as a template for
|
239 |
+
// movestart, move and moveend event objects.
|
240 |
+
template = {
|
241 |
+
target: touch.target,
|
242 |
+
startX: touch.pageX,
|
243 |
+
startY: touch.pageY,
|
244 |
+
timeStamp: e.timeStamp,
|
245 |
+
identifier: touch.identifier
|
246 |
+
};
|
247 |
+
|
248 |
+
// Use the touch identifier as a namespace, so that we can later
|
249 |
+
// remove handlers pertaining only to this touch.
|
250 |
+
add(document, touchevents.move + '.' + touch.identifier, touchmove, template);
|
251 |
+
add(document, touchevents.cancel + '.' + touch.identifier, touchend, template);
|
252 |
+
}
|
253 |
+
|
254 |
+
function touchmove(e){
|
255 |
+
var data = e.data,
|
256 |
+
touch = changedTouch(e, data);
|
257 |
+
|
258 |
+
if (!touch) { return; }
|
259 |
+
|
260 |
+
checkThreshold(e, data, touch, removeTouch);
|
261 |
+
}
|
262 |
+
|
263 |
+
function touchend(e) {
|
264 |
+
var template = e.data,
|
265 |
+
touch = identifiedTouch(e.changedTouches, template.identifier);
|
266 |
+
|
267 |
+
if (!touch) { return; }
|
268 |
+
|
269 |
+
removeTouch(template.identifier);
|
270 |
+
}
|
271 |
+
|
272 |
+
function removeTouch(identifier) {
|
273 |
+
remove(document, '.' + identifier, touchmove);
|
274 |
+
remove(document, '.' + identifier, touchend);
|
275 |
+
}
|
276 |
+
|
277 |
+
|
278 |
+
// Logic for deciding when to trigger a movestart.
|
279 |
+
|
280 |
+
function checkThreshold(e, template, touch, fn) {
|
281 |
+
var distX = touch.pageX - template.startX,
|
282 |
+
distY = touch.pageY - template.startY;
|
283 |
+
|
284 |
+
// Do nothing if the threshold has not been crossed.
|
285 |
+
if ((distX * distX) + (distY * distY) < (threshold * threshold)) { return; }
|
286 |
+
|
287 |
+
triggerStart(e, template, touch, distX, distY, fn);
|
288 |
+
}
|
289 |
+
|
290 |
+
function handled() {
|
291 |
+
// this._handled should return false once, and after return true.
|
292 |
+
this._handled = returnTrue;
|
293 |
+
return false;
|
294 |
+
}
|
295 |
+
|
296 |
+
function flagAsHandled(e) {
|
297 |
+
e._handled();
|
298 |
+
}
|
299 |
+
|
300 |
+
function triggerStart(e, template, touch, distX, distY, fn) {
|
301 |
+
var node = template.target,
|
302 |
+
touches, time;
|
303 |
+
|
304 |
+
touches = e.targetTouches;
|
305 |
+
time = e.timeStamp - template.timeStamp;
|
306 |
+
|
307 |
+
// Create a movestart object with some special properties that
|
308 |
+
// are passed only to the movestart handlers.
|
309 |
+
template.type = 'movestart';
|
310 |
+
template.distX = distX;
|
311 |
+
template.distY = distY;
|
312 |
+
template.deltaX = distX;
|
313 |
+
template.deltaY = distY;
|
314 |
+
template.pageX = touch.pageX;
|
315 |
+
template.pageY = touch.pageY;
|
316 |
+
template.velocityX = distX / time;
|
317 |
+
template.velocityY = distY / time;
|
318 |
+
template.targetTouches = touches;
|
319 |
+
template.finger = touches ?
|
320 |
+
touches.length :
|
321 |
+
1 ;
|
322 |
+
|
323 |
+
// The _handled method is fired to tell the default movestart
|
324 |
+
// handler that one of the move events is bound.
|
325 |
+
template._handled = handled;
|
326 |
+
|
327 |
+
// Pass the touchmove event so it can be prevented if or when
|
328 |
+
// movestart is handled.
|
329 |
+
template._preventTouchmoveDefault = function() {
|
330 |
+
e.preventDefault();
|
331 |
+
};
|
332 |
+
|
333 |
+
// Trigger the movestart event.
|
334 |
+
trigger(template.target, template);
|
335 |
+
|
336 |
+
// Unbind handlers that tracked the touch or mouse up till now.
|
337 |
+
fn(template.identifier);
|
338 |
+
}
|
339 |
+
|
340 |
+
|
341 |
+
// Handlers that control what happens following a movestart
|
342 |
+
|
343 |
+
function activeMousemove(e) {
|
344 |
+
var timer = e.data.timer;
|
345 |
+
|
346 |
+
e.data.touch = e;
|
347 |
+
e.data.timeStamp = e.timeStamp;
|
348 |
+
timer.kick();
|
349 |
+
}
|
350 |
+
|
351 |
+
function activeMouseend(e) {
|
352 |
+
var event = e.data.event,
|
353 |
+
timer = e.data.timer;
|
354 |
+
|
355 |
+
removeActiveMouse();
|
356 |
+
|
357 |
+
endEvent(event, timer, function() {
|
358 |
+
// Unbind the click suppressor, waiting until after mouseup
|
359 |
+
// has been handled.
|
360 |
+
setTimeout(function(){
|
361 |
+
remove(event.target, 'click', returnFalse);
|
362 |
+
}, 0);
|
363 |
+
});
|
364 |
+
}
|
365 |
+
|
366 |
+
function removeActiveMouse(event) {
|
367 |
+
remove(document, mouseevents.move, activeMousemove);
|
368 |
+
remove(document, mouseevents.end, activeMouseend);
|
369 |
+
}
|
370 |
+
|
371 |
+
function activeTouchmove(e) {
|
372 |
+
var event = e.data.event,
|
373 |
+
timer = e.data.timer,
|
374 |
+
touch = changedTouch(e, event);
|
375 |
+
|
376 |
+
if (!touch) { return; }
|
377 |
+
|
378 |
+
// Stop the interface from gesturing
|
379 |
+
e.preventDefault();
|
380 |
+
|
381 |
+
event.targetTouches = e.targetTouches;
|
382 |
+
e.data.touch = touch;
|
383 |
+
e.data.timeStamp = e.timeStamp;
|
384 |
+
timer.kick();
|
385 |
+
}
|
386 |
+
|
387 |
+
function activeTouchend(e) {
|
388 |
+
var event = e.data.event,
|
389 |
+
timer = e.data.timer,
|
390 |
+
touch = identifiedTouch(e.changedTouches, event.identifier);
|
391 |
+
|
392 |
+
// This isn't the touch you're looking for.
|
393 |
+
if (!touch) { return; }
|
394 |
+
|
395 |
+
removeActiveTouch(event);
|
396 |
+
endEvent(event, timer);
|
397 |
+
}
|
398 |
+
|
399 |
+
function removeActiveTouch(event) {
|
400 |
+
remove(document, '.' + event.identifier, activeTouchmove);
|
401 |
+
remove(document, '.' + event.identifier, activeTouchend);
|
402 |
+
}
|
403 |
+
|
404 |
+
|
405 |
+
// Logic for triggering move and moveend events
|
406 |
+
|
407 |
+
function updateEvent(event, touch, timeStamp, timer) {
|
408 |
+
var time = timeStamp - event.timeStamp;
|
409 |
+
|
410 |
+
event.type = 'move';
|
411 |
+
event.distX = touch.pageX - event.startX;
|
412 |
+
event.distY = touch.pageY - event.startY;
|
413 |
+
event.deltaX = touch.pageX - event.pageX;
|
414 |
+
event.deltaY = touch.pageY - event.pageY;
|
415 |
+
|
416 |
+
// Average the velocity of the last few events using a decay
|
417 |
+
// curve to even out spurious jumps in values.
|
418 |
+
event.velocityX = 0.3 * event.velocityX + 0.7 * event.deltaX / time;
|
419 |
+
event.velocityY = 0.3 * event.velocityY + 0.7 * event.deltaY / time;
|
420 |
+
event.pageX = touch.pageX;
|
421 |
+
event.pageY = touch.pageY;
|
422 |
+
}
|
423 |
+
|
424 |
+
function endEvent(event, timer, fn) {
|
425 |
+
timer.end(function(){
|
426 |
+
event.type = 'moveend';
|
427 |
+
|
428 |
+
trigger(event.target, event);
|
429 |
+
|
430 |
+
return fn && fn();
|
431 |
+
});
|
432 |
+
}
|
433 |
+
|
434 |
+
|
435 |
+
// jQuery special event definition
|
436 |
+
|
437 |
+
function setup(data, namespaces, eventHandle) {
|
438 |
+
// Stop the node from being dragged
|
439 |
+
//add(this, 'dragstart.move drag.move', preventDefault);
|
440 |
+
|
441 |
+
// Prevent text selection and touch interface scrolling
|
442 |
+
//add(this, 'mousedown.move', preventIgnoreTags);
|
443 |
+
|
444 |
+
// Tell movestart default handler that we've handled this
|
445 |
+
add(this, 'movestart.move', flagAsHandled);
|
446 |
+
|
447 |
+
// Don't bind to the DOM. For speed.
|
448 |
+
return true;
|
449 |
+
}
|
450 |
+
|
451 |
+
function teardown(namespaces) {
|
452 |
+
remove(this, 'dragstart drag', preventDefault);
|
453 |
+
remove(this, 'mousedown touchstart', preventIgnoreTags);
|
454 |
+
remove(this, 'movestart', flagAsHandled);
|
455 |
+
|
456 |
+
// Don't bind to the DOM. For speed.
|
457 |
+
return true;
|
458 |
+
}
|
459 |
+
|
460 |
+
function addMethod(handleObj) {
|
461 |
+
// We're not interested in preventing defaults for handlers that
|
462 |
+
// come from internal move or moveend bindings
|
463 |
+
if (handleObj.namespace === "move" || handleObj.namespace === "moveend") {
|
464 |
+
return;
|
465 |
+
}
|
466 |
+
|
467 |
+
// Stop the node from being dragged
|
468 |
+
add(this, 'dragstart.' + handleObj.guid + ' drag.' + handleObj.guid, preventDefault, undefined, handleObj.selector);
|
469 |
+
|
470 |
+
// Prevent text selection and touch interface scrolling
|
471 |
+
add(this, 'mousedown.' + handleObj.guid, preventIgnoreTags, undefined, handleObj.selector);
|
472 |
+
}
|
473 |
+
|
474 |
+
function removeMethod(handleObj) {
|
475 |
+
if (handleObj.namespace === "move" || handleObj.namespace === "moveend") {
|
476 |
+
return;
|
477 |
+
}
|
478 |
+
|
479 |
+
remove(this, 'dragstart.' + handleObj.guid + ' drag.' + handleObj.guid);
|
480 |
+
remove(this, 'mousedown.' + handleObj.guid);
|
481 |
+
}
|
482 |
+
|
483 |
+
jQuery.event.special.movestart = {
|
484 |
+
setup: setup,
|
485 |
+
teardown: teardown,
|
486 |
+
add: addMethod,
|
487 |
+
remove: removeMethod,
|
488 |
+
|
489 |
+
_default: function(e) {
|
490 |
+
var event, data;
|
491 |
+
|
492 |
+
// If no move events were bound to any ancestors of this
|
493 |
+
// target, high tail it out of here.
|
494 |
+
if (!e._handled()) { return; }
|
495 |
+
|
496 |
+
function update(time) {
|
497 |
+
updateEvent(event, data.touch, data.timeStamp);
|
498 |
+
trigger(e.target, event);
|
499 |
+
}
|
500 |
+
|
501 |
+
event = {
|
502 |
+
target: e.target,
|
503 |
+
startX: e.startX,
|
504 |
+
startY: e.startY,
|
505 |
+
pageX: e.pageX,
|
506 |
+
pageY: e.pageY,
|
507 |
+
distX: e.distX,
|
508 |
+
distY: e.distY,
|
509 |
+
deltaX: e.deltaX,
|
510 |
+
deltaY: e.deltaY,
|
511 |
+
velocityX: e.velocityX,
|
512 |
+
velocityY: e.velocityY,
|
513 |
+
timeStamp: e.timeStamp,
|
514 |
+
identifier: e.identifier,
|
515 |
+
targetTouches: e.targetTouches,
|
516 |
+
finger: e.finger
|
517 |
+
};
|
518 |
+
|
519 |
+
data = {
|
520 |
+
event: event,
|
521 |
+
timer: new Timer(update),
|
522 |
+
touch: undefined,
|
523 |
+
timeStamp: undefined
|
524 |
+
};
|
525 |
+
|
526 |
+
if (e.identifier === undefined) {
|
527 |
+
// We're dealing with a mouse
|
528 |
+
// Stop clicks from propagating during a move
|
529 |
+
add(e.target, 'click', returnFalse);
|
530 |
+
add(document, mouseevents.move, activeMousemove, data);
|
531 |
+
add(document, mouseevents.end, activeMouseend, data);
|
532 |
+
}
|
533 |
+
else {
|
534 |
+
// We're dealing with a touch. Stop touchmove doing
|
535 |
+
// anything defaulty.
|
536 |
+
e._preventTouchmoveDefault();
|
537 |
+
add(document, touchevents.move + '.' + e.identifier, activeTouchmove, data);
|
538 |
+
add(document, touchevents.end + '.' + e.identifier, activeTouchend, data);
|
539 |
+
}
|
540 |
+
}
|
541 |
+
};
|
542 |
+
|
543 |
+
jQuery.event.special.move = {
|
544 |
+
setup: function() {
|
545 |
+
// Bind a noop to movestart. Why? It's the movestart
|
546 |
+
// setup that decides whether other move events are fired.
|
547 |
+
add(this, 'movestart.move', jQuery.noop);
|
548 |
+
},
|
549 |
+
|
550 |
+
teardown: function() {
|
551 |
+
remove(this, 'movestart.move', jQuery.noop);
|
552 |
+
}
|
553 |
+
};
|
554 |
+
|
555 |
+
jQuery.event.special.moveend = {
|
556 |
+
setup: function() {
|
557 |
+
// Bind a noop to movestart. Why? It's the movestart
|
558 |
+
// setup that decides whether other move events are fired.
|
559 |
+
add(this, 'movestart.moveend', jQuery.noop);
|
560 |
+
},
|
561 |
+
|
562 |
+
teardown: function() {
|
563 |
+
remove(this, 'movestart.moveend', jQuery.noop);
|
564 |
+
}
|
565 |
+
};
|
566 |
+
|
567 |
+
add(document, 'mousedown.move', mousedown);
|
568 |
+
add(document, 'touchstart.move', touchstart);
|
569 |
+
|
570 |
+
// Make jQuery copy touch event properties over to the jQuery event
|
571 |
+
// object, if they are not already listed. But only do the ones we
|
572 |
+
// really need. IE7/8 do not have Array#indexOf(), but nor do they
|
573 |
+
// have touch events, so let's assume we can ignore them.
|
574 |
+
if (typeof Array.prototype.indexOf === 'function') {
|
575 |
+
(function(jQuery, undefined){
|
576 |
+
var props = ["changedTouches", "targetTouches"],
|
577 |
+
l = props.length;
|
578 |
+
|
579 |
+
while (l--) {
|
580 |
+
if (jQuery.event.props.indexOf(props[l]) === -1) {
|
581 |
+
jQuery.event.props.push(props[l]);
|
582 |
+
}
|
583 |
+
}
|
584 |
+
})(jQuery);
|
585 |
+
};
|
586 |
+
});
|
assets/js/jquery.event.move.min.js
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
(function(g){"function"===typeof define&&define.amd?define(["jquery"],g):g(jQuery)})(function(g,l){function H(a){function b(a){d?(c(),I(b),h=!0,d=!1):h=!1}var c=a,d=!1,h=!1;this.kick=function(a){d=!0;h||b()};this.end=function(a){var b=c;a&&(h?(c=d?function(){b();a()}:a,d=!0):a())}}function J(){return!0}function n(){return!1}function p(a){a.preventDefault()}function q(a){r[a.target.tagName.toLowerCase()]||a.preventDefault()}function m(a,b){var c,d;if(a.identifiedTouch)return a.identifiedTouch(b);c=
|
2 |
+
-1;for(d=a.length;++c<d;)if(a[c].identifier===b)return a[c]}function t(a,b){var c=m(a.changedTouches,b.identifier);if(c&&(c.pageX!==b.pageX||c.pageY!==b.pageY))return c}function u(a){v(a,a.data,a,w)}function x(a){w()}function w(){f(document,k.move,u);f(document,k.cancel,x)}function y(a){var b=a.data,c=t(a,b);c&&v(a,b,c,z)}function A(a){var b=a.data;m(a.changedTouches,b.identifier)&&z(b.identifier)}function z(a){f(document,"."+a,y);f(document,"."+a,A)}function v(a,b,c,d){var h=c.pageX-b.startX,g=c.pageY-
|
3 |
+
b.startY;36>h*h+g*g||K(a,b,c,h,g,d)}function L(){this._handled=J;return!1}function B(a){a._handled()}function K(a,b,c,d,h,f){var e,k;e=a.targetTouches;k=a.timeStamp-b.timeStamp;b.type="movestart";b.distX=d;b.distY=h;b.deltaX=d;b.deltaY=h;b.pageX=c.pageX;b.pageY=c.pageY;b.velocityX=d/k;b.velocityY=h/k;b.targetTouches=e;b.finger=e?e.length:1;b._handled=L;b._preventTouchmoveDefault=function(){a.preventDefault()};g.event.trigger(b,void 0,b.target);f(b.identifier)}function C(a){var b=a.data.timer;a.data.touch=
|
4 |
+
a;a.data.timeStamp=a.timeStamp;b.kick()}function D(a){var b=a.data.event;a=a.data.timer;f(document,k.move,C);f(document,k.end,D);E(b,a,function(){setTimeout(function(){f(b.target,"click",n)},0)})}function F(a){var b=a.data.event,c=a.data.timer,d=t(a,b);d&&(a.preventDefault(),b.targetTouches=a.targetTouches,a.data.touch=d,a.data.timeStamp=a.timeStamp,c.kick())}function G(a){var b=a.data.event,c=a.data.timer;m(a.changedTouches,b.identifier)&&(f(document,"."+b.identifier,F),f(document,"."+b.identifier,
|
5 |
+
G),E(b,c))}function E(a,b,c){b.end(function(){a.type="moveend";g.event.trigger(a,void 0,a.target);return c&&c()})}var e=g.event.add,f=g.event.remove,I=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(a,b){return window.setTimeout(function(){a()},25)}}(),r={textarea:!0,input:!0,select:!0,button:!0},k={move:"mousemove",cancel:"mouseup dragstart",end:"mouseup"};
|
6 |
+
g.event.special.movestart={setup:function(a,b,c){e(this,"movestart.move",B);return!0},teardown:function(a){f(this,"dragstart drag",p);f(this,"mousedown touchstart",q);f(this,"movestart",B);return!0},add:function(a){"move"!==a.namespace&&"moveend"!==a.namespace&&(e(this,"dragstart."+a.guid+" drag."+a.guid,p,l,a.selector),e(this,"mousedown."+a.guid,q,l,a.selector))},remove:function(a){"move"!==a.namespace&&"moveend"!==a.namespace&&(f(this,"dragstart."+a.guid+" drag."+a.guid),f(this,"mousedown."+a.guid))},
|
7 |
+
_default:function(a){function b(b){b=c;var e=d.touch,f=d.timeStamp-b.timeStamp;b.type="move";b.distX=e.pageX-b.startX;b.distY=e.pageY-b.startY;b.deltaX=e.pageX-b.pageX;b.deltaY=e.pageY-b.pageY;b.velocityX=.3*b.velocityX+.7*b.deltaX/f;b.velocityY=.3*b.velocityY+.7*b.deltaY/f;b.pageX=e.pageX;b.pageY=e.pageY;g.event.trigger(c,void 0,a.target)}var c,d;a._handled()&&(c={target:a.target,startX:a.startX,startY:a.startY,pageX:a.pageX,pageY:a.pageY,distX:a.distX,distY:a.distY,deltaX:a.deltaX,deltaY:a.deltaY,
|
8 |
+
velocityX:a.velocityX,velocityY:a.velocityY,timeStamp:a.timeStamp,identifier:a.identifier,targetTouches:a.targetTouches,finger:a.finger},d={event:c,timer:new H(b),touch:l,timeStamp:l},a.identifier===l?(e(a.target,"click",n),e(document,k.move,C,d),e(document,k.end,D,d)):(a._preventTouchmoveDefault(),e(document,"touchmove."+a.identifier,F,d),e(document,"touchend."+a.identifier,G,d)))}};g.event.special.move={setup:function(){e(this,"movestart.move",g.noop)},teardown:function(){f(this,"movestart.move",
|
9 |
+
g.noop)}};g.event.special.moveend={setup:function(){e(this,"movestart.moveend",g.noop)},teardown:function(){f(this,"movestart.moveend",g.noop)}};e(document,"mousedown.move",function(a){1!==a.which||a.ctrlKey||a.altKey||(a={target:a.target,startX:a.pageX,startY:a.pageY,timeStamp:a.timeStamp},e(document,k.move,u,a),e(document,k.cancel,x,a))});e(document,"touchstart.move",function(a){var b;r[a.target.tagName.toLowerCase()]||(b=a.changedTouches[0],a={target:b.target,startX:b.pageX,startY:b.pageY,timeStamp:a.timeStamp,
|
10 |
+
identifier:b.identifier},e(document,"touchmove."+b.identifier,y,a),e(document,"touchend."+b.identifier,A,a))});"function"===typeof Array.prototype.indexOf&&function(a,b){for(var c=["changedTouches","targetTouches"],d=c.length;d--;)-1===a.event.props.indexOf(c[d])&&a.event.props.push(c[d])}(g)});
|
assets/js/jquery.twentytwenty.js
ADDED
@@ -0,0 +1,319 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
(function(window, $, undefined){
|
2 |
+
|
3 |
+
$.fn.twentytwenty = function(options, callback) {
|
4 |
+
var options = $.extend({
|
5 |
+
handlePosition : 0.5,
|
6 |
+
orientation : 'horizontal',
|
7 |
+
labelBefore : 'Before',
|
8 |
+
labelAfter : 'After'
|
9 |
+
}
|
10 |
+
, options);
|
11 |
+
return this.each(function() {
|
12 |
+
|
13 |
+
var sliderPct = options.handlePosition,
|
14 |
+
$container = $(this),
|
15 |
+
sliderOrientation = options.orientation,
|
16 |
+
beforeDirection = (sliderOrientation === 'vertical') ? 'down' : 'left',
|
17 |
+
afterDirection = (sliderOrientation === 'vertical') ? 'up' : 'right',
|
18 |
+
$beforeImg = $container.find('img:first'),
|
19 |
+
$afterImg = $container.find('img:last');
|
20 |
+
|
21 |
+
|
22 |
+
$container.wrap('<div class="twentytwenty-wrapper twentytwenty-' + sliderOrientation + '"></div>');
|
23 |
+
$container.append('<div class="twentytwenty-overlay"></div>');
|
24 |
+
$container.append('<div class="twentytwenty-handle"></div>');
|
25 |
+
|
26 |
+
var $slider = $container.find('.twentytwenty-handle');
|
27 |
+
|
28 |
+
$slider.append('<span class="twentytwenty-' + beforeDirection + '-arrow"></span>');
|
29 |
+
$slider.append('<span class="twentytwenty-' + afterDirection + '-arrow"></span>');
|
30 |
+
$container.addClass('twentytwenty-container');
|
31 |
+
$beforeImg.addClass('twentytwenty-before');
|
32 |
+
$afterImg.addClass('twentytwenty-after');
|
33 |
+
|
34 |
+
var $overlay = $container.find('.twentytwenty-overlay');
|
35 |
+
|
36 |
+
$overlay.append('<div class="twentytwenty-labels twentytwenty-before-label"><span class="twentytwenty-label-content">' + options.labelBefore + '</span></div>');
|
37 |
+
$overlay.append('<div class="twentytwenty-labels twentytwenty-after-label"><span class="twentytwenty-label-content">' + options.labelAfter + '</span></div>');
|
38 |
+
|
39 |
+
|
40 |
+
// some usefull function and vars declarations
|
41 |
+
|
42 |
+
var calcOffset = function(dimensionPct) {
|
43 |
+
var w = $beforeImg.width();
|
44 |
+
var h = $beforeImg.height();
|
45 |
+
return {
|
46 |
+
w: w+"px",
|
47 |
+
h: h+"px",
|
48 |
+
cw: (dimensionPct*w)+"px",
|
49 |
+
ch: (dimensionPct*h)+"px"
|
50 |
+
};
|
51 |
+
},
|
52 |
+
|
53 |
+
adjustContainer = function( offset ) {
|
54 |
+
// make it dynamic, in case "before" image change
|
55 |
+
var $beforeImg = $container.find('.twentytwenty-before');
|
56 |
+
|
57 |
+
if ( sliderOrientation === 'vertical' ) {
|
58 |
+
$beforeImg.css( 'clip', 'rect(0,' + offset.w + ',' + offset.ch + ',0)' );
|
59 |
+
}
|
60 |
+
else {
|
61 |
+
$beforeImg.css( 'clip', 'rect(0,' + offset.cw + ',' + offset.h + ',0)' );
|
62 |
+
}
|
63 |
+
$container.css( 'height', offset.h );
|
64 |
+
|
65 |
+
if ( typeof callback === 'function' ) {
|
66 |
+
callback();
|
67 |
+
}
|
68 |
+
},
|
69 |
+
adjustSlider = function( pct ) {
|
70 |
+
var offset = calcOffset(pct);
|
71 |
+
$slider.css( ( sliderOrientation === 'vertical' ) ? 'top' : 'left', ( sliderOrientation === 'vertical' ) ? offset.ch : offset.cw );
|
72 |
+
adjustContainer( offset );
|
73 |
+
},
|
74 |
+
offsetX = 0,
|
75 |
+
offsetY = 0,
|
76 |
+
imgWidth = 0,
|
77 |
+
imgHeight = 0;
|
78 |
+
|
79 |
+
$(window).on('resize.twentytwenty', function(e) {
|
80 |
+
adjustSlider( sliderPct );
|
81 |
+
});
|
82 |
+
|
83 |
+
$slider.on('movestart', function(e) {
|
84 |
+
if ( ( ( e.distX > e.distY && e.distX < -e.distY ) || ( e.distX < e.distY && e.distX > -e.distY ) ) && sliderOrientation !== 'vertical' ) {
|
85 |
+
e.preventDefault();
|
86 |
+
}
|
87 |
+
else if ( ( ( e.distX < e.distY && e.distX < -e.distY ) || ( e.distX > e.distY && e.distX > -e.distY ) ) && sliderOrientation === 'vertical' ) {
|
88 |
+
e.preventDefault();
|
89 |
+
}
|
90 |
+
$container.addClass('active');
|
91 |
+
offsetX = $container.offset().left;
|
92 |
+
offsetY = $container.offset().top;
|
93 |
+
imgWidth = $beforeImg.width();
|
94 |
+
imgHeight = $beforeImg.height();
|
95 |
+
});
|
96 |
+
|
97 |
+
$slider.on('moveend', function(e) {
|
98 |
+
$container.removeClass('active');
|
99 |
+
});
|
100 |
+
|
101 |
+
$slider.on('move', function(e) {
|
102 |
+
if ( $container.hasClass('active') ) {
|
103 |
+
|
104 |
+
sliderPct = ( sliderOrientation === 'vertical' ) ? ( e.pageY-offsetY )/imgHeight : ( e.pageX-offsetX )/imgWidth;
|
105 |
+
|
106 |
+
if ( sliderPct < 0 ) {
|
107 |
+
sliderPct = 0;
|
108 |
+
}
|
109 |
+
if ( sliderPct > 1 ) {
|
110 |
+
sliderPct = 1;
|
111 |
+
}
|
112 |
+
adjustSlider( sliderPct );
|
113 |
+
}
|
114 |
+
});
|
115 |
+
|
116 |
+
$container.find('img').on('mousedown', function(event) {
|
117 |
+
event.preventDefault();
|
118 |
+
});
|
119 |
+
|
120 |
+
$(window).trigger('resize.twentytwenty');
|
121 |
+
});
|
122 |
+
};
|
123 |
+
|
124 |
+
})(window, jQuery);
|
125 |
+
|
126 |
+
/**
|
127 |
+
* Twentytwenty Imagify Init
|
128 |
+
*/
|
129 |
+
(function(window, $, undefined){
|
130 |
+
|
131 |
+
/*
|
132 |
+
* Mini chart
|
133 |
+
*
|
134 |
+
* @param {element} canvas
|
135 |
+
*/
|
136 |
+
var draw_me_a_chart = function ( canvas ) {
|
137 |
+
canvas.each(function(){
|
138 |
+
var the_value = parseInt( $(this).closest('.imagify-chart').next('.imagify-chart-value').text() ),
|
139 |
+
overviewData = [
|
140 |
+
{
|
141 |
+
value: the_value,
|
142 |
+
color: '#00B3D3'
|
143 |
+
},
|
144 |
+
{
|
145 |
+
value: 100 - the_value,
|
146 |
+
color: '#D8D8D8'
|
147 |
+
}
|
148 |
+
],
|
149 |
+
overviewDoughnut = new Chart( $(this)[0].getContext('2d')).Doughnut(overviewData, {
|
150 |
+
segmentStrokeColor : '#2A2E3C',
|
151 |
+
segmentStrokeWidth : 1,
|
152 |
+
animateRotate : true,
|
153 |
+
percentageInnerCutout: 60,
|
154 |
+
tooltipEvents : []
|
155 |
+
});
|
156 |
+
});
|
157 |
+
};
|
158 |
+
|
159 |
+
$('.imagify-visual-comparison-btn').on('click', function(){
|
160 |
+
|
161 |
+
if ( $('.twentytwenty-wrapper').length === 1) {
|
162 |
+
return;
|
163 |
+
}
|
164 |
+
|
165 |
+
$( $(this).data('target') ).find('.imagify-modal-content').css('width', ($(window).outerWidth()*0.95) + 'px');
|
166 |
+
|
167 |
+
if ( $('.twentytwenty-container').length > 0 && $(window).outerWidth() > 800 ) {
|
168 |
+
|
169 |
+
var $tt = $('.twentytwenty-container'),
|
170 |
+
imgs_loaded = 0,
|
171 |
+
loader = $tt.data('loader'),
|
172 |
+
label_original = $tt.data('label-original'),
|
173 |
+
label_normal = $tt.data('label-normal'),
|
174 |
+
label_aggressive = $tt.data('label-aggressive'),
|
175 |
+
label_ultra = $tt.data('label-ultra'),
|
176 |
+
|
177 |
+
original_label = $tt.data('original-label').replace(/\*\*/, '<strong>').replace(/\*\*/, '</strong>'),
|
178 |
+
original_alt = $tt.data('original-alt'),
|
179 |
+
original_src = $tt.data('original-img'),
|
180 |
+
original_dim = $tt.data('original-dim').split('x'),
|
181 |
+
|
182 |
+
normal_label = $tt.data('normal-label').replace(/\*\*/, '<strong>').replace(/\*\*/, '</strong>'),
|
183 |
+
normal_alt = $tt.data('normal-alt'),
|
184 |
+
normal_src = $tt.data('normal-img'),
|
185 |
+
normal_dim = $tt.data('normal-dim').split('x'),
|
186 |
+
|
187 |
+
aggressive_label = $tt.data('aggressive-label').replace(/\*\*/, '<strong>').replace(/\*\*/, '</strong>'),
|
188 |
+
aggressive_alt = $tt.data('aggressive-alt'),
|
189 |
+
aggressive_src = $tt.data('aggressive-img'),
|
190 |
+
aggressive_dim = $tt.data('aggressive-dim').split('x'),
|
191 |
+
|
192 |
+
ultra_label = $tt.data('ultra-label').replace(/\*\*/, '<strong>').replace(/\*\*/, '</strong>'),
|
193 |
+
ultra_alt = $tt.data('ultra-alt'),
|
194 |
+
ultra_src = $tt.data('ultra-img'),
|
195 |
+
ultra_dim = $tt.data('ultra-dim').split('x'),
|
196 |
+
|
197 |
+
tt_before_buttons = '<span class="twentytwenty-duo-buttons twentytwenty-duo-left">' +
|
198 |
+
'<button type="button" class="imagify-comparison-original selected" data-img="original">' + label_original + '</button>' +
|
199 |
+
'<button type="button" class="imagify-comparison-normal" data-img="normal">' + label_normal + '</button>' +
|
200 |
+
'<button type="button" class="imagify-comparison-aggressive" data-img="aggressive">' + label_aggressive + '</button>' +
|
201 |
+
'</span>',
|
202 |
+
tt_after_buttons = '<span class="twentytwenty-duo-buttons twentytwenty-duo-right">' +
|
203 |
+
'<button type="button" class="imagify-comparison-normal" data-img="normal">' + label_normal + '</button>' +
|
204 |
+
'<button type="button" class="imagify-comparison-aggressive" data-img="aggressive">' + label_aggressive + '</button>' +
|
205 |
+
'<button type="button" class="imagify-comparison-ultra selected" data-img="ultra">' + label_ultra + '</button>' +
|
206 |
+
'</span>';
|
207 |
+
|
208 |
+
// loader
|
209 |
+
$tt.before('<img class="loader" src="' + loader + '" alt="Loading…" width="64" height="64">')
|
210 |
+
|
211 |
+
// add switchers button only if needed
|
212 |
+
// should be more locally integrate...
|
213 |
+
var duo_buttons = ( $('.twentytwenty-left-buttons').lenght ) ? tt_before_buttons + tt_after_buttons : '';
|
214 |
+
// should be more locally integrate...
|
215 |
+
$('.twentytwenty-left-buttons').append(tt_before_buttons);
|
216 |
+
$('.twentytwenty-right-buttons').append(tt_after_buttons);
|
217 |
+
|
218 |
+
// add images to 50/50 area
|
219 |
+
$tt.closest('.imagify-modal-content').addClass('loading').find('.twentytwenty-container').append(
|
220 |
+
'<img class="img-original" alt="' + original_alt + '" width="' + original_dim[0] + '" height="' + original_dim[1] + '">' +
|
221 |
+
'<img class="img-normal" alt="' + normal_alt + '" width="' + normal_dim[0] + '" height="' + normal_dim[1] + '">' +
|
222 |
+
'<img class="img-aggressive" alt="' + aggressive_alt + '" width="' + aggressive_dim[0] + '" height="' + aggressive_dim[1] + '">' +
|
223 |
+
'<img class="img-ultra" alt="' + ultra_alt + '" width="' + ultra_dim[0] + '" height="' + ultra_dim[1] + '">' +
|
224 |
+
duo_buttons
|
225 |
+
);
|
226 |
+
|
227 |
+
// load image original
|
228 |
+
$('.img-original').on('load', function(){
|
229 |
+
imgs_loaded++;
|
230 |
+
}).attr('src', original_src);
|
231 |
+
|
232 |
+
// load image normal
|
233 |
+
$('.img-normal').on('load', function(){
|
234 |
+
imgs_loaded++;
|
235 |
+
}).attr('src', normal_src);
|
236 |
+
|
237 |
+
// load image aggressive
|
238 |
+
$('.img-aggressive').on('load', function(){
|
239 |
+
imgs_loaded++;
|
240 |
+
}).attr('src', aggressive_src);
|
241 |
+
|
242 |
+
// load image ultra
|
243 |
+
$('.img-ultra').on('load', function(){
|
244 |
+
imgs_loaded++;
|
245 |
+
}).attr('src', ultra_src);
|
246 |
+
|
247 |
+
var twenty_me = setInterval(function(){
|
248 |
+
if ( imgs_loaded === 4 ) {
|
249 |
+
$tt.twentytwenty({
|
250 |
+
handlePosition: 0.6,
|
251 |
+
orientation: 'horizontal',
|
252 |
+
labelBefore: original_label,
|
253 |
+
labelAfter: ultra_label
|
254 |
+
}, function(){
|
255 |
+
// fires on initialisation & each time the handle is moving
|
256 |
+
if ( ! $tt.closest('.imagify-modal-content').hasClass('loaded') ) {
|
257 |
+
$tt.closest('.imagify-modal-content').removeClass('loading').addClass('loaded');
|
258 |
+
draw_me_a_chart( $('.imagify-level-ultra').find('.imagify-chart').find('canvas') );
|
259 |
+
}
|
260 |
+
});
|
261 |
+
clearInterval( twenty_me );
|
262 |
+
twenty_me = null;
|
263 |
+
}
|
264 |
+
}, 75);
|
265 |
+
|
266 |
+
// on click on button choices
|
267 |
+
|
268 |
+
$('.imagify-comparison-title').on('click', '.twentytwenty-duo-buttons button:not(.selected)', function(e){
|
269 |
+
|
270 |
+
e.stopPropagation();
|
271 |
+
|
272 |
+
var $_this = $(this),
|
273 |
+
$container = $_this.closest('.imagify-comparison-title').nextAll('.twentytwenty-wrapper').find('.twentytwenty-container'),
|
274 |
+
side = $_this.closest('.twentytwenty-duo-buttons').hasClass('twentytwenty-duo-left') ? 'left' : 'right',
|
275 |
+
$other_side = side === 'left' ? $_this.closest('.imagify-comparison-title').find('.twentytwenty-duo-right') : $_this.closest('.imagify-comparison-title').find('.twentytwenty-duo-left'),
|
276 |
+
$duo = $_this.closest('.twentytwenty-duo-buttons').find('button'),
|
277 |
+
$img_before = $container.find('.twentytwenty-before'),
|
278 |
+
$img_after = $container.find('.twentytwenty-after'),
|
279 |
+
image = $_this.data('img');
|
280 |
+
|
281 |
+
// button coloration
|
282 |
+
$duo.removeClass('selected');
|
283 |
+
$_this.addClass('selected');
|
284 |
+
|
285 |
+
// other side action (to not compare same images)
|
286 |
+
if ( $other_side.find('.selected').data('img') === image ) {
|
287 |
+
$other_side.find('button:not(.selected)').eq(0).trigger('click');
|
288 |
+
}
|
289 |
+
|
290 |
+
// left buttons
|
291 |
+
if ( side === 'left' ) {
|
292 |
+
var clip_styles = $img_before.css('clip');
|
293 |
+
$img_before.attr('style', '');
|
294 |
+
$img_before.removeClass('twentytwenty-before');
|
295 |
+
$container.find( '.img-' + image ).addClass('twentytwenty-before').css('clip', clip_styles);
|
296 |
+
$('.twentytwenty-before-label').find('.twentytwenty-label-content').text( $container.data( image + '-label' ) );
|
297 |
+
$('.imagify-c-level.go-left').attr('aria-hidden', 'true').removeClass('go-left go-right');
|
298 |
+
$('.imagify-level-' + image).attr('aria-hidden', 'false').addClass('go-left');
|
299 |
+
}
|
300 |
+
|
301 |
+
// right buttons
|
302 |
+
if ( side === 'right' ) {
|
303 |
+
$img_after.removeClass('twentytwenty-after')
|
304 |
+
$container.find( '.img-' + image ).addClass('twentytwenty-after');
|
305 |
+
$('.twentytwenty-after-label').find('.twentytwenty-label-content').text( $container.data( image + '-label' ) );
|
306 |
+
$('.imagify-c-level.go-right').attr('aria-hidden', 'true').removeClass('go-left go-right');
|
307 |
+
$('.imagify-level-' + image).attr('aria-hidden', 'false').addClass('go-right');
|
308 |
+
}
|
309 |
+
|
310 |
+
draw_me_a_chart( $('.imagify-level-' + image).find('.imagify-chart').find('canvas') );
|
311 |
+
|
312 |
+
return false;
|
313 |
+
|
314 |
+
});
|
315 |
+
}
|
316 |
+
|
317 |
+
});
|
318 |
+
|
319 |
+
})(window, jQuery);
|
assets/js/jquery.twentytwenty.min.js
ADDED
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
(function(n,a,w){a.fn.twentytwenty=function(f,b){f=a.extend({handlePosition:.5,orientation:"horizontal",labelBefore:"Before",labelAfter:"After"},f);return this.each(function(){var d=f.handlePosition,c=a(this),e=f.orientation,g="vertical"===e?"down":"left",r="vertical"===e?"up":"right",k=c.find("img:first"),x=c.find("img:last");c.wrap('<div class="twentytwenty-wrapper twentytwenty-'+e+'"></div>');c.append('<div class="twentytwenty-overlay"></div>');c.append('<div class="twentytwenty-handle"></div>');
|
2 |
+
var h=c.find(".twentytwenty-handle");h.append('<span class="twentytwenty-'+g+'-arrow"></span>');h.append('<span class="twentytwenty-'+r+'-arrow"></span>');c.addClass("twentytwenty-container");k.addClass("twentytwenty-before");x.addClass("twentytwenty-after");g=c.find(".twentytwenty-overlay");g.append('<div class="twentytwenty-labels twentytwenty-before-label"><span class="twentytwenty-label-content">'+f.labelBefore+"</span></div>");g.append('<div class="twentytwenty-labels twentytwenty-after-label"><span class="twentytwenty-label-content">'+
|
3 |
+
f.labelAfter+"</span></div>");var t=function(a){var d,g,f;f=k.width();var m=k.height();d=f+"px";g=m+"px";f=a*f+"px";a=a*m+"px";h.css("vertical"===e?"top":"left","vertical"===e?a:f);m=c.find(".twentytwenty-before");"vertical"===e?m.css("clip","rect(0,"+d+","+a+",0)"):m.css("clip","rect(0,"+f+","+g+",0)");c.css("height",g);"function"===typeof b&&b()},p=0,u=0,v=0,q=0;a(n).on("resize.twentytwenty",function(a){t(d)});h.on("movestart",function(a){(a.distX>a.distY&&a.distX<-a.distY||a.distX<a.distY&&a.distX>
|
4 |
+
-a.distY)&&"vertical"!==e?a.preventDefault():(a.distX<a.distY&&a.distX<-a.distY||a.distX>a.distY&&a.distX>-a.distY)&&"vertical"===e&&a.preventDefault();c.addClass("active");p=c.offset().left;u=c.offset().top;v=k.width();q=k.height()});h.on("moveend",function(a){c.removeClass("active")});h.on("move",function(a){c.hasClass("active")&&(d="vertical"===e?(a.pageY-u)/q:(a.pageX-p)/v,0>d&&(d=0),1<d&&(d=1),t(d))});c.find("img").on("mousedown",function(a){a.preventDefault()});a(n).trigger("resize.twentytwenty")})}})(window,
|
5 |
+
jQuery);
|
6 |
+
(function(n,a,w){var f=function(b){b.each(function(){var b=parseInt(a(this).closest(".imagify-chart").next(".imagify-chart-value").text()),b=[{value:b,color:"#00B3D3"},{value:100-b,color:"#D8D8D8"}];(new Chart(a(this)[0].getContext("2d"))).Doughnut(b,{segmentStrokeColor:"#2A2E3C",segmentStrokeWidth:1,animateRotate:!0,percentageInnerCutout:60,tooltipEvents:[]})})};a(".imagify-visual-comparison-btn").on("click",function(){if(1!==a(".twentytwenty-wrapper").length&&(a(a(this).data("target")).find(".imagify-modal-content").css("width",.95*
|
7 |
+
a(n).outerWidth()+"px"),0<a(".twentytwenty-container").length&&800<a(n).outerWidth())){var b=a(".twentytwenty-container"),d=0,c=b.data("loader"),e=b.data("label-original"),g=b.data("label-normal"),r=b.data("label-aggressive"),k=b.data("label-ultra"),x=b.data("original-label").replace(/\*\*/,"<strong>").replace(/\*\*/,"</strong>"),h=b.data("original-alt"),t=b.data("original-img"),p=b.data("original-dim").split("x");b.data("normal-label").replace(/\*\*/,"<strong>").replace(/\*\*/,"</strong>");var u=
|
8 |
+
b.data("normal-alt"),v=b.data("normal-img"),q=b.data("normal-dim").split("x");b.data("aggressive-label").replace(/\*\*/,"<strong>").replace(/\*\*/,"</strong>");var w=b.data("aggressive-alt"),B=b.data("aggressive-img"),y=b.data("aggressive-dim").split("x"),C=b.data("ultra-label").replace(/\*\*/,"<strong>").replace(/\*\*/,"</strong>"),m=b.data("ultra-alt"),D=b.data("ultra-img"),z=b.data("ultra-dim").split("x"),e='<span class="twentytwenty-duo-buttons twentytwenty-duo-left"><button type="button" class="imagify-comparison-original selected" data-img="original">'+
|
9 |
+
e+'</button><button type="button" class="imagify-comparison-normal" data-img="normal">'+g+'</button><button type="button" class="imagify-comparison-aggressive" data-img="aggressive">'+r+"</button></span>",g='<span class="twentytwenty-duo-buttons twentytwenty-duo-right"><button type="button" class="imagify-comparison-normal" data-img="normal">'+g+'</button><button type="button" class="imagify-comparison-aggressive" data-img="aggressive">'+r+'</button><button type="button" class="imagify-comparison-ultra selected" data-img="ultra">'+
|
10 |
+
k+"</button></span>";b.before('<img class="loader" src="'+c+'" alt="Loading\u2026" width="64" height="64">');c=a(".twentytwenty-left-buttons").lenght?e+g:"";a(".twentytwenty-left-buttons").append(e);a(".twentytwenty-right-buttons").append(g);b.closest(".imagify-modal-content").addClass("loading").find(".twentytwenty-container").append('<img class="img-original" alt="'+h+'" width="'+p[0]+'" height="'+p[1]+'"><img class="img-normal" alt="'+u+'" width="'+q[0]+'" height="'+q[1]+'"><img class="img-aggressive" alt="'+
|
11 |
+
w+'" width="'+y[0]+'" height="'+y[1]+'"><img class="img-ultra" alt="'+m+'" width="'+z[0]+'" height="'+z[1]+'">'+c);a(".img-original").on("load",function(){d++}).attr("src",t);a(".img-normal").on("load",function(){d++}).attr("src",v);a(".img-aggressive").on("load",function(){d++}).attr("src",B);a(".img-ultra").on("load",function(){d++}).attr("src",D);var A=setInterval(function(){4===d&&(b.twentytwenty({handlePosition:.6,orientation:"horizontal",labelBefore:x,labelAfter:C},function(){b.closest(".imagify-modal-content").hasClass("loaded")||
|
12 |
+
(b.closest(".imagify-modal-content").removeClass("loading").addClass("loaded"),f(a(".imagify-level-ultra").find(".imagify-chart").find("canvas")))}),clearInterval(A),A=null)},75);a(".imagify-comparison-title").on("click",".twentytwenty-duo-buttons button:not(.selected)",function(b){b.stopPropagation();var c=a(this);b=c.closest(".imagify-comparison-title").nextAll(".twentytwenty-wrapper").find(".twentytwenty-container");var d=c.closest(".twentytwenty-duo-buttons").hasClass("twentytwenty-duo-left")?
|
13 |
+
"left":"right",e="left"===d?c.closest(".imagify-comparison-title").find(".twentytwenty-duo-right"):c.closest(".imagify-comparison-title").find(".twentytwenty-duo-left"),g=c.closest(".twentytwenty-duo-buttons").find("button"),h=b.find(".twentytwenty-before"),k=b.find(".twentytwenty-after"),l=c.data("img");g.removeClass("selected");c.addClass("selected");e.find(".selected").data("img")===l&&e.find("button:not(.selected)").eq(0).trigger("click");"left"===d&&(c=h.css("clip"),h.attr("style",""),h.removeClass("twentytwenty-before"),
|
14 |
+
b.find(".img-"+l).addClass("twentytwenty-before").css("clip",c),a(".twentytwenty-before-label").find(".twentytwenty-label-content").text(b.data(l+"-label")),a(".imagify-c-level.go-left").attr("aria-hidden","true").removeClass("go-left go-right"),a(".imagify-level-"+l).attr("aria-hidden","false").addClass("go-left"));"right"===d&&(k.removeClass("twentytwenty-after"),b.find(".img-"+l).addClass("twentytwenty-after"),a(".twentytwenty-after-label").find(".twentytwenty-label-content").text(b.data(l+"-label")),
|
15 |
+
a(".imagify-c-level.go-right").attr("aria-hidden","true").removeClass("go-left go-right"),a(".imagify-level-"+l).attr("aria-hidden","false").addClass("go-right"));f(a(".imagify-level-"+l).find(".imagify-chart").find("canvas"));return!1})}})})(window,jQuery);
|
assets/js/options.js
ADDED
@@ -0,0 +1,98 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
jQuery(function($){
|
2 |
+
/*
|
3 |
+
* Process an API key check validity.
|
4 |
+
*/
|
5 |
+
var busy = false,
|
6 |
+
xhr = false;
|
7 |
+
|
8 |
+
$('#imagify-settings #api_key').blur(function(){
|
9 |
+
var obj = $(this),
|
10 |
+
value = obj.val();
|
11 |
+
|
12 |
+
if( $.trim(value) === '' ) {
|
13 |
+
return false;
|
14 |
+
}
|
15 |
+
|
16 |
+
if( $('#check_api_key').val() === value ) {
|
17 |
+
$('#imagify-check-api-container').html('<span class="dashicons dashicons-yes"></span> ' + imagify.ValidApiKeyText);
|
18 |
+
return false;
|
19 |
+
}
|
20 |
+
|
21 |
+
if ( true === busy ) {
|
22 |
+
xhr.abort();
|
23 |
+
} else {
|
24 |
+
$('#imagify-check-api-container').remove();
|
25 |
+
obj.after( '<span id="imagify-check-api-container"><span class="imagify-spinner"></span>' + imagify.waitApiKeyCheckText + "</span>" );
|
26 |
+
}
|
27 |
+
|
28 |
+
busy = true;
|
29 |
+
|
30 |
+
xhr = $.get(ajaxurl+"?action=imagify_check_api_key_validity&api_key="+obj.val()+"&imagifycheckapikeynonce="+$('#imagifycheckapikeynonce').val())
|
31 |
+
.done(function(response){
|
32 |
+
if( !response.success ) {
|
33 |
+
$('#imagify-check-api-container').html( '<span class="dashicons dashicons-no"></span> ' + response.data);
|
34 |
+
} else {
|
35 |
+
$('#imagify-check-api-container').remove();
|
36 |
+
swal({
|
37 |
+
title: imagify.ApiKeyCheckSuccessTitle,
|
38 |
+
text: imagify.ApiKeyCheckSuccessText,
|
39 |
+
type: "success",
|
40 |
+
customClass: "imagify-sweet-alert"
|
41 |
+
},
|
42 |
+
function(){
|
43 |
+
location.reload();
|
44 |
+
});
|
45 |
+
}
|
46 |
+
|
47 |
+
busy = false;
|
48 |
+
});
|
49 |
+
});
|
50 |
+
|
51 |
+
/**
|
52 |
+
* Check the boxes by clicking "labels" (aria-describedby items)
|
53 |
+
*/
|
54 |
+
$('.imagify-options-line').css('cursor', 'pointer').on('click', function(e){
|
55 |
+
if ( e.target.nodeName === 'INPUT' ) {
|
56 |
+
return;
|
57 |
+
}
|
58 |
+
$('input[aria-describedby="' + $(this).attr('id') + '"]').trigger('click');
|
59 |
+
return false;
|
60 |
+
});
|
61 |
+
|
62 |
+
$('.imagify-settings th span').on('click', function(e){
|
63 |
+
if ( $(this).parent().next('td').find('input:checkbox').length === 1 ) {
|
64 |
+
$(this).parent().next('td').find('input:checkbox').trigger('click');
|
65 |
+
}
|
66 |
+
})
|
67 |
+
|
68 |
+
/**
|
69 |
+
* Auto check on options-line input value change
|
70 |
+
*/
|
71 |
+
$('.imagify-options-line').find('input').on('change focus', function(){
|
72 |
+
var $checkbox = $(this).closest('.imagify-options-line').prev('label').prev('input');
|
73 |
+
if ( ! $checkbox[0].checked ) {
|
74 |
+
$checkbox.prop('checked', true);
|
75 |
+
}
|
76 |
+
});
|
77 |
+
|
78 |
+
/**
|
79 |
+
* Imagify Backup alert
|
80 |
+
*/
|
81 |
+
$('.imagify-settings-section').find('#backup').on('change', function(){
|
82 |
+
if ( ! $(this).is(':checked') ) {
|
83 |
+
var $_this = $(this);
|
84 |
+
swal({
|
85 |
+
title: imagifyOptions.noBackupTitle,
|
86 |
+
text: imagifyOptions.noBackupText,
|
87 |
+
type: "info",
|
88 |
+
customClass: "imagify-sweet-alert",
|
89 |
+
showCancelButton: true
|
90 |
+
}, function(isConfirm){
|
91 |
+
if ( ! isConfirm ) {
|
92 |
+
$_this.prop('checked', true);
|
93 |
+
}
|
94 |
+
});
|
95 |
+
}
|
96 |
+
});
|
97 |
+
|
98 |
+
});
|
assets/js/options.min.js
ADDED
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
1 |
+
jQuery(function(a){var c=!1,d=!1;a("#imagify-settings #api_key").blur(function(){var b=a(this),e=b.val();if(""===a.trim(e))return!1;if(a("#check_api_key").val()===e)return a("#imagify-check-api-container").html('<span class="dashicons dashicons-yes"></span> '+imagify.ValidApiKeyText),!1;!0===c?d.abort():(a("#imagify-check-api-container").remove(),b.after('<span id="imagify-check-api-container"><span class="imagify-spinner"></span>'+imagify.waitApiKeyCheckText+"</span>"));c=!0;d=a.get(ajaxurl+"?action=imagify_check_api_key_validity&api_key="+
|
2 |
+
b.val()+"&imagifycheckapikeynonce="+a("#imagifycheckapikeynonce").val()).done(function(b){b.success?(a("#imagify-check-api-container").remove(),swal({title:imagify.ApiKeyCheckSuccessTitle,text:imagify.ApiKeyCheckSuccessText,type:"success",customClass:"imagify-sweet-alert"},function(){location.reload()})):a("#imagify-check-api-container").html('<span class="dashicons dashicons-no"></span> '+b.data);c=!1})});a(".imagify-options-line").css("cursor","pointer").on("click",function(b){if("INPUT"!==b.target.nodeName)return a('input[aria-describedby="'+
|
3 |
+
a(this).attr("id")+'"]').trigger("click"),!1});a(".imagify-settings th span").on("click",function(b){1===a(this).parent().next("td").find("input:checkbox").length&&a(this).parent().next("td").find("input:checkbox").trigger("click")});a(".imagify-options-line").find("input").on("change focus",function(){var b=a(this).closest(".imagify-options-line").prev("label").prev("input");b[0].checked||b.prop("checked",!0)});a(".imagify-settings-section").find("#backup").on("change",function(){if(!a(this).is(":checked")){var b=
|
4 |
+
a(this);swal({title:imagifyOptions.noBackupTitle,text:imagifyOptions.noBackupText,type:"info",customClass:"imagify-sweet-alert",showCancelButton:!0},function(a){a||b.prop("checked",!0)})}})});
|
assets/js/sweetalert.min.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
!function(e,t,n){"use strict";!function o(e,t,n){function a(s,l){if(!t[s]){if(!e[s]){var i="function"==typeof require&&require;if(!l&&i)return i(s,!0);if(r)return r(s,!0);var u=new Error("Cannot find module '"+s+"'");throw u.code="MODULE_NOT_FOUND",u}var c=t[s]={exports:{}};e[s][0].call(c.exports,function(t){var n=e[s][1][t];return a(n?n:t)},c,c.exports,o,e,t,n)}return t[s].exports}for(var r="function"==typeof require&&require,s=0;s<n.length;s++)a(n[s]);return a}({1:[function(o){var a,r,s,l,i=function(e){return e&&e.__esModule?e:{"default":e}},u=o("./modules/handle-dom"),c=o("./modules/utils"),d=o("./modules/handle-swal-dom"),f=o("./modules/handle-click"),p=o("./modules/handle-key"),m=i(p),v=o("./modules/default-params"),y=i(v),h=o("./modules/set-params"),g=i(h);s=l=function(){function o(e){var t=s;return t[e]===n?y["default"][e]:t[e]}var s=arguments[0];if(u.addClass(t.body,"stop-scrolling"),d.resetInput(),s===n)return c.logStr("SweetAlert expects at least 1 attribute!"),!1;var i=c.extend({},y["default"]);switch(typeof s){case"string":i.title=s,i.text=arguments[1]||"",i.type=arguments[2]||"";break;case"object":if(s.title===n)return c.logStr('Missing "title" argument!'),!1;i.title=s.title;for(var p in y["default"])i[p]=o(p);i.confirmButtonText=i.showCancelButton?"Confirm":y["default"].confirmButtonText,i.confirmButtonText=o("confirmButtonText"),i.doneFunction=arguments[1]||null;break;default:return c.logStr('Unexpected type of argument! Expected "string" or "object", got '+typeof s),!1}g["default"](i),d.fixVerticalPosition(),d.openModal(arguments[1]);for(var v=d.getModal(),h=v.querySelectorAll("button"),b=["onclick","onmouseover","onmouseout","onmousedown","onmouseup","onfocus"],w=function(e){return f.handleButton(e,i,v)},C=0;C<h.length;C++)for(var S=0;S<b.length;S++){var x=b[S];h[C][x]=w}d.getOverlay().onclick=w,a=e.onkeydown;var k=function(e){return m["default"](e,i,v)};e.onkeydown=k,e.onfocus=function(){setTimeout(function(){r!==n&&(r.focus(),r=n)},0)},l.enableButtons()},s.setDefaults=l.setDefaults=function(e){if(!e)throw new Error("userParams is required");if("object"!=typeof e)throw new Error("userParams has to be a object");c.extend(y["default"],e)},s.close=l.close=function(){var o=d.getModal();u.fadeOut(d.getOverlay(),5),u.fadeOut(o,5),u.removeClass(o,"showSweetAlert"),u.addClass(o,"hideSweetAlert"),u.removeClass(o,"visible");var s=o.querySelector(".sa-icon.sa-success");u.removeClass(s,"animate"),u.removeClass(s.querySelector(".sa-tip"),"animateSuccessTip"),u.removeClass(s.querySelector(".sa-long"),"animateSuccessLong");var l=o.querySelector(".sa-icon.sa-error");u.removeClass(l,"animateErrorIcon"),u.removeClass(l.querySelector(".sa-x-mark"),"animateXMark");var i=o.querySelector(".sa-icon.sa-warning");return u.removeClass(i,"pulseWarning"),u.removeClass(i.querySelector(".sa-body"),"pulseWarningIns"),u.removeClass(i.querySelector(".sa-dot"),"pulseWarningIns"),setTimeout(function(){var e=o.getAttribute("data-custom-class");u.removeClass(o,e)},300),u.removeClass(t.body,"stop-scrolling"),e.onkeydown=a,e.previousActiveElement&&e.previousActiveElement.focus(),r=n,clearTimeout(o.timeout),!0},s.showInputError=l.showInputError=function(e){var t=d.getModal(),n=t.querySelector(".sa-input-error");u.addClass(n,"show");var o=t.querySelector(".sa-error-container");u.addClass(o,"show"),o.querySelector("p").innerHTML=e,setTimeout(function(){s.enableButtons()},1),t.querySelector("input").focus()},s.resetInputError=l.resetInputError=function(e){if(e&&13===e.keyCode)return!1;var t=d.getModal(),n=t.querySelector(".sa-input-error");u.removeClass(n,"show");var o=t.querySelector(".sa-error-container");u.removeClass(o,"show")},s.disableButtons=l.disableButtons=function(){var e=d.getModal(),t=e.querySelector("button.confirm"),n=e.querySelector("button.cancel");t.disabled=!0,n.disabled=!0},s.enableButtons=l.enableButtons=function(){var e=d.getModal(),t=e.querySelector("button.confirm"),n=e.querySelector("button.cancel");t.disabled=!1,n.disabled=!1},"undefined"!=typeof e?e.sweetAlert=e.swal=s:c.logStr("SweetAlert is a frontend module!")},{"./modules/default-params":2,"./modules/handle-click":3,"./modules/handle-dom":4,"./modules/handle-key":5,"./modules/handle-swal-dom":6,"./modules/set-params":8,"./modules/utils":9}],2:[function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0});var o={title:"",text:"",type:null,allowOutsideClick:!1,showConfirmButton:!0,showCancelButton:!1,closeOnConfirm:!0,closeOnCancel:!0,confirmButtonText:"OK",confirmButtonColor:"#8CD4F5",cancelButtonText:"Cancel",imageUrl:null,imageSize:null,timer:null,customClass:"",html:!1,animation:!0,allowEscapeKey:!0,inputType:"text",inputPlaceholder:"",inputValue:"",showLoaderOnConfirm:!1};n["default"]=o,t.exports=n["default"]},{}],3:[function(t,n,o){Object.defineProperty(o,"__esModule",{value:!0});var a=t("./utils"),r=(t("./handle-swal-dom"),t("./handle-dom")),s=function(t,n,o){function s(e){m&&n.confirmButtonColor&&(p.style.backgroundColor=e)}var u,c,d,f=t||e.event,p=f.target||f.srcElement,m=-1!==p.className.indexOf("confirm"),v=-1!==p.className.indexOf("sweet-overlay"),y=r.hasClass(o,"visible"),h=n.doneFunction&&"true"===o.getAttribute("data-has-done-function");switch(m&&n.confirmButtonColor&&(u=n.confirmButtonColor,c=a.colorLuminance(u,-.04),d=a.colorLuminance(u,-.14)),f.type){case"mouseover":s(c);break;case"mouseout":s(u);break;case"mousedown":s(d);break;case"mouseup":s(c);break;case"focus":var g=o.querySelector("button.confirm"),b=o.querySelector("button.cancel");m?b.style.boxShadow="none":g.style.boxShadow="none";break;case"click":var w=o===p,C=r.isDescendant(o,p);if(!w&&!C&&y&&!n.allowOutsideClick)break;m&&h&&y?l(o,n):h&&y||v?i(o,n):r.isDescendant(o,p)&&"BUTTON"===p.tagName&&sweetAlert.close()}},l=function(e,t){var n=!0;r.hasClass(e,"show-input")&&(n=e.querySelector("input").value,n||(n="")),t.doneFunction(n),t.closeOnConfirm&&sweetAlert.close(),t.showLoaderOnConfirm&&sweetAlert.disableButtons()},i=function(e,t){var n=String(t.doneFunction).replace(/\s/g,""),o="function("===n.substring(0,9)&&")"!==n.substring(9,10);o&&t.doneFunction(!1),t.closeOnCancel&&sweetAlert.close()};o["default"]={handleButton:s,handleConfirm:l,handleCancel:i},n.exports=o["default"]},{"./handle-dom":4,"./handle-swal-dom":6,"./utils":9}],4:[function(n,o,a){Object.defineProperty(a,"__esModule",{value:!0});var r=function(e,t){return new RegExp(" "+t+" ").test(" "+e.className+" ")},s=function(e,t){r(e,t)||(e.className+=" "+t)},l=function(e,t){var n=" "+e.className.replace(/[\t\r\n]/g," ")+" ";if(r(e,t)){for(;n.indexOf(" "+t+" ")>=0;)n=n.replace(" "+t+" "," ");e.className=n.replace(/^\s+|\s+$/g,"")}},i=function(e){var n=t.createElement("div");return n.appendChild(t.createTextNode(e)),n.innerHTML},u=function(e){e.style.opacity="",e.style.display="block"},c=function(e){if(e&&!e.length)return u(e);for(var t=0;t<e.length;++t)u(e[t])},d=function(e){e.style.opacity="",e.style.display="none"},f=function(e){if(e&&!e.length)return d(e);for(var t=0;t<e.length;++t)d(e[t])},p=function(e,t){for(var n=t.parentNode;null!==n;){if(n===e)return!0;n=n.parentNode}return!1},m=function(e){e.style.left="-9999px",e.style.display="block";var t,n=e.clientHeight;return t="undefined"!=typeof getComputedStyle?parseInt(getComputedStyle(e).getPropertyValue("padding-top"),10):parseInt(e.currentStyle.padding),e.style.left="",e.style.display="none","-"+parseInt((n+t)/2)+"px"},v=function(e,t){if(+e.style.opacity<1){t=t||16,e.style.opacity=0,e.style.display="block";var n=+new Date,o=function(e){function t(){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}(function(){e.style.opacity=+e.style.opacity+(new Date-n)/100,n=+new Date,+e.style.opacity<1&&setTimeout(o,t)});o()}e.style.display="block"},y=function(e,t){t=t||16,e.style.opacity=1;var n=+new Date,o=function(e){function t(){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}(function(){e.style.opacity=+e.style.opacity-(new Date-n)/100,n=+new Date,+e.style.opacity>0?setTimeout(o,t):e.style.display="none"});o()},h=function(n){if("function"==typeof MouseEvent){var o=new MouseEvent("click",{view:e,bubbles:!1,cancelable:!0});n.dispatchEvent(o)}else if(t.createEvent){var a=t.createEvent("MouseEvents");a.initEvent("click",!1,!1),n.dispatchEvent(a)}else t.createEventObject?n.fireEvent("onclick"):"function"==typeof n.onclick&&n.onclick()},g=function(t){"function"==typeof t.stopPropagation?(t.stopPropagation(),t.preventDefault()):e.event&&e.event.hasOwnProperty("cancelBubble")&&(e.event.cancelBubble=!0)};a.hasClass=r,a.addClass=s,a.removeClass=l,a.escapeHtml=i,a._show=u,a.show=c,a._hide=d,a.hide=f,a.isDescendant=p,a.getTopMargin=m,a.fadeIn=v,a.fadeOut=y,a.fireClick=h,a.stopEventPropagation=g},{}],5:[function(t,o,a){Object.defineProperty(a,"__esModule",{value:!0});var r=t("./handle-dom"),s=t("./handle-swal-dom"),l=function(t,o,a){var l=t||e.event,i=l.keyCode||l.which,u=a.querySelector("button.confirm"),c=a.querySelector("button.cancel"),d=a.querySelectorAll("button[tabindex]");if(-1!==[9,13,32,27].indexOf(i)){for(var f=l.target||l.srcElement,p=-1,m=0;m<d.length;m++)if(f===d[m]){p=m;break}9===i?(f=-1===p?u:p===d.length-1?d[0]:d[p+1],r.stopEventPropagation(l),f.focus(),o.confirmButtonColor&&s.setFocusStyle(f,o.confirmButtonColor)):13===i?("INPUT"===f.tagName&&(f=u,u.focus()),f=-1===p?u:n):27===i&&o.allowEscapeKey===!0?(f=c,r.fireClick(f,l)):f=n}};a["default"]=l,o.exports=a["default"]},{"./handle-dom":4,"./handle-swal-dom":6}],6:[function(n,o,a){var r=function(e){return e&&e.__esModule?e:{"default":e}};Object.defineProperty(a,"__esModule",{value:!0});var s=n("./utils"),l=n("./handle-dom"),i=n("./default-params"),u=r(i),c=n("./injected-html"),d=r(c),f=".sweet-alert",p=".sweet-overlay",m=function(){var e=t.createElement("div");for(e.innerHTML=d["default"];e.firstChild;)t.body.appendChild(e.firstChild)},v=function(e){function t(){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}(function(){var e=t.querySelector(f);return e||(m(),e=v()),e}),y=function(){var e=v();return e?e.querySelector("input"):void 0},h=function(){return t.querySelector(p)},g=function(e,t){var n=s.hexToRgb(t);e.style.boxShadow="0 0 2px rgba("+n+", 0.8), inset 0 0 0 1px rgba(0, 0, 0, 0.05)"},b=function(n){var o=v();l.fadeIn(h(),10),l.show(o),l.addClass(o,"showSweetAlert"),l.removeClass(o,"hideSweetAlert"),e.previousActiveElement=t.activeElement;var a=o.querySelector("button.confirm");a.focus(),setTimeout(function(){l.addClass(o,"visible")},500);var r=o.getAttribute("data-timer");if("null"!==r&&""!==r){var s=n;o.timeout=setTimeout(function(){var e=(s||null)&&"true"===o.getAttribute("data-has-done-function");e?s(null):sweetAlert.close()},r)}},w=function(){var e=v(),t=y();l.removeClass(e,"show-input"),t.value=u["default"].inputValue,t.setAttribute("type",u["default"].inputType),t.setAttribute("placeholder",u["default"].inputPlaceholder),C()},C=function(e){if(e&&13===e.keyCode)return!1;var t=v(),n=t.querySelector(".sa-input-error");l.removeClass(n,"show");var o=t.querySelector(".sa-error-container");l.removeClass(o,"show")},S=function(){var e=v();e.style.marginTop=l.getTopMargin(v())};a.sweetAlertInitialize=m,a.getModal=v,a.getOverlay=h,a.getInput=y,a.setFocusStyle=g,a.openModal=b,a.resetInput=w,a.resetInputError=C,a.fixVerticalPosition=S},{"./default-params":2,"./handle-dom":4,"./injected-html":7,"./utils":9}],7:[function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0});var o='<div class="sweet-overlay" tabIndex="-1"></div><div class="sweet-alert"><div class="sa-icon sa-error">\n <span class="sa-x-mark">\n <span class="sa-line sa-left"></span>\n <span class="sa-line sa-right"></span>\n </span>\n </div><div class="sa-icon sa-warning">\n <span class="sa-body"></span>\n <span class="sa-dot"></span>\n </div><div class="sa-icon sa-info"></div><div class="sa-icon sa-success">\n <span class="sa-line sa-tip"></span>\n <span class="sa-line sa-long"></span>\n\n <div class="sa-placeholder"></div>\n <div class="sa-fix"></div>\n </div><div class="sa-icon sa-custom"></div><h2>Title</h2>\n <p>Text</p>\n <fieldset>\n <input type="text" tabIndex="3" />\n <div class="sa-input-error"></div>\n </fieldset><div class="sa-error-container">\n <div class="icon">!</div>\n <p>Not valid!</p>\n </div><div class="sa-button-container">\n <button class="cancel" tabIndex="2">Cancel</button>\n <div class="sa-confirm-button-container">\n <button class="confirm" tabIndex="1">OK</button><div class="la-ball-fall">\n <div></div>\n <div></div>\n <div></div>\n </div>\n </div>\n </div></div>';n["default"]=o,t.exports=n["default"]},{}],8:[function(e,t,o){Object.defineProperty(o,"__esModule",{value:!0});var a=e("./utils"),r=e("./handle-swal-dom"),s=e("./handle-dom"),l=["error","warning","info","success","input","prompt"],i=function(e){var t=r.getModal(),o=t.querySelector("h2"),i=t.querySelector("p"),u=t.querySelector("button.cancel"),c=t.querySelector("button.confirm");if(o.innerHTML=e.html?e.title:s.escapeHtml(e.title).split("\n").join("<br>"),i.innerHTML=e.html?e.text:s.escapeHtml(e.text||"").split("\n").join("<br>"),e.text&&s.show(i),e.customClass)s.addClass(t,e.customClass),t.setAttribute("data-custom-class",e.customClass);else{var d=t.getAttribute("data-custom-class");s.removeClass(t,d),t.setAttribute("data-custom-class","")}if(s.hide(t.querySelectorAll(".sa-icon")),e.type&&!a.isIE8()){var f=function(){for(var o=!1,a=0;a<l.length;a++)if(e.type===l[a]){o=!0;break}if(!o)return logStr("Unknown alert type: "+e.type),{v:!1};var i=["success","error","warning","info"],u=n;-1!==i.indexOf(e.type)&&(u=t.querySelector(".sa-icon.sa-"+e.type),s.show(u));var c=r.getInput();switch(e.type){case"success":s.addClass(u,"animate"),s.addClass(u.querySelector(".sa-tip"),"animateSuccessTip"),s.addClass(u.querySelector(".sa-long"),"animateSuccessLong");break;case"error":s.addClass(u,"animateErrorIcon"),s.addClass(u.querySelector(".sa-x-mark"),"animateXMark");break;case"warning":s.addClass(u,"pulseWarning"),s.addClass(u.querySelector(".sa-body"),"pulseWarningIns"),s.addClass(u.querySelector(".sa-dot"),"pulseWarningIns");break;case"input":case"prompt":c.setAttribute("type",e.inputType),c.value=e.inputValue,c.setAttribute("placeholder",e.inputPlaceholder),s.addClass(t,"show-input"),setTimeout(function(){c.focus(),c.addEventListener("keyup",swal.resetInputError)},400)}}();if("object"==typeof f)return f.v}if(e.imageUrl){var p=t.querySelector(".sa-icon.sa-custom");p.style.backgroundImage="url("+e.imageUrl+")",s.show(p);var m=80,v=80;if(e.imageSize){var y=e.imageSize.toString().split("x"),h=y[0],g=y[1];h&&g?(m=h,v=g):logStr("Parameter imageSize expects value with format WIDTHxHEIGHT, got "+e.imageSize)}p.setAttribute("style",p.getAttribute("style")+"width:"+m+"px; height:"+v+"px")}t.setAttribute("data-has-cancel-button",e.showCancelButton),e.showCancelButton?u.style.display="inline-block":s.hide(u),t.setAttribute("data-has-confirm-button",e.showConfirmButton),e.showConfirmButton?c.style.display="inline-block":s.hide(c),e.cancelButtonText&&(u.innerHTML=s.escapeHtml(e.cancelButtonText)),e.confirmButtonText&&(c.innerHTML=s.escapeHtml(e.confirmButtonText)),e.confirmButtonColor&&(c.style.backgroundColor=e.confirmButtonColor,c.style.borderLeftColor=e.confirmLoadingButtonColor,c.style.borderRightColor=e.confirmLoadingButtonColor,r.setFocusStyle(c,e.confirmButtonColor)),t.setAttribute("data-allow-outside-click",e.allowOutsideClick);var b=e.doneFunction?!0:!1;t.setAttribute("data-has-done-function",b),e.animation?"string"==typeof e.animation?t.setAttribute("data-animation",e.animation):t.setAttribute("data-animation","pop"):t.setAttribute("data-animation","none"),t.setAttribute("data-timer",e.timer)};o["default"]=i,t.exports=o["default"]},{"./handle-dom":4,"./handle-swal-dom":6,"./utils":9}],9:[function(t,n,o){Object.defineProperty(o,"__esModule",{value:!0});var a=function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e},r=function(e){var t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return t?parseInt(t[1],16)+", "+parseInt(t[2],16)+", "+parseInt(t[3],16):null},s=function(){return e.attachEvent&&!e.addEventListener},l=function(t){e.console&&e.console.log("SweetAlert: "+t)},i=function(e,t){e=String(e).replace(/[^0-9a-f]/gi,""),e.length<6&&(e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]),t=t||0;var n,o,a="#";for(o=0;3>o;o++)n=parseInt(e.substr(2*o,2),16),n=Math.round(Math.min(Math.max(0,n+n*t),255)).toString(16),a+=("00"+n).substr(n.length);return a};o.extend=a,o.hexToRgb=r,o.isIE8=s,o.logStr=l,o.colorLuminance=i},{}]},{},[1]),"function"==typeof define&&define.amd?define(function(){return sweetAlert}):"undefined"!=typeof module&&module.exports&&(module.exports=sweetAlert)}(window,document);
|
assets/js/upload.js
ADDED
@@ -0,0 +1,145 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
jQuery(function($){
|
2 |
+
/*
|
3 |
+
* Add a "Imagify'em all" in the select list
|
4 |
+
*/
|
5 |
+
var bulk_opt = '<option value="imagify-bulk-upload">' + imagifyUpload.bulkActionsLabels.optimize + '</option>';
|
6 |
+
bulk_opt += '<option value="imagify-bulk-restore">' + imagifyUpload.bulkActionsLabels.restore + '</option>';
|
7 |
+
|
8 |
+
$('.bulkactions select[name="action"]').find('option:last-child').before( bulk_opt );
|
9 |
+
$('.bulkactions select[name="action2"]').find('option:last-child').before( bulk_opt );
|
10 |
+
|
11 |
+
/*
|
12 |
+
* Process optimization for all selected images
|
13 |
+
*/
|
14 |
+
$('#doaction').add('#doaction2')
|
15 |
+
.on('click', function(e) {
|
16 |
+
value = $(this).prev('select').val();
|
17 |
+
value = value.split('-');
|
18 |
+
|
19 |
+
if ( 'imagify' !== value[0] ) {
|
20 |
+
return;
|
21 |
+
}
|
22 |
+
|
23 |
+
e.preventDefault();
|
24 |
+
|
25 |
+
action = value[2];
|
26 |
+
ids = $('input[name^="media"]:checked').map( function(){
|
27 |
+
return this.value;
|
28 |
+
}).get();
|
29 |
+
|
30 |
+
ids.forEach( function( id, index ) {
|
31 |
+
setTimeout(function(){
|
32 |
+
$('#imagify-' + action + '-' + id ).trigger('click');
|
33 |
+
}, index*300);
|
34 |
+
});
|
35 |
+
|
36 |
+
});
|
37 |
+
|
38 |
+
/*
|
39 |
+
* Process to one of these actions: restore, optimize or re-optimize
|
40 |
+
*/
|
41 |
+
$(document).on('click', '.button-imagify-restore, .button-imagify-manual-upload, .button-imagify-manual-override-upload', function(e){
|
42 |
+
e.preventDefault();
|
43 |
+
|
44 |
+
var $obj = $(this);
|
45 |
+
var $parent = $obj.parents('.column-imagify_optimized_file, .compat-field-imagify .field');
|
46 |
+
var href = $obj.attr('href');
|
47 |
+
|
48 |
+
$parent.html('<div class="button"><span class="imagify-spinner"></span>' + $obj.data('waiting-label') + '</div>');
|
49 |
+
|
50 |
+
$.get( href.replace( 'admin-post.php', 'admin-ajax.php' ) )
|
51 |
+
.done( function( response ){
|
52 |
+
$parent.html( response.data );
|
53 |
+
$parent.find('.imagify-datas-more-action a').addClass('is-open').find('.the-text').text( $parent.find('.imagify-datas-more-action a').data('close') );
|
54 |
+
$parent.find('.imagify-datas-details').addClass('is-open');
|
55 |
+
|
56 |
+
draw_me_a_chart( $parent.find('.imagify-chart-container').find('canvas') );
|
57 |
+
} );
|
58 |
+
} );
|
59 |
+
|
60 |
+
/*
|
61 |
+
* Toggle slide in custom column
|
62 |
+
*/
|
63 |
+
$('.imagify-datas-details').hide();
|
64 |
+
|
65 |
+
$(document).on('click', '.imagify-datas-more-action a', function(){
|
66 |
+
if ( $(this).hasClass('is-open') ) {
|
67 |
+
$( $(this).attr('href') ).slideUp('300').removeClass('is-open');
|
68 |
+
$(this).removeClass('is-open').find('.the-text').text( $(this).data('open') );
|
69 |
+
}
|
70 |
+
else {
|
71 |
+
$( $(this).attr('href') ).slideDown('300').addClass('is-open');
|
72 |
+
$(this).addClass('is-open').find('.the-text').text( $(this).data('close') );
|
73 |
+
}
|
74 |
+
return false;
|
75 |
+
});
|
76 |
+
|
77 |
+
|
78 |
+
// Some usefull functions to help us with media modal
|
79 |
+
|
80 |
+
var get_var = function (param) {
|
81 |
+
var vars = {};
|
82 |
+
window.location.href.replace(
|
83 |
+
/[?&]+([^=&]+)=?([^&]*)?/gi, // regexp
|
84 |
+
function( m, key, value ) { // callback
|
85 |
+
vars[key] = value !== undefined ? value : '';
|
86 |
+
}
|
87 |
+
);
|
88 |
+
|
89 |
+
if ( param ) {
|
90 |
+
return vars[param] ? vars[param] : null;
|
91 |
+
}
|
92 |
+
return vars;
|
93 |
+
},
|
94 |
+
check_modal = function() {
|
95 |
+
var tempTimer = setInterval( function(){
|
96 |
+
if ( $('.media-modal').find('.imagify-datas-details').length ) {
|
97 |
+
$('.media-modal').find('.imagify-datas-details').hide();
|
98 |
+
draw_me_a_chart( $('.media-modal').find('#imagify-consumption-chart') );
|
99 |
+
clearInterval(tempTimer);
|
100 |
+
tempTimer = null;
|
101 |
+
}
|
102 |
+
}, 20 );
|
103 |
+
};
|
104 |
+
|
105 |
+
// Intercept the right moment if media details is clicked (mode grid)
|
106 |
+
// Bear Feint
|
107 |
+
|
108 |
+
$('.upload-php').find('.media-frame.mode-grid').on('click', '.attachment', function(){
|
109 |
+
check_modal();
|
110 |
+
});
|
111 |
+
|
112 |
+
// On page load in upload.php check if item param exists
|
113 |
+
if ( $('.upload-php').length > 0 && get_var('item') ) {
|
114 |
+
check_modal();
|
115 |
+
}
|
116 |
+
|
117 |
+
/*
|
118 |
+
* Mini chart
|
119 |
+
*
|
120 |
+
* @param {element} canvas
|
121 |
+
*/
|
122 |
+
function draw_me_a_chart( canvas ) {
|
123 |
+
canvas.each(function(){
|
124 |
+
|
125 |
+
var the_value = parseInt( $(this).closest('.imagify-chart').next('.imagify-chart-value').text() ),
|
126 |
+
overviewData = [
|
127 |
+
{
|
128 |
+
value: the_value,
|
129 |
+
color: '#00B3D3'
|
130 |
+
},
|
131 |
+
{
|
132 |
+
value: 100 - the_value,
|
133 |
+
color: '#D8D8D8'
|
134 |
+
}
|
135 |
+
],
|
136 |
+
overviewDoughnut = new Chart( $(this)[0].getContext('2d')).Doughnut(overviewData, {
|
137 |
+
segmentStrokeColor : '#FFF',
|
138 |
+
segmentStrokeWidth : 1,
|
139 |
+
animateRotate : true,
|
140 |
+
tooltipEvents : []
|
141 |
+
});
|
142 |
+
});
|
143 |
+
}
|
144 |
+
draw_me_a_chart( $('.imagify-chart-container').find('canvas') );
|
145 |
+
});
|
assets/js/upload.min.js
ADDED
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
jQuery(function(a){function e(c){c.each(function(){var b=parseInt(a(this).closest(".imagify-chart").next(".imagify-chart-value").text()),b=[{value:b,color:"#00B3D3"},{value:100-b,color:"#D8D8D8"}];(new Chart(a(this)[0].getContext("2d"))).Doughnut(b,{segmentStrokeColor:"#FFF",segmentStrokeWidth:1,animateRotate:!0,tooltipEvents:[]})})}var d='<option value="imagify-bulk-upload">'+imagifyUpload.bulkActionsLabels.optimize+"</option>",d=d+('<option value="imagify-bulk-restore">'+imagifyUpload.bulkActionsLabels.restore+
|
2 |
+
"</option>");a('.bulkactions select[name="action"]').find("option:last-child").before(d);a('.bulkactions select[name="action2"]').find("option:last-child").before(d);a("#doaction").add("#doaction2").on("click",function(c){value=a(this).prev("select").val();value=value.split("-");"imagify"===value[0]&&(c.preventDefault(),action=value[2],ids=a('input[name^="media"]:checked').map(function(){return this.value}).get(),ids.forEach(function(b,c){setTimeout(function(){a("#imagify-"+action+"-"+b).trigger("click")},
|
3 |
+
300*c)}))});a(document).on("click",".button-imagify-restore, .button-imagify-manual-upload, .button-imagify-manual-override-upload",function(c){c.preventDefault();c=a(this);var b=c.parents(".column-imagify_optimized_file, .compat-field-imagify .field"),d=c.attr("href");b.html('<div class="button"><span class="imagify-spinner"></span>'+c.data("waiting-label")+"</div>");a.get(d.replace("admin-post.php","admin-ajax.php")).done(function(a){b.html(a.data);b.find(".imagify-datas-more-action a").addClass("is-open").find(".the-text").text(b.find(".imagify-datas-more-action a").data("close"));
|
4 |
+
b.find(".imagify-datas-details").addClass("is-open");e(b.find(".imagify-chart-container").find("canvas"))})});a(".imagify-datas-details").hide();a(document).on("click",".imagify-datas-more-action a",function(){a(this).hasClass("is-open")?(a(a(this).attr("href")).slideUp("300").removeClass("is-open"),a(this).removeClass("is-open").find(".the-text").text(a(this).data("open"))):(a(a(this).attr("href")).slideDown("300").addClass("is-open"),a(this).addClass("is-open").find(".the-text").text(a(this).data("close")));
|
5 |
+
return!1});var d=function(a){var b={};window.location.href.replace(/[?&]+([^=&]+)=?([^&]*)?/gi,function(a,c,d){b[c]=void 0!==d?d:""});return a?b[a]?b[a]:null:b},f=function(){var c=setInterval(function(){a(".media-modal").find(".imagify-datas-details").length&&(a(".media-modal").find(".imagify-datas-details").hide(),e(a(".media-modal").find("#imagify-consumption-chart")),clearInterval(c),c=null)},20)};a(".upload-php").find(".media-frame.mode-grid").on("click",".attachment",function(){f()});0<a(".upload-php").length&&
|
6 |
+
d("item")&&f();e(a(".imagify-chart-container").find("canvas"))});
|
contributors.txt
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
This file contains a list of people who have made large contributions
|
2 |
+
to the public version of Imagify.
|
3 |
+
|
4 |
+
Developers:
|
5 |
+
Jonathan Buttigieg <jonathan@imagify.io>
|
6 |
+
Geoffrey Crofte <geoffrey@wp-media.me>
|
7 |
+
Sébastien Decamme <sebastien@wp-media.me>
|
8 |
+
Julio Potier <julio@wp-media.me>
|
9 |
+
Caspar Huebinger <caspar@wp-rocket.me>
|
imagify.php
ADDED
@@ -0,0 +1,97 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
Plugin Name: Imagify
|
4 |
+
Plugin URI: https://wordpress.org/plugins/imagify/
|
5 |
+
Description: Dramaticaly reduce image file sizes without loosing quality, make your website load faster, boost your SEO and save money on your bandwith using Imagify, the new most advanced image optimization tool.
|
6 |
+
Version: 1.3.3
|
7 |
+
Author: WP Media
|
8 |
+
Author URI: http://wp-media.me
|
9 |
+
Licence: GPLv2
|
10 |
+
|
11 |
+
Text Domain: imagify
|
12 |
+
Domain Path: languages
|
13 |
+
|
14 |
+
Copyright 2015 WP Media
|
15 |
+
*/
|
16 |
+
|
17 |
+
defined( 'ABSPATH' ) or die( 'Cheatin\' uh?' );
|
18 |
+
|
19 |
+
// Imagify defines
|
20 |
+
define( 'IMAGIFY_VERSION' , '1.3.3' );
|
21 |
+
define( 'IMAGIFY_SLUG' , 'imagify' );
|
22 |
+
define( 'IMAGIFY_SETTINGS_SLUG' , IMAGIFY_SLUG . '_settings' );
|
23 |
+
define( 'IMAGIFY_WEB_MAIN' , 'https://imagify.io' );
|
24 |
+
define( 'IMAGIFY_APP_MAIN' , 'https://app.imagify.io' );
|
25 |
+
define( 'IMAGIFY_FILE' , __FILE__ );
|
26 |
+
define( 'IMAGIFY_PATH' , realpath( plugin_dir_path( IMAGIFY_FILE ) ) . '/' );
|
27 |
+
define( 'IMAGIFY_INC_PATH' , realpath( IMAGIFY_PATH . 'inc/' ) . '/' );
|
28 |
+
define( 'IMAGIFY_API_PATH' , realpath( IMAGIFY_INC_PATH . 'api/' ) . '/' );
|
29 |
+
define( 'IMAGIFY_ADMIN_PATH' , realpath( IMAGIFY_INC_PATH . 'admin' ) . '/' );
|
30 |
+
define( 'IMAGIFY_ADMIN_UI_PATH' , realpath( IMAGIFY_ADMIN_PATH . 'ui' ) . '/' );
|
31 |
+
define( 'IMAGIFY_COMMON_PATH' , realpath( IMAGIFY_INC_PATH . 'common' ) . '/' );
|
32 |
+
define( 'IMAGIFY_FUNCTIONS_PATH' , realpath( IMAGIFY_INC_PATH . 'functions' ) . '/' );
|
33 |
+
define( 'IMAGIFY_CLASSES_PATH' , realpath( IMAGIFY_INC_PATH . 'classes' ) . '/' );
|
34 |
+
define( 'IMAGIFY_3RD_PARTY_PATH' , realpath( IMAGIFY_INC_PATH . '3rd-party' ) . '/' );
|
35 |
+
define( 'IMAGIFY_URL' , plugin_dir_url( IMAGIFY_FILE ) );
|
36 |
+
define( 'IMAGIFY_INC_URL' , IMAGIFY_URL . 'inc/' );
|
37 |
+
define( 'IMAGIFY_ADMIN_URL' , IMAGIFY_INC_URL . 'admin/' );
|
38 |
+
define( 'IMAGIFY_ASSETS_URL' , IMAGIFY_URL . 'assets/' );
|
39 |
+
define( 'IMAGIFY_ASSETS_JS_URL' , IMAGIFY_ASSETS_URL . 'js/' );
|
40 |
+
define( 'IMAGIFY_ASSETS_CSS_URL' , IMAGIFY_ASSETS_URL . 'css/' );
|
41 |
+
define( 'IMAGIFY_ASSETS_IMG_URL' , IMAGIFY_ASSETS_URL . 'images/' );
|
42 |
+
define( 'IMAGIFY_MAX_BYTES' , 5242880 );
|
43 |
+
|
44 |
+
/*
|
45 |
+
* Tell WP what to do when plugin is loaded
|
46 |
+
*
|
47 |
+
* @since 1.0
|
48 |
+
*/
|
49 |
+
add_action( 'plugins_loaded', '_imagify_init' );
|
50 |
+
function _imagify_init() {
|
51 |
+
// Load translations
|
52 |
+
load_plugin_textdomain( 'imagify', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' );
|
53 |
+
|
54 |
+
// Nothing to do if autosave
|
55 |
+
if ( defined( 'DOING_AUTOSAVE' ) ) {
|
56 |
+
return;
|
57 |
+
}
|
58 |
+
|
59 |
+
require( IMAGIFY_INC_PATH . 'compat.php' );
|
60 |
+
require( IMAGIFY_FUNCTIONS_PATH . 'options.php' );
|
61 |
+
require( IMAGIFY_API_PATH . 'imagify.php' );
|
62 |
+
require( IMAGIFY_FUNCTIONS_PATH . 'formatting.php' );
|
63 |
+
require( IMAGIFY_FUNCTIONS_PATH . 'files.php' );
|
64 |
+
require( IMAGIFY_FUNCTIONS_PATH . 'admin.php' );
|
65 |
+
require( IMAGIFY_FUNCTIONS_PATH . 'api.php' );
|
66 |
+
require( IMAGIFY_FUNCTIONS_PATH . 'attachments.php' );
|
67 |
+
require( IMAGIFY_FUNCTIONS_PATH . 'process.php' );
|
68 |
+
require( IMAGIFY_CLASSES_PATH . 'class-user.php' );
|
69 |
+
require( IMAGIFY_CLASSES_PATH . 'class-attachment.php' );
|
70 |
+
require( IMAGIFY_FUNCTIONS_PATH . 'admin-ui.php' );
|
71 |
+
require( IMAGIFY_FUNCTIONS_PATH . 'admin-stats.php' );
|
72 |
+
require( IMAGIFY_COMMON_PATH . 'attachments.php' );
|
73 |
+
require( IMAGIFY_COMMON_PATH . 'admin-bar.php' );
|
74 |
+
require( IMAGIFY_3RD_PARTY_PATH . '3rd-party.php' );
|
75 |
+
|
76 |
+
if ( is_admin() ) {
|
77 |
+
require( IMAGIFY_ADMIN_PATH . 'upgrader.php' );
|
78 |
+
require( IMAGIFY_ADMIN_PATH . 'ajax.php' );
|
79 |
+
require( IMAGIFY_ADMIN_PATH . 'options.php' );
|
80 |
+
require( IMAGIFY_ADMIN_PATH . 'menu.php' );
|
81 |
+
require( IMAGIFY_ADMIN_PATH . 'plugins.php' );
|
82 |
+
require( IMAGIFY_ADMIN_PATH . 'upload.php' );
|
83 |
+
require( IMAGIFY_ADMIN_PATH . 'media.php' );
|
84 |
+
require( IMAGIFY_ADMIN_PATH . 'enqueue.php' );
|
85 |
+
require( IMAGIFY_ADMIN_PATH . 'meta-boxes.php' );
|
86 |
+
require( IMAGIFY_ADMIN_UI_PATH . 'options.php' );
|
87 |
+
require( IMAGIFY_ADMIN_UI_PATH . 'bulk.php' );
|
88 |
+
require( IMAGIFY_ADMIN_UI_PATH . 'notices.php' );
|
89 |
+
}
|
90 |
+
|
91 |
+
/**
|
92 |
+
* Fires when Imagify is correctly loaded
|
93 |
+
*
|
94 |
+
* @since 1.0
|
95 |
+
*/
|
96 |
+
do_action( 'imagify_loaded' );
|
97 |
+
}
|
inc/3rd-party/3rd-party.php
ADDED
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
defined( 'ABSPATH' ) or die( 'Cheatin\' uh?' );
|
3 |
+
|
4 |
+
require( IMAGIFY_3RD_PARTY_PATH . 'wp-retina-2x.php' );
|
inc/3rd-party/wp-retina-2x.php
ADDED
@@ -0,0 +1,54 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
defined( 'ABSPATH' ) or die( 'Cheatin\' uh?' );
|
3 |
+
|
4 |
+
if ( function_exists( 'wr2x_delete_attachment' ) && function_exists( 'wr2x_generate_images' ) ) :
|
5 |
+
|
6 |
+
/**
|
7 |
+
* Process to restore all retina versions for an attachment
|
8 |
+
*
|
9 |
+
* @since 1.0
|
10 |
+
*/
|
11 |
+
add_action( 'before_imagify_restore_attachment', '_imagify_wr2x_delete_attachment_on_restore' );
|
12 |
+
function _imagify_wr2x_delete_attachment_on_restore( $attachment_id ) {
|
13 |
+
// Remove all retina versions if exists
|
14 |
+
wr2x_delete_attachment( $attachment_id );
|
15 |
+
}
|
16 |
+
|
17 |
+
add_action( 'after_imagify_restore_attachment', '_imagify_wr2x_generate_images_on_restore' );
|
18 |
+
function _imagify_wr2x_generate_images_on_restore( $attachment_id ) {
|
19 |
+
// Regenerate all retina versions
|
20 |
+
$metadata = wp_get_attachment_metadata( $attachment_id );
|
21 |
+
wr2x_generate_images( $metadata );
|
22 |
+
}
|
23 |
+
|
24 |
+
endif;
|
25 |
+
|
26 |
+
if ( function_exists( 'wr2x_get_retina' ) ) :
|
27 |
+
|
28 |
+
/**
|
29 |
+
* Process to generate the retina version of a thumbnail
|
30 |
+
*
|
31 |
+
* @since 1.0
|
32 |
+
*/
|
33 |
+
add_filter( 'imagify_fill_thumbnail_data', '_imagify_optimize_wr2x', 10, 7 );
|
34 |
+
function _imagify_optimize_wr2x( $data, $response, $id, $path, $url, $size_key, $optimization_level ) {
|
35 |
+
/**
|
36 |
+
* Allow to optimize the retina version generated by WP Retina x2
|
37 |
+
*
|
38 |
+
* @since 1.0
|
39 |
+
*
|
40 |
+
* @param bool true will force the optimization
|
41 |
+
*/
|
42 |
+
$do_retina = apply_filters( 'do_imagify_optimize_retina', true );
|
43 |
+
|
44 |
+
$retina_path = wr2x_get_retina( $path );
|
45 |
+
|
46 |
+
if ( ! empty( $retina_path ) && $do_retina ) {
|
47 |
+
$response = do_imagify( $retina_path, false, $optimization_level );
|
48 |
+
$data = Imagify_Attachment::fill_data( $data, $response, $id, $url, $size_key . '@2x' );
|
49 |
+
}
|
50 |
+
|
51 |
+
return $data;
|
52 |
+
}
|
53 |
+
|
54 |
+
endif;
|
inc/admin/ajax.php
ADDED
@@ -0,0 +1,466 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
defined( 'ABSPATH' ) or die( 'Cheatin\' uh?' );
|
3 |
+
|
4 |
+
/**
|
5 |
+
* Process all thumbnails of a specific image with Imagify with the manual method.
|
6 |
+
*
|
7 |
+
* @since 1.0
|
8 |
+
*/
|
9 |
+
add_action( 'wp_ajax_imagify_manual_upload' , '_do_admin_post_imagify_manual_upload' );
|
10 |
+
add_action( 'admin_post_imagify_manual_upload' , '_do_admin_post_imagify_manual_upload' );
|
11 |
+
function _do_admin_post_imagify_manual_upload() {
|
12 |
+
if ( defined( 'DOING_AJAX' ) ) {
|
13 |
+
check_ajax_referer( 'imagify-manual-upload' );
|
14 |
+
} else {
|
15 |
+
check_admin_referer( 'imagify-manual-upload' );
|
16 |
+
}
|
17 |
+
|
18 |
+
if ( ! isset( $_GET['attachment_id'] ) || ! current_user_can( 'upload_files' ) ) {
|
19 |
+
if ( defined( 'DOING_AJAX' ) ) {
|
20 |
+
wp_send_json_error();
|
21 |
+
} else {
|
22 |
+
wp_nonce_ays( '' );
|
23 |
+
}
|
24 |
+
}
|
25 |
+
|
26 |
+
$attachment = new Imagify_Attachment( $_GET['attachment_id'] );
|
27 |
+
|
28 |
+
// Optimize it!!!!!
|
29 |
+
$attachment->optimize();
|
30 |
+
|
31 |
+
if ( ! defined( 'DOING_AJAX' ) ) {
|
32 |
+
wp_safe_redirect( wp_get_referer() );
|
33 |
+
die();
|
34 |
+
}
|
35 |
+
|
36 |
+
// Return the optimization statistics
|
37 |
+
$output = get_imagify_attachment_optimization_text( $attachment->id );
|
38 |
+
wp_send_json_success( $output );
|
39 |
+
}
|
40 |
+
|
41 |
+
/**
|
42 |
+
* Process a manual upload by overriding the optimization level.
|
43 |
+
*
|
44 |
+
* @since 1.0
|
45 |
+
*/
|
46 |
+
add_action( 'wp_ajax_imagify_manual_override_upload', '_do_admin_post_imagify_manual_override_upload' );
|
47 |
+
add_action( 'admin_post_imagify_manual_override_upload', '_do_admin_post_imagify_manual_override_upload' );
|
48 |
+
function _do_admin_post_imagify_manual_override_upload() {
|
49 |
+
if ( defined( 'DOING_AJAX' ) ) {
|
50 |
+
check_ajax_referer( 'imagify-manual-override-upload' );
|
51 |
+
} else {
|
52 |
+
check_admin_referer( 'imagify-manual-override-upload' );
|
53 |
+
}
|
54 |
+
|
55 |
+
if ( ! isset( $_GET['attachment_id'] ) || ! current_user_can( 'upload_files' ) ) {
|
56 |
+
if ( defined( 'DOING_AJAX' ) ) {
|
57 |
+
wp_send_json_error();
|
58 |
+
} else {
|
59 |
+
wp_nonce_ays( '' );
|
60 |
+
}
|
61 |
+
}
|
62 |
+
|
63 |
+
$attachment = new Imagify_Attachment( $_GET['attachment_id'] );
|
64 |
+
|
65 |
+
// Restore the backup file
|
66 |
+
$attachment->restore();
|
67 |
+
|
68 |
+
// Optimize it!!!!!
|
69 |
+
$attachment->optimize( (int) $_GET['optimization_level'] );
|
70 |
+
|
71 |
+
if ( ! defined( 'DOING_AJAX' ) ) {
|
72 |
+
wp_safe_redirect( wp_get_referer() );
|
73 |
+
die();
|
74 |
+
}
|
75 |
+
|
76 |
+
// Return the optimization statistics
|
77 |
+
$output = get_imagify_attachment_optimization_text( $attachment->id );
|
78 |
+
wp_send_json_success( $output );
|
79 |
+
}
|
80 |
+
|
81 |
+
/**
|
82 |
+
* Process a restoration to the original attachment.
|
83 |
+
*
|
84 |
+
* @since 1.0
|
85 |
+
*/
|
86 |
+
add_action( 'wp_ajax_imagify_restore_upload', '_do_admin_post_imagify_restore_upload' );
|
87 |
+
add_action( 'admin_post_imagify_restore_upload', '_do_admin_post_imagify_restore_upload' );
|
88 |
+
function _do_admin_post_imagify_restore_upload() {
|
89 |
+
if ( defined( 'DOING_AJAX' ) ) {
|
90 |
+
check_ajax_referer( 'imagify-restore-upload' );
|
91 |
+
} else {
|
92 |
+
check_admin_referer( 'imagify-restore-upload' );
|
93 |
+
}
|
94 |
+
|
95 |
+
if ( ! isset( $_GET['attachment_id'] ) || ! current_user_can( 'upload_files' ) ) {
|
96 |
+
if ( defined( 'DOING_AJAX' ) ) {
|
97 |
+
wp_send_json_error();
|
98 |
+
} else {
|
99 |
+
wp_nonce_ays( '' );
|
100 |
+
}
|
101 |
+
}
|
102 |
+
|
103 |
+
$attachment = new Imagify_Attachment( $_GET['attachment_id'] );
|
104 |
+
|
105 |
+
// Restore the backup file
|
106 |
+
$attachment->restore();
|
107 |
+
|
108 |
+
if ( ! defined( 'DOING_AJAX' ) ) {
|
109 |
+
wp_safe_redirect( wp_get_referer() );
|
110 |
+
die();
|
111 |
+
}
|
112 |
+
|
113 |
+
// Return the optimization button
|
114 |
+
$output = '<a id="imagify-upload-' . $attachment->id . '" href="' . get_imagify_admin_url( 'manual-upload', $attachment->id ) . '" class="button-primary button-imagify-manual-upload" data-waiting-label="' . esc_attr__( 'Optimizing...', 'imagify' ) . '">' . __( 'Optimize', 'imagify' ) . '</a>';
|
115 |
+
wp_send_json_success( $output );
|
116 |
+
}
|
117 |
+
|
118 |
+
/**
|
119 |
+
* Get all unoptimized attachment ids.
|
120 |
+
*
|
121 |
+
* @since 1.0
|
122 |
+
*/
|
123 |
+
add_action( 'wp_ajax_imagify_get_unoptimized_attachment_ids', '_do_wp_ajax_imagify_get_unoptimized_attachment_ids' );
|
124 |
+
function _do_wp_ajax_imagify_get_unoptimized_attachment_ids() {
|
125 |
+
check_ajax_referer( 'imagify-bulk-upload', 'imagifybulkuploadnonce' );
|
126 |
+
|
127 |
+
if ( ! current_user_can( 'upload_files' ) ) {
|
128 |
+
wp_send_json_error();
|
129 |
+
}
|
130 |
+
|
131 |
+
$user = new Imagify_User();
|
132 |
+
|
133 |
+
if ( $user->is_over_quota() ) {
|
134 |
+
wp_send_json_error( array( 'message' => 'over-quota' ) );
|
135 |
+
}
|
136 |
+
|
137 |
+
set_time_limit( 0 );
|
138 |
+
|
139 |
+
$optimization_level = $_GET['optimization_level'];
|
140 |
+
$optimization_level = ( -1 != $optimization_level ) ? $optimization_level : get_imagify_option( 'optimization_level', 1 );
|
141 |
+
$optimization_level = (int) $optimization_level;
|
142 |
+
|
143 |
+
$meta_query = array(
|
144 |
+
'relation' => 'OR',
|
145 |
+
array(
|
146 |
+
'key' => '_imagify_optimization_level',
|
147 |
+
'value' => $optimization_level,
|
148 |
+
'compare' => '!='
|
149 |
+
),
|
150 |
+
array(
|
151 |
+
'key' => '_imagify_optimization_level',
|
152 |
+
'compare' => 'NOT EXISTS'
|
153 |
+
)
|
154 |
+
);
|
155 |
+
|
156 |
+
$args = array(
|
157 |
+
'fields' => 'ids',
|
158 |
+
'post_type' => 'attachment',
|
159 |
+
'post_status' => 'any',
|
160 |
+
'post_mime_type' => get_imagify_mime_type(),
|
161 |
+
'meta_query' => $meta_query,
|
162 |
+
'posts_per_page' => -1,
|
163 |
+
'no_found_rows' => true,
|
164 |
+
'update_post_term_cache' => false,
|
165 |
+
);
|
166 |
+
|
167 |
+
$data = array();
|
168 |
+
$query = new WP_Query( $args );
|
169 |
+
$ids = $query->posts;
|
170 |
+
|
171 |
+
// Save the optimization level in a transient to retrieve it later during the process
|
172 |
+
set_transient( 'imagify_bulk_optimization_level', $optimization_level );
|
173 |
+
|
174 |
+
foreach( $ids as $id ) {
|
175 |
+
/** This filter is documented in inc/functions/process.php */
|
176 |
+
$file_path = apply_filters( 'imagify_file_path', get_attached_file( $id ) );
|
177 |
+
|
178 |
+
if ( file_exists( $file_path ) ) {
|
179 |
+
$attachment = new Imagify_Attachment( $id );
|
180 |
+
$attachment_error = $attachment->get_optimized_error();
|
181 |
+
$attachment_error = trim( $attachment_error );
|
182 |
+
$attachment_status = $attachment->get_status();
|
183 |
+
|
184 |
+
// Don't try to re-optimize if the optimization level is still the same
|
185 |
+
if ( $optimization_level === $attachment->get_optimization_level() && ! $attachment->has_error() ) {
|
186 |
+
continue;
|
187 |
+
}
|
188 |
+
|
189 |
+
// Don't try to re-optimize if there is no backup file
|
190 |
+
if ( $optimization_level !== $attachment->get_optimization_level() && ! $attachment->has_backup() && $attachment->is_optimized() ) {
|
191 |
+
continue;
|
192 |
+
}
|
193 |
+
|
194 |
+
// Don't try to re-optimize images already compressed
|
195 |
+
if ( $attachment->get_optimization_level() >= $optimization_level && $attachment_status == 'already_optimized' ) {
|
196 |
+
continue;
|
197 |
+
}
|
198 |
+
|
199 |
+
// Don't try to re-optimize images with an empty error message
|
200 |
+
if ( $attachment_status == 'error' && empty( $attachment_error ) ) {
|
201 |
+
continue;
|
202 |
+
}
|
203 |
+
|
204 |
+
$data[ '_' . $id ] = wp_get_attachment_url( $id );
|
205 |
+
}
|
206 |
+
}
|
207 |
+
|
208 |
+
if ( (bool) $data ) {
|
209 |
+
wp_send_json_success( $data );
|
210 |
+
}
|
211 |
+
|
212 |
+
wp_send_json_error( array( 'message' => 'no-images' ) );
|
213 |
+
}
|
214 |
+
|
215 |
+
/**
|
216 |
+
* Process all thumbnails of a specific image with Imagify with the bulk method.
|
217 |
+
*
|
218 |
+
* @since 1.0
|
219 |
+
*/
|
220 |
+
add_action( 'wp_ajax_imagify_bulk_upload', '_do_wp_ajax_imagify_bulk_upload' );
|
221 |
+
function _do_wp_ajax_imagify_bulk_upload() {
|
222 |
+
check_ajax_referer( 'imagify-bulk-upload', 'imagifybulkuploadnonce' );
|
223 |
+
|
224 |
+
if ( ! isset( $_POST['image'] ) || ! current_user_can( 'upload_files' ) ) {
|
225 |
+
wp_send_json_error();
|
226 |
+
}
|
227 |
+
|
228 |
+
$attachment_id = (int) $_POST['image'];
|
229 |
+
$attachment = new Imagify_Attachment( $_POST['image'] );
|
230 |
+
$optimization_level = get_transient( 'imagify_bulk_optimization_level' );
|
231 |
+
|
232 |
+
// Restore it if the optimization level is updated
|
233 |
+
if ( $optimization_level !== $attachment->get_optimization_level() ) {
|
234 |
+
$attachment->restore();
|
235 |
+
}
|
236 |
+
|
237 |
+
// Optimize it!!!!!
|
238 |
+
$attachment->optimize( $optimization_level );
|
239 |
+
|
240 |
+
// Return the optimization statistics
|
241 |
+
$fullsize_data = $attachment->get_size_data();
|
242 |
+
$stats_data = $attachment->get_stats_data();
|
243 |
+
$saving_data = imagify_count_saving_data();
|
244 |
+
$user = new Imagify_User();
|
245 |
+
$data = array(
|
246 |
+
'global_already_optimized_attachments' => $saving_data['count'],
|
247 |
+
'global_optimized_attachments' => imagify_count_optimized_attachments(),
|
248 |
+
'global_unoptimized_attachments' => imagify_count_unoptimized_attachments(),
|
249 |
+
'global_errors_attachments' => imagify_count_error_attachments(),
|
250 |
+
'global_optimized_attachments_percent' => imagify_percent_optimized_attachments(),
|
251 |
+
'global_optimized_percent' => $saving_data['percent'],
|
252 |
+
'global_original_human' => size_format( $saving_data['original_size'], 1 ),
|
253 |
+
'global_optimized_human' => size_format( $saving_data['optimized_size'], 1 ),
|
254 |
+
'global_unconsumed_quota' => $user->get_percent_unconsumed_quota(),
|
255 |
+
);
|
256 |
+
|
257 |
+
if ( ! $attachment->is_optimized() ) {
|
258 |
+
$data['success'] = false;
|
259 |
+
$data['error'] = $fullsize_data['error'];
|
260 |
+
|
261 |
+
wp_send_json_error( $data );
|
262 |
+
}
|
263 |
+
|
264 |
+
$data['success'] = true;
|
265 |
+
$data['original_size'] = $fullsize_data['original_size'];
|
266 |
+
$data['new_size'] = $fullsize_data['optimized_size'];
|
267 |
+
$data['percent'] = $fullsize_data['percent'];
|
268 |
+
$data['overall_saving'] = $stats_data['original_size'] - $stats_data['optimized_size'];
|
269 |
+
$data['original_overall_size'] = $stats_data['original_size'];
|
270 |
+
$data['new_overall_size'] = $stats_data['optimized_size'];
|
271 |
+
$data['thumbnails'] = $attachment->get_optimized_sizes_count();
|
272 |
+
|
273 |
+
wp_send_json_success( $data );
|
274 |
+
}
|
275 |
+
|
276 |
+
/**
|
277 |
+
* Create a new Imagify account.
|
278 |
+
*
|
279 |
+
* @since 1.0
|
280 |
+
*/
|
281 |
+
add_action( 'wp_ajax_imagify_signup', '_do_wp_ajax_imagify_signup' );
|
282 |
+
function _do_wp_ajax_imagify_signup() {
|
283 |
+
check_ajax_referer( 'imagify-signup', 'imagifysignupnonce' );
|
284 |
+
|
285 |
+
if ( ! isset( $_GET['email'] ) ) {
|
286 |
+
wp_send_json_error();
|
287 |
+
}
|
288 |
+
|
289 |
+
$data = array(
|
290 |
+
'email' => $_GET['email'],
|
291 |
+
'password' => wp_generate_password( 12, false ),
|
292 |
+
'lang' => get_locale()
|
293 |
+
);
|
294 |
+
|
295 |
+
$response = add_imagify_user( $data );
|
296 |
+
|
297 |
+
if ( is_wp_error( $response ) ) {
|
298 |
+
wp_send_json_error( $response->get_error_message() );
|
299 |
+
}
|
300 |
+
|
301 |
+
wp_send_json_success();
|
302 |
+
}
|
303 |
+
|
304 |
+
/**
|
305 |
+
* Process an API key check validity.
|
306 |
+
*
|
307 |
+
* @since 1.0
|
308 |
+
*/
|
309 |
+
add_action( 'wp_ajax_imagify_check_api_key_validity', '_do_wp_ajax_imagify_check_api_key_validity' );
|
310 |
+
function _do_wp_ajax_imagify_check_api_key_validity() {
|
311 |
+
check_ajax_referer( 'imagify-check-api-key', 'imagifycheckapikeynonce' );
|
312 |
+
|
313 |
+
if ( ! isset( $_GET['api_key'] ) ) {
|
314 |
+
wp_send_json_error();
|
315 |
+
}
|
316 |
+
|
317 |
+
$response = get_imagify_status( $_GET['api_key'] );
|
318 |
+
|
319 |
+
if ( is_wp_error( $response ) ) {
|
320 |
+
wp_send_json_error( $response->get_error_message() );
|
321 |
+
}
|
322 |
+
|
323 |
+
$options = get_site_option( IMAGIFY_SETTINGS_SLUG );
|
324 |
+
$options['api_key'] = sanitize_key( $_GET['api_key'] );
|
325 |
+
|
326 |
+
update_site_option( IMAGIFY_SETTINGS_SLUG, $options );
|
327 |
+
|
328 |
+
wp_send_json_success();
|
329 |
+
}
|
330 |
+
|
331 |
+
/**
|
332 |
+
* Process a dismissed notice.
|
333 |
+
*
|
334 |
+
* @since 1.0
|
335 |
+
*/
|
336 |
+
add_action( 'wp_ajax_imagify_dismiss_notice', '_do_admin_post_imagify_dismiss_notice' );
|
337 |
+
add_action( 'admin_post_imagify_dismiss_notice', '_do_admin_post_imagify_dismiss_notice' );
|
338 |
+
function _do_admin_post_imagify_dismiss_notice() {
|
339 |
+
if ( defined( 'DOING_AJAX' ) ) {
|
340 |
+
check_ajax_referer( 'imagify-dismiss-notice' );
|
341 |
+
} else {
|
342 |
+
check_admin_referer( 'imagify-dismiss-notice' );
|
343 |
+
}
|
344 |
+
|
345 |
+
if ( ! isset( $_GET['notice'] ) || ! current_user_can( 'manage_options' ) ) {
|
346 |
+
if ( defined( 'DOING_AJAX' ) ) {
|
347 |
+
wp_send_json_error();
|
348 |
+
} else {
|
349 |
+
wp_nonce_ays( '' );
|
350 |
+
}
|
351 |
+
}
|
352 |
+
|
353 |
+
imagify_dismiss_notice( $_GET['notice'] );
|
354 |
+
|
355 |
+
if ( ! defined( 'DOING_AJAX' ) ) {
|
356 |
+
wp_safe_redirect( wp_get_referer() );
|
357 |
+
die();
|
358 |
+
}
|
359 |
+
|
360 |
+
wp_send_json_success();
|
361 |
+
}
|
362 |
+
|
363 |
+
/**
|
364 |
+
* Disable a plugin which can be in conflict with Imagify
|
365 |
+
*
|
366 |
+
* @since 1.2
|
367 |
+
*/
|
368 |
+
add_action( 'admin_post_imagify_deactivate_plugin', '_imagify_deactivate_plugin' );
|
369 |
+
function _imagify_deactivate_plugin() {
|
370 |
+
if ( ! wp_verify_nonce( $_GET['_wpnonce'], 'imagifydeactivatepluginnonce' ) ) {
|
371 |
+
wp_nonce_ays( '' );
|
372 |
+
}
|
373 |
+
|
374 |
+
deactivate_plugins( $_GET['plugin'] );
|
375 |
+
|
376 |
+
wp_safe_redirect( wp_get_referer() );
|
377 |
+
die();
|
378 |
+
}
|
379 |
+
|
380 |
+
/**
|
381 |
+
* Get admin bar profile output
|
382 |
+
*
|
383 |
+
* @since 1.2.3
|
384 |
+
*/
|
385 |
+
add_action( 'wp_ajax_imagify_get_admin_bar_profile', '_do_wp_ajax_imagify_get_admin_bar_profile' );
|
386 |
+
function _do_wp_ajax_imagify_get_admin_bar_profile() {
|
387 |
+
check_ajax_referer( 'imagify-get-admin-bar-profile', 'imagifygetadminbarprofilenonce' );
|
388 |
+
|
389 |
+
$user = new Imagify_User();
|
390 |
+
$unconsumed_quota = $user->get_percent_unconsumed_quota();
|
391 |
+
$meteo_icon = '<img src="' . IMAGIFY_ASSETS_IMG_URL . 'sun.svg" width="37" height="38" alt="" />';
|
392 |
+
$bar_class = 'positive';
|
393 |
+
$message = '';
|
394 |
+
|
395 |
+
if ( $unconsumed_quota >= 21 && $unconsumed_quota <= 50 ) {
|
396 |
+
$bar_class = 'neutral';
|
397 |
+
$meteo_icon = '<img src="' . IMAGIFY_ASSETS_IMG_URL . 'cloudy-sun.svg" width="37" height="38" alt="" />';
|
398 |
+
}
|
399 |
+
elseif ( $unconsumed_quota <= 20 ) {
|
400 |
+
$bar_class = 'negative';
|
401 |
+
$meteo_icon = '<img src="' . IMAGIFY_ASSETS_IMG_URL . 'stormy.svg" width="38" height="36" alt="" />';
|
402 |
+
}
|
403 |
+
|
404 |
+
if ( $unconsumed_quota <= 20 && $unconsumed_quota > 0 ) {
|
405 |
+
$message = '
|
406 |
+
<div class="imagify-error">
|
407 |
+
<p><i class="dashicons dashicons-warning" aria-hidden="true"></i><strong>' . __( 'Oops, It\'s almost over!', 'imagify' ) . '</strong></p>
|
408 |
+
<p>' . sprintf( __( 'You have almost used all your credit.%sDon\'t forget to upgrade your subscription to continue optimizing your images.', 'imagify' ), '<br/><br/>' ) . '</p>
|
409 |
+
<p class="center txt-center text-center"><a class="btn btn-ghost" href="' . IMAGIFY_APP_MAIN . '/#/subscription" target="_blank">' . __( 'View My Subscription', 'imagify' ) . '</a></p>
|
410 |
+
</div>
|
411 |
+
';
|
412 |
+
}
|
413 |
+
|
414 |
+
if ( $unconsumed_quota === 0 ) {
|
415 |
+
$message = '
|
416 |
+
<div class="imagify-error">
|
417 |
+
<p><i class="dashicons dashicons-warning" aria-hidden="true"></i><strong>' . __( 'Oops, It\'s Over!', 'imagify' ) . '</strong></p>
|
418 |
+
<p>' . sprintf( __( 'You have consumed all your credit for this month. You will have <strong>%s back on %s</strong>.', 'imagify' ), size_format( $user->quota * 1048576 ), date_i18n( get_option( 'date_format' ), strtotime( $user->next_date_update ) ) ) . '</p>
|
419 |
+
<p class="center txt-center text-center"><a class="btn btn-ghost" href="' . IMAGIFY_APP_MAIN . '/#/subscription" target="_blank">' . __( 'Upgrade My Subscription', 'imagify' ) . '</a></p>
|
420 |
+
</div>
|
421 |
+
';
|
422 |
+
}
|
423 |
+
|
424 |
+
// custom HTML
|
425 |
+
$quota_section = '
|
426 |
+
<div class="imagify-admin-bar-quota">
|
427 |
+
<div class="imagify-abq-row">';
|
428 |
+
|
429 |
+
if ( 1 === $user->plan_id ) {
|
430 |
+
$quota_section .= '
|
431 |
+
<div class="imagify-meteo-icon">
|
432 |
+
' . $meteo_icon . '
|
433 |
+
</div>';
|
434 |
+
}
|
435 |
+
|
436 |
+
$quota_section .= '
|
437 |
+
<div class="imagify-account">
|
438 |
+
<p class="imagify-meteo-title">' . __( 'Account status', 'imagify' ) . '</p>
|
439 |
+
<p class="imagify-meteo-subs">' . __( 'Your subscription:', 'imagify' ) . ' <strong class="imagify-user-plan">' . $user->plan_label . '</strong></p>
|
440 |
+
</div>
|
441 |
+
</div>';
|
442 |
+
|
443 |
+
if ( 1 === $user->plan_id ) {
|
444 |
+
$quota_section .= '
|
445 |
+
<div class="imagify-abq-row">
|
446 |
+
<div class="imagify-space-left">
|
447 |
+
<p>' . sprintf( __( 'You have %s space credit left', 'imagify'), '<span class="imagify-unconsumed-percent">' . $unconsumed_quota . '%</span>' ) . '</p>
|
448 |
+
<div class="imagify-bar-' . $bar_class . '">
|
449 |
+
<div style="width: ' . $unconsumed_quota . '%;" class="imagify-unconsumed-bar imagify-progress"></div>
|
450 |
+
</div>
|
451 |
+
</div>
|
452 |
+
</div>';
|
453 |
+
}
|
454 |
+
|
455 |
+
$quota_section .= '
|
456 |
+
<p class="imagify-abq-row">
|
457 |
+
<a class="imagify-account-link" href="' . IMAGIFY_APP_MAIN . '/#/subscription" target="_blank">
|
458 |
+
<span class="dashicons dashicons-admin-users"></span>
|
459 |
+
<span class="button-text">' . __( 'View my subscription', 'imagify' ) . '</span>
|
460 |
+
</a>
|
461 |
+
</p>
|
462 |
+
</div>
|
463 |
+
' . $message;
|
464 |
+
|
465 |
+
wp_send_json_success( $quota_section );
|
466 |
+
}
|
inc/admin/enqueue.php
ADDED
@@ -0,0 +1,234 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
defined( 'ABSPATH' ) or die( 'Cheatin\' uh?' );
|
3 |
+
|
4 |
+
/**
|
5 |
+
* Add some CSS on the whole administration
|
6 |
+
*
|
7 |
+
* @since 1.0
|
8 |
+
*/
|
9 |
+
add_action( 'admin_print_styles', '_imagify_admin_print_styles' );
|
10 |
+
function _imagify_admin_print_styles() {
|
11 |
+
global $pagenow;
|
12 |
+
$current_screen = get_current_screen();
|
13 |
+
$css_ext = ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ? '.css' : '.min.css';
|
14 |
+
$js_ext = ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ? '.js' : '.min.js';
|
15 |
+
|
16 |
+
wp_register_style(
|
17 |
+
'imagify-css-admin',
|
18 |
+
IMAGIFY_ASSETS_CSS_URL . 'admin' . $css_ext,
|
19 |
+
array(),
|
20 |
+
IMAGIFY_VERSION
|
21 |
+
);
|
22 |
+
|
23 |
+
wp_register_style(
|
24 |
+
'imagify-css-sweetalert',
|
25 |
+
IMAGIFY_ASSETS_CSS_URL . 'sweetalert' . $css_ext,
|
26 |
+
array(),
|
27 |
+
IMAGIFY_VERSION
|
28 |
+
);
|
29 |
+
|
30 |
+
wp_register_style(
|
31 |
+
'imagify-css-twentytwenty',
|
32 |
+
IMAGIFY_ASSETS_CSS_URL . 'twentytwenty' . $css_ext,
|
33 |
+
array(),
|
34 |
+
IMAGIFY_VERSION
|
35 |
+
);
|
36 |
+
|
37 |
+
wp_register_script(
|
38 |
+
'imagify-js-async',
|
39 |
+
IMAGIFY_ASSETS_JS_URL . 'imagify.min.js',
|
40 |
+
array(),
|
41 |
+
IMAGIFY_VERSION,
|
42 |
+
true
|
43 |
+
);
|
44 |
+
|
45 |
+
wp_register_script(
|
46 |
+
'imagify-js-admin',
|
47 |
+
IMAGIFY_ASSETS_JS_URL . 'admin' . $js_ext,
|
48 |
+
array(),
|
49 |
+
IMAGIFY_VERSION,
|
50 |
+
true
|
51 |
+
);
|
52 |
+
|
53 |
+
wp_register_script(
|
54 |
+
'imagify-js-options',
|
55 |
+
IMAGIFY_ASSETS_JS_URL . 'options' . $js_ext,
|
56 |
+
array(),
|
57 |
+
IMAGIFY_VERSION,
|
58 |
+
true
|
59 |
+
);
|
60 |
+
|
61 |
+
wp_register_script(
|
62 |
+
'imagify-js-upload',
|
63 |
+
IMAGIFY_ASSETS_JS_URL . 'upload' . $js_ext,
|
64 |
+
array( 'jquery' ),
|
65 |
+
IMAGIFY_VERSION,
|
66 |
+
true
|
67 |
+
);
|
68 |
+
|
69 |
+
wp_register_script(
|
70 |
+
'imagify-js-sweetalert',
|
71 |
+
IMAGIFY_ASSETS_JS_URL . 'sweetalert.min.js',
|
72 |
+
array( 'jquery' ),
|
73 |
+
IMAGIFY_VERSION,
|
74 |
+
true
|
75 |
+
);
|
76 |
+
|
77 |
+
wp_register_script(
|
78 |
+
'imagify-js-chart',
|
79 |
+
IMAGIFY_ASSETS_JS_URL . 'chart.min.js',
|
80 |
+
array(),
|
81 |
+
IMAGIFY_VERSION,
|
82 |
+
true
|
83 |
+
);
|
84 |
+
|
85 |
+
wp_register_script(
|
86 |
+
'imagify-js-bulk',
|
87 |
+
IMAGIFY_ASSETS_JS_URL . 'bulk' . $js_ext,
|
88 |
+
array( 'jquery', 'imagify-js-chart' ),
|
89 |
+
IMAGIFY_VERSION,
|
90 |
+
true
|
91 |
+
);
|
92 |
+
|
93 |
+
wp_register_script(
|
94 |
+
'imagify-js-twentytwenty',
|
95 |
+
IMAGIFY_ASSETS_JS_URL . 'jquery.twentytwenty' . $js_ext,
|
96 |
+
array( 'jquery', 'imagify-js-event-move', 'imagify-js-chart' ),
|
97 |
+
IMAGIFY_VERSION,
|
98 |
+
true
|
99 |
+
);
|
100 |
+
wp_register_script(
|
101 |
+
'imagify-js-event-move',
|
102 |
+
IMAGIFY_ASSETS_JS_URL . 'jquery.event.move' . $js_ext,
|
103 |
+
array( 'jquery' ),
|
104 |
+
IMAGIFY_VERSION,
|
105 |
+
true
|
106 |
+
);
|
107 |
+
|
108 |
+
/*
|
109 |
+
* Styles loaded in the whole admnistration
|
110 |
+
*/
|
111 |
+
wp_enqueue_style( 'imagify-css-admin' );
|
112 |
+
wp_enqueue_style( 'imagify-css-sweetalert' );
|
113 |
+
|
114 |
+
/*
|
115 |
+
* Scripts loaded in the whole admnistration
|
116 |
+
*/
|
117 |
+
wp_enqueue_script( 'imagify-js-sweetalert' );
|
118 |
+
wp_enqueue_script( 'imagify-js-admin' );
|
119 |
+
|
120 |
+
$admin_data = array(
|
121 |
+
'signupTitle' => __( 'Let\'s get you started!', 'imagify' ),
|
122 |
+
'signupText' => __( 'Enter your email to get an API key:', 'imagify' ),
|
123 |
+
'signupConfirmButtonText' => __( 'Sign Up', 'imagify' ),
|
124 |
+
'signupErrorEmptyEmail' => __( 'You need to specify an email!', 'imagify' ),
|
125 |
+
'signupSuccessTitle' => __( 'Congratulations!', 'imagify' ),
|
126 |
+
'signupSuccessText' => __( 'Your account has been succesfully created. Please check your mailbox, you are going to receive an email with API key.', 'imagify' ),
|
127 |
+
'saveApiKeyTitle' => __( 'Connect to Imagify!', 'imagify' ),
|
128 |
+
'saveApiKeyText' => __( 'Paste your API key below:', 'imagify' ),
|
129 |
+
'saveApiKeyConfirmButtonText' => __( 'Connect me', 'imagify' ),
|
130 |
+
'waitApiKeyCheckText' => __( 'Check in progress...', 'imagify' ),
|
131 |
+
'ApiKeyCheckSuccessTitle' => __( 'Congratulations!', 'imagify' ),
|
132 |
+
'ApiKeyCheckSuccessText' => __( 'Your API key is valid. You can now configure the Imagify settings to optimize your images.', 'imagify' ),
|
133 |
+
'ValidApiKeyText' => __( 'Your API key is valid.', 'imagify' )
|
134 |
+
|
135 |
+
);
|
136 |
+
wp_localize_script( 'imagify-js-admin', 'imagify', $admin_data );
|
137 |
+
wp_enqueue_script( 'imagify-js-admin' );
|
138 |
+
|
139 |
+
/*
|
140 |
+
* Scripts loaded in /wp-admin/options-general.php?page=imagify
|
141 |
+
*/
|
142 |
+
if ( isset( $current_screen ) && ( 'settings_page_imagify' === $current_screen->base || 'settings_page_imagify-network' === $current_screen->base ) ) {
|
143 |
+
wp_enqueue_script( 'imagify-js-chart' );
|
144 |
+
wp_enqueue_script( 'imagify-js-event-move' );
|
145 |
+
wp_enqueue_script( 'imagify-js-twentytwenty' );
|
146 |
+
wp_enqueue_script( 'imagify-js-options' );
|
147 |
+
wp_enqueue_style( 'imagify-css-twentytwenty' );
|
148 |
+
|
149 |
+
$options_data = array(
|
150 |
+
'noBackupTitle' => __( 'Don\'t Need a Parachute?', 'imagify' ),
|
151 |
+
'noBackupText' => __( 'If you keep this option deactivated, you won\'t be able to re-optimize your images to another compression level and restore your original images in case of need.', 'imagify' )
|
152 |
+
);
|
153 |
+
|
154 |
+
wp_localize_script( 'imagify-js-options', 'imagifyOptions', $options_data );
|
155 |
+
}
|
156 |
+
|
157 |
+
/*
|
158 |
+
* Scripts loaded in /wp-admin/upload.php and post.php
|
159 |
+
*/
|
160 |
+
if ( isset( $current_screen ) && ( 'upload' === $current_screen->base || 'post' === $current_screen->base ) ) {
|
161 |
+
$upload_data = array(
|
162 |
+
'bulkActionsLabels' => array(
|
163 |
+
'optimize' => __( 'Optimize', 'imagify' ),
|
164 |
+
'restore' => __( 'Restore Original', 'imagify' ),
|
165 |
+
),
|
166 |
+
);
|
167 |
+
wp_localize_script( 'imagify-js-upload', 'imagifyUpload', $upload_data );
|
168 |
+
wp_enqueue_script( 'imagify-js-chart' );
|
169 |
+
wp_enqueue_script( 'imagify-js-upload' );
|
170 |
+
}
|
171 |
+
|
172 |
+
/*
|
173 |
+
* Scripts loaded in /wp-admin/upload.php?page=imagify-bulk-optimization
|
174 |
+
*/
|
175 |
+
if ( isset( $current_screen ) && 'media_page_imagify-bulk-optimization' === $current_screen->base ) {
|
176 |
+
$user = get_imagify_user();
|
177 |
+
$bulk_data = array(
|
178 |
+
'waitTitle' => __( 'Please wait...', 'imagify' ),
|
179 |
+
'waitText' => __( 'We are trying to get your unoptimized images, it may take time depending on the number of images.', 'imagify' ),
|
180 |
+
'waitImageUrl' => IMAGIFY_ASSETS_IMG_URL . 'popin-loader.svg',
|
181 |
+
'overviewChartLabels' => array(
|
182 |
+
'optimized' => __( 'Optimized', 'imagify' ),
|
183 |
+
'unoptimized' => __( 'Unoptimized', 'imagify' ),
|
184 |
+
'error' => __( 'Error', 'imagify' ),
|
185 |
+
),
|
186 |
+
'overQuotaTitle' => __( 'Oops, It\'s Over!', 'imagify' ),
|
187 |
+
'noAttachmentToOptimizeTitle' => __( 'Hold on!', 'imagify' ),
|
188 |
+
'noAttachmentToOptimizeText' => __( 'All your images have been optimized by Imagify. Congratulations!', 'imagify' ),
|
189 |
+
'pluginURL' => 'https://wordpress.org/plugins/imagify',
|
190 |
+
'textToShare' => __( 'Discover @imagify, the new compression tool to optimize your images for free. I saved %1$s out of %2$s!', 'imagify' ),
|
191 |
+
'totalOptimizedAttachments' => imagify_count_optimized_attachments(),
|
192 |
+
'totalUnoptimizedAttachments' => imagify_count_unoptimized_attachments(),
|
193 |
+
'totalErrorsAttachments' => imagify_count_error_attachments()
|
194 |
+
);
|
195 |
+
|
196 |
+
if ( imagify_valid_key() ) {
|
197 |
+
if ( is_wp_error( $user ) ) {
|
198 |
+
$bulk_data['overQuotaText'] = sprintf( __( 'To continue to optimize your images, log in to your Imagify account to %sbuy a pack or subscribe to a plan%s.', 'imagify' ), '<a href="' . IMAGIFY_APP_MAIN . '/#/subscription' . '">', '</a>' );
|
199 |
+
}
|
200 |
+
else {
|
201 |
+
$bulk_data['overQuotaText'] = sprintf( __( 'You have consumed all your credit for this month. You will have <strong>%s back on %s</strong>.', 'imagify' ), size_format( $user->quota * 1048576 ), date_i18n( __( 'F j, Y' ), strtotime( $user->next_date_update ) ) ) . '<br/><br/>' . sprintf( __( 'To continue to optimize your images, log in to your Imagify account to %sbuy a pack or subscribe to a plan%s.', 'imagify' ), '<a href="' . IMAGIFY_APP_MAIN . '/#/subscription' . '">', '</a>' );
|
202 |
+
}
|
203 |
+
}
|
204 |
+
|
205 |
+
wp_localize_script( 'imagify-js-bulk', 'imagifyBulk', $bulk_data );
|
206 |
+
wp_enqueue_script( 'imagify-js-chart' );
|
207 |
+
wp_enqueue_script( 'imagify-js-async' );
|
208 |
+
wp_enqueue_script( 'imagify-js-bulk' );
|
209 |
+
}
|
210 |
+
}
|
211 |
+
|
212 |
+
/**
|
213 |
+
* Add Intercom on Options page an Bulk Optimization
|
214 |
+
*
|
215 |
+
* @since 1.0
|
216 |
+
*/
|
217 |
+
add_action( 'admin_footer-media_page_imagify-bulk-optimization', '_imagify_admin_print_intercom' );
|
218 |
+
add_action( 'admin_footer-settings_page_imagify', '_imagify_admin_print_intercom' );
|
219 |
+
function _imagify_admin_print_intercom() {
|
220 |
+
$user = get_imagify_user();
|
221 |
+
|
222 |
+
if ( ! imagify_valid_key() || empty( $user->is_intercom ) ) {
|
223 |
+
return;
|
224 |
+
}
|
225 |
+
?>
|
226 |
+
<script>
|
227 |
+
window.intercomSettings = {
|
228 |
+
app_id: "cd6nxj3z",
|
229 |
+
user_id: <?php echo (int) $user->id; ?>,
|
230 |
+
};
|
231 |
+
</script>
|
232 |
+
<script>(function(){var w=window;var ic=w.Intercom;if(typeof ic==="function"){ic('reattach_activator');ic('update',intercomSettings);}else{var d=document;var i=function(){i.c(arguments)};i.q=[];i.c=function(args){i.q.push(args)};w.Intercom=i;function l(){var s=d.createElement('script');s.type='text/javascript';s.async=true;s.src='https://widget.intercom.io/widget/cd6nxj3z';var x=d.getElementsByTagName('script')[0];x.parentNode.insertBefore(s,x);}if(w.attachEvent){w.attachEvent('onload',l);}else{w.addEventListener('load',l,false);}}})()</script>
|
233 |
+
<?php
|
234 |
+
}
|
inc/admin/media.php
ADDED
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
defined( 'ABSPATH' ) or die( 'Cheatin\' uh?' );
|
3 |
+
|
4 |
+
/*
|
5 |
+
* Add "Imagify" column in the Media Uploader
|
6 |
+
*
|
7 |
+
* @since 1.2
|
8 |
+
*/
|
9 |
+
add_filter( 'attachment_fields_to_edit', '_imagify_attachment_fields_to_edit', PHP_INT_MAX, 2 );
|
10 |
+
function _imagify_attachment_fields_to_edit( $form_fields, $post ) {
|
11 |
+
global $pagenow;
|
12 |
+
if ( 'post.php' == $pagenow ) {
|
13 |
+
return $form_fields;
|
14 |
+
}
|
15 |
+
|
16 |
+
$form_fields['imagify'] = array(
|
17 |
+
'label' => 'Imagify',
|
18 |
+
'input' => 'html',
|
19 |
+
'html' => get_imagify_media_column_content( $post->ID ),
|
20 |
+
'show_in_edit' => true,
|
21 |
+
'show_in_modal' => true,
|
22 |
+
);
|
23 |
+
|
24 |
+
return $form_fields;
|
25 |
+
}
|
inc/admin/menu.php
ADDED
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
defined( 'ABSPATH' ) or die( 'Cheatin\' uh?' );
|
3 |
+
|
4 |
+
/**
|
5 |
+
* Add submenu in menu "Settings"
|
6 |
+
*
|
7 |
+
* @since 1.0
|
8 |
+
*/
|
9 |
+
add_action( ( imagify_is_active_for_network() ? 'network_' : '' ) . 'admin_menu', '_imagify_settings_menu' );
|
10 |
+
function _imagify_settings_menu() {
|
11 |
+
$page = imagify_is_active_for_network() ? 'settings.php' : 'options-general.php';
|
12 |
+
$cap = imagify_is_active_for_network() ? 'manage_network_options' : 'manage_options';
|
13 |
+
|
14 |
+
add_submenu_page( $page, 'Imagify', 'Imagify', apply_filters( 'imagify_capacity', $cap ), IMAGIFY_SLUG, '_imagify_display_options_page' );
|
15 |
+
}
|
16 |
+
|
17 |
+
/**
|
18 |
+
* Add submenu in menu "Media"
|
19 |
+
*
|
20 |
+
* @since 1.0
|
21 |
+
*/
|
22 |
+
add_action( 'admin_menu', '_imagify_bulk_optimization_menu' );
|
23 |
+
function _imagify_bulk_optimization_menu() {
|
24 |
+
add_media_page( __( 'Bulk Optimization', 'imagify' ), __( 'Bulk Optimization', 'imagify' ), apply_filters( 'imagify_capacity', 'manage_options' ), IMAGIFY_SLUG . '-bulk-optimization', '_imagify_display_bulk_page' );
|
25 |
+
}
|
inc/admin/meta-boxes.php
ADDED
@@ -0,0 +1,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
defined( 'ABSPATH' ) or die( 'Cheatin\' uh?' );
|
3 |
+
|
4 |
+
/**
|
5 |
+
* Add a "Optimize It" button or the Imagify optimization data in the attachment submit area
|
6 |
+
*
|
7 |
+
* @since 1.0
|
8 |
+
*/
|
9 |
+
add_action( 'attachment_submitbox_misc_actions', '_imagify_attachment_submitbox_misc_actions', PHP_INT_MAX );
|
10 |
+
function _imagify_attachment_submitbox_misc_actions()
|
11 |
+
{
|
12 |
+
/** This filter is documented in inc/admin/options.php */
|
13 |
+
if ( current_user_can( apply_filters( 'imagify_capacity', 'manage_options' ) ) ) {
|
14 |
+
global $post;
|
15 |
+
$attachment = new Imagify_Attachment();
|
16 |
+
|
17 |
+
if ( ! imagify_valid_key() && ! $attachment->is_optimized() ) {
|
18 |
+
echo '<div class="misc-pub-section misc-pub-imagify"><h4>' . __( 'Imagify', 'imagify' ) . '</h4></div>';
|
19 |
+
echo '<div class="misc-pub-section misc-pub-imagify">';
|
20 |
+
echo __( 'Invalid API key', 'imagify' );
|
21 |
+
echo '<br/>';
|
22 |
+
echo '<a href="' . get_imagify_admin_url( 'options-general' ) . '">' . __( 'Check your Settings', 'imagify' ) . '</a>';
|
23 |
+
echo '</div>';
|
24 |
+
} elseif ( $attachment->is_optimized() || $attachment->has_error() ) {
|
25 |
+
echo '<div class="misc-pub-section misc-pub-imagify"><h4>' . __( 'Imagify', 'imagify' ) . '</h4></div>';
|
26 |
+
echo get_imagify_attachment_optimization_text( $post->ID );
|
27 |
+
} else {
|
28 |
+
$url = get_imagify_admin_url( 'manual-upload', $post->ID );
|
29 |
+
printf( '<div class="misc-pub-section misc-pub-imagify"><a class="button-primary" href="%s">%s</a></div>', $url, __( 'Optimize', 'imagify' ) );
|
30 |
+
}
|
31 |
+
}
|
32 |
+
}
|
inc/admin/options.php
ADDED
@@ -0,0 +1,147 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
defined( 'ABSPATH' ) or die( 'Cheatin\' uh?' );
|
3 |
+
|
4 |
+
/**
|
5 |
+
* Fix the capability for our capacity filter hook
|
6 |
+
*
|
7 |
+
* @since 1.0
|
8 |
+
*/
|
9 |
+
add_filter( 'option_page_capability_imagify', '_imagify_correct_capability_for_options_page' );
|
10 |
+
function _imagify_correct_capability_for_options_page( $capability ) {
|
11 |
+
$cap = ( imagify_is_active_for_network() ) ? 'manage_network_options' : 'manage_options';
|
12 |
+
return apply_filters( 'imagify_capacity', $cap );
|
13 |
+
}
|
14 |
+
|
15 |
+
/**
|
16 |
+
* Tell to WordPress to be confident with our setting, we are clean!
|
17 |
+
*
|
18 |
+
* @since 1.0
|
19 |
+
*/
|
20 |
+
add_action( 'admin_init', '_imagify_register_setting' );
|
21 |
+
function _imagify_register_setting()
|
22 |
+
{
|
23 |
+
register_setting( 'imagify', 'imagify_settings' );
|
24 |
+
}
|
25 |
+
|
26 |
+
/**
|
27 |
+
* Filter specific options before its value is (maybe) serialized and updated.
|
28 |
+
*
|
29 |
+
* @since 1.0
|
30 |
+
*/
|
31 |
+
add_filter( 'pre_update_option_' . IMAGIFY_SETTINGS_SLUG, '_imagify_pre_update_option', 10, 2 );
|
32 |
+
function _imagify_pre_update_option( $value, $old_value ) {
|
33 |
+
// Store all sizes even if one of them isn't checked
|
34 |
+
$value['disallowed-sizes'] = array();
|
35 |
+
|
36 |
+
if ( isset( $value['sizes'] ) ) {
|
37 |
+
foreach( $value['sizes'] as $size_key => $size_value ) {
|
38 |
+
if ( strpos( $size_key , '-hidden' ) ) {
|
39 |
+
$key = str_replace( '-hidden', '', $size_key );
|
40 |
+
if ( ! isset( $value['sizes'][ $key ] ) ) {
|
41 |
+
$value['disallowed-sizes'][ $key ] = '1';
|
42 |
+
}
|
43 |
+
}
|
44 |
+
}
|
45 |
+
}
|
46 |
+
|
47 |
+
// The max width for the "Resize larger images" option can't be 0
|
48 |
+
if ( (bool) ! $value['resize_larger_w'] ) {
|
49 |
+
$value['resize_larger_w'] = '';
|
50 |
+
$value['resize_larger'] = 0;
|
51 |
+
}
|
52 |
+
|
53 |
+
// The max width for the "Resize larger images" option can't be less than the largest thumbnail width
|
54 |
+
$max_sizes = get_imagify_max_intermediate_image_size();
|
55 |
+
if ( (bool) $value['resize_larger_w'] && $value['resize_larger_w'] < $max_sizes['width'] ) {
|
56 |
+
$value['resize_larger_w'] = $max_sizes['width'];
|
57 |
+
}
|
58 |
+
|
59 |
+
unset( $value['sizes'] );
|
60 |
+
return $value;
|
61 |
+
}
|
62 |
+
|
63 |
+
/**
|
64 |
+
* Used to launch some actions after saving the options
|
65 |
+
*
|
66 |
+
* @since 1.0
|
67 |
+
*/
|
68 |
+
add_action( 'update_option_' . IMAGIFY_SETTINGS_SLUG, '_imagify_after_save_options', 10, 2 );
|
69 |
+
add_action( 'update_site_option_' . IMAGIFY_SETTINGS_SLUG, '_imagify_after_save_options', 10, 2 );
|
70 |
+
function _imagify_after_save_options( $oldvalue, $value )
|
71 |
+
{
|
72 |
+
if ( ! ( (bool) $oldvalue && (bool) $value ) ) {
|
73 |
+
return;
|
74 |
+
}
|
75 |
+
|
76 |
+
if ( ! isset( $oldvalue['api_key'] ) || $oldvalue['api_key'] != $value['api_key'] ) {
|
77 |
+
$api = new Imagify();
|
78 |
+
|
79 |
+
if ( is_wp_error( $api->getUser() ) ) {
|
80 |
+
imagify_renew_notice( 'wrong-api-key' );
|
81 |
+
delete_site_transient( 'imagify_check_licence_1' );
|
82 |
+
} else {
|
83 |
+
imagify_dismiss_notice( 'wrong-api-key' );
|
84 |
+
}
|
85 |
+
}
|
86 |
+
}
|
87 |
+
|
88 |
+
|
89 |
+
if ( imagify_is_active_for_network() ) :
|
90 |
+
|
91 |
+
/**
|
92 |
+
* !options.php do not handle site options. Let's use admin-post.php for multisite installations.
|
93 |
+
*
|
94 |
+
* @since 1.0
|
95 |
+
*/
|
96 |
+
add_action( 'admin_post_update', '_imagify_update_site_option_on_network' );
|
97 |
+
function _imagify_update_site_option_on_network() {
|
98 |
+
$option_group = IMAGIFY_SLUG;
|
99 |
+
|
100 |
+
if ( ! isset( $_POST['option_page'] ) || $_POST['option_page'] !== $option_group ) {
|
101 |
+
return;
|
102 |
+
}
|
103 |
+
|
104 |
+
$capability = apply_filters( "option_page_capability_{$option_group}", 'manage_network_options' );
|
105 |
+
|
106 |
+
if ( ! current_user_can( $capability ) ) {
|
107 |
+
wp_die( __( 'Cheatin’ uh?' ), 403 );
|
108 |
+
}
|
109 |
+
|
110 |
+
check_admin_referer( $option_group . '-options' );
|
111 |
+
|
112 |
+
$whitelist_options = apply_filters( 'whitelist_options', array() );
|
113 |
+
|
114 |
+
if ( ! isset( $whitelist_options[ $option_group ] ) ) {
|
115 |
+
wp_die( __( '<strong>ERROR</strong>: options page not found.' ) );
|
116 |
+
}
|
117 |
+
|
118 |
+
$options = $whitelist_options[ $option_group ];
|
119 |
+
|
120 |
+
if ( $options ) {
|
121 |
+
|
122 |
+
foreach ( $options as $option ) {
|
123 |
+
$option = trim( $option );
|
124 |
+
$value = null;
|
125 |
+
|
126 |
+
if ( isset( $_POST[ $option ] ) ) {
|
127 |
+
$value = $_POST[ $option ];
|
128 |
+
if ( ! is_array( $value ) ) {
|
129 |
+
$value = trim( $value );
|
130 |
+
}
|
131 |
+
$value = wp_unslash( $value );
|
132 |
+
}
|
133 |
+
|
134 |
+
update_site_option( $option, $value );
|
135 |
+
}
|
136 |
+
|
137 |
+
}
|
138 |
+
|
139 |
+
/**
|
140 |
+
* Redirect back to the settings page that was submitted
|
141 |
+
*/
|
142 |
+
$goback = add_query_arg( 'settings-updated', 'true', wp_get_referer() );
|
143 |
+
wp_redirect( $goback );
|
144 |
+
exit;
|
145 |
+
}
|
146 |
+
|
147 |
+
endif;
|
inc/admin/plugins.php
ADDED
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
defined( 'ABSPATH' ) or die( 'Cheatin\' uh?' );
|
3 |
+
|
4 |
+
/**
|
5 |
+
* Add link to the plugin configuration pages
|
6 |
+
*
|
7 |
+
* @since 1.0
|
8 |
+
*/
|
9 |
+
add_filter( 'plugin_action_links_' . plugin_basename( IMAGIFY_FILE ), '_imagify_plugin_action_links' );
|
10 |
+
add_filter( 'network_admin_plugin_action_links_' . plugin_basename( IMAGIFY_FILE ), '_imagify_plugin_action_links' );
|
11 |
+
function _imagify_plugin_action_links( $actions )
|
12 |
+
{
|
13 |
+
array_unshift( $actions, sprintf( '<a href="%s">%s</a>', get_imagify_admin_url( 'bulk-optimization' ), __( 'Bulk Optimization', 'imagify' ) ) );
|
14 |
+
array_unshift( $actions, sprintf( '<a href="%s">%s</a>', get_imagify_admin_url(), __( 'Settings' ) ) );
|
15 |
+
|
16 |
+
return $actions;
|
17 |
+
}
|
inc/admin/ui/bulk.php
ADDED
@@ -0,0 +1,293 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
defined( 'ABSPATH' ) or die( 'Cheatin\' uh?' );
|
3 |
+
|
4 |
+
/**
|
5 |
+
* The main settings page construtor using the required functions from WP
|
6 |
+
*
|
7 |
+
* @since 1.0
|
8 |
+
*/
|
9 |
+
function _imagify_display_bulk_page() {
|
10 |
+
$user = new Imagify_User();
|
11 |
+
?>
|
12 |
+
<div class="wrap imagify-settings imagify-bulk">
|
13 |
+
<div class="imagify-title">
|
14 |
+
<div class="imagify-title-right">
|
15 |
+
<div class="imagify-account">
|
16 |
+
<p class="imagify-meteo-title"><?php _e( 'Account status', 'imagify' ); ?></p>
|
17 |
+
<p class="imagify-meteo-subs"><?php _e( 'Your subscription:', 'imagify' ); ?> <strong class="imagify-user-plan"><?php echo $user->plan_label; ?></strong></p>
|
18 |
+
</div>
|
19 |
+
<div class="imagify-account-link">
|
20 |
+
<a href="<?php echo IMAGIFY_APP_MAIN; ?>/#/subscription" class="button button-ghost" target="_blank">
|
21 |
+
<span class="dashicons dashicons-admin-users"></span>
|
22 |
+
<span class="button-text"><?php _e( 'View My Subscription', 'imagify' ); ?></span>
|
23 |
+
</a>
|
24 |
+
</div>
|
25 |
+
|
26 |
+
<?php if ( 1 === $user->plan_id ) { ?>
|
27 |
+
<div class="imagify-sep-v"></div>
|
28 |
+
<div class="imagify-credit-left">
|
29 |
+
<?php
|
30 |
+
$unconsumed_quota = $user->get_percent_unconsumed_quota();
|
31 |
+
$meteo_icon = '<img src="' . IMAGIFY_ASSETS_IMG_URL . 'sun.svg" width="37" height="38" alt="" />';
|
32 |
+
$bar_class = 'positive';
|
33 |
+
$is_display_bubble = false;
|
34 |
+
|
35 |
+
if( $unconsumed_quota >= 21 && $unconsumed_quota <= 50 ) {
|
36 |
+
$bar_class = 'neutral';
|
37 |
+
$meteo_icon = '<img src="' . IMAGIFY_ASSETS_IMG_URL . 'cloudy-sun.svg" width="37" height="38" alt="" />';
|
38 |
+
} elseif( $unconsumed_quota <= 20 ) {
|
39 |
+
$bar_class = 'negative';
|
40 |
+
$is_display_bubble = true;
|
41 |
+
$meteo_icon = '<img src="' . IMAGIFY_ASSETS_IMG_URL . 'stormy.svg" width="38" height="36" alt="" />';
|
42 |
+
}
|
43 |
+
?>
|
44 |
+
<span class="imagify-meteo-icon"><?php echo $meteo_icon; ?></span>
|
45 |
+
<div class="imagify-space-left">
|
46 |
+
|
47 |
+
<p><?php printf( __( 'You have %s space credit left' , 'imagify' ), '<span class="imagify-unconsumed-percent">' . $unconsumed_quota . '%</span>' ); ?></p>
|
48 |
+
|
49 |
+
<div class="imagify-bar-<?php echo $bar_class; ?>">
|
50 |
+
<div class="imagify-unconsumed-bar imagify-progress" style="width: <?php echo $unconsumed_quota . '%'; ?>;"></div>
|
51 |
+
</div>
|
52 |
+
</div>
|
53 |
+
<div class="imagify-space-tooltips imagify-tooltips <?php echo ( ! $is_display_bubble ) ? 'hidden' : ''; ?>">
|
54 |
+
<div class="tooltip-content tooltip-table">
|
55 |
+
<div class="cell-icon">
|
56 |
+
<span aria-hidden="true" class="icon icon-round">i</span>
|
57 |
+
</div>
|
58 |
+
<div class="cell-text">
|
59 |
+
<?php _e( 'Upgrade your account to continue optimizing your images', 'imagify' ); ?>
|
60 |
+
</div>
|
61 |
+
<div class="cell-sep"></div>
|
62 |
+
<div class="cell-cta">
|
63 |
+
<a href="<?php echo IMAGIFY_APP_MAIN; ?>/#/subscription" target="_blank"><?php _e( 'More info', 'imagify' ); ?></a>
|
64 |
+
</div>
|
65 |
+
</div>
|
66 |
+
</div>
|
67 |
+
</div>
|
68 |
+
<?php } ?>
|
69 |
+
|
70 |
+
</div>
|
71 |
+
|
72 |
+
<img width="225" height="26" alt="Imagify" src="<?php echo IMAGIFY_ASSETS_IMG_URL; ?>imagify-logo.png" class="imagify-logo" />
|
73 |
+
</div>
|
74 |
+
|
75 |
+
<div class="imagify-sub-title">
|
76 |
+
<svg class="icon icon-bulk" viewBox="0 0 38 36" width="38" height="36" xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="evenodd"><path d="m233.09 177.21l-5.52 10.248c-.08.145-.018.272-.023.388-.074.193-.033.4-.033.619v21.615c0 .952.601 1.429 1.552 1.429h33.897c.952 0 1.962-.478 1.962-1.429v-21.615c0-.487-.323-.925-.649-1.24l-5.623-9.976c-.405-.726-1.202-1.179-2.034-1.182l-21.486-.068c-.849 0-1.64.464-2.043 1.211m30.424 32.869c0 .173-.378.018-.551.018h-33.897c-.172 0-.14.155-.14-.018v-21.576l33.961-.281c.066.008.186.09.263.128.054.027.205.049.258.073.002.014.106.027.106.041v21.615m-6.153-32.11l4.91 8.835h-14.992v-9.354l9.306.045c.322.001.619.192.776.474m-11.494-.523v9.358h-16.306l4.773-8.892c.155-.289.456-.484.787-.484l10.746.018m7.06 17.12c0 .39-.316.706-.706.706h-12.706c-.39 0-.706-.316-.706-.706 0-.39.316-.706.706-.706h12.706c.39 0 .706.316.706.706" transform="translate(-227-176)" fill="#7a8996"/></g></svg>
|
77 |
+
<span class="title-text">
|
78 |
+
<?php _e( 'Bulk Optimization', 'imagify' ); ?>
|
79 |
+
<small><sup><?php echo IMAGIFY_VERSION; ?></sup></small>
|
80 |
+
</span>
|
81 |
+
</div>
|
82 |
+
|
83 |
+
<div class="imagify-settings-section">
|
84 |
+
|
85 |
+
<div class="imagify-columns">
|
86 |
+
|
87 |
+
<div class="col-1-3 col-informations">
|
88 |
+
<h3><?php _e( 'Information', 'imagify' ); ?></h3>
|
89 |
+
<ul class="imagify-list-dash">
|
90 |
+
<li><strong><?php _e( 'Please be aware that optimizing a large number of images can take a while depending on your server and network speed.', 'imagify' ); ?></strong></li>
|
91 |
+
<li><?php _e( 'You must keep this page open while the bulk optimizaton is processing. If you leave you can come back to continue where it left off.', 'imagify' ); ?></li>
|
92 |
+
</ul>
|
93 |
+
|
94 |
+
<div class="imagify-bulk-submit">
|
95 |
+
|
96 |
+
<?php if ( get_imagify_option( 'backup', 0 ) == "1" ) { ?>
|
97 |
+
|
98 |
+
<p>
|
99 |
+
<strong><?php _e( 'Select Your Compression Level', 'imagify' ); ?></strong>
|
100 |
+
<br>
|
101 |
+
<?php
|
102 |
+
$default_set = __( 'Ultra', 'imagify' );
|
103 |
+
switch( get_imagify_option( 'optimization_level' ) ) {
|
104 |
+
case '1':
|
105 |
+
$default_set = __( 'Aggressive', 'imagify' );
|
106 |
+
break;
|
107 |
+
case '0':
|
108 |
+
$default_set = __( 'Normal', 'imagify' );
|
109 |
+
break;
|
110 |
+
}
|
111 |
+
|
112 |
+
_e( 'Your default setting:', 'imagify' );
|
113 |
+
echo ' <strong class="imagify-primary">' . $default_set . '</strong>';
|
114 |
+
?>
|
115 |
+
</p>
|
116 |
+
|
117 |
+
<p class="imagify-inline-options">
|
118 |
+
<input type="radio" id="imagify-optimization_level_normal" name="optimization_level" value="0" <?php checked( get_imagify_option( 'optimization_level' ), 0 ); ?>>
|
119 |
+
<label for="imagify-optimization_level_normal">
|
120 |
+
<?php _e( 'Normal', 'imagify' ); ?>
|
121 |
+
</label>
|
122 |
+
|
123 |
+
<input type="radio" id="imagify-optimization_level_aggro" name="optimization_level" value="1" <?php checked( get_imagify_option( 'optimization_level' ), 1 ); ?>>
|
124 |
+
<label for="imagify-optimization_level_aggro">
|
125 |
+
<?php _e( 'Aggressive', 'imagify' ); ?>
|
126 |
+
</label>
|
127 |
+
|
128 |
+
<input type="radio" id="imagify-optimization_level_ultra" name="optimization_level" value="2" <?php checked( get_imagify_option( 'optimization_level' ), 2 ); ?>>
|
129 |
+
<label for="imagify-optimization_level_ultra">
|
130 |
+
<?php _e( 'Ultra', 'imagify' ); ?>
|
131 |
+
</label>
|
132 |
+
</p>
|
133 |
+
|
134 |
+
<?php
|
135 |
+
}
|
136 |
+
else {
|
137 |
+
?>
|
138 |
+
<p>
|
139 |
+
<strong><?php printf( __( 'Don\'t forget to check %syour settings%s before bulk optimization.', 'imagify' ), '<a href="' . get_imagify_admin_url() . '">', '</a>' ); ?></strong>
|
140 |
+
</p>
|
141 |
+
<?php
|
142 |
+
}
|
143 |
+
?>
|
144 |
+
|
145 |
+
<p>
|
146 |
+
<?php wp_nonce_field( 'imagify-bulk-upload', 'imagifybulkuploadnonce' ); ?>
|
147 |
+
<button id="imagify-bulk-action" type="button" class="button button-primary">
|
148 |
+
<span class="dashicons dashicons-admin-generic"></span>
|
149 |
+
<span class="button-text"><?php _e( 'Imagif\'em all', 'imagify'); ?></span>
|
150 |
+
</button>
|
151 |
+
<?php
|
152 |
+
if ( $user->is_free() ) { ?>
|
153 |
+
<span class="imagify-tooltips right">
|
154 |
+
<span class="tooltip-content">
|
155 |
+
<span class="icon icon-round" aria-hidden="true">i</span>
|
156 |
+
<?php printf( __( 'All images which are over to %s could be optimized using the pro version.', 'imagify' ), size_format( IMAGIFY_MAX_BYTES , 0 ) ); ?>
|
157 |
+
</span>
|
158 |
+
</span>
|
159 |
+
<?php
|
160 |
+
}
|
161 |
+
?>
|
162 |
+
</p>
|
163 |
+
</div>
|
164 |
+
</div>
|
165 |
+
|
166 |
+
<div class="col-1-3">
|
167 |
+
<h3><?php _e( 'Overview', 'imagify' ); ?></h3>
|
168 |
+
|
169 |
+
<div class="imagify-chart-container">
|
170 |
+
<canvas id="imagify-overview-chart" width="180" height="180"></canvas>
|
171 |
+
<div id="imagify-overview-chart-percent" class="imagify-chart-percent"><?php echo imagify_percent_optimized_attachments(); ?><span>%</span></div>
|
172 |
+
</div>
|
173 |
+
<div id="imagify-overview-chart-legend"></div>
|
174 |
+
</div>
|
175 |
+
|
176 |
+
<div class="col-1-3 col-statistics">
|
177 |
+
<h3><?php _e( 'Statistics', 'imagify' ); ?></h3>
|
178 |
+
|
179 |
+
<?php
|
180 |
+
$total_saving_data = imagify_count_saving_data();
|
181 |
+
$optimized_percent = $total_saving_data['percent'];
|
182 |
+
$optimized_nb = $total_saving_data['optimized_size'];
|
183 |
+
$original_nb = $total_saving_data['original_size'];
|
184 |
+
?>
|
185 |
+
|
186 |
+
<div class="imagify-number-you-optimized">
|
187 |
+
<p>
|
188 |
+
<span id="imagify-total-optimized-attachments" class="number"><?php echo number_format_i18n( $total_saving_data['count'] ); ?></span>
|
189 |
+
<span class="text"><?php printf( __( 'that\'s the number of images you optimized with Imagify', 'imagify' ), '<br>' ); ?></span>
|
190 |
+
</p>
|
191 |
+
</div>
|
192 |
+
|
193 |
+
<div class="imagify-bars">
|
194 |
+
<p><?php _e( 'Original size', 'imagify' ); ?></p>
|
195 |
+
<div class="imagify-bar-negative base-transparent right-outside-number">
|
196 |
+
<div id="imagify-original-bar" class="imagify-progress" style="width: 100%"><span class="imagify-barnb"><?php echo size_format( $original_nb, 1 ); ?></span></div>
|
197 |
+
</div>
|
198 |
+
|
199 |
+
<p><?php _e( 'Optimized size', 'imagify' ); ?></p>
|
200 |
+
<div class="imagify-bar-positive base-transparent right-outside-number">
|
201 |
+
|
202 |
+
<div id="imagify-optimized-bar" class="imagify-progress" style="width: <?php echo $optimized_percent; ?>%"><span class="imagify-barnb"><?php echo size_format( $optimized_nb, 1 ); ?></span></div>
|
203 |
+
</div>
|
204 |
+
|
205 |
+
</div>
|
206 |
+
|
207 |
+
<div class="imagify-number-you-optimized">
|
208 |
+
<p>
|
209 |
+
<span id="imagify-total-optimized-attachments-pct" class="number"><?php echo number_format_i18n( imagify_count_saving_data('percent') ); ?>%</span>
|
210 |
+
<span class="text"><?php printf( __( 'that\'s the size you saved %sby using Imagify', 'imagify' ), '<br>' ); ?></span>
|
211 |
+
</p>
|
212 |
+
</div>
|
213 |
+
</div>
|
214 |
+
|
215 |
+
</div>
|
216 |
+
</div><!-- .imagify-settings-section -->
|
217 |
+
|
218 |
+
<!-- The Success/Complete bar -->
|
219 |
+
<div class="imagify-row-complete hidden" aria-hidden="true">
|
220 |
+
<div class="imagify-all-complete">
|
221 |
+
<div class="imagify-ac-report">
|
222 |
+
<div class="imagify-ac-chart" data-percent="0">
|
223 |
+
<span class="imagify-chart">
|
224 |
+
<span class="imagify-chart-container">
|
225 |
+
<canvas width="46" height="46"></canvas>
|
226 |
+
</span>
|
227 |
+
</span>
|
228 |
+
</div>
|
229 |
+
<div class="imagify-ac-report-text">
|
230 |
+
<p class="imagify-ac-rt-big"><?php _e( 'Well done!', 'imagify' ); ?></p>
|
231 |
+
<p><?php printf( __( 'you saved %1$s out of %2$s', 'imagify' ), '<strong class="imagify-ac-rt-total-gain"></strong>', '<strong class="imagify-ac-rt-total-original"></strong>' ); ?></p>
|
232 |
+
</div>
|
233 |
+
</div>
|
234 |
+
<div class="imagify-ac-share">
|
235 |
+
<div class="imagify-ac-share-content">
|
236 |
+
<p><?php _e( 'Share your awesome result', 'imagify' ); ?></p>
|
237 |
+
<ul class="imagify-share-networks">
|
238 |
+
<li>
|
239 |
+
<a target="_blank" class="imagify-sn-twitter" href=""><svg viewBox="0 0 23 18" width="23" height="18" xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="evenodd"><title>Twitter</title><path d="m244.15 12.13c-.815.361-1.691.606-2.61.716.939-.563 1.659-1.453 1.998-2.514-.878.521-1.851.898-2.886 1.103-.829-.883-2.01-1.435-3.317-1.435-2.51 0-4.544 2.034-4.544 4.544 0 .356.04.703.118 1.035-3.777-.19-7.125-1.999-9.367-4.748-.391.671-.615 1.452-.615 2.285 0 1.576.802 2.967 2.02 3.782-.745-.024-1.445-.228-2.058-.568-.001.019-.001.038-.001.057 0 2.202 1.566 4.04 3.646 4.456-.381.104-.783.159-1.197.159-.293 0-.577-.028-.855-.081.578 1.805 2.256 3.119 4.245 3.156-1.555 1.219-3.515 1.945-5.644 1.945-.367 0-.728-.021-1.084-.063 2.01 1.289 4.399 2.041 6.966 2.041 8.359 0 12.929-6.925 12.929-12.929 0-.197-.004-.393-.013-.588.888-.64 1.658-1.44 2.268-2.352" transform="translate(-222-10)" fill="#fff"/></g></svg></a>
|
240 |
+
</li>
|
241 |
+
<li>
|
242 |
+
<a target="_blank" class="imagify-sn-twitter-facebook" href="<?php echo esc_url('https://www.facebook.com/sharer/sharer.php?u=https://wordpress.org/plugins/imagify' ); ?>"><svg viewBox="0 0 18 18" width="18" height="18" xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="evenodd"><title>Facebook</title><path d="m203.25 10h-16.5c-.415 0-.75.336-.75.75v16.5c0 .414.336.75.75.75h8.812v-6.75h-2.25v-2.813h2.25v-2.25c0-2.325 1.472-3.469 3.546-3.469.993 0 1.847.074 2.096.107v2.43h-1.438c-1.128 0-1.391.536-1.391 1.322v1.859h2.813l-.563 2.813h-2.25l.045 6.75h4.83c.414 0 .75-.336.75-.75v-16.5c0-.414-.336-.75-.75-.75" transform="translate(-186-10)" fill="#fff"/></g></svg></a>
|
243 |
+
</li>
|
244 |
+
</ul>
|
245 |
+
</div>
|
246 |
+
</div>
|
247 |
+
</div>
|
248 |
+
</div>
|
249 |
+
|
250 |
+
<div class="imagify-bulk-table">
|
251 |
+
<table summary="<?php _e( 'Compression process results', 'imagify' ); ?>">
|
252 |
+
<thead>
|
253 |
+
<tr>
|
254 |
+
<th class="imagify-cell-filename"><?php _e( 'Filename', 'imagify' ); ?></th>
|
255 |
+
<th class="imagify-cell-status"><?php _e( 'Status', 'imagify' ); ?></th>
|
256 |
+
<th class="imagify-cell-original"><?php _e( 'Original', 'imagify' ); ?></th>
|
257 |
+
<th class="imagify-cell-optimized"><?php _e( 'Optimized', 'imagify' ); ?></th>
|
258 |
+
<th class="imagify-cell-percentage"><?php _e( 'Percentage', 'imagify' ); ?></th>
|
259 |
+
<th class="imagify-cell-thumbnails"><?php _e( 'Thumbnails optimized', 'imagify' ); ?></th>
|
260 |
+
<th class="imagify-cell-savings"><?php _e( 'Overall saving', 'imagify' ); ?></th>
|
261 |
+
</tr>
|
262 |
+
</thead>
|
263 |
+
<tfoot>
|
264 |
+
<tr>
|
265 |
+
<td class="imagify-cell-nb-files"><span class="imagify-nb-files">0</span> <?php _e( 'file', 'imagify' ); ?></td>
|
266 |
+
<td class="imagify-cell-errors"><span class="imagify-nb-errors">0</span> <?php _e( 'error', 'imagify' ); ?></td>
|
267 |
+
<td class="imagify-cell-totaloriginal" colspan="4"><?php _e( 'Total:', 'imagify' ); ?> <strong><span class="imagify-total-original">0Mb</span></strong></td>
|
268 |
+
<td class="imagify-cell-totalgain"><?php _e( 'Gain:', 'imagify' ); ?> <strong><span class="imagify-total-gain">0Mb</span></strong></td>
|
269 |
+
</tr>
|
270 |
+
</tfoot>
|
271 |
+
<tbody>
|
272 |
+
<!-- The progress bar -->
|
273 |
+
<tr aria-hidden="true" class="imagify-row-progress hidden">
|
274 |
+
<td colspan="7">
|
275 |
+
<div class="media-item">
|
276 |
+
<div class="progress">
|
277 |
+
<div id="imagify-progress-bar" class="bar"><div class="percent">0%</div></div>
|
278 |
+
</div>
|
279 |
+
</div>
|
280 |
+
</td>
|
281 |
+
</tr>
|
282 |
+
<!-- No image uploaded yet -->
|
283 |
+
<tr class="imagify-no-uploaded-yet">
|
284 |
+
<td colspan="7">
|
285 |
+
<p><?php printf( __( '%sStart the bulk optimization%s', 'imagify' ), '<a id="imagify-simulate-bulk-action" href="#">', '</a>' ); ?></p>
|
286 |
+
</td>
|
287 |
+
</tr>
|
288 |
+
</tbody>
|
289 |
+
</table>
|
290 |
+
</div>
|
291 |
+
</div>
|
292 |
+
<?php
|
293 |
+
}
|
inc/admin/ui/notices.php
ADDED
@@ -0,0 +1,259 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
defined( 'ABSPATH' ) or die( 'Cheatin\' uh?' );
|
3 |
+
|
4 |
+
/**
|
5 |
+
* This warning is displayed when the API key is empty
|
6 |
+
*
|
7 |
+
* @since 1.0
|
8 |
+
*/
|
9 |
+
add_action( 'all_admin_notices', '_imagify_warning_empty_api_key_notice' );
|
10 |
+
function _imagify_warning_empty_api_key_notice() {
|
11 |
+
$current_screen = get_current_screen();
|
12 |
+
$ignored_notices = get_user_meta( $GLOBALS['current_user']->ID, '_imagify_ignore_notices', true );
|
13 |
+
$cap = ( imagify_is_active_for_network() ) ? 'manage_network_options' : 'manage_options';
|
14 |
+
|
15 |
+
if ( ( isset( $current_screen ) && ( 'settings_page_imagify' === $current_screen->base || 'settings_page_imagify-network' === $current_screen->base ) ) || in_array( 'welcome-steps', (array) $ignored_notices ) || get_imagify_option( 'api_key', false ) || ! current_user_can( apply_filters( 'imagify_capacity', $cap ) ) ) {
|
16 |
+
return;
|
17 |
+
}
|
18 |
+
?>
|
19 |
+
<div class="imagify-welcome">
|
20 |
+
<div class="imagify-title">
|
21 |
+
<img class="imagify-logo" src="<?php echo IMAGIFY_ASSETS_IMG_URL; ?>imagify-logo.png" width="225" height="26" alt="Imagify" /> <small><sup><?php echo IMAGIFY_VERSION; ?></sup></small>
|
22 |
+
<span class="baseline">
|
23 |
+
<?php _e( 'Welcome to Imagify, the best way to easily optimize your images!', 'imagify' ); ?>
|
24 |
+
</span>
|
25 |
+
<a href="<?php echo get_imagify_admin_url( 'dismiss-notice', 'welcome-steps' ); ?>" class="imagify-notice-dismiss imagify-welcome-remove" title="<?php _e( 'Dismiss this notice', 'imagify' ); ?>"><span class="dashicons dashicons-dismiss"></span><span class="screen-reader-text"><?php _e( 'Dismiss this notice', 'imagify' ); ?></span></a>
|
26 |
+
</div>
|
27 |
+
<div class="imagify-settings-section">
|
28 |
+
<div class="imagify-columns counter">
|
29 |
+
<div class="col-1-3">
|
30 |
+
<img src="<?php echo IMAGIFY_ASSETS_IMG_URL; ?>user.svg" width="48" height="48" alt="">
|
31 |
+
<div class="imagify-col-content">
|
32 |
+
<p class="imagify-col-title"><?php _e( 'Create an Account', 'imagify' ); ?></p>
|
33 |
+
<p class="imagify-col-desc"><?php _e( 'Don\'t have an Imagify account yet? Optimize your images by creating an account in a few seconds!', 'imagify' ); ?></p>
|
34 |
+
<p>
|
35 |
+
<?php wp_nonce_field( 'imagify-signup', 'imagifysignupnonce', false ); ?>
|
36 |
+
<a id="imagify-signup" href="<?php echo IMAGIFY_APP_MAIN; ?>/#/register" class="button button-primary"><?php _e( 'Sign up, It\'s FREE!', 'imagify' ); ?></a></p>
|
37 |
+
</div>
|
38 |
+
</div>
|
39 |
+
<div class="col-1-3">
|
40 |
+
<img src="<?php echo IMAGIFY_ASSETS_IMG_URL; ?>key.svg" width="48" height="48" alt="">
|
41 |
+
<div class="imagify-col-content">
|
42 |
+
<p class="imagify-col-title"><?php _e( 'Enter your API Key', 'imagify' ); ?></p>
|
43 |
+
<p class="imagify-col-desc"><?php printf( __( 'Save your API Key you have received by email or you can get it on your %sImagify account page%s.', 'imagify' ), '<a href="' . IMAGIFY_APP_MAIN . '/#/api">', '</a>' ); ?></p>
|
44 |
+
<p>
|
45 |
+
<?php wp_nonce_field( 'imagify-check-api-key', 'imagifycheckapikeynonce', false ); ?>
|
46 |
+
<a id="imagify-save-api-key" href="<?php echo get_imagify_admin_url(); ?>" class="button button-primary"><?php _e( 'I have my API key', 'imagify' ); ?></a></p>
|
47 |
+
</div>
|
48 |
+
</div>
|
49 |
+
<div class="col-1-3">
|
50 |
+
<img src="<?php echo IMAGIFY_ASSETS_IMG_URL; ?>gear.svg" width="48" height="48" alt="">
|
51 |
+
<div class="imagify-col-content">
|
52 |
+
<p class="imagify-col-title"><?php _e( 'Configure it', 'imagify' ); ?></p>
|
53 |
+
<p class="imagify-col-desc"><?php _e( 'It’s almost done! You have just to configure your optimization settings.', 'imagify' ); ?></p>
|
54 |
+
<p><a href="<?php echo get_imagify_admin_url(); ?>" class="button button-primary"><?php _e( 'Go to Settings', 'imagify' ); ?></a></p>
|
55 |
+
</div>
|
56 |
+
</div>
|
57 |
+
</div>
|
58 |
+
</div>
|
59 |
+
</div>
|
60 |
+
<?php
|
61 |
+
}
|
62 |
+
|
63 |
+
/**
|
64 |
+
* This warning is displayed when the API key is empty
|
65 |
+
*
|
66 |
+
* @since 1.0
|
67 |
+
*/
|
68 |
+
add_action( 'all_admin_notices', '_imagify_warning_wrong_api_key_notice' );
|
69 |
+
function _imagify_warning_wrong_api_key_notice() {
|
70 |
+
$current_screen = get_current_screen();
|
71 |
+
$ignored_notices = get_user_meta( $GLOBALS['current_user']->ID, '_imagify_ignore_notices', true );
|
72 |
+
$api_key = get_imagify_option( 'api_key', false );
|
73 |
+
$cap = ( imagify_is_active_for_network() ) ? 'manage_network_options' : 'manage_options';
|
74 |
+
|
75 |
+
if ( ( isset( $current_screen ) && 'media_page_imagify-bulk-optimization' !== $current_screen->base ) || in_array( 'wrong-api-key', (array) $ignored_notices ) || empty( $api_key ) || imagify_valid_key() || ! current_user_can( apply_filters( 'imagify_capacity', $cap ) ) ) {
|
76 |
+
return;
|
77 |
+
}
|
78 |
+
?>
|
79 |
+
<div class="clear"></div>
|
80 |
+
<div class="error imagify-notice below-h2">
|
81 |
+
<div class="imagify-notice-logo">
|
82 |
+
<img class="imagify-logo" src="<?php echo IMAGIFY_ASSETS_IMG_URL; ?>imagify-logo.png" width="138" height="16" alt="Imagify" />
|
83 |
+
</div>
|
84 |
+
<div class="imagify-notice-content">
|
85 |
+
<p class="imagify-notice-title"><strong><?php _e( 'Your API key isn\'t valid!', 'imagify' ); ?></strong></p>
|
86 |
+
<p>
|
87 |
+
<?php wp_nonce_field( 'imagify-signup', 'imagifysignupnonce', false ); ?>
|
88 |
+
<?php printf( __( 'Go to your Imagify account page to get your API Key and specify it on %1$syour settings%3$s or %2$screate an account for free%3$s if you don\'t have one yet.', 'imagify' ), '<a href="' . get_imagify_admin_url() . '">', '<a id="imagify-signup" href="' . IMAGIFY_WEB_MAIN . '">', '</a>' ); ?></p>
|
89 |
+
</div>
|
90 |
+
<a href="<?php echo get_imagify_admin_url( 'dismiss-notice', 'wrong-api-key' ); ?>" class="imagify-notice-dismiss notice-dismiss" title="<?php esc_attr_e( 'Dismiss this notice', 'imagify' ); ?>"><span class="screen-reader-text"><?php _e( 'Dismiss this notice', 'imagify' ); ?></span></a>
|
91 |
+
</div>
|
92 |
+
|
93 |
+
<?php
|
94 |
+
}
|
95 |
+
|
96 |
+
/**
|
97 |
+
* This warning is displayed when some plugins may conflict with Imagify
|
98 |
+
*
|
99 |
+
* @since 1.0
|
100 |
+
*/
|
101 |
+
add_action( 'all_admin_notices', '_imagify_warning_plugins_to_deactivate_notice' );
|
102 |
+
function _imagify_warning_plugins_to_deactivate_notice() {
|
103 |
+
$plugins_to_deactivate = array();
|
104 |
+
$cap = ( imagify_is_active_for_network() ) ? 'manage_network_options' : 'manage_options';
|
105 |
+
|
106 |
+
// Deactivate all plugins who can cause conflicts with Imagify
|
107 |
+
$plugins = array(
|
108 |
+
'wp-smush' => 'wp-smushit/wp-smush.php', // WP Smush
|
109 |
+
'kraken' => 'kraken-image-optimizer/kraken.php', // Kraken.io
|
110 |
+
'tinypng' => 'tiny-compress-images/tiny-compress-images.php', // TinyPNG
|
111 |
+
'shortpixel' => 'shortpixel-image-optimiser/wp-shortpixel.php', // Shortpixel
|
112 |
+
'ewww' => 'ewww-image-optimizer/ewww-image-optimizer.php', // EWWW Image Optimizer
|
113 |
+
'ewww-cloud' => 'ewww-image-optimizer-cloud/ewww-image-optimizer-cloud.php', // EWWW Image Optimizer Cloud
|
114 |
+
'imagerecycle' => 'imagerecycle-pdf-image-compression/wp-image-recycle.php', // ImageRecycle
|
115 |
+
);
|
116 |
+
|
117 |
+
/**
|
118 |
+
* Filter the recommended plugins to deactivate to prevent conflicts
|
119 |
+
*
|
120 |
+
* @since 1.0
|
121 |
+
*
|
122 |
+
* @param string $plugins List of recommended plugins to deactivate
|
123 |
+
*/
|
124 |
+
$plugins = apply_filters( 'imagify_plugins_to_deactivate', $plugins );
|
125 |
+
$plugins = array_filter( $plugins, 'is_plugin_active' );
|
126 |
+
|
127 |
+
/** This filter is documented in inc/admin/options.php */
|
128 |
+
if ( ! (bool) $plugins || ! current_user_can( apply_filters( 'imagify_capacity', $cap ) ) ) {
|
129 |
+
return;
|
130 |
+
}
|
131 |
+
?>
|
132 |
+
<div class="clear"></div>
|
133 |
+
<div class="imagify-notice error below-h2">
|
134 |
+
<div class="imagify-notice-logo">
|
135 |
+
<img class="imagify-logo" src="<?php echo IMAGIFY_ASSETS_IMG_URL; ?>imagify-logo.png" width="138" height="16" alt="Imagify" />
|
136 |
+
</div>
|
137 |
+
<div class="imagify-notice-content">
|
138 |
+
<p><?php _e( 'The following plugins are not compatible with this plugin and may cause unexpected results:', 'imagify' ); ?></p>
|
139 |
+
|
140 |
+
<ul class="imagify-plugins-error">
|
141 |
+
<?php
|
142 |
+
foreach ( $plugins as $plugin ) {
|
143 |
+
$plugin_data = get_plugin_data( WP_PLUGIN_DIR . DIRECTORY_SEPARATOR . $plugin );
|
144 |
+
echo '<li>' . $plugin_data['Name'] . '</span> <a href="' . wp_nonce_url( admin_url( 'admin-post.php?action=imagify_deactivate_plugin&plugin=' . urlencode( $plugin ) ), 'imagifydeactivatepluginnonce' ) . '" class="button button-mini alignright">' . __( 'Deactivate', 'imagify' ) . '</a></li>';
|
145 |
+
}
|
146 |
+
?>
|
147 |
+
</ul>
|
148 |
+
</div>
|
149 |
+
</div>
|
150 |
+
<?php
|
151 |
+
}
|
152 |
+
|
153 |
+
/**
|
154 |
+
* This notice is displayed when external HTTP requests are blocked via the WP_HTTP_BLOCK_EXTERNAL constant
|
155 |
+
*
|
156 |
+
* @since 1.0
|
157 |
+
*/
|
158 |
+
add_action( 'all_admin_notices', '_imagify_http_block_external_notice' );
|
159 |
+
function _imagify_http_block_external_notice() {
|
160 |
+
$current_screen = get_current_screen();
|
161 |
+
$ignored_notices = get_user_meta( $GLOBALS['current_user']->ID, '_imagify_ignore_notices', true );
|
162 |
+
|
163 |
+
if ( ( isset( $current_screen ) && ( 'settings_page_imagify' === $current_screen->base || 'settings_page_imagify-network' === $current_screen->base ) ) || in_array( 'http-block-external', (array) $ignored_notices ) || ! current_user_can( apply_filters( 'imagify_capacity', 'manage_options' ) ) || ! is_imagify_blocked() ) {
|
164 |
+
return;
|
165 |
+
}
|
166 |
+
?>
|
167 |
+
<div class="clear"></div>
|
168 |
+
<div class="error imagify-notice below-h2">
|
169 |
+
<div class="imagify-notice-logo">
|
170 |
+
<img class="imagify-logo" src="<?php echo IMAGIFY_ASSETS_IMG_URL; ?>imagify-logo.png" width="138" height="16" alt="Imagify" />
|
171 |
+
</div>
|
172 |
+
<div class="imagify-notice-content">
|
173 |
+
<p class="imagify-notice-title"><strong><?php _e( 'The external HTTP requests are blocked!', 'imagify' ); ?></strong></p>
|
174 |
+
<p><?php _e( 'You defined the <code>WP_HTTP_BLOCK_EXTERNAL</code> constant in the <code>wp-config.php</code> to block all external HTTP requests.', 'imagify' ); ?></p>
|
175 |
+
<p>
|
176 |
+
<?php _e( 'To optimize your images, you have to put the following code in your <code>wp-config.php</code> file so that it works correctly.', 'imagify' ); ?><br/>
|
177 |
+
<?php _e( 'Click on the field and press Ctrl-A to select all.', 'imagify' ); ?>
|
178 |
+
</p>
|
179 |
+
<p><textarea readonly="readonly" class="large-text readonly" rows="1">define( 'WP_ACCESSIBLE_HOSTS', '*.imagify.io' );</textarea></p>
|
180 |
+
</div>
|
181 |
+
<a href="<?php echo get_imagify_admin_url( 'dismiss-notice', 'http-block-external' ); ?>" class="imagify-notice-dismiss notice-dismiss" title="<?php esc_attr_e( 'Dismiss this notice', 'imagify' ); ?>"><span class="screen-reader-text"><?php _e( 'Dismiss this notice', 'imagify' ); ?></span></a>
|
182 |
+
</div>
|
183 |
+
<?php
|
184 |
+
}
|
185 |
+
|
186 |
+
/**
|
187 |
+
* This warning is displayed when the grid view is active on the library
|
188 |
+
*
|
189 |
+
* @since 1.0.2
|
190 |
+
*/
|
191 |
+
add_action( 'all_admin_notices', '_imagify_warning_grid_view_notice' );
|
192 |
+
function _imagify_warning_grid_view_notice() {
|
193 |
+
global $wp_version;
|
194 |
+
$current_screen = get_current_screen();
|
195 |
+
$ignored_notices = get_user_meta( $GLOBALS['current_user']->ID, '_imagify_ignore_notices', true );
|
196 |
+
$media_library_mode = get_user_option( 'media_library_mode', get_current_user_id() );
|
197 |
+
|
198 |
+
if ( ( isset( $current_screen ) && 'upload' !== $current_screen->base ) || in_array( 'grid-view', (array) $ignored_notices ) || ! current_user_can( 'upload_files' ) || $media_library_mode == 'list' || version_compare( $wp_version, '4.0' ) < 0 ) {
|
199 |
+
return;
|
200 |
+
}
|
201 |
+
|
202 |
+
// Don't display the notice if the API key isn't valid
|
203 |
+
if ( ! imagify_valid_key() ) {
|
204 |
+
return;
|
205 |
+
}
|
206 |
+
?>
|
207 |
+
<div class="clear"></div>
|
208 |
+
<div class="error imagify-notice below-h2">
|
209 |
+
<div class="imagify-notice-logo">
|
210 |
+
<img class="imagify-logo" src="<?php echo IMAGIFY_ASSETS_IMG_URL; ?>imagify-logo.png" width="138" height="16" alt="Imagify" />
|
211 |
+
</div>
|
212 |
+
<div class="imagify-notice-content">
|
213 |
+
<p class="imagify-notice-title"><strong><?php _e( 'You\'re missing out!', 'imagify' ); ?></strong></p>
|
214 |
+
<p><?php _e( 'Use the List view to optimize images with Imagify.', 'imagify' ); ?></p>
|
215 |
+
<p><a href="<?php echo admin_url( 'upload.php?mode=list' ); ?>"><?php _e( 'Switch to the List View', 'imagify' ); ?></a></p>
|
216 |
+
</div>
|
217 |
+
<a href="<?php echo get_imagify_admin_url( 'dismiss-notice', 'grid-view' ); ?>" class="imagify-notice-dismiss notice-dismiss" title="<?php esc_attr_e( 'Dismiss this notice', 'imagify' ); ?>"><span class="screen-reader-text"><?php _e( 'Dismiss this notice', 'imagify' ); ?></span></a>
|
218 |
+
</div>
|
219 |
+
<?php
|
220 |
+
}
|
221 |
+
|
222 |
+
/**
|
223 |
+
*
|
224 |
+
*
|
225 |
+
* @since 1.1.1
|
226 |
+
*/
|
227 |
+
add_action( 'all_admin_notices', '_imagify_warning_over_quota_notice' );
|
228 |
+
function _imagify_warning_over_quota_notice() {
|
229 |
+
$current_screen = get_current_screen();
|
230 |
+
$ignored_notices = get_user_meta( $GLOBALS['current_user']->ID, '_imagify_ignore_notices', true );
|
231 |
+
$cap = ( imagify_is_active_for_network() ) ? 'manage_network_options' : 'manage_options';
|
232 |
+
|
233 |
+
if ( ( isset( $current_screen ) && ( 'media_page_imagify-bulk-optimization' !== $current_screen->base && 'settings_page_imagify' !== $current_screen->base && 'settings_page_imagify-network' !== $current_screen->base ) ) || in_array( 'free-over-quota', (array) $ignored_notices ) || ! current_user_can( apply_filters( 'imagify_capacity', $cap ) ) ) {
|
234 |
+
return;
|
235 |
+
}
|
236 |
+
|
237 |
+
$user = new Imagify_User();
|
238 |
+
|
239 |
+
// Don't display the notice if the user doesn't use all his quota or the API key isn't valid
|
240 |
+
if ( ! $user->is_over_quota() || ! imagify_valid_key() ) {
|
241 |
+
return;
|
242 |
+
}
|
243 |
+
|
244 |
+
?>
|
245 |
+
<div class="clear"></div>
|
246 |
+
<div class="error imagify-notice below-h2">
|
247 |
+
<div class="imagify-notice-logo">
|
248 |
+
<img class="imagify-logo" src="<?php echo IMAGIFY_ASSETS_IMG_URL; ?>imagify-logo.png" width="138" height="16" alt="Imagify" />
|
249 |
+
</div>
|
250 |
+
<div class="imagify-notice-content">
|
251 |
+
<p class="imagify-notice-title"><strong><?php _e( 'Oops, It\'s Over!', 'imagify' ); ?></strong></p>
|
252 |
+
<p>
|
253 |
+
<?php printf( __( 'You have consumed all your credit for this month. You will have <strong>%s back on %s</strong>.', 'imagify' ), size_format( $user->quota * 1048576 ), date_i18n( get_option( 'date_format' ), strtotime( $user->next_date_update ) ) ) . '<br/><br/>' . sprintf( __( 'To continue to optimize your images, log in to your Imagify account to %sbuy a pack or subscribe to a plan%s.', 'imagify' ), '<a href="' . IMAGIFY_APP_MAIN . '/#/subscription' . '">', '</a>' ); ?>
|
254 |
+
</p>
|
255 |
+
</div>
|
256 |
+
<a href="<?php echo get_imagify_admin_url( 'dismiss-notice', 'free-over-quota' ); ?>" class="imagify-notice-dismiss notice-dismiss" title="<?php esc_attr_e( 'Dismiss this notice', 'imagify' ); ?>"><span class="screen-reader-text"><?php _e( 'Dismiss this notice', 'imagify' ); ?></span></a>
|
257 |
+
</div>
|
258 |
+
<?php
|
259 |
+
}
|
inc/admin/ui/options.php
ADDED
@@ -0,0 +1,487 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
defined( 'ABSPATH' ) or die( 'Cheatin\' uh?' );
|
3 |
+
|
4 |
+
/**
|
5 |
+
* The main settings page construtor using the required functions from WP
|
6 |
+
*
|
7 |
+
* @since 1.0
|
8 |
+
*/
|
9 |
+
function _imagify_display_options_page() {
|
10 |
+
global $_wp_additional_image_sizes, $wp_version;
|
11 |
+
?>
|
12 |
+
<div class="wrap imagify-settings">
|
13 |
+
<?php
|
14 |
+
if ( ! defined( 'WP_ROCKET_VERSION' ) ) { ?>
|
15 |
+
<div class="imagify-col imagify-sidebar">
|
16 |
+
<div class="imagify-sidebar-section">
|
17 |
+
<span class="imagify-sidebar-title">
|
18 |
+
<img src="<?php echo IMAGIFY_ASSETS_IMG_URL; ?>phone.svg" width="19" height="16" alt=""> <?php _e( 'Is your website too slow?', 'imagify' ); ?>
|
19 |
+
</span>
|
20 |
+
<ul class="wp-media-products">
|
21 |
+
<li>
|
22 |
+
<div class="links wprocket-link">
|
23 |
+
<p><strong>
|
24 |
+
<?php _e( 'Discover the best caching plugin to speed up your website.', 'imagify' ); ?>
|
25 |
+
</strong></p>
|
26 |
+
|
27 |
+
<p class="imagify-big-text">
|
28 |
+
<?php
|
29 |
+
$discount_percent = '20%';
|
30 |
+
$discount_code = 'IMAGIFY20';
|
31 |
+
|
32 |
+
printf( __( '%sGet %s off%s with this coupon code:%s', 'imagify' ), '<span class="imagify-mark-styled"><span>', '<strong>' . $discount_percent, '</strong></span></span>', '<span class="imagify-discount-code">' . $discount_code . '</span>' );
|
33 |
+
?>
|
34 |
+
</p>
|
35 |
+
|
36 |
+
<p>
|
37 |
+
<a class="btn btn-rocket" href="http://wp-rocket.me/?utm_source=imagify&utm_medium=plugin&utm_campaign=coupon-code"><?php _e( 'Get WP Rocket now', 'imagify' ); ?></a>
|
38 |
+
</p>
|
39 |
+
</div>
|
40 |
+
</li>
|
41 |
+
</ul>
|
42 |
+
</div>
|
43 |
+
</div>
|
44 |
+
<?php
|
45 |
+
}
|
46 |
+
?>
|
47 |
+
|
48 |
+
<div class="imagify-col">
|
49 |
+
<?php $heading_tag = version_compare( $GLOBALS['wp_version'], '4.3' ) >= 0 ? 'h1' : 'h2'; ?>
|
50 |
+
<div class="imagify-title">
|
51 |
+
<img width="225" height="26" alt="Imagify" src="<?php echo IMAGIFY_ASSETS_IMG_URL; ?>imagify-logo.png" class="imagify-logo" /> <small><sup><?php echo IMAGIFY_VERSION; ?></sup></small>
|
52 |
+
|
53 |
+
<?php $imagify_rate_url = 'https://wordpress.org/support/view/plugin-reviews/imagify?rate=5#postform'; ?>
|
54 |
+
<p class="imagify-rate-us">
|
55 |
+
<?php printf( __( '%sDo you like this plugin?%s Please take a few seconds to %srate it on WordPress.org%s!', 'imagify' ), '<strong>', '</strong><br />', '<a href="' . $imagify_rate_url . '">', '</a>' ); ?>
|
56 |
+
<br>
|
57 |
+
<a class="stars" href="<?php echo $imagify_rate_url; ?>"><?php echo str_repeat( '<span class="dashicons dashicons-star-filled"></span>', 5 ); ?></a>
|
58 |
+
</p>
|
59 |
+
</div>
|
60 |
+
<?php $form_action = ( imagify_is_active_for_network() ) ? admin_url( 'admin-post.php' ) : admin_url( 'options.php' ); ?>
|
61 |
+
<form action="<?php echo $form_action; ?>" id="imagify-settings" method="post">
|
62 |
+
|
63 |
+
<?php settings_fields( IMAGIFY_SLUG ); ?>
|
64 |
+
<?php wp_nonce_field( 'imagify-signup', 'imagifysignupnonce', false ); ?>
|
65 |
+
<?php wp_nonce_field( 'imagify-check-api-key', 'imagifycheckapikeynonce', false ); ?>
|
66 |
+
|
67 |
+
<input id="check_api_key" type="hidden" value="<?php echo esc_attr( get_imagify_option( 'api_key' ) ); ?>" name="check_api_key">
|
68 |
+
<input id="version" type="hidden" value="<?php echo esc_attr( get_imagify_option( 'version' ) ); ?>" name="<?php echo IMAGIFY_SETTINGS_SLUG; ?>[version]">
|
69 |
+
|
70 |
+
<h3 class="screen-reader-text"><?php _e( 'Settings' ); ?></h3>
|
71 |
+
|
72 |
+
<?php
|
73 |
+
if ( ! defined( 'IMAGIFY_API_KEY' ) || ! IMAGIFY_API_KEY ) { ?>
|
74 |
+
<div class="imagify-sub-header">
|
75 |
+
<table class="form-table">
|
76 |
+
<tbody>
|
77 |
+
<tr>
|
78 |
+
<th scope="row"><label for="api_key"><?php _e( 'API Key', 'imagify' ); ?></label></th>
|
79 |
+
<td>
|
80 |
+
<input type="text" size="35" value="<?php echo esc_attr( get_imagify_option( 'api_key' ) ); ?>" name="<?php echo IMAGIFY_SETTINGS_SLUG; ?>[api_key]" id="api_key">
|
81 |
+
<?php
|
82 |
+
if ( imagify_valid_key() ) {
|
83 |
+
?>
|
84 |
+
<span id="imagify-check-api-container" class="imagify-valid">
|
85 |
+
<span class="dashicons dashicons-yes"></span> <?php _e( 'Your API key is valid.', 'imagify' ); ?>
|
86 |
+
</span>
|
87 |
+
<?php
|
88 |
+
} elseif ( ! imagify_valid_key() && get_imagify_option( 'api_key', false ) ) { ?>
|
89 |
+
|
90 |
+
<span id="imagify-check-api-container">
|
91 |
+
<span class="dashicons dashicons-no"></span> <?php _e( 'Your API key isn\'t valid!', 'imagify' ); ?>
|
92 |
+
</span>
|
93 |
+
|
94 |
+
<?php
|
95 |
+
}
|
96 |
+
|
97 |
+
if ( ! get_imagify_option( 'api_key', false ) ) {
|
98 |
+
echo '<p class="description desc api_key">' . sprintf( __( 'Don\'t have an API Key yet? %sCreate one, it\'s FREE%s.', 'imagify' ), '<a id="imagify-signup" href="' . IMAGIFY_APP_MAIN . '/#/register">', '</a>' ) . '</p>';
|
99 |
+
}
|
100 |
+
?>
|
101 |
+
</td>
|
102 |
+
</tr>
|
103 |
+
</tbody>
|
104 |
+
</table>
|
105 |
+
</div>
|
106 |
+
<?php
|
107 |
+
}
|
108 |
+
?>
|
109 |
+
|
110 |
+
<div class="imagify-settings-section <?php echo ( ! imagify_valid_key() ) ? 'hidden' : ''; ?>">
|
111 |
+
<table class="form-table">
|
112 |
+
<tbody>
|
113 |
+
<tr class="imagify-middle">
|
114 |
+
<th scope="row"><?php _e( 'Optimization Level', 'imagify' ); ?></th>
|
115 |
+
<td>
|
116 |
+
<p class="imagify-inline-options">
|
117 |
+
<input type="radio" id="imagify-optimization_level_normal" name="<?php echo IMAGIFY_SETTINGS_SLUG; ?>[optimization_level]" value="0" <?php checked( get_imagify_option( 'optimization_level' ), 0 ); ?>>
|
118 |
+
<label for="imagify-optimization_level_normal">
|
119 |
+
<?php _e( 'Normal', 'imagify' ); ?>
|
120 |
+
</label>
|
121 |
+
|
122 |
+
<input type="radio" id="imagify-optimization_level_aggro" name="<?php echo IMAGIFY_SETTINGS_SLUG; ?>[optimization_level]" value="1" <?php checked( get_imagify_option( 'optimization_level' ), 1 ); ?>>
|
123 |
+
<label for="imagify-optimization_level_aggro">
|
124 |
+
<?php _e( 'Aggressive', 'imagify' ); ?>
|
125 |
+
</label>
|
126 |
+
|
127 |
+
<input type="radio" id="imagify-optimization_level_ultra" name="<?php echo IMAGIFY_SETTINGS_SLUG; ?>[optimization_level]" value="2" <?php checked( get_imagify_option( 'optimization_level' ), 2 ); ?>>
|
128 |
+
<label for="imagify-optimization_level_ultra">
|
129 |
+
<?php _e( 'Ultra', 'imagify' ); ?>
|
130 |
+
</label>
|
131 |
+
|
132 |
+
<span class="imagify-info">
|
133 |
+
<span class="dashicons dashicons-info"></span>
|
134 |
+
<a href="#imagify-more-info" class="imagify-modal-trigger"><?php _e( 'More info?', 'imagify' ); ?></a>
|
135 |
+
</span>
|
136 |
+
</p>
|
137 |
+
|
138 |
+
<p class="imagify-visual-comparison-text">
|
139 |
+
<?php
|
140 |
+
printf(
|
141 |
+
__( 'Need help to choose? %sTry the Visual Comparison%s', 'imagify' ),
|
142 |
+
'<button type="button" class="button button-primary button-mini-flat imagify-visual-comparison-btn imagify-modal-trigger" data-target="#imagify-visual-comparison">',
|
143 |
+
'</button>'
|
144 |
+
);
|
145 |
+
?>
|
146 |
+
</p>
|
147 |
+
</td>
|
148 |
+
</tr>
|
149 |
+
<tr>
|
150 |
+
<th scope="row"><span><?php _e( 'Auto-Optimize images on upload', 'imagify' ); ?></span></th>
|
151 |
+
<td>
|
152 |
+
<input type="checkbox" value="1" name="<?php echo IMAGIFY_SETTINGS_SLUG; ?>[auto_optimize]" id="auto_optimize" <?php checked( get_imagify_option( 'auto_optimize', 0 ), 1 ); ?> aria-describedby="describe-auto-optimize" />
|
153 |
+
<!-- Empty onclick attribute to make clickable labels on iTruc & Mac -->
|
154 |
+
<label for="auto_optimize" onclick=""><span class="screen-reader-text"><?php _e( 'Auto-Optimize images on upload', 'imagify' ); ?></span></label>
|
155 |
+
|
156 |
+
<span id="describe-auto-optimize" class="imagify-info">
|
157 |
+
<span class="dashicons dashicons-info"></span>
|
158 |
+
<?php _e( 'Automatically optimize every image you upload to WordPress.', 'imagify' ); ?>
|
159 |
+
</span>
|
160 |
+
</td>
|
161 |
+
</tr>
|
162 |
+
<tr>
|
163 |
+
<th scope="row"><span><?php _e( 'Backup original images', 'imagify' ); ?></span></th>
|
164 |
+
<td>
|
165 |
+
<input type="checkbox" value="1" name="<?php echo IMAGIFY_SETTINGS_SLUG; ?>[backup]" id="backup" <?php checked( get_imagify_option( 'backup', 0 ), 1 ); ?> aria-describedby="describe-backup" />
|
166 |
+
<label for="backup" onclick=""><span class="screen-reader-text"><?php _e( 'Backup original images', 'imagify' ); ?></span></label>
|
167 |
+
|
168 |
+
<span id="describe-backup" class="imagify-info">
|
169 |
+
<span class="dashicons dashicons-info"></span>
|
170 |
+
<?php _e( 'Keep your original images in a separate folder before optimization process.', 'imagify' ); ?>
|
171 |
+
</span>
|
172 |
+
</td>
|
173 |
+
</tr>
|
174 |
+
<tr>
|
175 |
+
<th scope="row"><span><?php _e( 'Resize larger images', 'imagify' ); ?></span></th>
|
176 |
+
<td>
|
177 |
+
<input type="checkbox" value="1" name="<?php echo IMAGIFY_SETTINGS_SLUG; ?>[resize_larger]" id="resize_larger" <?php checked( get_imagify_option( 'resize_larger', 0 ), 1 ); ?> aria-describedby="describe-resize-larger" />
|
178 |
+
<label for="resize_larger" onclick=""><span class="screen-reader-text"><?php _e( 'Resize larger images', 'imagify' ); ?></span></label>
|
179 |
+
|
180 |
+
<p id="describe-resize-larger" class="imagify-options-line">
|
181 |
+
<?php
|
182 |
+
$max_sizes = get_imagify_max_intermediate_image_size();
|
183 |
+
printf(
|
184 |
+
__( 'to maximum %s pixels width', 'imagify' ),
|
185 |
+
'<input type="number" min="' . $max_sizes['width'] . '" name="' . IMAGIFY_SETTINGS_SLUG . '[resize_larger_w]" value="' . get_imagify_option( 'resize_larger_w', false ). '" size="5">'
|
186 |
+
);
|
187 |
+
?>
|
188 |
+
</p>
|
189 |
+
|
190 |
+
<p class="imagify-checkbox-marged">
|
191 |
+
<span class="imagify-info">
|
192 |
+
<span class="dashicons dashicons-info"></span>
|
193 |
+
|
194 |
+
<?php
|
195 |
+
printf( __( 'This option is recommended to reduce larger images. You can save up to 80%% after resizing. The new width should not be less than your largest thumbnail width, which is actually %spx.', 'imagify' ), $max_sizes['width'] );
|
196 |
+
?>
|
197 |
+
</span>
|
198 |
+
</p>
|
199 |
+
</td>
|
200 |
+
</tr>
|
201 |
+
<tr>
|
202 |
+
<th scope="row"><span><?php _e( 'EXIF Data', 'imagify' ); ?></span></th>
|
203 |
+
<td>
|
204 |
+
<input type="checkbox" value="1" name="<?php echo IMAGIFY_SETTINGS_SLUG; ?>[exif]" id="exif" <?php checked( get_imagify_option( 'exif', 0 ), 1 ); ?> aria-describedby="describe-exif" />
|
205 |
+
<label for="exif" onclick=""><span class="screen-reader-text"><?php _e( 'EXIF Data', 'imagify' ); ?></span></label>
|
206 |
+
|
207 |
+
<span id="describe-exif" class="imagify-info">
|
208 |
+
<span class="dashicons dashicons-info"></span>
|
209 |
+
<?php _e( 'Keep all EXIF data from your images. EXIF are informations stored in your pictures like shutter speed, exposure compensation, ISO, etc...', 'imagify' ); ?>
|
210 |
+
<a href="https://en.wikipedia.org/wiki/Exchangeable_image_file_format" target="_blank"><?php _e( 'Learn more', 'imagify' ); ?></a>
|
211 |
+
<br/><br/>
|
212 |
+
<?php _e( 'If you are a photographer, you may be interested in this option if you are displaying on your pages some info like the model of your camera.', 'imagify' ); ?>
|
213 |
+
|
214 |
+
</span>
|
215 |
+
</td>
|
216 |
+
</tr>
|
217 |
+
<?php
|
218 |
+
if ( ! imagify_is_active_for_network() ) { ?>
|
219 |
+
|
220 |
+
<tr>
|
221 |
+
<th scope="row"><?php _e( 'Files optimization', 'imagify' ); ?></th>
|
222 |
+
<td>
|
223 |
+
<p>
|
224 |
+
<?php _e( 'You can choose to compress different image sizes created by WordPress here.', 'imagify' ); ?>
|
225 |
+
<br/>
|
226 |
+
<?php printf( __( 'The %soriginal size%s is %sautomatically optimized%s by Imagify.', 'imagify' ), '<strong>', '</strong>', '<strong>', '</strong>' ); ?>
|
227 |
+
<br>
|
228 |
+
<span class="imagify-important">
|
229 |
+
<?php _e( 'Remember each additional image size will affect your Imagify monthly usage!', 'imagify' ); ?>
|
230 |
+
</span>
|
231 |
+
</p>
|
232 |
+
|
233 |
+
<br>
|
234 |
+
|
235 |
+
<?php
|
236 |
+
$sizes = array();
|
237 |
+
$is_wp44 = version_compare( $wp_version, '4.4-beta3' ) >= 0;
|
238 |
+
$all_intermediate_image_sizes = get_intermediate_image_sizes();
|
239 |
+
$intermediate_image_sizes = apply_filters( 'image_size_names_choose', $all_intermediate_image_sizes );
|
240 |
+
$all_intermediate_image_sizes = array_combine( $all_intermediate_image_sizes, $all_intermediate_image_sizes );
|
241 |
+
$intermediate_image_sizes = array_merge( $all_intermediate_image_sizes, $intermediate_image_sizes );
|
242 |
+
$wp_image_sizes = $is_wp44 ? array( 'thumbnail', 'medium', 'medium_large', 'large' ) : array( 'thumbnail', 'medium', 'large' );
|
243 |
+
|
244 |
+
// Create the full array with sizes and crop info
|
245 |
+
foreach ( $intermediate_image_sizes as $size => $size_name ) {
|
246 |
+
if ( in_array( $size, $wp_image_sizes ) && ! is_int( $size ) ) {
|
247 |
+
$sizes[ $size ] = array(
|
248 |
+
'width' => get_option( $size . '_size_w' ),
|
249 |
+
'height' => get_option( $size . '_size_h' ),
|
250 |
+
'name' => $size_name,
|
251 |
+
);
|
252 |
+
} elseif ( isset( $_wp_additional_image_sizes[ $size ] ) ) {
|
253 |
+
$sizes[ $size ] = array(
|
254 |
+
'width' => $_wp_additional_image_sizes[ $size ]['width'],
|
255 |
+
'height' => $_wp_additional_image_sizes[ $size ]['height'],
|
256 |
+
'name' => $size_name,
|
257 |
+
);
|
258 |
+
}
|
259 |
+
}
|
260 |
+
|
261 |
+
foreach( $sizes as $size_key => $size_data ) {
|
262 |
+
$label = esc_html( stripslashes( $size_data['name'] ) );
|
263 |
+
$label = sprintf( '%s - %d × %d', $label, $size_data['width'], $size_data['height'] );
|
264 |
+
?>
|
265 |
+
<input type="hidden" name="<?php echo IMAGIFY_SETTINGS_SLUG; ?>[sizes][<?php echo $size_key; ?>-hidden]" value="1" />
|
266 |
+
<input type="checkbox" id="imagify_sizes_<?php echo $size_key; ?>" class="mini" name="<?php echo IMAGIFY_SETTINGS_SLUG; ?>[sizes][<?php echo $size_key; ?>]" value="1" <?php echo ( ! array_key_exists( $size_key, get_imagify_option( 'disallowed-sizes', array() ) ) ) ? 'checked="checked"' : '' ?> />
|
267 |
+
<label for="imagify_sizes_<?php echo $size_key; ?>" onclick=""><?php echo $label; ?></label>
|
268 |
+
<br class="imagify-br">
|
269 |
+
|
270 |
+
<?php
|
271 |
+
}
|
272 |
+
?>
|
273 |
+
</td>
|
274 |
+
</tr>
|
275 |
+
|
276 |
+
<?php
|
277 |
+
}
|
278 |
+
?>
|
279 |
+
</tbody>
|
280 |
+
</table>
|
281 |
+
|
282 |
+
<h3 class="imagify-options-title"><?php _e( 'Display options', 'Imagify' ); ?></h3>
|
283 |
+
|
284 |
+
<table class="form-table">
|
285 |
+
<tbody>
|
286 |
+
<tr>
|
287 |
+
<th scope="row"><span><?php _e( 'Show Admin Bar menu', 'imagify' ); ?></span></th>
|
288 |
+
<td>
|
289 |
+
<input type="checkbox" value="1" name="<?php echo IMAGIFY_SETTINGS_SLUG; ?>[admin_bar_menu]" id="admin_bar_menu" <?php checked( get_imagify_option( 'admin_bar_menu', 0 ), 1 ); ?> aria-describedby="describe-admin-bar-menu" />
|
290 |
+
<!-- Empty onclick attribute to make clickable labels on iTruc & Mac -->
|
291 |
+
<label for="admin_bar_menu" onclick="">
|
292 |
+
<span class="screen-reader-text"><?php _e( 'Show Admin Bar menu', 'imagify' ); ?></span>
|
293 |
+
<span class="imagify-visual-label"><?php _e( 'I want this awesome quick access menu on my admin bar.', 'imagify' ); ?></span>
|
294 |
+
</label>
|
295 |
+
|
296 |
+
<p>
|
297 |
+
<img class="imagify-menu-bar-img" src="<?php echo IMAGIFY_ASSETS_IMG_URL . 'imagify-menu-bar.jpg'; ?>" width="300" height="225" alt="">
|
298 |
+
</p>
|
299 |
+
</td>
|
300 |
+
</tr>
|
301 |
+
</tbody>
|
302 |
+
</table>
|
303 |
+
|
304 |
+
</div>
|
305 |
+
<div class="submit">
|
306 |
+
<?php submit_button(); ?>
|
307 |
+
<div class="imagify-bulk-info">
|
308 |
+
<p><?php printf( __( 'Once your settings saved, optimize all your images by using the %sImagify Bulk Optimization%s feature.', 'imagify' ), '<a href="' . get_admin_url() . 'upload.php?page=' . IMAGIFY_SLUG . '-bulk-optimization">', '</a>' ); ?></p>
|
309 |
+
</div>
|
310 |
+
</div>
|
311 |
+
</form>
|
312 |
+
</div>
|
313 |
+
|
314 |
+
<div id="imagify-more-info" class="imagify-modal">
|
315 |
+
<div class="imagify-modal-content">
|
316 |
+
<p class="h2"><?php _e('You can choose three levels of compression', 'imagify'); ?></p>
|
317 |
+
<div class="imagify-columns">
|
318 |
+
<div class="col-1-3">
|
319 |
+
<p class="h3"><?php _e( 'Ultra', 'imagify' ); ?></p>
|
320 |
+
<p>
|
321 |
+
<?php _e( 'This mode will apply all available optimizations for maximum image compression.', 'imagify' ); ?>
|
322 |
+
</p>
|
323 |
+
<p>
|
324 |
+
<?php _e( 'This will provide a huge savings on the initial weight. Sometimes the image quality could be degraded a little.', 'imagify' ); ?>
|
325 |
+
</p>
|
326 |
+
<p>
|
327 |
+
<?php _e( 'If you want the maximum weight reduction, and you agree to lose some quality on the images we recommend using this mode.' , 'imagify' ); ?>
|
328 |
+
</p>
|
329 |
+
</div>
|
330 |
+
<div class="col-1-3">
|
331 |
+
<p class="h3"><?php _e( 'Aggressive', 'imagify' ); ?></p>
|
332 |
+
<p>
|
333 |
+
<?php _e( 'This mode provides perfect optimization of your images without any significant quality loss.', 'imagify' ); ?>
|
334 |
+
</p>
|
335 |
+
<p>
|
336 |
+
<?php _e( 'This will provide a drastic savings on the initial weight, with a small reduction in image quality. Most of the time it\'s not even noticeable.', 'imagify' ); ?>
|
337 |
+
</p>
|
338 |
+
<p>
|
339 |
+
<?php _e( 'If you want the maximum weight reduction, we recommend using this mode.' , 'imagify' ); ?>
|
340 |
+
</p>
|
341 |
+
</div>
|
342 |
+
<div class="col-1-3">
|
343 |
+
<p class="h3"><?php _e( 'Normal', 'imagify' ); ?></p>
|
344 |
+
<p>
|
345 |
+
<?php _e( 'This mode provides lossless optimization, your images will be optimized without any visible change.', 'imagify' ); ?>
|
346 |
+
</p>
|
347 |
+
<p>
|
348 |
+
<?php _e( 'If you want the perfect quality for your images, we recommend you that mode.', 'imagify' ); ?>
|
349 |
+
</p>
|
350 |
+
<p>
|
351 |
+
<em><?php _e( 'Note: the file size reduction will be less, compared to aggressive mode.', 'imagify' ); ?></em>
|
352 |
+
</p>
|
353 |
+
</div>
|
354 |
+
</div>
|
355 |
+
|
356 |
+
<button type="button" class="close-btn">
|
357 |
+
<i class="dashicons dashicons-no-alt" aria-hidden="true"></i>
|
358 |
+
<span class="screen-reader-text"><?php _e( 'Close' ); ?></span>
|
359 |
+
</button>
|
360 |
+
</div>
|
361 |
+
</div>
|
362 |
+
|
363 |
+
|
364 |
+
<div class="imagify-modal" id="imagify-visual-comparison">
|
365 |
+
<div class="imagify-modal-content">
|
366 |
+
|
367 |
+
<p class="imagify-comparison-title">
|
368 |
+
<?php
|
369 |
+
printf (
|
370 |
+
__( 'I want to compare%s and%s', 'imagify'),
|
371 |
+
'<span class="twentytwenty-left-buttons"></span>',
|
372 |
+
'<span class="twentytwenty-right-buttons"></span>'
|
373 |
+
);
|
374 |
+
?>
|
375 |
+
</p>
|
376 |
+
|
377 |
+
<div class="twentytwenty-container"
|
378 |
+
data-loader="<?php echo IMAGIFY_ASSETS_IMG_URL; ?>loader-balls.svg"
|
379 |
+
data-label-original="<?php esc_attr_e( 'Original', 'imagify' ); ?>"
|
380 |
+
data-label-normal="<?php esc_attr_e( 'Normal', 'imagify' ); ?>"
|
381 |
+
data-label-aggressive="<?php esc_attr_e( 'Aggressive', 'imagify' ); ?>"
|
382 |
+
data-label-ultra="<?php esc_attr_e( 'Ultra', 'imagify' ); ?>"
|
383 |
+
|
384 |
+
data-original-label="<?php esc_attr_e( 'Original', 'imagify' ); ?>"
|
385 |
+
data-original-img="<?php echo IMAGIFY_ASSETS_IMG_URL; ?>penseur-original.jpg"
|
386 |
+
data-original-dim="1220x350"
|
387 |
+
data-original-alt="<?php printf( esc_attr__( 'Original photography about %s', 'imagify' ), size_format(405000)); ?>"
|
388 |
+
|
389 |
+
data-normal-label="<?php esc_attr_e( 'Normal', 'imagify' ); ?>"
|
390 |
+
data-normal-img="<?php echo IMAGIFY_ASSETS_IMG_URL; ?>penseur-normal.jpg"
|
391 |
+
data-normal-dim="1220x350"
|
392 |
+
data-normal-alt="<?php printf( esc_attr__( 'Optimized photography about %s', 'imagify' ), size_format(371712) ); ?>"
|
393 |
+
|
394 |
+
data-aggressive-label="<?php esc_attr_e( 'Aggressive', 'imagify' ); ?>"
|
395 |
+
data-aggressive-img="<?php echo IMAGIFY_ASSETS_IMG_URL; ?>penseur-aggressive.jpg"
|
396 |
+
data-aggressive-dim="1220x350"
|
397 |
+
data-aggressive-alt="<?php printf( esc_attr__( 'Optimized photography about %s', 'imagify' ), size_format(143360) ); ?>"
|
398 |
+
|
399 |
+
data-ultra-label="<?php esc_attr_e( 'Ultra', 'imagify' ); ?>"
|
400 |
+
data-ultra-img="<?php echo IMAGIFY_ASSETS_IMG_URL; ?>penseur-ultra.jpg"
|
401 |
+
data-ultra-dim="1220x350"
|
402 |
+
data-ultra-alt="<?php printf( esc_attr__( 'Optimized photography about %s', 'imagify' ), size_format(108544) ); ?>"></div>
|
403 |
+
|
404 |
+
<div class="imagify-comparison-levels">
|
405 |
+
<div class="imagify-c-level imagify-level-original go-left">
|
406 |
+
<p class="imagify-c-level-row">
|
407 |
+
<span class="label"><?php _e( 'Level:', 'imagify' ); ?></span>
|
408 |
+
<span class="value level"><?php _e( 'Original', 'imagify' ); ?></span>
|
409 |
+
</p>
|
410 |
+
<p class="imagify-c-level-row">
|
411 |
+
<span class="label"><?php _e( 'File Size:', 'imagify' ); ?></span>
|
412 |
+
<span class="value"><?php echo size_format(405000); ?></span>
|
413 |
+
</p>
|
414 |
+
</div>
|
415 |
+
<div class="imagify-c-level imagify-level-optimized" aria-hidden="true">
|
416 |
+
<p class="imagify-c-level-row">
|
417 |
+
<span class="label"><?php _e( 'Level:', 'imagify' ); ?></span>
|
418 |
+
<span class="value level"><?php _e( 'Normal', 'imagify' ); ?></span>
|
419 |
+
</p>
|
420 |
+
<p class="imagify-c-level-row">
|
421 |
+
<span class="label"><?php _e( 'File Size:', 'imagify' ); ?></span>
|
422 |
+
<span class="value size"><?php echo size_format(371712); ?></span>
|
423 |
+
</p>
|
424 |
+
<p class="imagify-c-level-row">
|
425 |
+
<span class="label"><?php _e( 'Original Saving:', 'imagify' ); ?></span>
|
426 |
+
<span class="value">
|
427 |
+
<span class="imagify-chart">
|
428 |
+
<span class="imagify-chart-container">
|
429 |
+
<canvas id="imagify-consumption-chart-normal" width="15" height="15"></canvas>
|
430 |
+
</span>
|
431 |
+
</span><span class="imagify-chart-value">10.44</span>%
|
432 |
+
</span>
|
433 |
+
</p>
|
434 |
+
</div>
|
435 |
+
<div class="imagify-c-level imagify-level-aggressive">
|
436 |
+
<p class="imagify-c-level-row">
|
437 |
+
<span class="label"><?php _e( 'Level:', 'imagify' ); ?></span>
|
438 |
+
<span class="value level"><?php _e( 'Aggressive', 'imagify' ); ?></span>
|
439 |
+
</p>
|
440 |
+
<p class="imagify-c-level-row">
|
441 |
+
<span class="label"><?php _e( 'File Size:', 'imagify' ); ?></span>
|
442 |
+
<span class="value size"><?php echo size_format(143360); ?></span>
|
443 |
+
</p>
|
444 |
+
<p class="imagify-c-level-row">
|
445 |
+
<span class="label"><?php _e( 'Original Saving:', 'imagify' ); ?></span>
|
446 |
+
<span class="value">
|
447 |
+
<span class="imagify-chart">
|
448 |
+
<span class="imagify-chart-container">
|
449 |
+
<canvas id="imagify-consumption-chart-aggressive" width="15" height="15"></canvas>
|
450 |
+
</span>
|
451 |
+
</span><span class="imagify-chart-value">65.53</span>%
|
452 |
+
</span>
|
453 |
+
</p>
|
454 |
+
</div>
|
455 |
+
|
456 |
+
<div class="imagify-c-level imagify-level-ultra go-right">
|
457 |
+
<p class="imagify-c-level-row">
|
458 |
+
<span class="label"><?php _e( 'Level:', 'imagify' ); ?></span>
|
459 |
+
<span class="value level"><?php _e( 'Ultra', 'imagify' ); ?></span>
|
460 |
+
</p>
|
461 |
+
<p class="imagify-c-level-row">
|
462 |
+
<span class="label"><?php _e( 'File Size:', 'imagify' ); ?></span>
|
463 |
+
<span class="value size"><?php echo size_format(108544); ?></span>
|
464 |
+
</p>
|
465 |
+
<p class="imagify-c-level-row">
|
466 |
+
<span class="label"><?php _e( 'Original Saving:', 'imagify' ); ?></span>
|
467 |
+
<span class="value">
|
468 |
+
<span class="imagify-chart">
|
469 |
+
<span class="imagify-chart-container">
|
470 |
+
<canvas id="imagify-consumption-chart-ultra" width="15" height="15"></canvas>
|
471 |
+
</span>
|
472 |
+
</span><span class="imagify-chart-value">74.16</span>%
|
473 |
+
</span>
|
474 |
+
</p>
|
475 |
+
</div>
|
476 |
+
</div>
|
477 |
+
|
478 |
+
<button type="button" class="close-btn">
|
479 |
+
<i class="dashicons dashicons-no-alt" aria-hidden="true"></i>
|
480 |
+
<span class="screen-reader-text"><?php _e( 'Close' ); ?></span>
|
481 |
+
</button>
|
482 |
+
</div>
|
483 |
+
</div>
|
484 |
+
|
485 |
+
</div>
|
486 |
+
<?php
|
487 |
+
}
|
inc/admin/upgrader.php
ADDED
@@ -0,0 +1,126 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
defined( 'ABSPATH' ) or die( 'Cheatin’ uh?' );
|
3 |
+
|
4 |
+
/*
|
5 |
+
* Tell WP what to do when admin is loaded aka upgrader
|
6 |
+
*
|
7 |
+
* @since 1.0
|
8 |
+
*/
|
9 |
+
add_action( 'admin_init', '_imagify_upgrader' );
|
10 |
+
function _imagify_upgrader() {
|
11 |
+
$current_version = get_imagify_option( 'version' );
|
12 |
+
|
13 |
+
// You can hook the upgrader to trigger any action when Imagify is upgraded
|
14 |
+
// first install
|
15 |
+
if ( ! $current_version ) {
|
16 |
+
do_action( 'imagify_first_install' );
|
17 |
+
}
|
18 |
+
// already installed but got updated
|
19 |
+
elseif ( IMAGIFY_VERSION != $current_version ) {
|
20 |
+
do_action( 'imagify_upgrade', IMAGIFY_VERSION, $current_version );
|
21 |
+
}
|
22 |
+
|
23 |
+
// If any upgrade has been done, we flush and update version #
|
24 |
+
if ( did_action( 'imagify_first_install' ) || did_action( 'imagify_upgrade' ) ) {
|
25 |
+
$options = get_site_option( IMAGIFY_SETTINGS_SLUG ); // do not use get_imagify_option() here
|
26 |
+
$options['version'] = IMAGIFY_VERSION;
|
27 |
+
|
28 |
+
update_site_option( IMAGIFY_SETTINGS_SLUG, $options );
|
29 |
+
}
|
30 |
+
}
|
31 |
+
|
32 |
+
/**
|
33 |
+
* Keeps this function up to date at each version
|
34 |
+
*
|
35 |
+
* @since 1.0
|
36 |
+
*/
|
37 |
+
add_action( 'imagify_first_install', '_imagify_first_install' );
|
38 |
+
function _imagify_first_install() {
|
39 |
+
// Set a transient to know when we will have to display a notice to ask the user to rate the plugin.
|
40 |
+
set_site_transient( 'imagify_seen_rating_notice', true, DAY_IN_SECONDS * 7 );
|
41 |
+
|
42 |
+
// Create Options
|
43 |
+
add_site_option( IMAGIFY_SETTINGS_SLUG,
|
44 |
+
array(
|
45 |
+
'api_key' => '',
|
46 |
+
'optimization_level' => 1,
|
47 |
+
'auto_optimize' => 1,
|
48 |
+
'backup' => 1,
|
49 |
+
'resize_larger' => '',
|
50 |
+
'resize_larger_w' => '',
|
51 |
+
'exif' => 0,
|
52 |
+
'disallowed-sizes' => array(),
|
53 |
+
'admin_bar_menu' => 1
|
54 |
+
)
|
55 |
+
);
|
56 |
+
}
|
57 |
+
|
58 |
+
/**
|
59 |
+
* What to do when Imagify is updated, depending on versions
|
60 |
+
*
|
61 |
+
* @since 1.0
|
62 |
+
*/
|
63 |
+
add_action( 'imagify_upgrade', '_imagify_new_upgrade', 10, 2 );
|
64 |
+
function _imagify_new_upgrade( $imagify_version, $current_version ) {
|
65 |
+
if ( version_compare( $current_version, '1.2', '<' ) ) {
|
66 |
+
// Update all already optimized images status from 'error' to 'already_optimized'
|
67 |
+
$query = new WP_Query(
|
68 |
+
array(
|
69 |
+
'post_type' => 'attachment',
|
70 |
+
'post_status' => 'inherit',
|
71 |
+
'post_mime_type' => 'image',
|
72 |
+
'meta_key' => '_imagify_status',
|
73 |
+
'meta_value' => 'error',
|
74 |
+
'posts_per_page' => -1,
|
75 |
+
'update_post_term_cache' => false,
|
76 |
+
'no_found_rows' => true,
|
77 |
+
'fields' => 'ids'
|
78 |
+
)
|
79 |
+
);
|
80 |
+
|
81 |
+
$ids = (array) $query->posts;
|
82 |
+
|
83 |
+
foreach ( $ids as $id ) {
|
84 |
+
$attachment = new Imagify_Attachment( $id );
|
85 |
+
$attachment_error = $attachment->get_optimized_error();
|
86 |
+
$attachment_error = trim( $attachment_error );
|
87 |
+
$attachment_status = get_post_meta( $id, '_imagify_status', true );
|
88 |
+
|
89 |
+
if ( false !== strpos( $attachment_error, 'This image is already compressed' ) ) {
|
90 |
+
update_post_meta( $id, '_imagify_status', 'already_optimized' );
|
91 |
+
}
|
92 |
+
}
|
93 |
+
|
94 |
+
// Auto-activate the Admin Bar option
|
95 |
+
$options = get_site_option( IMAGIFY_SETTINGS_SLUG );
|
96 |
+
$options['admin_bar_menu'] = 1;
|
97 |
+
update_site_option( IMAGIFY_SETTINGS_SLUG, $options );
|
98 |
+
}
|
99 |
+
|
100 |
+
if ( version_compare( $current_version, '1.3.2', '<' ) ) {
|
101 |
+
// Update all already optimized images status from 'error' to 'already_optimized'
|
102 |
+
$query = new WP_Query(
|
103 |
+
array(
|
104 |
+
'post_type' => 'attachment',
|
105 |
+
'post_status' => 'inherit',
|
106 |
+
'post_mime_type' => 'image',
|
107 |
+
'meta_key' => '_imagify_data',
|
108 |
+
'posts_per_page' => -1,
|
109 |
+
'update_post_term_cache' => false,
|
110 |
+
'no_found_rows' => true,
|
111 |
+
'fields' => 'ids'
|
112 |
+
)
|
113 |
+
);
|
114 |
+
|
115 |
+
$ids = (array) $query->posts;
|
116 |
+
|
117 |
+
foreach ( $ids as $id ) {
|
118 |
+
$attachment = new Imagify_Attachment( $id );
|
119 |
+
$attachment_stats = $attachment->get_stats_data();
|
120 |
+
|
121 |
+
if ( isset( $attachment_stats['aggressive'] ) ) {
|
122 |
+
update_post_meta( $id, '_imagify_optimization_level', (int) $attachment_stats['aggressive'] );
|
123 |
+
}
|
124 |
+
}
|
125 |
+
}
|
126 |
+
}
|
inc/admin/upload.php
ADDED
@@ -0,0 +1,110 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
defined( 'ABSPATH' ) or die( 'Cheatin\' uh?' );
|
3 |
+
|
4 |
+
/*
|
5 |
+
* Add "Imagify" column in upload.php
|
6 |
+
*
|
7 |
+
* @since 1.0
|
8 |
+
*/
|
9 |
+
add_filter( 'manage_media_columns', '_imagify_manage_media_columns' );
|
10 |
+
function _imagify_manage_media_columns( $columns ) {
|
11 |
+
$columns['imagify_optimized_file'] = __( 'Imagify', 'imagify' );
|
12 |
+
return $columns;
|
13 |
+
}
|
14 |
+
|
15 |
+
add_filter( 'manage_media_custom_column', '_imagify_manage_media_custom_column', 10, 2 );
|
16 |
+
function _imagify_manage_media_custom_column( $column_name, $attachment_id ) {
|
17 |
+
if ( 'imagify_optimized_file' == $column_name ) {
|
18 |
+
echo get_imagify_media_column_content( $attachment_id );
|
19 |
+
}
|
20 |
+
}
|
21 |
+
|
22 |
+
/*
|
23 |
+
* Adds a dropdown that allows filtering on the attachments Imagify status.
|
24 |
+
*
|
25 |
+
* @since 1.0
|
26 |
+
*/
|
27 |
+
add_action( 'restrict_manage_posts', '_imagify_attachments_filter_dropdown' );
|
28 |
+
function _imagify_attachments_filter_dropdown() {
|
29 |
+
if ( 'upload.php' !== $GLOBALS['pagenow'] ) {
|
30 |
+
return;
|
31 |
+
}
|
32 |
+
|
33 |
+
$optimized = imagify_count_optimized_attachments();
|
34 |
+
$unoptimized = imagify_count_unoptimized_attachments();
|
35 |
+
$errors = imagify_count_error_attachments();
|
36 |
+
$status = ( isset( $_GET['imagify-status'] ) ) ? $_GET['imagify-status'] : 0;
|
37 |
+
$options = array(
|
38 |
+
'optimized' => __( 'Optimized','imagify' ),
|
39 |
+
'unoptimized' => __( 'Unoptimized','imagify' ),
|
40 |
+
'errors' => __( 'Errors','imagify' ),
|
41 |
+
);
|
42 |
+
|
43 |
+
$output = '<label class="screen-reader-text" for="filter-by-optimization-status">' . __( 'Filter by status','imagify' ) . '</label>';
|
44 |
+
|
45 |
+
$output .= '<select id="filter-by-optimization-status" name="imagify-status">';
|
46 |
+
$output .= '<option value="0" selected="selected">' . __( 'All images','imagify' ) . '</option>';
|
47 |
+
|
48 |
+
foreach( $options as $value => $label ) {
|
49 |
+
$output .= '<option value="' . $value . '" ' . selected( $status, $value, false ) . '>' . $label . ' (' . ${$value} . ')</option>';
|
50 |
+
}
|
51 |
+
|
52 |
+
$output .= '</select> ';
|
53 |
+
|
54 |
+
echo $output;
|
55 |
+
}
|
56 |
+
|
57 |
+
/**
|
58 |
+
* Modify the query based on the imagify-status variable in $_GET
|
59 |
+
*
|
60 |
+
* @since 1.0
|
61 |
+
*/
|
62 |
+
add_filter( 'request', '_imagify_sort_attachments_by_status' );
|
63 |
+
function _imagify_sort_attachments_by_status( $vars ) {
|
64 |
+
if ( 'upload.php' !== $GLOBALS['pagenow'] || empty( $_GET['imagify-status'] ) ) {
|
65 |
+
return $vars;
|
66 |
+
}
|
67 |
+
|
68 |
+
$status = $_GET['imagify-status'];
|
69 |
+
$meta_key = '_imagify_status';
|
70 |
+
$meta_compare = '=';
|
71 |
+
$relation = array();
|
72 |
+
|
73 |
+
switch( $status ) {
|
74 |
+
case 'unoptimized':
|
75 |
+
$meta_key = '_imagify_data';
|
76 |
+
$meta_compare = 'NOT EXISTS';
|
77 |
+
break;
|
78 |
+
|
79 |
+
case 'optimized':
|
80 |
+
$status = 'success';
|
81 |
+
$relation = array(
|
82 |
+
'key' => $meta_key,
|
83 |
+
'value' => 'already_optimized',
|
84 |
+
'compare' => $meta_compare,
|
85 |
+
);
|
86 |
+
break;
|
87 |
+
|
88 |
+
case 'errors':
|
89 |
+
$status = 'error';
|
90 |
+
break;
|
91 |
+
}
|
92 |
+
|
93 |
+
$vars['post_mime_type'] = get_imagify_mime_type();
|
94 |
+
$vars = array_merge(
|
95 |
+
$vars,
|
96 |
+
array(
|
97 |
+
'meta_query' => array(
|
98 |
+
'relation' => 'or',
|
99 |
+
array(
|
100 |
+
'key' => $meta_key,
|
101 |
+
'value' => $status,
|
102 |
+
'compare' => $meta_compare,
|
103 |
+
),
|
104 |
+
$relation
|
105 |
+
),
|
106 |
+
)
|
107 |
+
);
|
108 |
+
|
109 |
+
return $vars;
|
110 |
+
}
|
inc/api/imagify.php
ADDED
@@ -0,0 +1,313 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Create a new user on Imagify.
|
5 |
+
*
|
6 |
+
* @param array $data All user data.
|
7 |
+
* @return object
|
8 |
+
**/
|
9 |
+
function add_imagify_user( $data ) {
|
10 |
+
return Imagify()->createUser( $data );
|
11 |
+
}
|
12 |
+
|
13 |
+
/**
|
14 |
+
* Update your Imagify account.
|
15 |
+
*
|
16 |
+
* @param string $data All user data.
|
17 |
+
* @return object
|
18 |
+
**/
|
19 |
+
function update_imagify_user( $data ) {
|
20 |
+
return Imagify()->updateUser( $data );
|
21 |
+
}
|
22 |
+
|
23 |
+
/**
|
24 |
+
* Get your Imagify account infos.
|
25 |
+
*
|
26 |
+
* @return object
|
27 |
+
**/
|
28 |
+
function get_imagify_user() {
|
29 |
+
return Imagify()->getUser();
|
30 |
+
}
|
31 |
+
|
32 |
+
/**
|
33 |
+
* Get the Imagify API version.
|
34 |
+
*
|
35 |
+
* @return object
|
36 |
+
**/
|
37 |
+
function get_imagify_api_version() {
|
38 |
+
return Imagify()->getApiVersion();
|
39 |
+
}
|
40 |
+
|
41 |
+
/**
|
42 |
+
* Check your Imagify API key status.
|
43 |
+
*
|
44 |
+
* @return bool
|
45 |
+
**/
|
46 |
+
function get_imagify_status( $data ) {
|
47 |
+
return Imagify()->getStatus( $data );
|
48 |
+
}
|
49 |
+
|
50 |
+
/**
|
51 |
+
* Optimize an image by uploading it on Imagify.
|
52 |
+
*
|
53 |
+
* @param array $data All image data.
|
54 |
+
* @return object
|
55 |
+
**/
|
56 |
+
function fetch_imagify_image( $data ) {
|
57 |
+
return Imagify()->fetchImage( $data );
|
58 |
+
}
|
59 |
+
|
60 |
+
/**
|
61 |
+
* Optimize an image by sharing its URL on Imagify.
|
62 |
+
*
|
63 |
+
* @param array $data All image data.
|
64 |
+
* @return object
|
65 |
+
**/
|
66 |
+
function upload_imagify_image( $data ) {
|
67 |
+
return Imagify()->uploadImage( $data );
|
68 |
+
}
|
69 |
+
|
70 |
+
/**
|
71 |
+
* Imagify.io API for WordPress
|
72 |
+
*/
|
73 |
+
class Imagify {
|
74 |
+
/**
|
75 |
+
* The Imagify API endpoint
|
76 |
+
*/
|
77 |
+
const API_ENDPOINT = 'https://app.imagify.io/api/';
|
78 |
+
|
79 |
+
/**
|
80 |
+
* The Imagify API key
|
81 |
+
*/
|
82 |
+
private $apiKey = '';
|
83 |
+
|
84 |
+
/**
|
85 |
+
* HTTP headers
|
86 |
+
*/
|
87 |
+
private $headers = array();
|
88 |
+
|
89 |
+
/**
|
90 |
+
* @var The single instance of the class
|
91 |
+
*/
|
92 |
+
protected static $_instance = null;
|
93 |
+
|
94 |
+
/**
|
95 |
+
* The constructor
|
96 |
+
*
|
97 |
+
* @return void
|
98 |
+
**/
|
99 |
+
public function __construct()
|
100 |
+
{
|
101 |
+
// check if the WordPress plugin is activated and the API key is stored in the options
|
102 |
+
if ( defined( 'IMAGIFY_VERSION' ) && function_exists( 'get_imagify_option' ) ) {
|
103 |
+
$apiKey = get_imagify_option( 'api_key', false );
|
104 |
+
$this->apiKey = ( $apiKey ) ? $apiKey : $this->apiKey;
|
105 |
+
}
|
106 |
+
|
107 |
+
// check if the API key is defined with the PHP constant (it's ovveride the WordPress plugin option
|
108 |
+
if ( defined( 'IMAGIFY_API_KEY' ) && IMAGIFY_API_KEY ) {
|
109 |
+
$this->apiKey = IMAGIFY_API_KEY;
|
110 |
+
}
|
111 |
+
|
112 |
+
$this->headers['Accept'] = 'Accept: application/json';
|
113 |
+
$this->headers['Content-Type'] = 'Content-Type: application/json';
|
114 |
+
$this->headers['Authorization'] = 'Authorization: token ' . $this->apiKey;
|
115 |
+
}
|
116 |
+
|
117 |
+
/**
|
118 |
+
* Main Imagify Instance
|
119 |
+
*
|
120 |
+
* Ensures only one instance of class is loaded or can be loaded.
|
121 |
+
*
|
122 |
+
* @static
|
123 |
+
* @return Main instance
|
124 |
+
*/
|
125 |
+
public static function instance() {
|
126 |
+
if ( is_null( self::$_instance ) ) {
|
127 |
+
self::$_instance = new self();
|
128 |
+
}
|
129 |
+
|
130 |
+
return self::$_instance;
|
131 |
+
}
|
132 |
+
|
133 |
+
/**
|
134 |
+
* Create a user on your Imagify account.
|
135 |
+
*
|
136 |
+
* @param array $data All user data. Details here: --
|
137 |
+
* @return object
|
138 |
+
**/
|
139 |
+
public function createUser( $data ) {
|
140 |
+
unset( $this->headers['Authorization'], $this->headers['Accept'], $this->headers['Content-Type'] );
|
141 |
+
|
142 |
+
$data['from_plugin'] = true;
|
143 |
+
$args = array(
|
144 |
+
'method' => 'POST',
|
145 |
+
'post_data' => $data
|
146 |
+
);
|
147 |
+
|
148 |
+
return $this->httpCall( 'users/', $args );
|
149 |
+
}
|
150 |
+
|
151 |
+
/**
|
152 |
+
* Get your Imagify account infos.
|
153 |
+
*
|
154 |
+
* @return object
|
155 |
+
**/
|
156 |
+
public function getUser() {
|
157 |
+
static $user;
|
158 |
+
|
159 |
+
if ( ! isset( $user ) ) {
|
160 |
+
$user = $this->httpCall( 'users/me/', array( 'timeout' => 10 ) );
|
161 |
+
}
|
162 |
+
|
163 |
+
return $user;
|
164 |
+
}
|
165 |
+
|
166 |
+
/**
|
167 |
+
* Check your Imagify API key status.
|
168 |
+
*
|
169 |
+
* @return object
|
170 |
+
**/
|
171 |
+
public function getStatus( $data ) {
|
172 |
+
static $status;
|
173 |
+
|
174 |
+
if ( ! isset( $status ) ) {
|
175 |
+
unset( $this->headers['Accept'], $this->headers['Content-Type'] );
|
176 |
+
$this->headers['Authorization'] = 'Authorization: token ' . $data;
|
177 |
+
|
178 |
+
$status = $this->httpCall( 'status/', array( 'timeout' => 10 ) );
|
179 |
+
}
|
180 |
+
|
181 |
+
return $status;
|
182 |
+
}
|
183 |
+
|
184 |
+
/**
|
185 |
+
* Get the Imagify API version.
|
186 |
+
*
|
187 |
+
* @return object
|
188 |
+
**/
|
189 |
+
public function getApiVersion() {
|
190 |
+
static $api_version;
|
191 |
+
|
192 |
+
if ( ! isset( $api_version ) ) {
|
193 |
+
unset( $this->headers['Accept'], $this->headers['Content-Type'] );
|
194 |
+
|
195 |
+
$api_version = $this->httpCall( 'version/', array( 'timeout' => 5 ) );
|
196 |
+
}
|
197 |
+
|
198 |
+
return $api_version;
|
199 |
+
}
|
200 |
+
|
201 |
+
/**
|
202 |
+
* Update an existing user on your Imagify account.
|
203 |
+
*
|
204 |
+
* @param string $data All user data. Details here: --
|
205 |
+
* @return object
|
206 |
+
**/
|
207 |
+
public function updateUser( $data ) {
|
208 |
+
$args = array(
|
209 |
+
'method' => 'PUT',
|
210 |
+
'post_data' => $data,
|
211 |
+
'timeout' => 10
|
212 |
+
);
|
213 |
+
|
214 |
+
return $this->httpCall( 'users/me/', $args );
|
215 |
+
}
|
216 |
+
|
217 |
+
/**
|
218 |
+
* Optimize an image from its binary content.
|
219 |
+
*
|
220 |
+
* @param string $data All options. Details here: --
|
221 |
+
* @return object
|
222 |
+
**/
|
223 |
+
public function uploadImage( $data ) {
|
224 |
+
if ( isset( $this->headers['Accept'], $this->headers['Content-Type'] ) ) {
|
225 |
+
unset( $this->headers['Accept'], $this->headers['Content-Type'] );
|
226 |
+
}
|
227 |
+
|
228 |
+
$args = array(
|
229 |
+
'method' => 'POST',
|
230 |
+
'post_data' => $data
|
231 |
+
);
|
232 |
+
|
233 |
+
return $this->httpCall( 'upload/', $args );
|
234 |
+
}
|
235 |
+
|
236 |
+
/**
|
237 |
+
* Optimize an image from its URL.
|
238 |
+
*
|
239 |
+
* @param string $data All options. Details here: --
|
240 |
+
* @return object
|
241 |
+
**/
|
242 |
+
public function fetchImage( $data ) {
|
243 |
+
$args = array(
|
244 |
+
'method' => 'POST',
|
245 |
+
'post_data' => json_encode( $data )
|
246 |
+
);
|
247 |
+
return $this->httpCall( 'fetch/', $args );
|
248 |
+
}
|
249 |
+
|
250 |
+
/**
|
251 |
+
* Make an HTTP call using curl.
|
252 |
+
*
|
253 |
+
* @param string $url The URL to call
|
254 |
+
* @param array $args The request args
|
255 |
+
* @return object
|
256 |
+
**/
|
257 |
+
private function httpCall( $url, $args = array() ) {
|
258 |
+
$default = array(
|
259 |
+
'method' => 'GET',
|
260 |
+
'post_data' => null,
|
261 |
+
'timeout' => 45
|
262 |
+
);
|
263 |
+
$args = array_merge( $default, $args );
|
264 |
+
|
265 |
+
// Check if php-curl is enabled
|
266 |
+
if ( ! function_exists( 'curl_init' ) || ! function_exists( 'curl_exec' ) ) {
|
267 |
+
return new WP_Error( 'curl', 'cURL isn\'t installed on the server.' );
|
268 |
+
}
|
269 |
+
|
270 |
+
try {
|
271 |
+
$ch = curl_init();
|
272 |
+
$is_ssl = ( isset( $_SERVER['HTTPS'] ) && ( 'on' == strtolower( $_SERVER['HTTPS'] ) || '1' == $_SERVER['HTTPS'] ) ) || ( isset( $_SERVER['SERVER_PORT'] ) && ( '443' == $_SERVER['SERVER_PORT'] ) );
|
273 |
+
|
274 |
+
if ( 'POST' == $args['method'] ) {
|
275 |
+
curl_setopt( $ch, CURLOPT_POST, true );
|
276 |
+
curl_setopt( $ch, CURLOPT_POSTFIELDS, $args['post_data'] );
|
277 |
+
}
|
278 |
+
|
279 |
+
curl_setopt( $ch, CURLOPT_URL, self::API_ENDPOINT . $url );
|
280 |
+
curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true );
|
281 |
+
curl_setopt( $ch, CURLOPT_HTTPHEADER, $this->headers );
|
282 |
+
curl_setopt( $ch, CURLOPT_TIMEOUT, $args['timeout'] );
|
283 |
+
@curl_setopt( $ch, CURLOPT_FOLLOWLOCATION, true );
|
284 |
+
curl_setopt( $ch, CURLOPT_SSL_VERIFYPEER, $is_ssl );
|
285 |
+
|
286 |
+
$response = json_decode( curl_exec( $ch ) );
|
287 |
+
$error = curl_error( $ch );
|
288 |
+
$http_code = curl_getinfo( $ch, CURLINFO_HTTP_CODE );
|
289 |
+
|
290 |
+
curl_close( $ch );
|
291 |
+
} catch( Exception $e ) {
|
292 |
+
return new WP_Error( 'curl', 'Unknown error occurred' );
|
293 |
+
}
|
294 |
+
|
295 |
+
if ( 200 != $http_code && isset( $response->code, $response->detail ) ) {
|
296 |
+
return new WP_Error( $http_code, $response->detail );
|
297 |
+
} elseif ( 200 != $http_code ) {
|
298 |
+
return new WP_Error( $http_code, 'Unknown error occurred' );
|
299 |
+
} else {
|
300 |
+
return $response;
|
301 |
+
}
|
302 |
+
|
303 |
+
return $response;
|
304 |
+
}
|
305 |
+
}
|
306 |
+
|
307 |
+
/**
|
308 |
+
* Returns the main instance of Imagify to prevent the need to use globals.
|
309 |
+
*/
|
310 |
+
function Imagify() {
|
311 |
+
return Imagify::instance();
|
312 |
+
}
|
313 |
+
$GLOBALS['imagify'] = Imagify();
|
inc/classes/class-attachment.php
ADDED
@@ -0,0 +1,606 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
defined( 'ABSPATH' ) or die( 'Cheatin\' uh?' );
|
3 |
+
|
4 |
+
class Imagify_Attachment {
|
5 |
+
/**
|
6 |
+
* The attachment ID
|
7 |
+
*
|
8 |
+
* @since 1.0
|
9 |
+
*
|
10 |
+
* @var int
|
11 |
+
* @access public
|
12 |
+
*/
|
13 |
+
public $id;
|
14 |
+
|
15 |
+
/**
|
16 |
+
* The constructor
|
17 |
+
*
|
18 |
+
* @since 1.0
|
19 |
+
*
|
20 |
+
* @return void
|
21 |
+
**/
|
22 |
+
function __construct( $id = 0 ) {
|
23 |
+
global $post;
|
24 |
+
|
25 |
+
if ( is_object( $post ) && ! $id ) {
|
26 |
+
$this->id = $post->ID;
|
27 |
+
} else {
|
28 |
+
$this->id = (int) $id;
|
29 |
+
}
|
30 |
+
}
|
31 |
+
|
32 |
+
/**
|
33 |
+
* Get the attachment backup filepath.
|
34 |
+
*
|
35 |
+
* @since 1.0
|
36 |
+
*
|
37 |
+
* @access public
|
38 |
+
* @return string|false
|
39 |
+
*/
|
40 |
+
public function get_backup_path() {
|
41 |
+
$file_path = $this->get_original_path();
|
42 |
+
$backup_path = get_imagify_attachment_backup_path( $file_path );
|
43 |
+
|
44 |
+
if( file_exists( $backup_path ) ) {
|
45 |
+
return $backup_path;
|
46 |
+
}
|
47 |
+
|
48 |
+
return false;
|
49 |
+
}
|
50 |
+
|
51 |
+
/**
|
52 |
+
* Get the attachment optimization data.
|
53 |
+
*
|
54 |
+
* @since 1.0
|
55 |
+
*
|
56 |
+
* @access public
|
57 |
+
* @return array
|
58 |
+
*/
|
59 |
+
public function get_data() {
|
60 |
+
return get_post_meta( $this->id, '_imagify_data', true );
|
61 |
+
}
|
62 |
+
|
63 |
+
/**
|
64 |
+
* Get the attachment extension.
|
65 |
+
*
|
66 |
+
* @since 1.0
|
67 |
+
*
|
68 |
+
* @access public
|
69 |
+
* @return string
|
70 |
+
*/
|
71 |
+
public function get_extension() {
|
72 |
+
$fullsize_path = $this->get_original_path();
|
73 |
+
return pathinfo( $fullsize_path, PATHINFO_EXTENSION );
|
74 |
+
}
|
75 |
+
|
76 |
+
/**
|
77 |
+
* Get the attachment error if there is one.
|
78 |
+
*
|
79 |
+
* @since 1.1.5
|
80 |
+
*
|
81 |
+
* @access public
|
82 |
+
* @return string The message error
|
83 |
+
*/
|
84 |
+
public function get_optimized_error() {
|
85 |
+
$error = $this->get_size_data( 'full', 'error' );
|
86 |
+
|
87 |
+
if ( is_string( $error ) ) {
|
88 |
+
return $error;
|
89 |
+
}
|
90 |
+
|
91 |
+
return false;
|
92 |
+
}
|
93 |
+
|
94 |
+
/**
|
95 |
+
* Get the attachment optimization level.
|
96 |
+
*
|
97 |
+
* @since 1.0
|
98 |
+
*
|
99 |
+
* @access public
|
100 |
+
* @return int
|
101 |
+
*/
|
102 |
+
public function get_optimization_level() {
|
103 |
+
return get_post_meta( $this->id, '_imagify_optimization_level', true );
|
104 |
+
}
|
105 |
+
|
106 |
+
/**
|
107 |
+
* Get the attachment optimization level label.
|
108 |
+
*
|
109 |
+
* @since 1.2
|
110 |
+
*
|
111 |
+
* @access public
|
112 |
+
* @return string
|
113 |
+
*/
|
114 |
+
public function get_optimization_level_label() {
|
115 |
+
$label = '';
|
116 |
+
$level = $this->get_optimization_level();
|
117 |
+
|
118 |
+
switch( $level ) {
|
119 |
+
case 2:
|
120 |
+
$label = __( 'Ultra', 'imagify' );
|
121 |
+
break;
|
122 |
+
case 1:
|
123 |
+
$label = __( 'Aggressive', 'imagify' );
|
124 |
+
break;
|
125 |
+
case 0:
|
126 |
+
$label = __( 'Normal', 'imagify' );
|
127 |
+
break;
|
128 |
+
}
|
129 |
+
|
130 |
+
return $label;
|
131 |
+
}
|
132 |
+
|
133 |
+
/**
|
134 |
+
* Count number of optimized sizes.
|
135 |
+
*
|
136 |
+
* @since 1.0
|
137 |
+
*
|
138 |
+
* @access public
|
139 |
+
* @return int
|
140 |
+
*/
|
141 |
+
public function get_optimized_sizes_count() {
|
142 |
+
$data = $this->get_data();
|
143 |
+
$sizes = (array) $data['sizes'];
|
144 |
+
$count = 0;
|
145 |
+
|
146 |
+
if ( isset( $sizes['full'] ) ) {
|
147 |
+
unset( $sizes['full'] );
|
148 |
+
}
|
149 |
+
|
150 |
+
foreach ( $sizes as $size ) {
|
151 |
+
if ( $size['success'] ) {
|
152 |
+
$count++;
|
153 |
+
}
|
154 |
+
}
|
155 |
+
|
156 |
+
return (int) $count;
|
157 |
+
}
|
158 |
+
|
159 |
+
/**
|
160 |
+
* Get the attachment optimization status (success or error).
|
161 |
+
*
|
162 |
+
* @since 1.0
|
163 |
+
*
|
164 |
+
* @access public
|
165 |
+
* @return string
|
166 |
+
*/
|
167 |
+
public function get_status() {
|
168 |
+
return get_post_meta( $this->id, '_imagify_status', true );
|
169 |
+
}
|
170 |
+
|
171 |
+
/**
|
172 |
+
* Get the original attachment path.
|
173 |
+
*
|
174 |
+
* @since 1.0
|
175 |
+
*
|
176 |
+
* @access public
|
177 |
+
* @return string
|
178 |
+
*/
|
179 |
+
public function get_original_path() {
|
180 |
+
return get_attached_file( $this->id );
|
181 |
+
}
|
182 |
+
|
183 |
+
/**
|
184 |
+
* Get the original attachment size.
|
185 |
+
*
|
186 |
+
* @since 1.0
|
187 |
+
*
|
188 |
+
* @access public
|
189 |
+
* @return string
|
190 |
+
*/
|
191 |
+
public function get_original_size() {
|
192 |
+
$original_size = $this->get_size_data( 'full', 'original_size' );
|
193 |
+
$original_size = ( empty( $original_size ) ) ? @filesize( $this->get_original_path() ) : $original_size;
|
194 |
+
$original_size = size_format( $original_size, 2 );
|
195 |
+
|
196 |
+
return $original_size;
|
197 |
+
}
|
198 |
+
|
199 |
+
/**
|
200 |
+
* Get the original attachment URL.
|
201 |
+
*
|
202 |
+
* @since 1.0
|
203 |
+
*
|
204 |
+
* @access public
|
205 |
+
* @return string
|
206 |
+
*/
|
207 |
+
public function get_original_url() {
|
208 |
+
return wp_get_attachment_url( $this->id );
|
209 |
+
}
|
210 |
+
|
211 |
+
/*
|
212 |
+
* Get the statistics of a specific size.
|
213 |
+
*
|
214 |
+
* @since 1.0
|
215 |
+
*
|
216 |
+
* @access public
|
217 |
+
* @param string $size The thumbnail slug.
|
218 |
+
* @param string $key The specific data slug.
|
219 |
+
* @return array|string
|
220 |
+
*/
|
221 |
+
public function get_size_data( $size = 'full', $key = '' ) {
|
222 |
+
$data = $this->get_data();
|
223 |
+
$stats = array();
|
224 |
+
|
225 |
+
if ( isset( $data['sizes'][ $size ] ) ) {
|
226 |
+
$stats = $data['sizes'][ $size ];
|
227 |
+
}
|
228 |
+
|
229 |
+
if ( isset( $stats[ $key ] ) ) {
|
230 |
+
$stats = $stats[ $key ];
|
231 |
+
}
|
232 |
+
|
233 |
+
return $stats;
|
234 |
+
}
|
235 |
+
|
236 |
+
/**
|
237 |
+
* Get the global statistics data or a specific one.
|
238 |
+
*
|
239 |
+
* @since 1.0
|
240 |
+
*
|
241 |
+
* @access public
|
242 |
+
* @param string $key The specific data slug.
|
243 |
+
* @return array|string
|
244 |
+
*/
|
245 |
+
public function get_stats_data( $key = '' ) {
|
246 |
+
$data = $this->get_data();
|
247 |
+
$stats = '';
|
248 |
+
|
249 |
+
if ( isset( $data['stats'] ) ) {
|
250 |
+
$stats = $data['stats'];
|
251 |
+
}
|
252 |
+
|
253 |
+
if ( isset( $stats[ $key ] ) ) {
|
254 |
+
$stats = $stats[ $key ];
|
255 |
+
}
|
256 |
+
|
257 |
+
return $stats;
|
258 |
+
}
|
259 |
+
|
260 |
+
/**
|
261 |
+
* Check if the attachment is already optimized (before Imagify).
|
262 |
+
*
|
263 |
+
* @since 1.1.6
|
264 |
+
*
|
265 |
+
* @access public
|
266 |
+
* @return bool True if the attachment is optimized.
|
267 |
+
*/
|
268 |
+
public function is_already_optimized() {
|
269 |
+
return ( 'already_optimized' === $this->get_status() ) > 0;
|
270 |
+
}
|
271 |
+
|
272 |
+
/**
|
273 |
+
* Check if the attachment is optimized.
|
274 |
+
*
|
275 |
+
* @since 1.0
|
276 |
+
*
|
277 |
+
* @access public
|
278 |
+
* @return bool True if the attachment is optimized.
|
279 |
+
*/
|
280 |
+
public function is_optimized() {
|
281 |
+
return ( 'success' === $this->get_status() ) > 0;
|
282 |
+
}
|
283 |
+
|
284 |
+
/**
|
285 |
+
* Check if the attachment exceeding the limit size (> 5mo).
|
286 |
+
*
|
287 |
+
* @since 1.0
|
288 |
+
*
|
289 |
+
* @access public
|
290 |
+
* @return bool True if the attachment is skipped.
|
291 |
+
*/
|
292 |
+
public function is_exceeded() {
|
293 |
+
$filepath = $this->get_original_path();
|
294 |
+
$size = 0;
|
295 |
+
|
296 |
+
if ( file_exists( $filepath ) ) {
|
297 |
+
$size = filesize( $filepath );
|
298 |
+
}
|
299 |
+
|
300 |
+
return ( $size > IMAGIFY_MAX_BYTES ) > 0;
|
301 |
+
}
|
302 |
+
|
303 |
+
/**
|
304 |
+
* Check if the attachment has a backup of the original size.
|
305 |
+
*
|
306 |
+
* @since 1.0
|
307 |
+
*
|
308 |
+
* @access public
|
309 |
+
* @return bool True if the attachment has a backup.
|
310 |
+
*/
|
311 |
+
public function has_backup() {
|
312 |
+
return (bool) $this->get_backup_path();
|
313 |
+
}
|
314 |
+
|
315 |
+
/**
|
316 |
+
* Check if the attachment has an error.
|
317 |
+
*
|
318 |
+
* @since 1.0
|
319 |
+
*
|
320 |
+
* @access public
|
321 |
+
* @return bool True if the attachment has an error.
|
322 |
+
*/
|
323 |
+
public function has_error() {
|
324 |
+
$has_error = $this->get_size_data( 'full', 'error' );
|
325 |
+
return ( is_string( $has_error ) ) > 0;
|
326 |
+
}
|
327 |
+
|
328 |
+
/**
|
329 |
+
* Update the metadata size of the attachment
|
330 |
+
*
|
331 |
+
* @since 1.2
|
332 |
+
*
|
333 |
+
* @access public
|
334 |
+
* @return void
|
335 |
+
*/
|
336 |
+
public function update_metadata_size() {
|
337 |
+
if ( ! wp_attachment_is_image( $this->id ) ) {
|
338 |
+
return false;
|
339 |
+
}
|
340 |
+
|
341 |
+
$size = @getimagesize( $this->get_original_path() );
|
342 |
+
|
343 |
+
if ( isset( $size[0], $size[1] ) ) {
|
344 |
+
$metadata = wp_get_attachment_metadata( $this->id );
|
345 |
+
$metadata['width'] = $size[0];
|
346 |
+
$metadata['height'] = $size[1];
|
347 |
+
|
348 |
+
wp_update_attachment_metadata( $this->id, $metadata );
|
349 |
+
}
|
350 |
+
}
|
351 |
+
|
352 |
+
/**
|
353 |
+
* Delete the backup file.
|
354 |
+
*
|
355 |
+
* @since 1.0
|
356 |
+
*
|
357 |
+
* @access public
|
358 |
+
* @return void
|
359 |
+
*/
|
360 |
+
public function delete_backup() {
|
361 |
+
$backup_path = $this->get_backup_path();
|
362 |
+
|
363 |
+
if ( ! empty( $backup_path ) ) {
|
364 |
+
@unlink( $backup_path );
|
365 |
+
}
|
366 |
+
}
|
367 |
+
|
368 |
+
/**
|
369 |
+
* Fills statistics data with values from $data array
|
370 |
+
*
|
371 |
+
* @since 1.0
|
372 |
+
*
|
373 |
+
* @access public
|
374 |
+
* @static
|
375 |
+
* @param array $data The statistics data
|
376 |
+
* @param object $response The API response
|
377 |
+
* @param int $id The attachment ID
|
378 |
+
* @param int $url The attachment URL
|
379 |
+
* @param string $size The attachment size key
|
380 |
+
* @return bool|array False if the original size has an error or an array contains the data for other result
|
381 |
+
*/
|
382 |
+
static public function fill_data( $data, $response, $id, $url, $size = 'full' ) {
|
383 |
+
if ( is_wp_error( $response ) ) {
|
384 |
+
$error = $response->get_error_message();
|
385 |
+
$error_status = 'error';
|
386 |
+
|
387 |
+
$data['sizes'][ $size ] = array(
|
388 |
+
'success' => false,
|
389 |
+
'error' => $error
|
390 |
+
);
|
391 |
+
|
392 |
+
// Update the error status for the original size
|
393 |
+
if ( 'full' === $size ) {
|
394 |
+
update_post_meta( $id, '_imagify_data', $data );
|
395 |
+
|
396 |
+
if ( false !== strpos( $error, 'This image is already compressed' ) ) {
|
397 |
+
$error_status = 'already_optimized';
|
398 |
+
}
|
399 |
+
|
400 |
+
update_post_meta( $id, '_imagify_status', $error_status );
|
401 |
+
|
402 |
+
return false;
|
403 |
+
}
|
404 |
+
} else {
|
405 |
+
$data['sizes'][ $size ] = array(
|
406 |
+
'success' => true,
|
407 |
+
'file_url' => $url,
|
408 |
+
'original_size' => $response->original_size,
|
409 |
+
'optimized_size' => $response->new_size,
|
410 |
+
'percent' => $response->percent
|
411 |
+
);
|
412 |
+
|
413 |
+
$data['stats']['original_size'] += ( isset( $response->original_size ) ) ? $response->original_size : 0;
|
414 |
+
$data['stats']['optimized_size'] += ( isset( $response->new_size ) ) ? $response->new_size : 0;
|
415 |
+
}
|
416 |
+
|
417 |
+
return $data;
|
418 |
+
}
|
419 |
+
|
420 |
+
/**
|
421 |
+
* Optimize all sizes with Imagify.
|
422 |
+
*
|
423 |
+
* @since 1.0
|
424 |
+
*
|
425 |
+
* @access public
|
426 |
+
* @param int $optimization_level The optimization level (2=ultra, 1=aggressive, 0=normal)
|
427 |
+
* @param array $metadata The attachment meta data
|
428 |
+
* @return array $optimized_data The optimization data
|
429 |
+
*/
|
430 |
+
public function optimize( $optimization_level = null, $metadata = array() ) {
|
431 |
+
$optimization_level = ( is_null( $optimization_level ) ) ? (int) get_imagify_option( 'optimization_level', 1 ) : (int) $optimization_level;
|
432 |
+
|
433 |
+
$id = $this->id;
|
434 |
+
$metadata = ( (bool) $metadata ) ? $metadata : wp_get_attachment_metadata( $id );
|
435 |
+
$sizes = ( isset( $metadata['sizes'] ) ) ? (array) $metadata['sizes'] : array();
|
436 |
+
$data = array(
|
437 |
+
'stats' => array(
|
438 |
+
'original_size' => 0,
|
439 |
+
'optimized_size' => 0,
|
440 |
+
'percent' => 0,
|
441 |
+
)
|
442 |
+
);
|
443 |
+
|
444 |
+
// Get file path & URL for original image
|
445 |
+
$attachment_path = $this->get_original_path();
|
446 |
+
$attachment_url = $this->get_original_url();
|
447 |
+
|
448 |
+
// Check if the attachment extension is allowed
|
449 |
+
if ( ! $id || ! wp_attachment_is_image( $id ) ) {
|
450 |
+
return;
|
451 |
+
}
|
452 |
+
|
453 |
+
// Check if the full size is already optimized
|
454 |
+
if ( $this->is_optimized() && ( $this->get_optimization_level() == $optimization_level ) ) {
|
455 |
+
return;
|
456 |
+
}
|
457 |
+
|
458 |
+
/**
|
459 |
+
* Fires before optimizing an attachment.
|
460 |
+
*
|
461 |
+
* @since 1.0
|
462 |
+
*
|
463 |
+
* @param int $id The attachment ID
|
464 |
+
*/
|
465 |
+
do_action( 'before_imagify_optimize_attachment', $id );
|
466 |
+
|
467 |
+
// Get the resize values for the original size
|
468 |
+
$resize = array();
|
469 |
+
$do_resize = get_imagify_option( 'resize_larger', false );
|
470 |
+
$resize_width = get_imagify_option( 'resize_larger_w' );
|
471 |
+
$attachment_size = @getimagesize( $attachment_path );
|
472 |
+
|
473 |
+
if ( $do_resize && isset( $attachment_size[0] ) && $resize_width < $attachment_size[0] ) {
|
474 |
+
$resize['width'] = $resize_width;
|
475 |
+
}
|
476 |
+
|
477 |
+
// Optimize the original size
|
478 |
+
$response = do_imagify( $attachment_path, get_imagify_option( 'backup', false ), $optimization_level, $resize, get_imagify_option( 'exif', false ) );
|
479 |
+
$data = $this->fill_data( $data, $response, $id, $attachment_url );
|
480 |
+
|
481 |
+
// Save the optimization level
|
482 |
+
update_post_meta( $id, '_imagify_optimization_level', $optimization_level );
|
483 |
+
|
484 |
+
if( (bool) ! $data ) {
|
485 |
+
return;
|
486 |
+
}
|
487 |
+
|
488 |
+
// If we resized the original with success, we have to update the attachment metadata
|
489 |
+
// If not, WordPress keeps the old attachment size.
|
490 |
+
if ( $do_resize && isset( $resize['width'] ) ) {
|
491 |
+
$this->update_metadata_size();
|
492 |
+
}
|
493 |
+
|
494 |
+
// Optimize all thumbnails
|
495 |
+
if ( (bool) $sizes ) {
|
496 |
+
foreach ( $sizes as $size_key => $size_data ) {
|
497 |
+
// Check if this size has to be optimized
|
498 |
+
if ( array_key_exists( $size_key, get_imagify_option( 'disallowed-sizes', array() ) ) && ! imagify_is_active_for_network() ) {
|
499 |
+
$data['sizes'][ $size_key ] = array(
|
500 |
+
'success' => false,
|
501 |
+
'error' => __( 'This size isn\'t authorized to be optimized. Update your Imagify settings if you want to optimize it.', 'imagify' )
|
502 |
+
);
|
503 |
+
continue;
|
504 |
+
}
|
505 |
+
|
506 |
+
$thumbnail_path = trailingslashit( dirname( $attachment_path ) ) . $size_data['file'];
|
507 |
+
$thumbnail_url = trailingslashit( dirname( $attachment_url ) ) . $size_data['file'];
|
508 |
+
|
509 |
+
// Optimize the thumbnail size
|
510 |
+
$response = do_imagify( $thumbnail_path, false, $optimization_level );
|
511 |
+
$data = $this->fill_data( $data, $response, $id, $thumbnail_url, $size_key );
|
512 |
+
|
513 |
+
/**
|
514 |
+
* Filter the optimization data of a specific thumbnail
|
515 |
+
*
|
516 |
+
* @since 1.0
|
517 |
+
*
|
518 |
+
* @param array $data The statistics data
|
519 |
+
* @param object $response The API response
|
520 |
+
* @param int $id The attachment ID
|
521 |
+
* @param string $thumbnail_path The attachment path
|
522 |
+
* @param string $thumbnail_url The attachment URL
|
523 |
+
* @param string $size_key The attachment size key
|
524 |
+
* @param bool $is_aggressive The optimization level
|
525 |
+
* @return array $data The new optimization data
|
526 |
+
*/
|
527 |
+
$data = apply_filters( 'imagify_fill_thumbnail_data', $data, $response, $id, $thumbnail_path, $thumbnail_url, $size_key, $optimization_level );
|
528 |
+
}
|
529 |
+
}
|
530 |
+
|
531 |
+
$data['stats']['percent'] = round( ( ( $data['stats']['original_size'] - $data['stats']['optimized_size'] ) / $data['stats']['original_size'] ) * 100, 2 );
|
532 |
+
|
533 |
+
update_post_meta( $id, '_imagify_data', $data );
|
534 |
+
update_post_meta( $id, '_imagify_status', 'success' );
|
535 |
+
|
536 |
+
$optimized_data = $this->get_data();
|
537 |
+
|
538 |
+
/**
|
539 |
+
* Fires after optimizing an attachment.
|
540 |
+
*
|
541 |
+
* @since 1.0
|
542 |
+
*
|
543 |
+
* @param int $id The attachment ID
|
544 |
+
* @param array $optimized_data The optimization data
|
545 |
+
*/
|
546 |
+
do_action( 'after_imagify_optimize_attachment', $id, $optimized_data );
|
547 |
+
|
548 |
+
return $optimized_data;
|
549 |
+
}
|
550 |
+
|
551 |
+
/**
|
552 |
+
* Process an attachment restoration from the backup file.
|
553 |
+
*
|
554 |
+
* @since 1.0
|
555 |
+
*
|
556 |
+
* @access public
|
557 |
+
* @return void
|
558 |
+
*/
|
559 |
+
public function restore() {
|
560 |
+
// Stop the process if there is no backup file to restore
|
561 |
+
if ( ! $this->has_backup() ) {
|
562 |
+
return;
|
563 |
+
}
|
564 |
+
|
565 |
+
$id = $this->id;
|
566 |
+
$backup_path = $this->get_backup_path();
|
567 |
+
$attachment_path = $this->get_original_path();
|
568 |
+
|
569 |
+
/**
|
570 |
+
* Fires before restoring an attachment.
|
571 |
+
*
|
572 |
+
* @since 1.0
|
573 |
+
*
|
574 |
+
* @param int $id The attachment ID
|
575 |
+
*/
|
576 |
+
do_action( 'before_imagify_restore_attachment', $id );
|
577 |
+
|
578 |
+
// Create the original image from the backup
|
579 |
+
@copy( $backup_path, $attachment_path );
|
580 |
+
imagify_chmod_file( $attachment_path );
|
581 |
+
|
582 |
+
if ( ! function_exists( 'wp_generate_attachment_metadata' ) ) {
|
583 |
+
require_once( ABSPATH . 'wp-admin/includes/image.php' );
|
584 |
+
}
|
585 |
+
|
586 |
+
remove_filter( 'wp_generate_attachment_metadata', '_imagify_optimize_attachment', PHP_INT_MAX );
|
587 |
+
wp_generate_attachment_metadata( $id, $attachment_path );
|
588 |
+
|
589 |
+
// Remove old optimization data
|
590 |
+
delete_post_meta( $id, '_imagify_data' );
|
591 |
+
delete_post_meta( $id, '_imagify_status' );
|
592 |
+
delete_post_meta( $id, '_imagify_optimization_level' );
|
593 |
+
|
594 |
+
// Restore the original size in the metadata
|
595 |
+
$this->update_metadata_size();
|
596 |
+
|
597 |
+
/**
|
598 |
+
* Fires after restoring an attachment.
|
599 |
+
*
|
600 |
+
* @since 1.0
|
601 |
+
*
|
602 |
+
* @param int $id The attachment ID
|
603 |
+
*/
|
604 |
+
do_action( 'after_imagify_restore_attachment', $id );
|
605 |
+
}
|
606 |
+
}
|
inc/classes/class-user.php
ADDED
@@ -0,0 +1,201 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
defined( 'ABSPATH' ) or die( 'Cheatin\' uh?' );
|
3 |
+
|
4 |
+
class Imagify_User {
|
5 |
+
/**
|
6 |
+
* The Imagify user ID
|
7 |
+
*
|
8 |
+
* @since 1.0
|
9 |
+
*
|
10 |
+
* @var string
|
11 |
+
* @access public
|
12 |
+
*/
|
13 |
+
public $id;
|
14 |
+
|
15 |
+
/**
|
16 |
+
* The user email
|
17 |
+
*
|
18 |
+
* @since 1.0
|
19 |
+
*
|
20 |
+
* @var string
|
21 |
+
* @access public
|
22 |
+
*/
|
23 |
+
public $email;
|
24 |
+
|
25 |
+
/**
|
26 |
+
* The plan ID
|
27 |
+
*
|
28 |
+
* @since 1.0
|
29 |
+
*
|
30 |
+
* @var int
|
31 |
+
* @access public
|
32 |
+
*/
|
33 |
+
public $plan_id;
|
34 |
+
|
35 |
+
/**
|
36 |
+
* The plan label
|
37 |
+
*
|
38 |
+
* @since 1.2
|
39 |
+
*
|
40 |
+
* @var string
|
41 |
+
* @access public
|
42 |
+
*/
|
43 |
+
public $plan_label;
|
44 |
+
|
45 |
+
/**
|
46 |
+
* The total quota
|
47 |
+
*
|
48 |
+
* @since 1.0
|
49 |
+
*
|
50 |
+
* @var int
|
51 |
+
* @access public
|
52 |
+
*/
|
53 |
+
public $quota;
|
54 |
+
|
55 |
+
/**
|
56 |
+
* The total extra quota (Imagify Pack)
|
57 |
+
*
|
58 |
+
* @since 1.0
|
59 |
+
*
|
60 |
+
* @var int
|
61 |
+
* @access public
|
62 |
+
*/
|
63 |
+
public $extra_quota;
|
64 |
+
|
65 |
+
/**
|
66 |
+
* The extra quota consumed
|
67 |
+
*
|
68 |
+
* @since 1.0
|
69 |
+
*
|
70 |
+
* @var int
|
71 |
+
* @access public
|
72 |
+
*/
|
73 |
+
public $extra_quota_consumed;
|
74 |
+
|
75 |
+
/**
|
76 |
+
* The current month consumed quota
|
77 |
+
*
|
78 |
+
* @since 1.0
|
79 |
+
*
|
80 |
+
* @var int
|
81 |
+
* @access public
|
82 |
+
*/
|
83 |
+
public $consumed_current_month_quota;
|
84 |
+
|
85 |
+
/**
|
86 |
+
* The next month date to credit the account
|
87 |
+
*
|
88 |
+
* @since 1.1.1
|
89 |
+
*
|
90 |
+
* @var date
|
91 |
+
* @access public
|
92 |
+
*/
|
93 |
+
public $next_date_update;
|
94 |
+
|
95 |
+
/**
|
96 |
+
* If the account is activate or not
|
97 |
+
*
|
98 |
+
* @since 1.0.1
|
99 |
+
*
|
100 |
+
* @var bool
|
101 |
+
* @access public
|
102 |
+
*/
|
103 |
+
public $is_active;
|
104 |
+
|
105 |
+
/**
|
106 |
+
* The constructor
|
107 |
+
*
|
108 |
+
* @since 1.0
|
109 |
+
*
|
110 |
+
* @return void
|
111 |
+
**/
|
112 |
+
public function __construct() {
|
113 |
+
$user = get_imagify_user();
|
114 |
+
|
115 |
+
if ( ! is_wp_error( $user ) ) {
|
116 |
+
$this->id = $user->id;
|
117 |
+
$this->email = $user->email;
|
118 |
+
$this->plan_id = $user->plan_id;
|
119 |
+
$this->plan_label = ucfirst( $user->plan_label );
|
120 |
+
$this->quota = $user->quota;
|
121 |
+
$this->extra_quota = $user->extra_quota;
|
122 |
+
$this->extra_quota_consumed = $user->extra_quota_consumed;
|
123 |
+
$this->consumed_current_month_quota = $user->consumed_current_month_quota;
|
124 |
+
$this->next_date_update = $user->next_date_update;
|
125 |
+
$this->is_active = $user->is_active;
|
126 |
+
}
|
127 |
+
}
|
128 |
+
|
129 |
+
/**
|
130 |
+
* Count percent of consumed quota.
|
131 |
+
*
|
132 |
+
* @since 1.0
|
133 |
+
*
|
134 |
+
* @access public
|
135 |
+
* @return int
|
136 |
+
*/
|
137 |
+
public function get_percent_consumed_quota() {
|
138 |
+
$percent = 0;
|
139 |
+
$quota = $this->quota;
|
140 |
+
$consumed_quota = $this->consumed_current_month_quota;
|
141 |
+
|
142 |
+
if ( ( $this->quota + $this->extra_quota ) - ( $this->consumed_current_month_quota + $this->extra_quota_consumed ) <= 0 ) {
|
143 |
+
return 100;
|
144 |
+
}
|
145 |
+
|
146 |
+
if( imagify_round_half_five( $this->extra_quota_consumed ) < $this->extra_quota ) {
|
147 |
+
$quota = $this->extra_quota + $quota;
|
148 |
+
$consumed_quota = $consumed_quota + $this->extra_quota_consumed;
|
149 |
+
}
|
150 |
+
|
151 |
+
$percent = 100 - ( ( $quota - $consumed_quota ) / $quota ) * 100;
|
152 |
+
$percent = min ( round( $percent, 1 ), 100 );
|
153 |
+
|
154 |
+
return $percent;
|
155 |
+
}
|
156 |
+
|
157 |
+
/**
|
158 |
+
* Count percent of unconsumed quota.
|
159 |
+
*
|
160 |
+
* @since 1.0
|
161 |
+
*
|
162 |
+
* @access public
|
163 |
+
* @return int
|
164 |
+
*/
|
165 |
+
public function get_percent_unconsumed_quota() {
|
166 |
+
$percent = 100 - $this->get_percent_consumed_quota();
|
167 |
+
return $percent;
|
168 |
+
}
|
169 |
+
|
170 |
+
/**
|
171 |
+
* Check if the user has a free account.
|
172 |
+
*
|
173 |
+
* @since 1.1.1
|
174 |
+
*
|
175 |
+
* @access public
|
176 |
+
* @return bool
|
177 |
+
*/
|
178 |
+
public function is_free() {
|
179 |
+
if ( 1 == $this->plan_id ) {
|
180 |
+
return true;
|
181 |
+
}
|
182 |
+
|
183 |
+
return false;
|
184 |
+
}
|
185 |
+
|
186 |
+
/**
|
187 |
+
* Check if the user has consumed its quota.
|
188 |
+
*
|
189 |
+
* @since 1.1.1
|
190 |
+
*
|
191 |
+
* @access public
|
192 |
+
* @return bool
|
193 |
+
*/
|
194 |
+
public function is_over_quota() {
|
195 |
+
if ( $this->is_free() && 100 == $this->get_percent_consumed_quota() ) {
|
196 |
+
return true;
|
197 |
+
}
|
198 |
+
|
199 |
+
return false;
|
200 |
+
}
|
201 |
+
}
|
inc/common/admin-bar.php
ADDED
@@ -0,0 +1,73 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
defined( 'ABSPATH' ) or die( 'Cheatin\' uh?' );
|
3 |
+
|
4 |
+
/**
|
5 |
+
* Add Imagify menu in the admin bar
|
6 |
+
*
|
7 |
+
* @since 1.0
|
8 |
+
*/
|
9 |
+
add_action( 'admin_bar_menu', '_imagify_admin_bar', PHP_INT_MAX );
|
10 |
+
function _imagify_admin_bar( $wp_admin_bar ) {
|
11 |
+
$cap = imagify_is_active_for_network() ? 'manage_network_options' : 'manage_options';
|
12 |
+
/** This filter is documented in inc/admin/options.php */
|
13 |
+
$cap = apply_filters( 'imagify_capacity', $cap );
|
14 |
+
|
15 |
+
if ( ! current_user_can( $cap ) || ! get_imagify_option( 'admin_bar_menu', 0 ) ) {
|
16 |
+
return;
|
17 |
+
}
|
18 |
+
|
19 |
+
// Parent
|
20 |
+
$wp_admin_bar->add_menu( array(
|
21 |
+
'id' => 'imagify',
|
22 |
+
'title' => 'Imagify',
|
23 |
+
'href' => get_imagify_admin_url(),
|
24 |
+
) );
|
25 |
+
|
26 |
+
// Settings
|
27 |
+
$wp_admin_bar->add_menu(array(
|
28 |
+
'parent' => 'imagify',
|
29 |
+
'id' => 'imagify-settings',
|
30 |
+
'title' => __( 'Settings' ),
|
31 |
+
'href' => get_imagify_admin_url(),
|
32 |
+
) );
|
33 |
+
|
34 |
+
// Bulk Optimization
|
35 |
+
if ( ! is_network_admin() ) {
|
36 |
+
$wp_admin_bar->add_menu(array(
|
37 |
+
'parent' => 'imagify',
|
38 |
+
'id' => 'imagify-bulk-optimization',
|
39 |
+
'title' => __( 'Bulk Optimization', 'imagify' ),
|
40 |
+
'href' => get_imagify_admin_url( 'bulk-optimization' ),
|
41 |
+
) );
|
42 |
+
}
|
43 |
+
|
44 |
+
// Rate it
|
45 |
+
$wp_admin_bar->add_menu(array(
|
46 |
+
'parent' => 'imagify',
|
47 |
+
'id' => 'imagify-rate-it',
|
48 |
+
'title' => sprintf( __( 'Rate Imagify on %s', 'imagify' ), 'WordPress.org' ),
|
49 |
+
'href' => 'https://wordpress.org/support/view/plugin-reviews/imagify?rate=5#postform',
|
50 |
+
) );
|
51 |
+
|
52 |
+
// Quota & Profile informations
|
53 |
+
if ( ( defined( 'IMAGIFY_API_KEY' ) && IMAGIFY_API_KEY ) || get_imagify_option( 'api_key', false ) ) {
|
54 |
+
$wp_admin_bar->add_menu( array(
|
55 |
+
'parent' => 'imagify',
|
56 |
+
'id' => 'imagify-profile',
|
57 |
+
'title' => wp_nonce_field( 'imagify-get-admin-bar-profile', 'imagifygetadminbarprofilenonce', false, false ) . '<div id="wp-admin-bar-imagify-profile-loading">' . __( 'Loading...' ) . '</div><div id="wp-admin-bar-imagify-profile-content"></div>',
|
58 |
+
) );
|
59 |
+
}
|
60 |
+
}
|
61 |
+
|
62 |
+
/**
|
63 |
+
* Include Admin Bar Profile informations styles in front
|
64 |
+
*
|
65 |
+
* @since 1.2
|
66 |
+
*/
|
67 |
+
add_action( 'admin_bar_init', '_imagify_admin_bar_styles' );
|
68 |
+
function _imagify_admin_bar_styles() {
|
69 |
+
if ( ! is_admin() && get_imagify_option( 'admin_bar_menu', 0 ) ) {
|
70 |
+
$css_ext = ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ? '.css' : '.min.css';
|
71 |
+
wp_enqueue_style( 'imagify-css-admin-bar', IMAGIFY_ASSETS_CSS_URL . 'admin-bar' . $css_ext, array(), IMAGIFY_VERSION, 'all' );
|
72 |
+
}
|
73 |
+
}
|
inc/common/attachments.php
ADDED
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
defined( 'ABSPATH' ) or die( 'Cheatin\' uh?' );
|
3 |
+
|
4 |
+
/**
|
5 |
+
* Auto-optimize when a new attachment is generated
|
6 |
+
*
|
7 |
+
* @since 1.0
|
8 |
+
*/
|
9 |
+
add_filter( 'wp_generate_attachment_metadata', '_imagify_optimize_attachment', PHP_INT_MAX, 2 );
|
10 |
+
function _imagify_optimize_attachment( $metadata, $attachment_id ) {
|
11 |
+
$api_key = get_imagify_option( 'api_key', false );
|
12 |
+
|
13 |
+
if ( ! empty( $api_key ) && get_imagify_option( 'auto_optimize', false ) ) {
|
14 |
+
$attachment = new Imagify_Attachment( $attachment_id );
|
15 |
+
|
16 |
+
// Optimize it!!!!!
|
17 |
+
$attachment->optimize( null, $metadata );
|
18 |
+
}
|
19 |
+
|
20 |
+
return $metadata;
|
21 |
+
}
|
22 |
+
|
23 |
+
|
24 |
+
/**
|
25 |
+
* Delete the backup file when an attachement is deleted.
|
26 |
+
*
|
27 |
+
* @since 1.0
|
28 |
+
*/
|
29 |
+
add_action( 'delete_attachment', '_imagify_delete_backup_file' );
|
30 |
+
function _imagify_delete_backup_file( $post_id ) {
|
31 |
+
$attachment = new Imagify_Attachment( $post_id );
|
32 |
+
$attachment->delete_backup();
|
33 |
+
}
|
inc/compat.php
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
defined( 'ABSPATH' ) or die( 'Cheatin\' uh?' );
|
3 |
+
|
4 |
+
/**
|
5 |
+
* Create a CURLFile object.
|
6 |
+
*
|
7 |
+
* @since PHP 5.5
|
8 |
+
*
|
9 |
+
* @param string $filename Path to the file which will be uploaded.
|
10 |
+
* @param string $mimetype Mimetype of the file.
|
11 |
+
* @param string $postname Name of the file to be used in the upload data.
|
12 |
+
* @return string The CURLFile object.
|
13 |
+
*/
|
14 |
+
if ( ! function_exists( 'curl_file_create' ) ) {
|
15 |
+
function curl_file_create( $filename, $mimetype = '', $postname = '' ) {
|
16 |
+
return "@$filename;filename="
|
17 |
+
. ( $postname ? $postname : basename( $filename ) )
|
18 |
+
. ( $mimetype ? ";type=$mimetype" : '' );
|
19 |
+
}
|
20 |
+
}
|
inc/functions/admin-stats.php
ADDED
@@ -0,0 +1,214 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
defined( 'ABSPATH' ) or die( 'Cheatin\' uh?' );
|
3 |
+
|
4 |
+
/*
|
5 |
+
* Count number of attachments.
|
6 |
+
*
|
7 |
+
* @since 1.0
|
8 |
+
*
|
9 |
+
* @return int The number of attachments.
|
10 |
+
*/
|
11 |
+
function imagify_count_attachments() {
|
12 |
+
$count = wp_count_attachments( get_imagify_mime_type() );
|
13 |
+
$count = get_object_vars( $count );
|
14 |
+
$count = array_sum( $count );
|
15 |
+
return (int) $count;
|
16 |
+
}
|
17 |
+
|
18 |
+
/*
|
19 |
+
* Count number of execeed attachments (size > 5MB).
|
20 |
+
*
|
21 |
+
* @since 1.0
|
22 |
+
*
|
23 |
+
* @return int The number of exceeded attachments.
|
24 |
+
*/
|
25 |
+
function imagify_count_exceeding_attachments() {
|
26 |
+
$count = 0;
|
27 |
+
$query = new WP_Query(
|
28 |
+
array(
|
29 |
+
'post_type' => 'attachment',
|
30 |
+
'post_status' => 'inherit',
|
31 |
+
'post_mime_type' => get_imagify_mime_type(),
|
32 |
+
'posts_per_page' => -1,
|
33 |
+
'update_post_term_cache' => false,
|
34 |
+
'no_found_rows' => true,
|
35 |
+
'fields' => 'ids'
|
36 |
+
)
|
37 |
+
);
|
38 |
+
$attachments = (array) $query->posts;
|
39 |
+
|
40 |
+
foreach( $attachments as $attachment_id ) {
|
41 |
+
$attachment = new Imagify_Attachment( $attachment_id );
|
42 |
+
|
43 |
+
// Check if the attachment extension is allowed
|
44 |
+
if ( ! wp_attachment_is_image( $attachment_id ) ) {
|
45 |
+
continue;
|
46 |
+
}
|
47 |
+
|
48 |
+
if ( $attachment->is_exceeded() ) {
|
49 |
+
$count++;
|
50 |
+
}
|
51 |
+
}
|
52 |
+
|
53 |
+
return (int) $count;
|
54 |
+
}
|
55 |
+
|
56 |
+
/*
|
57 |
+
* Count number of optimized attachments with an error.
|
58 |
+
*
|
59 |
+
* @since 1.0
|
60 |
+
*
|
61 |
+
* @return int The number of attachments.
|
62 |
+
*/
|
63 |
+
function imagify_count_error_attachments() {
|
64 |
+
$query = new WP_Query(
|
65 |
+
array(
|
66 |
+
'post_type' => 'attachment',
|
67 |
+
'post_status' => 'inherit',
|
68 |
+
'post_mime_type' => get_imagify_mime_type(),
|
69 |
+
'meta_key' => '_imagify_status',
|
70 |
+
'meta_value' => 'error',
|
71 |
+
'posts_per_page' => -1,
|
72 |
+
'update_post_term_cache' => false,
|
73 |
+
'no_found_rows' => true,
|
74 |
+
'fields' => 'ids'
|
75 |
+
)
|
76 |
+
);
|
77 |
+
|
78 |
+
return (int) $query->post_count;
|
79 |
+
}
|
80 |
+
|
81 |
+
/*
|
82 |
+
* Count number of optimized attachments (by Imagify or an other tool before).
|
83 |
+
*
|
84 |
+
* @since 1.0
|
85 |
+
*
|
86 |
+
* @return int The number of attachments.
|
87 |
+
*/
|
88 |
+
function imagify_count_optimized_attachments() {
|
89 |
+
$query = new WP_Query(
|
90 |
+
array(
|
91 |
+
'post_type' => 'attachment',
|
92 |
+
'post_status' => 'inherit',
|
93 |
+
'post_mime_type' => get_imagify_mime_type(),
|
94 |
+
'meta_query' => array(
|
95 |
+
'relation' => 'or',
|
96 |
+
array(
|
97 |
+
'key' => '_imagify_status',
|
98 |
+
'value' => 'success',
|
99 |
+
'compare' => '='
|
100 |
+
),
|
101 |
+
array(
|
102 |
+
'key' => '_imagify_status',
|
103 |
+
'value' => 'already_optimized',
|
104 |
+
'compare' => '='
|
105 |
+
)
|
106 |
+
),
|
107 |
+
'posts_per_page' => -1,
|
108 |
+
'update_post_term_cache' => false,
|
109 |
+
'no_found_rows' => true,
|
110 |
+
'fields' => 'ids'
|
111 |
+
)
|
112 |
+
);
|
113 |
+
|
114 |
+
return (int) $query->post_count;
|
115 |
+
}
|
116 |
+
|
117 |
+
/*
|
118 |
+
* Count number of unoptimized attachments.
|
119 |
+
*
|
120 |
+
* @since 1.0
|
121 |
+
*
|
122 |
+
* @return int The number of attachments.
|
123 |
+
*/
|
124 |
+
function imagify_count_unoptimized_attachments() {
|
125 |
+
$count = imagify_count_attachments() - imagify_count_optimized_attachments() - imagify_count_error_attachments();
|
126 |
+
return (int) $count;
|
127 |
+
}
|
128 |
+
|
129 |
+
/*
|
130 |
+
* Count percent of optimized attachments.
|
131 |
+
*
|
132 |
+
* @since 1.0
|
133 |
+
*
|
134 |
+
* @return int The percent of optimized attachments.
|
135 |
+
*/
|
136 |
+
function imagify_percent_optimized_attachments() {
|
137 |
+
$total_attachments = imagify_count_attachments();
|
138 |
+
$total_optimized_attachments = imagify_count_optimized_attachments();
|
139 |
+
|
140 |
+
$percent = ( 0 !== $total_attachments ) ? round( ( 100 - ( ( $total_attachments - ( $total_optimized_attachments ) ) / $total_attachments ) * 100 ) ) : 0;
|
141 |
+
|
142 |
+
return $percent;
|
143 |
+
}
|
144 |
+
|
145 |
+
/*
|
146 |
+
* Count percent, original & optimized size of all images optimized by Imagify.
|
147 |
+
*
|
148 |
+
* @since 1.0
|
149 |
+
*
|
150 |
+
* @return array An array containing the optimization data.
|
151 |
+
*/
|
152 |
+
function imagify_count_saving_data( $key = '' ) {
|
153 |
+
global $wpdb;
|
154 |
+
|
155 |
+
$original_size = 0;
|
156 |
+
$optimized_size = 0;
|
157 |
+
$query = new WP_Query(
|
158 |
+
array(
|
159 |
+
'post_type' => 'attachment',
|
160 |
+
'post_status' => 'inherit',
|
161 |
+
'post_mime_type' => get_imagify_mime_type(),
|
162 |
+
'meta_key' => '_imagify_status',
|
163 |
+
'meta_value' => 'success',
|
164 |
+
'posts_per_page' => -1,
|
165 |
+
'update_post_term_cache' => false,
|
166 |
+
'no_found_rows' => true,
|
167 |
+
'fields' => 'ids'
|
168 |
+
)
|
169 |
+
);
|
170 |
+
$attachments = (array) $query->posts;
|
171 |
+
|
172 |
+
foreach( $attachments as $attachment_id ) {
|
173 |
+
$attachment = new Imagify_Attachment( $attachment_id );
|
174 |
+
|
175 |
+
// Check if the attachment extension is allowed
|
176 |
+
if ( ! wp_attachment_is_image( $attachment_id ) ) {
|
177 |
+
continue;
|
178 |
+
}
|
179 |
+
|
180 |
+
$stats_data = $attachment->get_stats_data();
|
181 |
+
$original_data = $attachment->get_size_data( 'full' );
|
182 |
+
|
183 |
+
// Incremente the original sizes
|
184 |
+
if ( $attachment->is_optimized() ) {
|
185 |
+
$original_size += $original_data['original_size'];
|
186 |
+
$optimized_size += $original_data['optimized_size'];
|
187 |
+
}
|
188 |
+
|
189 |
+
$metadata = wp_get_attachment_metadata( $attachment_id );
|
190 |
+
$sizes = ( isset( $metadata['sizes'] ) ) ? (array) $metadata['sizes'] : array();
|
191 |
+
|
192 |
+
// Incremente the thumbnails sizes
|
193 |
+
foreach ( $sizes as $size_key => $size_data ) {
|
194 |
+
$size_data = $attachment->get_size_data( $size_key );
|
195 |
+
if ( ! empty( $size_data['success'] ) ) {
|
196 |
+
$original_size += $size_data['original_size'];
|
197 |
+
$optimized_size += $size_data['optimized_size'];
|
198 |
+
}
|
199 |
+
}
|
200 |
+
}
|
201 |
+
|
202 |
+
$data = array(
|
203 |
+
'count' => $query->post_count,
|
204 |
+
'original_size' => (int) $original_size,
|
205 |
+
'optimized_size' => (int) $optimized_size,
|
206 |
+
'percent' => ( 0 !== $optimized_size ) ? ceil( ( ( $original_size - $optimized_size ) / $original_size ) * 100 ) : 0
|
207 |
+
);
|
208 |
+
|
209 |
+
if ( ! empty( $key ) ) {
|
210 |
+
return $data[ $key ];
|
211 |
+
}
|
212 |
+
|
213 |
+
return $data;
|
214 |
+
}
|
inc/functions/admin-ui.php
ADDED
@@ -0,0 +1,182 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
defined( 'ABSPATH' ) or die( 'Cheatin\' uh?' );
|
3 |
+
|
4 |
+
/*
|
5 |
+
* Get the optimization data list for a specific attachment.
|
6 |
+
*
|
7 |
+
* @since 1.0
|
8 |
+
*
|
9 |
+
* @param int $attachment_id The attachment ID.
|
10 |
+
* @return string The output to print.
|
11 |
+
*/
|
12 |
+
function get_imagify_attachment_optimization_text( $attachment_id ) {
|
13 |
+
global $pagenow;
|
14 |
+
|
15 |
+
$attachment = new Imagify_Attachment( $attachment_id );
|
16 |
+
$data = $attachment->get_data();
|
17 |
+
$output = ( 'post.php' != $pagenow ) ? '<ul class="imagify-datas-list">' : '';
|
18 |
+
$output_before = ( 'post.php' != $pagenow ) ? '<li class="imagify-data-item">' : '<div class="misc-pub-section misc-pub-imagify imagify-data-item">';
|
19 |
+
$output_after = ( 'post.php' != $pagenow ) ? '</li>' : '</div>';
|
20 |
+
$reoptimize_output = '';
|
21 |
+
|
22 |
+
if ( $error = get_imagify_attachment_error_text( $attachment_id ) ) {
|
23 |
+
$error = ( 'post.php' === $pagenow ) ? $output_before . $error . $output_after : $error;
|
24 |
+
return $error;
|
25 |
+
}
|
26 |
+
|
27 |
+
$optimization_level = $attachment->get_optimization_level_label();
|
28 |
+
|
29 |
+
if ( imagify_valid_key() && $attachment->has_backup() ) {
|
30 |
+
$reoptimize_link = get_imagify_attachment_reoptimize_link( $attachment_id );
|
31 |
+
$reoptimize_output = ( $reoptimize_link ) ? $reoptimize_link : '';
|
32 |
+
}
|
33 |
+
|
34 |
+
if ( 'post.php' !== $pagenow ) {
|
35 |
+
$output .= $output_before . '<span class="data">' . __( 'New Filesize:', 'imagify' ) . '</span> <strong class="big">' . size_format( $data['sizes']['full']['optimized_size'], 2 ) . '</strong>' . $output_after;
|
36 |
+
}
|
37 |
+
|
38 |
+
$chart = '<span class="imagify-chart">
|
39 |
+
<span class="imagify-chart-container">
|
40 |
+
<canvas id="imagify-consumption-chart" width="15" height="15"></canvas>
|
41 |
+
</span>
|
42 |
+
</span>';
|
43 |
+
|
44 |
+
$output .= $output_before . '<span class="data">' . __( 'Original Saving:', 'imagify' ) . '</span> <strong>
|
45 |
+
' . ( ( 'post.php' != $pagenow ) ? $chart : '' ) . '<span class="imagify-chart-value">' . $data['sizes']['full']['percent'] . '</span>%</strong>' . $output_after;
|
46 |
+
|
47 |
+
// more details section
|
48 |
+
if ( 'post.php' != $pagenow ) {
|
49 |
+
// new list
|
50 |
+
$output .= '</ul>';
|
51 |
+
$output .= '<p class="imagify-datas-more-action"><a href="#imagify-view-details-' . $attachment_id . '" data-close="' . __( 'Close details', 'imagify' ) . '" data-open="' . __( 'View details', 'imagify' ) . '"><span class="the-text">' . __( 'View details', 'imagify' ) . '</span><span class="dashicons dashicons-arrow-down-alt2"></span></a></p>';
|
52 |
+
$output .= '<ul id="imagify-view-details-' . $attachment_id . '" class="imagify-datas-list imagify-datas-details">';
|
53 |
+
|
54 |
+
// not in metabox
|
55 |
+
$output .= $output_before . '<span class="data">' . __( 'Original Filesize:', 'imagify' ) . '</span> <strong class="original">' . $attachment->get_original_size() . '</strong>' . $output_after;
|
56 |
+
}
|
57 |
+
|
58 |
+
$output .= $output_before . '<span class="data">' . __( 'Level:', 'imagify' ) . '</span> <strong>' . $optimization_level . '</strong>' . $output_after;
|
59 |
+
|
60 |
+
if ( $total_optimized_thumbnails = $attachment->get_optimized_sizes_count() ) {
|
61 |
+
$output .= $output_before . '<span class="data">' . __( 'Thumbnails Optimized:', 'imagify' ) . '</span> <strong>' . $total_optimized_thumbnails . '</strong>' . $output_after;
|
62 |
+
$output .= $output_before . '<span class="data">' . __( 'Overall Saving:', 'imagify' ) . '</span> <strong>' . $data['stats']['percent'] . '%</strong>' . $output_after;
|
63 |
+
}
|
64 |
+
|
65 |
+
// end of list
|
66 |
+
$output .= ( 'post.php' != $pagenow ) ? '</ul>' : '';
|
67 |
+
|
68 |
+
// actions section
|
69 |
+
$output .= ( 'post.php' != $pagenow ) ? '' : $output_before;
|
70 |
+
$output .= '<div class="imagify-datas-actions-links">';
|
71 |
+
$output .= $reoptimize_output;
|
72 |
+
|
73 |
+
if ( $attachment->has_backup() ) {
|
74 |
+
$class = ( 'post.php' !== $pagenow ) ? 'button-imagify-restore' : '';
|
75 |
+
$output .= '<a id="imagify-restore-' . $attachment_id . '" href="' . get_imagify_admin_url( 'restore-upload', $attachment_id ) . '" class="' . $class . '" data-waiting-label="' . esc_attr__( 'Restoring...', 'imagify' ) . '"><span class="dashicons dashicons-image-rotate"></span>' . __( 'Restore Original', 'imagify' ) . '</a>';
|
76 |
+
}
|
77 |
+
|
78 |
+
$output .= '</div><!-- .imagify-datas-actions-links -->';
|
79 |
+
$output .= ( 'post.php' != $pagenow ) ? '' : $output_after;
|
80 |
+
|
81 |
+
return $output;
|
82 |
+
}
|
83 |
+
|
84 |
+
/*
|
85 |
+
* Get the error message for a specific attachment.
|
86 |
+
*
|
87 |
+
* @since 1.0
|
88 |
+
*
|
89 |
+
* @param int $attachment_id The attachement ID.
|
90 |
+
* @return string The output to print.
|
91 |
+
*/
|
92 |
+
function get_imagify_attachment_error_text( $attachment_id ) {
|
93 |
+
global $pagenow;
|
94 |
+
$data = get_post_meta( $attachment_id, '_imagify_data', true );
|
95 |
+
$output = '';
|
96 |
+
|
97 |
+
if ( isset( $data['sizes']['full']['success'] ) && ! $data['sizes']['full']['success'] ) {
|
98 |
+
$class = ( 'post.php' !== $pagenow ) ? 'button-imagify-manual-upload' : '';
|
99 |
+
$output .= '<strong>' . $data['sizes']['full']['error'] . '</strong><br/><a id="imagify-upload-' . $attachment_id . '" class="button ' . $class . '" href="' . get_imagify_admin_url( 'manual-upload', $attachment_id ) . '" data-waiting-label="' . esc_attr__( 'Optimizing...', 'imagify' ) . '">' . __( 'Try again', 'imagify' ) . '</a>';
|
100 |
+
}
|
101 |
+
|
102 |
+
return $output;
|
103 |
+
}
|
104 |
+
|
105 |
+
/*
|
106 |
+
* Get the re-optimize link for a specific attachment.
|
107 |
+
*
|
108 |
+
* @since 1.0
|
109 |
+
*
|
110 |
+
* @param int $attachment_id The attachement ID.
|
111 |
+
* @return string The output to print.
|
112 |
+
*/
|
113 |
+
function get_imagify_attachment_reoptimize_link( $attachment_id ) {
|
114 |
+
global $pagenow;
|
115 |
+
|
116 |
+
$attachment = new Imagify_Attachment( $attachment_id );
|
117 |
+
$level = (int) $attachment->get_optimization_level();
|
118 |
+
$args = array( 'attachment_id' => $attachment_id );
|
119 |
+
$output = '';
|
120 |
+
|
121 |
+
if ( $attachment->has_backup() ) {
|
122 |
+
$class = ( 'post.php' !== $pagenow ) ? 'button-imagify-manual-override-upload' : '';
|
123 |
+
|
124 |
+
// Re-optimize to Ultra
|
125 |
+
if ( 1 === $level || 0 === $level ) {
|
126 |
+
$args['optimization_level'] = 2;
|
127 |
+
$output .= '<a href="' . get_imagify_admin_url( 'manual-override-upload', $args ) . '" class="' . $class . '" data-waiting-label="' . esc_attr__( 'Optimizing...', 'imagify' ) . '"><span class="dashicons dashicons-admin-generic"></span>' . sprintf( __( 'Re-Optimize to %s', 'imagify' ), __( 'Ultra', 'imagify' ) ) . '</a>';
|
128 |
+
}
|
129 |
+
|
130 |
+
// Re-optimize to Aggressive
|
131 |
+
if ( 2 === $level || 0 === $level ) {
|
132 |
+
$args['optimization_level'] = 1;
|
133 |
+
$output .= '<a href="' . get_imagify_admin_url( 'manual-override-upload', $args ) . '" class="' . $class . '" data-waiting-label="' . esc_attr__( 'Optimizing...', 'imagify' ) . '"><span class="dashicons dashicons-admin-generic"></span>' . sprintf( __( 'Re-Optimize to %s', 'imagify' ), __( 'Aggressive', 'imagify' ) ) . '</a>';
|
134 |
+
}
|
135 |
+
|
136 |
+
// Re-optimize to Normal
|
137 |
+
if ( 2 === $level || 1 === $level ) {
|
138 |
+
$args['optimization_level'] = 0;
|
139 |
+
$output .= '<a href="' . get_imagify_admin_url( 'manual-override-upload', $args ) . '" class="' . $class . '" data-waiting-label="' . esc_attr__( 'Optimizing...', 'imagify' ) . '"><span class="dashicons dashicons-admin-generic"></span>' . sprintf( __( 'Re-Optimize to %s', 'imagify' ), __( 'Normal', 'imagify' ) ) . '</a>';
|
140 |
+
}
|
141 |
+
|
142 |
+
}
|
143 |
+
|
144 |
+
return $output;
|
145 |
+
}
|
146 |
+
|
147 |
+
/*
|
148 |
+
* Get all data to diplay for a specific attachment.
|
149 |
+
*
|
150 |
+
* @since 1.2
|
151 |
+
*
|
152 |
+
* @param int $attachment_id The attachement ID.
|
153 |
+
* @return string The output to print.
|
154 |
+
*/
|
155 |
+
function get_imagify_media_column_content( $attachment_id ) {
|
156 |
+
$output = '';
|
157 |
+
$attachment = new Imagify_Attachment( $attachment_id );
|
158 |
+
$attachment_ext = $attachment->get_extension();
|
159 |
+
|
160 |
+
// Check if the attachment extension is allowed
|
161 |
+
if ( ! wp_attachment_is_image( $attachment_id ) ) {
|
162 |
+
$output = sprintf( __( '%s can\'t be optimized', 'imagify' ), strtoupper( $attachment_ext ) );
|
163 |
+
return $output;
|
164 |
+
}
|
165 |
+
|
166 |
+
// Check if the API key is valid
|
167 |
+
if ( ! imagify_valid_key() && ! $attachment->is_optimized() ) {
|
168 |
+
$output .= __( 'Invalid API key', 'imagify' );
|
169 |
+
$output .= '<br/>';
|
170 |
+
$output .= '<a href="' . get_imagify_admin_url( 'options-general' ) . '">' . __( 'Check your Settings', 'imagify' ) . '</a>';
|
171 |
+
return $output;
|
172 |
+
}
|
173 |
+
|
174 |
+
// Check if the image was optimized
|
175 |
+
if ( ! $attachment->is_optimized() && ! $attachment->has_error() ) {
|
176 |
+
$output .= '<a id="imagify-upload-' . $attachment_id . '" href="' . get_imagify_admin_url( 'manual-upload', $attachment_id ) . '" class="button-primary button-imagify-manual-upload" data-waiting-label="' . esc_attr__( 'Optimizing...', 'imagify' ) . '">' . __( 'Optimize', 'imagify' ) . '</a>';
|
177 |
+
return $output;
|
178 |
+
}
|
179 |
+
|
180 |
+
$output .= get_imagify_attachment_optimization_text( $attachment_id );
|
181 |
+
return $output;
|
182 |
+
}
|
inc/functions/admin.php
ADDED
@@ -0,0 +1,138 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
defined( 'ABSPATH' ) or die( 'Cheatin\' uh?' );
|
3 |
+
|
4 |
+
/**
|
5 |
+
* Check if Imagify is activated on the network.
|
6 |
+
*
|
7 |
+
* @since 1.0
|
8 |
+
*
|
9 |
+
* return bool True if Imagify is activated on the network
|
10 |
+
*/
|
11 |
+
function imagify_is_active_for_network() {
|
12 |
+
if ( ! function_exists( 'is_plugin_active_for_network' ) ) {
|
13 |
+
require_once( ABSPATH . 'wp-admin/includes/plugin.php' );
|
14 |
+
}
|
15 |
+
return is_plugin_active_for_network( 'imagify/imagify.php' );
|
16 |
+
}
|
17 |
+
|
18 |
+
/*
|
19 |
+
* Get the URL related to specific admin page or action.
|
20 |
+
*
|
21 |
+
* @since 1.0
|
22 |
+
*
|
23 |
+
* @return string The URL of the specific admin page or action
|
24 |
+
*/
|
25 |
+
function get_imagify_admin_url( $action = 'options-general', $arg = array() ) {
|
26 |
+
$url = '';
|
27 |
+
|
28 |
+
switch( $action ) {
|
29 |
+
case 'manual-override-upload':
|
30 |
+
$id = ( isset( $arg['attachment_id'] ) ) ? $arg['attachment_id'] : 0;
|
31 |
+
$level = ( isset( $arg['optimization_level'] ) ) ? $arg['optimization_level'] : 0;
|
32 |
+
$url = wp_nonce_url( admin_url( 'admin-post.php?action=imagify_manual_override_upload&attachment_id=' . $id . '&optimization_level=' . $level ), 'imagify-manual-override-upload' );
|
33 |
+
break;
|
34 |
+
|
35 |
+
case 'manual-upload':
|
36 |
+
$url = wp_nonce_url( admin_url( 'admin-post.php?action=imagify_manual_upload&attachment_id=' . $arg ), 'imagify-manual-upload' );
|
37 |
+
break;
|
38 |
+
|
39 |
+
case 'restore-upload' :
|
40 |
+
$url = wp_nonce_url( admin_url( 'admin-post.php?action=imagify_restore_upload&attachment_id=' . $arg ), 'imagify-restore-upload' );
|
41 |
+
break;
|
42 |
+
|
43 |
+
case 'dismiss-notice':
|
44 |
+
$url = wp_nonce_url( admin_url( 'admin-post.php?action=imagify_dismiss_notice¬ice=' . $arg ), 'imagify-dismiss-notice' );
|
45 |
+
break;
|
46 |
+
|
47 |
+
case 'bulk-optimization':
|
48 |
+
$url = admin_url( 'upload.php?page=' . IMAGIFY_SLUG . '-bulk-optimization' );
|
49 |
+
break;
|
50 |
+
|
51 |
+
case 'options-general':
|
52 |
+
default :
|
53 |
+
$page = imagify_is_active_for_network() ? network_admin_url( 'settings.php' ) : admin_url( 'options-general.php' );
|
54 |
+
$url = $page . '?page=' . IMAGIFY_SLUG;
|
55 |
+
break;
|
56 |
+
}
|
57 |
+
|
58 |
+
return $url;
|
59 |
+
}
|
60 |
+
|
61 |
+
/*
|
62 |
+
* Get maximal width and height from all thumbnails.
|
63 |
+
*
|
64 |
+
* @since 1.1
|
65 |
+
*
|
66 |
+
* @return array An array containing the max with and height.
|
67 |
+
*/
|
68 |
+
function get_imagify_max_intermediate_image_size() {
|
69 |
+
global $_wp_additional_image_sizes;
|
70 |
+
|
71 |
+
$width = 0;
|
72 |
+
$height = 0;
|
73 |
+
$limit = 9999;
|
74 |
+
$get_intermediate_image_sizes = get_intermediate_image_sizes();
|
75 |
+
|
76 |
+
// Create the full array with sizes and crop info
|
77 |
+
foreach( $get_intermediate_image_sizes as $_size ) {
|
78 |
+
if ( in_array( $_size, array( 'thumbnail', 'medium', 'large' ) ) ) {
|
79 |
+
$_size_width = get_option( $_size . '_size_w' );
|
80 |
+
$_size_height = get_option( $_size . '_size_h' );
|
81 |
+
} elseif ( isset( $_wp_additional_image_sizes[ $_size ] ) ) {
|
82 |
+
$_size_width = $_wp_additional_image_sizes[ $_size ]['width'];
|
83 |
+
$_size_height = $_wp_additional_image_sizes[ $_size ]['height'];
|
84 |
+
}
|
85 |
+
|
86 |
+
if ( ! isset( $_size_width, $_size_height ) ) {
|
87 |
+
continue;
|
88 |
+
}
|
89 |
+
|
90 |
+
if ( $_size_width < $limit ) {
|
91 |
+
$width = max( $width, $_size_width );
|
92 |
+
}
|
93 |
+
|
94 |
+
if ( $_size_height < $limit ) {
|
95 |
+
$height = max( $height, $_size_height );
|
96 |
+
}
|
97 |
+
}
|
98 |
+
return array(
|
99 |
+
'width' => $width,
|
100 |
+
'height' => $height
|
101 |
+
);
|
102 |
+
}
|
103 |
+
|
104 |
+
/**
|
105 |
+
* Renew a dismissed Imagify notice.
|
106 |
+
*
|
107 |
+
* @since 1.0
|
108 |
+
*
|
109 |
+
* @return void
|
110 |
+
*/
|
111 |
+
function imagify_renew_notice( $notice, $user_id = 0 ) {
|
112 |
+
global $current_user;
|
113 |
+
$user_id = ( 0 === $user_id ) ? $current_user->ID : $user_id;
|
114 |
+
$notices = get_user_meta( $user_id, '_imagify_ignore_notices', true );
|
115 |
+
|
116 |
+
if( $notices && false !== array_search( $notice, $notices ) ) {
|
117 |
+
unset( $notices[array_search( $notice, $notices )] );
|
118 |
+
update_user_meta( $user_id, '_imagify_ignore_notices', $notices );
|
119 |
+
}
|
120 |
+
}
|
121 |
+
|
122 |
+
/**
|
123 |
+
* Dismissed an Imagify notice.
|
124 |
+
*
|
125 |
+
* @since 1.0
|
126 |
+
*
|
127 |
+
* @return void
|
128 |
+
*/
|
129 |
+
function imagify_dismiss_notice( $notice, $user_id = 0 ) {
|
130 |
+
global $current_user;
|
131 |
+
$user_id = ( 0 === $user_id ) ? $current_user->ID : $user_id;
|
132 |
+
$notices = get_user_meta( $user_id, '_imagify_ignore_notices', true );
|
133 |
+
$notices[] = $notice;
|
134 |
+
$notices = array_filter( $notices );
|
135 |
+
$notices = array_unique( $notices );
|
136 |
+
|
137 |
+
update_user_meta( $user_id, '_imagify_ignore_notices', $notices );
|
138 |
+
}
|
inc/functions/api.php
ADDED
@@ -0,0 +1,61 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
defined( 'ABSPATH' ) or die( 'Cheatin\' uh?' );
|
3 |
+
|
4 |
+
/**
|
5 |
+
* Check if external requests are blocked for Imagify.
|
6 |
+
*
|
7 |
+
* @since 1.0
|
8 |
+
*
|
9 |
+
* return bool True if Imagify API can't be called
|
10 |
+
*/
|
11 |
+
function is_imagify_blocked() {
|
12 |
+
if ( ! defined( 'WP_HTTP_BLOCK_EXTERNAL' ) || ! WP_HTTP_BLOCK_EXTERNAL ) {
|
13 |
+
return false;
|
14 |
+
}
|
15 |
+
|
16 |
+
if ( defined( 'WP_ACCESSIBLE_HOSTS' ) ) {
|
17 |
+
$accessible_hosts = explode( ',', WP_ACCESSIBLE_HOSTS );
|
18 |
+
$accessible_hosts = array_map( 'trim', $accessible_hosts );
|
19 |
+
|
20 |
+
if ( in_array( '*.imagify.io', $accessible_hosts ) ) {
|
21 |
+
return false;
|
22 |
+
}
|
23 |
+
}
|
24 |
+
|
25 |
+
return true;
|
26 |
+
}
|
27 |
+
|
28 |
+
/**
|
29 |
+
* Determine if the Imagify servers are available by checking the API version.
|
30 |
+
*
|
31 |
+
* @since 1.0
|
32 |
+
*
|
33 |
+
* @return bool True if the Imagify servers are available.
|
34 |
+
*/
|
35 |
+
function is_imagify_servers_up() {
|
36 |
+
static $imagify_api_version = null;
|
37 |
+
|
38 |
+
if ( null !== $imagify_api_version ) {
|
39 |
+
return $imagify_api_version;
|
40 |
+
}
|
41 |
+
|
42 |
+
$transient_name = 'imagify_check_api_version';
|
43 |
+
$transient_expiration = 3 * MINUTE_IN_SECONDS;
|
44 |
+
|
45 |
+
if ( get_site_transient( $transient_name ) ) {
|
46 |
+
$imagify_api_version = true;
|
47 |
+
return true;
|
48 |
+
}
|
49 |
+
|
50 |
+
if ( is_wp_error( get_imagify_api_version() ) ) {
|
51 |
+
$imagify_api_version = false;
|
52 |
+
set_site_transient( $transient_name, 0, $transient_expiration );
|
53 |
+
|
54 |
+
return false;
|
55 |
+
}
|
56 |
+
|
57 |
+
$imagify_api_version = true;
|
58 |
+
set_site_transient( $transient_name, 1, $transient_expiration );
|
59 |
+
|
60 |
+
return true;
|
61 |
+
}
|
inc/functions/attachments.php
ADDED
@@ -0,0 +1,46 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
defined( 'ABSPATH' ) or die( 'Cheatin\' uh?' );
|
3 |
+
|
4 |
+
/*
|
5 |
+
* Get all mime type which could be optimized by Imagify.
|
6 |
+
*
|
7 |
+
* @since 1.3
|
8 |
+
*
|
9 |
+
* @return array $mime_type The mime type.
|
10 |
+
*/
|
11 |
+
function get_imagify_mime_type() {
|
12 |
+
$mime_type = array(
|
13 |
+
'image/jpeg',
|
14 |
+
'image/png',
|
15 |
+
'image/gif'
|
16 |
+
);
|
17 |
+
|
18 |
+
return $mime_type;
|
19 |
+
}
|
20 |
+
|
21 |
+
/*
|
22 |
+
* Get the backup path of a specific attachement.
|
23 |
+
*
|
24 |
+
* @since 1.0
|
25 |
+
*
|
26 |
+
* @param int $file_path The attachment path.
|
27 |
+
* @return string $backup_path The backup path.
|
28 |
+
*/
|
29 |
+
function get_imagify_attachment_backup_path( $file_path ) {
|
30 |
+
$upload_dir = wp_upload_dir();
|
31 |
+
$upload_basedir = trailingslashit( $upload_dir['basedir'] );
|
32 |
+
$backup_dir = $upload_basedir . 'backup/';
|
33 |
+
|
34 |
+
/**
|
35 |
+
* Filter the backup directory path
|
36 |
+
*
|
37 |
+
* @since 1.0
|
38 |
+
*
|
39 |
+
* @param string $backup_dir The backup directory path
|
40 |
+
*/
|
41 |
+
$backup_dir = apply_filters( 'imagify_backup_directory', $backup_dir );
|
42 |
+
$backup_dir = trailingslashit( $backup_dir );
|
43 |
+
|
44 |
+
$backup_path = str_replace( $upload_basedir, $backup_dir, $file_path );
|
45 |
+
return $backup_path;
|
46 |
+
}
|
inc/functions/files.php
ADDED
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
defined( 'ABSPATH' ) or die( 'Cheatin\' uh?' );
|
3 |
+
|
4 |
+
/**
|
5 |
+
* Set the default file permissions using FS_CHMOD_FILE from WP
|
6 |
+
*
|
7 |
+
* @param string $file The path to file
|
8 |
+
* @since 1.2
|
9 |
+
* @return bool
|
10 |
+
**/
|
11 |
+
function imagify_chmod_file( $file ) {
|
12 |
+
if ( ! defined( 'FS_CHMOD_FILE' ) ) {
|
13 |
+
define( 'FS_CHMOD_FILE', ( fileperms( ABSPATH . 'index.php' ) & 0777 | 0644 ) );
|
14 |
+
}
|
15 |
+
return @chmod( $file, FS_CHMOD_FILE );
|
16 |
+
}
|
inc/functions/formatting.php
ADDED
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
defined( 'ABSPATH' ) or die( 'Cheatin\' uh?' );
|
3 |
+
|
4 |
+
/**
|
5 |
+
* Round UP to nearest half integer
|
6 |
+
*
|
7 |
+
* @since 1.0
|
8 |
+
* @source http://stackoverflow.com/a/13526408
|
9 |
+
*
|
10 |
+
* @param int $number The number to round up
|
11 |
+
* @return int $number The formatted number
|
12 |
+
*/
|
13 |
+
function imagify_round_half_five( $number ) {
|
14 |
+
$number = strval( $number );
|
15 |
+
$number = explode( '.', $number );
|
16 |
+
|
17 |
+
if ( ! isset( $number[1] ) ) {
|
18 |
+
return $number[0];
|
19 |
+
}
|
20 |
+
|
21 |
+
$decimal = floatval( '0.' . substr( $number[1], 0 , 2 ) ); // cut only 2 number
|
22 |
+
if ( $decimal > 0 ) {
|
23 |
+
if( $decimal <= 0.5 ) {
|
24 |
+
return floatval( $number[0] ) + 0.5;
|
25 |
+
} elseif ( $decimal > 0.5 && $decimal <= 0.99 ) {
|
26 |
+
return floatval( $number[0]) + 1;
|
27 |
+
}
|
28 |
+
} else {
|
29 |
+
return floatval( $number );
|
30 |
+
}
|
31 |
+
}
|
inc/functions/options.php
ADDED
@@ -0,0 +1,78 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
defined( 'ABSPATH' ) or die( 'Cheatin\' uh?' );
|
3 |
+
|
4 |
+
/**
|
5 |
+
* A wrapper to easily get imagify option
|
6 |
+
*
|
7 |
+
* @since 1.0
|
8 |
+
*
|
9 |
+
* @param string $option The option name
|
10 |
+
* @param bool $default The default value of option
|
11 |
+
* @return mixed The option value
|
12 |
+
*/
|
13 |
+
function get_imagify_option( $option, $default = false ) {
|
14 |
+
/**
|
15 |
+
* Pre-filter any Imagify option before read
|
16 |
+
*
|
17 |
+
* @since 1.0
|
18 |
+
*
|
19 |
+
* @param variant $default The default value
|
20 |
+
*/
|
21 |
+
$value = apply_filters( 'pre_get_imagify_option_' . $option, NULL, $default );
|
22 |
+
|
23 |
+
if ( NULL !== $value ) {
|
24 |
+
return $value;
|
25 |
+
}
|
26 |
+
|
27 |
+
$plugins = get_site_option( 'active_sitewide_plugins');
|
28 |
+
$options = isset( $plugins[ IMAGIFY_SLUG . '/imagify.php' ] ) ? get_site_option( IMAGIFY_SETTINGS_SLUG ) : get_option( IMAGIFY_SETTINGS_SLUG );
|
29 |
+
$value = isset( $options[ $option ] ) && $options[ $option ] !== '' ? $options[ $option ] : $default;
|
30 |
+
|
31 |
+
if ( 'api_key' === $option && ( defined( 'IMAGIFY_API_KEY' ) && IMAGIFY_API_KEY ) ) {
|
32 |
+
$value = IMAGIFY_API_KEY;
|
33 |
+
}
|
34 |
+
|
35 |
+
/**
|
36 |
+
* Filter any Imagify option after read
|
37 |
+
*
|
38 |
+
* @since 1.0
|
39 |
+
*
|
40 |
+
* @param variant $default The default value
|
41 |
+
*/
|
42 |
+
return apply_filters( 'get_imagify_option_' . $option, $value, $default );
|
43 |
+
}
|
44 |
+
|
45 |
+
/**
|
46 |
+
* Determine if the Imagify API key is valid
|
47 |
+
*
|
48 |
+
* @since 1.0
|
49 |
+
*
|
50 |
+
* @return bool True if the API key is valid
|
51 |
+
*/
|
52 |
+
function imagify_valid_key() {
|
53 |
+
static $imagify_valid_key = null;
|
54 |
+
|
55 |
+
if ( null !== $imagify_valid_key ) {
|
56 |
+
return $imagify_valid_key;
|
57 |
+
}
|
58 |
+
|
59 |
+
if ( ! get_imagify_option( 'api_key', false ) ) {
|
60 |
+
$imagify_valid_key = false;
|
61 |
+
return false;
|
62 |
+
}
|
63 |
+
|
64 |
+
if ( get_site_transient( 'imagify_check_licence_1' ) ) {
|
65 |
+
$imagify_valid_key = true;
|
66 |
+
return true;
|
67 |
+
}
|
68 |
+
|
69 |
+
if ( is_wp_error( get_imagify_user() ) ) {
|
70 |
+
$imagify_valid_key = false;
|
71 |
+
return false;
|
72 |
+
}
|
73 |
+
|
74 |
+
$imagify_valid_key = true;
|
75 |
+
set_site_transient( 'imagify_check_licence_1', true, YEAR_IN_SECONDS );
|
76 |
+
|
77 |
+
return true;
|
78 |
+
}
|
inc/functions/process.php
ADDED
@@ -0,0 +1,139 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
defined( 'ABSPATH' ) or die( 'Cheatin\' uh?' );
|
3 |
+
|
4 |
+
/**
|
5 |
+
* Process an image with Imagify.
|
6 |
+
*
|
7 |
+
* @since 1.0
|
8 |
+
*
|
9 |
+
* @param string $file_path Absolute path to the image file.
|
10 |
+
* @param bool $backup Force a backup of the original file.
|
11 |
+
* @param int $optimization_level The optimization level (2=ultra, 1=aggressive, 0=normal).
|
12 |
+
* @param array $resize The resize parameters (with & height).
|
13 |
+
* @param bool $keep_exif To keep exif data or not
|
14 |
+
* @return obj|array Error message | Optimized image data
|
15 |
+
*/
|
16 |
+
function do_imagify( $file_path, $backup, $optimization_level, $resize = array(), $keep_exif = false ) {
|
17 |
+
$errors = new WP_Error();
|
18 |
+
|
19 |
+
/**
|
20 |
+
* Filter the attachment path
|
21 |
+
*
|
22 |
+
* @since 1.2
|
23 |
+
*
|
24 |
+
* @param string $file_path The attachment path
|
25 |
+
*/
|
26 |
+
$file_path = apply_filters( 'imagify_file_path', $file_path );
|
27 |
+
|
28 |
+
// Check if the Imagify servers & the API are accessible
|
29 |
+
if ( ! is_imagify_servers_up() ) {
|
30 |
+
$errors->add( 'api_server_down', __( 'Sorry, our servers are temporarily unaccessible. Please, try again in a couple of minutes.', 'imagify' ) );
|
31 |
+
return $errors;
|
32 |
+
}
|
33 |
+
|
34 |
+
// Check if external HTTP requests are blocked.
|
35 |
+
if ( is_imagify_blocked() ) {
|
36 |
+
$errors->add( 'http_block_external', __( 'External HTTP requests are blocked', 'imagify' ) );
|
37 |
+
return $errors;
|
38 |
+
}
|
39 |
+
|
40 |
+
// Check that file path isn't empty
|
41 |
+
if ( empty( $file_path ) ) {
|
42 |
+
$errors->add( 'empty_path', __( 'File path is empty', 'imagify' ) );
|
43 |
+
return $errors;
|
44 |
+
}
|
45 |
+
|
46 |
+
// Check that the file exists
|
47 |
+
if ( ! file_exists( $file_path ) || ! is_file( $file_path ) ) {
|
48 |
+
$errors->add( 'file_not_found', sprintf( __( 'Could not find %s', 'imagify' ), $file_path ) );
|
49 |
+
}
|
50 |
+
|
51 |
+
// Check that the file is writable
|
52 |
+
if ( ! is_writable( dirname( $file_path ) ) ) {
|
53 |
+
$errors->add( 'not_writable', sprintf( __( "%s is not writable", 'imagify' ), dirname( $file_path ) ) );
|
54 |
+
return $errors;
|
55 |
+
}
|
56 |
+
|
57 |
+
// Get file size
|
58 |
+
$file_size = file_exists( $file_path ) ? filesize( $file_path ) : 0;
|
59 |
+
|
60 |
+
// Check that file exists
|
61 |
+
if ( 0 == $file_size ) {
|
62 |
+
$errors->add( 'image_not_found', sprintf( __( 'Skipped (%s), image not found.', 'imagify' ), size_format( $file_size ) ) );
|
63 |
+
return $errors;
|
64 |
+
}
|
65 |
+
|
66 |
+
/**
|
67 |
+
* Fires before to optimize the Image with Imagify.
|
68 |
+
*
|
69 |
+
* @since 1.0
|
70 |
+
*
|
71 |
+
* @param string $file_path Absolute path to the image file.
|
72 |
+
* @param bool $backup Force a backup of the original file.
|
73 |
+
*/
|
74 |
+
do_action( 'before_do_imagify', $file_path, $backup );
|
75 |
+
|
76 |
+
// Send image for optimization and fetch the response
|
77 |
+
$response = upload_imagify_image(
|
78 |
+
array(
|
79 |
+
'image' => curl_file_create( $file_path ),
|
80 |
+
'data' => json_encode(
|
81 |
+
array(
|
82 |
+
'aggressive' => ( 1 === (int) $optimization_level ) ? true : false,
|
83 |
+
'ultra' => ( 2 === (int) $optimization_level ) ? true : false,
|
84 |
+
'resize' => $resize,
|
85 |
+
'keep_exif' => $keep_exif
|
86 |
+
)
|
87 |
+
)
|
88 |
+
)
|
89 |
+
);
|
90 |
+
|
91 |
+
// Check status code
|
92 |
+
if( is_wp_error( $response ) ) {
|
93 |
+
$errors->add( 'api_error', $response->get_error_message() );
|
94 |
+
return $errors;
|
95 |
+
}
|
96 |
+
|
97 |
+
// Create a backup file
|
98 |
+
if ( $backup ) {
|
99 |
+
$backup_path = get_imagify_attachment_backup_path( $file_path );
|
100 |
+
$backup_path_info = pathinfo( $backup_path );
|
101 |
+
|
102 |
+
wp_mkdir_p( $backup_path_info['dirname'] );
|
103 |
+
|
104 |
+
// TO DO - check and send a error message if the backup can't be created
|
105 |
+
@copy( $file_path, $backup_path );
|
106 |
+
imagify_chmod_file( $backup_path );
|
107 |
+
}
|
108 |
+
|
109 |
+
if ( ! function_exists( 'download_url' ) ) {
|
110 |
+
require( ABSPATH . 'wp-admin/includes/file.php' );
|
111 |
+
}
|
112 |
+
|
113 |
+
$temp_file = download_url( $response->image );
|
114 |
+
|
115 |
+
if ( is_wp_error( $temp_file ) ) {
|
116 |
+
$errors->add( 'temp_file_not_found', $temp_file->get_error_message() );
|
117 |
+
return $errors;
|
118 |
+
}
|
119 |
+
|
120 |
+
@rename( $temp_file, $file_path );
|
121 |
+
imagify_chmod_file( $file_path );
|
122 |
+
|
123 |
+
// If temp file still exists, delete it
|
124 |
+
if ( file_exists( $temp_file ) ) {
|
125 |
+
unlink( $temp_file );
|
126 |
+
}
|
127 |
+
|
128 |
+
/**
|
129 |
+
* Fires after to optimize the Image with Imagify.
|
130 |
+
*
|
131 |
+
* @since 1.0
|
132 |
+
*
|
133 |
+
* @param string $file_path Absolute path to the image file.
|
134 |
+
* @param bool $backup Force a backup of the original file.
|
135 |
+
*/
|
136 |
+
do_action( 'after_do_imagify', $file_path, $backup );
|
137 |
+
|
138 |
+
return $response;
|
139 |
+
}
|
languages/imagify-es_ES.mo
ADDED
Binary file
|
languages/imagify-es_ES.po
ADDED
@@ -0,0 +1,945 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
msgid ""
|
2 |
+
msgstr ""
|
3 |
+
"Project-Id-Version: Imagify\n"
|
4 |
+
"POT-Creation-Date: 2016-01-27 14:28+0100\n"
|
5 |
+
"PO-Revision-Date: 2016-01-27 14:31+0100\n"
|
6 |
+
"Last-Translator: \n"
|
7 |
+
"Language-Team: \n"
|
8 |
+
"Language: es\n"
|
9 |
+
"MIME-Version: 1.0\n"
|
10 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
+
"Content-Transfer-Encoding: 8bit\n"
|
12 |
+
"X-Generator: Poedit 1.8.6\n"
|
13 |
+
"X-Poedit-Basepath: ..\n"
|
14 |
+
"X-Poedit-WPHeader: imagify.php\n"
|
15 |
+
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
16 |
+
"X-Poedit-SourceCharset: UTF-8\n"
|
17 |
+
"X-Poedit-KeywordsList: __;_e;_n:1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;esc_attr__;"
|
18 |
+
"esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c;_n_noop:1,2;"
|
19 |
+
"_nx_noop:3c,1,2;__ngettext_noop:1,2\n"
|
20 |
+
"X-Poedit-SearchPath-0: .\n"
|
21 |
+
"X-Poedit-SearchPathExcluded-0: *.js\n"
|
22 |
+
|
23 |
+
#: inc/admin/ajax.php:114 inc/functions/admin-ui.php:99
|
24 |
+
#: inc/functions/admin-ui.php:127 inc/functions/admin-ui.php:133
|
25 |
+
#: inc/functions/admin-ui.php:139 inc/functions/admin-ui.php:176
|
26 |
+
msgid "Optimizing..."
|
27 |
+
msgstr "Optimizando…"
|
28 |
+
|
29 |
+
#: inc/admin/ajax.php:114 inc/admin/enqueue.php:163 inc/admin/meta-boxes.php:29
|
30 |
+
#: inc/functions/admin-ui.php:176
|
31 |
+
msgid "Optimize"
|
32 |
+
msgstr "Optimizar"
|
33 |
+
|
34 |
+
#: inc/admin/ajax.php:407
|
35 |
+
msgid "Oops, It's almost over!"
|
36 |
+
msgstr "¡Ya casi está!"
|
37 |
+
|
38 |
+
#: inc/admin/ajax.php:408
|
39 |
+
#, php-format
|
40 |
+
msgid ""
|
41 |
+
"You have almost used all your credit.%sDon't forget to upgrade your "
|
42 |
+
"subscription to continue optimizing your images."
|
43 |
+
msgstr ""
|
44 |
+
"Ya has utilizado casi todo tu crédito.%sNo olvides ampliar tu suscripción "
|
45 |
+
"para poder seguir optimizando tus imágenes."
|
46 |
+
|
47 |
+
#: inc/admin/ajax.php:409 inc/admin/ui/bulk.php:22
|
48 |
+
msgid "View My Subscription"
|
49 |
+
msgstr "Ver mi suscripción"
|
50 |
+
|
51 |
+
#: inc/admin/ajax.php:417 inc/admin/enqueue.php:186
|
52 |
+
#: inc/admin/ui/notices.php:251
|
53 |
+
msgid "Oops, It's Over!"
|
54 |
+
msgstr "¡Ya está!"
|
55 |
+
|
56 |
+
#: inc/admin/ajax.php:418 inc/admin/enqueue.php:201
|
57 |
+
#: inc/admin/ui/notices.php:253
|
58 |
+
#, php-format
|
59 |
+
msgid ""
|
60 |
+
"You have consumed all your credit for this month. You will have <strong>%s "
|
61 |
+
"back on %s</strong>."
|
62 |
+
msgstr ""
|
63 |
+
"Has consumido todo tu crédito para este mes. Volverás a tener <strong>%s el "
|
64 |
+
"%s</strong>."
|
65 |
+
|
66 |
+
#: inc/admin/ajax.php:419
|
67 |
+
msgid "Upgrade My Subscription"
|
68 |
+
msgstr "Actualizar mi suscripción"
|
69 |
+
|
70 |
+
#: inc/admin/ajax.php:438 inc/admin/ui/bulk.php:16
|
71 |
+
msgid "Account status"
|
72 |
+
msgstr "Estado de mi cuenta"
|
73 |
+
|
74 |
+
#: inc/admin/ajax.php:439 inc/admin/ui/bulk.php:17
|
75 |
+
msgid "Your subscription:"
|
76 |
+
msgstr "Tu suscripción:"
|
77 |
+
|
78 |
+
#: inc/admin/ajax.php:447 inc/admin/ui/bulk.php:47
|
79 |
+
#, php-format
|
80 |
+
msgid "You have %s space credit left"
|
81 |
+
msgstr "Te queda un saldo de %s"
|
82 |
+
|
83 |
+
#: inc/admin/ajax.php:459
|
84 |
+
msgid "View my subscription"
|
85 |
+
msgstr "Ver mi suscripción"
|
86 |
+
|
87 |
+
#: inc/admin/enqueue.php:121
|
88 |
+
msgid "Let's get you started!"
|
89 |
+
msgstr "¡Vamos a comenzar!"
|
90 |
+
|
91 |
+
#: inc/admin/enqueue.php:122
|
92 |
+
msgid "Enter your email to get an API key:"
|
93 |
+
msgstr "Ingresa tu email para obtener un clave API:"
|
94 |
+
|
95 |
+
#: inc/admin/enqueue.php:123
|
96 |
+
msgid "Sign Up"
|
97 |
+
msgstr "Registrate"
|
98 |
+
|
99 |
+
#: inc/admin/enqueue.php:124
|
100 |
+
msgid "You need to specify an email!"
|
101 |
+
msgstr "¡Es necesario especificar una dirección email!"
|
102 |
+
|
103 |
+
#: inc/admin/enqueue.php:125 inc/admin/enqueue.php:131
|
104 |
+
msgid "Congratulations!"
|
105 |
+
msgstr "¡Enhorabuena!"
|
106 |
+
|
107 |
+
#: inc/admin/enqueue.php:126
|
108 |
+
msgid ""
|
109 |
+
"Your account has been succesfully created. Please check your mailbox, you "
|
110 |
+
"are going to receive an email with API key."
|
111 |
+
msgstr ""
|
112 |
+
"Tu cuenta ha sido creada con éxito. Por favor, revisa tu buzón de correo, "
|
113 |
+
"recibirás un email con la clave API."
|
114 |
+
|
115 |
+
#: inc/admin/enqueue.php:127
|
116 |
+
msgid "Connect to Imagify!"
|
117 |
+
msgstr "¡Conéctate a Imagify!"
|
118 |
+
|
119 |
+
#: inc/admin/enqueue.php:128
|
120 |
+
msgid "Paste your API key below:"
|
121 |
+
msgstr "Pega aquí abajo tu clave API:"
|
122 |
+
|
123 |
+
#: inc/admin/enqueue.php:129
|
124 |
+
msgid "Connect me"
|
125 |
+
msgstr "Conéctame"
|
126 |
+
|
127 |
+
#: inc/admin/enqueue.php:130
|
128 |
+
msgid "Check in progress..."
|
129 |
+
msgstr "Control en curso…"
|
130 |
+
|
131 |
+
#: inc/admin/enqueue.php:132
|
132 |
+
msgid ""
|
133 |
+
"Your API key is valid. You can now configure the Imagify settings to "
|
134 |
+
"optimize your images."
|
135 |
+
msgstr ""
|
136 |
+
"Tu clave API es válida. Ahora puedes configurar los parámetros de Imagify "
|
137 |
+
"para optimizar tus imágenes."
|
138 |
+
|
139 |
+
#: inc/admin/enqueue.php:133 inc/admin/ui/options.php:85
|
140 |
+
msgid "Your API key is valid."
|
141 |
+
msgstr "Tu clave API es válida."
|
142 |
+
|
143 |
+
#: inc/admin/enqueue.php:150
|
144 |
+
msgid "Don't Need a Parachute?"
|
145 |
+
msgstr "¿No necesitas un paracaídas?"
|
146 |
+
|
147 |
+
#: inc/admin/enqueue.php:151
|
148 |
+
msgid ""
|
149 |
+
"If you keep this option deactivated, you won't be able to re-optimize your "
|
150 |
+
"images to another compression level and restore your original images in case "
|
151 |
+
"of need."
|
152 |
+
msgstr ""
|
153 |
+
"Si mantienes esta opción desactivada, no podrás re-optimizar tus imágenes a "
|
154 |
+
"otro nivel de compresión ni restablecer la imagen original en caso de "
|
155 |
+
"necesidad."
|
156 |
+
|
157 |
+
#: inc/admin/enqueue.php:164 inc/functions/admin-ui.php:75
|
158 |
+
msgid "Restore Original"
|
159 |
+
msgstr "Recuperar tamaño original"
|
160 |
+
|
161 |
+
#: inc/admin/enqueue.php:178
|
162 |
+
msgid "Please wait..."
|
163 |
+
msgstr "Espera, por favor…"
|
164 |
+
|
165 |
+
#: inc/admin/enqueue.php:179
|
166 |
+
msgid ""
|
167 |
+
"We are trying to get your unoptimized images, it may take time depending on "
|
168 |
+
"the number of images."
|
169 |
+
msgstr ""
|
170 |
+
"Estamos tratando de obtener tus imágenes no optimizadas: esto puede tomar "
|
171 |
+
"tiempo, dependiendo del número de imágenes."
|
172 |
+
|
173 |
+
#: inc/admin/enqueue.php:182 inc/admin/ui/bulk.php:257 inc/admin/upload.php:38
|
174 |
+
msgid "Optimized"
|
175 |
+
msgstr "Optimizado"
|
176 |
+
|
177 |
+
#: inc/admin/enqueue.php:183 inc/admin/upload.php:39
|
178 |
+
msgid "Unoptimized"
|
179 |
+
msgstr "No optimizado"
|
180 |
+
|
181 |
+
#: inc/admin/enqueue.php:184
|
182 |
+
msgid "Error"
|
183 |
+
msgstr "Error"
|
184 |
+
|
185 |
+
#: inc/admin/enqueue.php:187
|
186 |
+
msgid "Hold on!"
|
187 |
+
msgstr "¡Espera!"
|
188 |
+
|
189 |
+
#: inc/admin/enqueue.php:188
|
190 |
+
msgid "All your images have been optimized by Imagify. Congratulations!"
|
191 |
+
msgstr "Todas tus imágenes han sido optimizadas por Imagify. ¡Enhorabuena!"
|
192 |
+
|
193 |
+
#: inc/admin/enqueue.php:190
|
194 |
+
#, php-format
|
195 |
+
msgid ""
|
196 |
+
"Discover @imagify, the new compression tool to optimize your images for "
|
197 |
+
"free. I saved %1$s out of %2$s!"
|
198 |
+
msgstr ""
|
199 |
+
"Descubre @imagify, la nueva herramienta de compresión para optimizar tus "
|
200 |
+
"imágenes gratuitamente. Me ha ahorrado %1$s de %2$s!"
|
201 |
+
|
202 |
+
#: inc/admin/enqueue.php:198 inc/admin/enqueue.php:201
|
203 |
+
#: inc/admin/ui/notices.php:253
|
204 |
+
#, php-format
|
205 |
+
msgid ""
|
206 |
+
"To continue to optimize your images, log in to your Imagify account to %sbuy "
|
207 |
+
"a pack or subscribe to a plan%s."
|
208 |
+
msgstr ""
|
209 |
+
"Para seguir optimizando tus imágenes, inicia sesión en tu cuenta Imagify "
|
210 |
+
"para %scomprar un paquete o subscribir un plan %s."
|
211 |
+
|
212 |
+
#: inc/admin/enqueue.php:201
|
213 |
+
msgid "F j, Y"
|
214 |
+
msgstr "F j, Y"
|
215 |
+
|
216 |
+
#: inc/admin/menu.php:24 inc/admin/plugins.php:13 inc/admin/ui/bulk.php:78
|
217 |
+
#: inc/common/admin-bar.php:39
|
218 |
+
msgid "Bulk Optimization"
|
219 |
+
msgstr "Optimización masiva"
|
220 |
+
|
221 |
+
#. Plugin Name of the plugin/theme
|
222 |
+
#: inc/admin/meta-boxes.php:18 inc/admin/meta-boxes.php:25
|
223 |
+
#: inc/admin/upload.php:11
|
224 |
+
msgid "Imagify"
|
225 |
+
msgstr "Imagify"
|
226 |
+
|
227 |
+
#: inc/admin/meta-boxes.php:20 inc/functions/admin-ui.php:168
|
228 |
+
msgid "Invalid API key"
|
229 |
+
msgstr "Clave API no válida"
|
230 |
+
|
231 |
+
#: inc/admin/meta-boxes.php:22 inc/functions/admin-ui.php:170
|
232 |
+
msgid "Check your Settings"
|
233 |
+
msgstr "Comprueba tu configuración"
|
234 |
+
|
235 |
+
#: inc/admin/options.php:107
|
236 |
+
msgid "Cheatin’ uh?"
|
237 |
+
msgstr "Haciendo trampa ¿Uh?"
|
238 |
+
|
239 |
+
#: inc/admin/options.php:115
|
240 |
+
msgid "<strong>ERROR</strong>: options page not found."
|
241 |
+
msgstr "<strong>ERROR</strong>: página de opciones no encontrada."
|
242 |
+
|
243 |
+
#: inc/admin/plugins.php:14 inc/admin/ui/options.php:70
|
244 |
+
#: inc/common/admin-bar.php:30
|
245 |
+
msgid "Settings"
|
246 |
+
msgstr "Configuración"
|
247 |
+
|
248 |
+
#: inc/admin/ui/bulk.php:59
|
249 |
+
msgid "Upgrade your account to continue optimizing your images"
|
250 |
+
msgstr "Actualiza tu cuenta para seguir optimizando tus imágenes"
|
251 |
+
|
252 |
+
#: inc/admin/ui/bulk.php:63
|
253 |
+
msgid "More info"
|
254 |
+
msgstr "Más info"
|
255 |
+
|
256 |
+
#: inc/admin/ui/bulk.php:88
|
257 |
+
msgid "Information"
|
258 |
+
msgstr "Información"
|
259 |
+
|
260 |
+
#: inc/admin/ui/bulk.php:90
|
261 |
+
msgid ""
|
262 |
+
"Please be aware that optimizing a large number of images can take a while "
|
263 |
+
"depending on your server and network speed."
|
264 |
+
msgstr ""
|
265 |
+
"Por favor ten en cuenta que la optimización de un gran número de imágenes "
|
266 |
+
"puede demorar un poco según tu servidor y la velocidad de tu red."
|
267 |
+
|
268 |
+
#: inc/admin/ui/bulk.php:91
|
269 |
+
msgid ""
|
270 |
+
"You must keep this page open while the bulk optimizaton is processing. If "
|
271 |
+
"you leave you can come back to continue where it left off."
|
272 |
+
msgstr ""
|
273 |
+
"Tienes que mantener esta página abierta durante la optimización masiva. Si "
|
274 |
+
"la abandonas, siempre puedes volver y retomarla donde la hayas dejado."
|
275 |
+
|
276 |
+
#: inc/admin/ui/bulk.php:99
|
277 |
+
msgid "Select Your Compression Level"
|
278 |
+
msgstr "Selecciona tu nivel de compresión"
|
279 |
+
|
280 |
+
#: inc/admin/ui/bulk.php:102 inc/admin/ui/bulk.php:130
|
281 |
+
#: inc/admin/ui/options.php:129 inc/admin/ui/options.php:319
|
282 |
+
#: inc/admin/ui/options.php:382 inc/admin/ui/options.php:399
|
283 |
+
#: inc/admin/ui/options.php:459 inc/classes/class-attachment.php:120
|
284 |
+
#: inc/functions/admin-ui.php:127
|
285 |
+
msgid "Ultra"
|
286 |
+
msgstr "Ultra"
|
287 |
+
|
288 |
+
#: inc/admin/ui/bulk.php:105 inc/admin/ui/bulk.php:125
|
289 |
+
#: inc/admin/ui/options.php:124 inc/admin/ui/options.php:331
|
290 |
+
#: inc/admin/ui/options.php:381 inc/admin/ui/options.php:394
|
291 |
+
#: inc/admin/ui/options.php:438 inc/classes/class-attachment.php:123
|
292 |
+
#: inc/functions/admin-ui.php:133
|
293 |
+
msgid "Aggressive"
|
294 |
+
msgstr "Agresivo"
|
295 |
+
|
296 |
+
#: inc/admin/ui/bulk.php:108 inc/admin/ui/bulk.php:120
|
297 |
+
#: inc/admin/ui/options.php:119 inc/admin/ui/options.php:343
|
298 |
+
#: inc/admin/ui/options.php:380 inc/admin/ui/options.php:389
|
299 |
+
#: inc/admin/ui/options.php:418 inc/classes/class-attachment.php:126
|
300 |
+
#: inc/functions/admin-ui.php:139
|
301 |
+
msgid "Normal"
|
302 |
+
msgstr "Normal"
|
303 |
+
|
304 |
+
#: inc/admin/ui/bulk.php:112
|
305 |
+
msgid "Your default setting:"
|
306 |
+
msgstr "Tu configuración por defecto:"
|
307 |
+
|
308 |
+
#: inc/admin/ui/bulk.php:139
|
309 |
+
#, php-format
|
310 |
+
msgid "Don't forget to check %syour settings%s before bulk optimization."
|
311 |
+
msgstr "No olvides revisar %stus ajustes%s antes de la optimización masiva."
|
312 |
+
|
313 |
+
#: inc/admin/ui/bulk.php:149
|
314 |
+
msgid "Imagif'em all"
|
315 |
+
msgstr "Imagíficalo todo"
|
316 |
+
|
317 |
+
#: inc/admin/ui/bulk.php:156
|
318 |
+
#, php-format
|
319 |
+
msgid ""
|
320 |
+
"All images which are over to %s could be optimized using the pro version."
|
321 |
+
msgstr ""
|
322 |
+
"Todas las imágenes de tamaño superior a %s pueden optimizarse utilizando la "
|
323 |
+
"versión pro."
|
324 |
+
|
325 |
+
#: inc/admin/ui/bulk.php:167
|
326 |
+
msgid "Overview"
|
327 |
+
msgstr "Resumen"
|
328 |
+
|
329 |
+
#: inc/admin/ui/bulk.php:177
|
330 |
+
msgid "Statistics"
|
331 |
+
msgstr "Estadísticas"
|
332 |
+
|
333 |
+
#: inc/admin/ui/bulk.php:189
|
334 |
+
msgid "that's the number of images you optimized with Imagify"
|
335 |
+
msgstr "este es el número de imágenes que has optimizado con Imagify"
|
336 |
+
|
337 |
+
#: inc/admin/ui/bulk.php:194
|
338 |
+
msgid "Original size"
|
339 |
+
msgstr "Tamaño original"
|
340 |
+
|
341 |
+
#: inc/admin/ui/bulk.php:199
|
342 |
+
msgid "Optimized size"
|
343 |
+
msgstr "Tamaño optimizado"
|
344 |
+
|
345 |
+
#: inc/admin/ui/bulk.php:210
|
346 |
+
#, php-format
|
347 |
+
msgid "that's the size you saved %sby using Imagify"
|
348 |
+
msgstr "este es el tamaño que ahorraste %scon Imagify"
|
349 |
+
|
350 |
+
#: inc/admin/ui/bulk.php:230
|
351 |
+
msgid "Well done!"
|
352 |
+
msgstr "¡Bien hecho!"
|
353 |
+
|
354 |
+
#: inc/admin/ui/bulk.php:231
|
355 |
+
#, php-format
|
356 |
+
msgid "you saved %1$s out of %2$s"
|
357 |
+
msgstr "has ahorrado %1$s de %2$s"
|
358 |
+
|
359 |
+
#: inc/admin/ui/bulk.php:236
|
360 |
+
msgid "Share your awesome result"
|
361 |
+
msgstr "Comparte tus impresionantes resultados"
|
362 |
+
|
363 |
+
#: inc/admin/ui/bulk.php:251
|
364 |
+
msgid "Compression process results"
|
365 |
+
msgstr "Resultados del proceso de compresión"
|
366 |
+
|
367 |
+
#: inc/admin/ui/bulk.php:254
|
368 |
+
msgid "Filename"
|
369 |
+
msgstr "Nombre de archivo"
|
370 |
+
|
371 |
+
#: inc/admin/ui/bulk.php:255
|
372 |
+
msgid "Status"
|
373 |
+
msgstr "Estado"
|
374 |
+
|
375 |
+
#: inc/admin/ui/bulk.php:256 inc/admin/ui/options.php:379
|
376 |
+
#: inc/admin/ui/options.php:384 inc/admin/ui/options.php:408
|
377 |
+
msgid "Original"
|
378 |
+
msgstr "Original"
|
379 |
+
|
380 |
+
#: inc/admin/ui/bulk.php:258
|
381 |
+
msgid "Percentage"
|
382 |
+
msgstr "Porcentaje"
|
383 |
+
|
384 |
+
#: inc/admin/ui/bulk.php:259
|
385 |
+
msgid "Thumbnails optimized"
|
386 |
+
msgstr "Miniaturas optimizadas:"
|
387 |
+
|
388 |
+
#: inc/admin/ui/bulk.php:260
|
389 |
+
msgid "Overall saving"
|
390 |
+
msgstr "Ahorro total"
|
391 |
+
|
392 |
+
#: inc/admin/ui/bulk.php:265
|
393 |
+
msgid "file"
|
394 |
+
msgstr "archivo"
|
395 |
+
|
396 |
+
#: inc/admin/ui/bulk.php:266
|
397 |
+
msgid "error"
|
398 |
+
msgstr "error"
|
399 |
+
|
400 |
+
#: inc/admin/ui/bulk.php:267
|
401 |
+
msgid "Total:"
|
402 |
+
msgstr "Total:"
|
403 |
+
|
404 |
+
#: inc/admin/ui/bulk.php:268
|
405 |
+
msgid "Gain:"
|
406 |
+
msgstr "Ganancia:"
|
407 |
+
|
408 |
+
#: inc/admin/ui/bulk.php:285
|
409 |
+
#, php-format
|
410 |
+
msgid "%sStart the bulk optimization%s"
|
411 |
+
msgstr "%sEmpieza la optimización masiva%s"
|
412 |
+
|
413 |
+
#: inc/admin/ui/notices.php:23
|
414 |
+
msgid "Welcome to Imagify, the best way to easily optimize your images!"
|
415 |
+
msgstr ""
|
416 |
+
"¡Bienvenido a Imagify, la mejor manera de optimizar fácilmente tus imágenes!"
|
417 |
+
|
418 |
+
#: inc/admin/ui/notices.php:25 inc/admin/ui/notices.php:90
|
419 |
+
#: inc/admin/ui/notices.php:181 inc/admin/ui/notices.php:217
|
420 |
+
#: inc/admin/ui/notices.php:256
|
421 |
+
msgid "Dismiss this notice"
|
422 |
+
msgstr "Descarta este aviso"
|
423 |
+
|
424 |
+
#: inc/admin/ui/notices.php:32
|
425 |
+
msgid "Create an Account"
|
426 |
+
msgstr "Crea una cuenta"
|
427 |
+
|
428 |
+
#: inc/admin/ui/notices.php:33
|
429 |
+
msgid ""
|
430 |
+
"Don't have an Imagify account yet? Optimize your images by creating an "
|
431 |
+
"account in a few seconds!"
|
432 |
+
msgstr ""
|
433 |
+
"¿Todavía no tienes una cuenta Imagify? Optimiza tus imágenes creando una "
|
434 |
+
"cuenta en unos segundos!"
|
435 |
+
|
436 |
+
#: inc/admin/ui/notices.php:36
|
437 |
+
msgid "Sign up, It's FREE!"
|
438 |
+
msgstr "Regístrate, ¡es GRATIS!"
|
439 |
+
|
440 |
+
#: inc/admin/ui/notices.php:42
|
441 |
+
msgid "Enter your API Key"
|
442 |
+
msgstr "Ingresa tu clave API"
|
443 |
+
|
444 |
+
#: inc/admin/ui/notices.php:43
|
445 |
+
#, php-format
|
446 |
+
msgid ""
|
447 |
+
"Save your API Key you have received by email or you can get it on your "
|
448 |
+
"%sImagify account page%s."
|
449 |
+
msgstr ""
|
450 |
+
"Guarda la clave API que has recibido por email, o consigue una en tu "
|
451 |
+
"%spágina de cuenta Imagify%s."
|
452 |
+
|
453 |
+
#: inc/admin/ui/notices.php:46
|
454 |
+
msgid "I have my API key"
|
455 |
+
msgstr "Tengo mi clave API"
|
456 |
+
|
457 |
+
#: inc/admin/ui/notices.php:52
|
458 |
+
msgid "Configure it"
|
459 |
+
msgstr "Configuralo"
|
460 |
+
|
461 |
+
#: inc/admin/ui/notices.php:53
|
462 |
+
msgid ""
|
463 |
+
"It’s almost done! You have just to configure your optimization settings."
|
464 |
+
msgstr ""
|
465 |
+
"¡Casi está listo! Sólo te queda configurar tus ajustes de optimización."
|
466 |
+
|
467 |
+
#: inc/admin/ui/notices.php:54
|
468 |
+
msgid "Go to Settings"
|
469 |
+
msgstr "Ve a la configuración"
|
470 |
+
|
471 |
+
#: inc/admin/ui/notices.php:85 inc/admin/ui/options.php:91
|
472 |
+
msgid "Your API key isn't valid!"
|
473 |
+
msgstr "¡Tu clave API no es válida!"
|
474 |
+
|
475 |
+
#: inc/admin/ui/notices.php:88
|
476 |
+
#, php-format
|
477 |
+
msgid ""
|
478 |
+
"Go to your Imagify account page to get your API Key and specify it on "
|
479 |
+
"%1$syour settings%3$s or %2$screate an account for free%3$s if you don't "
|
480 |
+
"have one yet."
|
481 |
+
msgstr ""
|
482 |
+
"Ve a la página de tu cuenta Imagify para obtener la clave API y especifícala "
|
483 |
+
"en %1$stu configuración%3$s; si todavía no la tienes, %2$screa ahora una "
|
484 |
+
"cuenta gratuita%3$s."
|
485 |
+
|
486 |
+
#: inc/admin/ui/notices.php:138
|
487 |
+
msgid ""
|
488 |
+
"The following plugins are not compatible with this plugin and may cause "
|
489 |
+
"unexpected results:"
|
490 |
+
msgstr ""
|
491 |
+
"Los plugin siguientes no son compatibles con este plugin y pueden causar "
|
492 |
+
"resultados inesperados:"
|
493 |
+
|
494 |
+
#: inc/admin/ui/notices.php:144
|
495 |
+
msgid "Deactivate"
|
496 |
+
msgstr "Desactiva"
|
497 |
+
|
498 |
+
#: inc/admin/ui/notices.php:173
|
499 |
+
msgid "The external HTTP requests are blocked!"
|
500 |
+
msgstr "¡Las solicitudes HTTP externas están bloqueadas!"
|
501 |
+
|
502 |
+
#: inc/admin/ui/notices.php:174
|
503 |
+
msgid ""
|
504 |
+
"You defined the <code>WP_HTTP_BLOCK_EXTERNAL</code> constant in the <code>wp-"
|
505 |
+
"config.php</code> to block all external HTTP requests."
|
506 |
+
msgstr ""
|
507 |
+
"Has definido la constante <code>WP_HTTP_BLOCK_EXTERNAL</code> en <code>wp-"
|
508 |
+
"config.php</code> para bloquear las solicitudes HTTP externas."
|
509 |
+
|
510 |
+
#: inc/admin/ui/notices.php:176
|
511 |
+
msgid ""
|
512 |
+
"To optimize your images, you have to put the following code in your <code>wp-"
|
513 |
+
"config.php</code> file so that it works correctly."
|
514 |
+
msgstr ""
|
515 |
+
"Para optimizar tus imágenes, tienes que poner el siguiente código en tu "
|
516 |
+
"archivo <code>wp-config.php</code> para que funcione correctamente."
|
517 |
+
|
518 |
+
#: inc/admin/ui/notices.php:177
|
519 |
+
msgid "Click on the field and press Ctrl-A to select all."
|
520 |
+
msgstr "Haz clic en el campo y pulse Ctrl-A para seleccionar todo."
|
521 |
+
|
522 |
+
#: inc/admin/ui/notices.php:213
|
523 |
+
msgid "You're missing out!"
|
524 |
+
msgstr "¡Te lo estás perdiendo!"
|
525 |
+
|
526 |
+
#: inc/admin/ui/notices.php:214
|
527 |
+
msgid "Use the List view to optimize images with Imagify."
|
528 |
+
msgstr "Utiliza la vista de lista para optimizar imágenes con Imagify."
|
529 |
+
|
530 |
+
#: inc/admin/ui/notices.php:215
|
531 |
+
msgid "Switch to the List View"
|
532 |
+
msgstr "Cambia a la vista de lista"
|
533 |
+
|
534 |
+
#: inc/admin/ui/options.php:18
|
535 |
+
msgid "Is your website too slow?"
|
536 |
+
msgstr "¿Tu sitio web es muy lento?"
|
537 |
+
|
538 |
+
#: inc/admin/ui/options.php:24
|
539 |
+
msgid "Discover the best caching plugin to speed up your website."
|
540 |
+
msgstr "Descubre el mejor plugin de caché para acelerar tu sitio Web."
|
541 |
+
|
542 |
+
#: inc/admin/ui/options.php:32
|
543 |
+
#, php-format
|
544 |
+
msgid "%sGet %s off%s with this coupon code:%s"
|
545 |
+
msgstr "Descuento del %s%s%s con este código de coupon:%s"
|
546 |
+
|
547 |
+
#: inc/admin/ui/options.php:37
|
548 |
+
msgid "Get WP Rocket now"
|
549 |
+
msgstr "Obten tu WP Rocket, ¡ya!"
|
550 |
+
|
551 |
+
#: inc/admin/ui/options.php:55
|
552 |
+
#, php-format
|
553 |
+
msgid ""
|
554 |
+
"%sDo you like this plugin?%s Please take a few seconds to %srate it on "
|
555 |
+
"WordPress.org%s!"
|
556 |
+
msgstr ""
|
557 |
+
"%sTe gusta este plugin?%s Por favor tomate unos segundos para %svalorarlo en "
|
558 |
+
"WordPress.org%s!"
|
559 |
+
|
560 |
+
#: inc/admin/ui/options.php:78
|
561 |
+
msgid "API Key"
|
562 |
+
msgstr "Clave API"
|
563 |
+
|
564 |
+
#: inc/admin/ui/options.php:98
|
565 |
+
#, php-format
|
566 |
+
msgid "Don't have an API Key yet? %sCreate one, it's FREE%s."
|
567 |
+
msgstr "¿Todavía no tienes una clave API? %sCréate una, es GRATIS%s."
|
568 |
+
|
569 |
+
#: inc/admin/ui/options.php:114
|
570 |
+
msgid "Optimization Level"
|
571 |
+
msgstr "Nivel de optimización"
|
572 |
+
|
573 |
+
#: inc/admin/ui/options.php:134
|
574 |
+
msgid "More info?"
|
575 |
+
msgstr "Más Info?"
|
576 |
+
|
577 |
+
#: inc/admin/ui/options.php:141
|
578 |
+
#, php-format
|
579 |
+
msgid "Need help to choose? %sTry the Visual Comparison%s"
|
580 |
+
msgstr "¿Necesita ayuda para elegir? %sPrueba la comparación visual%s"
|
581 |
+
|
582 |
+
#: inc/admin/ui/options.php:150 inc/admin/ui/options.php:154
|
583 |
+
msgid "Auto-Optimize images on upload"
|
584 |
+
msgstr "Optimización automática de imágenes en carga"
|
585 |
+
|
586 |
+
#: inc/admin/ui/options.php:158
|
587 |
+
msgid "Automatically optimize every image you upload to WordPress."
|
588 |
+
msgstr "Optimiza automáticamente cada imagen que subas a Wordpress."
|
589 |
+
|
590 |
+
#: inc/admin/ui/options.php:163 inc/admin/ui/options.php:166
|
591 |
+
msgid "Backup original images"
|
592 |
+
msgstr "Backup de las imágenes originales"
|
593 |
+
|
594 |
+
#: inc/admin/ui/options.php:170
|
595 |
+
msgid ""
|
596 |
+
"Keep your original images in a separate folder before optimization process."
|
597 |
+
msgstr ""
|
598 |
+
"Mantén tus imágenes originales en una carpeta separada antes del proceso de "
|
599 |
+
"optimización."
|
600 |
+
|
601 |
+
#: inc/admin/ui/options.php:175 inc/admin/ui/options.php:178
|
602 |
+
msgid "Resize larger images"
|
603 |
+
msgstr "Reduce las imágenes más grandes"
|
604 |
+
|
605 |
+
#: inc/admin/ui/options.php:184
|
606 |
+
#, php-format
|
607 |
+
msgid "to maximum %s pixels width"
|
608 |
+
msgstr "a una anchura máxima de %s pixel"
|
609 |
+
|
610 |
+
#: inc/admin/ui/options.php:195
|
611 |
+
#, php-format
|
612 |
+
msgid ""
|
613 |
+
"This option is recommended to reduce larger images. You can save up to 80%% "
|
614 |
+
"after resizing. The new width should not be less than your largest thumbnail "
|
615 |
+
"width, which is actually %spx."
|
616 |
+
msgstr ""
|
617 |
+
"Esta opción está recomendada para reducir las imágenes más grandes. Puedes "
|
618 |
+
"ahorrar hasta el 80%% después de la reducción de tamaño. El nuevo ancho no "
|
619 |
+
"debería ser menor que el ancho de tu miniatura más grande, que actualmente "
|
620 |
+
"es de %spx."
|
621 |
+
|
622 |
+
#: inc/admin/ui/options.php:202 inc/admin/ui/options.php:205
|
623 |
+
msgid "EXIF Data"
|
624 |
+
msgstr "Datos EXIF"
|
625 |
+
|
626 |
+
#: inc/admin/ui/options.php:209
|
627 |
+
msgid ""
|
628 |
+
"Keep all EXIF data from your images. EXIF are informations stored in your "
|
629 |
+
"pictures like shutter speed, exposure compensation, ISO, etc..."
|
630 |
+
msgstr ""
|
631 |
+
"Mantén todos los datos EXIF de tus imágenes. El EXIF es la información "
|
632 |
+
"almacenada en tus imágenes, por ejemplo la velocidad de obturación, "
|
633 |
+
"compensación de exposición, ISO, etc…."
|
634 |
+
|
635 |
+
#: inc/admin/ui/options.php:210
|
636 |
+
msgid "Learn more"
|
637 |
+
msgstr "Descubre más"
|
638 |
+
|
639 |
+
#: inc/admin/ui/options.php:212
|
640 |
+
msgid ""
|
641 |
+
"If you are a photographer, you may be interested in this option if you are "
|
642 |
+
"displaying on your pages some info like the model of your camera."
|
643 |
+
msgstr ""
|
644 |
+
"Si eres un fotógrafo, puedes estar interesado en esta opción si quieres "
|
645 |
+
"enseñar en tus páginas alguna info, por ejemplo el modelo de tu cámara."
|
646 |
+
|
647 |
+
#: inc/admin/ui/options.php:221
|
648 |
+
msgid "Files optimization"
|
649 |
+
msgstr "Optimización de archivos"
|
650 |
+
|
651 |
+
#: inc/admin/ui/options.php:224
|
652 |
+
msgid ""
|
653 |
+
"You can choose to compress different image sizes created by WordPress here."
|
654 |
+
msgstr ""
|
655 |
+
"Aquí puedes elegir de comprimir los diferentes tamaños de imagen creados por "
|
656 |
+
"WordPress."
|
657 |
+
|
658 |
+
#: inc/admin/ui/options.php:226
|
659 |
+
#, php-format
|
660 |
+
msgid "The %soriginal size%s is %sautomatically optimized%s by Imagify."
|
661 |
+
msgstr "El %stamaño original%s es %soptimizado automáticamente%s por Imagify."
|
662 |
+
|
663 |
+
#: inc/admin/ui/options.php:229
|
664 |
+
msgid ""
|
665 |
+
"Remember each additional image size will affect your Imagify monthly usage!"
|
666 |
+
msgstr ""
|
667 |
+
"Recuerda que cada tamaño adicional de imagen afectará tu consumo mensual de "
|
668 |
+
"Imagify!"
|
669 |
+
|
670 |
+
#: inc/admin/ui/options.php:282
|
671 |
+
msgid "Display options"
|
672 |
+
msgstr "Mostrar las opciones"
|
673 |
+
|
674 |
+
#: inc/admin/ui/options.php:287 inc/admin/ui/options.php:292
|
675 |
+
msgid "Show Admin Bar menu"
|
676 |
+
msgstr "Mostrar la barra de administrador"
|
677 |
+
|
678 |
+
#: inc/admin/ui/options.php:293
|
679 |
+
msgid "I want this awesome quick access menu on my admin bar."
|
680 |
+
msgstr ""
|
681 |
+
"Quiero este fantástico menú de acceso rápido en mi barra de administrador."
|
682 |
+
|
683 |
+
#: inc/admin/ui/options.php:308
|
684 |
+
#, php-format
|
685 |
+
msgid ""
|
686 |
+
"Once your settings saved, optimize all your images by using the %sImagify "
|
687 |
+
"Bulk Optimization%s feature."
|
688 |
+
msgstr ""
|
689 |
+
"Una vez guardada la configuración, optimiza tus imágenes usando la función "
|
690 |
+
"de %soptimización masiva de Imagify%s."
|
691 |
+
|
692 |
+
#: inc/admin/ui/options.php:316
|
693 |
+
msgid "You can choose three levels of compression"
|
694 |
+
msgstr "Puedes elegir entre tres niveles de compresión"
|
695 |
+
|
696 |
+
#: inc/admin/ui/options.php:321
|
697 |
+
msgid ""
|
698 |
+
"This mode will apply all available optimizations for maximum image "
|
699 |
+
"compression."
|
700 |
+
msgstr ""
|
701 |
+
"Este modo aplicará todas las optimizaciones disponibles, para una máxima "
|
702 |
+
"compresión de imagen."
|
703 |
+
|
704 |
+
#: inc/admin/ui/options.php:324
|
705 |
+
msgid ""
|
706 |
+
"This will provide a huge savings on the initial weight. Sometimes the image "
|
707 |
+
"quality could be degraded a little."
|
708 |
+
msgstr ""
|
709 |
+
"Esto proporcionará un gran ahorro en el peso inicial. A veces la calidad de "
|
710 |
+
"la imagen podría disminuir un poco."
|
711 |
+
|
712 |
+
#: inc/admin/ui/options.php:327
|
713 |
+
msgid ""
|
714 |
+
"If you want the maximum weight reduction, and you agree to lose some quality "
|
715 |
+
"on the images we recommend using this mode."
|
716 |
+
msgstr ""
|
717 |
+
"Te recomendamos usar este modo si deseas la máxima reducción de peso y "
|
718 |
+
"aceptas perder algo de calidad en las imágenes."
|
719 |
+
|
720 |
+
#: inc/admin/ui/options.php:333
|
721 |
+
msgid ""
|
722 |
+
"This mode provides perfect optimization of your images without any "
|
723 |
+
"significant quality loss."
|
724 |
+
msgstr ""
|
725 |
+
"Este modo proporciona la perfecta optimización de tus imágenes sin pérdida "
|
726 |
+
"significativa de calidad."
|
727 |
+
|
728 |
+
#: inc/admin/ui/options.php:336
|
729 |
+
msgid ""
|
730 |
+
"This will provide a drastic savings on the initial weight, with a small "
|
731 |
+
"reduction in image quality. Most of the time it's not even noticeable."
|
732 |
+
msgstr ""
|
733 |
+
"Esto proporcionará un ahorro drástico en el peso inicial, y una pequeña "
|
734 |
+
"reducción de la calidad de imagen. La mayoría de las veces no será ni "
|
735 |
+
"perceptible."
|
736 |
+
|
737 |
+
#: inc/admin/ui/options.php:339
|
738 |
+
msgid "If you want the maximum weight reduction, we recommend using this mode."
|
739 |
+
msgstr "Te recomendamos usar este modo si deseas la máxima reducción de peso."
|
740 |
+
|
741 |
+
#: inc/admin/ui/options.php:345
|
742 |
+
msgid ""
|
743 |
+
"This mode provides lossless optimization, your images will be optimized "
|
744 |
+
"without any visible change."
|
745 |
+
msgstr ""
|
746 |
+
"Este modo proporciona una optimización sin pérdidas: tus imágenes serán "
|
747 |
+
"optimizadas sin ningún cambio perceptible."
|
748 |
+
|
749 |
+
#: inc/admin/ui/options.php:348
|
750 |
+
msgid ""
|
751 |
+
"If you want the perfect quality for your images, we recommend you that mode."
|
752 |
+
msgstr ""
|
753 |
+
"Si deseas calidad perfecta para tus imágenes, te recomendamos este modo."
|
754 |
+
|
755 |
+
#: inc/admin/ui/options.php:351
|
756 |
+
msgid ""
|
757 |
+
"Note: the file size reduction will be less, compared to aggressive mode."
|
758 |
+
msgstr ""
|
759 |
+
"Nota: la reducción de tamaño del archivo será inferior, si comparado con el "
|
760 |
+
"modo agresivo."
|
761 |
+
|
762 |
+
#: inc/admin/ui/options.php:358 inc/admin/ui/options.php:480
|
763 |
+
msgid "Close"
|
764 |
+
msgstr "Cierra"
|
765 |
+
|
766 |
+
#: inc/admin/ui/options.php:370
|
767 |
+
#, php-format
|
768 |
+
msgid "I want to compare%s and%s"
|
769 |
+
msgstr "Quiero comparar %s y %s"
|
770 |
+
|
771 |
+
#: inc/admin/ui/options.php:387
|
772 |
+
#, php-format
|
773 |
+
msgid "Original photography about %s"
|
774 |
+
msgstr "Fotografía original de %s"
|
775 |
+
|
776 |
+
#: inc/admin/ui/options.php:392 inc/admin/ui/options.php:397
|
777 |
+
#: inc/admin/ui/options.php:402
|
778 |
+
#, php-format
|
779 |
+
msgid "Optimized photography about %s"
|
780 |
+
msgstr "Fotografía optimizada de %s"
|
781 |
+
|
782 |
+
#: inc/admin/ui/options.php:407 inc/admin/ui/options.php:417
|
783 |
+
#: inc/admin/ui/options.php:437 inc/admin/ui/options.php:458
|
784 |
+
#: inc/functions/admin-ui.php:58
|
785 |
+
msgid "Level:"
|
786 |
+
msgstr "Nivel:"
|
787 |
+
|
788 |
+
#: inc/admin/ui/options.php:411 inc/admin/ui/options.php:421
|
789 |
+
#: inc/admin/ui/options.php:441 inc/admin/ui/options.php:462
|
790 |
+
msgid "File Size:"
|
791 |
+
msgstr "Tamaño del archivo:"
|
792 |
+
|
793 |
+
#: inc/admin/ui/options.php:425 inc/admin/ui/options.php:445
|
794 |
+
#: inc/admin/ui/options.php:466 inc/functions/admin-ui.php:44
|
795 |
+
msgid "Original Saving:"
|
796 |
+
msgstr "Ahorro inicial:"
|
797 |
+
|
798 |
+
#: inc/admin/upload.php:40
|
799 |
+
msgid "Errors"
|
800 |
+
msgstr "Errores"
|
801 |
+
|
802 |
+
#: inc/admin/upload.php:43
|
803 |
+
msgid "Filter by status"
|
804 |
+
msgstr "Filtrar por estado"
|
805 |
+
|
806 |
+
#: inc/admin/upload.php:46
|
807 |
+
msgid "All images"
|
808 |
+
msgstr "Todas las imágenes"
|
809 |
+
|
810 |
+
#: inc/classes/class-attachment.php:501
|
811 |
+
msgid ""
|
812 |
+
"This size isn't authorized to be optimized. Update your Imagify settings if "
|
813 |
+
"you want to optimize it."
|
814 |
+
msgstr ""
|
815 |
+
"No tienes autorización para optimizar a este tamaño. Actualiza tu "
|
816 |
+
"configuración de Imagify si quieres optimizarlo."
|
817 |
+
|
818 |
+
#: inc/common/admin-bar.php:48
|
819 |
+
#, php-format
|
820 |
+
msgid "Rate Imagify on %s"
|
821 |
+
msgstr "Valora Imagify en %s"
|
822 |
+
|
823 |
+
#: inc/common/admin-bar.php:57
|
824 |
+
msgid "Loading..."
|
825 |
+
msgstr "Cargando…"
|
826 |
+
|
827 |
+
#: inc/functions/admin-ui.php:35
|
828 |
+
msgid "New Filesize:"
|
829 |
+
msgstr "Nuevo tamaño del archivo:"
|
830 |
+
|
831 |
+
#: inc/functions/admin-ui.php:51
|
832 |
+
msgid "Close details"
|
833 |
+
msgstr "Cerrar detalles"
|
834 |
+
|
835 |
+
#: inc/functions/admin-ui.php:51
|
836 |
+
msgid "View details"
|
837 |
+
msgstr "Ver detalles"
|
838 |
+
|
839 |
+
#: inc/functions/admin-ui.php:55
|
840 |
+
msgid "Original Filesize:"
|
841 |
+
msgstr "Tamaño inicial:"
|
842 |
+
|
843 |
+
#: inc/functions/admin-ui.php:61
|
844 |
+
msgid "Thumbnails Optimized:"
|
845 |
+
msgstr "Miniaturas optimizadas:"
|
846 |
+
|
847 |
+
#: inc/functions/admin-ui.php:62
|
848 |
+
msgid "Overall Saving:"
|
849 |
+
msgstr "Ahorro total:"
|
850 |
+
|
851 |
+
#: inc/functions/admin-ui.php:75
|
852 |
+
msgid "Restoring..."
|
853 |
+
msgstr "Recuperando…"
|
854 |
+
|
855 |
+
#: inc/functions/admin-ui.php:99
|
856 |
+
msgid "Try again"
|
857 |
+
msgstr "Intenta de nuevo"
|
858 |
+
|
859 |
+
#: inc/functions/admin-ui.php:127 inc/functions/admin-ui.php:133
|
860 |
+
#: inc/functions/admin-ui.php:139
|
861 |
+
#, php-format
|
862 |
+
msgid "Re-Optimize to %s"
|
863 |
+
msgstr "Re-optimiza a %s"
|
864 |
+
|
865 |
+
#: inc/functions/admin-ui.php:162
|
866 |
+
#, php-format
|
867 |
+
msgid "%s can't be optimized"
|
868 |
+
msgstr "%s no puede ser optimizado"
|
869 |
+
|
870 |
+
#: inc/functions/process.php:30
|
871 |
+
msgid ""
|
872 |
+
"Sorry, our servers are temporarily unaccessible. Please, try again in a "
|
873 |
+
"couple of minutes."
|
874 |
+
msgstr ""
|
875 |
+
"Lo sentimos, nuestros servidores están temporalmente inaccesibles. Por "
|
876 |
+
"favor, inténtalo de nuevo en un par de minutos."
|
877 |
+
|
878 |
+
#: inc/functions/process.php:36
|
879 |
+
msgid "External HTTP requests are blocked"
|
880 |
+
msgstr "Las peticiones HTTP externas están bloqueadas"
|
881 |
+
|
882 |
+
#: inc/functions/process.php:42
|
883 |
+
msgid "File path is empty"
|
884 |
+
msgstr "La ruta del archivo está vacía"
|
885 |
+
|
886 |
+
#: inc/functions/process.php:48
|
887 |
+
#, php-format
|
888 |
+
msgid "Could not find %s"
|
889 |
+
msgstr "No se pudo encontrar %s"
|
890 |
+
|
891 |
+
#: inc/functions/process.php:53
|
892 |
+
#, php-format
|
893 |
+
msgid "%s is not writable"
|
894 |
+
msgstr "%s no tiene permisos de escritura"
|
895 |
+
|
896 |
+
#: inc/functions/process.php:62
|
897 |
+
#, php-format
|
898 |
+
msgid "Skipped (%s), image not found."
|
899 |
+
msgstr "Omitido (%s), imagen no encontrada."
|
900 |
+
|
901 |
+
#. Plugin URI of the plugin/theme
|
902 |
+
msgid "https://wordpress.org/plugins/imagify/"
|
903 |
+
msgstr ""
|
904 |
+
|
905 |
+
#. Description of the plugin/theme
|
906 |
+
msgid ""
|
907 |
+
"Dramaticaly reduce image file sizes without loosing quality, make your "
|
908 |
+
"website load faster, boost your SEO and save money on your bandwith using "
|
909 |
+
"Imagify, the new most advanced image optimization tool."
|
910 |
+
msgstr ""
|
911 |
+
|
912 |
+
#. Author of the plugin/theme
|
913 |
+
msgid "WP Media"
|
914 |
+
msgstr ""
|
915 |
+
|
916 |
+
#. Author URI of the plugin/theme
|
917 |
+
msgid "http://wp-media.me"
|
918 |
+
msgstr ""
|
919 |
+
|
920 |
+
#~ msgid ""
|
921 |
+
#~ "Sorry, our servers are temporally unaccessible. Please, try again in a "
|
922 |
+
#~ "couple of minutes"
|
923 |
+
#~ msgstr ""
|
924 |
+
#~ "Lo sentimos, nuestros servidores están temporalmente inaccesibles. Por "
|
925 |
+
#~ "favor, inténtalo de nuevo en un par de minutos"
|
926 |
+
|
927 |
+
#~ msgid "Rate Imagify on WordPress.org"
|
928 |
+
#~ msgstr "Valora Imagify en WordPress.org"
|
929 |
+
|
930 |
+
#~ msgid "Discover our other products"
|
931 |
+
#~ msgstr "Descubre nuestros otros productos"
|
932 |
+
|
933 |
+
#~ msgid "Is your WordPress website too slow?"
|
934 |
+
#~ msgstr "¿Tu sitio WordPress es demasiado lento?"
|
935 |
+
|
936 |
+
#~ msgid "Checking in process..."
|
937 |
+
#~ msgstr "Control en curso…"
|
938 |
+
|
939 |
+
#~ msgid ""
|
940 |
+
#~ "If you are a photographer, you may be interested in by this option if you "
|
941 |
+
#~ "are displaying some infos like your the model of your camera on your "
|
942 |
+
#~ "pages."
|
943 |
+
#~ msgstr ""
|
944 |
+
#~ "Si eres un fotógrafo, puedes estar interesado en esta opción si quieres "
|
945 |
+
#~ "enseñar en tus páginas alguna info, por ejemplo el modelo de tu cámara."
|
languages/imagify-fr_FR.mo
ADDED
Binary file
|
languages/imagify-fr_FR.po
ADDED
@@ -0,0 +1,1179 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
msgid ""
|
2 |
+
msgstr ""
|
3 |
+
"Project-Id-Version: Imagify\n"
|
4 |
+
"POT-Creation-Date: 2016-01-27 14:27+0100\n"
|
5 |
+
"PO-Revision-Date: 2016-01-27 15:31+0100\n"
|
6 |
+
"Last-Translator: \n"
|
7 |
+
"Language-Team: \n"
|
8 |
+
"Language: fr_FR\n"
|
9 |
+
"MIME-Version: 1.0\n"
|
10 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
+
"Content-Transfer-Encoding: 8bit\n"
|
12 |
+
"X-Generator: Poedit 1.8.6\n"
|
13 |
+
"X-Poedit-Basepath: ..\n"
|
14 |
+
"X-Poedit-WPHeader: imagify.php\n"
|
15 |
+
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
|
16 |
+
"X-Poedit-SourceCharset: UTF-8\n"
|
17 |
+
"X-Poedit-KeywordsList: __;_e;_n:1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;esc_attr__;"
|
18 |
+
"esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c;_n_noop:1,2;"
|
19 |
+
"_nx_noop:3c,1,2;__ngettext_noop:1,2\n"
|
20 |
+
"X-Poedit-SearchPath-0: .\n"
|
21 |
+
"X-Poedit-SearchPathExcluded-0: *.js\n"
|
22 |
+
|
23 |
+
#: inc/admin/ajax.php:114 inc/functions/admin-ui.php:99
|
24 |
+
#: inc/functions/admin-ui.php:127 inc/functions/admin-ui.php:133
|
25 |
+
#: inc/functions/admin-ui.php:139 inc/functions/admin-ui.php:176
|
26 |
+
msgid "Optimizing..."
|
27 |
+
msgstr "En cours d’optimisation…"
|
28 |
+
|
29 |
+
#: inc/admin/ajax.php:114 inc/admin/enqueue.php:163 inc/admin/meta-boxes.php:29
|
30 |
+
#: inc/functions/admin-ui.php:176
|
31 |
+
msgid "Optimize"
|
32 |
+
msgstr "Optimiser"
|
33 |
+
|
34 |
+
#: inc/admin/ajax.php:407
|
35 |
+
msgid "Oops, It's almost over!"
|
36 |
+
msgstr "Oups, c’est bientôt fini !"
|
37 |
+
|
38 |
+
#: inc/admin/ajax.php:408
|
39 |
+
#, php-format
|
40 |
+
msgid ""
|
41 |
+
"You have almost used all your credit.%sDon't forget to upgrade your "
|
42 |
+
"subscription to continue optimizing your images."
|
43 |
+
msgstr ""
|
44 |
+
"Vous avez bientôt utilisé tout votre crédit.%sN’oubliez pas de mettre à niveau "
|
45 |
+
"votre abonnement pour continuer à optimiser vos images."
|
46 |
+
|
47 |
+
#: inc/admin/ajax.php:409 inc/admin/ui/bulk.php:22
|
48 |
+
msgid "View My Subscription"
|
49 |
+
msgstr "Voir mon abonnement"
|
50 |
+
|
51 |
+
#: inc/admin/ajax.php:417 inc/admin/enqueue.php:186 inc/admin/ui/notices.php:251
|
52 |
+
msgid "Oops, It's Over!"
|
53 |
+
msgstr "Oups, c’est fini !"
|
54 |
+
|
55 |
+
#: inc/admin/ajax.php:418 inc/admin/enqueue.php:201 inc/admin/ui/notices.php:253
|
56 |
+
#, php-format
|
57 |
+
msgid ""
|
58 |
+
"You have consumed all your credit for this month. You will have <strong>%s "
|
59 |
+
"back on %s</strong>."
|
60 |
+
msgstr ""
|
61 |
+
"Vous avez consommé tout votre crédit pour ce mois. Vous aurez à nouveau "
|
62 |
+
"<strong>%s le %s</strong>."
|
63 |
+
|
64 |
+
#: inc/admin/ajax.php:419
|
65 |
+
msgid "Upgrade My Subscription"
|
66 |
+
msgstr "Mettre à niveau mon abonnement"
|
67 |
+
|
68 |
+
#: inc/admin/ajax.php:438 inc/admin/ui/bulk.php:16
|
69 |
+
msgid "Account status"
|
70 |
+
msgstr "Type de compte"
|
71 |
+
|
72 |
+
#: inc/admin/ajax.php:439 inc/admin/ui/bulk.php:17
|
73 |
+
msgid "Your subscription:"
|
74 |
+
msgstr "Votre abonnement :"
|
75 |
+
|
76 |
+
#: inc/admin/ajax.php:447 inc/admin/ui/bulk.php:47
|
77 |
+
#, php-format
|
78 |
+
msgid "You have %s space credit left"
|
79 |
+
msgstr "Il vous reste %s de crédit"
|
80 |
+
|
81 |
+
#: inc/admin/ajax.php:459
|
82 |
+
msgid "View my subscription"
|
83 |
+
msgstr "Voir mon abonnement"
|
84 |
+
|
85 |
+
#: inc/admin/enqueue.php:121
|
86 |
+
msgid "Let's get you started!"
|
87 |
+
msgstr "C’est parti !"
|
88 |
+
|
89 |
+
#: inc/admin/enqueue.php:122
|
90 |
+
msgid "Enter your email to get an API key:"
|
91 |
+
msgstr "Indiquez votre e-mail pour recevoir votre clé API :"
|
92 |
+
|
93 |
+
#: inc/admin/enqueue.php:123
|
94 |
+
msgid "Sign Up"
|
95 |
+
msgstr "S’inscrire"
|
96 |
+
|
97 |
+
#: inc/admin/enqueue.php:124
|
98 |
+
msgid "You need to specify an email!"
|
99 |
+
msgstr "Vous devez indiquer un e-mail !"
|
100 |
+
|
101 |
+
#: inc/admin/enqueue.php:125 inc/admin/enqueue.php:131
|
102 |
+
msgid "Congratulations!"
|
103 |
+
msgstr "Félicitations !"
|
104 |
+
|
105 |
+
#: inc/admin/enqueue.php:126
|
106 |
+
msgid ""
|
107 |
+
"Your account has been succesfully created. Please check your mailbox, you are "
|
108 |
+
"going to receive an email with API key."
|
109 |
+
msgstr ""
|
110 |
+
"Votre compte a été créé avec succès. Vérifiez votre boîte de réception, vous "
|
111 |
+
"allez recevoir un e-mail avec votre clé API."
|
112 |
+
|
113 |
+
#: inc/admin/enqueue.php:127
|
114 |
+
msgid "Connect to Imagify!"
|
115 |
+
msgstr "Se connecter à Imagify !"
|
116 |
+
|
117 |
+
#: inc/admin/enqueue.php:128
|
118 |
+
msgid "Paste your API key below:"
|
119 |
+
msgstr "Copiez votre clé API ci-dessous :"
|
120 |
+
|
121 |
+
#: inc/admin/enqueue.php:129
|
122 |
+
msgid "Connect me"
|
123 |
+
msgstr "Connectez-moi"
|
124 |
+
|
125 |
+
#: inc/admin/enqueue.php:130
|
126 |
+
msgid "Check in progress..."
|
127 |
+
msgstr "Vérification en cours…"
|
128 |
+
|
129 |
+
#: inc/admin/enqueue.php:132
|
130 |
+
msgid ""
|
131 |
+
"Your API key is valid. You can now configure the Imagify settings to optimize "
|
132 |
+
"your images."
|
133 |
+
msgstr ""
|
134 |
+
"Votre clé API est valide. Vous pouvez maintenant configurer les réglages "
|
135 |
+
"d’Imagify pour optimiser vos images."
|
136 |
+
|
137 |
+
#: inc/admin/enqueue.php:133 inc/admin/ui/options.php:85
|
138 |
+
msgid "Your API key is valid."
|
139 |
+
msgstr "Votre clé API est valide."
|
140 |
+
|
141 |
+
#: inc/admin/enqueue.php:150
|
142 |
+
msgid "Don't Need a Parachute?"
|
143 |
+
msgstr "Pas besoin d’un parachute ?"
|
144 |
+
|
145 |
+
#: inc/admin/enqueue.php:151
|
146 |
+
msgid ""
|
147 |
+
"If you keep this option deactivated, you won't be able to re-optimize your "
|
148 |
+
"images to another compression level and restore your original images in case "
|
149 |
+
"of need."
|
150 |
+
msgstr ""
|
151 |
+
"Si vous gardez cette option désactivée, vous ne serez pas en mesure de "
|
152 |
+
"réoptimiser vos images à un autre niveau de compression et de restaurer vos "
|
153 |
+
"images originales en cas de besoin."
|
154 |
+
|
155 |
+
#: inc/admin/enqueue.php:164 inc/functions/admin-ui.php:75
|
156 |
+
msgid "Restore Original"
|
157 |
+
msgstr "Restaurer l’original"
|
158 |
+
|
159 |
+
#: inc/admin/enqueue.php:178
|
160 |
+
msgid "Please wait..."
|
161 |
+
msgstr "Un peu d’attente…"
|
162 |
+
|
163 |
+
#: inc/admin/enqueue.php:179
|
164 |
+
msgid ""
|
165 |
+
"We are trying to get your unoptimized images, it may take time depending on "
|
166 |
+
"the number of images."
|
167 |
+
msgstr ""
|
168 |
+
"Nous sommes en train de récupérer vos images non-optimisées, cela peut prendre "
|
169 |
+
"du temps en fonction du nombre d’images."
|
170 |
+
|
171 |
+
#: inc/admin/enqueue.php:182 inc/admin/ui/bulk.php:257 inc/admin/upload.php:38
|
172 |
+
msgid "Optimized"
|
173 |
+
msgstr "Optimisé"
|
174 |
+
|
175 |
+
#: inc/admin/enqueue.php:183 inc/admin/upload.php:39
|
176 |
+
msgid "Unoptimized"
|
177 |
+
msgstr "Non optimisé"
|
178 |
+
|
179 |
+
#: inc/admin/enqueue.php:184
|
180 |
+
msgid "Error"
|
181 |
+
msgstr "Erreur"
|
182 |
+
|
183 |
+
#: inc/admin/enqueue.php:187
|
184 |
+
msgid "Hold on!"
|
185 |
+
msgstr "Halte là !"
|
186 |
+
|
187 |
+
#: inc/admin/enqueue.php:188
|
188 |
+
msgid "All your images have been optimized by Imagify. Congratulations!"
|
189 |
+
msgstr "Toutes vos images ont été optimisées par Imagify. Félicitations !"
|
190 |
+
|
191 |
+
#: inc/admin/enqueue.php:190
|
192 |
+
#, php-format
|
193 |
+
msgid ""
|
194 |
+
"Discover @imagify, the new compression tool to optimize your images for free. "
|
195 |
+
"I saved %1$s out of %2$s!"
|
196 |
+
msgstr ""
|
197 |
+
"Découvrez @imagify, le nouvel outil de compression pour optimiser vos images. "
|
198 |
+
"J’ai optimisé %1$s sur %2$s !"
|
199 |
+
|
200 |
+
#: inc/admin/enqueue.php:198 inc/admin/enqueue.php:201
|
201 |
+
#: inc/admin/ui/notices.php:253
|
202 |
+
#, php-format
|
203 |
+
msgid ""
|
204 |
+
"To continue to optimize your images, log in to your Imagify account to %sbuy a "
|
205 |
+
"pack or subscribe to a plan%s."
|
206 |
+
msgstr ""
|
207 |
+
"Pour continuer à optimiser vos images, connectez-vous à votre compte Imagify "
|
208 |
+
"pour %sacheter un pack ou souscrire à un plan%s."
|
209 |
+
|
210 |
+
#: inc/admin/enqueue.php:201
|
211 |
+
msgid "F j, Y"
|
212 |
+
msgstr ""
|
213 |
+
|
214 |
+
#: inc/admin/menu.php:24 inc/admin/plugins.php:13 inc/admin/ui/bulk.php:78
|
215 |
+
#: inc/common/admin-bar.php:39
|
216 |
+
msgid "Bulk Optimization"
|
217 |
+
msgstr "Optimisation en masse"
|
218 |
+
|
219 |
+
#. Plugin Name of the plugin/theme
|
220 |
+
#: inc/admin/meta-boxes.php:18 inc/admin/meta-boxes.php:25
|
221 |
+
#: inc/admin/upload.php:11
|
222 |
+
msgid "Imagify"
|
223 |
+
msgstr "Imagify"
|
224 |
+
|
225 |
+
#: inc/admin/meta-boxes.php:20 inc/functions/admin-ui.php:168
|
226 |
+
msgid "Invalid API key"
|
227 |
+
msgstr "Clé API invalide"
|
228 |
+
|
229 |
+
#: inc/admin/meta-boxes.php:22 inc/functions/admin-ui.php:170
|
230 |
+
msgid "Check your Settings"
|
231 |
+
msgstr "Vérifiez vos réglages"
|
232 |
+
|
233 |
+
#: inc/admin/options.php:107
|
234 |
+
msgid "Cheatin’ uh?"
|
235 |
+
msgstr "Cheatin’ uh?"
|
236 |
+
|
237 |
+
#: inc/admin/options.php:115
|
238 |
+
msgid "<strong>ERROR</strong>: options page not found."
|
239 |
+
msgstr "<strong>Erreur</strong> : page d’options introuvable."
|
240 |
+
|
241 |
+
#: inc/admin/plugins.php:14 inc/admin/ui/options.php:70
|
242 |
+
#: inc/common/admin-bar.php:30
|
243 |
+
msgid "Settings"
|
244 |
+
msgstr "Réglages"
|
245 |
+
|
246 |
+
#: inc/admin/ui/bulk.php:59
|
247 |
+
msgid "Upgrade your account to continue optimizing your images"
|
248 |
+
msgstr "Mettez à niveau votre compte pour continuer à optimiser vos images"
|
249 |
+
|
250 |
+
#: inc/admin/ui/bulk.php:63
|
251 |
+
msgid "More info"
|
252 |
+
msgstr "Plus d’infos"
|
253 |
+
|
254 |
+
#: inc/admin/ui/bulk.php:88
|
255 |
+
msgid "Information"
|
256 |
+
msgstr "Informations"
|
257 |
+
|
258 |
+
#: inc/admin/ui/bulk.php:90
|
259 |
+
msgid ""
|
260 |
+
"Please be aware that optimizing a large number of images can take a while "
|
261 |
+
"depending on your server and network speed."
|
262 |
+
msgstr ""
|
263 |
+
"Prenez conscience que l’optimisation d’un grand nombre d’images peut prendre "
|
264 |
+
"du temps en fonction de la rapidité de votre serveur et de votre connexion."
|
265 |
+
|
266 |
+
#: inc/admin/ui/bulk.php:91
|
267 |
+
msgid ""
|
268 |
+
"You must keep this page open while the bulk optimizaton is processing. If you "
|
269 |
+
"leave you can come back to continue where it left off."
|
270 |
+
msgstr ""
|
271 |
+
"Vous devez garder cette page ouverte pendant que l’optimisation en masse est "
|
272 |
+
"en cours. Si vous la quittez, vous pouvez revenir pour continuer là où vous en "
|
273 |
+
"étiez."
|
274 |
+
|
275 |
+
#: inc/admin/ui/bulk.php:99
|
276 |
+
msgid "Select Your Compression Level"
|
277 |
+
msgstr "Sélectionnez votre niveau de compression"
|
278 |
+
|
279 |
+
#: inc/admin/ui/bulk.php:102 inc/admin/ui/bulk.php:130
|
280 |
+
#: inc/admin/ui/options.php:129 inc/admin/ui/options.php:319
|
281 |
+
#: inc/admin/ui/options.php:382 inc/admin/ui/options.php:399
|
282 |
+
#: inc/admin/ui/options.php:459 inc/classes/class-attachment.php:120
|
283 |
+
#: inc/functions/admin-ui.php:127
|
284 |
+
msgid "Ultra"
|
285 |
+
msgstr "Ultra"
|
286 |
+
|
287 |
+
#: inc/admin/ui/bulk.php:105 inc/admin/ui/bulk.php:125
|
288 |
+
#: inc/admin/ui/options.php:124 inc/admin/ui/options.php:331
|
289 |
+
#: inc/admin/ui/options.php:381 inc/admin/ui/options.php:394
|
290 |
+
#: inc/admin/ui/options.php:438 inc/classes/class-attachment.php:123
|
291 |
+
#: inc/functions/admin-ui.php:133
|
292 |
+
msgid "Aggressive"
|
293 |
+
msgstr "Agressif"
|
294 |
+
|
295 |
+
#: inc/admin/ui/bulk.php:108 inc/admin/ui/bulk.php:120
|
296 |
+
#: inc/admin/ui/options.php:119 inc/admin/ui/options.php:343
|
297 |
+
#: inc/admin/ui/options.php:380 inc/admin/ui/options.php:389
|
298 |
+
#: inc/admin/ui/options.php:418 inc/classes/class-attachment.php:126
|
299 |
+
#: inc/functions/admin-ui.php:139
|
300 |
+
msgid "Normal"
|
301 |
+
msgstr "Normal"
|
302 |
+
|
303 |
+
#: inc/admin/ui/bulk.php:112
|
304 |
+
msgid "Your default setting:"
|
305 |
+
msgstr "Votre réglage par défaut :"
|
306 |
+
|
307 |
+
#: inc/admin/ui/bulk.php:139
|
308 |
+
#, php-format
|
309 |
+
msgid "Don't forget to check %syour settings%s before bulk optimization."
|
310 |
+
msgstr ""
|
311 |
+
"N’oubliez pas de vérifier %svos réglages%s avant l’optimisation en masse."
|
312 |
+
|
313 |
+
#: inc/admin/ui/bulk.php:149
|
314 |
+
msgid "Imagif'em all"
|
315 |
+
msgstr "Imagif'em all"
|
316 |
+
|
317 |
+
#: inc/admin/ui/bulk.php:156
|
318 |
+
#, php-format
|
319 |
+
msgid "All images which are over to %s could be optimized using the pro version."
|
320 |
+
msgstr ""
|
321 |
+
"Toutes les images qui font plus de %s pourront être optimisées avec la version "
|
322 |
+
"pro."
|
323 |
+
|
324 |
+
#: inc/admin/ui/bulk.php:167
|
325 |
+
msgid "Overview"
|
326 |
+
msgstr "Vue d'ensemble"
|
327 |
+
|
328 |
+
#: inc/admin/ui/bulk.php:177
|
329 |
+
msgid "Statistics"
|
330 |
+
msgstr "Statistiques"
|
331 |
+
|
332 |
+
#: inc/admin/ui/bulk.php:189
|
333 |
+
msgid "that's the number of images you optimized with Imagify"
|
334 |
+
msgstr "c’est le nombre d’images que %svous avez optimisé avec Imagify"
|
335 |
+
|
336 |
+
#: inc/admin/ui/bulk.php:194
|
337 |
+
msgid "Original size"
|
338 |
+
msgstr "Poids de l’original"
|
339 |
+
|
340 |
+
#: inc/admin/ui/bulk.php:199
|
341 |
+
msgid "Optimized size"
|
342 |
+
msgstr "Poids optimisé"
|
343 |
+
|
344 |
+
#: inc/admin/ui/bulk.php:210
|
345 |
+
#, php-format
|
346 |
+
msgid "that's the size you saved %sby using Imagify"
|
347 |
+
msgstr "c’est le poids que vous avez économisé en utilisant Imagify"
|
348 |
+
|
349 |
+
#: inc/admin/ui/bulk.php:230
|
350 |
+
msgid "Well done!"
|
351 |
+
msgstr "Bien joué !"
|
352 |
+
|
353 |
+
#: inc/admin/ui/bulk.php:231
|
354 |
+
#, php-format
|
355 |
+
msgid "you saved %1$s out of %2$s"
|
356 |
+
msgstr "vous avez économisé %1$s sur %2$s"
|
357 |
+
|
358 |
+
#: inc/admin/ui/bulk.php:236
|
359 |
+
msgid "Share your awesome result"
|
360 |
+
msgstr "Partagez votre résultat"
|
361 |
+
|
362 |
+
#: inc/admin/ui/bulk.php:251
|
363 |
+
msgid "Compression process results"
|
364 |
+
msgstr "Résultats du processus de compression"
|
365 |
+
|
366 |
+
#: inc/admin/ui/bulk.php:254
|
367 |
+
msgid "Filename"
|
368 |
+
msgstr "Nom du fichier"
|
369 |
+
|
370 |
+
#: inc/admin/ui/bulk.php:255
|
371 |
+
msgid "Status"
|
372 |
+
msgstr "Statut"
|
373 |
+
|
374 |
+
#: inc/admin/ui/bulk.php:256 inc/admin/ui/options.php:379
|
375 |
+
#: inc/admin/ui/options.php:384 inc/admin/ui/options.php:408
|
376 |
+
msgid "Original"
|
377 |
+
msgstr "Original"
|
378 |
+
|
379 |
+
#: inc/admin/ui/bulk.php:258
|
380 |
+
msgid "Percentage"
|
381 |
+
msgstr "Pourcentage"
|
382 |
+
|
383 |
+
#: inc/admin/ui/bulk.php:259
|
384 |
+
msgid "Thumbnails optimized"
|
385 |
+
msgstr "Miniatures optimisées"
|
386 |
+
|
387 |
+
#: inc/admin/ui/bulk.php:260
|
388 |
+
msgid "Overall saving"
|
389 |
+
msgstr "Gain total"
|
390 |
+
|
391 |
+
#: inc/admin/ui/bulk.php:265
|
392 |
+
msgid "file"
|
393 |
+
msgstr "fichier"
|
394 |
+
|
395 |
+
#: inc/admin/ui/bulk.php:266
|
396 |
+
msgid "error"
|
397 |
+
msgstr "erreur"
|
398 |
+
|
399 |
+
#: inc/admin/ui/bulk.php:267
|
400 |
+
msgid "Total:"
|
401 |
+
msgstr "Total :"
|
402 |
+
|
403 |
+
#: inc/admin/ui/bulk.php:268
|
404 |
+
msgid "Gain:"
|
405 |
+
msgstr "Gain :"
|
406 |
+
|
407 |
+
#: inc/admin/ui/bulk.php:285
|
408 |
+
#, php-format
|
409 |
+
msgid "%sStart the bulk optimization%s"
|
410 |
+
msgstr "%sDémarrer l’optimisation en masse%s"
|
411 |
+
|
412 |
+
#: inc/admin/ui/notices.php:23
|
413 |
+
msgid "Welcome to Imagify, the best way to easily optimize your images!"
|
414 |
+
msgstr ""
|
415 |
+
"Bienvenue sur Imagify, la meilleure façon d'optimiser facilement vos "
|
416 |
+
"images !"
|
417 |
+
|
418 |
+
#: inc/admin/ui/notices.php:25 inc/admin/ui/notices.php:90
|
419 |
+
#: inc/admin/ui/notices.php:181 inc/admin/ui/notices.php:217
|
420 |
+
#: inc/admin/ui/notices.php:256
|
421 |
+
msgid "Dismiss this notice"
|
422 |
+
msgstr "Fermer ce message"
|
423 |
+
|
424 |
+
#: inc/admin/ui/notices.php:32
|
425 |
+
msgid "Create an Account"
|
426 |
+
msgstr "Créer un compte"
|
427 |
+
|
428 |
+
#: inc/admin/ui/notices.php:33
|
429 |
+
msgid ""
|
430 |
+
"Don't have an Imagify account yet? Optimize your images by creating an account "
|
431 |
+
"in a few seconds!"
|
432 |
+
msgstr ""
|
433 |
+
"Vous n’avez pas encore de compte Imagify ? Optimiser vos images en créant "
|
434 |
+
"un compte en quelques secondes !"
|
435 |
+
|
436 |
+
#: inc/admin/ui/notices.php:36
|
437 |
+
msgid "Sign up, It's FREE!"
|
438 |
+
msgstr "Incrivez-vous, c’est GRATUIT !"
|
439 |
+
|
440 |
+
#: inc/admin/ui/notices.php:42
|
441 |
+
msgid "Enter your API Key"
|
442 |
+
msgstr "Entrer la clé API"
|
443 |
+
|
444 |
+
#: inc/admin/ui/notices.php:43
|
445 |
+
#, php-format
|
446 |
+
msgid ""
|
447 |
+
"Save your API Key you have received by email or you can get it on your "
|
448 |
+
"%sImagify account page%s."
|
449 |
+
msgstr ""
|
450 |
+
"Enregistrez la clé API que vous avez reçu par email ou que vous pouvez "
|
451 |
+
"récupérer sur votre %spage de compte Imagify%s."
|
452 |
+
|
453 |
+
#: inc/admin/ui/notices.php:46
|
454 |
+
msgid "I have my API key"
|
455 |
+
msgstr "J’ai récupéré ma clé API"
|
456 |
+
|
457 |
+
#: inc/admin/ui/notices.php:52
|
458 |
+
msgid "Configure it"
|
459 |
+
msgstr "Configurer le"
|
460 |
+
|
461 |
+
#: inc/admin/ui/notices.php:53
|
462 |
+
msgid "It’s almost done! You have just to configure your optimization settings."
|
463 |
+
msgstr ""
|
464 |
+
"C’est bientôt terminé ! Vous avez juste à configurer vos paramètres "
|
465 |
+
"d'optimisation."
|
466 |
+
|
467 |
+
#: inc/admin/ui/notices.php:54
|
468 |
+
msgid "Go to Settings"
|
469 |
+
msgstr "Aller aux réglages"
|
470 |
+
|
471 |
+
#: inc/admin/ui/notices.php:85 inc/admin/ui/options.php:91
|
472 |
+
msgid "Your API key isn't valid!"
|
473 |
+
msgstr "Votre clé API n’est pas valide !"
|
474 |
+
|
475 |
+
#: inc/admin/ui/notices.php:88
|
476 |
+
#, php-format
|
477 |
+
msgid ""
|
478 |
+
"Go to your Imagify account page to get your API Key and specify it on %1$syour "
|
479 |
+
"settings%3$s or %2$screate an account for free%3$s if you don't have one yet."
|
480 |
+
msgstr ""
|
481 |
+
"Allez sur votre page de compte Imagify pour récupérer votre clé API et la "
|
482 |
+
"renseigner dans %1$svos réglages%3$s ou %2$scréez un compte gratuitement%3$s "
|
483 |
+
"si vous n’en avez pas encore un."
|
484 |
+
|
485 |
+
#: inc/admin/ui/notices.php:138
|
486 |
+
msgid ""
|
487 |
+
"The following plugins are not compatible with this plugin and may cause "
|
488 |
+
"unexpected results:"
|
489 |
+
msgstr ""
|
490 |
+
"Les extensions suivantes ne sont pas compatibles avec ce plugin et peuvent "
|
491 |
+
"générer des résultats inattendus :"
|
492 |
+
|
493 |
+
#: inc/admin/ui/notices.php:144
|
494 |
+
msgid "Deactivate"
|
495 |
+
msgstr "Désactiver"
|
496 |
+
|
497 |
+
#: inc/admin/ui/notices.php:173
|
498 |
+
msgid "The external HTTP requests are blocked!"
|
499 |
+
msgstr "Les requêtes HTTP externes sont bloquées !"
|
500 |
+
|
501 |
+
#: inc/admin/ui/notices.php:174
|
502 |
+
msgid ""
|
503 |
+
"You defined the <code>WP_HTTP_BLOCK_EXTERNAL</code> constant in the <code>wp-"
|
504 |
+
"config.php</code> to block all external HTTP requests."
|
505 |
+
msgstr ""
|
506 |
+
"Vous avez défini la constante <code>WP_HTTP_BLOCK_EXTERNAL</code> dans le "
|
507 |
+
"fichier <code>wp-config.php</code> pour bloquer toutes les requêtes HTTP "
|
508 |
+
"externes."
|
509 |
+
|
510 |
+
#: inc/admin/ui/notices.php:176
|
511 |
+
msgid ""
|
512 |
+
"To optimize your images, you have to put the following code in your <code>wp-"
|
513 |
+
"config.php</code> file so that it works correctly."
|
514 |
+
msgstr ""
|
515 |
+
"Pour optimiser vos images, vous devez insérer le code suivant dans le fichier "
|
516 |
+
"<code>wp-config.php</code> afin que cela fonctionne correctement."
|
517 |
+
|
518 |
+
#: inc/admin/ui/notices.php:177
|
519 |
+
msgid "Click on the field and press Ctrl-A to select all."
|
520 |
+
msgstr "Cliquez sur le champ et appuyez sur Ctrl-A pour tout sélectionner."
|
521 |
+
|
522 |
+
#: inc/admin/ui/notices.php:213
|
523 |
+
msgid "You're missing out!"
|
524 |
+
msgstr "Vous passez à côté de quelque chose !"
|
525 |
+
|
526 |
+
#: inc/admin/ui/notices.php:214
|
527 |
+
msgid "Use the List view to optimize images with Imagify."
|
528 |
+
msgstr "Utilisez la vue liste pour optimiser vos images avec Imagify."
|
529 |
+
|
530 |
+
#: inc/admin/ui/notices.php:215
|
531 |
+
msgid "Switch to the List View"
|
532 |
+
msgstr "Basculer en vue liste"
|
533 |
+
|
534 |
+
#: inc/admin/ui/options.php:18
|
535 |
+
msgid "Is your website too slow?"
|
536 |
+
msgstr "Votre site est trop lent ?"
|
537 |
+
|
538 |
+
#: inc/admin/ui/options.php:24
|
539 |
+
msgid "Discover the best caching plugin to speed up your website."
|
540 |
+
msgstr "Découvrez le meilleur plugin de cache pour accélérer votre site."
|
541 |
+
|
542 |
+
#: inc/admin/ui/options.php:32
|
543 |
+
#, php-format
|
544 |
+
msgid "%sGet %s off%s with this coupon code:%s"
|
545 |
+
msgstr "Obtenez %s%s%s de réduction avec le code promo :%s"
|
546 |
+
|
547 |
+
#: inc/admin/ui/options.php:37
|
548 |
+
msgid "Get WP Rocket now"
|
549 |
+
msgstr "Je veux WP Rocket !"
|
550 |
+
|
551 |
+
#: inc/admin/ui/options.php:55
|
552 |
+
#, php-format
|
553 |
+
msgid ""
|
554 |
+
"%sDo you like this plugin?%s Please take a few seconds to %srate it on "
|
555 |
+
"WordPress.org%s!"
|
556 |
+
msgstr ""
|
557 |
+
"%sVous aimez ce plugin ?%s Prenez quelques secondes pour le %snoter sur "
|
558 |
+
"WordPress.org%s !"
|
559 |
+
|
560 |
+
#: inc/admin/ui/options.php:78
|
561 |
+
msgid "API Key"
|
562 |
+
msgstr "Clé API"
|
563 |
+
|
564 |
+
#: inc/admin/ui/options.php:98
|
565 |
+
#, php-format
|
566 |
+
msgid "Don't have an API Key yet? %sCreate one, it's FREE%s."
|
567 |
+
msgstr "Vous n’avez pas encore de clé API ? %sCréez en une, c’est GRATUIT%s."
|
568 |
+
|
569 |
+
#: inc/admin/ui/options.php:114
|
570 |
+
msgid "Optimization Level"
|
571 |
+
msgstr "Niveau d’optimisation"
|
572 |
+
|
573 |
+
#: inc/admin/ui/options.php:134
|
574 |
+
msgid "More info?"
|
575 |
+
msgstr "Plus d’infos ?"
|
576 |
+
|
577 |
+
#: inc/admin/ui/options.php:141
|
578 |
+
#, php-format
|
579 |
+
msgid "Need help to choose? %sTry the Visual Comparison%s"
|
580 |
+
msgstr "Besoin d’aide pour choisir? %sEssayer le comparateur visuel%s"
|
581 |
+
|
582 |
+
#: inc/admin/ui/options.php:150 inc/admin/ui/options.php:154
|
583 |
+
msgid "Auto-Optimize images on upload"
|
584 |
+
msgstr "Optimiser automatiquement les images envoyées"
|
585 |
+
|
586 |
+
#: inc/admin/ui/options.php:158
|
587 |
+
msgid "Automatically optimize every image you upload to WordPress."
|
588 |
+
msgstr "Optimiser automatiquement chaque image que vous enverrez à WordPress."
|
589 |
+
|
590 |
+
#: inc/admin/ui/options.php:163 inc/admin/ui/options.php:166
|
591 |
+
msgid "Backup original images"
|
592 |
+
msgstr "Conserver une copie des images d'origine"
|
593 |
+
|
594 |
+
#: inc/admin/ui/options.php:170
|
595 |
+
msgid ""
|
596 |
+
"Keep your original images in a separate folder before optimization process."
|
597 |
+
msgstr ""
|
598 |
+
"Garder vos images d’origine dans un dossier séparé avant le processus "
|
599 |
+
"d’optimisation."
|
600 |
+
|
601 |
+
#: inc/admin/ui/options.php:175 inc/admin/ui/options.php:178
|
602 |
+
msgid "Resize larger images"
|
603 |
+
msgstr "Redimensionner les images trop grandes"
|
604 |
+
|
605 |
+
#: inc/admin/ui/options.php:184
|
606 |
+
#, php-format
|
607 |
+
msgid "to maximum %s pixels width"
|
608 |
+
msgstr "au maximum %s pixels de large"
|
609 |
+
|
610 |
+
#: inc/admin/ui/options.php:195
|
611 |
+
#, php-format
|
612 |
+
msgid ""
|
613 |
+
"This option is recommended to reduce larger images. You can save up to 80%% "
|
614 |
+
"after resizing. The new width should not be less than your largest thumbnail "
|
615 |
+
"width, which is actually %spx."
|
616 |
+
msgstr ""
|
617 |
+
"Cette option est recommendée pour réduire les images trop grandes. Vous pouvez "
|
618 |
+
"économiser jusqu'à 80%% du poids après le redimensionnement. La nouvelle "
|
619 |
+
"largeur ne doit pas être inférieure à la plus grande largeur de vos miniatures "
|
620 |
+
"qui est actuellement de %spx."
|
621 |
+
|
622 |
+
#: inc/admin/ui/options.php:202 inc/admin/ui/options.php:205
|
623 |
+
msgid "EXIF Data"
|
624 |
+
msgstr "Données EXIF"
|
625 |
+
|
626 |
+
#: inc/admin/ui/options.php:209
|
627 |
+
msgid ""
|
628 |
+
"Keep all EXIF data from your images. EXIF are informations stored in your "
|
629 |
+
"pictures like shutter speed, exposure compensation, ISO, etc..."
|
630 |
+
msgstr ""
|
631 |
+
"Garder toutes les données EXIF de vos images. Les EXIF sont des informations "
|
632 |
+
"stockées dans vos photos comme l’ouverture de l’objectif, l’exposition, ISO, "
|
633 |
+
"etc …"
|
634 |
+
|
635 |
+
#: inc/admin/ui/options.php:210
|
636 |
+
msgid "Learn more"
|
637 |
+
msgstr "En savoir plus"
|
638 |
+
|
639 |
+
#: inc/admin/ui/options.php:212
|
640 |
+
msgid ""
|
641 |
+
"If you are a photographer, you may be interested in this option if you are "
|
642 |
+
"displaying on your pages some info like the model of your camera."
|
643 |
+
msgstr ""
|
644 |
+
"Si vous êtes un photographe, vous pourriez être intéressé par cette option si "
|
645 |
+
"vous affichez quelques infos comme votre le modèle de votre appareil photo sur "
|
646 |
+
"vos pages."
|
647 |
+
|
648 |
+
#: inc/admin/ui/options.php:221
|
649 |
+
msgid "Files optimization"
|
650 |
+
msgstr "Tailles à optimiser"
|
651 |
+
|
652 |
+
#: inc/admin/ui/options.php:224
|
653 |
+
msgid ""
|
654 |
+
"You can choose to compress different image sizes created by WordPress here."
|
655 |
+
msgstr ""
|
656 |
+
"Vous pouvez choisir d’optimiser les différents formats générés par WordPress "
|
657 |
+
"ici."
|
658 |
+
|
659 |
+
#: inc/admin/ui/options.php:226
|
660 |
+
#, php-format
|
661 |
+
msgid "The %soriginal size%s is %sautomatically optimized%s by Imagify."
|
662 |
+
msgstr "La %staille d’origine%s est %sautomatiquement optimisée%s par Imagify."
|
663 |
+
|
664 |
+
#: inc/admin/ui/options.php:229
|
665 |
+
msgid ""
|
666 |
+
"Remember each additional image size will affect your Imagify monthly usage!"
|
667 |
+
msgstr ""
|
668 |
+
"Pour rappel, chaque format d’image additionnel affectera votre quota d’usage "
|
669 |
+
"mensuel d’Imagify."
|
670 |
+
|
671 |
+
#: inc/admin/ui/options.php:282
|
672 |
+
msgid "Display options"
|
673 |
+
msgstr "Options d’affichage"
|
674 |
+
|
675 |
+
#: inc/admin/ui/options.php:287 inc/admin/ui/options.php:292
|
676 |
+
msgid "Show Admin Bar menu"
|
677 |
+
msgstr "Afficher le menu dans la barre d'administration"
|
678 |
+
|
679 |
+
#: inc/admin/ui/options.php:293
|
680 |
+
msgid "I want this awesome quick access menu on my admin bar."
|
681 |
+
msgstr "Je veux ce menu d'accès rapide génial sur ma barre d'administration."
|
682 |
+
|
683 |
+
#: inc/admin/ui/options.php:308
|
684 |
+
#, php-format
|
685 |
+
msgid ""
|
686 |
+
"Once your settings saved, optimize all your images by using the %sImagify Bulk "
|
687 |
+
"Optimization%s feature."
|
688 |
+
msgstr ""
|
689 |
+
"Une fois vos paramètres enregistrés, optimisez toutes vos images en utilisant "
|
690 |
+
"la fonctionnalité d’%soptimisation en masse%s d’Imagify."
|
691 |
+
|
692 |
+
#: inc/admin/ui/options.php:316
|
693 |
+
msgid "You can choose three levels of compression"
|
694 |
+
msgstr "Vous pouvez choisir entre trois niveaux de compression"
|
695 |
+
|
696 |
+
#: inc/admin/ui/options.php:321
|
697 |
+
msgid ""
|
698 |
+
"This mode will apply all available optimizations for maximum image compression."
|
699 |
+
msgstr ""
|
700 |
+
"Ce niveau appliquera toutes les optimisations disponibles pour une compression "
|
701 |
+
"des images maximale."
|
702 |
+
|
703 |
+
#: inc/admin/ui/options.php:324
|
704 |
+
msgid ""
|
705 |
+
"This will provide a huge savings on the initial weight. Sometimes the image "
|
706 |
+
"quality could be degraded a little."
|
707 |
+
msgstr ""
|
708 |
+
"Cela permettra de considérablement réduire le poids initial. Parfois, la "
|
709 |
+
"qualité de l’image pourra être légèrement dégradée."
|
710 |
+
|
711 |
+
#: inc/admin/ui/options.php:327
|
712 |
+
msgid ""
|
713 |
+
"If you want the maximum weight reduction, and you agree to lose some quality "
|
714 |
+
"on the images we recommend using this mode."
|
715 |
+
msgstr ""
|
716 |
+
"Si vous souhaitez une réduction du poids optimale et que vous tolérez une "
|
717 |
+
"baisse de qualité sur vos images, nous vous recommandons ce niveau."
|
718 |
+
|
719 |
+
#: inc/admin/ui/options.php:333
|
720 |
+
msgid ""
|
721 |
+
"This mode provides perfect optimization of your images without any significant "
|
722 |
+
"quality loss."
|
723 |
+
msgstr ""
|
724 |
+
"Ce niveau permet une optimisation idéale de vos images sans perte de qualité "
|
725 |
+
"notable."
|
726 |
+
|
727 |
+
#: inc/admin/ui/options.php:336
|
728 |
+
msgid ""
|
729 |
+
"This will provide a drastic savings on the initial weight, with a small "
|
730 |
+
"reduction in image quality. Most of the time it's not even noticeable."
|
731 |
+
msgstr ""
|
732 |
+
"Cela permettra une réduction importante du poids initial avec une légère perte "
|
733 |
+
"de la qualité d'image qui n’est pas perceptible à l’oeil humain."
|
734 |
+
|
735 |
+
#: inc/admin/ui/options.php:339
|
736 |
+
msgid "If you want the maximum weight reduction, we recommend using this mode."
|
737 |
+
msgstr ""
|
738 |
+
"Si vous souhaitez une réduction du poids plus performante, nous vous "
|
739 |
+
"recommandons ce niveau."
|
740 |
+
|
741 |
+
#: inc/admin/ui/options.php:345
|
742 |
+
msgid ""
|
743 |
+
"This mode provides lossless optimization, your images will be optimized "
|
744 |
+
"without any visible change."
|
745 |
+
msgstr ""
|
746 |
+
"Ce niveau permet d'optimiser sans perte, vos images seront optimisées sans "
|
747 |
+
"aucun changement visible."
|
748 |
+
|
749 |
+
#: inc/admin/ui/options.php:348
|
750 |
+
msgid ""
|
751 |
+
"If you want the perfect quality for your images, we recommend you that mode."
|
752 |
+
msgstr ""
|
753 |
+
"Si vous souhaitez des images d’une qualité parfaite, nous vous recommandons ce "
|
754 |
+
"niveau."
|
755 |
+
|
756 |
+
#: inc/admin/ui/options.php:351
|
757 |
+
msgid "Note: the file size reduction will be less, compared to aggressive mode."
|
758 |
+
msgstr ""
|
759 |
+
"Remarque: la réduction du poids des images sera moins importante par rapport "
|
760 |
+
"au mode agressif."
|
761 |
+
|
762 |
+
#: inc/admin/ui/options.php:358 inc/admin/ui/options.php:480
|
763 |
+
msgid "Close"
|
764 |
+
msgstr "Fermer"
|
765 |
+
|
766 |
+
#: inc/admin/ui/options.php:370
|
767 |
+
#, php-format
|
768 |
+
msgid "I want to compare%s and%s"
|
769 |
+
msgstr "Je veux comparer%s et%s"
|
770 |
+
|
771 |
+
#: inc/admin/ui/options.php:387
|
772 |
+
#, php-format
|
773 |
+
msgid "Original photography about %s"
|
774 |
+
msgstr ""
|
775 |
+
|
776 |
+
#: inc/admin/ui/options.php:392 inc/admin/ui/options.php:397
|
777 |
+
#: inc/admin/ui/options.php:402
|
778 |
+
#, php-format
|
779 |
+
msgid "Optimized photography about %s"
|
780 |
+
msgstr ""
|
781 |
+
|
782 |
+
#: inc/admin/ui/options.php:407 inc/admin/ui/options.php:417
|
783 |
+
#: inc/admin/ui/options.php:437 inc/admin/ui/options.php:458
|
784 |
+
#: inc/functions/admin-ui.php:58
|
785 |
+
msgid "Level:"
|
786 |
+
msgstr "Niveau :"
|
787 |
+
|
788 |
+
#: inc/admin/ui/options.php:411 inc/admin/ui/options.php:421
|
789 |
+
#: inc/admin/ui/options.php:441 inc/admin/ui/options.php:462
|
790 |
+
msgid "File Size:"
|
791 |
+
msgstr "Poids du fichier:"
|
792 |
+
|
793 |
+
#: inc/admin/ui/options.php:425 inc/admin/ui/options.php:445
|
794 |
+
#: inc/admin/ui/options.php:466 inc/functions/admin-ui.php:44
|
795 |
+
msgid "Original Saving:"
|
796 |
+
msgstr "Gain sur l’original :"
|
797 |
+
|
798 |
+
#: inc/admin/upload.php:40
|
799 |
+
msgid "Errors"
|
800 |
+
msgstr "Erreurs"
|
801 |
+
|
802 |
+
#: inc/admin/upload.php:43
|
803 |
+
msgid "Filter by status"
|
804 |
+
msgstr "Filtrer par statut"
|
805 |
+
|
806 |
+
#: inc/admin/upload.php:46
|
807 |
+
msgid "All images"
|
808 |
+
msgstr "Toutes les images"
|
809 |
+
|
810 |
+
#: inc/classes/class-attachment.php:501
|
811 |
+
msgid ""
|
812 |
+
"This size isn't authorized to be optimized. Update your Imagify settings if "
|
813 |
+
"you want to optimize it."
|
814 |
+
msgstr ""
|
815 |
+
"Cette taille n’est pas autorisée à être optimisée. Mettez à jour les réglages "
|
816 |
+
"d’Imagify si vous souhaitez l’optimiser."
|
817 |
+
|
818 |
+
#: inc/common/admin-bar.php:48
|
819 |
+
#, php-format
|
820 |
+
msgid "Rate Imagify on %s"
|
821 |
+
msgstr "Notez Imagify sur %s"
|
822 |
+
|
823 |
+
#: inc/common/admin-bar.php:57
|
824 |
+
msgid "Loading..."
|
825 |
+
msgstr "Chargement…"
|
826 |
+
|
827 |
+
#: inc/functions/admin-ui.php:35
|
828 |
+
msgid "New Filesize:"
|
829 |
+
msgstr "Nouveau poids :"
|
830 |
+
|
831 |
+
#: inc/functions/admin-ui.php:51
|
832 |
+
msgid "Close details"
|
833 |
+
msgstr "Fermer les détails"
|
834 |
+
|
835 |
+
#: inc/functions/admin-ui.php:51
|
836 |
+
msgid "View details"
|
837 |
+
msgstr "Voir les détails"
|
838 |
+
|
839 |
+
#: inc/functions/admin-ui.php:55
|
840 |
+
msgid "Original Filesize:"
|
841 |
+
msgstr "Poids de l’original :"
|
842 |
+
|
843 |
+
#: inc/functions/admin-ui.php:61
|
844 |
+
msgid "Thumbnails Optimized:"
|
845 |
+
msgstr "Miniatures optimisées :"
|
846 |
+
|
847 |
+
#: inc/functions/admin-ui.php:62
|
848 |
+
msgid "Overall Saving:"
|
849 |
+
msgstr "Gain total :"
|
850 |
+
|
851 |
+
#: inc/functions/admin-ui.php:75
|
852 |
+
msgid "Restoring..."
|
853 |
+
msgstr "En restauration…"
|
854 |
+
|
855 |
+
#: inc/functions/admin-ui.php:99
|
856 |
+
msgid "Try again"
|
857 |
+
msgstr "Réessayer"
|
858 |
+
|
859 |
+
#: inc/functions/admin-ui.php:127 inc/functions/admin-ui.php:133
|
860 |
+
#: inc/functions/admin-ui.php:139
|
861 |
+
#, php-format
|
862 |
+
msgid "Re-Optimize to %s"
|
863 |
+
msgstr "Réoptimiser en %s"
|
864 |
+
|
865 |
+
#: inc/functions/admin-ui.php:162
|
866 |
+
#, php-format
|
867 |
+
msgid "%s can't be optimized"
|
868 |
+
msgstr "%s ne peut pas être optimisé"
|
869 |
+
|
870 |
+
#: inc/functions/process.php:30
|
871 |
+
msgid ""
|
872 |
+
"Sorry, our servers are temporarily unaccessible. Please, try again in a couple "
|
873 |
+
"of minutes."
|
874 |
+
msgstr ""
|
875 |
+
"Désolé, nos serveurs sont temporairement inaccessibles. Nous vous recommandons "
|
876 |
+
"de ré-essayer dans quelques minutes."
|
877 |
+
|
878 |
+
#: inc/functions/process.php:36
|
879 |
+
msgid "External HTTP requests are blocked"
|
880 |
+
msgstr "Les requêtes HTTP externes sont bloquées"
|
881 |
+
|
882 |
+
#: inc/functions/process.php:42
|
883 |
+
msgid "File path is empty"
|
884 |
+
msgstr "Le chemin du fichier est vide"
|
885 |
+
|
886 |
+
#: inc/functions/process.php:48
|
887 |
+
#, php-format
|
888 |
+
msgid "Could not find %s"
|
889 |
+
msgstr "Impossible de trouver %s"
|
890 |
+
|
891 |
+
#: inc/functions/process.php:53
|
892 |
+
#, php-format
|
893 |
+
msgid "%s is not writable"
|
894 |
+
msgstr "%s n’est pas accessible en écriture"
|
895 |
+
|
896 |
+
#: inc/functions/process.php:62
|
897 |
+
#, php-format
|
898 |
+
msgid "Skipped (%s), image not found."
|
899 |
+
msgstr "Ignoré (%s), image introuvable."
|
900 |
+
|
901 |
+
#. Plugin URI of the plugin/theme
|
902 |
+
msgid "https://wordpress.org/plugins/imagify/"
|
903 |
+
msgstr "https://fr.wordpress.org/plugins/imagify/"
|
904 |
+
|
905 |
+
#. Description of the plugin/theme
|
906 |
+
msgid ""
|
907 |
+
"Dramaticaly reduce image file sizes without loosing quality, make your website "
|
908 |
+
"load faster, boost your SEO and save money on your bandwith using Imagify, the "
|
909 |
+
"new most advanced image optimization tool."
|
910 |
+
msgstr ""
|
911 |
+
"Réduisez drastiquement le poids de vos images sans perte de qualité, accélérez "
|
912 |
+
"la rapidité de votre site, boostez votre SEO and économisez de l’argent sur "
|
913 |
+
"votre bande passante en utilisant Imagify, le nouvel outil le plus avancé "
|
914 |
+
"d’optimisation des images."
|
915 |
+
|
916 |
+
#. Author of the plugin/theme
|
917 |
+
msgid "WP Media"
|
918 |
+
msgstr ""
|
919 |
+
|
920 |
+
#. Author URI of the plugin/theme
|
921 |
+
msgid "http://wp-media.me"
|
922 |
+
msgstr ""
|
923 |
+
|
924 |
+
#~ msgid ""
|
925 |
+
#~ "Sorry, our servers are temporally unaccessible. Please, try again in a "
|
926 |
+
#~ "couple of minutes"
|
927 |
+
#~ msgstr ""
|
928 |
+
#~ "Désolé, nos serveurs sont temporairement inaccessibles. Nous vous "
|
929 |
+
#~ "recommandons de ré-essayer dans quelques minutes"
|
930 |
+
|
931 |
+
#~ msgid "Rate Imagify on WordPress.org"
|
932 |
+
#~ msgstr "Notez Imagify sur WordPress.org"
|
933 |
+
|
934 |
+
#~ msgid "Discover our other products"
|
935 |
+
#~ msgstr "Découvrez nos autres produits"
|
936 |
+
|
937 |
+
#~ msgid "Is your WordPress website too slow?"
|
938 |
+
#~ msgstr "Votre site WordPress est lent ?"
|
939 |
+
|
940 |
+
#~ msgid ""
|
941 |
+
#~ "If you are a photographer, you may be interested in by this option if you "
|
942 |
+
#~ "are displaying some infos like your the model of your camera on your pages."
|
943 |
+
#~ msgstr ""
|
944 |
+
#~ "Si vous êtes un photographe, vous pourriez être intéressé par cette option "
|
945 |
+
#~ "si vous affichez quelques infos comme votre le modèle de votre appareil "
|
946 |
+
#~ "photo sur vos pages."
|
947 |
+
|
948 |
+
#~ msgid "Checking in process..."
|
949 |
+
#~ msgstr "Vérification en cours…"
|
950 |
+
|
951 |
+
#~ msgid ""
|
952 |
+
#~ "%1$sCongratulations%2$s, you have optimized %1$s%3$d images%2$s and reduced "
|
953 |
+
#~ "by %1$s%4$s%2$s%% your images size."
|
954 |
+
#~ msgstr ""
|
955 |
+
#~ "%1$sFélicitations%2$s, vous avez optimisé %1$s%3$d images %2$s et réduit de "
|
956 |
+
#~ "%1$s%4$s%2$s%% le poids de vos images."
|
957 |
+
|
958 |
+
#~ msgid ""
|
959 |
+
#~ "Keep all EXIF data from your images. Exif are informations stored in your "
|
960 |
+
#~ "pictures like shutter speed, exposure compensation, ISO, etc..."
|
961 |
+
#~ msgstr ""
|
962 |
+
#~ "Gardez toutes les données EXIF de vos images. Exif sont des informations "
|
963 |
+
#~ "stockées dans vos photos comme la vitesse d’obturation, la compensation "
|
964 |
+
#~ "d’exposition, ISO, etc …"
|
965 |
+
|
966 |
+
#~ msgid ""
|
967 |
+
#~ "This will provide a huge savings on the initial weight. Sometimes the image "
|
968 |
+
#~ "quality could be degraded."
|
969 |
+
#~ msgstr ""
|
970 |
+
#~ "Cela permettra de considérablement réduire le poids initial. Parfois, la "
|
971 |
+
#~ "qualité de l’image pourra être légèrement dégradée."
|
972 |
+
|
973 |
+
#~ msgid ""
|
974 |
+
#~ "This mode will apply an ultra agressive compression algorithm to your "
|
975 |
+
#~ "images."
|
976 |
+
#~ msgstr ""
|
977 |
+
#~ "Ce niveau appliquera toutes les optimisations disponibles pour une "
|
978 |
+
#~ "compression des images maximale."
|
979 |
+
|
980 |
+
#~ msgid ""
|
981 |
+
#~ "This mode will apply all available optimizations for maximum image "
|
982 |
+
#~ "compression. "
|
983 |
+
#~ msgstr ""
|
984 |
+
#~ "Ce niveau appliquera toutes les optimisations disponibles pour une "
|
985 |
+
#~ "compression des images maximale."
|
986 |
+
|
987 |
+
#~ msgid "your default setting"
|
988 |
+
#~ msgstr "votre réglage par défaut"
|
989 |
+
|
990 |
+
#~ msgid "Medium"
|
991 |
+
#~ msgstr "Moyenne"
|
992 |
+
|
993 |
+
#~ msgid ""
|
994 |
+
#~ "This option is recommended to reduce larger images. You can save size can "
|
995 |
+
#~ "go up to 80%% after resizing. The new width should not be less than your "
|
996 |
+
#~ "largest thumbnail width, which is actually %spx."
|
997 |
+
#~ msgstr ""
|
998 |
+
#~ "Cette option est recommendée pour réduire les images trop grandes. Vous "
|
999 |
+
#~ "pouvez économiser jusqu'à 80%% du poids après le redimensionnement. La "
|
1000 |
+
#~ "nouvelle largeur ne doit pas être inférieure à la plus grande largeur de "
|
1001 |
+
#~ "vos miniatures qui est actuellement de %spx."
|
1002 |
+
|
1003 |
+
#~ msgid "Full Size"
|
1004 |
+
#~ msgstr "Taille originale"
|
1005 |
+
|
1006 |
+
#~ msgid "Thumbnail"
|
1007 |
+
#~ msgstr "Miniature"
|
1008 |
+
|
1009 |
+
#~ msgid "Large"
|
1010 |
+
#~ msgstr "Grande"
|
1011 |
+
|
1012 |
+
#~ msgid "You can choose two levels of compression"
|
1013 |
+
#~ msgstr "Vous pouvez choisir entre deux niveaux de compression"
|
1014 |
+
|
1015 |
+
#~ msgid "Free"
|
1016 |
+
#~ msgstr "Gratuit"
|
1017 |
+
|
1018 |
+
#~ msgid "Pro"
|
1019 |
+
#~ msgstr "Pro"
|
1020 |
+
|
1021 |
+
#~ msgid ""
|
1022 |
+
#~ "You have almost used all your credit. Don't forget to upgrade your "
|
1023 |
+
#~ "subscription to continue optimizing your images."
|
1024 |
+
#~ msgstr ""
|
1025 |
+
#~ "Vous avez bientôt utilisé tout votre crédit. N’oubliez pas de mettre à "
|
1026 |
+
#~ "niveau votre abonnement pour continuer à optimiser vos images."
|
1027 |
+
|
1028 |
+
#~ msgid ""
|
1029 |
+
#~ "You have almost used all your credit. Don't forget to upgrade your account "
|
1030 |
+
#~ "to continue optimizing your images."
|
1031 |
+
#~ msgstr ""
|
1032 |
+
#~ "Vous avez bientôt utilisé tout votre crédit. N’oubliez pas de mettre à "
|
1033 |
+
#~ "niveau votre abonnement pour continuer à optimiser vos images."
|
1034 |
+
|
1035 |
+
#~ msgid "Upgrade your account to continue to optimize your images"
|
1036 |
+
#~ msgstr "Mettez à niveau votre compte pour continuer à optimiser vos images"
|
1037 |
+
|
1038 |
+
#~ msgid ""
|
1039 |
+
#~ "All images which are over to %s will be skipped using the free version."
|
1040 |
+
#~ msgstr ""
|
1041 |
+
#~ "Toutes les images qui font plus de %s seront ignorées en utilisant la "
|
1042 |
+
#~ "version gratuite. "
|
1043 |
+
|
1044 |
+
#~ msgid "that's the number %sof images you optimized"
|
1045 |
+
#~ msgstr "c’est le nombre d’images %sque vous avez optimisé"
|
1046 |
+
|
1047 |
+
#~ msgid ""
|
1048 |
+
#~ "All images which are over to %s will be skipped using the free version of "
|
1049 |
+
#~ "the plugin."
|
1050 |
+
#~ msgstr ""
|
1051 |
+
#~ "Toutes les images qui font plus de %s seront ignorées en utilisant la "
|
1052 |
+
#~ "version gratuite du plugin. "
|
1053 |
+
|
1054 |
+
#~ msgid ""
|
1055 |
+
#~ "%s images are over %s and will be skipped using the free version of the "
|
1056 |
+
#~ "plugin"
|
1057 |
+
#~ msgstr ""
|
1058 |
+
#~ "%s images font plus de %s et seront ignorées en utilisant la version "
|
1059 |
+
#~ "gratuite du plugin"
|
1060 |
+
|
1061 |
+
#~ msgid ""
|
1062 |
+
#~ "You can log in to your Imagify account to %sbuy a pack or subscribe to a "
|
1063 |
+
#~ "plan%s."
|
1064 |
+
#~ msgstr ""
|
1065 |
+
#~ "Vous pouvez vous connecter à votre compte Imagify pour %sacheter un pack ou "
|
1066 |
+
#~ "souscrire à un plan%s."
|
1067 |
+
|
1068 |
+
#~ msgid ""
|
1069 |
+
#~ "You have consumed all your credits for this month. You will have <strong>%s "
|
1070 |
+
#~ "back on %s</strong>."
|
1071 |
+
#~ msgstr ""
|
1072 |
+
#~ "Vous avez consommé tous les crédits pour ce mois. Vous aurez à nouveau "
|
1073 |
+
#~ "<strong>%s le %s</strong>."
|
1074 |
+
|
1075 |
+
#~ msgid "We automatically optimize this size"
|
1076 |
+
#~ msgstr "Nous optimisons automatiquement cette taille"
|
1077 |
+
|
1078 |
+
#~ msgid ""
|
1079 |
+
#~ "This option is recommended to reduce larger images. You can save size can "
|
1080 |
+
#~ "go up to 80%% after resizing. The new width should not be less than your "
|
1081 |
+
#~ "largest thumbnail width, which is actually %s px."
|
1082 |
+
#~ msgstr ""
|
1083 |
+
#~ "Cette option est recommendée pour réduire les images trop grandes. Vous "
|
1084 |
+
#~ "pouvez économiser jusqu'à 80%% du poids après le redimensionnement. La "
|
1085 |
+
#~ "nouvelle largeur ne doit pas être inférieure à la plus grande largeur de "
|
1086 |
+
#~ "vos miniatures qui est actuellement de %s px."
|
1087 |
+
|
1088 |
+
#~ msgid ""
|
1089 |
+
#~ "This option is recommended to reduce larger images. You can save size can "
|
1090 |
+
#~ "go up to 80%% after resizing. The new width should not be less than your "
|
1091 |
+
#~ "largest thumbnail size, which is actually %s px."
|
1092 |
+
#~ msgstr ""
|
1093 |
+
#~ "Cette option est recommendée pour réduire les images trop grandes. Vous "
|
1094 |
+
#~ "pouvez économiser jusqu'à 80%% du poids après le redimensionnement. La "
|
1095 |
+
#~ "nouvelle largeur ne doit pas être inférieure à la plus grande largeur de "
|
1096 |
+
#~ "vos miniatures qui est actuellement de %s px."
|
1097 |
+
|
1098 |
+
#~ msgid "An unknown error occurred"
|
1099 |
+
#~ msgstr "Une erreur inconnue est survenue"
|
1100 |
+
|
1101 |
+
#~ msgid ""
|
1102 |
+
#~ "Keep your original images in a secure place before optimization process."
|
1103 |
+
#~ msgstr ""
|
1104 |
+
#~ "Gardez vos images d’origine dans un endroit sûr avant le processus "
|
1105 |
+
#~ "d’optimisation."
|
1106 |
+
|
1107 |
+
#~ msgid ""
|
1108 |
+
#~ "This mode is a lossless optimization, your images will be optimized without "
|
1109 |
+
#~ "any visible change."
|
1110 |
+
#~ msgstr ""
|
1111 |
+
#~ "Ce niveau permet d'optimiser sans perte, vos images seront optimisées sans "
|
1112 |
+
#~ "aucun changement visible."
|
1113 |
+
|
1114 |
+
#~ msgid ""
|
1115 |
+
#~ "This mode will apply all optimizations available to compress furthermore "
|
1116 |
+
#~ "the image."
|
1117 |
+
#~ msgstr ""
|
1118 |
+
#~ "Ce niveau appliquera toutes les optimisations disponibles pour compresser "
|
1119 |
+
#~ "les images."
|
1120 |
+
|
1121 |
+
#~ msgid "If you want the highest weight reduction, we recommend you this mode."
|
1122 |
+
#~ msgstr ""
|
1123 |
+
#~ "Si vous souhaitez une réduction du poids plus performante, nous vous "
|
1124 |
+
#~ "recommandons ce niveau."
|
1125 |
+
|
1126 |
+
#~ msgid "Optimize automatically every image you will upload to WordPress."
|
1127 |
+
#~ msgstr "Optimisez automatiquement chaque image que vous enverrez à WordPress."
|
1128 |
+
|
1129 |
+
#~ msgid ""
|
1130 |
+
#~ "Please be aware that optimizing a large number of images can take a while "
|
1131 |
+
#~ "depends on your server and network speed."
|
1132 |
+
#~ msgstr ""
|
1133 |
+
#~ "Prenez conscience que l’optimisation d’un grand nombre d’images peut "
|
1134 |
+
#~ "prendre du temps en fonction de la rapidité de votre serveur et de votre "
|
1135 |
+
#~ "connexion."
|
1136 |
+
|
1137 |
+
#~ msgid "Informations"
|
1138 |
+
#~ msgstr "Informations"
|
1139 |
+
|
1140 |
+
#~ msgid "%sClick here%s to start the bulk optimization"
|
1141 |
+
#~ msgstr "%sCliquez ici%s pour démarrer l’optimisation en masse"
|
1142 |
+
|
1143 |
+
#~ msgid "https://imagify.io"
|
1144 |
+
#~ msgstr "https://imagify.io"
|
1145 |
+
|
1146 |
+
#~ msgid "Your email address"
|
1147 |
+
#~ msgstr "Votre adresse e-mail"
|
1148 |
+
|
1149 |
+
#~ msgid "Subscribe"
|
1150 |
+
#~ msgstr "S’abonner"
|
1151 |
+
|
1152 |
+
#~ msgid "You haven't uploaded images yet."
|
1153 |
+
#~ msgstr "Vous n’avez pas encore uploadé d’images."
|
1154 |
+
|
1155 |
+
#~ msgid "Overall savings"
|
1156 |
+
#~ msgstr "Gain total"
|
1157 |
+
|
1158 |
+
#~ msgid "Invalid API key."
|
1159 |
+
#~ msgstr "Clé API invalide."
|
1160 |
+
|
1161 |
+
#~ msgid "Invalid API Key. %sCheck your Settings%s"
|
1162 |
+
#~ msgstr "Clé API invalide. %sVérifiez vos règlages%s"
|
1163 |
+
|
1164 |
+
#~ msgid ""
|
1165 |
+
#~ "Is your WordPress website too slow? Discover the best caching plugin to "
|
1166 |
+
#~ "speed up your website."
|
1167 |
+
#~ msgstr ""
|
1168 |
+
#~ "Votre site WordPress est lent ? Découvrer le meilleur plugin de cache pour "
|
1169 |
+
#~ "accélérer votre site."
|
1170 |
+
|
1171 |
+
#~ msgid ""
|
1172 |
+
#~ "Please be aware that optimizing a large number of images can take a whil "
|
1173 |
+
#~ "depends on your server and network speed."
|
1174 |
+
#~ msgstr ""
|
1175 |
+
#~ "Soyez conscient que l’optimisation d’une grand nombre d’images peut prendre "
|
1176 |
+
#~ "du temps en fonction de la rapidité de votre serveur et de votre connexion."
|
1177 |
+
|
1178 |
+
#~ msgid "Your API key isn't valid."
|
1179 |
+
#~ msgstr "Votre clé API n’est pas valide."
|
readme.txt
ADDED
@@ -0,0 +1,236 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
=== Imagify Image Optimizer ===
|
2 |
+
Contributors: wp_media
|
3 |
+
Tags: image optimizer, image optimiser, optimize, optimise, images, media, performance, seo, faster loading times, smushit, smush.it, compress, kraken-image-optimizer, tinypng, tinyjpeg, pngquant, jpegmini, ewww, pagespeed, pagespeed insights, sitespeed, optimize gif, optimize jpeg, optimize png, optimize animated gif, svg, improve pagerank, gtmetrix speed test, picture, optimization, image editor, pngout, upload speed, imagify, compression, compression image, webp, lossless, cwebp, media, jpegtran, image, image optimisation, image optimization, shrink, picture, photo, photos, optimize photos, compress, crunch, attachment, pictures, fast, image files, image quality, lossy, upload, kraken, resize, optipng, kraken image optimizer, photo optimization, gifsicle, krakenio, png, gmagick, image optimize, pdf, pdf optimisation, pdf optimization, optimize pdf, optimise pdf, shrink pdf, jpg, jpeg, jpg optimisation, jpg optimization, optimize jpg, optimise jpg, shrink jpg, gif, animated gif, optimize gif, optimise gif, optimizer, optimiser, compression, cruncher, image cruncher, compress png, compress jpg, compress jpeg, compress pdf, faster loading times, image optimiser, improve pagerank, optimise, optimize animated gif, optimise jpeg, optimize jpeg, optimize, optimise png, optimise pdf, optimize pdf, tinyjpg, short pixel, shortpixel, woocommerce compatible, reduce image size, wordpress compression, wordpress image tool, yahoo, yahoo smush.it, retina, wp retina, wp retina x2
|
4 |
+
Requires at least: 3.7.0
|
5 |
+
Tested up to: 4.4.1
|
6 |
+
Stable tag: 1.3.3
|
7 |
+
License: GPLv2 or later
|
8 |
+
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
+
|
10 |
+
Dramaticaly reduce image file sizes without loosing quality, make your website load faster, boost your SEO and save money on your bandwidth.
|
11 |
+
|
12 |
+
== Description ==
|
13 |
+
|
14 |
+
Speed up your website with lighter images without losing quality.
|
15 |
+
|
16 |
+
Imagify is the most advanced image compression tool, you can now use this power directly in WordPress.
|
17 |
+
After enabling it all your images including thumbnails and retina images from WP Retina x2 will be automatically optimized on the fly when you will add in into WordPress.
|
18 |
+
|
19 |
+
= What is Image Compression? =
|
20 |
+
|
21 |
+
Learn more about image compression, check that: <a href="https://imagify.io/images-compression">https://imagify.io/images-compression</a>
|
22 |
+
|
23 |
+
= Why use Imagify to optimize you images? =
|
24 |
+
|
25 |
+
You already have a lots of unoptimized images? Not a problem, you will love the Bulk Optimizer to optimize all your existing images in one click.
|
26 |
+
|
27 |
+
Imagify can directly resize your images, **you won't have to lose time anymore on resizing your images before uploading them**.
|
28 |
+
|
29 |
+
Three level of compression are available:
|
30 |
+
|
31 |
+
- Normal, a losseless compression algorithm. The image quality won't be altered at all.
|
32 |
+
- Agressive, a lossy compression algorithm. Stronger compression with a tiny loss of quality most of the time this is not even noticeable at all.
|
33 |
+
- Ultra, our strongest compression method using a lossy algorithm.
|
34 |
+
|
35 |
+
With the backup option, you can change your mind whenever you want by restoring your images to their original version or optimize them to another compression level.
|
36 |
+
|
37 |
+
= What our users think of Imagify? =
|
38 |
+
|
39 |
+
> "Imagify is an awesome tool that is powerful & easy to use. It's fast, rivals and surpasses other established plugins/software. Awesome!" — [Simon Harper](https://twitter.com/SRHDesign/status/663758140505235456)
|
40 |
+
>
|
41 |
+
> "If you want to "squeeze" your images as much as possible and "trim out" your website on the highest professional level... Imagify" — [Ivica Delic](https://twitter.com/Free_LanceTools/status/685503950909476865)
|
42 |
+
>
|
43 |
+
> "Clearly Imagify is the most awesome WordPress plugin to compress images on your website! A must try" — [Eric Walter](https://twitter.com/EricWaltR/status/679053496382038016)
|
44 |
+
>
|
45 |
+
|
46 |
+
= Does Imagify is Free? =
|
47 |
+
|
48 |
+
You can optimize for free 25mb of images (about 150 images) every month and you will receive a 75mb bonus upon registration.
|
49 |
+
|
50 |
+
Need more? Have a look at our plans: <a href="https://imagify.io/pricing">https://imagify.io/pricing</a>
|
51 |
+
|
52 |
+
= What's next? =
|
53 |
+
|
54 |
+
Have a look at our upcoming features by following our development roadmap: <a href="https://trello.com/b/3Q8ZnSN6/imagify-roadmap">https://trello.com/b/3Q8ZnSN6/imagify-roadmap</a>
|
55 |
+
|
56 |
+
= Who we are? =
|
57 |
+
|
58 |
+
We are <a href="http://wp-media.me">WP Media</a>, the startup behind WP Rocket the best caching plugin for WordPress.
|
59 |
+
|
60 |
+
Our mission is to improve the web, we are making it faster with <a href="http://wp-rocket.me/">WP Rocket</a> we want to make it lighter with Imagify.
|
61 |
+
|
62 |
+
= Get in touch! =
|
63 |
+
|
64 |
+
* Website: <a href="https://imagify.io">Imagify.io</a>
|
65 |
+
* Contact Us: <a href="https://imagify.io/contact">https://imagify.io/contact</a>
|
66 |
+
* Twitter: <a href="https://twitter.com/imagify">https://twitter.com/imagify</a>
|
67 |
+
|
68 |
+
= Related Plugins =
|
69 |
+
* <a href="http://wp-rocket.me">WP Rocket</a>: Best caching plugin to speed-up your WordPress website.
|
70 |
+
|
71 |
+
== Installation ==
|
72 |
+
|
73 |
+
= WordPress Admin Method =
|
74 |
+
1. Go to you administration area in WordPress `Plugins > Add`
|
75 |
+
2. Look for `Imagify` (use search form)
|
76 |
+
3. Click on Install and activate the plugin
|
77 |
+
4. Optional: find the settings page through `Settings > Imagify`
|
78 |
+
|
79 |
+
= FTP Method =
|
80 |
+
1. Upload the complete `imagify` folder to the `/wp-content/plugins/` directory
|
81 |
+
2. Activate the plugin through the 'Plugins' menu in WordPress
|
82 |
+
3. Optional: find the settings page through `Settings > Imagify`
|
83 |
+
|
84 |
+
== Frequently Asked Questions ==
|
85 |
+
|
86 |
+
= Can I use the plugin with a free account? =
|
87 |
+
|
88 |
+
Absolutely. You are limited to a quota of 25 MB of images per month with a free account. Once this quota is reached, you cannot optimize new images until your quota is renewed or you purchase credits.
|
89 |
+
|
90 |
+
= On how many websites can I use the plugin? =
|
91 |
+
|
92 |
+
You can use the plugin on as many sites as you wish. The only limit is the optimization quota of your account.
|
93 |
+
|
94 |
+
= I used Kraken, Optimus, EWWW or WP Smush, will Imagify further optimize my images? =
|
95 |
+
|
96 |
+
Absolutely. Most of the time, Imagify will still be able to optimize your images even if you have already compressed them with another tool.
|
97 |
+
|
98 |
+
= Will the original images be deleted? =
|
99 |
+
|
100 |
+
No. Imagify automatically replaces the images with an optimized image. The backup option allows you to keep the original images and restore them with one click.
|
101 |
+
|
102 |
+
= Is it possible to re-optimize images with a different level? =
|
103 |
+
|
104 |
+
Yes. By activating the backup option in the plugin, you can re-optimize each image with a different compression level.
|
105 |
+
|
106 |
+
= What happens when the plugin is disabled? =
|
107 |
+
|
108 |
+
When the plugin is disabled, your existing images remain optimized. Backups of the original images are still available if you have enabled the images backup option.
|
109 |
+
|
110 |
+
== Screenshots ==
|
111 |
+
|
112 |
+
1. Bulk Optimization
|
113 |
+
|
114 |
+
2. Settings Page
|
115 |
+
|
116 |
+
3. Media Page
|
117 |
+
|
118 |
+
== Changelog ==
|
119 |
+
|
120 |
+
= 1.3.3 =
|
121 |
+
* Bug Fix
|
122 |
+
* Fixed behavior in multisite networks where Imagify options would not get saved when the plugin wasn't network-activated, but only activated for specific sites within the network.
|
123 |
+
|
124 |
+
= 1.3.2 =
|
125 |
+
* NEW: Add Spanish translation
|
126 |
+
* Bug Fix
|
127 |
+
* Avoid lack of performance in the WordPress administration if the Imagify's servers are down.
|
128 |
+
|
129 |
+
= 1.3.1 =
|
130 |
+
* Bug Fix
|
131 |
+
* Remove a notice message which causes a lack of performance in the administration. (thanks Kevin Gauthier to warn us)
|
132 |
+
|
133 |
+
= 1.3 =
|
134 |
+
* NEW: Add GIF support
|
135 |
+
* NEW option: You can now decide to keep EXIF data on your images
|
136 |
+
|
137 |
+
= 1.2.4 =
|
138 |
+
* Bug Fix
|
139 |
+
* Don't duplicate Imagify data in the attachment edit screen (wp-admin/post.php)
|
140 |
+
|
141 |
+
= 1.2.3 =
|
142 |
+
* Improvement
|
143 |
+
* Use AJAX to display the quota in the admin bar to avoid a call to our API on each pages.
|
144 |
+
|
145 |
+
= 1.2.2 =
|
146 |
+
* Bug Fix
|
147 |
+
* Bulk Optimization: Fix issue when the backup option isn't activated. The compression level applied was "Normal" instead the one saved in the settings.
|
148 |
+
* Bulk Optimization: Don't try to re-optimize an image already optimized which has the same compression level than the one saved in the settings.
|
149 |
+
|
150 |
+
= 1.2.1 =
|
151 |
+
* Regression Fix
|
152 |
+
* Fix the Bulk Optimization issue when you never optimized any images and avoid the message "All your images have been optimized by Imagify. Congratulations!".
|
153 |
+
|
154 |
+
= 1.2 =
|
155 |
+
* Interface
|
156 |
+
* NEW compression level: Ultra
|
157 |
+
* NEW options: You can now choose to display Admin Bar Imagify's menu, or not.
|
158 |
+
* See the differences between Ultra, Agressive and Normal option inside Imagify Options page.
|
159 |
+
* Bug Fix
|
160 |
+
* Admin Bar: Styles are now included in front-end too.
|
161 |
+
* Admin Bar: Better styles in certain cases.
|
162 |
+
* Deactivate a conflict plugin doesn't return a blank page anymore!
|
163 |
+
* Display the right original image size after a resize (meta data)
|
164 |
+
* Regression Fix
|
165 |
+
* Bulk Optimization: update in live the unconsumed credit during a bulk optimization.
|
166 |
+
|
167 |
+
= 1.1.6 =
|
168 |
+
* Interface
|
169 |
+
* Quick access to your profile informations (quota) in Admin Bar > Imagify
|
170 |
+
* More precise information about global size saved using Imagify (bulk optimization page)
|
171 |
+
* When your bulk optimization is over, success message isn't inside the table anymore
|
172 |
+
* To quit the bulk optimization processing you have to confirm your action
|
173 |
+
* Bug Fix
|
174 |
+
* JS: `console` undefined on some IE browsers
|
175 |
+
* PHP Warning: Illegal string offset 'sizes' in ../inc/functions/admin-stats.php on line 180
|
176 |
+
* Don't count GIF & SVG in the Imagify statistics
|
177 |
+
|
178 |
+
= 1.1.5 =
|
179 |
+
* Interface
|
180 |
+
* Display a default preview to avoid issues with 404 images and a security restriction on SSL websites on the Bulk Optimization page
|
181 |
+
* Don't count all exceeded images to avoid lack of speed on the Bulk Optimization page
|
182 |
+
* Bug Fix
|
183 |
+
* Don't try to re-optimize images with an empty error message or with an already optimized message on the Bulk Optimization
|
184 |
+
* Don't generate special chars in the password to avoid issue on the Imagify app log in
|
185 |
+
|
186 |
+
= 1.1.4 =
|
187 |
+
* Interface
|
188 |
+
* Don't add the WP Rocket ads if this plugin is activated
|
189 |
+
* Bug Fix
|
190 |
+
* Ignore thumbnails with infinite width like 9999 to avoid an issue with the "Resize larger images" option
|
191 |
+
|
192 |
+
= 1.1.3 =
|
193 |
+
* Bug Fix
|
194 |
+
* Fix PHP Warning: curl_setopt() [function.curl-setopt]: CURLOPT_FOLLOWLOCATION cannot be activated when safe_mode is enabled or an open_basedir is set in ../inc/api/imagify.php on line 218
|
195 |
+
|
196 |
+
= 1.1.2 =
|
197 |
+
* Regression Fix
|
198 |
+
* Fix the "%undefined%" and the overview chart issues on the Bulk Optimization page
|
199 |
+
* Fix PHP Warning: Illegal string offset 'sizes' in ../inc/classes/class-attachment.php on line 347
|
200 |
+
* Fix PHP Notice: Uninitialized string offset: 0 in ../inc/classes/class-attachment.php on line 347
|
201 |
+
* Fix PHP Warning: Illegal string offset 'file' in ../inc/classes/class-attachment.php on line 410
|
202 |
+
|
203 |
+
= 1.1.1 =
|
204 |
+
* Interface
|
205 |
+
* Add a notice on the Bulk Optimization & Imagify Settings page when the monthly free quota is consumed
|
206 |
+
* Bug Fix
|
207 |
+
* Fix issue on Chrome & Opera on the Bulk Optimization: images are optimized from the newest to the oldest.
|
208 |
+
|
209 |
+
= 1.1 =
|
210 |
+
* Interface
|
211 |
+
* Add new option "Resize larger Images"
|
212 |
+
* Bulk optimization: results table is not shrinkable to the infinite anymore (scrollable)
|
213 |
+
* Better visual in options page
|
214 |
+
* Bug Fix
|
215 |
+
* Check if an attachment exists to avoid an issue which is stopped the Bulk Optimization
|
216 |
+
* Really Fix PHP Notice: Undefined offset: 1 in imagify/inc/functions/formatting.php on line 17
|
217 |
+
* Double animation in Progress Bar
|
218 |
+
|
219 |
+
= 1.0.3 =
|
220 |
+
* Bug Fix
|
221 |
+
* Fix PHP Notice: Undefined offset: 1 in ../inc/functions/formatting.php on line 16
|
222 |
+
|
223 |
+
= 1.0.2 =
|
224 |
+
* Interface
|
225 |
+
* Add error descriptions on the Bulk Optimization results
|
226 |
+
* Add a notice to switch to the list view in the media library page
|
227 |
+
|
228 |
+
= 1.0.1 =
|
229 |
+
* Interface
|
230 |
+
* Add Intercom Live Chat on Imagify Settings and Bulk Optimization pages
|
231 |
+
* Better user informations
|
232 |
+
* Bug Fix
|
233 |
+
* PHP 5.2+ compatibility
|
234 |
+
|
235 |
+
= 1.0 =
|
236 |
+
* Initial release.
|
uninstall.php
ADDED
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
// If uninstall not called from WordPress exit
|
3 |
+
defined( 'WP_UNINSTALL_PLUGIN' ) or die( 'Cheatin’ uh?' );
|
4 |
+
|
5 |
+
// Delete Imagify options
|
6 |
+
delete_site_option( 'imagify_settings' );
|
7 |
+
|
8 |
+
// Delete all transients
|
9 |
+
delete_site_transient( 'imagify_check_licence_1' );
|
10 |
+
|
11 |
+
// Delete all user meta related to Imagify
|
12 |
+
delete_metadata( 'user', '', '_imagify_ignore_notices', '', true );
|