Version Description
- New: if new thumbnail sizes appear after activating a new theme or plugin, you can now optimize only these missing sizes instead of restoring and re-optimizing all images.
- Improvement: CSS and JS files have been split and are loaded only when needed.
- Improvement: in each NextGen Galleries you now have "Optimize" and "Restore" bulk actions.
- Improvement: better banner placements with languages with long sentences (looking at you, Germany).
- Improvement: messages like the "WELL DONE" one can now be translated.
- Bug Fix: the account infos in the admin bar now works properly on front-end.
- Bug Fix: some thumbnail sizes with curious name were not listed in the settings page.
- Bug Fix: improved library size calculation for "What plan do I need?". Some thumbnail sizes were missing, lowering the result.
- Regression fix: the issue with Imagify's popup on WP Rocket options screen is now also solved when WP Rocket is white-labelled.
- Lots of various small fixes and code improvements.
Download this release
Release Info
Developer | wp_media |
Plugin | Imagify Image Optimizer |
Version | 1.6.10 |
Comparing to | |
See all releases |
Code changes from version 1.6.9.1 to 1.6.10
- assets/css/admin-bar.css +64 -3
- assets/css/admin-bar.min.css +1 -1
- assets/css/admin.css +229 -2929
- assets/css/admin.min.css +1 -1
- assets/css/bulk.css +737 -0
- assets/css/bulk.min.css +1 -0
- assets/css/notices.css +272 -0
- assets/css/notices.min.css +1 -0
- assets/css/options.css +317 -0
- assets/css/options.min.css +1 -0
- assets/css/pricing-modal.css +1146 -0
- assets/css/pricing-modal.min.css +1 -0
- assets/css/sweetalert-custom.css +50 -0
- assets/css/sweetalert-custom.min.css +1 -0
- assets/css/twentytwenty.css +127 -1
- assets/css/twentytwenty.min.css +1 -1
- assets/images/big-blue-check.png +0 -0
- assets/images/check-1.svg +0 -0
- assets/images/check-mini-1.svg +0 -0
- assets/images/icon-arrow-choice.png +0 -0
- assets/images/icon-arrow-choice.svg +0 -0
- assets/images/icon-lock.png +0 -0
- assets/images/icon-lock.svg +0 -0
- assets/images/icon-pack.png +0 -0
- assets/images/icon-pack.svg +0 -0
- assets/images/mushrooms-aggressive.jpg +0 -0
- assets/images/mushrooms-normal.jpg +0 -0
- assets/images/mushrooms-original.jpg +0 -0
- assets/images/mushrooms-ultra.jpg +0 -0
- assets/images/pic-ericwaltr.jpg +0 -0
- assets/images/pic-srhdesign.jpg +0 -0
- assets/js/admin-bar.js +37 -0
- assets/js/admin-bar.min.js +1 -0
- assets/js/admin.js +16 -1142
- assets/js/admin.min.js +1 -1
- assets/js/bulk.js +10 -24
- assets/js/bulk.min.js +1 -1
- assets/js/es6-promise.auto.js +0 -0
- assets/js/es6-promise.auto.min.js +0 -0
- assets/js/jquery.twentytwenty.js +5 -25
- assets/js/jquery.twentytwenty.min.js +1 -1
- assets/js/library.js +51 -0
- assets/js/library.min.js +1 -0
- assets/js/media-modal.js +98 -0
- assets/js/media-modal.min.js +1 -0
- assets/js/notices.js +123 -0
- assets/js/notices.min.js +1 -0
- assets/js/options.js +8 -22
- assets/js/options.min.js +1 -1
- assets/js/pricing-modal.js +977 -0
- assets/js/pricing-modal.min.js +1 -0
- assets/js/upload.js +0 -192
- assets/js/upload.min.js +0 -1
- imagify.php +9 -8
- inc/3rd-party/3rd-party.php +1 -0
- inc/3rd-party/amazon-s3-and-cloudfront/inc/classes/class-imagify-as3cf-attachment.php +173 -1
- inc/3rd-party/amazon-s3-and-cloudfront/inc/classes/class-imagify-as3cf.php +21 -2
- inc/3rd-party/enable-media-replace/inc/classes/class-imagify-enable-media-replace.php +1 -1
- inc/3rd-party/nextgen-gallery/inc/admin/ajax.php +2 -5
- inc/3rd-party/nextgen-gallery/inc/admin/bulk.php +0 -0
- inc/3rd-party/nextgen-gallery/inc/admin/db.php +0 -0
- inc/3rd-party/nextgen-gallery/inc/admin/enqueue.php +30 -43
- inc/3rd-party/nextgen-gallery/inc/admin/gallery.php +19 -3
- inc/3rd-party/nextgen-gallery/inc/admin/heartbeat.php +1 -1
- inc/3rd-party/nextgen-gallery/inc/admin/menu.php +0 -0
- inc/3rd-party/nextgen-gallery/inc/classes/class-imagify-ngg-attachment.php +1 -1
- inc/3rd-party/nextgen-gallery/inc/common/attachments.php +1 -1
- inc/3rd-party/nextgen-gallery/inc/functions/admin-stats.php +0 -0
- inc/3rd-party/wp-rocket.php +18 -11
- inc/3rd-party/yoast-seo.php +21 -0
- inc/admin/ajax.php +108 -159
- inc/admin/enqueue.php +0 -244
- inc/admin/heartbeat.php +1 -1
- inc/admin/media.php +2 -2
- inc/admin/meta-boxes.php +1 -1
- inc/admin/options.php +2 -2
- inc/admin/ui/notice-backup-folder-not-writable.php +19 -0
- inc/admin/ui/notice-footer.php +8 -0
- inc/admin/ui/notice-free-over-quota.php +30 -0
- inc/admin/ui/notice-grid-view.php +13 -0
- inc/admin/ui/notice-header.php +12 -0
- inc/admin/ui/notice-http-block-external.php +21 -0
- inc/admin/ui/notice-plugins-to-deactivate.php +18 -0
- inc/admin/ui/notice-rating.php +36 -0
- inc/admin/ui/notice-welcome-steps.php +55 -0
- inc/admin/ui/notice-wp-rocket.php +31 -0
- inc/admin/ui/notice-wrong-api-key.php +23 -0
- inc/admin/ui/notices.php +0 -511
- inc/admin/ui/options.php +9 -4
- inc/api/imagify.php +0 -156
- inc/classes/abstracts/class-imagify-abstract-attachment.php +106 -1
- inc/classes/class-imagify-assets.php +803 -0
- inc/classes/class-imagify-attachment.php +236 -6
- inc/classes/class-imagify-notices.php +758 -0
- inc/classes/class-imagify.php +2 -1
- inc/common/admin-bar.php +2 -17
- inc/common/attachments.php +1 -1
- inc/common/cron.php +4 -5
- inc/functions/admin-stats.php +101 -35
- inc/functions/admin-ui.php +95 -30
- inc/functions/admin.php +192 -21
- inc/functions/api.php +244 -9
- inc/functions/attachments.php +41 -29
- inc/functions/common.php +1 -1
- inc/{compat.php → functions/compat.php} +33 -18
- inc/functions/deprecated.php +285 -0
- inc/functions/files.php +3 -3
- inc/functions/formatting.php +7 -2
- inc/functions/i18n.php +117 -78
- inc/functions/notices.php +0 -72
- inc/functions/options.php +18 -17
- inc/functions/process.php +3 -3
- readme.txt +15 -3
assets/css/admin-bar.css
CHANGED
@@ -1,3 +1,64 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
#wpadminbar #wp-admin-bar-imagify-profile * {
|
2 |
line-height: 1.5;
|
3 |
white-space: initial;
|
@@ -83,7 +144,7 @@
|
|
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;
|
@@ -95,8 +156,8 @@
|
|
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 |
}
|
1 |
+
.imagify-account,
|
2 |
+
.imagify-account-link {
|
3 |
+
padding-right: 15px;
|
4 |
+
}
|
5 |
+
.imagify-meteo-icon {
|
6 |
+
display: inline-block;
|
7 |
+
height: 38px;
|
8 |
+
vertical-align: middle;
|
9 |
+
margin-right: 10px;
|
10 |
+
}
|
11 |
+
.imagify-user-plan {
|
12 |
+
color: #40b1d0;
|
13 |
+
}
|
14 |
+
.imagify-meteo-title.imagify-meteo-title {
|
15 |
+
color: #FFF;
|
16 |
+
font-size: 17px;
|
17 |
+
}
|
18 |
+
.imagify-space-left {
|
19 |
+
display: inline-block;
|
20 |
+
min-height: 38px;
|
21 |
+
min-width: 245px;
|
22 |
+
vertical-align: middle;
|
23 |
+
}
|
24 |
+
.imagify-space-left > p {
|
25 |
+
color: #FFF;
|
26 |
+
}
|
27 |
+
[class^="imagify-bar-"],
|
28 |
+
#wp-admin-bar-imagify-profile [class^="imagify-bar-"] {
|
29 |
+
position: relative;
|
30 |
+
height: 1.5em;
|
31 |
+
width: 100%;
|
32 |
+
background: #60758D;
|
33 |
+
color: #FFF;
|
34 |
+
font-size: 10px;
|
35 |
+
}
|
36 |
+
.imagify-progress,
|
37 |
+
#wp-admin-bar-imagify-profile .imagify-progress {
|
38 |
+
height: 1.5em;
|
39 |
+
}
|
40 |
+
.imagify-progress {
|
41 |
+
transition: width .3s;
|
42 |
+
}
|
43 |
+
.imagify-bar-positive .imagify-progress {
|
44 |
+
background: #8CC152;
|
45 |
+
}
|
46 |
+
.imagify-bar-positive .imagify-barnb {
|
47 |
+
color: #8CC152;
|
48 |
+
}
|
49 |
+
.imagify-bar-negative .imagify-progress {
|
50 |
+
background: #73818C;
|
51 |
+
}
|
52 |
+
.imagify-bar-negative .imagify-barnb {
|
53 |
+
color: #73818C;
|
54 |
+
}
|
55 |
+
.imagify-bar-neutral .imagify-progress {
|
56 |
+
background: #F5A623;
|
57 |
+
}
|
58 |
+
.imagify-space-left .imagify-bar-negative .imagify-progress {
|
59 |
+
background: #D0021B;
|
60 |
+
}
|
61 |
+
|
62 |
#wpadminbar #wp-admin-bar-imagify-profile * {
|
63 |
line-height: 1.5;
|
64 |
white-space: initial;
|
144 |
margin-top: 1em;
|
145 |
}
|
146 |
|
147 |
+
#wpadminbar #wp-admin-bar-imagify-profile .imagify-btn-ghost {
|
148 |
display: inline-block;
|
149 |
height: auto;
|
150 |
padding: 7px 10px;
|
156 |
transition: all .275s;
|
157 |
}
|
158 |
|
159 |
+
#wpadminbar #wp-admin-bar-imagify-profile .imagify-btn-ghost:hover,
|
160 |
+
#wpadminbar #wp-admin-bar-imagify-profile .imagify-btn-ghost:focus {
|
161 |
background: #FFF;
|
162 |
color: #888;
|
163 |
}
|
assets/css/admin-bar.min.css
CHANGED
@@ -1 +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:.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 .
|
1 |
+
#wp-admin-bar-imagify .button-text,.imagify-meteo-icon,.imagify-space-left{display:inline-block;vertical-align:middle}.imagify-account,.imagify-account-link{padding-right:15px}.imagify-meteo-icon{height:38px;margin-right:10px}.imagify-user-plan{color:#40b1d0}.imagify-meteo-title.imagify-meteo-title{color:#FFF;font-size:17px}.imagify-space-left{min-height:38px;min-width:245px}.imagify-space-left>p{color:#FFF}#wp-admin-bar-imagify-profile [class^=imagify-bar-],[class^=imagify-bar-]{position:relative;height:1.5em;width:100%;background:#60758D;color:#FFF;font-size:10px}#wp-admin-bar-imagify-profile .imagify-progress,.imagify-progress{height:1.5em}.imagify-progress{-webkit-transition:width .3s;-o-transition:width .3s;transition:width .3s}.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:.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 .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:700}#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 .imagify-btn-ghost{display:inline-block;height:auto;padding:7px 10px;border:1px solid #FFF;text-align:center;background:0 0;color:#FFF;border-radius:3px;-webkit-transition:all .275s;-o-transition:all .275s;transition:all .275s}#wpadminbar #wp-admin-bar-imagify-profile .imagify-btn-ghost:focus,#wpadminbar #wp-admin-bar-imagify-profile .imagify-btn-ghost:hover{background:#FFF;color:#888}#wpadminbar .imagify-warning *{background:#f5a623;color:#FFF;text-shadow:0 0 2px rgba(0,0,0,.2)}
|
assets/css/admin.css
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
/**
|
2 |
-
*
|
3 |
*/
|
4 |
|
5 |
/* Util: float */
|
@@ -94,29 +94,12 @@
|
|
94 |
padding-top: 0;
|
95 |
}
|
96 |
|
97 |
-
|
98 |
body.imagify-modal-is-open {
|
99 |
overflow: hidden;
|
100 |
}
|
101 |
-
.imagify-plugins-error {
|
102 |
-
overflow: hidden;
|
103 |
-
padding-left: 20px;
|
104 |
-
list-style-type: disc
|
105 |
-
}
|
106 |
-
.imagify-plugins-error li {
|
107 |
-
width:300px;
|
108 |
-
line-height:30px
|
109 |
-
}
|
110 |
-
@media (max-width: 570px) {
|
111 |
-
.imagify-plugins-error li {
|
112 |
-
width: auto;
|
113 |
-
}
|
114 |
-
}
|
115 |
-
|
116 |
-
.imagify-notice-dismiss.notice-dismiss {
|
117 |
-
text-decoration: none;
|
118 |
-
}
|
119 |
|
|
|
120 |
.imagify-spinner {
|
121 |
display: inline-block;
|
122 |
width: 20px;
|
@@ -131,129 +114,32 @@ body.imagify-modal-is-open {
|
|
131 |
margin: 4px 0 0 0;
|
132 |
}
|
133 |
|
134 |
-
.misc-pub-section.misc-pub-imagify h4 {
|
135 |
-
font-size: 14px;
|
136 |
-
margin-top: 5px;
|
137 |
-
margin-bottom: 0;
|
138 |
-
}
|
139 |
-
|
140 |
-
/* Some Sweet alert styles */
|
141 |
-
.imagify-sweet-alert button {
|
142 |
-
margin-top: 17px !important;
|
143 |
-
height: 45px !important;
|
144 |
-
letter-spacing: 3px;
|
145 |
-
text-transform: uppercase !important;
|
146 |
-
border-radius: 3px !important;
|
147 |
-
background-color: #40b1d0 !important;
|
148 |
-
box-shadow: 0 3px 0 #338ea6 !important;
|
149 |
-
}
|
150 |
-
.imagify-sweet-alert button.loading {
|
151 |
-
border-radius: 100% !important;
|
152 |
-
height: 40px !important;
|
153 |
-
padding:0!important;
|
154 |
-
box-shadow: none!important;
|
155 |
-
}
|
156 |
-
.imagify-sweet-alert button.swal2-cancel {
|
157 |
-
background: #777 !important;
|
158 |
-
box-shadow: 0 3px 0 #444 !important;
|
159 |
-
}
|
160 |
-
.imagify-sweet-alert-signup .sa-confirm-button-container {
|
161 |
-
width: 40%;
|
162 |
-
}
|
163 |
-
.imagify-sweet-alert-signup button {
|
164 |
-
width: 100%;
|
165 |
-
padding: 0 !important;
|
166 |
-
}
|
167 |
-
.imagify-sweet-alert .sa-input-error:before,
|
168 |
-
.imagify-sweet-alert .sa-input-error:after,
|
169 |
-
.imagify-sweet-alert .la-ball-fall {
|
170 |
-
top: 25% !important;
|
171 |
-
}
|
172 |
-
|
173 |
-
#wpwrap {
|
174 |
-
transition: all .4s;
|
175 |
-
}
|
176 |
-
.stop-scrolling #wpwrap {
|
177 |
-
filter: blur(2px);
|
178 |
-
}
|
179 |
-
.stop-scrolling #wpwrap #wpadminbar {
|
180 |
-
top: -32px;
|
181 |
-
}
|
182 |
-
|
183 |
/* Some basic colors */
|
184 |
.imagify-primary.imagify-primary.imagify-primary {
|
185 |
color: #40b1d0;
|
186 |
}
|
187 |
-
.imagify-secondary.imagify-secondary.imagify-secondary
|
188 |
-
color: #8cc152;
|
189 |
-
}
|
190 |
-
|
191 |
-
#imagify-check-api-container {
|
192 |
-
font-weight: bold;
|
193 |
-
}
|
194 |
-
|
195 |
-
#imagify-check-api-container .dashicons {
|
196 |
-
font-size: 25px;
|
197 |
-
}
|
198 |
-
|
199 |
-
#imagify-check-api-container .dashicons-no:before {
|
200 |
-
color: #f06e57;
|
201 |
-
vertical-align: -1px;
|
202 |
-
}
|
203 |
-
|
204 |
-
#imagify-check-api-container .dashicons-yes:before {
|
205 |
-
color: #8BC34A;
|
206 |
-
vertical-align: -1px;
|
207 |
-
}
|
208 |
.imagify-valid {
|
209 |
color: #8BC34A;
|
210 |
}
|
211 |
|
212 |
-
|
213 |
-
|
214 |
-
position: relative;
|
215 |
-
}
|
216 |
-
#imagify-overview-chart-legend {
|
217 |
-
overflow: hidden;
|
218 |
-
}
|
219 |
-
.imagify-doughnut-legend {
|
220 |
-
margin-top: 38px;
|
221 |
-
list-style: none;
|
222 |
-
}
|
223 |
-
|
224 |
-
.imagify-doughnut-legend li {
|
225 |
-
display: block;
|
226 |
-
padding-left: 30px;
|
227 |
-
position: relative;
|
228 |
-
margin-bottom: 15px;
|
229 |
-
border-radius: 5px;
|
230 |
-
padding: 3px 8px 2px 31px;
|
231 |
font-size: 14px;
|
232 |
-
|
233 |
-
|
234 |
-
-webkit-transition: background-color 200ms ease-in-out;
|
235 |
-
-moz-transition: background-color 200ms ease-in-out;
|
236 |
-
-o-transition: background-color 200ms ease-in-out;
|
237 |
-
transition: background-color 200ms ease-in-out;
|
238 |
}
|
239 |
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
width: 25px;
|
245 |
-
height: 25px;
|
246 |
-
border-radius: 50%;
|
247 |
}
|
248 |
|
249 |
.imagify-chart {
|
250 |
float: left;
|
251 |
margin-bottom: 20px;
|
252 |
}
|
253 |
-
td .imagify-chart {
|
254 |
-
float: none;
|
255 |
-
margin-bottom: 0;
|
256 |
-
}
|
257 |
|
258 |
.imagify-chart-container {
|
259 |
position: relative;
|
@@ -261,89 +147,20 @@ td .imagify-chart {
|
|
261 |
float: left;
|
262 |
margin-right: 20px;
|
263 |
}
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
}
|
271 |
-
.imagify-total-percent {
|
272 |
-
color: #46b1ce;
|
273 |
}
|
|
|
274 |
td .imagify-chart-container {
|
275 |
width: 18px;
|
276 |
height: 18px;
|
277 |
float: none;
|
278 |
margin-right: 10px;
|
279 |
}
|
280 |
-
td .imagify-chart {
|
281 |
-
top: 4px;
|
282 |
-
}
|
283 |
-
|
284 |
-
.imagify-chart-percent {
|
285 |
-
position: absolute;
|
286 |
-
left: 0; right: 0;
|
287 |
-
top: 50%;
|
288 |
-
margin-top: -14px;
|
289 |
-
text-align: center;
|
290 |
-
font-size: 55px;
|
291 |
-
font-weight: bold;
|
292 |
-
color: #46B1CE;
|
293 |
-
}
|
294 |
-
.imagify-chart-percent span {
|
295 |
-
font-size: 20px;
|
296 |
-
vertical-align: super;
|
297 |
-
}
|
298 |
-
|
299 |
-
.media_page_imagify-bulk-optimization .notice,
|
300 |
-
body[class*="_imagify-ngg-bulk-optimization"] .notice,
|
301 |
-
.settings_page_imagify .notice {
|
302 |
-
margin-right: 20px;
|
303 |
-
margin-left: 2px;
|
304 |
-
}
|
305 |
-
|
306 |
-
.media_page_imagify-bulk-optimization .media-item,
|
307 |
-
body[class*="_imagify-ngg-bulk-optimization"] .media-item {
|
308 |
-
margin: 0;
|
309 |
-
}
|
310 |
-
|
311 |
-
.media_page_imagify-bulk-optimization .media-item .progress,
|
312 |
-
body[class*="_imagify-ngg-bulk-optimization"] .media-item .progress {
|
313 |
-
float: none;
|
314 |
-
width: 100%;
|
315 |
-
margin: 0;
|
316 |
-
background: #1F2331;
|
317 |
-
box-shadow: 0;
|
318 |
-
border-radius: 0;
|
319 |
-
}
|
320 |
-
|
321 |
-
.media_page_imagify-bulk-optimization .media-item .percent,
|
322 |
-
body[class*="_imagify-ngg-bulk-optimization"] .media-item .percent {
|
323 |
-
width: auto;
|
324 |
-
padding: 0 5px;
|
325 |
-
line-height: 1.85;
|
326 |
-
font-size: 12px;
|
327 |
-
}
|
328 |
-
|
329 |
-
.media_page_imagify-bulk-optimization .media-item .progress,
|
330 |
-
body[class*="_imagify-ngg-bulk-optimization"] .media-item .progress,
|
331 |
-
body[class*="_imagify-ngg-bulk-optimization"] .media-item .percent,
|
332 |
-
.media_page_imagify-bulk-optimization .media-item .percent {
|
333 |
-
text-align: right;
|
334 |
-
}
|
335 |
-
.media_page_imagify-bulk-optimization .media-item .progress .bar,
|
336 |
-
body[class*="_imagify-ngg-bulk-optimization"] .media-item .progress .bar {
|
337 |
-
width: 1px;
|
338 |
-
height: 22px;
|
339 |
-
margin-top: 0;
|
340 |
-
background: #46B1CE;
|
341 |
-
border-radius: 0;
|
342 |
-
overflow: visible;
|
343 |
-
-webkit-transition: width .5s;
|
344 |
-
transition: width .5s;
|
345 |
-
}
|
346 |
-
|
347 |
|
348 |
/**
|
349 |
*
|
@@ -352,8 +169,7 @@ body[class*="_imagify-ngg-bulk-optimization"] .media-item .progress .bar {
|
|
352 |
*/
|
353 |
|
354 |
|
355 |
-
/* Basic HTML elements */
|
356 |
-
|
357 |
.imagify-settings a,
|
358 |
.imagify-settings .button,
|
359 |
.imagify-settings input,
|
@@ -367,36 +183,13 @@ body[class*="_imagify-ngg-bulk-optimization"] .media-item .progress .bar {
|
|
367 |
color: #40b1d0;
|
368 |
}
|
369 |
|
370 |
-
.imagify-options-title {
|
371 |
-
padding-bottom: .5em;
|
372 |
-
border-bottom: 3px solid #F2F2F2;
|
373 |
-
font-size: 13px;
|
374 |
-
font-weight: 500;
|
375 |
-
text-transform: uppercase;
|
376 |
-
letter-spacing: 0.025em;
|
377 |
-
color: #40b1d0;
|
378 |
-
}
|
379 |
-
|
380 |
.imagify-settings,
|
381 |
.imagify-settings p,
|
382 |
.imagify-settings th {
|
383 |
color: #5F758E;
|
384 |
}
|
385 |
-
|
386 |
-
|
387 |
-
padding-top: 2em;
|
388 |
-
padding-bottom: .5em;
|
389 |
-
}
|
390 |
-
}
|
391 |
-
.imagify-settings .form-table td {
|
392 |
-
vertical-align: top;
|
393 |
-
}
|
394 |
-
.imagify-settings .form-table th span {
|
395 |
-
cursor: pointer;
|
396 |
-
}
|
397 |
-
.imagify-middle th {
|
398 |
-
padding-top: 35px;
|
399 |
-
}
|
400 |
.imagify-settings .button,
|
401 |
.imagify-welcome .button,
|
402 |
.imagify-notice .button,
|
@@ -414,10 +207,6 @@ body[class*="_imagify-ngg-bulk-optimization"] .media-item .progress .bar {
|
|
414 |
transition: all .275s;
|
415 |
}
|
416 |
|
417 |
-
.imagify-notice .button-mini {
|
418 |
-
padding: 2px 10px;
|
419 |
-
font-size: 13px;
|
420 |
-
}
|
421 |
.button-primary.button-mini {
|
422 |
padding: 2px 10px;
|
423 |
}
|
@@ -463,10 +252,11 @@ body[class*="_imagify-ngg-bulk-optimization"] .media-item .progress .bar {
|
|
463 |
.imagify-button-medium.imagify-button-ghost {
|
464 |
border-width: 2px;
|
465 |
}
|
466 |
-
.button .dashicons {
|
467 |
margin-right: 5px;
|
468 |
vertical-align: middle;
|
469 |
}
|
|
|
470 |
.imagify-settings .button-primary.button-primary,
|
471 |
.imagify-welcome .button-primary.button-primary,
|
472 |
.imagify-button-primary.imagify-button-primary {
|
@@ -529,54 +319,30 @@ body[class*="_imagify-ngg-bulk-optimization"] .media-item .progress .bar {
|
|
529 |
.imagify-button-secondary.imagify-button-secondary .dashicons {
|
530 |
vertical-align: middle;
|
531 |
}
|
532 |
-
|
|
|
533 |
display: inline-block;
|
534 |
vertical-align: middle;
|
535 |
}
|
536 |
|
537 |
-
|
538 |
-
/* exception */
|
539 |
-
#imagify-bulk-action {
|
540 |
-
padding: 11px 20px;
|
541 |
-
}
|
542 |
.wp_attachment_image .imagify-button-primary,
|
543 |
.media-frame-content .imagify-button-primary {
|
544 |
-
float: left;
|
545 |
padding: 0 10px 1px;
|
546 |
margin: 0 5px 2px 0;
|
547 |
font-size: 13px;
|
548 |
line-height: 26px;
|
549 |
box-shadow: 0 3px 0 rgba(51, 142, 166, 1);
|
550 |
}
|
551 |
-
|
552 |
-
.imagify-settings input[type="text"] {
|
553 |
-
color: #4A4A4A;
|
554 |
-
font-weight: 600;
|
555 |
-
box-shadow: none;
|
556 |
-
}
|
557 |
-
.imagify-settings div.submit.submit {
|
558 |
-
padding-left: 235px;
|
559 |
-
padding-top: 40px;
|
560 |
-
}
|
561 |
-
.imagify-settings p.submit {
|
562 |
float: left;
|
563 |
-
margin-top: 0;
|
564 |
-
}
|
565 |
-
.imagify-settings p.submit .button {
|
566 |
-
margin: 0 5px;
|
567 |
-
}
|
568 |
-
@media (max-width: 850px) {
|
569 |
-
.imagify-settings div.submit {
|
570 |
-
padding-left: 0;
|
571 |
-
}
|
572 |
-
.imagify-settings p.submit {
|
573 |
-
text-align: center;
|
574 |
-
}
|
575 |
}
|
576 |
|
577 |
-
|
578 |
-
|
579 |
-
|
|
|
|
|
580 |
.imagify-title.imagify-title {
|
581 |
position: relative;
|
582 |
padding: 30px 50px;
|
@@ -584,6 +350,16 @@ body[class*="_imagify-ngg-bulk-optimization"] .media-item .progress .bar {
|
|
584 |
background: #2E3243;
|
585 |
color: #FFF;
|
586 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
587 |
.imagify-settings .imagify-title + .imagify-notice {
|
588 |
margin: 0;
|
589 |
border-right: 1px solid #D9D9D9;
|
@@ -618,85 +394,45 @@ body[class*="_imagify-ngg-bulk-optimization"] .media-item .progress .bar {
|
|
618 |
.imagify-section-gray .imagify-count-title {
|
619 |
color: #4a4a4a;
|
620 |
}
|
621 |
-
|
622 |
.imagify-section p:first-child {
|
623 |
margin-top: 0;
|
624 |
}
|
625 |
.imagify-section p:last-child {
|
626 |
margin-bottom: 0;
|
627 |
}
|
628 |
-
p.imagify-section-title.imagify-section-title {
|
629 |
-
font-size: 20px;
|
630 |
-
margin-top: -.3em;
|
631 |
-
margin-bottom: -.6em;
|
632 |
-
}
|
633 |
|
634 |
-
|
635 |
-
|
636 |
-
|
637 |
-
}
|
638 |
-
@media (max-width: 850px) {
|
639 |
-
.imagify-bulk-info {
|
640 |
-
margin: 1em;
|
641 |
}
|
642 |
}
|
643 |
-
.imagify-bulk-info p {
|
644 |
-
display: inline-block;
|
645 |
-
text-align: left;
|
646 |
-
width: 400px;
|
647 |
-
max-width: 100%;
|
648 |
-
font-weight: bold;
|
649 |
-
}
|
650 |
|
651 |
-
|
652 |
-
|
653 |
-
display: table;
|
654 |
-
width: 100%;
|
655 |
-
}
|
656 |
-
.imagify-settings div.submit > * {
|
657 |
-
display: table-cell;
|
658 |
-
vertical-align: middle;
|
659 |
-
}
|
660 |
-
.imagify-bulk-info {
|
661 |
-
padding: 0 25px;
|
662 |
-
text-align: right;
|
663 |
-
}
|
664 |
-
}
|
665 |
-
.imagify-settings div.submit {
|
666 |
-
margin-top: 2em;
|
667 |
-
padding: 20px 0;
|
668 |
-
}
|
669 |
-
.imagify-sub-header th {
|
670 |
-
text-align: right;
|
671 |
-
}
|
672 |
-
.imagify-sub-header .form-table {
|
673 |
-
margin: 0;
|
674 |
-
}
|
675 |
-
.imagify-sub-header th,
|
676 |
-
.imagify-sub-header td {
|
677 |
-
padding-top: 0;
|
678 |
-
padding-bottom: 0;
|
679 |
}
|
680 |
-
[
|
681 |
-
|
|
|
|
|
|
|
682 |
}
|
683 |
-
|
684 |
-
|
685 |
-
position: relative;
|
686 |
-
bottom: 0; right: 0;
|
687 |
-
text-align: left;
|
688 |
}
|
689 |
|
690 |
-
|
691 |
-
|
|
|
|
|
|
|
692 |
}
|
693 |
|
|
|
|
|
|
|
694 |
.imagify-rate-us.imagify-rate-us {
|
695 |
-
position: absolute;
|
696 |
-
bottom: 50%;
|
697 |
-
right: 20px;
|
698 |
text-align: right;
|
699 |
-
margin
|
700 |
color: #FFF;
|
701 |
}
|
702 |
.imagify-rate-us a {
|
@@ -731,213 +467,42 @@ p.imagify-section-title.imagify-section-title {
|
|
731 |
}
|
732 |
}
|
733 |
|
734 |
-
|
735 |
-
|
736 |
-
|
737 |
-
|
738 |
-
|
739 |
-
display: -ms-flexbox;
|
740 |
-
display: flex;
|
741 |
-
-webkit-box-align: center;
|
742 |
-
-webkit-align-items: center;
|
743 |
-
-ms-flex-align: center;
|
744 |
-
-ms-grid-row-align: center;
|
745 |
-
align-items: center;
|
746 |
-
padding: 10px 45px 10px 0;
|
747 |
-
border: 0 none;
|
748 |
-
box-shadow: none;
|
749 |
-
color: #FFF;
|
750 |
-
background: #412355;
|
751 |
-
}
|
752 |
-
.media_page_imagify-bulk-optimization .imagify-rkt-notice {
|
753 |
-
margin-left: 2px;
|
754 |
-
margin-right: 20px;
|
755 |
-
}
|
756 |
-
@media (max-width: 782px) {
|
757 |
-
.media_page_imagify-bulk-optimization .imagify-rkt-notice {
|
758 |
-
margin-left: 0;
|
759 |
-
margin-right: 12px;
|
760 |
-
}
|
761 |
}
|
762 |
-
.imagify-
|
763 |
-
|
764 |
-
|
765 |
-
|
766 |
-
padding: 0;
|
767 |
-
margin-top: -11px;
|
768 |
-
background: transparent;
|
769 |
-
color: #FD7300;
|
770 |
-
border-radius: 50%;
|
771 |
-
transition: all .275s;
|
772 |
}
|
773 |
-
.imagify-
|
774 |
position: relative;
|
775 |
-
|
776 |
-
|
777 |
-
|
778 |
-
.imagify-rkt-notice .imagify-cross:hover {
|
779 |
-
background: #FFF;
|
780 |
-
}
|
781 |
-
.imagify-rkt-notice .imagify-cross:hover .dashicons {
|
782 |
-
color: #412355;
|
783 |
}
|
784 |
-
.imagify-
|
785 |
-
|
786 |
-
|
787 |
-
-webkit-flex-shrink: 0;
|
788 |
-
-ms-flex-negative: 0;
|
789 |
-
flex-shrink: 0;
|
790 |
}
|
791 |
-
|
792 |
-
|
793 |
-
|
794 |
-
|
795 |
-
|
|
|
|
|
796 |
}
|
797 |
-
.imagify-
|
798 |
-
|
799 |
-
|
800 |
-
|
801 |
-
|
802 |
-
|
803 |
-
|
804 |
-
width: 150px!important; /* !important because of a dirtugly WP Engine code */
|
805 |
-
padding: 0 15px;
|
806 |
-
}
|
807 |
-
.imagify-rkt-notice .imagify-rkt-coupon-code {
|
808 |
-
padding: 5px 10px;
|
809 |
-
font-size: 23px;
|
810 |
-
font-weight: bold;
|
811 |
-
border: 1px dashed #F7A933;
|
812 |
-
color: #F7A933;
|
813 |
-
}
|
814 |
-
.imagify-rkt-notice .imagify-rkt-cta {
|
815 |
-
width: 250px!important; /* !important because of a dirtugly WP Engine code */
|
816 |
-
-webkit-box-flex: 1;
|
817 |
-
-webkit-flex-grow: 1;
|
818 |
-
-ms-flex-positive: 1;
|
819 |
-
flex-grow: 1;
|
820 |
-
-webkit-flex-basis: 200px;
|
821 |
-
-ms-flex-preferred-size: 200px;
|
822 |
-
flex-basis: 200px;
|
823 |
-
}
|
824 |
-
.imagify-rkt-notice .button.button {
|
825 |
-
position: relative;
|
826 |
-
top: -1px;
|
827 |
-
height: auto;
|
828 |
-
font-weight: 600;
|
829 |
-
font-size: 14px;
|
830 |
-
box-shadow: 0 4px 0 #B27A27;
|
831 |
-
border: 0 none;
|
832 |
-
padding: 9px 18px 9px;
|
833 |
-
background: #F7A933;
|
834 |
-
text-shadow: 1px 1px 1px rgba(0,0,0,.2);
|
835 |
-
}
|
836 |
-
@media (max-width: 880px) {
|
837 |
-
.imagify-rkt-notice {
|
838 |
-
-webkit-flex-wrap: wrap;
|
839 |
-
-ms-flex-wrap: wrap;
|
840 |
-
flex-wrap: wrap;
|
841 |
-
}
|
842 |
-
.imagify-rkt-notice .imagify-rkt-msg,
|
843 |
-
.imagify-rkt-notice .imagify-rkt-cta,
|
844 |
-
.imagify-rkt-notice .imagify-rkt-logo {
|
845 |
-
text-align: left;
|
846 |
-
padding: 5px 15px;
|
847 |
-
}
|
848 |
-
.imagify-cross.imagify-cross {
|
849 |
-
top: 8px;
|
850 |
-
margin-top: 0;
|
851 |
-
}
|
852 |
-
.imagify-rkt-notice .imagify-cross .dashicons {
|
853 |
-
top: 1px;
|
854 |
-
}
|
855 |
-
}
|
856 |
-
|
857 |
-
|
858 |
-
/* Sections */
|
859 |
-
|
860 |
-
.imagify-settings-section {
|
861 |
-
padding: 10px 20px;
|
862 |
-
}
|
863 |
-
[id="imagify-settings"],
|
864 |
-
.imagify-welcome .imagify-settings-section {
|
865 |
-
border: 1px solid #D9D9D9;
|
866 |
-
border-top: 0 none;
|
867 |
-
background: #FFF;
|
868 |
-
}
|
869 |
-
.imagify-br {
|
870 |
-
line-height: 2;
|
871 |
-
}
|
872 |
-
|
873 |
-
|
874 |
-
/* Some colors */
|
875 |
-
.imagify-important {
|
876 |
-
color: #F5A623;
|
877 |
-
}
|
878 |
-
.imagify-info,
|
879 |
-
.imagify-info a {
|
880 |
-
color: #40B1D0;
|
881 |
-
font-size: 12px;
|
882 |
-
}
|
883 |
-
.imagify-info {
|
884 |
-
position: relative;
|
885 |
-
display: inline-block;
|
886 |
-
padding-left: 25px;
|
887 |
-
vertical-align: top;
|
888 |
-
}
|
889 |
-
.imagify-info .dashicons {
|
890 |
-
position: absolute;
|
891 |
-
left: 0; top: -1px;
|
892 |
-
}
|
893 |
-
label + .imagify-info,
|
894 |
-
label + .imagify-options-line,
|
895 |
-
.imagify-visual-label {
|
896 |
-
display: inline-block;
|
897 |
-
max-width: 70%;
|
898 |
-
margin-left: 15px;
|
899 |
-
margin-top: 2px!important;
|
900 |
-
-webkit-transition: opacity .3s;
|
901 |
-
transition: opacity .3s;
|
902 |
-
}
|
903 |
-
.imagify-visual-label {
|
904 |
-
vertical-align: -5px;
|
905 |
-
}
|
906 |
-
label[for="imagify_sizes_full"] + .imagify-info {
|
907 |
-
vertical-align: middle;
|
908 |
-
}
|
909 |
-
|
910 |
-
.imagify-settings.imagify-settings [type="checkbox"]:not(:checked) + label + .imagify-options-line,
|
911 |
-
.imagify-settings.imagify-settings [type="checkbox"]:not(:checked) + label .imagify-visual-label {
|
912 |
-
opacity: .5;
|
913 |
-
}
|
914 |
-
.imagify-settings.imagify-settings [type="checkbox"]:checked + label + .imagify-options-line,
|
915 |
-
.imagify-settings.imagify-settings [type="checkbox"]:checked + label .imagify-visual-label {
|
916 |
-
opacity: 1;
|
917 |
-
}
|
918 |
-
|
919 |
-
.imagify-checkbox-marged {
|
920 |
-
max-width: 500px;
|
921 |
-
margin-left: 45px;
|
922 |
-
}
|
923 |
-
|
924 |
-
|
925 |
-
|
926 |
-
/* Custom checkboxes in CSS */
|
927 |
-
|
928 |
-
.imagify-settings.imagify-settings [type="checkbox"]:not(:checked),
|
929 |
-
.imagify-settings.imagify-settings [type="checkbox"]:checked,
|
930 |
-
.imagify-checkbox.imagify-checkbox:not(:checked),
|
931 |
-
.imagify-checkbox.imagify-checkbox:checked {
|
932 |
-
opacity: 0.01;
|
933 |
-
}
|
934 |
-
.imagify-settings.imagify-settings [type="checkbox"]:not(:checked):focus,
|
935 |
-
.imagify-settings.imagify-settings [type="checkbox"]:checked:focus,
|
936 |
-
.imagify-checkbox.imagify-checkbox:not(:checked):focus,
|
937 |
-
.imagify-checkbox.imagify-checkbox:checked:focus {
|
938 |
-
box-shadow: none!important; /* system value to override */
|
939 |
-
outline: none!important;
|
940 |
-
border: 0 none!important;
|
941 |
}
|
942 |
|
943 |
.imagify-settings [type="checkbox"]:not(:checked) + label,
|
@@ -1003,9 +568,6 @@ label[for="imagify_sizes_full"] + .imagify-info {
|
|
1003 |
-ms-transform: scale(1);
|
1004 |
transform: scale(1);
|
1005 |
}
|
1006 |
-
input[id^="imagify_sizes_"]:checked + label {
|
1007 |
-
font-weight: bold;
|
1008 |
-
}
|
1009 |
|
1010 |
/* medium version */
|
1011 |
.medium.imagify-checkbox:not(:checked) + label:before,
|
@@ -1040,7 +602,7 @@ input[id^="imagify_sizes_"]:checked + label {
|
|
1040 |
.mini.imagify-checkbox:checked + label:after {
|
1041 |
font-size: .9em;
|
1042 |
left: -21px;
|
1043 |
-
top:
|
1044 |
}
|
1045 |
/* focus aspect */
|
1046 |
.imagify-settings [type="checkbox"]:not(:checked):focus + label:before,
|
@@ -1059,18 +621,14 @@ input[id^="imagify_sizes_"]:checked + label {
|
|
1059 |
max-width: 600px;
|
1060 |
border-collapse: collapse;
|
1061 |
}
|
1062 |
-
|
1063 |
-
width: 300px;
|
1064 |
-
margin: 1em auto .5em;
|
1065 |
-
background: #338EA6;
|
1066 |
-
border-radius: 4px;
|
1067 |
-
}
|
1068 |
.imagify-inline-options input[type="radio"]:not(:checked),
|
1069 |
.imagify-inline-options input[type="radio"]:checked {
|
1070 |
position: absolute;
|
1071 |
left: 5px; top: 5px;
|
1072 |
display: none;
|
1073 |
}
|
|
|
1074 |
.imagify-inline-options input[type="radio"]:not(:checked) + label,
|
1075 |
.imagify-inline-options input[type="radio"]:checked + label {
|
1076 |
position: relative;
|
@@ -1090,22 +648,12 @@ input[id^="imagify_sizes_"]:checked + label {
|
|
1090 |
-webkit-transition: all .275s;
|
1091 |
transition: all .275s;
|
1092 |
}
|
1093 |
-
|
1094 |
-
.imagify-small-options input[type="radio"]:checked + label {
|
1095 |
-
padding: 8px 10px;
|
1096 |
-
font-size: 13px;
|
1097 |
-
color: #FFF;
|
1098 |
-
box-shadow: none;
|
1099 |
-
border-left: 0;
|
1100 |
-
}
|
1101 |
-
.imagify-bulk-submit .imagify-inline-options input[type="radio"]:not(:checked) + label,
|
1102 |
-
.imagify-bulk-submit .imagify-inline-options input[type="radio"]:checked + label {
|
1103 |
-
margin-bottom: 1.75em;
|
1104 |
-
}
|
1105 |
.imagify-inline-options input[type="radio"]:not(:checked) + label:first-of-type,
|
1106 |
.imagify-inline-options input[type="radio"]:checked + label:first-of-type {
|
1107 |
border-radius: 3px 0 0 3px;
|
1108 |
}
|
|
|
1109 |
.imagify-inline-options input[type="radio"]:not(:checked) + label:last-of-type,
|
1110 |
.imagify-inline-options input[type="radio"]:checked + label:last-of-type {
|
1111 |
border-radius: 0 3px 3px 0;
|
@@ -1115,206 +663,13 @@ input[id^="imagify_sizes_"]:checked + label {
|
|
1115 |
background: #8BC34A
|
1116 |
}
|
1117 |
|
1118 |
-
.imagify-small-options input[type="radio"]:not(:checked) + label {
|
1119 |
-
background: #338EA6;
|
1120 |
-
color: rgba(255, 255, 255, .4);
|
1121 |
-
}
|
1122 |
-
.imagify-small-options input[type="radio"]:checked + label {
|
1123 |
-
background: #40B1D0;
|
1124 |
-
}
|
1125 |
-
|
1126 |
.imagify-inline-options .imagify-info {
|
1127 |
margin-top: 15px;
|
1128 |
}
|
1129 |
-
.imagify-btn-info {
|
1130 |
-
display: block;
|
1131 |
-
font-size: 0.7em;
|
1132 |
-
letter-spacing: 0;
|
1133 |
-
line-height: 1;
|
1134 |
-
text-transform: none;
|
1135 |
-
}
|
1136 |
-
|
1137 |
-
/* Some inputs */
|
1138 |
-
#describe-resize-larger input {
|
1139 |
-
width: 5em;
|
1140 |
-
}
|
1141 |
-
|
1142 |
-
/* Ads & columns */
|
1143 |
-
.imagify-cols:after {
|
1144 |
-
content: "";
|
1145 |
-
display: table;
|
1146 |
-
clear: both;
|
1147 |
-
}
|
1148 |
-
.imagify-col {
|
1149 |
-
float: left;
|
1150 |
-
width: 50%;
|
1151 |
-
}
|
1152 |
-
.imagify-main {
|
1153 |
-
float: left;
|
1154 |
-
width: 70%;
|
1155 |
-
}
|
1156 |
-
.imagify-sidebar {
|
1157 |
-
float: right;
|
1158 |
-
width: 28%;
|
1159 |
-
max-width: 300px;
|
1160 |
-
}
|
1161 |
-
.imagify-sidebar-section {
|
1162 |
-
border: 1px solid #BBB;
|
1163 |
-
background: #FFF;
|
1164 |
-
}
|
1165 |
-
.imagify-sidebar-section + .imagify-sidebar-section {
|
1166 |
-
margin-top: 2em;
|
1167 |
-
}
|
1168 |
-
@media (max-width: 820px) {
|
1169 |
-
.imagify-settings {
|
1170 |
-
display: -webkit-box;
|
1171 |
-
display: -ms-flexbox;
|
1172 |
-
display: flex;
|
1173 |
-
-webkit-box-orient: vertical;
|
1174 |
-
-webkit-box-direction: normal;
|
1175 |
-
-ms-flex-direction: column;
|
1176 |
-
flex-direction: column;
|
1177 |
-
}
|
1178 |
-
.imagify-main {
|
1179 |
-
width: auto;
|
1180 |
-
float: none;
|
1181 |
-
}
|
1182 |
-
.imagify-sidebar {
|
1183 |
-
order: 2;
|
1184 |
-
float: none;
|
1185 |
-
width: auto;
|
1186 |
-
max-width: none;
|
1187 |
-
margin-left: 0;
|
1188 |
-
margin-top: 25px;
|
1189 |
-
}
|
1190 |
-
.wp-media-products {
|
1191 |
-
text-align: center;
|
1192 |
-
}
|
1193 |
-
.wp-media-products li {
|
1194 |
-
display: inline-block;
|
1195 |
-
width: 100%;
|
1196 |
-
max-width: 276px;
|
1197 |
-
}
|
1198 |
-
}
|
1199 |
-
@media (min-width: 1400px) {
|
1200 |
-
.imagify-main {
|
1201 |
-
width: 74%;
|
1202 |
-
}
|
1203 |
-
}
|
1204 |
-
.imagify-sidebar-title {
|
1205 |
-
display: block;
|
1206 |
-
padding: 20px 15px;
|
1207 |
-
border-bottom: 1px solid #BBB;
|
1208 |
-
font-size: 14px;
|
1209 |
-
font-weight: bold;
|
1210 |
-
color: #23282d;
|
1211 |
-
background: #F2F5F7;
|
1212 |
-
}
|
1213 |
-
.imagify-sidebar-title img {
|
1214 |
-
vertical-align: top;
|
1215 |
-
margin-right: 5px;
|
1216 |
-
}
|
1217 |
-
.imagify-sidebar .wp-media-products {
|
1218 |
-
margin-top: 0;
|
1219 |
-
margin-bottom: -.5em;
|
1220 |
-
}
|
1221 |
-
.imagify-sidebar .wp-media-products .links {
|
1222 |
-
display: block;
|
1223 |
-
padding: 85px 25px 24px;
|
1224 |
-
text-align: center;
|
1225 |
-
background-color: #2E3243;
|
1226 |
-
background-size: contain;
|
1227 |
-
background-repeat: no-repeat;
|
1228 |
-
background-position: 50% 0;
|
1229 |
-
text-decoration: none;
|
1230 |
-
}
|
1231 |
-
.imagify-sidebar .wp-media-products .links p {
|
1232 |
-
margin: 1.5em auto;
|
1233 |
-
color: #FFF;
|
1234 |
-
}
|
1235 |
-
.imagify-sidebar .wp-media-products .wprocket-link {
|
1236 |
-
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");
|
1237 |
-
background-color: #3B1E4E;
|
1238 |
-
background-repeat: repeat-x, no-repeat;
|
1239 |
-
}
|
1240 |
-
|
1241 |
-
.imagify-sidebar-content {
|
1242 |
-
padding: 10px 20px;
|
1243 |
-
}
|
1244 |
-
|
1245 |
-
.imagify-mark-styled {
|
1246 |
-
display: inline-block;
|
1247 |
-
padding: 1px 2px 1px 4px;
|
1248 |
-
line-height: 1.3;
|
1249 |
-
font-weight: bold;
|
1250 |
-
background: #F7A933;
|
1251 |
-
transform-origin: 50% 50%;
|
1252 |
-
transform: rotateZ(-2deg) rotateX(-10deg) skewX(-2deg) skewY(-3deg);
|
1253 |
-
text-shadow: 1px 1px 0 rgba(0,0,0,0.2);
|
1254 |
-
}
|
1255 |
-
.imagify-mark-styled span {
|
1256 |
-
display: inline-block;
|
1257 |
-
transform: rotateZ(2deg) rotateX(10deg) skewX(2deg) skewY(3deg);
|
1258 |
-
}
|
1259 |
-
|
1260 |
-
.imagify-discount-code {
|
1261 |
-
margin: 0.35em 0 .5em;
|
1262 |
-
display: block;
|
1263 |
-
font-size: 2em;
|
1264 |
-
letter-spacing: .05em;
|
1265 |
-
font-weight: bold;
|
1266 |
-
text-align: center;
|
1267 |
-
text-shadow: 1px 1px 0 rgba(0,0,0,0.2);
|
1268 |
-
}
|
1269 |
-
.imagify-big-text {
|
1270 |
-
font-size: 15px;
|
1271 |
-
font-weight: bold;
|
1272 |
-
}
|
1273 |
-
.imagify-big-text strong {
|
1274 |
-
font-size: 20px;
|
1275 |
-
}
|
1276 |
-
a.btn-rocket {
|
1277 |
-
display: block;
|
1278 |
-
font-size: 1.15em;
|
1279 |
-
padding: 12px;
|
1280 |
-
background: #F7A933;
|
1281 |
-
box-shadow: 0 3px 0 #D69626;
|
1282 |
-
border-radius: 3px;
|
1283 |
-
color: #FFF;
|
1284 |
-
text-transform: uppercase;
|
1285 |
-
font-weight: bold;
|
1286 |
-
text-shadow: 1px 1px 0 rgba(0,0,0,0.2);
|
1287 |
-
text-decoration: none;
|
1288 |
-
}
|
1289 |
-
a.btn-rocket:hover,
|
1290 |
-
a.btn-rocket:focus {
|
1291 |
-
background: darkorange;
|
1292 |
-
box-shadow: 0 3px 0 darkorange;
|
1293 |
-
}
|
1294 |
-
|
1295 |
|
1296 |
/**
|
1297 |
-
* ==
|
1298 |
*/
|
1299 |
-
|
1300 |
-
.imagify-welcome {
|
1301 |
-
margin: 30px 20px 0 0;
|
1302 |
-
}
|
1303 |
-
.imagify-welcome .baseline {
|
1304 |
-
display: inline-block;
|
1305 |
-
margin: .2em 0 0 2em;
|
1306 |
-
font-size: 17px;
|
1307 |
-
}
|
1308 |
-
.imagify-welcome .imagify-logo {
|
1309 |
-
vertical-align: middle;
|
1310 |
-
}
|
1311 |
-
.imagify-welcome-remove {
|
1312 |
-
position: absolute;
|
1313 |
-
top: 50%; right: 15px;
|
1314 |
-
margin-top: -8px;
|
1315 |
-
color: #FFF;
|
1316 |
-
text-decoration: none;
|
1317 |
-
}
|
1318 |
.imagify-columns {
|
1319 |
overflow: hidden;
|
1320 |
padding: 15px 0;
|
@@ -1338,16 +693,7 @@ a.btn-rocket:focus {
|
|
1338 |
width: 50%;
|
1339 |
padding: 0 20px;
|
1340 |
}
|
1341 |
-
|
1342 |
-
padding-left: 20px;
|
1343 |
-
}
|
1344 |
-
.imagify-columns .col-informations {
|
1345 |
-
width: 36.6%;
|
1346 |
-
padding-right: 30px;
|
1347 |
-
}
|
1348 |
-
.imagify-columns .col-statistics {
|
1349 |
-
width: 30%;
|
1350 |
-
}
|
1351 |
@media (max-width: 830px) {
|
1352 |
.imagify-columns [class^="col-"] {
|
1353 |
float: none;
|
@@ -1361,103 +707,6 @@ a.btn-rocket:focus {
|
|
1361 |
padding-top: 1em;
|
1362 |
}
|
1363 |
}
|
1364 |
-
.imagify-columns [class^="col-"] img {
|
1365 |
-
float: left;
|
1366 |
-
margin-right: 18px;
|
1367 |
-
}
|
1368 |
-
.imagify-col-content {
|
1369 |
-
overflow: hidden;
|
1370 |
-
}
|
1371 |
-
.imagify-col-title {
|
1372 |
-
margin: 0 0 15px 0;
|
1373 |
-
font-size: 23px;
|
1374 |
-
}
|
1375 |
-
.counter .imagify-col-title:before {
|
1376 |
-
counter-increment: cols;
|
1377 |
-
content: counter(cols) ". ";
|
1378 |
-
color: #40B1D0;
|
1379 |
-
}
|
1380 |
-
.imagify-col-desc {
|
1381 |
-
color: #5F758E;
|
1382 |
-
margin-bottom: 2em;
|
1383 |
-
}
|
1384 |
-
|
1385 |
-
|
1386 |
-
/**
|
1387 |
-
* == Imagify Notices
|
1388 |
-
*/
|
1389 |
-
.imagify-notice.imagify-notice {
|
1390 |
-
position: relative;
|
1391 |
-
display: -webkit-box;
|
1392 |
-
display: -webkit-flex;
|
1393 |
-
display: -ms-flexbox;
|
1394 |
-
display: flex;
|
1395 |
-
padding: 0;
|
1396 |
-
margin: 10px 20px 10px 2px;
|
1397 |
-
border: 0 none;
|
1398 |
-
background: #2E3243;
|
1399 |
-
box-shadow: none;
|
1400 |
-
color: #FFF;
|
1401 |
-
}
|
1402 |
-
@media (max-width:782px) {
|
1403 |
-
.imagify-notice.imagify-notice,
|
1404 |
-
.imagify-welcome {
|
1405 |
-
margin-right: 12px;
|
1406 |
-
}
|
1407 |
-
}
|
1408 |
-
@media (max-width: 450px) {
|
1409 |
-
.imagify-notice.imagify-notice {
|
1410 |
-
-webkit-box-orient: vertical;
|
1411 |
-
-webkit-box-direction: normal;
|
1412 |
-
-webkit-flex-direction: column;
|
1413 |
-
-ms-flex-direction: column;
|
1414 |
-
flex-direction: column;
|
1415 |
-
}
|
1416 |
-
}
|
1417 |
-
.wrap .imagify-notice {
|
1418 |
-
margin: 5px 15px 2px;
|
1419 |
-
position: relative;
|
1420 |
-
}
|
1421 |
-
.imagify-notice-logo {
|
1422 |
-
padding: 18px 23px;
|
1423 |
-
background: #40B1D0;
|
1424 |
-
}
|
1425 |
-
.updated .imagify-notice-logo {
|
1426 |
-
background: #8BC34A;
|
1427 |
-
}
|
1428 |
-
.error .imagify-notice-logo {
|
1429 |
-
background: #D0021B;
|
1430 |
-
}
|
1431 |
-
|
1432 |
-
.imagify-popin-message {
|
1433 |
-
padding: 5px 15px;
|
1434 |
-
text-align: left;
|
1435 |
-
}
|
1436 |
-
.imagify-popin-message.imagify-error p {
|
1437 |
-
color: #FFF;
|
1438 |
-
}
|
1439 |
-
|
1440 |
-
.imagify-notice-title {
|
1441 |
-
font-size: 15px;
|
1442 |
-
}
|
1443 |
-
|
1444 |
-
.imagify-notice-content {
|
1445 |
-
padding: 5px 23px;
|
1446 |
-
}
|
1447 |
-
.imagify-notice-content.imagify-notice-content p {
|
1448 |
-
margin: 0.65em 0;
|
1449 |
-
}
|
1450 |
-
.imagify-notice a {
|
1451 |
-
color: #40B1D0;
|
1452 |
-
}
|
1453 |
-
.imagify-notice a:hover,
|
1454 |
-
.imagify-notice a:focus {
|
1455 |
-
color: #FEE102;
|
1456 |
-
}
|
1457 |
-
|
1458 |
-
.imagify-notice code {
|
1459 |
-
background: rgba(0, 0, 0, 0.4) none repeat scroll 0 0;
|
1460 |
-
}
|
1461 |
|
1462 |
/**
|
1463 |
* == Custom column & Metabox
|
@@ -1471,11 +720,6 @@ a.btn-rocket:focus {
|
|
1471 |
max-width: 235px;
|
1472 |
margin: 0 auto;
|
1473 |
}
|
1474 |
-
ul.imagify-datas-list.imagify-datas-list {
|
1475 |
-
margin: 0 auto;
|
1476 |
-
color: #555;
|
1477 |
-
font-size: 10px;
|
1478 |
-
}
|
1479 |
@media (min-width: 1151px) and (max-width: 1800px) {
|
1480 |
.column-imagify_optimized_file.column-imagify_optimized_file {
|
1481 |
width: 235px;
|
@@ -1523,6 +767,11 @@ ul.imagify-datas-list.imagify-datas-list {
|
|
1523 |
margin-top: 7px;
|
1524 |
font-size: 11px;
|
1525 |
}
|
|
|
|
|
|
|
|
|
|
|
1526 |
ul.imagify-datas-list .big {
|
1527 |
font-size: 12px;
|
1528 |
color: #40B1D0;
|
@@ -1558,19 +807,18 @@ ul.imagify-datas-list .imagify-data-item span.data {
|
|
1558 |
text-align: left;
|
1559 |
font-weight: bold;
|
1560 |
}
|
1561 |
-
.media-sidebar .imagify-datas-list .imagify-data-item .data {
|
1562 |
-
width: auto;
|
1563 |
-
float: none;
|
1564 |
-
}
|
1565 |
ul.imagify-datas-list .imagify-data-item strong {
|
1566 |
text-align: left;
|
1567 |
padding-left: 5px;
|
1568 |
}
|
|
|
|
|
|
|
|
|
1569 |
.media-sidebar .imagify-datas-list .imagify-data-item strong {
|
1570 |
width: auto;
|
1571 |
float: none;
|
1572 |
}
|
1573 |
-
|
1574 |
.imagify-datas-more-action.imagify-datas-more-action {
|
1575 |
margin: .4em auto;
|
1576 |
background: linear-gradient(to bottom, transparent, transparent 49%, rgba(0,0,0,.075) 50%, rgba(0,0,0,.075) 58%, transparent 58%, transparent);
|
@@ -1624,6 +872,13 @@ ul.imagify-datas-details.imagify-datas-details {
|
|
1624 |
padding-top: 5px;
|
1625 |
font-size: 8px;
|
1626 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1627 |
.imagify-datas-actions-links a {
|
1628 |
position: relative;
|
1629 |
display: inline-block;
|
@@ -1638,6 +893,12 @@ ul.imagify-datas-details.imagify-datas-details {
|
|
1638 |
border-top: 2px solid #f2f2f2;
|
1639 |
padding-bottom: 5px;
|
1640 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
1641 |
/* Media edition */
|
1642 |
.compat-field-imagify .imagify-datas-actions-links a,
|
1643 |
.misc-pub-imagify .imagify-datas-actions-links a {
|
@@ -1651,11 +912,6 @@ ul.imagify-datas-details.imagify-datas-details {
|
|
1651 |
width: auto;
|
1652 |
float: none;
|
1653 |
}
|
1654 |
-
/* Medias list */
|
1655 |
-
.column-imagify_optimized_file .imagify-datas-actions-links a {
|
1656 |
-
margin: 0 .7em;
|
1657 |
-
padding-left: 15px;
|
1658 |
-
}
|
1659 |
.imagify-datas-actions-links a:only-child {
|
1660 |
float: none;
|
1661 |
width: auto;
|
@@ -1675,62 +931,10 @@ ul.imagify-datas-details.imagify-datas-details {
|
|
1675 |
* == Bulk page
|
1676 |
*/
|
1677 |
|
1678 |
-
.imagify-title > h1 {
|
1679 |
-
padding: 0;
|
1680 |
-
}
|
1681 |
-
.imagify-title-right {
|
1682 |
-
display: table;
|
1683 |
-
float: right;
|
1684 |
-
margin-top: -10px;
|
1685 |
-
}
|
1686 |
-
.imagify-title-right p {
|
1687 |
-
margin: 0;
|
1688 |
-
}
|
1689 |
-
.imagify-title-right a {
|
1690 |
-
font-weight: bold;
|
1691 |
-
text-decoration: none;
|
1692 |
-
}
|
1693 |
-
.imagify-title-right > div {
|
1694 |
-
display: table-cell;
|
1695 |
-
vertical-align: middle;
|
1696 |
-
}
|
1697 |
-
.imagify-title-right .dashicons-arrow-down-alt2 {
|
1698 |
-
vertical-align: -4px;
|
1699 |
-
margin-left: 2px;
|
1700 |
-
}
|
1701 |
-
@media (max-width: 1200px) {
|
1702 |
-
.imagify-bulk .imagify-title {
|
1703 |
-
display: -webkit-box;
|
1704 |
-
display: -webkit-flex;
|
1705 |
-
display: -ms-flexbox;
|
1706 |
-
display: flex;
|
1707 |
-
-webkit-box-orient: vertical;
|
1708 |
-
-webkit-box-direction: normal;
|
1709 |
-
-webkit-flex-direction: column;
|
1710 |
-
-ms-flex-direction: column;
|
1711 |
-
flex-direction: column;
|
1712 |
-
}
|
1713 |
-
.imagify-title-right {
|
1714 |
-
-webkit-box-ordinal-group: 3;
|
1715 |
-
-webkit-order: 2;
|
1716 |
-
-ms-flex-order: 2;
|
1717 |
-
order: 2;
|
1718 |
-
margin-top: 20px;
|
1719 |
-
}
|
1720 |
-
}
|
1721 |
.imagify-account,
|
1722 |
.imagify-account-link {
|
1723 |
padding-right: 15px;
|
1724 |
}
|
1725 |
-
.imagify-sep-v {
|
1726 |
-
width: 1px;
|
1727 |
-
background: rgba(255, 255, 255, .2);
|
1728 |
-
}
|
1729 |
-
.imagify-credit-left {
|
1730 |
-
position: relative;
|
1731 |
-
min-width: 280px;
|
1732 |
-
padding-left: 15px;
|
1733 |
-
}
|
1734 |
.imagify-meteo-icon {
|
1735 |
display: inline-block;
|
1736 |
height: 38px;
|
@@ -1741,45 +945,6 @@ ul.imagify-datas-details.imagify-datas-details {
|
|
1741 |
color: #40b1d0;
|
1742 |
}
|
1743 |
|
1744 |
-
@media (max-width: 630px) {
|
1745 |
-
.imagify-title-right {
|
1746 |
-
display: block;
|
1747 |
-
width: auto;
|
1748 |
-
}
|
1749 |
-
.imagify-title-right > div {
|
1750 |
-
display: block;
|
1751 |
-
width: auto;
|
1752 |
-
margin-top: 10px;
|
1753 |
-
max-width: 100%;
|
1754 |
-
}
|
1755 |
-
.imagify-credit-left {
|
1756 |
-
padding-left: 0;
|
1757 |
-
}
|
1758 |
-
}
|
1759 |
-
/*
|
1760 |
-
.imagify-meteo-icon:after {
|
1761 |
-
opacity: 0;
|
1762 |
-
visibility: hidden;
|
1763 |
-
content: attr(data-title);
|
1764 |
-
position: absolute;
|
1765 |
-
top: 100%;
|
1766 |
-
left: 50%;
|
1767 |
-
font-size: 11px;
|
1768 |
-
line-height: 1.3;
|
1769 |
-
width: 150px;
|
1770 |
-
margin-left: -80px;
|
1771 |
-
padding: 6px 12px;
|
1772 |
-
background: #60758d;
|
1773 |
-
border-radius: 4px;
|
1774 |
-
-webkit-transition: opacity .3s;
|
1775 |
-
transition: opacity .3s;
|
1776 |
-
}
|
1777 |
-
.imagify-meteo-icon:hover:after,
|
1778 |
-
.imagify-meteo-icon:focus:after {
|
1779 |
-
opacity: 1;
|
1780 |
-
visibility: visible;
|
1781 |
-
}
|
1782 |
-
*/
|
1783 |
.imagify-meteo-title.imagify-meteo-title {
|
1784 |
color: #FFF;
|
1785 |
font-size: 17px;
|
@@ -1793,8 +958,7 @@ ul.imagify-datas-details.imagify-datas-details {
|
|
1793 |
.imagify-space-left > p {
|
1794 |
color: #FFF;
|
1795 |
}
|
1796 |
-
[class^="imagify-bar-"]
|
1797 |
-
#wp-admin-bar-imagify-profile [class^="imagify-bar-"] {
|
1798 |
position: relative;
|
1799 |
height: 1.5em;
|
1800 |
width: 100%;
|
@@ -1802,31 +966,8 @@ ul.imagify-datas-details.imagify-datas-details {
|
|
1802 |
color: #FFF;
|
1803 |
font-size: 10px;
|
1804 |
}
|
1805 |
-
|
1806 |
-
|
1807 |
-
}
|
1808 |
-
[class^="imagify-bar-"].right-outside-number {
|
1809 |
-
-webkit-box-sizing: border-box;
|
1810 |
-
box-sizing: border-box;
|
1811 |
-
padding-right: 4.5em;
|
1812 |
-
}
|
1813 |
-
.right-outside-number .imagify-barnb {
|
1814 |
-
display: block;
|
1815 |
-
margin-right: -4.5em;
|
1816 |
-
text-align: right;
|
1817 |
-
font-weight: bold;
|
1818 |
-
line-height: 1.5;
|
1819 |
-
}
|
1820 |
-
.imagify-progress-value,
|
1821 |
-
#wp-admin-bar-imagify-profile .imagify-progress-value {
|
1822 |
-
position: absolute;
|
1823 |
-
top: 0; right: 0; left: 0; bottom: 0;
|
1824 |
-
text-align: center;
|
1825 |
-
line-height: 13px;
|
1826 |
-
font-weight: bold;
|
1827 |
-
}
|
1828 |
-
.imagify-progress,
|
1829 |
-
#wp-admin-bar-imagify-profile .imagify-progress {
|
1830 |
height: 1.5em;
|
1831 |
}
|
1832 |
.imagify-progress {
|
@@ -1851,94 +992,7 @@ ul.imagify-datas-details.imagify-datas-details {
|
|
1851 |
background: #D0021B;
|
1852 |
}
|
1853 |
|
1854 |
-
|
1855 |
-
#wpadminbar #wp-admin-bar-imagify-profile * {
|
1856 |
-
line-height: 1.5;
|
1857 |
-
white-space: initial;
|
1858 |
-
}
|
1859 |
-
#wpadminbar #wp-admin-bar-imagify .ab-submenu {
|
1860 |
-
padding-bottom: 0;
|
1861 |
-
}
|
1862 |
-
#wpadminbar #wp-admin-bar-imagify-profile .ab-item {
|
1863 |
-
height: auto;
|
1864 |
-
padding: 0 13px;
|
1865 |
-
}
|
1866 |
-
#wpadminbar #wp-admin-bar-imagify-profile {
|
1867 |
-
min-width: 200px;
|
1868 |
-
padding: 15px 0 10px;
|
1869 |
-
margin-top: 0.7em;
|
1870 |
-
background: #222;
|
1871 |
-
}
|
1872 |
-
#wp-admin-bar-imagify .dashicons {
|
1873 |
-
font-family: "dashicons";
|
1874 |
-
font-size: 18px;
|
1875 |
-
vertical-align: middle;
|
1876 |
-
margin: 0 5px 0 0;
|
1877 |
-
}
|
1878 |
-
#wp-admin-bar-imagify .button-text {
|
1879 |
-
display: inline-block;
|
1880 |
-
vertical-align: middle;
|
1881 |
-
}
|
1882 |
-
#wp-admin-bar-imagify .imagify-abq-row {
|
1883 |
-
display: table;
|
1884 |
-
width: 100%;
|
1885 |
-
}
|
1886 |
-
#wp-admin-bar-imagify .imagify-abq-row + .imagify-abq-row {
|
1887 |
-
margin-top: .75em;
|
1888 |
-
}
|
1889 |
-
#wp-admin-bar-imagify .imagify-abq-row > * {
|
1890 |
-
display: table-cell;
|
1891 |
-
}
|
1892 |
-
#wp-admin-bar-imagify-profile .imagify-meteo-icon {
|
1893 |
-
padding-right: 7px;
|
1894 |
-
}
|
1895 |
-
#wp-admin-bar-imagify-profile .imagify-meteo-icon img {
|
1896 |
-
width: 37px;
|
1897 |
-
}
|
1898 |
-
#wp-admin-bar-imagify-profile .imagify-meteo-title {
|
1899 |
-
font-size: 17px;
|
1900 |
-
}
|
1901 |
-
#wp-admin-bar-imagify-profile .imagify-meteo-subs {
|
1902 |
-
color: #72889F;
|
1903 |
-
}
|
1904 |
-
#wpadminbar #wp-admin-bar-imagify-profile strong {
|
1905 |
-
font-weight: bold;
|
1906 |
-
}
|
1907 |
-
#wpadminbar #wp-admin-bar-imagify-profile .imagify-user-plan,
|
1908 |
-
#wpadminbar #wp-admin-bar-imagify-profile a {
|
1909 |
-
padding: 0;
|
1910 |
-
color: #40B1D0;
|
1911 |
-
}
|
1912 |
-
#wpadminbar #wp-admin-bar-imagify-profile .imagify-account-link {
|
1913 |
-
display: table;
|
1914 |
-
}
|
1915 |
-
#wpadminbar #wp-admin-bar-imagify-profile .imagify-account-link > * {
|
1916 |
-
display: table-cell;
|
1917 |
-
}
|
1918 |
-
#wpadminbar #wp-admin-bar-imagify-profile .imagify-space-left {
|
1919 |
-
max-width: 210px;
|
1920 |
-
min-width: 210px;
|
1921 |
-
width: 210px;
|
1922 |
-
}
|
1923 |
-
#wpadminbar #wp-admin-bar-imagify-profile .imagify-space-left p {
|
1924 |
-
font-size: 12px;
|
1925 |
-
}
|
1926 |
-
#wp-admin-bar-imagify-profile .imagify-error,
|
1927 |
-
#wp-admin-bar-imagify-profile .imagify-warning {
|
1928 |
-
padding: 10px;
|
1929 |
-
margin: 0 -13px -13px;
|
1930 |
-
}
|
1931 |
-
#wp-admin-bar-imagify-profile .imagify-error p + p,
|
1932 |
-
#wp-admin-bar-imagify-profile .imagify-warning p + p {
|
1933 |
-
margin-top: .5em;
|
1934 |
-
}
|
1935 |
-
#wp-admin-bar-imagify-profile .imagify-error p + p + p,
|
1936 |
-
#wp-admin-bar-imagify-profile .imagify-warning p + p + p {
|
1937 |
-
margin-top: 1em;
|
1938 |
-
}
|
1939 |
-
|
1940 |
-
.btn-ghost,
|
1941 |
-
#wpadminbar #wp-admin-bar-imagify-profile .btn-ghost {
|
1942 |
display: inline-block;
|
1943 |
height: auto;
|
1944 |
padding: 7px 10px;
|
@@ -1950,1892 +1004,138 @@ ul.imagify-datas-details.imagify-datas-details {
|
|
1950 |
transition: all .275s;
|
1951 |
}
|
1952 |
|
1953 |
-
.btn-ghost:hover,
|
1954 |
-
.btn-ghost:focus
|
1955 |
-
#wpadminbar #wp-admin-bar-imagify-profile .btn-ghost:hover,
|
1956 |
-
#wpadminbar #wp-admin-bar-imagify-profile .btn-ghost:focus {
|
1957 |
background: #FFF;
|
1958 |
color: #888;
|
1959 |
}
|
1960 |
-
|
1961 |
-
|
1962 |
-
|
1963 |
-
|
1964 |
-
.imagify-list-infos li,
|
1965 |
-
.imagify-info-block {
|
1966 |
-
position: relative;
|
1967 |
-
padding: 10px;
|
1968 |
-
padding-left: 42px;
|
1969 |
-
background: #D9E4EB;
|
1970 |
-
border-radius: 4px;
|
1971 |
-
line-height: 1.6;
|
1972 |
-
}
|
1973 |
-
.imagify-list-infos .imagify-alt.imagify-alt {
|
1974 |
-
background: #8BA7B5;
|
1975 |
color: #FFF;
|
1976 |
-
font-weight: bold;
|
1977 |
-
}
|
1978 |
-
.imagify-list-infos li + li {
|
1979 |
-
margin-top: 1em;
|
1980 |
-
}
|
1981 |
-
.imagify-list-infos li:before,
|
1982 |
-
.imagify-info-block:before {
|
1983 |
-
content: "";
|
1984 |
-
position: absolute;
|
1985 |
-
left: 13px; top: 14px;
|
1986 |
-
height: 16px; width: 16px;
|
1987 |
-
border: 1px solid #46b1ce;
|
1988 |
-
border-radius: 10px;
|
1989 |
-
}
|
1990 |
-
.imagify-list-infos li:after,
|
1991 |
-
.imagify-info-block:after {
|
1992 |
-
content: "i";
|
1993 |
-
position: absolute;
|
1994 |
-
left: 20px; top: 13px;
|
1995 |
-
font-style: italic;
|
1996 |
-
color: #46b1ce;
|
1997 |
-
}
|
1998 |
-
.imagify-cell .imagify-info-block {
|
1999 |
-
padding-top: 0;
|
2000 |
-
}
|
2001 |
-
.imagify-cell .imagify-info-block:after {
|
2002 |
-
top: 6px;
|
2003 |
-
}
|
2004 |
-
.imagify-cell .imagify-info-block:before {
|
2005 |
-
top: 7px;
|
2006 |
-
}
|
2007 |
-
.imagify-list-infos .imagify-alt:before,
|
2008 |
-
.imagify-list-infos .imagify-alt:after {
|
2009 |
-
color: #fff;
|
2010 |
-
border-color: #fff;
|
2011 |
-
}
|
2012 |
-
.imagify-sub-title.imagify-sub-title {
|
2013 |
-
font-size: 23px;
|
2014 |
-
background: #FFF;
|
2015 |
-
color: #2E3243;
|
2016 |
-
border-left: 1px solid #D9D9D9;
|
2017 |
-
border-right: 1px solid #D9D9D9;
|
2018 |
-
font-weight: lighter;
|
2019 |
-
}
|
2020 |
-
.imagify-sub-title .icon-bulk {
|
2021 |
-
margin-right: 10px;
|
2022 |
-
vertical-align: middle;
|
2023 |
}
|
2024 |
-
.imagify-
|
2025 |
display: inline-block;
|
2026 |
-
|
2027 |
-
|
|
|
2028 |
}
|
2029 |
-
.imagify-
|
2030 |
-
|
2031 |
-
border-top: 0;
|
2032 |
-
background: #F2F5F7;
|
2033 |
-
color: #4A4A4A;
|
2034 |
}
|
2035 |
-
.imagify-
|
2036 |
-
|
2037 |
-
.imagify-bulk .imagify-settings-section h3 {
|
2038 |
-
color: #4A4A4A;
|
2039 |
}
|
2040 |
-
.imagify-
|
2041 |
-
|
|
|
|
|
2042 |
}
|
2043 |
-
|
2044 |
-
|
2045 |
-
|
2046 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2047 |
}
|
2048 |
-
.
|
2049 |
-
|
2050 |
-
|
2051 |
-
|
2052 |
-
|
2053 |
-
|
2054 |
-
|
2055 |
-
margin-bottom: 8px;
|
2056 |
-
font-size: 17px;
|
2057 |
-
font-style: italic;
|
2058 |
-
line-height: 29px;
|
2059 |
-
font-weight: bold;
|
2060 |
-
text-align: center;
|
2061 |
-
border-radius: 50%;
|
2062 |
}
|
2063 |
-
.imagify-
|
2064 |
-
|
|
|
|
|
2065 |
position: relative;
|
2066 |
-
|
2067 |
-
|
2068 |
-
|
2069 |
-
|
2070 |
-
|
|
|
|
|
|
|
2071 |
border-radius: 3px;
|
2072 |
}
|
2073 |
-
|
2074 |
-
|
|
|
|
|
|
|
|
|
|
|
2075 |
}
|
2076 |
-
.imagify-
|
2077 |
-
margin
|
|
|
|
|
|
|
|
|
|
|
2078 |
}
|
2079 |
-
.imagify-
|
2080 |
-
|
2081 |
-
|
2082 |
-
|
2083 |
-
|
2084 |
-
font-size: 10px;
|
2085 |
-
letter-spacing: 0;
|
2086 |
text-align: center;
|
2087 |
}
|
2088 |
-
.imagify-
|
2089 |
-
|
|
|
2090 |
position: absolute;
|
|
|
|
|
|
|
|
|
|
|
|
|
2091 |
}
|
2092 |
-
.imagify-
|
2093 |
-
|
2094 |
-
border-right: 8px solid #2e3242;
|
2095 |
-
border-top: 6px solid transparent;
|
2096 |
-
border-bottom: 6px solid transparent;
|
2097 |
-
}
|
2098 |
-
.imagify-tooltips.bottom .tooltip-content:after {
|
2099 |
-
top: -5px; left: 50%;
|
2100 |
-
margin-left: -3px;
|
2101 |
-
border-bottom: 6px solid #2e3242;
|
2102 |
-
border-left: 6px solid transparent;
|
2103 |
-
border-right: 6px solid transparent;
|
2104 |
-
}
|
2105 |
-
.imagify-space-tooltips .tooltip-content {
|
2106 |
-
max-width: 280px;
|
2107 |
-
margin-top: 20px;
|
2108 |
-
margin-left: 0;
|
2109 |
-
padding: 5px 15px 5px;
|
2110 |
-
font-size: 13px;
|
2111 |
-
background: #40B1D0;
|
2112 |
-
box-shadow: 0 3px 0 #338EA6;
|
2113 |
-
}
|
2114 |
-
.imagify-space-tooltips .tooltip-content:after {
|
2115 |
-
top: -14px;
|
2116 |
-
left: 50%;
|
2117 |
-
margin-left: -7px;
|
2118 |
-
border: 0 none;
|
2119 |
-
border-bottom: 15px solid #40B1D0;
|
2120 |
-
border-left: 15px solid transparent;
|
2121 |
-
border-right: 15px solid transparent;
|
2122 |
-
}
|
2123 |
-
.tooltip-content.tooltip-table {
|
2124 |
-
display: table;
|
2125 |
-
width: 100%;
|
2126 |
-
}
|
2127 |
-
.tooltip-content.tooltip-table > * {
|
2128 |
-
display: table-cell;
|
2129 |
-
vertical-align: middle;
|
2130 |
-
}
|
2131 |
-
.tooltip-content .cell-icon {
|
2132 |
-
width: 28px;
|
2133 |
-
}
|
2134 |
-
.tooltip-content .cell-icon .icon {
|
2135 |
-
margin-bottom: 0;
|
2136 |
-
}
|
2137 |
-
.tooltip-content .cell-text {
|
2138 |
-
padding: 5px 10px 5px 0;
|
2139 |
-
line-height: 1.3;
|
2140 |
-
}
|
2141 |
-
.tooltip-content .cell-sep {
|
2142 |
-
width: 1px;
|
2143 |
-
background: rgba(255, 255, 255, .4);
|
2144 |
}
|
2145 |
-
.
|
2146 |
-
|
|
|
2147 |
}
|
2148 |
-
.
|
2149 |
display: block;
|
2150 |
-
|
2151 |
-
width: 100%;
|
2152 |
-
height: 100%;
|
2153 |
-
white-space: nowrap;
|
2154 |
}
|
2155 |
|
2156 |
-
|
2157 |
-
|
2158 |
-
|
2159 |
-
|
2160 |
-
font-weight: bold;
|
2161 |
-
line-height: 1.1;
|
2162 |
-
vertical-align: middle;
|
2163 |
-
white-space: nowrap;
|
2164 |
-
}
|
2165 |
-
.imagify-number-you-optimized .text {
|
2166 |
-
display: table-cell;
|
2167 |
-
vertical-align: middle;
|
2168 |
-
overflow: hidden;
|
2169 |
-
font-size: 12px;
|
2170 |
-
}
|
2171 |
-
.imagify-number-you-optimized .text br {
|
2172 |
-
display: none;
|
2173 |
-
}
|
2174 |
-
.imagify-number-you-optimized > p {
|
2175 |
-
display: table;
|
2176 |
-
}
|
2177 |
-
.imagify-number-you-optimized {
|
2178 |
-
padding-bottom: 0.85em;
|
2179 |
-
margin-bottom: 1.35em;
|
2180 |
-
overflow: hidden;
|
2181 |
-
border-bottom: 1px solid rgba(0,0,0, 0.05);
|
2182 |
-
}
|
2183 |
-
.imagify-bars p {
|
2184 |
-
font-weight: bold;
|
2185 |
-
font-size: 12px;
|
2186 |
-
margin-bottom: 0;
|
2187 |
-
}
|
2188 |
-
.imagify-bars + .imagify-number-you-optimized {
|
2189 |
-
border-bottom: 0;
|
2190 |
-
padding-top: 0.85em;
|
2191 |
-
}
|
2192 |
-
.imagify-bars + .imagify-number-you-optimized p {
|
2193 |
-
color: #46b1ce;
|
2194 |
-
}
|
2195 |
-
|
2196 |
-
/**
|
2197 |
-
* == Bulk table
|
2198 |
-
*/
|
2199 |
-
.imagify-bulk-table {
|
2200 |
-
margin-top: 2em;
|
2201 |
-
max-height: 600px;
|
2202 |
-
max-height: 60vh;
|
2203 |
-
overflow: auto;
|
2204 |
-
}
|
2205 |
-
.imagify-bulk-table table {
|
2206 |
-
width: 100%;
|
2207 |
-
border-spacing: 0;
|
2208 |
-
border-collapse: collapse;
|
2209 |
-
border: 1px solid #D3D3D3;
|
2210 |
-
}
|
2211 |
-
.imagify-bulk-table td {
|
2212 |
-
padding: 8px 15px;
|
2213 |
-
}
|
2214 |
-
.imagify-bulk-table thead tr,
|
2215 |
-
.imagify-bulk-table thead th {
|
2216 |
-
background: #2E3242;
|
2217 |
-
}
|
2218 |
-
.imagify-bulk-table tfoot tr,
|
2219 |
-
.imagify-bulk-table tfoot th {
|
2220 |
-
background: #73818C;
|
2221 |
-
}
|
2222 |
-
.imagify-bulk-table thead th {
|
2223 |
-
padding: 14px 15px;
|
2224 |
-
text-align: left;
|
2225 |
-
color: #F2F5F7;
|
2226 |
-
font-weight: bold;
|
2227 |
-
font-size: 14px;
|
2228 |
-
}
|
2229 |
-
.imagify-bulk-table tfoot td {
|
2230 |
-
padding: 14px 15px;
|
2231 |
-
color: #F9FAFA;
|
2232 |
-
}
|
2233 |
-
|
2234 |
-
.imagify-bulk-table tbody tr,
|
2235 |
-
.imagify-bulk-table tbody td {
|
2236 |
-
background: #FFF;
|
2237 |
-
}
|
2238 |
-
.imagify-bulk-table tbody tr:nth-child(odd),
|
2239 |
-
.imagify-bulk-table tbody tr:nth-child(odd) td {
|
2240 |
-
background: #F2F5F7;
|
2241 |
-
}
|
2242 |
-
|
2243 |
-
.imagify-bulk-table .imagify-row-progress {
|
2244 |
-
display: none;
|
2245 |
-
}
|
2246 |
-
|
2247 |
-
.imagify-bulk-table .imagify-row-progress,
|
2248 |
-
.imagify-bulk-table .imagify-row-progress td {
|
2249 |
-
height: 15px;
|
2250 |
-
padding: 0;
|
2251 |
-
}
|
2252 |
-
.imagify-bulk-table .imagify-no-uploaded-yet td {
|
2253 |
-
height: 200px;
|
2254 |
-
font-size: 17px;
|
2255 |
-
letter-spacing: .1em;
|
2256 |
-
word-spacing: .12em;
|
2257 |
-
vertical-align: middle;
|
2258 |
-
text-transform: uppercase;
|
2259 |
-
font-weight: bold;
|
2260 |
-
text-align: center;
|
2261 |
-
color: #999;
|
2262 |
-
background-color: #FFF;
|
2263 |
-
}
|
2264 |
-
|
2265 |
-
.imagify-row-complete {
|
2266 |
-
padding: 35px 20px;
|
2267 |
-
margin-top: 2em;
|
2268 |
-
background: #8BC34A;
|
2269 |
-
color: #FFF;
|
2270 |
-
text-shadow: 0 0 2px rgba(0,0,0,.1);
|
2271 |
-
}
|
2272 |
-
.imagify-row-complete .imagify-ac-chart {
|
2273 |
-
margin-top: 3px;
|
2274 |
-
}
|
2275 |
-
.imagify-row-complete p {
|
2276 |
-
color: #FFF;
|
2277 |
-
margin: 0;
|
2278 |
-
}
|
2279 |
-
|
2280 |
-
@-webkit-keyframes congrate {
|
2281 |
-
0% {
|
2282 |
-
opacity: 0;
|
2283 |
-
-webkit-transform: scale(1);
|
2284 |
-
}
|
2285 |
-
50% {
|
2286 |
-
-webkit-transform: scale(1.05);
|
2287 |
-
opacity: 1;
|
2288 |
-
}
|
2289 |
-
100% {
|
2290 |
-
-webkit-transform: scale(1);
|
2291 |
-
opacity: 1;
|
2292 |
-
}
|
2293 |
-
}
|
2294 |
-
|
2295 |
-
@keyframes congrate {
|
2296 |
-
0% {
|
2297 |
-
opacity: 0;
|
2298 |
-
transform: scale(1);
|
2299 |
-
}
|
2300 |
-
50% {
|
2301 |
-
transform: scale(1.05);
|
2302 |
-
opacity: 1;
|
2303 |
-
}
|
2304 |
-
100% {
|
2305 |
-
transform: scale(1);
|
2306 |
-
opacity: 1;
|
2307 |
-
}
|
2308 |
-
}
|
2309 |
-
|
2310 |
-
|
2311 |
-
.imagify-row-complete.done {
|
2312 |
-
-webkit-animation: congrate 500ms ease-in-out;
|
2313 |
-
animation: congrate 500ms ease-in-out;
|
2314 |
-
}
|
2315 |
-
|
2316 |
-
.imagify-all-complete {
|
2317 |
-
margin: 1.5em 0;
|
2318 |
-
}
|
2319 |
-
.imagify-all-complete > div {
|
2320 |
-
display: inline-block;
|
2321 |
-
vertical-align: middle;
|
2322 |
-
}
|
2323 |
-
.imagify-ac-report {
|
2324 |
-
min-width: 310px;
|
2325 |
-
}
|
2326 |
-
.imagify-ac-chart {
|
2327 |
-
width: 46px;
|
2328 |
-
height: 46px;
|
2329 |
-
float: left;
|
2330 |
-
margin: 0 20px 0 10px;
|
2331 |
-
}
|
2332 |
-
.imagify-ac-report-text {
|
2333 |
-
overflow: hidden;
|
2334 |
-
}
|
2335 |
-
.imagify-ac-report-text p {
|
2336 |
-
line-height: 1.3;
|
2337 |
-
}
|
2338 |
-
.imagify-ac-rt-big {
|
2339 |
-
font-weight: bold;
|
2340 |
-
font-size: 24px;
|
2341 |
-
letter-spacing: 0.15em;
|
2342 |
-
word-spacing: 0.15em;
|
2343 |
-
text-transform: uppercase;
|
2344 |
-
}
|
2345 |
-
.imagify-ac-share {
|
2346 |
-
text-align: right;
|
2347 |
-
}
|
2348 |
-
.imagify-ac-share-content {
|
2349 |
-
display: inline-block;
|
2350 |
-
padding: 10px 15px;
|
2351 |
-
background: rgba(255,255,255,.2);
|
2352 |
-
}
|
2353 |
-
.imagify-ac-share-content > * {
|
2354 |
-
display: inline-block;
|
2355 |
-
vertical-align: middle;
|
2356 |
-
}
|
2357 |
-
.imagify-bulk-table .imagify-ac-share-content p {
|
2358 |
-
margin-right: 5px;
|
2359 |
-
}
|
2360 |
-
.imagify-share-networks,
|
2361 |
-
.imagify-share-networks li {
|
2362 |
-
margin: 0;
|
2363 |
-
}
|
2364 |
-
.imagify-share-networks li {
|
2365 |
-
display: inline-block;
|
2366 |
-
}
|
2367 |
-
.imagify-share-networks a {
|
2368 |
-
display: inline-block;
|
2369 |
-
vertical-align: -7px;
|
2370 |
-
margin: 0 5px;
|
2371 |
-
text-decoration: none;
|
2372 |
-
color: #FFF;
|
2373 |
-
}
|
2374 |
-
|
2375 |
-
/* TD's width */
|
2376 |
-
.imagify-cell-filename {
|
2377 |
-
max-width: 200px;
|
2378 |
-
}
|
2379 |
-
.imagify-cell-status {
|
2380 |
-
max-width: 145px;
|
2381 |
-
}
|
2382 |
-
.imagify-cell-status .dashicons-warning {
|
2383 |
-
margin-right: 2px;
|
2384 |
-
}
|
2385 |
-
.imagify-cell-thumbnails {
|
2386 |
-
max-width: 120px;
|
2387 |
-
}
|
2388 |
-
|
2389 |
-
td.imagify-cell-filename {
|
2390 |
-
text-overflow: clip; /* ellipsis replace all the text by ... :`/ */
|
2391 |
-
white-space: nowrap;
|
2392 |
-
overflow: hidden;
|
2393 |
-
}
|
2394 |
-
.imagify-bulk-table td.imagify-cell-totaloriginal {
|
2395 |
-
padding-right: 78px;
|
2396 |
-
}
|
2397 |
-
|
2398 |
-
.imagiuploaded,
|
2399 |
-
.imagifilename {
|
2400 |
-
display: inline-block;
|
2401 |
-
vertical-align: middle;
|
2402 |
-
}
|
2403 |
-
.imagifilename {
|
2404 |
-
font-size: 12px;
|
2405 |
-
}
|
2406 |
-
.imagiuploaded {
|
2407 |
-
width: 33px;
|
2408 |
-
height: 33px;
|
2409 |
-
margin-right: 5px;
|
2410 |
-
margin-left: -8px;
|
2411 |
-
overflow: hidden;
|
2412 |
-
background: url(../images/upload-image.png) 0 0 no-repeat;
|
2413 |
-
background-size: cover;
|
2414 |
-
}
|
2415 |
-
.imagiuploaded img {
|
2416 |
-
max-widht: 100%;
|
2417 |
-
height: auto;
|
2418 |
-
}
|
2419 |
-
|
2420 |
-
.imagistatus {
|
2421 |
-
color: #8CA6B3;
|
2422 |
-
text-transform: uppercase;
|
2423 |
-
font-weight: bold;
|
2424 |
-
}
|
2425 |
-
.status-compressing {
|
2426 |
-
color: #46B1CE;
|
2427 |
-
}
|
2428 |
-
.status-error {
|
2429 |
-
color: #CE0B24;
|
2430 |
-
}
|
2431 |
-
.status-warning {
|
2432 |
-
color: #f5a623;
|
2433 |
-
}
|
2434 |
-
.status-complete {
|
2435 |
-
color: #8CC152;
|
2436 |
-
}
|
2437 |
-
.imagify-error {
|
2438 |
-
background: #D0021B;
|
2439 |
-
color: #FFF;
|
2440 |
-
}
|
2441 |
-
.imagify-settings-section .imagify-error {
|
2442 |
-
display: inline-block;
|
2443 |
-
padding: 7px 10px;
|
2444 |
-
margin: 10px 0 0 45px;
|
2445 |
-
border-radius: 3px;
|
2446 |
-
}
|
2447 |
-
.imagify-settings-section .imagify-error code {
|
2448 |
-
font-weight: normal;
|
2449 |
-
}
|
2450 |
-
.imagify-settings-section .imagify-error.hidden {
|
2451 |
-
display: none;
|
2452 |
-
}
|
2453 |
-
.imagify-warning,
|
2454 |
-
#wpadminbar .imagify-warning * {
|
2455 |
-
background: #f5a623;
|
2456 |
-
color: #FFF;
|
2457 |
-
text-shadow: 0 0 2px rgba(0, 0, 0, 0.2);
|
2458 |
-
}
|
2459 |
-
.imagify-bulk-table .imagify-cell-thumbnails {
|
2460 |
-
text-align: center;
|
2461 |
-
}
|
2462 |
-
.imagify-cell-percentage,
|
2463 |
-
.imagify-cell-savings {
|
2464 |
-
color: #46B1CE;
|
2465 |
-
font-weight: bold;
|
2466 |
-
}
|
2467 |
-
.imagify-cell-optimized {
|
2468 |
-
font-weight: bold;
|
2469 |
-
}
|
2470 |
-
|
2471 |
-
.imagify-cell-totaloriginal {
|
2472 |
-
text-align: right;
|
2473 |
-
}
|
2474 |
-
|
2475 |
-
/* icon rotate */
|
2476 |
-
.dashicons.rotate {
|
2477 |
-
-webkit-animation: icon-rotate 2.6s infinite linear;
|
2478 |
-
animation: icon-rotate 2.6s infinite linear;
|
2479 |
-
}
|
2480 |
-
.dashicons-admin-generic {
|
2481 |
-
transform-origin: 48.75% 51.75%;
|
2482 |
-
}
|
2483 |
-
|
2484 |
-
|
2485 |
-
/* Imagify Modal */
|
2486 |
-
.imagify-modal {
|
2487 |
-
display: -webkit-box;
|
2488 |
-
display: -ms-flexbox;
|
2489 |
-
display: flex;
|
2490 |
-
-webkit-box-orient: vertical;
|
2491 |
-
-webkit-box-direction: normal;
|
2492 |
-
-ms-flex-direction: column;
|
2493 |
-
flex-direction: column;
|
2494 |
-
-webkit-box-align: center;
|
2495 |
-
-ms-flex-align: center;
|
2496 |
-
align-items: center;
|
2497 |
-
-webkit-box-pack: center;
|
2498 |
-
-ms-flex-pack: center;
|
2499 |
-
justify-content: center;
|
2500 |
-
}
|
2501 |
-
.js .imagify-modal {
|
2502 |
-
display: none;
|
2503 |
-
position: fixed;
|
2504 |
-
top: 0; right: 0; bottom: 0; left: 0;
|
2505 |
-
background-color: #1F2332;
|
2506 |
-
background-color: rgba(31,35,50,.95);
|
2507 |
-
z-index: 99999;
|
2508 |
-
}
|
2509 |
-
.imagify-modal-content {
|
2510 |
-
-webkit-box-sizing: border-box;
|
2511 |
-
-moz-box-sizing: border-box;
|
2512 |
-
box-sizing: border-box;
|
2513 |
-
position: relative;
|
2514 |
-
width: 800px;
|
2515 |
-
max-width: 95%;
|
2516 |
-
max-height: 90vw;
|
2517 |
-
overflow: auto;
|
2518 |
-
padding: 20px 25px;
|
2519 |
-
margin: 1em auto;
|
2520 |
-
background: #FFF;
|
2521 |
-
box-shadow: 1px 1px 4px rgba(0,0,0,.7);
|
2522 |
-
border-radius: 3px;
|
2523 |
-
}
|
2524 |
-
#imagify-visual-comparison .imagify-modal-content,
|
2525 |
-
.imagify-visual-comparison .imagify-modal-content {
|
2526 |
-
max-width: 1400px;
|
2527 |
-
background: transparent;
|
2528 |
-
padding: 5px;
|
2529 |
-
box-shadow: none;
|
2530 |
-
border-radius: 0;
|
2531 |
-
}
|
2532 |
-
.imagify-modal .h2 {
|
2533 |
-
margin: .5em 0;
|
2534 |
-
color: #8ba6b4;
|
2535 |
-
font-weight: normal;
|
2536 |
-
font-size: 24px;
|
2537 |
-
letter-spacing: 0.075em;
|
2538 |
-
text-align: center;
|
2539 |
-
}
|
2540 |
-
.imagify-modal .h3 {
|
2541 |
-
color: #40b1d0;
|
2542 |
-
font-weight: normal;
|
2543 |
-
font-size: 18px;
|
2544 |
-
letter-spacing: 0.075em;
|
2545 |
-
text-align: center;
|
2546 |
-
}
|
2547 |
-
.text-justify {
|
2548 |
-
text-align: justify;
|
2549 |
-
}
|
2550 |
-
|
2551 |
-
.imagify-modal .close-btn {
|
2552 |
-
display: none;
|
2553 |
-
visibility: hidden;
|
2554 |
-
position: absolute;
|
2555 |
-
right: 20px; top: 20px;
|
2556 |
-
font-size: 1.2em;
|
2557 |
-
border: 0;
|
2558 |
-
background: transparent none;
|
2559 |
-
border-radius: 0;
|
2560 |
-
cursor: pointer;
|
2561 |
-
}
|
2562 |
-
.imagify-modal .close-btn i {
|
2563 |
-
margin-left: -2px;
|
2564 |
-
}
|
2565 |
-
.imagify-modal .close-btn:hover,
|
2566 |
-
.imagify-modal .close-btn:focus {
|
2567 |
-
color: #40b1d0;
|
2568 |
-
}
|
2569 |
-
.js .imagify-modal .close-btn {
|
2570 |
-
display: block;
|
2571 |
-
visibility: visible;
|
2572 |
-
}
|
2573 |
-
.js .imagify-iframe-viewing .close-btn {
|
2574 |
-
display: none;
|
2575 |
-
}
|
2576 |
-
#imagify-visual-comparison .close-btn,
|
2577 |
-
.imagify-visual-comparison .close-btn {
|
2578 |
-
top: 50px;
|
2579 |
-
right: 5px;
|
2580 |
-
width: 33px;
|
2581 |
-
height: 33px;
|
2582 |
-
padding: 1px 0 0 2px;
|
2583 |
-
border: 1px solid #F2F2F2;
|
2584 |
-
color: #F2F2F2;
|
2585 |
-
line-height: 19px;
|
2586 |
-
text-align: center;
|
2587 |
-
border-radius: 50%;
|
2588 |
-
}
|
2589 |
-
|
2590 |
-
/* Attachment page exception */
|
2591 |
-
.wp_attachment_image #imagify-visual-comparison .close-btn,
|
2592 |
-
.imagify-visual-comparison .close-btn {
|
2593 |
-
top: 0;
|
2594 |
-
}
|
2595 |
-
/* Attachment page exception */
|
2596 |
-
.wp_attachment_image #imagify-visual-comparison .imagify-modal-content,
|
2597 |
-
.imagify-visual-comparison .imagify-modal-content {
|
2598 |
-
padding-top: 40px;
|
2599 |
-
}
|
2600 |
-
|
2601 |
-
.imagify-modal .imagify-comparison-title {
|
2602 |
-
font-size: 28px;
|
2603 |
-
margin-bottom: 1em;
|
2604 |
-
color: #F2F2F2;
|
2605 |
-
text-align: left;
|
2606 |
-
}
|
2607 |
-
.imagify-modal .imagify-comparison-title .twentytwenty-duo-buttons {
|
2608 |
-
position: static;
|
2609 |
-
margin: 0 10px 0 15px;
|
2610 |
-
}
|
2611 |
-
.imagify-comparison-title .twentytwenty-duo-buttons button {
|
2612 |
-
float: none;
|
2613 |
-
padding: 6px 12px;
|
2614 |
-
font-size: 16px;
|
2615 |
-
text-transform: none;
|
2616 |
-
border: 1px solid #40B1D0;
|
2617 |
-
color: #888899;
|
2618 |
-
letter-spacing: 0;
|
2619 |
-
}
|
2620 |
-
.imagify-comparison-title .twentytwenty-duo-buttons button:focus {
|
2621 |
-
outline: none;
|
2622 |
-
box-shadow: none;
|
2623 |
-
}
|
2624 |
-
.imagify-comparison-title .twentytwenty-duo-buttons .selected {
|
2625 |
-
border: 1px solid #40B1D0;
|
2626 |
-
color: #FFF;
|
2627 |
-
background: #40B1D0;
|
2628 |
-
}
|
2629 |
-
|
2630 |
-
.imagify-comparison-levels {
|
2631 |
-
margin: 15px 0;
|
2632 |
-
overflow: hidden;
|
2633 |
-
}
|
2634 |
-
.imagify-comparison-levels div {
|
2635 |
-
display: none;
|
2636 |
-
min-width: 175px;
|
2637 |
-
font-size: 11px;
|
2638 |
-
}
|
2639 |
-
.imagify-comparison-levels .imagify-chart,
|
2640 |
-
.imagify-comparison-levels .imagify-chart-container {
|
2641 |
-
width: 25px;
|
2642 |
-
float: none;
|
2643 |
-
margin: 0;
|
2644 |
-
}
|
2645 |
-
.imagify-visual-comparison .imagify-chart-container canvas {
|
2646 |
-
width: 15px!important;
|
2647 |
-
height: 15px!important;
|
2648 |
-
margin-right: 5px;
|
2649 |
-
}
|
2650 |
-
.imagify-c-level.go-left {
|
2651 |
-
float: left;
|
2652 |
-
}
|
2653 |
-
.imagify-c-level.go-right {
|
2654 |
-
float: right;
|
2655 |
-
}
|
2656 |
-
.imagify-c-level.go-right,
|
2657 |
-
.imagify-c-level.go-left {
|
2658 |
-
display: table;
|
2659 |
-
}
|
2660 |
-
.imagify-c-level .imagify-c-level-row {
|
2661 |
-
display: table-row;
|
2662 |
-
margin: 0;
|
2663 |
-
color: #FFF;
|
2664 |
-
}
|
2665 |
-
.imagify-c-level-row > span {
|
2666 |
-
display: table-cell;
|
2667 |
-
padding: 2px 0;
|
2668 |
-
}
|
2669 |
-
.imagify-c-level-row .value {
|
2670 |
-
text-align: right;
|
2671 |
-
padding-left: 5px;
|
2672 |
-
}
|
2673 |
-
.imagify-c-level-row .value.level {
|
2674 |
-
color: #40b1d0;
|
2675 |
-
}
|
2676 |
-
.imagify-c-level-row .value.size {
|
2677 |
-
color: #8bc34a;
|
2678 |
-
font-weight: bold;
|
2679 |
-
}
|
2680 |
-
.imagify-c-level-row .value .imagify-chart {
|
2681 |
-
top: 1px;
|
2682 |
-
}
|
2683 |
-
|
2684 |
-
@-webkit-keyframes icon-rotate {
|
2685 |
-
from {
|
2686 |
-
-webkit-transform: rotate(0deg);
|
2687 |
-
transform: rotate(0deg);
|
2688 |
-
}
|
2689 |
-
to {
|
2690 |
-
-webkit-transform: rotate(360deg);
|
2691 |
-
transform: rotate(360deg);
|
2692 |
-
}
|
2693 |
-
}
|
2694 |
-
@keyframes icon-rotate {
|
2695 |
-
from {
|
2696 |
-
transform: rotate(0deg);
|
2697 |
-
}
|
2698 |
-
to {
|
2699 |
-
transform: rotate(360deg);
|
2700 |
-
}
|
2701 |
-
}
|
2702 |
-
|
2703 |
-
.imagify-menu-bar-img {
|
2704 |
-
margin-top: 1em;
|
2705 |
-
}
|
2706 |
-
|
2707 |
-
/**
|
2708 |
-
* Visual Comparison
|
2709 |
-
*/
|
2710 |
-
.imagify-modal .loader {
|
2711 |
-
position: absolute;
|
2712 |
-
top: 50%;
|
2713 |
-
left: 50%;
|
2714 |
-
margin: -32px 0 0 -32px;
|
2715 |
-
opacity: 0;
|
2716 |
-
visibility: hidden;
|
2717 |
-
transition: opacity .4s;
|
2718 |
-
}
|
2719 |
-
.imagify-modal .loading .loader {
|
2720 |
-
visibility: visible;
|
2721 |
-
opacity: 1;
|
2722 |
-
}
|
2723 |
-
|
2724 |
-
.imagify-settings .imagify-visual-comparison-text {
|
2725 |
-
margin-top: 1em;
|
2726 |
-
color: #40b1d0;
|
2727 |
-
font-weight: bold;
|
2728 |
-
}
|
2729 |
-
|
2730 |
-
/**
|
2731 |
-
* Payment Modals
|
2732 |
-
*/
|
2733 |
-
|
2734 |
-
/* Flexbox re-groups */
|
2735 |
-
.imagify-modal-cols,
|
2736 |
-
.imagify-border-styled,
|
2737 |
-
.imagify-offer-header,
|
2738 |
-
.imagify-payment-modal .imagify-modal-content,
|
2739 |
-
.imagify-flex-table,
|
2740 |
-
.imagify-tabs {
|
2741 |
-
display: -webkit-box;
|
2742 |
-
display: -webkit-flex;
|
2743 |
-
display: -ms-flexbox;
|
2744 |
-
display: flex;
|
2745 |
-
-webkit-box-orient: horizontal;
|
2746 |
-
-webkit-box-direction: normal;
|
2747 |
-
-webkit-flex-direction: row;
|
2748 |
-
-ms-flex-direction: row;
|
2749 |
-
flex-direction: row;
|
2750 |
-
}
|
2751 |
-
.imagify-modal-cols,
|
2752 |
-
.imagify-border-styled {
|
2753 |
-
-webkit-box-pack: center;
|
2754 |
-
-webkit-justify-content: center;
|
2755 |
-
-ms-flex-pack: center;
|
2756 |
-
justify-content: center;
|
2757 |
-
-webkit-box-align: center;
|
2758 |
-
-webkit-align-items: center;
|
2759 |
-
-ms-flex-align: center;
|
2760 |
-
align-items: center;
|
2761 |
-
}
|
2762 |
-
|
2763 |
-
.imagify-payment-modal {
|
2764 |
-
text-align: center;
|
2765 |
-
color: #7A8996;
|
2766 |
-
}
|
2767 |
-
.imagify-payment-modal * {
|
2768 |
-
box-sizing: border-box;
|
2769 |
-
}
|
2770 |
-
.imagify-modal-loader {
|
2771 |
-
position: absolute;
|
2772 |
-
top: 0; left: 0; right: 0; bottom: 0;
|
2773 |
-
background: #fff url('../images/loader-balls.svg') center no-repeat;
|
2774 |
-
z-index: 10;
|
2775 |
-
}
|
2776 |
-
.imagify-payment-modal .imagify-modal-content {
|
2777 |
-
width: 980px;
|
2778 |
-
max-width: 100%;
|
2779 |
-
min-width: 925px;
|
2780 |
-
padding: 0;
|
2781 |
-
}
|
2782 |
-
.imagify-modal-content.imagify-iframe-viewing {
|
2783 |
-
width: 980px;
|
2784 |
-
height: 672px;
|
2785 |
-
overflow: hidden;
|
2786 |
-
}
|
2787 |
-
.imagify-iframe-viewing #imagify-payment-process-view {
|
2788 |
-
width: 980px;
|
2789 |
-
height: 668px;
|
2790 |
-
}
|
2791 |
-
.imagify-payment-modal .imagify-modal-main {
|
2792 |
-
width: 70%;
|
2793 |
-
}
|
2794 |
-
.imagify-iframe-viewing .imagify-modal-main {
|
2795 |
-
width: auto;
|
2796 |
-
}
|
2797 |
-
.imagify-payment-modal .imagify-modal-content.imagify-success-viewing {
|
2798 |
-
min-width: auto;
|
2799 |
-
width: 450px;
|
2800 |
-
min-height: 300px;
|
2801 |
-
}
|
2802 |
-
.imagify-success-viewing .imagify-modal-main {
|
2803 |
-
width: 100%;
|
2804 |
-
}
|
2805 |
-
.imagify-payment-modal .imagify-modal-sidebar {
|
2806 |
-
width: 30%;
|
2807 |
-
padding: 15px 20px;
|
2808 |
-
background: #1F2332;
|
2809 |
-
color: #FFF;
|
2810 |
-
}
|
2811 |
-
.imagify-modal-content.imagify-iframe-viewing .imagify-modal-sidebar,
|
2812 |
-
.imagify-modal-content.imagify-success-viewing .imagify-modal-sidebar {
|
2813 |
-
display: none;
|
2814 |
-
}
|
2815 |
-
.imagify-modal-section {
|
2816 |
-
padding: 0 25px;
|
2817 |
-
}
|
2818 |
-
.imagify-modal-section.section-gray {
|
2819 |
-
margin: 0 0 1em;
|
2820 |
-
padding: 10px 25px 15px;
|
2821 |
-
background: #F6F7FB;
|
2822 |
-
}
|
2823 |
-
.imagify-tabs-contents .section-gray {
|
2824 |
-
padding: 8px 25px 10px;
|
2825 |
-
}
|
2826 |
-
.imagify-modal-section .imagify-modal-title:first-child {
|
2827 |
-
margin-top: 1em;
|
2828 |
-
margin-bottom: 1.5em;
|
2829 |
-
}
|
2830 |
-
.imagify-modal-section.section-gray .imagify-modal-title {
|
2831 |
-
margin-top: .5em;
|
2832 |
-
margin-bottom: .5em;
|
2833 |
-
}
|
2834 |
-
.imagify-modal-title {
|
2835 |
-
font-size: 1.8em;
|
2836 |
-
}
|
2837 |
-
.imagify-analyzing .imagify-numbers-calc,
|
2838 |
-
.imagify-numbers-notcalc,
|
2839 |
-
.imagify-modal-section.imagify-analyzing .imagify-modal-cols,
|
2840 |
-
.imagify-modal-section .imagify-loader {
|
2841 |
-
display: none;
|
2842 |
-
}
|
2843 |
-
.imagify-analyzing .imagify-numbers-notcalc,
|
2844 |
-
.imagify-modal-section.imagify-analyzing .imagify-loader {
|
2845 |
-
display: block;
|
2846 |
-
}
|
2847 |
-
.imagify-modal-section .imagify-loader {
|
2848 |
-
margin: 2em auto;
|
2849 |
-
}
|
2850 |
-
|
2851 |
-
.imagify-border-styled {
|
2852 |
-
width: 200px;
|
2853 |
-
margin: 0 auto;
|
2854 |
-
color: #8BC34A;
|
2855 |
-
font-weight: bold;
|
2856 |
-
font-size: 0.925em;
|
2857 |
-
}
|
2858 |
-
.imagify-big-number {
|
2859 |
-
font-size: 3.7em;
|
2860 |
-
font-weight: bold;
|
2861 |
-
margin: -3px 0;
|
2862 |
-
color: #4A4A4A;
|
2863 |
-
line-height: 1;
|
2864 |
-
}
|
2865 |
-
|
2866 |
-
.imagify-border-styled:before,
|
2867 |
-
.imagify-border-styled:after {
|
2868 |
-
content: "";
|
2869 |
-
height: 1px;
|
2870 |
-
background: rgba(0,0,0,.1);
|
2871 |
-
-webkit-flex-basis: 40px;
|
2872 |
-
-ms-flex-preferred-size: 40px;
|
2873 |
-
flex-basis: 40px;
|
2874 |
-
}
|
2875 |
-
.imagify-border-styled:before {
|
2876 |
-
margin-right: 5px;
|
2877 |
-
}
|
2878 |
-
.imagify-border-styled:after {
|
2879 |
-
margin-left: 5px;
|
2880 |
-
}
|
2881 |
-
.imagify-payment-modal strong {
|
2882 |
-
font-weight: bold;
|
2883 |
-
color: #4A4A4A;
|
2884 |
-
}
|
2885 |
-
|
2886 |
-
.imagify-col {
|
2887 |
-
-webkit-flex-basis: 50%;
|
2888 |
-
-ms-flex-preferred-size: 50%;
|
2889 |
-
flex-basis: 50%;
|
2890 |
-
}
|
2891 |
-
.imagify-modal .imagify-cols {
|
2892 |
-
padding: 0 20px;
|
2893 |
-
}
|
2894 |
-
.imagify-payment-modal .imagify-iconed {
|
2895 |
-
margin: 1.5em 5em 1.5em 0;
|
2896 |
-
}
|
2897 |
-
.imagify-iconed {
|
2898 |
-
position: relative;
|
2899 |
-
text-align: left;
|
2900 |
-
padding-left: 42px;
|
2901 |
-
margin-right: 15px;
|
2902 |
-
font-weight: 500;
|
2903 |
-
}
|
2904 |
-
.imagify-iconed .dashicons,
|
2905 |
-
.imagify-iconed .icon {
|
2906 |
-
position: absolute;
|
2907 |
-
font-size: 2em;
|
2908 |
-
left: 0; top: 2px;
|
2909 |
-
color: #40B1D0;
|
2910 |
-
}
|
2911 |
-
.imagify-payment-modal .close-btn {
|
2912 |
-
top: 10px;
|
2913 |
-
right: 10px;
|
2914 |
-
width: 24px;
|
2915 |
-
height: 24px;
|
2916 |
-
padding: 2px 0 0 4.5px; /* Safari iOS bug fix */
|
2917 |
-
color: #FFF;
|
2918 |
-
background: #40B1D0;
|
2919 |
-
border-radius: 50%;
|
2920 |
-
-webkit-transition: all .275s;
|
2921 |
-
transition: all .275s;
|
2922 |
-
}
|
2923 |
-
.imagify-payment-modal .close-btn i {
|
2924 |
-
margin-left: -3.5px;
|
2925 |
-
margin-top: -0.5px;
|
2926 |
-
}
|
2927 |
-
.imagify-payment-modal .close-btn:hover {
|
2928 |
-
background: #F6F7FB;
|
2929 |
-
}
|
2930 |
-
|
2931 |
-
/* OFFERS */
|
2932 |
-
.imagify-offer-line {
|
2933 |
-
margin-top: 1.5em;
|
2934 |
-
}
|
2935 |
-
.imagify-offer-line + .imagify-offer-line {
|
2936 |
-
margin-top: 0.75em;
|
2937 |
-
}
|
2938 |
-
.imagify-offer-header {
|
2939 |
-
-webkit-box-pack: justify;
|
2940 |
-
-webkit-justify-content: space-between;
|
2941 |
-
-ms-flex-pack: justify;
|
2942 |
-
justify-content: space-between;
|
2943 |
-
-webkit-box-align: center;
|
2944 |
-
-webkit-align-items: center;
|
2945 |
-
-ms-flex-align: center;
|
2946 |
-
align-items: center;
|
2947 |
-
padding: 0 0 0 15px;
|
2948 |
-
border-radius: 4px 4px 0 0;
|
2949 |
-
-webkit-transition: all .275s;
|
2950 |
-
transition: all .275s;
|
2951 |
-
}
|
2952 |
-
.imagify-offer-header.imagify-offer-header.imagify-offer-header .imagify-inline-options label:last-child {
|
2953 |
-
border-radius: 0 4px 0 0;
|
2954 |
-
}
|
2955 |
-
.imagify-offer-header .imagify-inline-options {
|
2956 |
-
width: auto;
|
2957 |
-
}
|
2958 |
-
.imagify-offer-title {
|
2959 |
-
font-weight: bold;
|
2960 |
-
margin: 0;
|
2961 |
-
}
|
2962 |
-
.imagify-offer-header,
|
2963 |
-
.imagify-offer-header .imagify-inline-options input[type="radio"]:not(:checked) + label {
|
2964 |
-
background: #E5EBEF;
|
2965 |
-
}
|
2966 |
-
.imagify-offer-onetime .imagify-offer-header {
|
2967 |
-
padding-top:8px;
|
2968 |
-
padding-bottom: 8px;
|
2969 |
-
}
|
2970 |
-
.imagify-offer-onetimes > div {
|
2971 |
-
padding-top: 15px;
|
2972 |
-
padding-bottom: 15px;
|
2973 |
-
}
|
2974 |
-
.imagify-offer-header .imagify-inline-options input[type="radio"]:not(:checked) + label,
|
2975 |
-
.imagify-offer-header .imagify-inline-options input[type="radio"]:checked + label {
|
2976 |
-
position: relative;
|
2977 |
-
padding: 7px 30px;
|
2978 |
-
font-size: 1em;
|
2979 |
-
letter-spacing: 0.05em;
|
2980 |
-
color: inherit;
|
2981 |
-
box-shadow: 0 0 0;
|
2982 |
-
border-radius: 0;
|
2983 |
-
}
|
2984 |
-
.imagify-offer-header .imagify-inline-options input[type="radio"]:checked + label {
|
2985 |
-
background: #F6F7FB;
|
2986 |
-
}
|
2987 |
-
|
2988 |
-
.imagify-2-free {
|
2989 |
-
position: absolute;
|
2990 |
-
bottom: 100%; left: 0; right: 0;
|
2991 |
-
padding: 2px 10px;
|
2992 |
-
margin-bottom: 8px;
|
2993 |
-
font-size: 0.8em;
|
2994 |
-
letter-spacing: 0;
|
2995 |
-
text-transform: none;
|
2996 |
-
text-align: center;
|
2997 |
-
color: #FFF;
|
2998 |
-
background: #10121A;
|
2999 |
-
border-radius: 2px;
|
3000 |
-
}
|
3001 |
-
.imagify-2-free:after {
|
3002 |
-
content: "";
|
3003 |
-
position: absolute;
|
3004 |
-
left: 50%; bottom: -3px;
|
3005 |
-
margin-left: -3px;
|
3006 |
-
border-top: 3px solid #10121A;
|
3007 |
-
border-left: 3px solid transparent;
|
3008 |
-
border-right: 3px solid transparent;
|
3009 |
-
}
|
3010 |
-
/* right position */
|
3011 |
-
.imagify-2-free.imagify-b-right {
|
3012 |
-
bottom: auto;
|
3013 |
-
left: 100%; right: -100%;
|
3014 |
-
margin-bottom: 0;
|
3015 |
-
margin-left: 8px;
|
3016 |
-
}
|
3017 |
-
.imagify-2-free.imagify-b-right:after {
|
3018 |
-
left: -3px; bottom: auto; top: 50%;
|
3019 |
-
margin-top: -3px; margin-left: 0;
|
3020 |
-
border-right: 3px solid #10121A;
|
3021 |
-
border-top: 3px solid transparent;
|
3022 |
-
border-bottom: 3px solid transparent;
|
3023 |
-
border-left: 0;
|
3024 |
-
}
|
3025 |
-
|
3026 |
-
/* bottom position */
|
3027 |
-
.imagify-2-free.imagify-b-bottom {
|
3028 |
-
bottom: -100%;
|
3029 |
-
left: 0; right: 0;
|
3030 |
-
margin-top: 8px;
|
3031 |
-
}
|
3032 |
-
.imagify-2-free.imagify-b-bottom:after {
|
3033 |
-
top: -3px; bottom: auto;
|
3034 |
-
border-bottom: 3px solid #10121A;
|
3035 |
-
border-left: 3px solid transparent;
|
3036 |
-
border-right: 3px solid transparent;
|
3037 |
-
border-top: 0;
|
3038 |
-
}
|
3039 |
-
|
3040 |
-
|
3041 |
-
.imagify-offer-content {
|
3042 |
-
text-align: left;
|
3043 |
-
background: #F6F7FB;
|
3044 |
-
border-radius: 0 0 4px 4px;
|
3045 |
-
-webkit-transition: all .275s;
|
3046 |
-
transition: all .275s;
|
3047 |
-
}
|
3048 |
-
.imagify-offer-onetime .imagify-offer-content {
|
3049 |
-
padding: 10px 0;
|
3050 |
-
}
|
3051 |
-
|
3052 |
-
/* Checkboxes adjustment */
|
3053 |
-
div.imagify-col-checkbox {
|
3054 |
-
position: relative;
|
3055 |
-
width: 25.5%;
|
3056 |
-
padding-top: 10px;
|
3057 |
-
padding-bottom: 7px;
|
3058 |
-
}
|
3059 |
-
.imagify-col-checkbox label {
|
3060 |
-
display: block;
|
3061 |
-
}
|
3062 |
-
.imagify-col-checkbox .imagify-checkbox.imagify-checkbox:not(:checked),
|
3063 |
-
.imagify-col-checkbox .imagify-checkbox.imagify-checkbox:checked {
|
3064 |
-
position: absolute;
|
3065 |
-
top: 50%; left: 6px;
|
3066 |
-
margin: -8px 0 0 0;
|
3067 |
-
}
|
3068 |
-
.imagify-col-checkbox .imagify-checkbox.imagify-checkbox:not(:checked) + label:before,
|
3069 |
-
.imagify-col-checkbox .imagify-checkbox.imagify-checkbox:checked + label:before {
|
3070 |
-
margin: 0;
|
3071 |
-
top: -2px;
|
3072 |
-
left: 6px;
|
3073 |
-
-webkit-transition: all .275s;
|
3074 |
-
transition: all .275s;
|
3075 |
-
}
|
3076 |
-
.imagify-col-checkbox .imagify-checkbox.imagify-checkbox:not(:checked) + label:after,
|
3077 |
-
.imagify-col-checkbox .imagify-checkbox.imagify-checkbox:checked + label:after {
|
3078 |
-
top: 1px;
|
3079 |
-
left: 13px;
|
3080 |
-
}
|
3081 |
-
.imagify-col-checkbox label {
|
3082 |
-
padding-left: 55px!important;
|
3083 |
-
}
|
3084 |
-
|
3085 |
-
/* Offer col */
|
3086 |
-
.imagify-offer-size {
|
3087 |
-
font-size: 30px;
|
3088 |
-
color: #2E3243;
|
3089 |
-
font-weight: bold;
|
3090 |
-
-webkit-transition: all .275s;
|
3091 |
-
transition: all .275s;
|
3092 |
-
}
|
3093 |
-
.imagify-offer-by {
|
3094 |
-
font-size: 10px;
|
3095 |
-
-webkit-transition: all .275s;
|
3096 |
-
transition: all .275s;
|
3097 |
-
}
|
3098 |
-
.imagify-approx {
|
3099 |
-
display: none;
|
3100 |
-
font-size: 11px;
|
3101 |
-
line-height: 1.2;
|
3102 |
-
-webkit-transition: all .275s;
|
3103 |
-
transition: all .275s;
|
3104 |
-
}
|
3105 |
-
|
3106 |
-
div.imagify-col-price {
|
3107 |
-
width: 35%;
|
3108 |
-
}
|
3109 |
-
.imagify-flex-table .imagify-price-block {
|
3110 |
-
padding-left: 0;
|
3111 |
-
padding-right: 0;
|
3112 |
-
}
|
3113 |
-
.imagify-offer-monthly .imagify-flex-table .imagify-price-block,
|
3114 |
-
.imagify-offer-monthlies .imagify-price-block {
|
3115 |
-
padding-top: 0;
|
3116 |
-
}
|
3117 |
-
.imagify-flex-table .imagify-price-complement {
|
3118 |
-
padding-right: 0;
|
3119 |
-
font-size: 10px;
|
3120 |
-
font-weight: bold;
|
3121 |
-
}
|
3122 |
-
.imagify-price-block,
|
3123 |
-
.imagify-price-discount {
|
3124 |
-
white-space: nowrap;
|
3125 |
-
}
|
3126 |
-
.imagify-price-block span,
|
3127 |
-
.imagify-price-discount span {
|
3128 |
-
display: inline-block;
|
3129 |
-
vertical-align: middle;
|
3130 |
-
}
|
3131 |
-
.imagify-price-discount.imagify-price-discount {
|
3132 |
-
position: relative;
|
3133 |
-
flex-grow: 0;
|
3134 |
-
padding-top: 15px;
|
3135 |
-
font-weight: bold;
|
3136 |
-
width: 70px;
|
3137 |
-
}
|
3138 |
-
.imagify-price-discount:before {
|
3139 |
-
content: "";
|
3140 |
-
position: absolute;
|
3141 |
-
top: 25px;
|
3142 |
-
width: 62%;
|
3143 |
-
height: 2px;
|
3144 |
-
background: #2E3243;
|
3145 |
-
transform: rotate(-15deg);
|
3146 |
-
}
|
3147 |
-
.imagify-offer-onetimes .imagify-price-discount:before {
|
3148 |
-
width: 100%;
|
3149 |
-
}
|
3150 |
-
.imagify-price-discount-dollar {
|
3151 |
-
color: #2E3243;
|
3152 |
-
}
|
3153 |
-
.imagify-price-discount-number {
|
3154 |
-
color: #8BA6B4;
|
3155 |
-
}
|
3156 |
-
.imagify-offer-selected .imagify-price-discount-number {
|
3157 |
-
color: #FFF;
|
3158 |
-
}
|
3159 |
-
span.imagify-dollars {
|
3160 |
-
color: #1F2332;
|
3161 |
-
font-size: 18px;
|
3162 |
-
font-weight: bold;
|
3163 |
-
vertical-align: -2px;
|
3164 |
-
}
|
3165 |
-
.imagify-offer-onetime .imagify-col-price {
|
3166 |
-
padding-top: 0;
|
3167 |
-
}
|
3168 |
-
.imagify-offer-onetime .imagify-dollars {
|
3169 |
-
vertical-align: -1px;
|
3170 |
-
}
|
3171 |
-
.imagify-price-big,
|
3172 |
-
.imagify-price-mini {
|
3173 |
-
color: #40B1D0;
|
3174 |
-
font-weight: bold;
|
3175 |
-
}
|
3176 |
-
.imagify-price-big {
|
3177 |
-
font-size: 36px;
|
3178 |
-
}
|
3179 |
-
span.imagify-price-mini {
|
3180 |
-
font-size: 18px;
|
3181 |
-
vertical-align: 2px;
|
3182 |
-
}
|
3183 |
-
span.imagify-price-by {
|
3184 |
-
font-size: 10px;
|
3185 |
-
color: #1F2332;
|
3186 |
-
vertical-align: -13px;
|
3187 |
-
text-indent: -27px;
|
3188 |
-
}
|
3189 |
-
|
3190 |
-
.imagify-col-other-actions {
|
3191 |
-
width: 18.5%;
|
3192 |
-
text-align: right;
|
3193 |
-
}
|
3194 |
-
.imagify-col-other-actions a {
|
3195 |
-
font-size: 11px;
|
3196 |
-
}
|
3197 |
-
|
3198 |
-
/* Offer selected */
|
3199 |
-
.imagify-offer-selected,
|
3200 |
-
.imagify-offer-selected .imagify-offer-title,
|
3201 |
-
.imagify-offer-selected .imagify-offer-size,
|
3202 |
-
.imagify-offer-selected .imagify-price-big,
|
3203 |
-
.imagify-offer-selected .imagify-price-mini,
|
3204 |
-
.imagify-offer-selected .imagify-price-complement,
|
3205 |
-
.imagify-offer-selected .imagify-col-other-actions a {
|
3206 |
-
color: #FFF;
|
3207 |
-
}
|
3208 |
-
.imagify-offer-selected .imagify-offer-header,
|
3209 |
-
.imagify-offer-selected .imagify-offer-header .imagify-inline-options input[type="radio"]:not(:checked) + label {
|
3210 |
-
background: #338EA6;
|
3211 |
-
}
|
3212 |
-
.imagify-offer-selected .imagify-offer-header .imagify-inline-options input[type="radio"]:checked + label {
|
3213 |
-
background: #40B1D0;
|
3214 |
-
}
|
3215 |
-
.imagify-offer-selected .imagify-offer-content {
|
3216 |
-
background: #40B1D0;
|
3217 |
-
}
|
3218 |
-
.imagify-offer-selected .imagify-checkbox.imagify-checkbox:not(:checked) + label:before,
|
3219 |
-
.imagify-offer-selected .imagify-checkbox.imagify-checkbox:checked + label:before {
|
3220 |
-
border-color: #FFF;
|
3221 |
-
background: #40B1D0;
|
3222 |
-
}
|
3223 |
-
.imagify-offer-selected .imagify-offer-by {
|
3224 |
-
color: #2E3243;
|
3225 |
-
}
|
3226 |
-
|
3227 |
-
.imagify-enough-title {
|
3228 |
-
display: none;
|
3229 |
-
}
|
3230 |
-
.imagify-enough-free .imagify-not-enough-title {
|
3231 |
-
display: none;
|
3232 |
-
}
|
3233 |
-
.imagify-enough-free .imagify-enough-title {
|
3234 |
-
display: block;
|
3235 |
-
}
|
3236 |
-
|
3237 |
-
.imagify-submit-line {
|
3238 |
-
display: -webkit-box;
|
3239 |
-
display: -ms-flexbox;
|
3240 |
-
display: flex;
|
3241 |
-
-webkit-box-pack: justify;
|
3242 |
-
-ms-flex-pack: justify;
|
3243 |
-
justify-content: space-between;
|
3244 |
-
-webkit-box-align: center;
|
3245 |
-
-ms-flex-align: center;
|
3246 |
-
align-items: center;
|
3247 |
-
margin: 2em 0;
|
3248 |
-
text-align: left;
|
3249 |
-
}
|
3250 |
-
.imagify-coupon-section {
|
3251 |
-
display: -webkit-box;
|
3252 |
-
display: -ms-flexbox;
|
3253 |
-
display: flex;
|
3254 |
-
-webkit-box-align: center;
|
3255 |
-
-ms-flex-align: center;
|
3256 |
-
align-items: center;
|
3257 |
-
}
|
3258 |
-
.imagify-coupon-section p {
|
3259 |
-
margin: 0;
|
3260 |
-
line-height: 1.3;
|
3261 |
-
}
|
3262 |
-
.imagify-coupon-text {
|
3263 |
-
width: 200px;
|
3264 |
-
max-width: 100%;
|
3265 |
-
padding-right: 15px;
|
3266 |
-
}
|
3267 |
-
.imagify-coupon-loader {
|
3268 |
-
display: none;
|
3269 |
-
}
|
3270 |
-
.imagify-coupon-text.checking {
|
3271 |
-
text-align: right;
|
3272 |
-
}
|
3273 |
-
.imagify-coupon-text.checking .imagify-coupon-loader {
|
3274 |
-
display: inline;
|
3275 |
-
}
|
3276 |
-
.imagify-coupon-text.checking label {
|
3277 |
-
display: none;
|
3278 |
-
}
|
3279 |
-
.imagify-coupon-input {
|
3280 |
-
position: relative;
|
3281 |
-
}
|
3282 |
-
.imagify-coupon-input input {
|
3283 |
-
position: relative;
|
3284 |
-
z-index: 1;
|
3285 |
-
}
|
3286 |
-
[id="imagify-coupon-validate"].button-secondary {
|
3287 |
-
position: absolute;
|
3288 |
-
top: 1px;
|
3289 |
-
right: 3px;
|
3290 |
-
bottom: 2px;
|
3291 |
-
box-shadow: none;
|
3292 |
-
padding: 4px 10px;
|
3293 |
-
z-index: 0;
|
3294 |
-
transition: transform .275s;
|
3295 |
-
}
|
3296 |
-
.imagify-canbe-validate [id="imagify-coupon-validate"] {
|
3297 |
-
transform: translateX(45px);
|
3298 |
-
}
|
3299 |
-
|
3300 |
-
/* Promotion/Discount section */
|
3301 |
-
.imagify-modal-section + .imagify-modal-promotion {
|
3302 |
-
margin-top: -1em;
|
3303 |
-
}
|
3304 |
-
.imagify-modal-promotion {
|
3305 |
-
position: relative;
|
3306 |
-
overflow: hidden;
|
3307 |
-
display: none;
|
3308 |
-
align-items: center;
|
3309 |
-
padding: 15px 25px;
|
3310 |
-
background: #604D90;
|
3311 |
-
text-shadow: 0 0 3px rgba(0, 0, 0, 0.3);
|
3312 |
-
}
|
3313 |
-
.imagify-modal-promotion.active {
|
3314 |
-
display: -webkit-box;
|
3315 |
-
display: -ms-flexbox;
|
3316 |
-
display: flex;
|
3317 |
-
}
|
3318 |
-
[id="imagify-pricing-tab-onetime"] .imagify-modal-promotion {
|
3319 |
-
margin-bottom: 4em;
|
3320 |
-
}
|
3321 |
-
.imagify-modal-promotion:before {
|
3322 |
-
content: "\f488";
|
3323 |
-
position: absolute;
|
3324 |
-
top: 28px;
|
3325 |
-
left: 8%;
|
3326 |
-
font-family: "dashicons";
|
3327 |
-
font-size: 90px;
|
3328 |
-
color: #8476A9;
|
3329 |
-
text-shadow: none;
|
3330 |
-
}
|
3331 |
-
.imagify-modal-promotion p {
|
3332 |
-
position: relative;
|
3333 |
-
margin: .2em 0;
|
3334 |
-
color: #FFF;
|
3335 |
-
}
|
3336 |
-
.imagify-promo-title {
|
3337 |
-
-ms-flex-preferred-size: 100%;
|
3338 |
-
flex-basis: 100%;
|
3339 |
-
text-transform: uppercase;
|
3340 |
-
font-size: 20px;
|
3341 |
-
font-weight: bold;
|
3342 |
-
letter-spacing: 0.125em;
|
3343 |
-
}
|
3344 |
-
.imagify-until-date {
|
3345 |
-
-ms-flex-preferred-size: 200px;
|
3346 |
-
flex-basis: 200px;
|
3347 |
-
text-align: right;
|
3348 |
-
}
|
3349 |
-
.imagify-until-date strong {
|
3350 |
-
color: #FFF;
|
3351 |
-
}
|
3352 |
-
|
3353 |
-
|
3354 |
-
.imagify-submit-line button {
|
3355 |
-
font-size: 16px;
|
3356 |
-
}
|
3357 |
-
input.imagify-coupon-code {
|
3358 |
-
padding: 10px;
|
3359 |
-
border: 2px solid #7A8996;
|
3360 |
-
font-size: 0.875em;
|
3361 |
-
font-weight: bold;
|
3362 |
-
border-radius: 3px;
|
3363 |
-
}
|
3364 |
-
.validated.imagify-coupon-section .imagify-coupon-text,
|
3365 |
-
.validated.imagify-coupon-section strong {
|
3366 |
-
color: #8BC34A;
|
3367 |
-
}
|
3368 |
-
.validated.imagify-coupon-section .imagify-coupon-code {
|
3369 |
-
color: #8BC34A;
|
3370 |
-
border-color: #8BC34A;
|
3371 |
-
}
|
3372 |
-
.invalid.imagify-coupon-section .imagify-coupon-text,
|
3373 |
-
.invalid.imagify-coupon-section strong {
|
3374 |
-
color: #d0021b;
|
3375 |
-
}
|
3376 |
-
.invalid.imagify-coupon-section .imagify-coupon-code {
|
3377 |
-
color: #d0021b;
|
3378 |
-
border-color: #d0021b;
|
3379 |
-
}
|
3380 |
-
.imagify-footer-lines {
|
3381 |
-
width: 500px;
|
3382 |
-
max-width: 100%;
|
3383 |
-
margin: 2em auto 2.5em;
|
3384 |
-
font-size: 0.85em;
|
3385 |
-
line-height: 1.5;
|
3386 |
-
}
|
3387 |
-
|
3388 |
-
/* Year selected */
|
3389 |
-
.imagify-year-selected .imagify-switch-my .imagify-yearly {
|
3390 |
-
display: block;
|
3391 |
-
}
|
3392 |
-
.imagify-year-selected .imagify-switch-my .imagify-monthly {
|
3393 |
-
display: none;
|
3394 |
-
}
|
3395 |
-
/* Month selected */
|
3396 |
-
.imagify-month-selected .imagify-switch-my .imagify-yearly {
|
3397 |
-
display: none;
|
3398 |
-
}
|
3399 |
-
.imagify-month-selected .imagify-switch-my .imagify-monthly {
|
3400 |
-
display: block;
|
3401 |
-
}
|
3402 |
-
|
3403 |
-
/* Flexbox table */
|
3404 |
-
.imagify-flex-table {
|
3405 |
-
-webkit-box-align: center;
|
3406 |
-
-webkit-align-items: center;
|
3407 |
-
-ms-flex-align: center;
|
3408 |
-
align-items: center;
|
3409 |
-
}
|
3410 |
-
.imagify-flex-table > * {
|
3411 |
-
-webkit-box-flex: 1;
|
3412 |
-
-webkit-flex-grow: 1;
|
3413 |
-
-ms-flex-positive: 1;
|
3414 |
-
flex-grow: 1;
|
3415 |
-
padding: 7px 15px;
|
3416 |
-
}
|
3417 |
-
|
3418 |
-
/* Pricing table */
|
3419 |
-
div.imagify-col-details {
|
3420 |
-
width: 22%;
|
3421 |
-
padding-left: 25px;
|
3422 |
-
}
|
3423 |
-
.imagify-col-details p {
|
3424 |
-
margin: 0;
|
3425 |
-
}
|
3426 |
-
.imagify-pricing-table {
|
3427 |
-
margin: 0 20px;
|
3428 |
-
}
|
3429 |
-
.imagify-pricing-table .imagify-offer-line {
|
3430 |
-
padding: .6em 0;
|
3431 |
-
border: 2px solid #E8EEF0;
|
3432 |
-
text-align: left;
|
3433 |
-
border-radius: 3px;
|
3434 |
-
}
|
3435 |
-
.imagify-pricing-table .imagify-offer-line:first-child {
|
3436 |
-
margin-top: .75em;
|
3437 |
-
}
|
3438 |
-
.imagify-pricing-table .imagify-offer-line.imagify-offer-selected:first-child {
|
3439 |
-
margin-top: 1.75em;
|
3440 |
-
}
|
3441 |
-
.imagify-pricing-table .imagify-offer-line + .imagify-offer-line {
|
3442 |
-
margin-top: -2px;
|
3443 |
-
}
|
3444 |
-
.imagify-pricing-table .imagify-col-other-actions {
|
3445 |
-
width: 20.5%;
|
3446 |
-
}
|
3447 |
-
.imagify-pricing-table .imagify-approx {
|
3448 |
-
margin-left: 0;
|
3449 |
-
line-height: 0.5;
|
3450 |
-
margin-bottom: 1em;
|
3451 |
-
}
|
3452 |
-
.imagify-pricing-table .imagify-offer-selected {
|
3453 |
-
-webkit-transform: scale(1.03);
|
3454 |
-
transform: scale(1.03);
|
3455 |
-
background: #40B1D0;
|
3456 |
-
border-width: 0;
|
3457 |
-
}
|
3458 |
-
.imagify-pricing-table .imagify-offer-selected .imagify-approx {
|
3459 |
-
color: #FFF;
|
3460 |
-
}
|
3461 |
-
.imagify-pricing-table .imagify-button-secondary {
|
3462 |
-
padding: 3px 20px;
|
3463 |
-
box-shadow: none;
|
3464 |
-
text-transform: uppercase;
|
3465 |
-
font-size: 12px;
|
3466 |
-
letter-spacing: 0.025em;
|
3467 |
-
}
|
3468 |
-
.imagify-offer-selected.imagify-offer-selected .imagify-button-secondary {
|
3469 |
-
border: 2px solid #FFF;
|
3470 |
-
background: #40B1D0;
|
3471 |
-
box-shadow: none;
|
3472 |
-
text-shadow: none!important;
|
3473 |
-
}
|
3474 |
-
.imagify-offer-selected.imagify-offer-selected .imagify-button-secondary:hover,
|
3475 |
-
.imagify-offer-selected.imagify-offer-selected .imagify-button-secondary:focus {
|
3476 |
-
background: #FFF;
|
3477 |
-
color: #40B1D0;
|
3478 |
-
}
|
3479 |
-
|
3480 |
-
.imagify-col .imagify-special-needs {
|
3481 |
-
margin-left: 25px;
|
3482 |
-
}
|
3483 |
-
.imagify-special-needs strong {
|
3484 |
-
font-size: 25px;
|
3485 |
-
font-weight: bold;
|
3486 |
-
color: #40B1D0;
|
3487 |
-
}
|
3488 |
-
.imagify-special-needs span {
|
3489 |
-
display: block;
|
3490 |
-
font-size: 12px;
|
3491 |
-
margin-top: -.5em;
|
3492 |
-
}
|
3493 |
-
div.imagify-col-price {
|
3494 |
-
position: relative;
|
3495 |
-
}
|
3496 |
-
|
3497 |
-
/* we recommend line */
|
3498 |
-
.imagify-recommend {
|
3499 |
-
display: none;
|
3500 |
-
position: absolute;
|
3501 |
-
left: -20px; bottom: 100%;
|
3502 |
-
padding: 0;
|
3503 |
-
margin-bottom: 8px;
|
3504 |
-
color: #1F2332;
|
3505 |
-
font-weight: bold;
|
3506 |
-
font-style: italic;
|
3507 |
-
}
|
3508 |
-
.imagify-offer-selected .imagify-recommend {
|
3509 |
-
display: block;
|
3510 |
-
}
|
3511 |
-
[class*="imagify-onetime-"] .imagify-recommend {
|
3512 |
-
left: 65px;
|
3513 |
-
margin-bottom: 20px;
|
3514 |
-
}
|
3515 |
-
.imagify-recommend:before {
|
3516 |
-
content: "";
|
3517 |
-
position: absolute;
|
3518 |
-
top: 7px; left: -35px;
|
3519 |
-
width: 29px; height: 30px;
|
3520 |
-
background: url("../images/icon-arrow-choice.png") scroll 0 no-repeat;
|
3521 |
-
background-size: contain;
|
3522 |
-
}
|
3523 |
-
@media only screen and (min-resolution: 192dpi), only screen and (min-resolution: 2dppx) {
|
3524 |
-
.imagify-recommend:before {
|
3525 |
-
background-image: url("../images/icon-arrow-choice.svg");
|
3526 |
-
}
|
3527 |
-
}
|
3528 |
-
|
3529 |
-
/* One Time Adjustments */
|
3530 |
-
.imagify-offer-line[class*="imagify-onetime-"] {
|
3531 |
-
padding: 0;
|
3532 |
-
margin: .3em 0 0;
|
3533 |
-
}
|
3534 |
-
.imagify-offer-line.imagify-offer-line[class*="imagify-onetime-"]:first-child {
|
3535 |
-
margin-top: 2em;
|
3536 |
-
}
|
3537 |
-
.imagify-offer-line[class*="imagify-onetime-"] + .imagify-offer-line {
|
3538 |
-
margin-top: .5em;
|
3539 |
-
}
|
3540 |
-
.imagify-offer-selected.imagify-offer-line[class*="imagify-onetime-"] {
|
3541 |
-
-webkit-transform: scale(1);
|
3542 |
-
transform: scale(1);
|
3543 |
-
border-width: 2px;
|
3544 |
-
}
|
3545 |
-
|
3546 |
-
/* cols */
|
3547 |
-
.imagify-offer-line[class*="imagify-onetime-"] .imagify-col-details {
|
3548 |
-
position: relative;
|
3549 |
-
overflow: hidden;
|
3550 |
-
width: 21%;
|
3551 |
-
background: #1F2332;
|
3552 |
-
color: #FFF;
|
3553 |
-
}
|
3554 |
-
.imagify-offer-selected.imagify-offer-line[class*="imagify-onetime-"] .imagify-col-details {
|
3555 |
-
background: #338EA6;
|
3556 |
-
}
|
3557 |
-
.imagify-offer-line[class*="imagify-onetime-"] .imagify-col-details:before {
|
3558 |
-
content: "";
|
3559 |
-
position: absolute;
|
3560 |
-
bottom: 0; right: 25px;
|
3561 |
-
width: 75px; height: 54px;
|
3562 |
-
background: url("../images/icon-pack.png");
|
3563 |
-
}
|
3564 |
-
.imagify-offer-line[class*="imagify-onetime-"] .imagify-col-other-actions {
|
3565 |
-
width: 30%;
|
3566 |
}
|
3567 |
|
3568 |
-
.imagify-
|
3569 |
-
.imagify-
|
3570 |
-
|
3571 |
-
}
|
3572 |
-
.imagify-offer-line[class*="imagify-onetime-"] .imagify-offer-size {
|
3573 |
-
font-size: 24px;
|
3574 |
-
}
|
3575 |
-
.imagify-offer-line[class*="imagify-onetime-"] .imagify-approx {
|
3576 |
-
font-size: 12px;
|
3577 |
-
}
|
3578 |
-
.imagify-offer-line[class*="imagify-onetime-"] .imagify-price-block {
|
3579 |
-
padding-left: 10px;
|
3580 |
-
}
|
3581 |
-
.imagify-offer-line[class*="imagify-onetime-"] .imagify-dollars {
|
3582 |
-
vertical-align: middle;
|
3583 |
-
}
|
3584 |
-
.imagify-offer-line[class*="imagify-onetime-"] .imagify-price-big {
|
3585 |
-
vertical-align: -5px;
|
3586 |
-
}
|
3587 |
-
.imagify-offer-line[class*="imagify-onetime-"] .imagify-price-mini {
|
3588 |
-
vertical-align: 7px;
|
3589 |
}
|
3590 |
|
3591 |
-
/*
|
3592 |
-
.imagify-
|
3593 |
-
|
3594 |
-
list-style: none;
|
3595 |
-
background: #E5EBEF;
|
3596 |
-
}
|
3597 |
-
.imagify-modal-content .imagify-tabs {
|
3598 |
-
margin: 1em 0 0;
|
3599 |
-
}
|
3600 |
-
.imagify-tab {
|
3601 |
-
-webkit-box-flex: 1;
|
3602 |
-
-webkit-flex-grow: 1;
|
3603 |
-
-ms-flex-positive: 1;
|
3604 |
-
flex-grow: 1;
|
3605 |
width: 50%;
|
3606 |
-
margin: 0;
|
3607 |
-
font-size: 23px;
|
3608 |
-
}
|
3609 |
-
.imagify-tab a {
|
3610 |
-
display: block;
|
3611 |
-
padding: 15px 10px;
|
3612 |
-
color: inherit;
|
3613 |
-
text-decoration: none;
|
3614 |
-
}
|
3615 |
-
.imagify-tab a:focus {
|
3616 |
-
box-shadow: none;
|
3617 |
-
outline: none;
|
3618 |
-
color: #40B1D8;
|
3619 |
-
}
|
3620 |
-
.imagify-tab.imagify-current a {
|
3621 |
-
background: #F6F7FB;
|
3622 |
-
}
|
3623 |
-
.imagify-tab-content.imagify-current {
|
3624 |
-
display: block;
|
3625 |
-
}
|
3626 |
-
.imagify-tab-content {
|
3627 |
-
display: none;
|
3628 |
-
}
|
3629 |
-
.imagify-tab-content .imagify-modal-section:first-child {
|
3630 |
-
margin-top: 0;
|
3631 |
-
}
|
3632 |
-
|
3633 |
-
/* Modal sidebar */
|
3634 |
-
.imagify-modal-sidebar-content,
|
3635 |
-
.imagify-payment-modal .imagify-modal-sidebar {
|
3636 |
-
display: -webkit-box;
|
3637 |
-
display: -webkit-flex;
|
3638 |
-
display: -ms-flexbox;
|
3639 |
-
display: flex;
|
3640 |
-
-webkit-box-orient: vertical;
|
3641 |
-
-webkit-box-direction: normal;
|
3642 |
-
-webkit-flex-direction: column;
|
3643 |
-
-ms-flex-direction: column;
|
3644 |
-
flex-direction: column;
|
3645 |
-
}
|
3646 |
-
.imagify-modal-sidebar-content {
|
3647 |
-
-webkit-box-flex: 1;
|
3648 |
-
-webkit-flex-grow: 1;
|
3649 |
-
-ms-flex-positive: 1;
|
3650 |
-
flex-grow: 1;
|
3651 |
-
}
|
3652 |
-
p.imagify-modal-sidebar-title {
|
3653 |
-
margin-top: 5px;
|
3654 |
-
padding-right: 40px;
|
3655 |
-
font-size: 18px;
|
3656 |
-
color: #FFF;
|
3657 |
-
}
|
3658 |
-
.imagify-modal-testimony {
|
3659 |
-
margin-top: 1em;
|
3660 |
-
}
|
3661 |
-
.imagify-modal-testimony + .imagify-modal-testimony {
|
3662 |
-
margin-top: 2em;
|
3663 |
-
}
|
3664 |
-
@media (max-height:620px) {
|
3665 |
-
.imagify-modal-testimony + .imagify-modal-testimony {
|
3666 |
-
display: none;
|
3667 |
-
}
|
3668 |
-
}
|
3669 |
-
.imagify-modal-testimony-person {
|
3670 |
-
display: table;
|
3671 |
-
width: 100%;
|
3672 |
-
}
|
3673 |
-
.imagify-modal-testimony-person > * {
|
3674 |
-
display: table-cell;
|
3675 |
-
vertical-align: middle;
|
3676 |
-
}
|
3677 |
-
.imagify-modal-avatar {
|
3678 |
-
width: 114px;
|
3679 |
-
line-height: 0;
|
3680 |
-
}
|
3681 |
-
.imagify-modal-avatar img {
|
3682 |
-
border: 2px solid #FFF;
|
3683 |
-
border-radius: 50%;
|
3684 |
-
width: 96px; height: 96px;
|
3685 |
-
}
|
3686 |
-
.imagify-modal-identity a {
|
3687 |
-
text-decoration: none;
|
3688 |
-
font-weight: bold;
|
3689 |
-
}
|
3690 |
-
.imagify-modal-identity a:first-child {
|
3691 |
-
font-size: 13px;
|
3692 |
-
}
|
3693 |
-
.imagify-modal-identity a:first-child + a {
|
3694 |
-
display: block;
|
3695 |
-
font-size: 10px;
|
3696 |
-
color: #7A8996;
|
3697 |
-
}
|
3698 |
-
.imagify-modal-testimony-content p {
|
3699 |
-
font-size: 13px;
|
3700 |
-
font-style: italic;
|
3701 |
-
line-height: 1.7;
|
3702 |
-
color: #7A8996;
|
3703 |
-
}
|
3704 |
-
.imagify-modal-sidebar-trust {
|
3705 |
-
margin-top: auto;
|
3706 |
-
padding-top: 1.5em;
|
3707 |
-
}
|
3708 |
-
.imagify-modal-sidebar-trust p {
|
3709 |
-
margin: 0;
|
3710 |
-
font-weight: bold;
|
3711 |
-
font-size: 12px;
|
3712 |
-
line-height: 1.7;
|
3713 |
-
}
|
3714 |
-
.imagify-modal-sidebar-trust p img {
|
3715 |
-
margin-right: 3px;
|
3716 |
-
vertical-align: -2px;
|
3717 |
-
}
|
3718 |
-
.imagify-modal-sidebar-trust p + p {
|
3719 |
-
font-size: 11px;
|
3720 |
-
}
|
3721 |
-
|
3722 |
-
/* Cart */
|
3723 |
-
.imagify-cart {
|
3724 |
-
text-align: left;
|
3725 |
-
}
|
3726 |
-
.imagify-cart .imagify-cart-list {
|
3727 |
-
border-top: 1px solid rgba(122, 137, 150, .2);
|
3728 |
-
border-bottom: 1px solid rgba(122, 137, 150, .2);
|
3729 |
-
}
|
3730 |
-
.imagify-cart .imagify-cart-label {
|
3731 |
-
margin-bottom: 0.5em;
|
3732 |
-
font-size: 10px;
|
3733 |
-
color: #2E3243;
|
3734 |
-
}
|
3735 |
-
.imagify-cart-list p {
|
3736 |
-
margin: 0;
|
3737 |
-
font-weight: bold;
|
3738 |
-
}
|
3739 |
-
.imagify-cart-item {
|
3740 |
-
margin: .4em 0;
|
3741 |
-
}
|
3742 |
-
.imagify-cart .imagify-cart-suggestion {
|
3743 |
-
margin-top: -.3em;
|
3744 |
-
}
|
3745 |
-
.imagify-cart-suggestion a,
|
3746 |
-
.imagify-cl-description p {
|
3747 |
-
font-size: 10px;
|
3748 |
-
}
|
3749 |
-
.imagify-remove-from-cart {
|
3750 |
-
border: 0;
|
3751 |
-
padding: 0;
|
3752 |
-
width: 14px;
|
3753 |
-
height: 14px;
|
3754 |
-
line-height: 13px;
|
3755 |
-
border-radius: 50%;
|
3756 |
-
background: #40B1D0;
|
3757 |
-
cursor: pointer;
|
3758 |
-
transition: background .3s;
|
3759 |
-
}
|
3760 |
-
.imagify-remove-from-cart i:before {
|
3761 |
-
position: relative;
|
3762 |
-
top: -6px; left: -3px;
|
3763 |
-
font-size: 13px;
|
3764 |
-
color: #FFF;
|
3765 |
-
}
|
3766 |
-
.imagify-remove-from-cart:hover,
|
3767 |
-
.imagify-remove-from-cart:focus {
|
3768 |
-
background: #D0021B;
|
3769 |
-
}
|
3770 |
-
|
3771 |
-
/* col sizes */
|
3772 |
-
.imagify-cart .imagify-cl-remove {
|
3773 |
-
-webkit-box-flex: 0;
|
3774 |
-
-webkit-flex-grow: 0;
|
3775 |
-
-ms-flex-positive: 0;
|
3776 |
-
flex-grow: 0;
|
3777 |
-
width: 45px;
|
3778 |
-
}
|
3779 |
-
.imagify-cart .imagify-cl-name {
|
3780 |
-
-webkit-box-flex: 0;
|
3781 |
-
-webkit-flex-grow: 0;
|
3782 |
-
-ms-flex-positive: 0;
|
3783 |
-
flex-grow: 0;
|
3784 |
-
width: 200px;
|
3785 |
-
}
|
3786 |
-
.imagify-cart .imagify-cl-description {
|
3787 |
-
-webkit-align-self: flex-start;
|
3788 |
-
-ms-flex-item-align: start;
|
3789 |
-
align-self: flex-start;
|
3790 |
-
padding-top: 10px;
|
3791 |
-
}
|
3792 |
-
.imagify-cart .imagify-cl-price {
|
3793 |
-
text-align: right;
|
3794 |
-
}
|
3795 |
-
|
3796 |
-
#imagify-payment-iframe {
|
3797 |
-
width: 980px;
|
3798 |
-
height: 672px;
|
3799 |
-
background: #f6f7fb url(../images/loader-balls.svg) 50% 50% no-repeat;
|
3800 |
-
}
|
3801 |
-
|
3802 |
-
.imagify-success-view {
|
3803 |
-
display: -webkit-box;
|
3804 |
-
display: -webkit-flex;
|
3805 |
-
display: -ms-flexbox;
|
3806 |
-
display: flex;
|
3807 |
-
-webkit-box-align: center;
|
3808 |
-
-webkit-align-items: center;
|
3809 |
-
-ms-flex-align: center;
|
3810 |
-
align-items: center;
|
3811 |
-
-webkit-box-orient: vertical;
|
3812 |
-
-webkit-box-direction: normal;
|
3813 |
-
-webkit-flex-direction: column;
|
3814 |
-
-ms-flex-direction: column;
|
3815 |
-
flex-direction: column;
|
3816 |
-
-webkit-box-pack: center;
|
3817 |
-
-webkit-justify-content: center;
|
3818 |
-
-ms-flex-pack: center;
|
3819 |
-
justify-content: center;
|
3820 |
-
height: 100%;
|
3821 |
-
}
|
3822 |
-
.imagify-success-view p {
|
3823 |
-
font-weight: bold;
|
3824 |
-
font-size: 16px;
|
3825 |
-
}
|
3826 |
-
|
3827 |
-
/* Imagify cart item removing */
|
3828 |
-
.imagify-cart-emptied-item {
|
3829 |
-
margin: .3em auto;
|
3830 |
-
padding: 6px 20px;
|
3831 |
-
background: #E6EBEF;
|
3832 |
-
border-radius: 20px;
|
3833 |
-
}
|
3834 |
-
.imagify-cart-emptied-item.imagify-cart-emptied-item p {
|
3835 |
-
font-weight: bold;
|
3836 |
}
|
3837 |
-
.imagify-
|
3838 |
-
|
3839 |
-
|
3840 |
-
|
3841 |
}
|
1 |
/**
|
2 |
+
* == Utilities Classes
|
3 |
*/
|
4 |
|
5 |
/* Util: float */
|
94 |
padding-top: 0;
|
95 |
}
|
96 |
|
97 |
+
/* When an "Imagify" modal is open in a page */
|
98 |
body.imagify-modal-is-open {
|
99 |
overflow: hidden;
|
100 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
101 |
|
102 |
+
/* Loader/Spinner */
|
103 |
.imagify-spinner {
|
104 |
display: inline-block;
|
105 |
width: 20px;
|
114 |
margin: 4px 0 0 0;
|
115 |
}
|
116 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
117 |
/* Some basic colors */
|
118 |
.imagify-primary.imagify-primary.imagify-primary {
|
119 |
color: #40b1d0;
|
120 |
}
|
121 |
+
.imagify-secondary.imagify-secondary.imagify-secondary,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
122 |
.imagify-valid {
|
123 |
color: #8BC34A;
|
124 |
}
|
125 |
|
126 |
+
/* Informations in column (media popin, media details) */
|
127 |
+
.misc-pub-section.misc-pub-imagify h4 {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
128 |
font-size: 14px;
|
129 |
+
margin-top: 5px;
|
130 |
+
margin-bottom: 0;
|
|
|
|
|
|
|
|
|
131 |
}
|
132 |
|
133 |
+
/* Doughnut */
|
134 |
+
.imagify-chart {
|
135 |
+
width: 33.33%;
|
136 |
+
position: relative;
|
|
|
|
|
|
|
137 |
}
|
138 |
|
139 |
.imagify-chart {
|
140 |
float: left;
|
141 |
margin-bottom: 20px;
|
142 |
}
|
|
|
|
|
|
|
|
|
143 |
|
144 |
.imagify-chart-container {
|
145 |
position: relative;
|
147 |
float: left;
|
148 |
margin-right: 20px;
|
149 |
}
|
150 |
+
|
151 |
+
/* On library page */
|
152 |
+
td .imagify-chart {
|
153 |
+
top: 4px;
|
154 |
+
float: none;
|
155 |
+
margin-bottom: 0;
|
|
|
|
|
|
|
156 |
}
|
157 |
+
|
158 |
td .imagify-chart-container {
|
159 |
width: 18px;
|
160 |
height: 18px;
|
161 |
float: none;
|
162 |
margin-right: 10px;
|
163 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
164 |
|
165 |
/**
|
166 |
*
|
169 |
*/
|
170 |
|
171 |
|
172 |
+
/* Basic HTML elements for Options and Bulk pages */
|
|
|
173 |
.imagify-settings a,
|
174 |
.imagify-settings .button,
|
175 |
.imagify-settings input,
|
183 |
color: #40b1d0;
|
184 |
}
|
185 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
186 |
.imagify-settings,
|
187 |
.imagify-settings p,
|
188 |
.imagify-settings th {
|
189 |
color: #5F758E;
|
190 |
}
|
191 |
+
|
192 |
+
/* Buttons */
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
193 |
.imagify-settings .button,
|
194 |
.imagify-welcome .button,
|
195 |
.imagify-notice .button,
|
207 |
transition: all .275s;
|
208 |
}
|
209 |
|
|
|
|
|
|
|
|
|
210 |
.button-primary.button-mini {
|
211 |
padding: 2px 10px;
|
212 |
}
|
252 |
.imagify-button-medium.imagify-button-ghost {
|
253 |
border-width: 2px;
|
254 |
}
|
255 |
+
[class*="imagify-"] .button .dashicons {
|
256 |
margin-right: 5px;
|
257 |
vertical-align: middle;
|
258 |
}
|
259 |
+
|
260 |
.imagify-settings .button-primary.button-primary,
|
261 |
.imagify-welcome .button-primary.button-primary,
|
262 |
.imagify-button-primary.imagify-button-primary {
|
319 |
.imagify-button-secondary.imagify-button-secondary .dashicons {
|
320 |
vertical-align: middle;
|
321 |
}
|
322 |
+
|
323 |
+
[class*="imagify-"] .button-text {
|
324 |
display: inline-block;
|
325 |
vertical-align: middle;
|
326 |
}
|
327 |
|
328 |
+
/* Exception in Medias edition page and post Edition pages (insert media popin) */
|
|
|
|
|
|
|
|
|
329 |
.wp_attachment_image .imagify-button-primary,
|
330 |
.media-frame-content .imagify-button-primary {
|
|
|
331 |
padding: 0 10px 1px;
|
332 |
margin: 0 5px 2px 0;
|
333 |
font-size: 13px;
|
334 |
line-height: 26px;
|
335 |
box-shadow: 0 3px 0 rgba(51, 142, 166, 1);
|
336 |
}
|
337 |
+
.wp_attachment_image .imagify-button-primary {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
338 |
float: left;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
339 |
}
|
340 |
|
341 |
+
/**
|
342 |
+
* == Header & Subheader & Sections
|
343 |
+
*
|
344 |
+
* (options, Welcome Notice, Bulk)
|
345 |
+
*/
|
346 |
.imagify-title.imagify-title {
|
347 |
position: relative;
|
348 |
padding: 30px 50px;
|
350 |
background: #2E3243;
|
351 |
color: #FFF;
|
352 |
}
|
353 |
+
.imagify-settings .imagify-title { /* (options and bulk) */
|
354 |
+
display: flex;
|
355 |
+
justify-content: space-between;
|
356 |
+
align-items: center;
|
357 |
+
}
|
358 |
+
.imagify-settings .imagify-logo-block {
|
359 |
+
flex-shrink: 0;
|
360 |
+
flex-grow: 0;
|
361 |
+
margin-right: 35px;
|
362 |
+
}
|
363 |
.imagify-settings .imagify-title + .imagify-notice {
|
364 |
margin: 0;
|
365 |
border-right: 1px solid #D9D9D9;
|
394 |
.imagify-section-gray .imagify-count-title {
|
395 |
color: #4a4a4a;
|
396 |
}
|
|
|
397 |
.imagify-section p:first-child {
|
398 |
margin-top: 0;
|
399 |
}
|
400 |
.imagify-section p:last-child {
|
401 |
margin-bottom: 0;
|
402 |
}
|
|
|
|
|
|
|
|
|
|
|
403 |
|
404 |
+
@media (max-width: 1120px) {
|
405 |
+
.imagify-settings .imagify-title {
|
406 |
+
flex-wrap: wrap;
|
|
|
|
|
|
|
|
|
407 |
}
|
408 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
409 |
|
410 |
+
.imagify-settings-section {
|
411 |
+
padding: 10px 20px;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
412 |
}
|
413 |
+
[id="imagify-settings"],
|
414 |
+
.imagify-welcome .imagify-settings-section {
|
415 |
+
border: 1px solid #D9D9D9;
|
416 |
+
border-top: 0 none;
|
417 |
+
background: #FFF;
|
418 |
}
|
419 |
+
.imagify-br {
|
420 |
+
line-height: 2;
|
|
|
|
|
|
|
421 |
}
|
422 |
|
423 |
+
/* New to imagify, title */
|
424 |
+
p.imagify-section-title.imagify-section-title {
|
425 |
+
font-size: 20px;
|
426 |
+
margin-top: -.3em;
|
427 |
+
margin-bottom: -.6em;
|
428 |
}
|
429 |
|
430 |
+
/**
|
431 |
+
* == Rating (Notice + Settings)
|
432 |
+
*/
|
433 |
.imagify-rate-us.imagify-rate-us {
|
|
|
|
|
|
|
434 |
text-align: right;
|
435 |
+
margin: -1em -2.4em -1em 0;
|
436 |
color: #FFF;
|
437 |
}
|
438 |
.imagify-rate-us a {
|
467 |
}
|
468 |
}
|
469 |
|
470 |
+
/**
|
471 |
+
* == Messages & infos
|
472 |
+
*/
|
473 |
+
.imagify-important {
|
474 |
+
color: #F5A623;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
475 |
}
|
476 |
+
.imagify-info,
|
477 |
+
.imagify-info a {
|
478 |
+
color: #40B1D0;
|
479 |
+
font-size: 12px;
|
|
|
|
|
|
|
|
|
|
|
|
|
480 |
}
|
481 |
+
.imagify-info {
|
482 |
position: relative;
|
483 |
+
display: inline-block;
|
484 |
+
padding-left: 25px;
|
485 |
+
vertical-align: top;
|
|
|
|
|
|
|
|
|
|
|
486 |
}
|
487 |
+
.imagify-info .dashicons {
|
488 |
+
position: absolute;
|
489 |
+
left: 0; top: -1px;
|
|
|
|
|
|
|
490 |
}
|
491 |
+
|
492 |
+
/* Custom checkboxes in CSS */
|
493 |
+
.imagify-settings.imagify-settings [type="checkbox"]:not(:checked),
|
494 |
+
.imagify-settings.imagify-settings [type="checkbox"]:checked,
|
495 |
+
.imagify-checkbox.imagify-checkbox:not(:checked),
|
496 |
+
.imagify-checkbox.imagify-checkbox:checked {
|
497 |
+
opacity: 0.01;
|
498 |
}
|
499 |
+
.imagify-settings.imagify-settings [type="checkbox"]:not(:checked):focus,
|
500 |
+
.imagify-settings.imagify-settings [type="checkbox"]:checked:focus,
|
501 |
+
.imagify-checkbox.imagify-checkbox:not(:checked):focus,
|
502 |
+
.imagify-checkbox.imagify-checkbox:checked:focus {
|
503 |
+
box-shadow: none!important; /* system value to override */
|
504 |
+
outline: none!important;
|
505 |
+
border: 0 none!important;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
506 |
}
|
507 |
|
508 |
.imagify-settings [type="checkbox"]:not(:checked) + label,
|
568 |
-ms-transform: scale(1);
|
569 |
transform: scale(1);
|
570 |
}
|
|
|
|
|
|
|
571 |
|
572 |
/* medium version */
|
573 |
.medium.imagify-checkbox:not(:checked) + label:before,
|
602 |
.mini.imagify-checkbox:checked + label:after {
|
603 |
font-size: .9em;
|
604 |
left: -21px;
|
605 |
+
top: -0.5px;
|
606 |
}
|
607 |
/* focus aspect */
|
608 |
.imagify-settings [type="checkbox"]:not(:checked):focus + label:before,
|
621 |
max-width: 600px;
|
622 |
border-collapse: collapse;
|
623 |
}
|
624 |
+
|
|
|
|
|
|
|
|
|
|
|
625 |
.imagify-inline-options input[type="radio"]:not(:checked),
|
626 |
.imagify-inline-options input[type="radio"]:checked {
|
627 |
position: absolute;
|
628 |
left: 5px; top: 5px;
|
629 |
display: none;
|
630 |
}
|
631 |
+
|
632 |
.imagify-inline-options input[type="radio"]:not(:checked) + label,
|
633 |
.imagify-inline-options input[type="radio"]:checked + label {
|
634 |
position: relative;
|
648 |
-webkit-transition: all .275s;
|
649 |
transition: all .275s;
|
650 |
}
|
651 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
652 |
.imagify-inline-options input[type="radio"]:not(:checked) + label:first-of-type,
|
653 |
.imagify-inline-options input[type="radio"]:checked + label:first-of-type {
|
654 |
border-radius: 3px 0 0 3px;
|
655 |
}
|
656 |
+
|
657 |
.imagify-inline-options input[type="radio"]:not(:checked) + label:last-of-type,
|
658 |
.imagify-inline-options input[type="radio"]:checked + label:last-of-type {
|
659 |
border-radius: 0 3px 3px 0;
|
663 |
background: #8BC34A
|
664 |
}
|
665 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
666 |
.imagify-inline-options .imagify-info {
|
667 |
margin-top: 15px;
|
668 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
669 |
|
670 |
/**
|
671 |
+
* == Columns
|
672 |
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
673 |
.imagify-columns {
|
674 |
overflow: hidden;
|
675 |
padding: 15px 0;
|
693 |
width: 50%;
|
694 |
padding: 0 20px;
|
695 |
}
|
696 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
697 |
@media (max-width: 830px) {
|
698 |
.imagify-columns [class^="col-"] {
|
699 |
float: none;
|
707 |
padding-top: 1em;
|
708 |
}
|
709 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
710 |
|
711 |
/**
|
712 |
* == Custom column & Metabox
|
720 |
max-width: 235px;
|
721 |
margin: 0 auto;
|
722 |
}
|
|
|
|
|
|
|
|
|
|
|
723 |
@media (min-width: 1151px) and (max-width: 1800px) {
|
724 |
.column-imagify_optimized_file.column-imagify_optimized_file {
|
725 |
width: 235px;
|
767 |
margin-top: 7px;
|
768 |
font-size: 11px;
|
769 |
}
|
770 |
+
ul.imagify-datas-list.imagify-datas-list {
|
771 |
+
margin: 0 auto;
|
772 |
+
color: #555;
|
773 |
+
font-size: 10px;
|
774 |
+
}
|
775 |
ul.imagify-datas-list .big {
|
776 |
font-size: 12px;
|
777 |
color: #40B1D0;
|
807 |
text-align: left;
|
808 |
font-weight: bold;
|
809 |
}
|
|
|
|
|
|
|
|
|
810 |
ul.imagify-datas-list .imagify-data-item strong {
|
811 |
text-align: left;
|
812 |
padding-left: 5px;
|
813 |
}
|
814 |
+
.media-sidebar .imagify-datas-list .imagify-data-item .data {
|
815 |
+
width: auto;
|
816 |
+
float: none;
|
817 |
+
}
|
818 |
.media-sidebar .imagify-datas-list .imagify-data-item strong {
|
819 |
width: auto;
|
820 |
float: none;
|
821 |
}
|
|
|
822 |
.imagify-datas-more-action.imagify-datas-more-action {
|
823 |
margin: .4em auto;
|
824 |
background: linear-gradient(to bottom, transparent, transparent 49%, rgba(0,0,0,.075) 50%, rgba(0,0,0,.075) 58%, transparent 58%, transparent);
|
872 |
padding-top: 5px;
|
873 |
font-size: 8px;
|
874 |
}
|
875 |
+
.nggform .imagify-datas-actions-links {
|
876 |
+
position: relative;
|
877 |
+
z-index: 2;
|
878 |
+
}
|
879 |
+
.nggform .row-actions {
|
880 |
+
z-index: 1;
|
881 |
+
}
|
882 |
.imagify-datas-actions-links a {
|
883 |
position: relative;
|
884 |
display: inline-block;
|
893 |
border-top: 2px solid #f2f2f2;
|
894 |
padding-bottom: 5px;
|
895 |
}
|
896 |
+
/* Library */
|
897 |
+
.column-imagify_optimized_file .imagify-datas-actions-links a {
|
898 |
+
margin: 0 .7em;
|
899 |
+
padding-left: 15px;
|
900 |
+
}
|
901 |
+
|
902 |
/* Media edition */
|
903 |
.compat-field-imagify .imagify-datas-actions-links a,
|
904 |
.misc-pub-imagify .imagify-datas-actions-links a {
|
912 |
width: auto;
|
913 |
float: none;
|
914 |
}
|
|
|
|
|
|
|
|
|
|
|
915 |
.imagify-datas-actions-links a:only-child {
|
916 |
float: none;
|
917 |
width: auto;
|
931 |
* == Bulk page
|
932 |
*/
|
933 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
934 |
.imagify-account,
|
935 |
.imagify-account-link {
|
936 |
padding-right: 15px;
|
937 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
938 |
.imagify-meteo-icon {
|
939 |
display: inline-block;
|
940 |
height: 38px;
|
945 |
color: #40b1d0;
|
946 |
}
|
947 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
948 |
.imagify-meteo-title.imagify-meteo-title {
|
949 |
color: #FFF;
|
950 |
font-size: 17px;
|
958 |
.imagify-space-left > p {
|
959 |
color: #FFF;
|
960 |
}
|
961 |
+
[class^="imagify-bar-"] {
|
|
|
962 |
position: relative;
|
963 |
height: 1.5em;
|
964 |
width: 100%;
|
966 |
color: #FFF;
|
967 |
font-size: 10px;
|
968 |
}
|
969 |
+
|
970 |
+
.imagify-progress {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
971 |
height: 1.5em;
|
972 |
}
|
973 |
.imagify-progress {
|
992 |
background: #D0021B;
|
993 |
}
|
994 |
|
995 |
+
.imagify-btn-ghost {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
996 |
display: inline-block;
|
997 |
height: auto;
|
998 |
padding: 7px 10px;
|
1004 |
transition: all .275s;
|
1005 |
}
|
1006 |
|
1007 |
+
.imagify-btn-ghost:hover,
|
1008 |
+
.imagify-btn-ghost:focus {
|
|
|
|
|
1009 |
background: #FFF;
|
1010 |
color: #888;
|
1011 |
}
|
1012 |
+
|
1013 |
+
/* Some Errors */
|
1014 |
+
.imagify-error {
|
1015 |
+
background: #D0021B;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1016 |
color: #FFF;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1017 |
}
|
1018 |
+
.imagify-settings-section .imagify-error {
|
1019 |
display: inline-block;
|
1020 |
+
padding: 7px 10px;
|
1021 |
+
margin: 10px 0 0 45px;
|
1022 |
+
border-radius: 3px;
|
1023 |
}
|
1024 |
+
.imagify-settings-section .imagify-error code {
|
1025 |
+
font-weight: normal;
|
|
|
|
|
|
|
1026 |
}
|
1027 |
+
.imagify-settings-section .imagify-error.hidden {
|
1028 |
+
display: none;
|
|
|
|
|
1029 |
}
|
1030 |
+
.imagify-warning {
|
1031 |
+
background: #f5a623;
|
1032 |
+
color: #FFF;
|
1033 |
+
text-shadow: 0 0 2px rgba(0, 0, 0, 0.2);
|
1034 |
}
|
1035 |
+
|
1036 |
+
/* Imagify Modal (is everywhere) */
|
1037 |
+
.imagify-modal {
|
1038 |
+
display: -webkit-box;
|
1039 |
+
display: -ms-flexbox;
|
1040 |
+
display: flex;
|
1041 |
+
-webkit-box-orient: vertical;
|
1042 |
+
-webkit-box-direction: normal;
|
1043 |
+
-ms-flex-direction: column;
|
1044 |
+
flex-direction: column;
|
1045 |
+
-webkit-box-align: center;
|
1046 |
+
-ms-flex-align: center;
|
1047 |
+
align-items: center;
|
1048 |
+
-webkit-box-pack: center;
|
1049 |
+
-ms-flex-pack: center;
|
1050 |
+
justify-content: center;
|
1051 |
}
|
1052 |
+
.js .imagify-modal {
|
1053 |
+
display: none;
|
1054 |
+
position: fixed;
|
1055 |
+
top: 0; right: 0; bottom: 0; left: 0;
|
1056 |
+
background-color: #1F2332;
|
1057 |
+
background-color: rgba(31,35,50,.95);
|
1058 |
+
z-index: 99999;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1059 |
}
|
1060 |
+
.imagify-modal-content {
|
1061 |
+
-webkit-box-sizing: border-box;
|
1062 |
+
-moz-box-sizing: border-box;
|
1063 |
+
box-sizing: border-box;
|
1064 |
position: relative;
|
1065 |
+
width: 800px;
|
1066 |
+
max-width: 95%;
|
1067 |
+
max-height: 90vw;
|
1068 |
+
overflow: auto;
|
1069 |
+
padding: 20px 25px;
|
1070 |
+
margin: 1em auto;
|
1071 |
+
background: #FFF;
|
1072 |
+
box-shadow: 1px 1px 4px rgba(0,0,0,.7);
|
1073 |
border-radius: 3px;
|
1074 |
}
|
1075 |
+
#imagify-visual-comparison .imagify-modal-content,
|
1076 |
+
.imagify-visual-comparison .imagify-modal-content {
|
1077 |
+
max-width: 1400px;
|
1078 |
+
background: transparent;
|
1079 |
+
padding: 5px;
|
1080 |
+
box-shadow: none;
|
1081 |
+
border-radius: 0;
|
1082 |
}
|
1083 |
+
.imagify-modal .h2 {
|
1084 |
+
margin: .5em 0;
|
1085 |
+
color: #8ba6b4;
|
1086 |
+
font-weight: normal;
|
1087 |
+
font-size: 24px;
|
1088 |
+
letter-spacing: 0.075em;
|
1089 |
+
text-align: center;
|
1090 |
}
|
1091 |
+
.imagify-modal .h3 {
|
1092 |
+
color: #40b1d0;
|
1093 |
+
font-weight: normal;
|
1094 |
+
font-size: 18px;
|
1095 |
+
letter-spacing: 0.075em;
|
|
|
|
|
1096 |
text-align: center;
|
1097 |
}
|
1098 |
+
.imagify-modal .close-btn {
|
1099 |
+
display: none;
|
1100 |
+
visibility: hidden;
|
1101 |
position: absolute;
|
1102 |
+
right: 20px; top: 20px;
|
1103 |
+
font-size: 1.2em;
|
1104 |
+
border: 0;
|
1105 |
+
background: transparent none;
|
1106 |
+
border-radius: 0;
|
1107 |
+
cursor: pointer;
|
1108 |
}
|
1109 |
+
.imagify-modal .close-btn i {
|
1110 |
+
margin-left: -2px;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1111 |
}
|
1112 |
+
.imagify-modal .close-btn:hover,
|
1113 |
+
.imagify-modal .close-btn:focus {
|
1114 |
+
color: #40b1d0;
|
1115 |
}
|
1116 |
+
.js .imagify-modal .close-btn {
|
1117 |
display: block;
|
1118 |
+
visibility: visible;
|
|
|
|
|
|
|
1119 |
}
|
1120 |
|
1121 |
+
/* Attachments specifics */
|
1122 |
+
.wp_attachment_image #imagify-visual-comparison .close-btn,
|
1123 |
+
.imagify-visual-comparison .close-btn {
|
1124 |
+
top: 0;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1125 |
}
|
1126 |
|
1127 |
+
.wp_attachment_image #imagify-visual-comparison .imagify-modal-content,
|
1128 |
+
.imagify-visual-comparison .imagify-modal-content {
|
1129 |
+
padding-top: 40px;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1130 |
}
|
1131 |
|
1132 |
+
/* Col, behavior depending on parent */
|
1133 |
+
.imagify-col {
|
1134 |
+
float: left;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1135 |
width: 50%;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1136 |
}
|
1137 |
+
.imagify-col {
|
1138 |
+
-webkit-flex-basis: 50%;
|
1139 |
+
-ms-flex-preferred-size: 50%;
|
1140 |
+
flex-basis: 50%;
|
1141 |
}
|
assets/css/admin.min.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
.imagify-cell,.imagify-cell.va-top,.va-top .imagify-cell{vertical-align:top}#imagify-overview-chart-legend,.imagify-oh,body.imagify-modal-is-open{overflow:hidden}.imagify-start{float:left}.imagify-end{float:right}.imagify-txt-start.imagify-txt-start.imagify-txt-start{text-align:left}.imagify-txt-center.imagify-txt-center.imagify-txt-center{text-align:center}.imagify-txt-end.imagify-txt-end.imagify-txt-end{text-align:right}.imagify-mt1.imagify-mt1{margin-top:1em}.imagify-mb1.imagify-mb1{margin-bottom:1em}.imagify-mr1.imagify-mr1{margin-right:1em}.imagify-ml2.imagify-ml2{margin-left:2em}.imagify-mr2.imagify-mr2{margin-right:2em}.imagify-pl0.imagify-pl0.imagify-pl0{padding-left:0}.imagify-pr1.imagify-pr1{padding-right:1em}.imagify-clear{clear:both}.imagify-clearfix:after,.imagify-inline-options:after{content:"";display:table;clear:both}.imagify-count.imagify-count{counter-reset:num}.imagify-count .imagify-count-title{font-weight:700}.imagify-default-settings{color:#73818c;font-weight:400}.imagify-count .imagify-count-title:before{counter-increment:num 1;content:counter(num) ". "}.imagify-table{display:table;width:100%}.imagify-cell{display:table-cell;padding:10px}.imagify-bulk-submit .imagify-cell{padding-top:0}.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:url(../images/spinner.gif) 0 0/20px 20px no-repeat rgba(0,0,0,0);opacity:.7}.spinner.imagify-hidden{width:0;margin:4px 0 0}.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;-webkit-box-shadow:0 3px 0 #338ea6!important;box-shadow:0 3px 0 #338ea6!important}.imagify-sweet-alert button.loading{border-radius:100%!important;height:40px!important;padding:0!important;-webkit-box-shadow:none!important;box-shadow:none!important}.imagify-sweet-alert button.swal2-cancel{background:#777!important;-webkit-box-shadow:0 3px 0 #444!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 .la-ball-fall,.imagify-sweet-alert .sa-input-error:after,.imagify-sweet-alert .sa-input-error:before{top:25%!important}#wpwrap{-webkit-transition:all .4s;-o-transition:all .4s;transition:all .4s}.stop-scrolling #wpwrap{-webkit-filter:blur(2px);filter:blur(2px)}.stop-scrolling #wpwrap #wpadminbar{top:-32px}.imagify-primary.imagify-primary.imagify-primary{color:#40b1d0}.imagify-secondary.imagify-secondary.imagify-secondary{color:#8cc152}#imagify-check-api-container{font-weight:700}#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-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 .2s ease-in-out;-o-transition:background-color .2s ease-in-out;transition:background-color .2s ease-in-out}.imagify-doughnut-legend li span{display:block;position:absolute;left:0;top:0;width:25px;height:25px;border-radius:50%}.button-text,.imagify-bulk-info p{display:inline-block}.imagify-chart{float:left;margin-bottom:20px}td .imagify-chart{float:none;margin-bottom:0;top:4px}.imagify-chart-container{position:relative;width:180px;float:left;margin-right:20px}.imagify-global-optim-phrase{width:180px;padding-top:20px;font-size:14px;font-weight:700;text-align:center}.imagify-total-percent{color:#46b1ce}td .imagify-chart-container{width:18px;height:18px;float:none;margin-right:10px}.imagify-chart-percent{position:absolute;left:0;right:0;top:50%;margin-top:-14px;text-align:center;font-size:55px;font-weight:700;color:#46B1CE}.imagify-chart-percent span{font-size:20px;vertical-align:super}.media_page_imagify-bulk-optimization .notice,.settings_page_imagify .notice,body[class*="_imagify-ngg-bulk-optimization"] .notice{margin-right:20px;margin-left:2px}.media_page_imagify-bulk-optimization .media-item,body[class*="_imagify-ngg-bulk-optimization"] .media-item{margin:0}.media_page_imagify-bulk-optimization .media-item .progress,body[class*="_imagify-ngg-bulk-optimization"] .media-item .progress{float:none;width:100%;margin:0;background:#1F2331;-webkit-box-shadow:0;box-shadow:0;border-radius:0}.media_page_imagify-bulk-optimization .media-item .percent,body[class*="_imagify-ngg-bulk-optimization"] .media-item .percent{width:auto;padding:0 5px;line-height:1.85;font-size:12px}.media_page_imagify-bulk-optimization .media-item .percent,.media_page_imagify-bulk-optimization .media-item .progress,body[class*="_imagify-ngg-bulk-optimization"] .media-item .percent,body[class*="_imagify-ngg-bulk-optimization"] .media-item .progress{text-align:right}.media_page_imagify-bulk-optimization .media-item .progress .bar,body[class*="_imagify-ngg-bulk-optimization"] .media-item .progress .bar{width:1px;height:22px;margin-top:0;background:#46B1CE;border-radius:0;overflow:visible;-webkit-transition:width .5s;-o-transition:width .5s;transition:width .5s}.imagify-settings .button,.imagify-settings a,.imagify-settings input,.imagify-welcome .button,.imagify-welcome a,.imagify-weolcome input{-webkit-transition:all .275s;-o-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:.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}.button .dashicons,.button-text,.imagify-button-primary.imagify-button-primary .dashicons,.imagify-button-secondary.imagify-button-secondary .dashicons,.imagify-button.imagify-button .dashicons,.imagify-notice .button .dashicons,.imagify-settings .button .dashicons,.imagify-welcome .button .dashicons{vertical-align:middle}.imagify-settings .form-table th span{cursor:pointer}.imagify-middle th{padding-top:35px}.imagify-button-primary.imagify-button-primary,.imagify-button-secondary.imagify-button-secondary,.imagify-button.imagify-button,.imagify-notice .button,.imagify-settings .button,.imagify-welcome .button{height:auto;padding:8px 20px;border:0;font-size:14px;font-weight:600;-webkit-box-shadow:0 3px 0 rgba(0,0,0,.15);box-shadow:0 3px 0 rgba(0,0,0,.15);border-radius:3px;cursor:pointer;-webkit-transition:all .275s;-o-transition:all .275s;transition:all .275s}.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;-webkit-box-shadow:none!important;box-shadow:none!important;line-height:1.2}.imagify-settings .button.button-mini-flat:focus,.imagify-settings .button.button-mini-flat:hover{-webkit-box-shadow:none!important;box-shadow:none!important}.imagify-button-ghost.imagify-button-ghost,.imagify-title .button-ghost.button-ghost{padding:2px 9px;border:1px solid #40B1D0;font-size:12px;font-weight:400;color:#40B1D0;background:0 0;-webkit-box-shadow:none;box-shadow:none}.imagify-button-ghost.imagify-button-ghost:focus,.imagify-button-ghost.imagify-button-ghost:hover,.imagify-title .button-ghost.button-ghost:focus,.imagify-title .button-ghost.button-ghost:hover{border-color:transparent;color:#000;background:#40B1D0}.imagify-button-ghost.imagify-button-ghost:focus,.imagify-button-ghost.imagify-button-ghost:hover{color:#FFF}.imagify-button-medium.imagify-button-medium{text-transform:uppercase;letter-spacing:.1em;padding:3px 10px;font-weight:700}.imagify-button-medium.imagify-button-ghost{border-width:2px}.button .dashicons{margin-right:5px}.imagify-button-primary.imagify-button-primary,.imagify-settings .button-primary.button-primary,.imagify-welcome .button-primary.button-primary{background:#40B1D0;color:#FFF;-webkit-box-shadow:0 3px 0 rgba(51,142,166,1);box-shadow:0 3px 0 rgba(51,142,166,1);text-shadow:0 -1px 1px #006799,1px 0 1px #006799,0 1px 1px #006799!important}.imagify-button-secondary.imagify-button-secondary{background:#8BC34A;color:#FFF;-webkit-box-shadow:0 3px 0 #6F9C3B;box-shadow:0 3px 0 #6F9C3B;text-shadow:0 -1px 1px #6F9C3B,1px 0 1px #6F9C3B,0 1px 1px #6F9C3B!important}.imagify-button-primary.imagify-button-primary:focus,.imagify-button-primary.imagify-button-primary:hover,.imagify-settings .button-primary:focus,.imagify-settings .button-primary:hover,.imagify-welcome .button-primary:focus,.imagify-welcome .button-primary:hover{background:#338ea6;-webkit-box-shadow:0 3px 0 #1f7a92;box-shadow:0 3px 0 #1f7a92}.imagify-button-secondary.imagify-button-secondary:focus,.imagify-button-secondary.imagify-button-secondary:hover{background:#6F9C3B;color:#FFF}.imagify-button-light.imagify-button-light{background:#FFF;color:#4a4a4a;-webkit-box-shadow:0 2px 0 rgba(0,0,0,.2);box-shadow:0 2px 0 rgba(0,0,0,.2)}.imagify-button-light.imagify-button-light:focus,.imagify-button-light.imagify-button-light:hover{color:#FFF;background:rgba(0,0,0,.2)}.imagify-section-positive .imagify-button-light{color:#709A41}.imagify-button.imagify-button-big{font-size:15px;padding:11px 30px}.imagify-button-big .dashicons{font-size:1.45em;margin-right:6px;margin-left:-4px}.imagify-info,.imagify-logo{vertical-align:top}#imagify-bulk-action{padding:11px 20px}.media-frame-content .imagify-button-primary,.wp_attachment_image .imagify-button-primary{float:left;padding:0 10px 1px;margin:0 5px 2px 0;font-size:13px;line-height:26px;-webkit-box-shadow:0 3px 0 rgba(51,142,166,1);box-shadow:0 3px 0 rgba(51,142,166,1)}.imagify-settings input[type=text]{color:#4A4A4A;font-weight:600;-webkit-box-shadow:none;box-shadow:none}.imagify-settings div.submit.submit{padding-left:235px;padding-top:40px}.imagify-settings p.submit{float:left;margin-top:0}.imagify-settings p.submit .button{margin:0 5px}@media (max-width:850px){.imagify-settings div.submit{padding-left:0}.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-section,.imagify-settings div.submit,.imagify-sub-header,.imagify-sub-title.imagify-sub-title{margin:0;padding:20px;background:#F2F5F7}.imagify-section-positive,.imagify-sub-title.imagify-sub-title{padding-left:40px}.imagify-section-positive{background:#8cc152;color:#FFF}.imagify-section-positive p{color:#FFF}.imagify-section-gray{background:#D9E4EB}.imagify-section-gray .imagify-count-title{color:#4a4a4a}.imagify-section p:first-child{margin-top:0}.imagify-section p:last-child{margin-bottom:0}p.imagify-section-title.imagify-section-title{font-size:20px;margin-top:-.3em;margin-bottom:-.6em}.imagify-bulk-info{margin:1em 1em 1em 5px;-webkit-transition:margin .3s;-o-transition:margin .3s;transition:margin .3s}@media (max-width:850px){.imagify-bulk-info{margin:1em}}.imagify-bulk-info p{text-align:left;width:400px;max-width:100%;font-weight:700}@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-notice .imagify-rate-us .stars,.imagify-sub-header .form-table{margin:0}.imagify-sub-header th{text-align:right}.imagify-sub-header td,.imagify-sub-header th{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-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:focus,.imagify-rate-us a:hover{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-rkt-notice.imagify-rkt-notice{position:relative;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;-ms-grid-row-align:center;align-items:center;padding:10px 45px 10px 0;border:0;-webkit-box-shadow:none;box-shadow:none;color:#FFF;background:#412355}.media_page_imagify-bulk-optimization .imagify-rkt-notice{margin-left:2px;margin-right:20px}@media (max-width:782px){.media_page_imagify-bulk-optimization .imagify-rkt-notice{margin-left:0;margin-right:12px}}.imagify-rkt-notice .imagify-cross{position:absolute;right:8px;top:50%;width:22px;height:22px;padding:0;margin-top:-11px;background:0 0;color:#FD7300;border-radius:50%;-webkit-transition:all .275s;-o-transition:all .275s;transition:all .275s}.imagify-rkt-notice .imagify-cross .dashicons{position:relative;top:2px;left:1px;-webkit-transition:all .275s;-o-transition:all .275s;transition:all .275s}.imagify-rkt-notice .imagify-cross:hover{background:#FFF}.imagify-rkt-notice .imagify-cross:hover .dashicons{color:#412355}.imagify-rkt-notice .imagify-rkt-coupon,.imagify-rkt-notice .imagify-rkt-cta,.imagify-rkt-notice .imagify-rkt-logo{-ms-flex-negative:0;flex-shrink:0}.imagify-rkt-notice .imagify-rkt-logo{width:150px!important;text-align:center;padding:0 25px 0 30px;line-height:.8}.imagify-rkt-notice .imagify-rkt-msg{width:100%!important;padding:0 15px;font-size:14px;line-height:1.6}.imagify-rkt-notice .imagify-rkt-coupon{width:150px!important;padding:0 15px}.imagify-rkt-notice .imagify-rkt-coupon-code{padding:5px 10px;font-size:23px;font-weight:700;border:1px dashed #F7A933;color:#F7A933}.imagify-rkt-notice .imagify-rkt-cta{width:250px!important;-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;-ms-flex-preferred-size:200px;flex-basis:200px}.imagify-rkt-notice .button.button{position:relative;top:-1px;height:auto;font-weight:600;font-size:14px;-webkit-box-shadow:0 4px 0 #B27A27;box-shadow:0 4px 0 #B27A27;border:0;padding:9px 18px;background:#F7A933;text-shadow:1px 1px 1px rgba(0,0,0,.2)}@media (max-width:880px){.imagify-rkt-notice{-ms-flex-wrap:wrap;flex-wrap:wrap}.imagify-rkt-notice .imagify-rkt-cta,.imagify-rkt-notice .imagify-rkt-logo,.imagify-rkt-notice .imagify-rkt-msg{text-align:left;padding:5px 15px}.imagify-cross.imagify-cross{top:8px;margin-top:0}.imagify-rkt-notice .imagify-cross .dashicons{top:1px}}.imagify-settings-section{padding:10px 20px}.imagify-welcome .imagify-settings-section,[id=imagify-settings]{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}.imagify-info .dashicons{position:absolute;left:0;top:-1px}.imagify-visual-label,label+.imagify-info,label+.imagify-options-line{display:inline-block;max-width:70%;margin-left:15px;margin-top:2px!important;-webkit-transition:opacity .3s;-o-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-visual-label,.imagify-settings.imagify-settings [type=checkbox]:not(:checked)+label+.imagify-options-line{opacity:.5}.imagify-settings.imagify-settings [type=checkbox]:checked+label .imagify-visual-label,.imagify-settings.imagify-settings [type=checkbox]:checked+label+.imagify-options-line{opacity:1}.imagify-checkbox-marged{max-width:500px;margin-left:45px}.imagify-checkbox.imagify-checkbox:checked,.imagify-checkbox.imagify-checkbox:not(:checked),.imagify-settings.imagify-settings [type=checkbox]:checked,.imagify-settings.imagify-settings [type=checkbox]:not(:checked){opacity:.01}.imagify-checkbox.imagify-checkbox:checked:focus,.imagify-checkbox.imagify-checkbox:not(:checked):focus,.imagify-settings.imagify-settings [type=checkbox]:checked:focus,.imagify-settings.imagify-settings [type=checkbox]:not(:checked):focus{-webkit-box-shadow:none!important;box-shadow:none!important;outline:0!important;border:0!important}.imagify-checkbox.imagify-checkbox:checked+label,.imagify-checkbox.imagify-checkbox:not(:checked)+label,.imagify-settings [type=checkbox]:checked+label,.imagify-settings [type=checkbox]:not(:checked)+label{position:relative;padding-left:6px;cursor:pointer;vertical-align:top}.imagify-checkbox.imagify-checkbox:checked+label:before,.imagify-checkbox.imagify-checkbox:not(:checked)+label:before,.imagify-settings [type=checkbox]:checked+label:before,.imagify-settings [type=checkbox]:not(: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-checkbox.imagify-checkbox:checked+label:after,.imagify-checkbox.imagify-checkbox:not(:checked)+label:after,.imagify-settings [type=checkbox]:checked+label:after,.imagify-settings [type=checkbox]:not(:checked)+label:after{content:"✓";position:absolute;font-size:1.4em;top:3px;left:-16px;-webkit-transition:all .2s;-o-transition:all .2s;transition:all .2s}.imagify-checkbox.imagify-checkbox[disabled]:checked+label:before,.imagify-checkbox.imagify-checkbox[disabled]:not(:checked)+label:before,.imagify-settings [type=checkbox][disabled]:checked+label:before,.imagify-settings [type=checkbox][disabled]:not(:checked)+label:before{border-color:#ccc;background:#ddd}.imagify-checkbox.imagify-checkbox:not(:checked)+label:after,.imagify-settings [type=checkbox]:not(:checked)+label:after{opacity:0;-webkit-transform:scale(0);-ms-transform:scale(0);transform:scale(0)}.imagify-checkbox.imagify-checkbox:checked+label:after,.imagify-settings [type=checkbox]:checked+label:after{opacity:1;-webkit-transform:scale(1);-ms-transform:scale(1);transform:scale(1)}input[id^=imagify_sizes_]:checked+label{font-weight:700}.medium.imagify-checkbox:checked+label:before,.medium.imagify-checkbox:not(:checked)+label:before{width:22px;height:22px;border-width:1.5px;border-radius:2px;margin-top:0}.medium.imagify-checkbox:checked+label:after,.medium.imagify-checkbox:not(:checked)+label:after{font-size:1.1em;left:-17px;top:3px}.imagify-settings .mini[type=checkbox]:checked+label:before,.imagify-settings .mini[type=checkbox]:not(:checked)+label:before,.mini.imagify-checkbox:checked+label:before,.mini.imagify-checkbox:not(:checked)+label:before{width:15px;height:15px;border-width:1px;border-radius:2px;margin-top:0}.imagify-settings .mini[type=checkbox]:checked+label:after,.imagify-settings .mini[type=checkbox]:not(:checked)+label:after,.mini.imagify-checkbox:checked+label:after,.mini.imagify-checkbox:not(:checked)+label:after{font-size:.9em;left:-21px;top:1px}.imagify-checkbox.imagify-checkbox:checked:focus+label:before,.imagify-checkbox.imagify-checkbox:not(:checked):focus+label:before,.imagify-settings [type=checkbox]:checked:focus+label:before,.imagify-settings [type=checkbox]:not(: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-small-options{width:300px;margin:1em auto .5em;background:#338EA6;border-radius:4px}.imagify-inline-options input[type=radio]:checked,.imagify-inline-options input[type=radio]:not(:checked){position:absolute;left:5px;top:5px;display:none}.imagify-inline-options input[type=radio]:checked+label,.imagify-inline-options input[type=radio]:not(:checked)+label{position:relative;display:table-cell;padding:13px 10px;text-align:center;font-weight:600;font-size:16px;text-transform:uppercase;letter-spacing:.1em;color:#FFF;background:#2E3243;border-left:1px solid rgba(255,255,255,.2);-webkit-box-shadow:0 -3px 0 rgba(0,0,0,.1) inset,inset -1px 0 0 rgba(255,255,255,.2);box-shadow:0 -3px 0 rgba(0,0,0,.1) inset,inset -1px 0 0 rgba(255,255,255,.2);z-index:2;-webkit-transition:all .275s;-o-transition:all .275s;transition:all .275s}.imagify-small-options input[type=radio]:checked+label,.imagify-small-options input[type=radio]:not(:checked)+label{padding:8px 10px;font-size:13px;color:#FFF;-webkit-box-shadow:none;box-shadow:none;border-left:0}.imagify-bulk-submit .imagify-inline-options input[type=radio]:checked+label,.imagify-bulk-submit .imagify-inline-options input[type=radio]:not(:checked)+label{margin-bottom:1.75em}.imagify-inline-options input[type=radio]:checked+label:first-of-type,.imagify-inline-options input[type=radio]:not(:checked)+label:first-of-type{border-radius:3px 0 0 3px}.imagify-inline-options input[type=radio]:checked+label:last-of-type,.imagify-inline-options input[type=radio]:not(:checked)+label:last-of-type{border-radius:0 3px 3px 0}.imagify-inline-options input[type=radio]:checked+label{background:#8BC34A}.imagify-small-options input[type=radio]:not(:checked)+label{background:#338EA6;color:rgba(255,255,255,.4)}.imagify-small-options input[type=radio]:checked+label{background:#40B1D0}.imagify-inline-options .imagify-info{margin-top:15px}.imagify-btn-info{display:block;font-size:.7em;letter-spacing:0;line-height:1;text-transform:none}.imagify-datas-more-action a,a.btn-rocket{text-transform:uppercase;text-decoration:none}#describe-resize-larger input{width:5em}.imagify-cols:after{content:"";display:table;clear:both}.imagify-col{float:left;width:50%}.imagify-main{float:left;width:70%}.imagify-sidebar{float:right;width:28%;max-width:300px}.imagify-sidebar-section{border:1px solid #BBB;background:#FFF}.imagify-sidebar-section+.imagify-sidebar-section{margin-top:2em}@media (max-width:820px){.imagify-main,.imagify-sidebar{float:none;width:auto}.imagify-settings{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.imagify-sidebar{-webkit-box-ordinal-group:3;-ms-flex-order:2;order:2;max-width:none;margin-left:0;margin-top:25px}.wp-media-products{text-align:center}.wp-media-products li{display:inline-block;width:100%;max-width:276px}}@media (min-width:1400px){.imagify-main{width:74%}}.imagify-sidebar-title{display:block;padding:20px 15px;border-bottom:1px solid #BBB;font-size:14px;font-weight:700;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:-o-linear-gradient(top,rgba(59,30,78 ,0),rgba(59,30,78 ,0) 130px,rgba(59 ,30 ,78 ,1) 210px),url(../images/sidebar-wp-rocket.jpg);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:700;background:#F7A933;-webkit-transform-origin:50% 50%;-ms-transform-origin:50% 50%;transform-origin:50% 50%;-webkit-transform:rotateZ(-2deg) rotateX(-10deg) skewX(-2deg) skewY(-3deg);transform:rotateZ(-2deg) rotateX(-10deg) skewX(-2deg) skewY(-3deg);text-shadow:1px 1px 0 rgba(0,0,0,.2)}.imagify-mark-styled span{display:inline-block;-webkit-transform:rotateZ(2deg) rotateX(10deg) skewX(2deg) skewY(3deg);transform:rotateZ(2deg) rotateX(10deg) skewX(2deg) skewY(3deg)}.imagify-discount-code,a.btn-rocket{display:block;text-shadow:1px 1px 0 rgba(0,0,0,.2);font-weight:700}.imagify-discount-code{margin:.35em 0 .5em;font-size:2em;letter-spacing:.05em;text-align:center}.imagify-big-text{font-size:15px;font-weight:700}.imagify-big-text strong{font-size:20px}a.btn-rocket{font-size:1.15em;padding:12px;background:#F7A933;-webkit-box-shadow:0 3px 0 #D69626;box-shadow:0 3px 0 #D69626;border-radius:3px;color:#FFF}a.btn-rocket:focus,a.btn-rocket:hover{background:#ff8c00;-webkit-box-shadow:0 3px 0 #ff8c00;box-shadow:0 3px 0 #ff8c00}.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;box-sizing:border-box}.imagify-columns .col-1-3{width:33.333%;padding-left:28px}.imagify-columns .col-2-3{width:66.666%;padding-left:28px}.imagify-columns .col-1-2{width:50%;padding:0 20px}.imagify-columns .col-overview{padding-left:20px}.imagify-columns .col-informations{width:36.6%;padding-right:30px}.imagify-columns .col-statistics{width:30%}@media (max-width:830px){.imagify-columns [class^=col-]{float:none;margin-bottom:1.5em}.imagify-columns .col-1-2,.imagify-columns .col-1-3{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;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:-ms-flexbox;display:flex;padding:0;margin:10px 20px 10px 2px;border:0;background:#2E3243;-webkit-box-shadow:none;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;-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-popin-message{padding:5px 15px;text-align:left}.imagify-popin-message.imagify-error p{color:#FFF}.imagify-notice-title{font-size:15px}.imagify-notice-content{padding:5px 23px}.imagify-notice-content.imagify-notice-content p{margin:.65em 0}.imagify-notice a{color:#40B1D0}.imagify-notice a:focus,.imagify-notice a:hover{color:#FEE102}.imagify-notice code{background:rgba(0,0,0,.4)}.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}@media (min-width:1151px) and (max-width:1800px){.column-imagify_optimized_file.column-imagify_optimized_file{width:235px}}@media (min-width:783px) and (max-width:1150px){.column-imagify_optimized_file.column-imagify_optimized_file{width:13em}table.media .column-title .has-media-icon~.row-actions.row-actions{margin-left:0}}@media (max-width:782px){table.media .column-imagify_optimized_file.column-imagify_optimized_file{text-align:left}table.media .imagify-datas-actions-links,table.media .imagify-datas-more-action{text-align:center}table.media .column-imagify_optimized_file .imagify-datas-actions-links a,table.media .column-imagify_optimized_file>*{max-width:100%;margin-left:0}}@media (min-width:783px) and (max-width:1150px),(max-width:360px){table.media .imagify-hide-if-small{position:absolute;margin:-1px;padding:0;height:1px;width:1px;overflow:hidden;clip:rect(0 0 0 0);border:0;word-wrap:normal!important}}.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;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:700}.media-sidebar .imagify-datas-list .imagify-data-item .data,.media-sidebar .imagify-datas-list .imagify-data-item strong{width:auto;float:none}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:-webkit-gradient(linear,left top,left bottom,from(transparent),color-stop(49%,transparent),color-stop(50%,rgba(0,0,0,.075)),color-stop(58%,rgba(0,0,0,.075)),color-stop(58%,transparent),to(transparent));background:-o-linear-gradient(top,transparent,transparent 49%,rgba(0,0,0,.075) 50%,rgba(0,0,0,.075) 58%,transparent 58%,transparent);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;font-size:9px;font-weight:700;line-height:1.9}.imagify-datas-more-action a.is-open{background:#555}.imagify-datas-more-action a.is-open .dashicons{-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);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:auto;line-height:inherit}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%}.media-sidebar .compat-field-imagify .imagify-datas-actions-links a,.submitbox .misc-pub-imagify .imagify-datas-actions-links a{display:block;width:auto;float:none}.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:700;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:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.imagify-title-right{-webkit-box-ordinal-group:3;-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,.imagify-title-right>div{display:block;width:auto}.imagify-title-right>div{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}#wp-admin-bar-imagify-profile [class^=imagify-bar-],[class^=imagify-bar-]{position:relative;height:1.5em;width:100%;background:#60758D;color:#FFF;font-size:10px}.base-transparent{background:0 0}[class^=imagify-bar-].right-outside-number{-webkit-box-sizing:border-box;box-sizing:border-box;padding-right:4.5em}.right-outside-number .imagify-barnb{display:block;margin-right:-4.5em;text-align:right;font-weight:700;line-height:1.5}#wp-admin-bar-imagify-profile .imagify-progress-value,.imagify-progress-value{position:absolute;top:0;right:0;left:0;bottom:0;text-align:center;line-height:13px;font-weight:700}#wp-admin-bar-imagify-profile .imagify-progress,.imagify-progress{height:1.5em}.imagify-progress{-webkit-transition:width .3s;-o-transition:width .3s;transition:width .3s}.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:.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:700}#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,.imagify-list-infos li+li{margin-top:1em}#wpadminbar #wp-admin-bar-imagify-profile .btn-ghost,.btn-ghost{display:inline-block;height:auto;padding:7px 10px;border:1px solid #FFF;text-align:center;background:0 0;color:#FFF;border-radius:3px;-webkit-transition:all .275s;-o-transition:all .275s;transition:all .275s}#wpadminbar #wp-admin-bar-imagify-profile .btn-ghost:focus,#wpadminbar #wp-admin-bar-imagify-profile .btn-ghost:hover,.btn-ghost:focus,.btn-ghost:hover{background:#FFF;color:#888}.imagify-list-infos{max-width:100%;width:415px}.imagify-info-block,.imagify-list-infos li{position:relative;padding:10px;padding-left:42px;background:#D9E4EB;border-radius:4px;line-height:1.6}.imagify-list-infos .imagify-alt.imagify-alt{background:#8BA7B5;color:#FFF;font-weight:700}.imagify-info-block:before,.imagify-list-infos li:before{content:"";position:absolute;left:13px;top:14px;height:16px;width:16px;border:1px solid #46b1ce;border-radius:10px}.imagify-info-block:after,.imagify-list-infos li:after{content:"i";position:absolute;left:20px;top:13px;font-style:italic;color:#46b1ce}.imagify-cell .imagify-info-block{padding-top:0}.imagify-cell .imagify-info-block:after{top:6px}.imagify-cell .imagify-info-block:before{top:7px}.imagify-list-infos .imagify-alt:after,.imagify-list-infos .imagify-alt:before{color:#fff;border-color:#fff}.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 h3,.imagify-bulk .imagify-settings-section li,.imagify-bulk .imagify-settings-section p{color:#4A4A4A}.imagify-bulk .imagify-settings-section h3{margin-bottom:2em}.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:700;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-ac-rt-big,.imagistatus{text-transform:uppercase;font-weight:700}.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;font-size:13px;background:#40B1D0;-webkit-box-shadow:0 3px 0 #338EA6;box-shadow:0 3px 0 #338EA6}.imagify-space-tooltips .tooltip-content:after{top:-14px;left:50%;margin-left:-7px;border:0;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{display:table-cell;padding-right:15px;font-size:36px;font-weight:700;line-height:1.1;vertical-align:middle;white-space:nowrap}.imagify-number-you-optimized .text{display:table-cell;vertical-align:middle;overflow:hidden;font-size:12px}.imagify-number-you-optimized .text br{display:none}.imagify-number-you-optimized>p{display:table}.imagify-number-you-optimized{padding-bottom:.85em;margin-bottom:1.35em;overflow:hidden;border-bottom:1px solid rgba(0,0,0,.05)}.imagify-bars p{font-weight:700;font-size:12px;margin-bottom:0}.imagify-bars+.imagify-number-you-optimized{border-bottom:0;padding-top:.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-ac-report-text,.imagiuploaded{overflow:hidden}.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 th,.imagify-bulk-table thead tr{background:#2E3242}.imagify-bulk-table tfoot th,.imagify-bulk-table tfoot tr{background:#73818C}.imagify-bulk-table thead th{padding:14px 15px;text-align:left;color:#F2F5F7;font-weight:700;font-size:14px}.imagify-bulk-table tfoot td{padding:14px 15px;color:#F9FAFA}.imagify-bulk-table tbody td,.imagify-bulk-table tbody tr{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:700;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;-webkit-transform:scale(1);transform:scale(1)}50%{-webkit-transform:scale(1.05);transform:scale(1.05);opacity:1}100%{-webkit-transform:scale(1);transform:scale(1);opacity:1}}.imagify-row-complete.done{-webkit-animation:congrate .5s ease-in-out;animation:congrate .5s 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 p{line-height:1.3}.imagify-ac-rt-big{font-size:24px;letter-spacing:.15em;word-spacing:.15em}.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{-o-text-overflow:clip;text-overflow:clip;white-space:nowrap;overflow:hidden}.imagify-bulk-table td.imagify-cell-totaloriginal{padding-right:78px}.imagifilename,.imagiuploaded{display:inline-block;vertical-align:middle}.imagifilename{font-size:12px}.imagiuploaded{width:33px;height:33px;margin-right:5px;margin-left:-8px;background:url(../images/upload-image.png) no-repeat;background-size:cover}.imagiuploaded img{max-widht:100%;height:auto}.imagistatus{color:#8CA6B3}.status-compressing{color:#46B1CE}.status-error{color:#CE0B24}.status-warning{color:#f5a623}.status-complete{color:#8CC152}.imagify-error{background:#D0021B;color:#FFF}.imagify-settings-section .imagify-error{display:inline-block;padding:7px 10px;margin:10px 0 0 45px;border-radius:3px}.imagify-settings-section .imagify-error code{font-weight:400}.imagify-settings-section .imagify-error.hidden{display:none}#wpadminbar .imagify-warning *,.imagify-warning{background:#f5a623;color:#FFF;text-shadow:0 0 2px rgba(0,0,0,.2)}.imagify-bulk-table .imagify-cell-thumbnails{text-align:center}.imagify-cell-percentage,.imagify-cell-savings{color:#46B1CE;font-weight:700}.imagify-cell-optimized{font-weight:700}.imagify-cell-totaloriginal{text-align:right}.imagify-modal .h2,.imagify-modal .h3{font-weight:400;letter-spacing:.075em;text-align:center}.dashicons.rotate{-webkit-animation:icon-rotate 2.6s infinite linear;animation:icon-rotate 2.6s infinite linear}.dashicons-admin-generic{-webkit-transform-origin:48.75% 51.75%;-ms-transform-origin:48.75% 51.75%;transform-origin:48.75% 51.75%}.imagify-modal{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack: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;box-sizing:border-box;position:relative;width:800px;max-width:95%;max-height:90vw;overflow:auto;padding:20px 25px;margin:1em auto;background:#FFF;-webkit-box-shadow:1px 1px 4px rgba(0,0,0,.7);box-shadow:1px 1px 4px rgba(0,0,0,.7);border-radius:3px}#imagify-visual-comparison .imagify-modal-content,.imagify-visual-comparison .imagify-modal-content{max-width:1400px;background:0 0;padding:5px;-webkit-box-shadow:none;box-shadow:none;border-radius:0}.imagify-modal .h2{margin:.5em 0;color:#8ba6b4;font-size:24px}.imagify-modal .h3{color:#40b1d0;font-size:18px}.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:0 0;border-radius:0;cursor:pointer}.imagify-modal .close-btn i{margin-left:-2px}.imagify-modal .close-btn:focus,.imagify-modal .close-btn:hover{color:#40b1d0}.js .imagify-modal .close-btn{display:block;visibility:visible}.js .imagify-iframe-viewing .close-btn{display:none}#imagify-visual-comparison .close-btn,.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-visual-comparison .close-btn,.wp_attachment_image #imagify-visual-comparison .close-btn{top:0}.imagify-visual-comparison .imagify-modal-content,.wp_attachment_image #imagify-visual-comparison .imagify-modal-content{padding-top:40px}.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:0;-webkit-box-shadow: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-visual-comparison .imagify-chart-container canvas{width:15px!important;height:15px!important;margin-right:5px}.imagify-c-level.go-left{float:left}.imagify-c-level.go-right{float:right}.imagify-c-level.go-left,.imagify-c-level.go-right{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:700}.imagify-c-level-row .value .imagify-chart{top:1px}@-webkit-keyframes icon-rotate{from{-webkit-transform:rotate(0);transform:rotate(0)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes icon-rotate{from{-webkit-transform:rotate(0);transform:rotate(0)}to{-webkit-transform:rotate(360deg);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;-webkit-transition:opacity .4s;-o-transition:opacity .4s;transition:opacity .4s}.imagify-modal .loading .loader{visibility:visible;opacity:1}.imagify-settings .imagify-visual-comparison-text{margin-top:1em;color:#40b1d0;font-weight:700}.imagify-border-styled,.imagify-flex-table,.imagify-modal-cols,.imagify-offer-header,.imagify-payment-modal .imagify-modal-content,.imagify-tabs{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row}.imagify-analyzing .imagify-numbers-calc,.imagify-modal-content.imagify-iframe-viewing .imagify-modal-sidebar,.imagify-modal-content.imagify-success-viewing .imagify-modal-sidebar,.imagify-modal-section .imagify-loader,.imagify-modal-section.imagify-analyzing .imagify-modal-cols,.imagify-numbers-notcalc{display:none}.imagify-border-styled,.imagify-modal-cols{-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.imagify-payment-modal{text-align:center;color:#7A8996}.imagify-payment-modal *{-webkit-box-sizing:border-box;box-sizing:border-box}.imagify-modal-loader{position:absolute;top:0;left:0;right:0;bottom:0;background:url(../images/loader-balls.svg) center no-repeat #fff;z-index:10}.imagify-payment-modal .imagify-modal-content{width:980px;max-width:100%;min-width:925px;padding:0}.imagify-modal-content.imagify-iframe-viewing{width:980px;height:672px;overflow:hidden}.imagify-iframe-viewing #imagify-payment-process-view{width:980px;height:668px}.imagify-payment-modal .imagify-modal-main{width:70%}.imagify-iframe-viewing .imagify-modal-main{width:auto}.imagify-payment-modal .imagify-modal-content.imagify-success-viewing{min-width:auto;width:450px;min-height:300px}.imagify-success-viewing .imagify-modal-main{width:100%}.imagify-payment-modal .imagify-modal-sidebar{width:30%;padding:15px 20px;background:#1F2332;color:#FFF}.imagify-modal-section{padding:0 25px}.imagify-modal-section.section-gray{margin:0 0 1em;padding:10px 25px 15px;background:#F6F7FB}.imagify-tabs-contents .section-gray{padding:8px 25px 10px}.imagify-modal-section .imagify-modal-title:first-child{margin-top:1em;margin-bottom:1.5em}.imagify-modal-section.section-gray .imagify-modal-title{margin-top:.5em;margin-bottom:.5em}.imagify-modal-title{font-size:1.8em}.imagify-analyzing .imagify-numbers-notcalc,.imagify-modal-section.imagify-analyzing .imagify-loader{display:block}.imagify-modal-section .imagify-loader{margin:2em auto}.imagify-border-styled{width:200px;margin:0 auto;color:#8BC34A;font-weight:700;font-size:.925em}.imagify-big-number,.imagify-payment-modal strong{font-weight:700;color:#4A4A4A}.imagify-big-number{font-size:3.7em;margin:-3px 0;line-height:1}.imagify-border-styled:after,.imagify-border-styled:before{content:"";height:1px;background:rgba(0,0,0,.1);-ms-flex-preferred-size:40px;flex-basis:40px}.imagify-border-styled:before{margin-right:5px}.imagify-border-styled:after{margin-left:5px}.imagify-col{-ms-flex-preferred-size:50%;flex-basis:50%}.imagify-modal .imagify-cols{padding:0 20px}.imagify-payment-modal .imagify-iconed{margin:1.5em 5em 1.5em 0}.imagify-iconed{position:relative;text-align:left;padding-left:42px;margin-right:15px;font-weight:500}.imagify-iconed .dashicons,.imagify-iconed .icon{position:absolute;font-size:2em;left:0;top:2px;color:#40B1D0}.imagify-payment-modal .close-btn{top:10px;right:10px;width:24px;height:24px;padding:2px 0 0 4.5px;color:#FFF;background:#40B1D0;border-radius:50%;-webkit-transition:all .275s;-o-transition:all .275s;transition:all .275s}.imagify-payment-modal .close-btn i{margin-left:-3.5px;margin-top:-.5px}.imagify-payment-modal .close-btn:hover{background:#F6F7FB}.imagify-offer-line{margin-top:1.5em}.imagify-offer-line+.imagify-offer-line{margin-top:.75em}.imagify-offer-header{-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;-webkit-box-align:center;-ms-flex-align:center;align-items:center;padding:0 0 0 15px;border-radius:4px 4px 0 0;-webkit-transition:all .275s;-o-transition:all .275s;transition:all .275s}.imagify-offer-header.imagify-offer-header.imagify-offer-header .imagify-inline-options label:last-child{border-radius:0 4px 0 0}.imagify-offer-header .imagify-inline-options{width:auto}.imagify-offer-title{font-weight:700;margin:0}.imagify-offer-header,.imagify-offer-header .imagify-inline-options input[type=radio]:not(:checked)+label{background:#E5EBEF}.imagify-offer-onetime .imagify-offer-header{padding-top:8px;padding-bottom:8px}.imagify-offer-onetimes>div{padding-top:15px;padding-bottom:15px}.imagify-offer-header .imagify-inline-options input[type=radio]:checked+label,.imagify-offer-header .imagify-inline-options input[type=radio]:not(:checked)+label{position:relative;padding:7px 30px;font-size:1em;letter-spacing:.05em;color:inherit;-webkit-box-shadow:0 0 0;box-shadow:0 0 0;border-radius:0}.imagify-offer-header .imagify-inline-options input[type=radio]:checked+label{background:#F6F7FB}.imagify-2-free{position:absolute;bottom:100%;left:0;right:0;padding:2px 10px;margin-bottom:8px;font-size:.8em;letter-spacing:0;text-transform:none;text-align:center;color:#FFF;background:#10121A;border-radius:2px}.imagify-2-free:after{content:"";position:absolute;left:50%;bottom:-3px;margin-left:-3px;border-top:3px solid #10121A;border-left:3px solid transparent;border-right:3px solid transparent}.imagify-2-free.imagify-b-right{bottom:auto;left:100%;right:-100%;margin-bottom:0;margin-left:8px}.imagify-2-free.imagify-b-right:after{left:-3px;bottom:auto;top:50%;margin-top:-3px;margin-left:0;border-right:3px solid #10121A;border-top:3px solid transparent;border-bottom:3px solid transparent;border-left:0}.imagify-2-free.imagify-b-bottom{bottom:-100%;left:0;right:0;margin-top:8px}.imagify-2-free.imagify-b-bottom:after{top:-3px;bottom:auto;border-bottom:3px solid #10121A;border-left:3px solid transparent;border-right:3px solid transparent;border-top:0}.imagify-offer-content{text-align:left;background:#F6F7FB;border-radius:0 0 4px 4px;-webkit-transition:all .275s;-o-transition:all .275s;transition:all .275s}.imagify-offer-onetime .imagify-offer-content{padding:10px 0}div.imagify-col-checkbox{position:relative;width:25.5%;padding-top:10px;padding-bottom:7px}.imagify-col-checkbox label{display:block;padding-left:55px!important}.imagify-col-checkbox .imagify-checkbox.imagify-checkbox:checked,.imagify-col-checkbox .imagify-checkbox.imagify-checkbox:not(:checked){position:absolute;top:50%;left:6px;margin:-8px 0 0}.imagify-col-checkbox .imagify-checkbox.imagify-checkbox:checked+label:before,.imagify-col-checkbox .imagify-checkbox.imagify-checkbox:not(:checked)+label:before{margin:0;top:-2px;left:6px;-webkit-transition:all .275s;-o-transition:all .275s;transition:all .275s}.imagify-offer-by,.imagify-offer-size{-webkit-transition:all .275s;-o-transition:all .275s}.imagify-col-checkbox .imagify-checkbox.imagify-checkbox:checked+label:after,.imagify-col-checkbox .imagify-checkbox.imagify-checkbox:not(:checked)+label:after{top:1px;left:13px}.imagify-offer-size{font-size:30px;color:#2E3243;font-weight:700;transition:all .275s}.imagify-offer-by{font-size:10px;transition:all .275s}.imagify-approx{display:none;font-size:11px;line-height:1.2;-webkit-transition:all .275s;-o-transition:all .275s;transition:all .275s}div.imagify-col-price{width:35%}.imagify-flex-table .imagify-price-block{padding-left:0;padding-right:0}.imagify-offer-monthlies .imagify-price-block,.imagify-offer-monthly .imagify-flex-table .imagify-price-block{padding-top:0}.imagify-flex-table .imagify-price-complement{padding-right:0;font-size:10px;font-weight:700}.imagify-price-block,.imagify-price-discount{white-space:nowrap}.imagify-price-block span,.imagify-price-discount span{display:inline-block;vertical-align:middle}.imagify-price-discount.imagify-price-discount{position:relative;-webkit-box-flex:0;-ms-flex-positive:0;flex-grow:0;padding-top:15px;font-weight:700;width:70px}.imagify-price-discount:before{content:"";position:absolute;top:25px;width:62%;height:2px;background:#2E3243;-webkit-transform:rotate(-15deg);-ms-transform:rotate(-15deg);transform:rotate(-15deg)}.imagify-offer-onetimes .imagify-price-discount:before{width:100%}.imagify-price-discount-dollar{color:#2E3243}.imagify-price-discount-number{color:#8BA6B4}.imagify-offer-selected .imagify-price-discount-number{color:#FFF}span.imagify-dollars{color:#1F2332;font-size:18px;font-weight:700;vertical-align:-2px}.imagify-offer-onetime .imagify-col-price{padding-top:0}.imagify-offer-onetime .imagify-dollars{vertical-align:-1px}.imagify-price-big,.imagify-price-mini{color:#40B1D0;font-weight:700}.imagify-price-big{font-size:36px}span.imagify-price-mini{font-size:18px;vertical-align:2px}span.imagify-price-by{font-size:10px;color:#1F2332;vertical-align:-13px;text-indent:-27px}.imagify-col-other-actions{width:18.5%;text-align:right}.imagify-col-other-actions a{font-size:11px}.imagify-offer-selected,.imagify-offer-selected .imagify-col-other-actions a,.imagify-offer-selected .imagify-offer-size,.imagify-offer-selected .imagify-offer-title,.imagify-offer-selected .imagify-price-big,.imagify-offer-selected .imagify-price-complement,.imagify-offer-selected .imagify-price-mini{color:#FFF}.imagify-offer-selected .imagify-offer-header,.imagify-offer-selected .imagify-offer-header .imagify-inline-options input[type=radio]:not(:checked)+label{background:#338EA6}.imagify-offer-selected .imagify-offer-content,.imagify-offer-selected .imagify-offer-header .imagify-inline-options input[type=radio]:checked+label{background:#40B1D0}.imagify-offer-selected .imagify-checkbox.imagify-checkbox:checked+label:before,.imagify-offer-selected .imagify-checkbox.imagify-checkbox:not(:checked)+label:before{border-color:#FFF;background:#40B1D0}.imagify-offer-selected .imagify-offer-by{color:#2E3243}.imagify-enough-free .imagify-not-enough-title,.imagify-enough-title{display:none}.imagify-enough-free .imagify-enough-title{display:block}.imagify-submit-line{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;-webkit-box-align:center;-ms-flex-align:center;align-items:center;margin:2em 0;text-align:left}.imagify-coupon-section{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.imagify-coupon-section p{margin:0;line-height:1.3}.imagify-coupon-text{width:200px;max-width:100%;padding-right:15px}.imagify-coupon-loader{display:none}.imagify-coupon-text.checking{text-align:right}.imagify-coupon-text.checking .imagify-coupon-loader{display:inline}.imagify-coupon-text.checking label{display:none}.imagify-coupon-input{position:relative}.imagify-coupon-input input{position:relative;z-index:1}[id=imagify-coupon-validate].button-secondary{position:absolute;top:1px;right:3px;bottom:2px;-webkit-box-shadow:none;box-shadow:none;padding:4px 10px;z-index:0;-webkit-transition:-webkit-transform .275s;-o-transition:transform .275s;transition:transform .275s;transition:transform .275s,-webkit-transform .275s}.imagify-canbe-validate [id=imagify-coupon-validate]{-webkit-transform:translateX(45px);-ms-transform:translateX(45px);transform:translateX(45px)}.imagify-modal-section+.imagify-modal-promotion{margin-top:-1em}.imagify-modal-promotion{position:relative;overflow:hidden;display:none;-webkit-box-align:center;-ms-flex-align:center;align-items:center;padding:15px 25px;background:#604D90;text-shadow:0 0 3px rgba(0,0,0,.3)}.imagify-modal-promotion.active{display:-webkit-box;display:-ms-flexbox;display:flex}[id=imagify-pricing-tab-onetime] .imagify-modal-promotion{margin-bottom:4em}.imagify-modal-promotion:before{content:"\f488";position:absolute;top:28px;left:8%;font-family:dashicons;font-size:90px;color:#8476A9;text-shadow:none}.imagify-modal-promotion p{position:relative;margin:.2em 0;color:#FFF}.imagify-promo-title{-ms-flex-preferred-size:100%;flex-basis:100%;text-transform:uppercase;font-size:20px;font-weight:700;letter-spacing:.125em}.imagify-until-date{-ms-flex-preferred-size:200px;flex-basis:200px;text-align:right}.imagify-until-date strong{color:#FFF}.imagify-submit-line button{font-size:16px}input.imagify-coupon-code{padding:10px;border:2px solid #7A8996;font-size:.875em;font-weight:700;border-radius:3px}.validated.imagify-coupon-section .imagify-coupon-text,.validated.imagify-coupon-section strong{color:#8BC34A}.validated.imagify-coupon-section .imagify-coupon-code{color:#8BC34A;border-color:#8BC34A}.invalid.imagify-coupon-section .imagify-coupon-text,.invalid.imagify-coupon-section strong{color:#d0021b}.invalid.imagify-coupon-section .imagify-coupon-code{color:#d0021b;border-color:#d0021b}.imagify-footer-lines{width:500px;max-width:100%;margin:2em auto 2.5em;font-size:.85em;line-height:1.5}.imagify-year-selected .imagify-switch-my .imagify-yearly{display:block}.imagify-month-selected .imagify-switch-my .imagify-yearly,.imagify-year-selected .imagify-switch-my .imagify-monthly{display:none}.imagify-month-selected .imagify-switch-my .imagify-monthly{display:block}.imagify-flex-table{-webkit-box-align:center;-ms-flex-align:center;align-items:center}.imagify-flex-table>*{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;padding:7px 15px}div.imagify-col-details{width:22%;padding-left:25px}.imagify-col-details p{margin:0}.imagify-pricing-table{margin:0 20px}.imagify-pricing-table .imagify-offer-line{padding:.6em 0;border:2px solid #E8EEF0;text-align:left;border-radius:3px}.imagify-pricing-table .imagify-offer-line:first-child{margin-top:.75em}.imagify-pricing-table .imagify-offer-line.imagify-offer-selected:first-child{margin-top:1.75em}.imagify-pricing-table .imagify-offer-line+.imagify-offer-line{margin-top:-2px}.imagify-pricing-table .imagify-col-other-actions{width:20.5%}.imagify-pricing-table .imagify-approx{margin-left:0;line-height:.5;margin-bottom:1em}.imagify-pricing-table .imagify-offer-selected{-webkit-transform:scale(1.03);-ms-transform:scale(1.03);transform:scale(1.03);background:#40B1D0;border-width:0}.imagify-pricing-table .imagify-offer-selected .imagify-approx{color:#FFF}.imagify-pricing-table .imagify-button-secondary{padding:3px 20px;-webkit-box-shadow:none;box-shadow:none;text-transform:uppercase;font-size:12px;letter-spacing:.025em}.imagify-offer-selected.imagify-offer-selected .imagify-button-secondary{border:2px solid #FFF;background:#40B1D0;-webkit-box-shadow:none;box-shadow:none;text-shadow:none!important}.imagify-offer-selected.imagify-offer-selected .imagify-button-secondary:focus,.imagify-offer-selected.imagify-offer-selected .imagify-button-secondary:hover{background:#FFF;color:#40B1D0}.imagify-col .imagify-special-needs{margin-left:25px}.imagify-special-needs strong{font-size:25px;font-weight:700;color:#40B1D0}.imagify-special-needs span{display:block;font-size:12px;margin-top:-.5em}div.imagify-col-price{position:relative}.imagify-recommend{display:none;position:absolute;left:-20px;bottom:100%;padding:0;margin-bottom:8px;color:#1F2332;font-weight:700;font-style:italic}.imagify-offer-selected .imagify-recommend,.imagify-tab-content.imagify-current{display:block}[class*=imagify-onetime-] .imagify-recommend{left:65px;margin-bottom:20px}.imagify-recommend:before{content:"";position:absolute;top:7px;left:-35px;width:29px;height:30px;background:url(../images/icon-arrow-choice.png) 0 no-repeat;background-size:contain}@media only screen and (-webkit-min-device-pixel-ratio:2),only screen and (-o-min-device-pixel-ratio:2/1),only screen and (min-resolution:192dpi),only screen and (min-resolution:2dppx){.imagify-recommend:before{background-image:url(../images/icon-arrow-choice.svg)}}.imagify-offer-line[class*=imagify-onetime-]{padding:0;margin:.3em 0 0}.imagify-offer-line.imagify-offer-line[class*=imagify-onetime-]:first-child{margin-top:2em}.imagify-offer-line[class*=imagify-onetime-]+.imagify-offer-line{margin-top:.5em}.imagify-offer-selected.imagify-offer-line[class*=imagify-onetime-]{-webkit-transform:scale(1);-ms-transform:scale(1);transform:scale(1);border-width:2px}.imagify-offer-line[class*=imagify-onetime-] .imagify-col-details{position:relative;overflow:hidden;width:21%;background:#1F2332;color:#FFF}.imagify-offer-selected.imagify-offer-line[class*=imagify-onetime-] .imagify-col-details{background:#338EA6}.imagify-offer-line[class*=imagify-onetime-] .imagify-col-details:before{content:"";position:absolute;bottom:0;right:25px;width:75px;height:54px;background:url(../images/icon-pack.png)}.imagify-offer-line[class*=imagify-onetime-] .imagify-col-other-actions{width:30%}.imagify-offer-line[class*=imagify-onetime-] .imagify-approx,.imagify-offer-line[class*=imagify-onetime-] .imagify-offer-size{color:#FFF}.imagify-offer-line[class*=imagify-onetime-] .imagify-offer-size{font-size:24px}.imagify-offer-line[class*=imagify-onetime-] .imagify-approx{font-size:12px}.imagify-offer-line[class*=imagify-onetime-] .imagify-price-block{padding-left:10px}.imagify-offer-line[class*=imagify-onetime-] .imagify-dollars{vertical-align:middle}.imagify-offer-line[class*=imagify-onetime-] .imagify-price-big{vertical-align:-5px}.imagify-offer-line[class*=imagify-onetime-] .imagify-price-mini{vertical-align:7px}.imagify-tabs{margin-bottom:0;list-style:none;background:#E5EBEF}.imagify-modal-content .imagify-tabs{margin:1em 0 0}.imagify-tab{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;width:50%;margin:0;font-size:23px}.imagify-tab a{display:block;padding:15px 10px;color:inherit;text-decoration:none}.imagify-tab a:focus{-webkit-box-shadow:none;box-shadow:none;outline:0;color:#40B1D8}.imagify-tab.imagify-current a{background:#F6F7FB}.imagify-tab-content{display:none}.imagify-tab-content .imagify-modal-section:first-child{margin-top:0}.imagify-modal-sidebar-content,.imagify-payment-modal .imagify-modal-sidebar{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.imagify-modal-sidebar-content{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1}p.imagify-modal-sidebar-title{margin-top:5px;padding-right:40px;font-size:18px;color:#FFF}.imagify-modal-testimony{margin-top:1em}.imagify-modal-testimony+.imagify-modal-testimony{margin-top:2em}@media (max-height:620px){.imagify-modal-testimony+.imagify-modal-testimony{display:none}}.imagify-modal-testimony-person{display:table;width:100%}.imagify-modal-testimony-person>*{display:table-cell;vertical-align:middle}.imagify-modal-avatar{width:114px;line-height:0}.imagify-modal-avatar img{border:2px solid #FFF;border-radius:50%;width:96px;height:96px}.imagify-modal-identity a{text-decoration:none;font-weight:700}.imagify-modal-identity a:first-child{font-size:13px}.imagify-modal-identity a:first-child+a{display:block;font-size:10px;color:#7A8996}.imagify-modal-testimony-content p{font-size:13px;font-style:italic;line-height:1.7;color:#7A8996}.imagify-modal-sidebar-trust{margin-top:auto;padding-top:1.5em}.imagify-modal-sidebar-trust p{margin:0;font-weight:700;font-size:12px;line-height:1.7}.imagify-modal-sidebar-trust p img{margin-right:3px;vertical-align:-2px}.imagify-modal-sidebar-trust p+p{font-size:11px}.imagify-cart{text-align:left}.imagify-cart .imagify-cart-list{border-top:1px solid rgba(122,137,150,.2);border-bottom:1px solid rgba(122,137,150,.2)}.imagify-cart .imagify-cart-label{margin-bottom:.5em;font-size:10px;color:#2E3243}.imagify-cart-list p{margin:0;font-weight:700}.imagify-cart-item{margin:.4em 0}.imagify-cart .imagify-cart-suggestion{margin-top:-.3em}.imagify-cart-suggestion a,.imagify-cl-description p{font-size:10px}.imagify-remove-from-cart{border:0;padding:0;width:14px;height:14px;line-height:13px;border-radius:50%;background:#40B1D0;cursor:pointer;-webkit-transition:background .3s;-o-transition:background .3s;transition:background .3s}.imagify-remove-from-cart i:before{position:relative;top:-6px;left:-3px;font-size:13px;color:#FFF}.imagify-remove-from-cart:focus,.imagify-remove-from-cart:hover{background:#D0021B}.imagify-cart .imagify-cl-remove{-webkit-box-flex:0;-ms-flex-positive:0;flex-grow:0;width:45px}.imagify-cart .imagify-cl-name{-webkit-box-flex:0;-ms-flex-positive:0;flex-grow:0;width:200px}.imagify-cart .imagify-cl-description{-webkit-align-self:flex-start;-ms-flex-item-align:start;align-self:flex-start;padding-top:10px}.imagify-cart .imagify-cl-price{text-align:right}#imagify-payment-iframe{width:980px;height:672px;background:url(../images/loader-balls.svg) 50% 50% no-repeat #f6f7fb}.imagify-success-view{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;height:100%}.imagify-success-view p{font-weight:700;font-size:16px}.imagify-cart-emptied-item{margin:.3em auto;padding:6px 20px;background:#E6EBEF;border-radius:20px}.imagify-cart-emptied-item.imagify-cart-emptied-item p{font-weight:700}.imagify-cart-emptied-item a{color:#40b1d0;float:right;font-weight:700}
|
1 |
+
.imagify-cell,.imagify-cell.va-top,.va-top .imagify-cell{vertical-align:top}.imagify-columns,.imagify-data-item,.imagify-oh,body.imagify-modal-is-open{overflow:hidden}.imagify-start{float:left}.imagify-end{float:right}.imagify-txt-start.imagify-txt-start.imagify-txt-start{text-align:left}.imagify-txt-center.imagify-txt-center.imagify-txt-center{text-align:center}.imagify-txt-end.imagify-txt-end.imagify-txt-end{text-align:right}.imagify-mt1.imagify-mt1{margin-top:1em}.imagify-mb1.imagify-mb1{margin-bottom:1em}.imagify-mr1.imagify-mr1{margin-right:1em}.imagify-ml2.imagify-ml2{margin-left:2em}.imagify-mr2.imagify-mr2{margin-right:2em}.imagify-pl0.imagify-pl0.imagify-pl0{padding-left:0}.imagify-pr1.imagify-pr1{padding-right:1em}.imagify-clear{clear:both}.imagify-clearfix:after,.imagify-inline-options:after{content:"";display:table;clear:both}.imagify-count.imagify-count{counter-reset:num}.imagify-count .imagify-count-title{font-weight:700}.imagify-default-settings{color:#73818c;font-weight:400}.imagify-count .imagify-count-title:before{counter-increment:num 1;content:counter(num) ". "}.imagify-table{display:table;width:100%}.imagify-cell{display:table-cell;padding:10px}.imagify-bulk-submit .imagify-cell{padding-top:0}.imagify-spinner{display:inline-block;width:20px;height:20px;margin-right:5px;vertical-align:middle;background:url(../images/spinner.gif) 0 0/20px 20px no-repeat rgba(0,0,0,0);opacity:.7}.spinner.imagify-hidden{width:0;margin:4px 0 0}.imagify-primary.imagify-primary.imagify-primary{color:#40b1d0}.imagify-secondary.imagify-secondary.imagify-secondary,.imagify-valid{color:#8BC34A}.misc-pub-section.misc-pub-imagify h4{font-size:14px;margin-top:5px;margin-bottom:0}.imagify-chart{width:33.33%;position:relative;float:left;margin-bottom:20px}.imagify-chart-container{position:relative;width:180px;float:left;margin-right:20px}td .imagify-chart{top:4px;float:none;margin-bottom:0}td .imagify-chart-container{width:18px;height:18px;float:none;margin-right:10px}.imagify-settings .button,.imagify-settings a,.imagify-settings input,.imagify-welcome .button,.imagify-welcome a,.imagify-weolcome input{-webkit-transition:all .275s;-o-transition:all .275s;transition:all .275s}.imagify-settings a{color:#40b1d0}.imagify-settings,.imagify-settings p,.imagify-settings th{color:#5F758E}.imagify-button-primary.imagify-button-primary,.imagify-button-secondary.imagify-button-secondary,.imagify-button.imagify-button,.imagify-notice .button,.imagify-settings .button,.imagify-welcome .button{height:auto;padding:8px 20px;border:0;font-size:14px;font-weight:600;-webkit-box-shadow:0 3px 0 rgba(0,0,0,.15);box-shadow:0 3px 0 rgba(0,0,0,.15);border-radius:3px;cursor:pointer;-webkit-transition:all .275s;-o-transition:all .275s;transition:all .275s}.button-primary.button-mini{padding:2px 10px}.imagify-settings .button.button-mini-flat{padding:3px 6px 5px;font-size:12px;-webkit-box-shadow:none!important;box-shadow:none!important;line-height:1.2}.imagify-settings .button.button-mini-flat:focus,.imagify-settings .button.button-mini-flat:hover{-webkit-box-shadow:none!important;box-shadow:none!important}.imagify-button-ghost.imagify-button-ghost,.imagify-title .button-ghost.button-ghost{padding:2px 9px;border:1px solid #40B1D0;font-size:12px;font-weight:400;color:#40B1D0;background:0 0;-webkit-box-shadow:none;box-shadow:none}.imagify-button-ghost.imagify-button-ghost:focus,.imagify-button-ghost.imagify-button-ghost:hover,.imagify-title .button-ghost.button-ghost:focus,.imagify-title .button-ghost.button-ghost:hover{border-color:transparent;color:#000;background:#40B1D0}.imagify-button-ghost.imagify-button-ghost:focus,.imagify-button-ghost.imagify-button-ghost:hover{color:#FFF}.imagify-button-medium.imagify-button-medium{text-transform:uppercase;letter-spacing:.1em;padding:3px 10px;font-weight:700}.imagify-button-medium.imagify-button-ghost{border-width:2px}[class*=imagify-] .button .dashicons{margin-right:5px;vertical-align:middle}.imagify-button-primary.imagify-button-primary,.imagify-settings .button-primary.button-primary,.imagify-welcome .button-primary.button-primary{background:#40B1D0;color:#FFF;-webkit-box-shadow:0 3px 0 rgba(51,142,166,1);box-shadow:0 3px 0 rgba(51,142,166,1);text-shadow:0 -1px 1px #006799,1px 0 1px #006799,0 1px 1px #006799!important}.imagify-button-secondary.imagify-button-secondary{background:#8BC34A;color:#FFF;-webkit-box-shadow:0 3px 0 #6F9C3B;box-shadow:0 3px 0 #6F9C3B;text-shadow:0 -1px 1px #6F9C3B,1px 0 1px #6F9C3B,0 1px 1px #6F9C3B!important}.imagify-button-primary.imagify-button-primary:focus,.imagify-button-primary.imagify-button-primary:hover,.imagify-settings .button-primary:focus,.imagify-settings .button-primary:hover,.imagify-welcome .button-primary:focus,.imagify-welcome .button-primary:hover{background:#338ea6;-webkit-box-shadow:0 3px 0 #1f7a92;box-shadow:0 3px 0 #1f7a92}.imagify-button-secondary.imagify-button-secondary:focus,.imagify-button-secondary.imagify-button-secondary:hover{background:#6F9C3B;color:#FFF}.imagify-button-light.imagify-button-light{background:#FFF;color:#4a4a4a;-webkit-box-shadow:0 2px 0 rgba(0,0,0,.2);box-shadow:0 2px 0 rgba(0,0,0,.2)}.imagify-button-light.imagify-button-light:focus,.imagify-button-light.imagify-button-light:hover{color:#FFF;background:rgba(0,0,0,.2)}.imagify-section-positive .imagify-button-light{color:#709A41}.imagify-button.imagify-button-big{font-size:15px;padding:11px 30px}.imagify-button-big .dashicons{font-size:1.45em;margin-right:6px;margin-left:-4px}.imagify-button-primary.imagify-button-primary .dashicons,.imagify-button-secondary.imagify-button-secondary .dashicons,.imagify-button.imagify-button .dashicons,.imagify-notice .button .dashicons,.imagify-settings .button .dashicons,.imagify-welcome .button .dashicons{vertical-align:middle}[class*=imagify-] .button-text{display:inline-block;vertical-align:middle}.media-frame-content .imagify-button-primary,.wp_attachment_image .imagify-button-primary{padding:0 10px 1px;margin:0 5px 2px 0;font-size:13px;line-height:26px;-webkit-box-shadow:0 3px 0 rgba(51,142,166,1);box-shadow:0 3px 0 rgba(51,142,166,1)}.wp_attachment_image .imagify-button-primary{float:left}.imagify-title.imagify-title{position:relative;padding:30px 50px;font-size:23px;background:#2E3243;color:#FFF}.imagify-settings .imagify-title{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.imagify-settings .imagify-logo-block{-ms-flex-negative:0;flex-shrink:0;-webkit-box-flex:0;-ms-flex-positive:0;flex-grow:0;margin-right:35px}.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-section,.imagify-settings div.submit,.imagify-sub-header,.imagify-sub-title.imagify-sub-title{margin:0;padding:20px;background:#F2F5F7}.imagify-section-positive,.imagify-sub-title.imagify-sub-title{padding-left:40px}.imagify-section-positive{background:#8cc152;color:#FFF}.imagify-section-positive p{color:#FFF}.imagify-section-gray{background:#D9E4EB}.imagify-section-gray .imagify-count-title{color:#4a4a4a}.imagify-section p:first-child{margin-top:0}.imagify-section p:last-child{margin-bottom:0}@media (max-width:1120px){.imagify-settings .imagify-title{-ms-flex-wrap:wrap;flex-wrap:wrap}}.imagify-settings-section{padding:10px 20px}.imagify-welcome .imagify-settings-section,[id=imagify-settings]{border:1px solid #D9D9D9;border-top:0 none;background:#FFF}.imagify-br{line-height:2}p.imagify-section-title.imagify-section-title{font-size:20px;margin-top:-.3em;margin-bottom:-.6em}.imagify-rate-us.imagify-rate-us{text-align:right;margin:-1em -2.4em -1em 0;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:focus,.imagify-rate-us a:hover{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-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}.imagify-checkbox.imagify-checkbox:checked,.imagify-checkbox.imagify-checkbox:not(:checked),.imagify-settings.imagify-settings [type=checkbox]:checked,.imagify-settings.imagify-settings [type=checkbox]:not(:checked){opacity:.01}.imagify-checkbox.imagify-checkbox:checked:focus,.imagify-checkbox.imagify-checkbox:not(:checked):focus,.imagify-settings.imagify-settings [type=checkbox]:checked:focus,.imagify-settings.imagify-settings [type=checkbox]:not(:checked):focus{-webkit-box-shadow:none!important;box-shadow:none!important;outline:0!important;border:0!important}.imagify-checkbox.imagify-checkbox:checked+label,.imagify-checkbox.imagify-checkbox:not(:checked)+label,.imagify-settings [type=checkbox]:checked+label,.imagify-settings [type=checkbox]:not(:checked)+label{position:relative;padding-left:6px;cursor:pointer;vertical-align:top}.imagify-checkbox.imagify-checkbox:checked+label:before,.imagify-checkbox.imagify-checkbox:not(:checked)+label:before,.imagify-settings [type=checkbox]:checked+label:before,.imagify-settings [type=checkbox]:not(: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-checkbox.imagify-checkbox:checked+label:after,.imagify-checkbox.imagify-checkbox:not(:checked)+label:after,.imagify-settings [type=checkbox]:checked+label:after,.imagify-settings [type=checkbox]:not(:checked)+label:after{content:"✓";position:absolute;font-size:1.4em;top:3px;left:-16px;-webkit-transition:all .2s;-o-transition:all .2s;transition:all .2s}.imagify-checkbox.imagify-checkbox[disabled]:checked+label:before,.imagify-checkbox.imagify-checkbox[disabled]:not(:checked)+label:before,.imagify-settings [type=checkbox][disabled]:checked+label:before,.imagify-settings [type=checkbox][disabled]:not(:checked)+label:before{border-color:#ccc;background:#ddd}.imagify-checkbox.imagify-checkbox:not(:checked)+label:after,.imagify-settings [type=checkbox]:not(:checked)+label:after{opacity:0;-webkit-transform:scale(0);-ms-transform:scale(0);transform:scale(0)}.imagify-checkbox.imagify-checkbox:checked+label:after,.imagify-settings [type=checkbox]:checked+label:after{opacity:1;-webkit-transform:scale(1);-ms-transform:scale(1);transform:scale(1)}.medium.imagify-checkbox:checked+label:before,.medium.imagify-checkbox:not(:checked)+label:before{width:22px;height:22px;border-width:1.5px;border-radius:2px;margin-top:0}.medium.imagify-checkbox:checked+label:after,.medium.imagify-checkbox:not(:checked)+label:after{font-size:1.1em;left:-17px;top:3px}.imagify-settings .mini[type=checkbox]:checked+label:before,.imagify-settings .mini[type=checkbox]:not(:checked)+label:before,.mini.imagify-checkbox:checked+label:before,.mini.imagify-checkbox:not(:checked)+label:before{width:15px;height:15px;border-width:1px;border-radius:2px;margin-top:0}.imagify-settings .mini[type=checkbox]:checked+label:after,.imagify-settings .mini[type=checkbox]:not(:checked)+label:after,.mini.imagify-checkbox:checked+label:after,.mini.imagify-checkbox:not(:checked)+label:after{font-size:.9em;left:-21px;top:-.5px}.imagify-checkbox.imagify-checkbox:checked:focus+label:before,.imagify-checkbox.imagify-checkbox:not(:checked):focus+label:before,.imagify-settings [type=checkbox]:checked:focus+label:before,.imagify-settings [type=checkbox]:not(: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 input[type=radio]:checked,.imagify-inline-options input[type=radio]:not(:checked){position:absolute;left:5px;top:5px;display:none}.imagify-inline-options input[type=radio]:checked+label,.imagify-inline-options input[type=radio]:not(:checked)+label{position:relative;display:table-cell;padding:13px 10px;text-align:center;font-weight:600;font-size:16px;text-transform:uppercase;letter-spacing:.1em;color:#FFF;background:#2E3243;border-left:1px solid rgba(255,255,255,.2);-webkit-box-shadow:0 -3px 0 rgba(0,0,0,.1) inset,inset -1px 0 0 rgba(255,255,255,.2);box-shadow:0 -3px 0 rgba(0,0,0,.1) inset,inset -1px 0 0 rgba(255,255,255,.2);z-index:2;-webkit-transition:all .275s;-o-transition:all .275s;transition:all .275s}.imagify-modal .h2,.imagify-modal .h3{letter-spacing:.075em;text-align:center;font-weight:400}.imagify-inline-options input[type=radio]:checked+label:first-of-type,.imagify-inline-options input[type=radio]:not(:checked)+label:first-of-type{border-radius:3px 0 0 3px}.imagify-inline-options input[type=radio]:checked+label:last-of-type,.imagify-inline-options input[type=radio]:not(: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-columns{padding:15px 0;counter-reset:cols}.imagify-columns [class^=col-]{float:left;-webkit-box-sizing:border-box;box-sizing:border-box}.imagify-columns .col-1-3{width:33.333%;padding-left:28px}.imagify-columns .col-2-3{width:66.666%;padding-left:28px}.imagify-columns .col-1-2{width:50%;padding:0 20px}@media (max-width:830px){.imagify-columns [class^=col-]{float:none;margin-bottom:1.5em}.imagify-columns .col-1-2,.imagify-columns .col-1-3{width:auto;padding:0 28px;clear:both;padding-top:1em}}.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}@media (min-width:1151px) and (max-width:1800px){.column-imagify_optimized_file.column-imagify_optimized_file{width:235px}}@media (min-width:783px) and (max-width:1150px){.column-imagify_optimized_file.column-imagify_optimized_file{width:13em}table.media .column-title .has-media-icon~.row-actions.row-actions{margin-left:0}}@media (max-width:782px){table.media .column-imagify_optimized_file.column-imagify_optimized_file{text-align:left}table.media .imagify-datas-actions-links,table.media .imagify-datas-more-action{text-align:center}table.media .column-imagify_optimized_file .imagify-datas-actions-links a,table.media .column-imagify_optimized_file>*{max-width:100%;margin-left:0}}@media (min-width:783px) and (max-width:1150px),(max-width:360px){table.media .imagify-hide-if-small{position:absolute;margin:-1px;padding:0;height:1px;width:1px;overflow:hidden;clip:rect(0 0 0 0);border:0;word-wrap:normal!important}}.compat-field-imagify .label{vertical-align:top}.compat-field-imagify ul.imagify-datas-list{margin-top:7px;font-size:11px}ul.imagify-datas-list.imagify-datas-list{margin:0 auto;color:#555;font-size:10px}ul.imagify-datas-list .big{font-size:12px;color:#40B1D0}.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;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:700}ul.imagify-datas-list .imagify-data-item strong{text-align:left;padding-left:5px}.media-sidebar .imagify-datas-list .imagify-data-item .data,.media-sidebar .imagify-datas-list .imagify-data-item strong{width:auto;float:none}.imagify-datas-more-action.imagify-datas-more-action{margin:.4em auto;background:-webkit-gradient(linear,left top,left bottom,from(transparent),color-stop(49%,transparent),color-stop(50%,rgba(0,0,0,.075)),color-stop(58%,rgba(0,0,0,.075)),color-stop(58%,transparent),to(transparent));background:-o-linear-gradient(top,transparent,transparent 49%,rgba(0,0,0,.075) 50%,rgba(0,0,0,.075) 58%,transparent 58%,transparent);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:700;line-height:1.9;text-decoration:none}.imagify-datas-more-action a.is-open{background:#555}.imagify-datas-more-action a.is-open .dashicons{-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);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:auto;line-height:inherit}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}.nggform .imagify-datas-actions-links{position:relative;z-index:2}.nggform .row-actions{z-index:1}.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}.column-imagify_optimized_file .imagify-datas-actions-links a{margin:0 .7em;padding-left:15px}.compat-field-imagify .imagify-datas-actions-links a,.misc-pub-imagify .imagify-datas-actions-links a{font-size:10px;float:left;width:50%}.media-sidebar .compat-field-imagify .imagify-datas-actions-links a,.submitbox .misc-pub-imagify .imagify-datas-actions-links a{display:block;width:auto;float:none}.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-account,.imagify-account-link{padding-right:15px}.imagify-meteo-icon{display:inline-block;height:38px;vertical-align:middle;margin-right:10px}.imagify-user-plan{color:#40b1d0}.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-]{position:relative;height:1.5em;width:100%;background:#60758D;color:#FFF;font-size:10px}.imagify-progress{height:1.5em;-webkit-transition:width .3s;-o-transition:width .3s;transition:width .3s}.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}.imagify-btn-ghost{display:inline-block;height:auto;padding:7px 10px;border:1px solid #FFF;text-align:center;background:0 0;color:#FFF;border-radius:3px;-webkit-transition:all .275s;-o-transition:all .275s;transition:all .275s}.imagify-btn-ghost:focus,.imagify-btn-ghost:hover{background:#FFF;color:#888}.imagify-error{background:#D0021B;color:#FFF}.imagify-settings-section .imagify-error{display:inline-block;padding:7px 10px;margin:10px 0 0 45px;border-radius:3px}.imagify-settings-section .imagify-error code{font-weight:400}.imagify-settings-section .imagify-error.hidden{display:none}.imagify-warning{background:#f5a623;color:#FFF;text-shadow:0 0 2px rgba(0,0,0,.2)}.imagify-modal{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack: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;box-sizing:border-box;position:relative;width:800px;max-width:95%;max-height:90vw;overflow:auto;padding:20px 25px;margin:1em auto;background:#FFF;-webkit-box-shadow:1px 1px 4px rgba(0,0,0,.7);box-shadow:1px 1px 4px rgba(0,0,0,.7);border-radius:3px}#imagify-visual-comparison .imagify-modal-content,.imagify-visual-comparison .imagify-modal-content{max-width:1400px;background:0 0;padding:5px;-webkit-box-shadow:none;box-shadow:none;border-radius:0}.imagify-modal .h2{margin:.5em 0;color:#8ba6b4;font-size:24px}.imagify-modal .h3{color:#40b1d0;font-size:18px}.imagify-modal .close-btn{display:none;visibility:hidden;position:absolute;right:20px;top:20px;font-size:1.2em;border:0;background:0 0;border-radius:0;cursor:pointer}.imagify-modal .close-btn i{margin-left:-2px}.imagify-modal .close-btn:focus,.imagify-modal .close-btn:hover{color:#40b1d0}.js .imagify-modal .close-btn{display:block;visibility:visible}.imagify-visual-comparison .close-btn,.wp_attachment_image #imagify-visual-comparison .close-btn{top:0}.imagify-visual-comparison .imagify-modal-content,.wp_attachment_image #imagify-visual-comparison .imagify-modal-content{padding-top:40px}.imagify-col{float:left;width:50%;-ms-flex-preferred-size:50%;flex-basis:50%}
|
assets/css/bulk.css
ADDED
@@ -0,0 +1,737 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Doughnut legend */
|
2 |
+
#imagify-overview-chart-legend {
|
3 |
+
overflow: hidden;
|
4 |
+
}
|
5 |
+
|
6 |
+
.imagify-doughnut-legend {
|
7 |
+
margin-top: 38px;
|
8 |
+
list-style: none;
|
9 |
+
}
|
10 |
+
|
11 |
+
.imagify-doughnut-legend li {
|
12 |
+
display: block;
|
13 |
+
padding-left: 30px;
|
14 |
+
position: relative;
|
15 |
+
margin-bottom: 15px;
|
16 |
+
border-radius: 5px;
|
17 |
+
padding: 3px 8px 2px 31px;
|
18 |
+
font-size: 14px;
|
19 |
+
font-weight: 600;
|
20 |
+
cursor: default;
|
21 |
+
-webkit-transition: background-color 200ms ease-in-out;
|
22 |
+
-moz-transition: background-color 200ms ease-in-out;
|
23 |
+
-o-transition: background-color 200ms ease-in-out;
|
24 |
+
transition: background-color 200ms ease-in-out;
|
25 |
+
}
|
26 |
+
|
27 |
+
.imagify-doughnut-legend li span {
|
28 |
+
display: block;
|
29 |
+
position: absolute;
|
30 |
+
left: 0; top: 0;
|
31 |
+
width: 25px;
|
32 |
+
height: 25px;
|
33 |
+
border-radius: 50%;
|
34 |
+
}
|
35 |
+
|
36 |
+
.imagify-global-optim-phrase {
|
37 |
+
width: 180px;
|
38 |
+
padding-top: 20px;
|
39 |
+
font-size: 14px;
|
40 |
+
font-weight: bold;
|
41 |
+
text-align: center;
|
42 |
+
}
|
43 |
+
|
44 |
+
.imagify-total-percent {
|
45 |
+
color: #46b1ce;
|
46 |
+
}
|
47 |
+
|
48 |
+
.imagify-chart-percent {
|
49 |
+
position: absolute;
|
50 |
+
left: 0; right: 0;
|
51 |
+
top: 50%;
|
52 |
+
margin-top: -14px;
|
53 |
+
text-align: center;
|
54 |
+
font-size: 55px;
|
55 |
+
font-weight: bold;
|
56 |
+
color: #46B1CE;
|
57 |
+
}
|
58 |
+
.imagify-chart-percent span {
|
59 |
+
font-size: 20px;
|
60 |
+
vertical-align: super;
|
61 |
+
}
|
62 |
+
|
63 |
+
.media_page_imagify-bulk-optimization .media-item,
|
64 |
+
body[class*="_imagify-ngg-bulk-optimization"] .media-item {
|
65 |
+
margin: 0;
|
66 |
+
}
|
67 |
+
|
68 |
+
.media_page_imagify-bulk-optimization .media-item .progress,
|
69 |
+
body[class*="_imagify-ngg-bulk-optimization"] .media-item .progress {
|
70 |
+
float: none;
|
71 |
+
width: 100%;
|
72 |
+
margin: 0;
|
73 |
+
background: #1F2331;
|
74 |
+
box-shadow: 0;
|
75 |
+
border-radius: 0;
|
76 |
+
}
|
77 |
+
|
78 |
+
.media_page_imagify-bulk-optimization .media-item .percent,
|
79 |
+
body[class*="_imagify-ngg-bulk-optimization"] .media-item .percent {
|
80 |
+
width: auto;
|
81 |
+
padding: 0 5px;
|
82 |
+
line-height: 1.85;
|
83 |
+
font-size: 12px;
|
84 |
+
}
|
85 |
+
|
86 |
+
.media_page_imagify-bulk-optimization .media-item .progress,
|
87 |
+
.media_page_imagify-bulk-optimization .media-item .percent,
|
88 |
+
body[class*="_imagify-ngg-bulk-optimization"] .media-item .progress,
|
89 |
+
body[class*="_imagify-ngg-bulk-optimization"] .media-item .percent {
|
90 |
+
text-align: right;
|
91 |
+
}
|
92 |
+
.media_page_imagify-bulk-optimization .media-item .progress .bar,
|
93 |
+
body[class*="_imagify-ngg-bulk-optimization"] .media-item .progress .bar {
|
94 |
+
width: 1px;
|
95 |
+
height: 22px;
|
96 |
+
margin-top: 0;
|
97 |
+
background: #46B1CE;
|
98 |
+
border-radius: 0;
|
99 |
+
overflow: visible;
|
100 |
+
-webkit-transition: width .5s;
|
101 |
+
transition: width .5s;
|
102 |
+
}
|
103 |
+
|
104 |
+
#imagify-bulk-action {
|
105 |
+
padding: 11px 20px;
|
106 |
+
}
|
107 |
+
|
108 |
+
.imagify-columns .col-overview.col-overview {
|
109 |
+
padding-left: 20px;
|
110 |
+
}
|
111 |
+
.imagify-columns .col-informations.col-informations {
|
112 |
+
width: 36.6%;
|
113 |
+
padding-right: 30px;
|
114 |
+
}
|
115 |
+
.imagify-columns .col-statistics.col-statistics {
|
116 |
+
width: 30%;
|
117 |
+
}
|
118 |
+
|
119 |
+
.imagify-bulk-submit .imagify-inline-options input[type="radio"]:not(:checked) + label,
|
120 |
+
.imagify-bulk-submit .imagify-inline-options input[type="radio"]:checked + label {
|
121 |
+
margin-bottom: 1.75em;
|
122 |
+
}
|
123 |
+
|
124 |
+
/* Header */
|
125 |
+
.imagify-title-right {
|
126 |
+
display: table;
|
127 |
+
float: right; /* fallback old browsers */
|
128 |
+
margin-top: -10px;
|
129 |
+
-webkit-box-ordinal-group: 3;
|
130 |
+
-ms-flex-order: 2;
|
131 |
+
order: 2;
|
132 |
+
}
|
133 |
+
.imagify-title-right p {
|
134 |
+
margin: 0;
|
135 |
+
}
|
136 |
+
.imagify-title-right a {
|
137 |
+
font-weight: bold;
|
138 |
+
text-decoration: none;
|
139 |
+
}
|
140 |
+
.imagify-title-right > div {
|
141 |
+
display: table-cell;
|
142 |
+
vertical-align: middle;
|
143 |
+
}
|
144 |
+
.imagify-title-right .dashicons-arrow-down-alt2 {
|
145 |
+
vertical-align: -4px;
|
146 |
+
margin-left: 2px;
|
147 |
+
}
|
148 |
+
@media (max-width: 1200px) {
|
149 |
+
.imagify-bulk .imagify-title {
|
150 |
+
display: -webkit-box;
|
151 |
+
display: -webkit-flex;
|
152 |
+
display: -ms-flexbox;
|
153 |
+
display: flex;
|
154 |
+
-webkit-box-orient: vertical;
|
155 |
+
-webkit-box-direction: normal;
|
156 |
+
-webkit-flex-direction: column;
|
157 |
+
-ms-flex-direction: column;
|
158 |
+
flex-direction: column;
|
159 |
+
}
|
160 |
+
.imagify-title-right {
|
161 |
+
-webkit-box-ordinal-group: 3;
|
162 |
+
-webkit-order: 2;
|
163 |
+
-ms-flex-order: 2;
|
164 |
+
order: 2;
|
165 |
+
margin-top: 20px;
|
166 |
+
}
|
167 |
+
}
|
168 |
+
|
169 |
+
.imagify-sep-v {
|
170 |
+
width: 1px;
|
171 |
+
background: rgba(255, 255, 255, .2);
|
172 |
+
}
|
173 |
+
|
174 |
+
.imagify-credit-left {
|
175 |
+
position: relative;
|
176 |
+
min-width: 280px;
|
177 |
+
padding-left: 15px;
|
178 |
+
}
|
179 |
+
|
180 |
+
@media (max-width: 630px) {
|
181 |
+
.imagify-title-right {
|
182 |
+
display: block;
|
183 |
+
width: auto;
|
184 |
+
}
|
185 |
+
.imagify-title-right > div {
|
186 |
+
display: block;
|
187 |
+
width: auto;
|
188 |
+
margin-top: 10px;
|
189 |
+
max-width: 100%;
|
190 |
+
}
|
191 |
+
.imagify-credit-left {
|
192 |
+
padding-left: 0;
|
193 |
+
}
|
194 |
+
}
|
195 |
+
|
196 |
+
.base-transparent {
|
197 |
+
background: transparent;
|
198 |
+
}
|
199 |
+
|
200 |
+
[class^="imagify-bar-"].right-outside-number {
|
201 |
+
-webkit-box-sizing: border-box;
|
202 |
+
box-sizing: border-box;
|
203 |
+
padding-right: 4.5em;
|
204 |
+
}
|
205 |
+
.right-outside-number .imagify-barnb {
|
206 |
+
display: block;
|
207 |
+
margin-right: -4.5em;
|
208 |
+
text-align: right;
|
209 |
+
font-weight: bold;
|
210 |
+
line-height: 1.5;
|
211 |
+
}
|
212 |
+
|
213 |
+
.imagify-list-infos {
|
214 |
+
max-width: 100%;
|
215 |
+
width: 415px;
|
216 |
+
}
|
217 |
+
.imagify-list-infos li,
|
218 |
+
.imagify-info-block {
|
219 |
+
position: relative;
|
220 |
+
padding: 10px;
|
221 |
+
padding-left: 42px;
|
222 |
+
background: #D9E4EB;
|
223 |
+
border-radius: 4px;
|
224 |
+
line-height: 1.6;
|
225 |
+
}
|
226 |
+
.imagify-list-infos .imagify-alt.imagify-alt {
|
227 |
+
background: #8BA7B5;
|
228 |
+
color: #FFF;
|
229 |
+
font-weight: bold;
|
230 |
+
}
|
231 |
+
.imagify-list-infos li + li {
|
232 |
+
margin-top: 1em;
|
233 |
+
}
|
234 |
+
.imagify-list-infos li:before,
|
235 |
+
.imagify-info-block:before {
|
236 |
+
content: "";
|
237 |
+
position: absolute;
|
238 |
+
left: 13px; top: 14px;
|
239 |
+
height: 16px; width: 16px;
|
240 |
+
border: 1px solid #46b1ce;
|
241 |
+
border-radius: 10px;
|
242 |
+
}
|
243 |
+
.imagify-list-infos li:after,
|
244 |
+
.imagify-info-block:after {
|
245 |
+
content: "i";
|
246 |
+
position: absolute;
|
247 |
+
left: 20px; top: 13px;
|
248 |
+
font-style: italic;
|
249 |
+
color: #46b1ce;
|
250 |
+
}
|
251 |
+
.imagify-cell .imagify-info-block {
|
252 |
+
padding-top: 0;
|
253 |
+
}
|
254 |
+
.imagify-cell .imagify-info-block:after {
|
255 |
+
top: 6px;
|
256 |
+
}
|
257 |
+
.imagify-cell .imagify-info-block:before {
|
258 |
+
top: 7px;
|
259 |
+
}
|
260 |
+
.imagify-list-infos .imagify-alt:before,
|
261 |
+
.imagify-list-infos .imagify-alt:after {
|
262 |
+
color: #fff;
|
263 |
+
border-color: #fff;
|
264 |
+
}
|
265 |
+
|
266 |
+
/* Some main sections/content */
|
267 |
+
.imagify-sub-title.imagify-sub-title {
|
268 |
+
font-size: 23px;
|
269 |
+
background: #FFF;
|
270 |
+
color: #2E3243;
|
271 |
+
border-left: 1px solid #D9D9D9;
|
272 |
+
border-right: 1px solid #D9D9D9;
|
273 |
+
font-weight: lighter;
|
274 |
+
}
|
275 |
+
.imagify-sub-title .icon-bulk {
|
276 |
+
margin-right: 10px;
|
277 |
+
vertical-align: middle;
|
278 |
+
}
|
279 |
+
.imagify-sub-title .title-text {
|
280 |
+
display: inline-block;
|
281 |
+
line-height: 1;
|
282 |
+
vertical-align: middle;
|
283 |
+
}
|
284 |
+
.imagify-bulk .imagify-settings-section {
|
285 |
+
border: 1px solid #D9D9D9;
|
286 |
+
border-top: 0;
|
287 |
+
background: #F2F5F7;
|
288 |
+
color: #4A4A4A;
|
289 |
+
}
|
290 |
+
.imagify-bulk .imagify-settings-section p,
|
291 |
+
.imagify-bulk .imagify-settings-section li,
|
292 |
+
.imagify-bulk .imagify-settings-section h3 {
|
293 |
+
color: #4A4A4A;
|
294 |
+
}
|
295 |
+
.imagify-bulk .imagify-settings-section h3 {
|
296 |
+
margin-bottom: 2em;
|
297 |
+
}
|
298 |
+
|
299 |
+
/* Tooltips */
|
300 |
+
.imagify-title .imagify-tooltips {
|
301 |
+
position: absolute;
|
302 |
+
top: 100%;
|
303 |
+
left: 0;
|
304 |
+
}
|
305 |
+
.imagify-tooltips .icon-round {
|
306 |
+
float: left;
|
307 |
+
display: inline-block;
|
308 |
+
width: 28px;
|
309 |
+
height: 28px;
|
310 |
+
border: 1px solid #FFF;
|
311 |
+
margin-right: 8px;
|
312 |
+
margin-bottom: 8px;
|
313 |
+
font-size: 17px;
|
314 |
+
font-style: italic;
|
315 |
+
line-height: 29px;
|
316 |
+
font-weight: bold;
|
317 |
+
text-align: center;
|
318 |
+
border-radius: 50%;
|
319 |
+
}
|
320 |
+
.imagify-tooltips .tooltip-content {
|
321 |
+
display: block;
|
322 |
+
position: relative;
|
323 |
+
max-width: 250px;
|
324 |
+
padding: 7px 15px 8px;
|
325 |
+
background: #2e3242;
|
326 |
+
color: #FFF;
|
327 |
+
font-size: 10px;
|
328 |
+
border-radius: 3px;
|
329 |
+
}
|
330 |
+
.imagify-tooltips.right .tooltip-content {
|
331 |
+
margin-left: 12px;
|
332 |
+
}
|
333 |
+
.imagify-tooltips.bottom .tooltip-content {
|
334 |
+
margin-top: 4px;
|
335 |
+
}
|
336 |
+
.imagify-inline-options label .tooltip-content {
|
337 |
+
position: absolute;
|
338 |
+
left: 0; right: 0;
|
339 |
+
top: 100%;
|
340 |
+
text-transform: none;
|
341 |
+
font-size: 10px;
|
342 |
+
letter-spacing: 0;
|
343 |
+
text-align: center;
|
344 |
+
}
|
345 |
+
.imagify-tooltips .tooltip-content:after {
|
346 |
+
content: "";
|
347 |
+
position: absolute;
|
348 |
+
}
|
349 |
+
.imagify-tooltips.right .tooltip-content:after {
|
350 |
+
top: 16px; left: -6px;
|
351 |
+
border-right: 8px solid #2e3242;
|
352 |
+
border-top: 6px solid transparent;
|
353 |
+
border-bottom: 6px solid transparent;
|
354 |
+
}
|
355 |
+
.imagify-tooltips.bottom .tooltip-content:after {
|
356 |
+
top: -5px; left: 50%;
|
357 |
+
margin-left: -3px;
|
358 |
+
border-bottom: 6px solid #2e3242;
|
359 |
+
border-left: 6px solid transparent;
|
360 |
+
border-right: 6px solid transparent;
|
361 |
+
}
|
362 |
+
.imagify-space-tooltips .tooltip-content {
|
363 |
+
max-width: 280px;
|
364 |
+
margin-top: 20px;
|
365 |
+
margin-left: 0;
|
366 |
+
padding: 5px 15px 5px;
|
367 |
+
font-size: 13px;
|
368 |
+
background: #40B1D0;
|
369 |
+
box-shadow: 0 3px 0 #338EA6;
|
370 |
+
}
|
371 |
+
.imagify-space-tooltips .tooltip-content:after {
|
372 |
+
top: -14px;
|
373 |
+
left: 50%;
|
374 |
+
margin-left: -7px;
|
375 |
+
border: 0 none;
|
376 |
+
border-bottom: 15px solid #40B1D0;
|
377 |
+
border-left: 15px solid transparent;
|
378 |
+
border-right: 15px solid transparent;
|
379 |
+
}
|
380 |
+
.tooltip-content.tooltip-table {
|
381 |
+
display: table;
|
382 |
+
width: 100%;
|
383 |
+
}
|
384 |
+
.tooltip-content.tooltip-table > * {
|
385 |
+
display: table-cell;
|
386 |
+
vertical-align: middle;
|
387 |
+
}
|
388 |
+
.tooltip-content .cell-icon {
|
389 |
+
width: 28px;
|
390 |
+
}
|
391 |
+
.tooltip-content .cell-icon .icon {
|
392 |
+
margin-bottom: 0;
|
393 |
+
}
|
394 |
+
.tooltip-content .cell-text {
|
395 |
+
padding: 5px 10px 5px 0;
|
396 |
+
line-height: 1.3;
|
397 |
+
}
|
398 |
+
.tooltip-content .cell-sep {
|
399 |
+
width: 1px;
|
400 |
+
background: rgba(255, 255, 255, .4);
|
401 |
+
}
|
402 |
+
.tooltip-content .cell-cta {
|
403 |
+
padding-left: 10px;
|
404 |
+
}
|
405 |
+
.tooltip-content .cell-cta a {
|
406 |
+
display: block;
|
407 |
+
color: #FFF;
|
408 |
+
width: 100%;
|
409 |
+
height: 100%;
|
410 |
+
white-space: nowrap;
|
411 |
+
}
|
412 |
+
|
413 |
+
/* Number display */
|
414 |
+
.imagify-number-you-optimized .number {
|
415 |
+
display: table-cell;
|
416 |
+
padding-right: 15px;
|
417 |
+
font-size: 36px;
|
418 |
+
font-weight: bold;
|
419 |
+
line-height: 1.1;
|
420 |
+
vertical-align: middle;
|
421 |
+
white-space: nowrap;
|
422 |
+
}
|
423 |
+
.imagify-number-you-optimized .text {
|
424 |
+
display: table-cell;
|
425 |
+
vertical-align: middle;
|
426 |
+
overflow: hidden;
|
427 |
+
font-size: 12px;
|
428 |
+
}
|
429 |
+
.imagify-number-you-optimized .text br {
|
430 |
+
display: none;
|
431 |
+
}
|
432 |
+
.imagify-number-you-optimized > p {
|
433 |
+
display: table;
|
434 |
+
}
|
435 |
+
.imagify-number-you-optimized {
|
436 |
+
padding-bottom: 0.85em;
|
437 |
+
margin-bottom: 1.35em;
|
438 |
+
overflow: hidden;
|
439 |
+
border-bottom: 1px solid rgba(0,0,0, 0.05);
|
440 |
+
}
|
441 |
+
|
442 |
+
/* Number and bars */
|
443 |
+
.imagify-bars p {
|
444 |
+
font-weight: bold;
|
445 |
+
font-size: 12px;
|
446 |
+
margin-bottom: 0;
|
447 |
+
}
|
448 |
+
.imagify-bars + .imagify-number-you-optimized {
|
449 |
+
border-bottom: 0;
|
450 |
+
padding-top: 0.85em;
|
451 |
+
}
|
452 |
+
.imagify-bars + .imagify-number-you-optimized p {
|
453 |
+
color: #46b1ce;
|
454 |
+
}
|
455 |
+
|
456 |
+
/* Table */
|
457 |
+
.imagify-bulk-table {
|
458 |
+
margin-top: 2em;
|
459 |
+
max-height: 600px;
|
460 |
+
max-height: 60vh;
|
461 |
+
overflow: auto;
|
462 |
+
}
|
463 |
+
.imagify-bulk-table table {
|
464 |
+
width: 100%;
|
465 |
+
border-spacing: 0;
|
466 |
+
border-collapse: collapse;
|
467 |
+
border: 1px solid #D3D3D3;
|
468 |
+
}
|
469 |
+
.imagify-bulk-table td {
|
470 |
+
padding: 8px 15px;
|
471 |
+
}
|
472 |
+
.imagify-bulk-table thead tr,
|
473 |
+
.imagify-bulk-table thead th {
|
474 |
+
background: #2E3242;
|
475 |
+
}
|
476 |
+
.imagify-bulk-table tfoot tr,
|
477 |
+
.imagify-bulk-table tfoot th {
|
478 |
+
background: #73818C;
|
479 |
+
}
|
480 |
+
.imagify-bulk-table thead th {
|
481 |
+
padding: 14px 15px;
|
482 |
+
text-align: left;
|
483 |
+
color: #F2F5F7;
|
484 |
+
font-weight: bold;
|
485 |
+
font-size: 14px;
|
486 |
+
}
|
487 |
+
.imagify-bulk-table tfoot td {
|
488 |
+
padding: 14px 15px;
|
489 |
+
color: #F9FAFA;
|
490 |
+
}
|
491 |
+
|
492 |
+
.imagify-bulk-table tbody tr,
|
493 |
+
.imagify-bulk-table tbody td {
|
494 |
+
background: #FFF;
|
495 |
+
}
|
496 |
+
.imagify-bulk-table tbody tr:nth-child(odd),
|
497 |
+
.imagify-bulk-table tbody tr:nth-child(odd) td {
|
498 |
+
background: #F2F5F7;
|
499 |
+
}
|
500 |
+
|
501 |
+
.imagify-bulk-table .imagify-row-progress {
|
502 |
+
display: none;
|
503 |
+
}
|
504 |
+
|
505 |
+
.imagify-bulk-table .imagify-row-progress,
|
506 |
+
.imagify-bulk-table .imagify-row-progress td {
|
507 |
+
height: 15px;
|
508 |
+
padding: 0;
|
509 |
+
}
|
510 |
+
.imagify-bulk-table .imagify-no-uploaded-yet td {
|
511 |
+
height: 200px;
|
512 |
+
font-size: 17px;
|
513 |
+
letter-spacing: .1em;
|
514 |
+
word-spacing: .12em;
|
515 |
+
vertical-align: middle;
|
516 |
+
text-transform: uppercase;
|
517 |
+
font-weight: bold;
|
518 |
+
text-align: center;
|
519 |
+
color: #999;
|
520 |
+
background-color: #FFF;
|
521 |
+
}
|
522 |
+
|
523 |
+
.imagify-row-complete {
|
524 |
+
padding: 35px 20px;
|
525 |
+
margin-top: 2em;
|
526 |
+
background: #8BC34A;
|
527 |
+
color: #FFF;
|
528 |
+
text-shadow: 0 0 2px rgba(0,0,0,.1);
|
529 |
+
}
|
530 |
+
.imagify-row-complete .imagify-ac-chart {
|
531 |
+
margin-top: 3px;
|
532 |
+
}
|
533 |
+
.imagify-row-complete p {
|
534 |
+
color: #FFF;
|
535 |
+
margin: 0;
|
536 |
+
}
|
537 |
+
|
538 |
+
@-webkit-keyframes congrate {
|
539 |
+
0% {
|
540 |
+
opacity: 0;
|
541 |
+
-webkit-transform: scale(1);
|
542 |
+
}
|
543 |
+
50% {
|
544 |
+
-webkit-transform: scale(1.05);
|
545 |
+
opacity: 1;
|
546 |
+
}
|
547 |
+
100% {
|
548 |
+
-webkit-transform: scale(1);
|
549 |
+
opacity: 1;
|
550 |
+
}
|
551 |
+
}
|
552 |
+
|
553 |
+
@keyframes congrate {
|
554 |
+
0% {
|
555 |
+
opacity: 0;
|
556 |
+
transform: scale(1);
|
557 |
+
}
|
558 |
+
50% {
|
559 |
+
transform: scale(1.05);
|
560 |
+
opacity: 1;
|
561 |
+
}
|
562 |
+
100% {
|
563 |
+
transform: scale(1);
|
564 |
+
opacity: 1;
|
565 |
+
}
|
566 |
+
}
|
567 |
+
|
568 |
+
|
569 |
+
.imagify-row-complete.done {
|
570 |
+
-webkit-animation: congrate 500ms ease-in-out;
|
571 |
+
animation: congrate 500ms ease-in-out;
|
572 |
+
}
|
573 |
+
|
574 |
+
.imagify-all-complete {
|
575 |
+
margin: 1.5em 0;
|
576 |
+
}
|
577 |
+
.imagify-all-complete > div {
|
578 |
+
display: inline-block;
|
579 |
+
vertical-align: middle;
|
580 |
+
}
|
581 |
+
.imagify-ac-report {
|
582 |
+
min-width: 310px;
|
583 |
+
}
|
584 |
+
.imagify-ac-chart {
|
585 |
+
width: 46px;
|
586 |
+
height: 46px;
|
587 |
+
float: left;
|
588 |
+
margin: 0 20px 0 10px;
|
589 |
+
}
|
590 |
+
.imagify-ac-report-text {
|
591 |
+
overflow: hidden;
|
592 |
+
}
|
593 |
+
.imagify-ac-report-text p {
|
594 |
+
line-height: 1.3;
|
595 |
+
}
|
596 |
+
.imagify-ac-rt-big {
|
597 |
+
font-weight: bold;
|
598 |
+
font-size: 24px;
|
599 |
+
letter-spacing: 0.15em;
|
600 |
+
word-spacing: 0.15em;
|
601 |
+
text-transform: uppercase;
|
602 |
+
}
|
603 |
+
.imagify-ac-share {
|
604 |
+
text-align: right;
|
605 |
+
}
|
606 |
+
.imagify-ac-share-content {
|
607 |
+
display: inline-block;
|
608 |
+
padding: 10px 15px;
|
609 |
+
background: rgba(255,255,255,.2);
|
610 |
+
}
|
611 |
+
.imagify-ac-share-content > * {
|
612 |
+
display: inline-block;
|
613 |
+
vertical-align: middle;
|
614 |
+
}
|
615 |
+
.imagify-bulk-table .imagify-ac-share-content p {
|
616 |
+
margin-right: 5px;
|
617 |
+
}
|
618 |
+
.imagify-share-networks,
|
619 |
+
.imagify-share-networks li {
|
620 |
+
margin: 0;
|
621 |
+
}
|
622 |
+
.imagify-share-networks li {
|
623 |
+
display: inline-block;
|
624 |
+
}
|
625 |
+
.imagify-share-networks a {
|
626 |
+
display: inline-block;
|
627 |
+
vertical-align: -7px;
|
628 |
+
margin: 0 5px;
|
629 |
+
text-decoration: none;
|
630 |
+
color: #FFF;
|
631 |
+
}
|
632 |
+
|
633 |
+
/* TD's width */
|
634 |
+
.imagify-cell-filename {
|
635 |
+
max-width: 200px;
|
636 |
+
}
|
637 |
+
.imagify-cell-status {
|
638 |
+
max-width: 145px;
|
639 |
+
}
|
640 |
+
.imagify-cell-status .dashicons-warning {
|
641 |
+
margin-right: 2px;
|
642 |
+
}
|
643 |
+
.imagify-cell-thumbnails {
|
644 |
+
max-width: 120px;
|
645 |
+
}
|
646 |
+
|
647 |
+
td.imagify-cell-filename {
|
648 |
+
text-overflow: clip; /* ellipsis replace all the text by ... :`/ */
|
649 |
+
white-space: nowrap;
|
650 |
+
overflow: hidden;
|
651 |
+
}
|
652 |
+
.imagify-bulk-table .imagify-cell-thumbnails {
|
653 |
+
text-align: center;
|
654 |
+
}
|
655 |
+
.imagify-cell-percentage,
|
656 |
+
.imagify-cell-savings {
|
657 |
+
color: #46B1CE;
|
658 |
+
font-weight: bold;
|
659 |
+
}
|
660 |
+
.imagify-cell-optimized {
|
661 |
+
font-weight: bold;
|
662 |
+
}
|
663 |
+
.imagify-bulk-table td.imagify-cell-totaloriginal {
|
664 |
+
padding-right: 78px;
|
665 |
+
}
|
666 |
+
.imagify-cell-totaloriginal {
|
667 |
+
text-align: right;
|
668 |
+
}
|
669 |
+
|
670 |
+
.imagiuploaded,
|
671 |
+
.imagifilename {
|
672 |
+
display: inline-block;
|
673 |
+
vertical-align: middle;
|
674 |
+
}
|
675 |
+
.imagifilename {
|
676 |
+
font-size: 12px;
|
677 |
+
}
|
678 |
+
.imagiuploaded {
|
679 |
+
width: 33px;
|
680 |
+
height: 33px;
|
681 |
+
margin-right: 5px;
|
682 |
+
margin-left: -8px;
|
683 |
+
overflow: hidden;
|
684 |
+
background: url(../images/upload-image.png) 0 0 no-repeat;
|
685 |
+
background-size: cover;
|
686 |
+
}
|
687 |
+
.imagiuploaded img {
|
688 |
+
max-widht: 100%;
|
689 |
+
height: auto;
|
690 |
+
}
|
691 |
+
|
692 |
+
.imagistatus {
|
693 |
+
color: #8CA6B3;
|
694 |
+
text-transform: uppercase;
|
695 |
+
font-weight: bold;
|
696 |
+
}
|
697 |
+
.status-compressing {
|
698 |
+
color: #46B1CE;
|
699 |
+
}
|
700 |
+
.status-error {
|
701 |
+
color: #CE0B24;
|
702 |
+
}
|
703 |
+
.status-warning {
|
704 |
+
color: #f5a623;
|
705 |
+
}
|
706 |
+
.status-complete {
|
707 |
+
color: #8CC152;
|
708 |
+
}
|
709 |
+
|
710 |
+
/* Icon rotation */
|
711 |
+
/* icon rotate */
|
712 |
+
.dashicons.rotate {
|
713 |
+
-webkit-animation: icon-rotate 2.6s infinite linear;
|
714 |
+
animation: icon-rotate 2.6s infinite linear;
|
715 |
+
}
|
716 |
+
.imagify-cell-status .dashicons-admin-generic {
|
717 |
+
transform-origin: 48.75% 51.75%;
|
718 |
+
}
|
719 |
+
|
720 |
+
@-webkit-keyframes icon-rotate {
|
721 |
+
from {
|
722 |
+
-webkit-transform: rotate(0deg);
|
723 |
+
transform: rotate(0deg);
|
724 |
+
}
|
725 |
+
to {
|
726 |
+
-webkit-transform: rotate(360deg);
|
727 |
+
transform: rotate(360deg);
|
728 |
+
}
|
729 |
+
}
|
730 |
+
@keyframes icon-rotate {
|
731 |
+
from {
|
732 |
+
transform: rotate(0deg);
|
733 |
+
}
|
734 |
+
to {
|
735 |
+
transform: rotate(360deg);
|
736 |
+
}
|
737 |
+
}
|
assets/css/bulk.min.css
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
#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 .2s ease-in-out;-o-transition:background-color .2s ease-in-out;transition:background-color .2s ease-in-out}.imagify-doughnut-legend li span{display:block;position:absolute;left:0;top:0;width:25px;height:25px;border-radius:50%}.imagify-global-optim-phrase{width:180px;padding-top:20px;font-size:14px;font-weight:700;text-align:center}.imagify-total-percent{color:#46b1ce}.imagify-chart-percent{position:absolute;left:0;right:0;top:50%;margin-top:-14px;text-align:center;font-size:55px;font-weight:700;color:#46B1CE}.imagify-chart-percent span{font-size:20px;vertical-align:super}.media_page_imagify-bulk-optimization .media-item,body[class*="_imagify-ngg-bulk-optimization"] .media-item{margin:0}.media_page_imagify-bulk-optimization .media-item .progress,body[class*="_imagify-ngg-bulk-optimization"] .media-item .progress{float:none;width:100%;margin:0;background:#1F2331;-webkit-box-shadow:0;box-shadow:0;border-radius:0}.media_page_imagify-bulk-optimization .media-item .percent,body[class*="_imagify-ngg-bulk-optimization"] .media-item .percent{width:auto;padding:0 5px;line-height:1.85;font-size:12px}.media_page_imagify-bulk-optimization .media-item .percent,.media_page_imagify-bulk-optimization .media-item .progress,body[class*="_imagify-ngg-bulk-optimization"] .media-item .percent,body[class*="_imagify-ngg-bulk-optimization"] .media-item .progress{text-align:right}.media_page_imagify-bulk-optimization .media-item .progress .bar,body[class*="_imagify-ngg-bulk-optimization"] .media-item .progress .bar{width:1px;height:22px;margin-top:0;background:#46B1CE;border-radius:0;overflow:visible;-webkit-transition:width .5s;-o-transition:width .5s;transition:width .5s}#imagify-bulk-action{padding:11px 20px}.imagify-columns .col-overview.col-overview{padding-left:20px}.imagify-columns .col-informations.col-informations{width:36.6%;padding-right:30px}.imagify-columns .col-statistics.col-statistics{width:30%}.imagify-bulk-submit .imagify-inline-options input[type=radio]:checked+label,.imagify-bulk-submit .imagify-inline-options input[type=radio]:not(:checked)+label{margin-bottom:1.75em}.imagify-title-right{display:table;float:right;margin-top:-10px;-webkit-box-ordinal-group:3;-ms-flex-order:2;order:2}.imagify-title-right p{margin:0}.imagify-title-right a{font-weight:700;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:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.imagify-title-right{-webkit-box-ordinal-group:3;-ms-flex-order:2;order:2;margin-top:20px}}.imagify-sep-v{width:1px;background:rgba(255,255,255,.2)}.imagify-credit-left{position:relative;min-width:280px;padding-left:15px}@media (max-width:630px){.imagify-title-right,.imagify-title-right>div{display:block;width:auto}.imagify-title-right>div{margin-top:10px;max-width:100%}.imagify-credit-left{padding-left:0}}.base-transparent{background:0 0}[class^=imagify-bar-].right-outside-number{-webkit-box-sizing:border-box;box-sizing:border-box;padding-right:4.5em}.right-outside-number .imagify-barnb{display:block;margin-right:-4.5em;text-align:right;font-weight:700;line-height:1.5}.imagify-list-infos{max-width:100%;width:415px}.imagify-info-block,.imagify-list-infos li{position:relative;padding:10px;padding-left:42px;background:#D9E4EB;border-radius:4px;line-height:1.6}.imagify-list-infos .imagify-alt.imagify-alt{background:#8BA7B5;color:#FFF;font-weight:700}.imagify-list-infos li+li{margin-top:1em}.imagify-info-block:before,.imagify-list-infos li:before{content:"";position:absolute;left:13px;top:14px;height:16px;width:16px;border:1px solid #46b1ce;border-radius:10px}.imagify-info-block:after,.imagify-list-infos li:after{content:"i";position:absolute;left:20px;top:13px;font-style:italic;color:#46b1ce}.imagify-cell .imagify-info-block{padding-top:0}.imagify-cell .imagify-info-block:after{top:6px}.imagify-cell .imagify-info-block:before{top:7px}.imagify-list-infos .imagify-alt:after,.imagify-list-infos .imagify-alt:before{color:#fff;border-color:#fff}.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 h3,.imagify-bulk .imagify-settings-section li,.imagify-bulk .imagify-settings-section p{color:#4A4A4A}.imagify-bulk .imagify-settings-section h3{margin-bottom:2em}.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:700;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-ac-rt-big,.imagistatus{text-transform:uppercase;font-weight:700}.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;font-size:13px;background:#40B1D0;-webkit-box-shadow:0 3px 0 #338EA6;box-shadow:0 3px 0 #338EA6}.imagify-space-tooltips .tooltip-content:after{top:-14px;left:50%;margin-left:-7px;border:0;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{display:table-cell;padding-right:15px;font-size:36px;font-weight:700;line-height:1.1;vertical-align:middle;white-space:nowrap}.imagify-number-you-optimized .text{display:table-cell;vertical-align:middle;overflow:hidden;font-size:12px}.imagify-number-you-optimized .text br{display:none}.imagify-number-you-optimized>p{display:table}.imagify-number-you-optimized{padding-bottom:.85em;margin-bottom:1.35em;overflow:hidden;border-bottom:1px solid rgba(0,0,0,.05)}.imagify-bars p{font-weight:700;font-size:12px;margin-bottom:0}.imagify-bars+.imagify-number-you-optimized{border-bottom:0;padding-top:.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-ac-report-text,.imagiuploaded{overflow:hidden}.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 th,.imagify-bulk-table thead tr{background:#2E3242}.imagify-bulk-table tfoot th,.imagify-bulk-table tfoot tr{background:#73818C}.imagify-bulk-table thead th{padding:14px 15px;text-align:left;color:#F2F5F7;font-weight:700;font-size:14px}.imagify-bulk-table tfoot td{padding:14px 15px;color:#F9FAFA}.imagify-bulk-table tbody td,.imagify-bulk-table tbody tr{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:700;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;-webkit-transform:scale(1);transform:scale(1)}50%{-webkit-transform:scale(1.05);transform:scale(1.05);opacity:1}100%{-webkit-transform:scale(1);transform:scale(1);opacity:1}}.imagify-row-complete.done{-webkit-animation:congrate .5s ease-in-out;animation:congrate .5s 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 p{line-height:1.3}.imagify-ac-rt-big{font-size:24px;letter-spacing:.15em;word-spacing:.15em}.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{-o-text-overflow:clip;text-overflow:clip;white-space:nowrap;overflow:hidden}.imagify-bulk-table .imagify-cell-thumbnails{text-align:center}.imagify-cell-percentage,.imagify-cell-savings{color:#46B1CE;font-weight:700}.imagify-cell-optimized{font-weight:700}.imagify-bulk-table td.imagify-cell-totaloriginal{padding-right:78px}.imagify-cell-totaloriginal{text-align:right}.imagifilename,.imagiuploaded{display:inline-block;vertical-align:middle}.imagifilename{font-size:12px}.imagiuploaded{width:33px;height:33px;margin-right:5px;margin-left:-8px;background:url(../images/upload-image.png) no-repeat;background-size:cover}.imagiuploaded img{max-widht:100%;height:auto}.imagistatus{color:#8CA6B3}.status-compressing{color:#46B1CE}.status-error{color:#CE0B24}.status-warning{color:#f5a623}.status-complete{color:#8CC152}.dashicons.rotate{-webkit-animation:icon-rotate 2.6s infinite linear;animation:icon-rotate 2.6s infinite linear}.imagify-cell-status .dashicons-admin-generic{-webkit-transform-origin:48.75% 51.75%;-ms-transform-origin:48.75% 51.75%;transform-origin:48.75% 51.75%}@-webkit-keyframes icon-rotate{from{-webkit-transform:rotate(0);transform:rotate(0)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes icon-rotate{from{-webkit-transform:rotate(0);transform:rotate(0)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}
|
assets/css/notices.css
ADDED
@@ -0,0 +1,272 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Error Notice */
|
2 |
+
.imagify-plugins-error {
|
3 |
+
overflow: hidden;
|
4 |
+
padding-left: 20px;
|
5 |
+
list-style-type: disc
|
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 |
+
/* Notice close link */
|
18 |
+
.imagify-notice-dismiss.notice-dismiss {
|
19 |
+
text-decoration: none;
|
20 |
+
}
|
21 |
+
|
22 |
+
/* Notices in Imagify related pages */
|
23 |
+
.media_page_imagify-bulk-optimization .notice,
|
24 |
+
body[class*="_imagify-ngg-bulk-optimization"] .notice,
|
25 |
+
.settings_page_imagify .notice {
|
26 |
+
margin-right: 20px;
|
27 |
+
margin-left: 2px;
|
28 |
+
}
|
29 |
+
|
30 |
+
.imagify-notice .button-mini {
|
31 |
+
padding: 2px 10px;
|
32 |
+
font-size: 13px;
|
33 |
+
}
|
34 |
+
|
35 |
+
.imagify-notice.imagify-notice {
|
36 |
+
position: relative;
|
37 |
+
display: -webkit-box;
|
38 |
+
display: -webkit-flex;
|
39 |
+
display: -ms-flexbox;
|
40 |
+
display: flex;
|
41 |
+
padding: 0;
|
42 |
+
margin: 10px 20px 10px 2px;
|
43 |
+
border: 0 none;
|
44 |
+
background: #2E3243;
|
45 |
+
box-shadow: none;
|
46 |
+
color: #FFF;
|
47 |
+
}
|
48 |
+
@media (max-width:782px) {
|
49 |
+
.imagify-notice.imagify-notice,
|
50 |
+
.imagify-welcome {
|
51 |
+
margin-right: 12px;
|
52 |
+
}
|
53 |
+
}
|
54 |
+
@media (max-width: 450px) {
|
55 |
+
.imagify-notice.imagify-notice {
|
56 |
+
-webkit-box-orient: vertical;
|
57 |
+
-webkit-box-direction: normal;
|
58 |
+
-webkit-flex-direction: column;
|
59 |
+
-ms-flex-direction: column;
|
60 |
+
flex-direction: column;
|
61 |
+
}
|
62 |
+
}
|
63 |
+
.wrap .imagify-notice {
|
64 |
+
margin: 5px 15px 2px;
|
65 |
+
position: relative;
|
66 |
+
}
|
67 |
+
.imagify-notice-logo {
|
68 |
+
padding: 18px 23px;
|
69 |
+
background: #40B1D0;
|
70 |
+
}
|
71 |
+
.updated .imagify-notice-logo {
|
72 |
+
background: #8BC34A;
|
73 |
+
}
|
74 |
+
.error .imagify-notice-logo {
|
75 |
+
background: #D0021B;
|
76 |
+
}
|
77 |
+
|
78 |
+
.imagify-notice-title {
|
79 |
+
font-size: 15px;
|
80 |
+
}
|
81 |
+
|
82 |
+
.imagify-notice-content {
|
83 |
+
padding: 5px 23px;
|
84 |
+
}
|
85 |
+
.imagify-notice-content.imagify-notice-content p {
|
86 |
+
margin: 0.65em 0;
|
87 |
+
}
|
88 |
+
.imagify-notice a {
|
89 |
+
color: #40B1D0;
|
90 |
+
}
|
91 |
+
.imagify-notice a:hover,
|
92 |
+
.imagify-notice a:focus {
|
93 |
+
color: #FEE102;
|
94 |
+
}
|
95 |
+
|
96 |
+
.imagify-notice code {
|
97 |
+
background: rgba(0, 0, 0, 0.4) none repeat scroll 0 0;
|
98 |
+
}
|
99 |
+
|
100 |
+
.imagify-notice .imagify-rate-us.imagify-rate-us {
|
101 |
+
text-align: left;
|
102 |
+
}
|
103 |
+
|
104 |
+
.imagify-notice .imagify-rate-us .stars {
|
105 |
+
margin: 0;
|
106 |
+
}
|
107 |
+
|
108 |
+
/**
|
109 |
+
* == Welcome section
|
110 |
+
*/
|
111 |
+
.imagify-welcome {
|
112 |
+
margin: 30px 20px 0 0;
|
113 |
+
}
|
114 |
+
.imagify-welcome .baseline {
|
115 |
+
display: inline-block;
|
116 |
+
margin: .2em 0 0 2em;
|
117 |
+
font-size: 17px;
|
118 |
+
}
|
119 |
+
.imagify-welcome .imagify-logo {
|
120 |
+
vertical-align: middle;
|
121 |
+
}
|
122 |
+
.imagify-welcome-remove {
|
123 |
+
position: absolute;
|
124 |
+
top: 50%; right: 15px;
|
125 |
+
margin-top: -8px;
|
126 |
+
color: #FFF;
|
127 |
+
text-decoration: none;
|
128 |
+
}
|
129 |
+
/* Welcome columns */
|
130 |
+
.imagify-columns [class^="col-"] img {
|
131 |
+
float: left;
|
132 |
+
margin-right: 18px;
|
133 |
+
}
|
134 |
+
.imagify-col-content {
|
135 |
+
overflow: hidden;
|
136 |
+
}
|
137 |
+
.imagify-col-title {
|
138 |
+
margin: 0 0 15px 0;
|
139 |
+
font-size: 23px;
|
140 |
+
}
|
141 |
+
.counter .imagify-col-title:before {
|
142 |
+
counter-increment: cols;
|
143 |
+
content: counter(cols) ". ";
|
144 |
+
color: #40B1D0;
|
145 |
+
}
|
146 |
+
.imagify-col-desc {
|
147 |
+
color: #5F758E;
|
148 |
+
margin-bottom: 2em;
|
149 |
+
}
|
150 |
+
|
151 |
+
/* WP Rocket notice */
|
152 |
+
.imagify-rkt-notice.imagify-rkt-notice {
|
153 |
+
position: relative;
|
154 |
+
display: -webkit-box;
|
155 |
+
display: -webkit-flex;
|
156 |
+
display: -ms-flexbox;
|
157 |
+
display: flex;
|
158 |
+
-webkit-box-align: center;
|
159 |
+
-webkit-align-items: center;
|
160 |
+
-ms-flex-align: center;
|
161 |
+
-ms-grid-row-align: center;
|
162 |
+
align-items: center;
|
163 |
+
padding: 10px 45px 10px 0;
|
164 |
+
border: 0 none;
|
165 |
+
box-shadow: none;
|
166 |
+
color: #FFF;
|
167 |
+
background: #412355;
|
168 |
+
}
|
169 |
+
.media_page_imagify-bulk-optimization .imagify-rkt-notice {
|
170 |
+
margin-left: 2px;
|
171 |
+
margin-right: 20px;
|
172 |
+
}
|
173 |
+
@media (max-width: 782px) {
|
174 |
+
.media_page_imagify-bulk-optimization .imagify-rkt-notice {
|
175 |
+
margin-left: 0;
|
176 |
+
margin-right: 12px;
|
177 |
+
}
|
178 |
+
}
|
179 |
+
.imagify-rkt-notice .imagify-cross {
|
180 |
+
position: absolute;
|
181 |
+
right: 8px; top: 50%;
|
182 |
+
width: 22px; height: 22px;
|
183 |
+
padding: 0;
|
184 |
+
margin-top: -11px;
|
185 |
+
background: transparent;
|
186 |
+
color: #FD7300;
|
187 |
+
border-radius: 50%;
|
188 |
+
transition: all .275s;
|
189 |
+
}
|
190 |
+
.imagify-rkt-notice .imagify-cross .dashicons {
|
191 |
+
position: relative;
|
192 |
+
top: 2px; left: 1px;
|
193 |
+
transition: all .275s;
|
194 |
+
}
|
195 |
+
.imagify-rkt-notice .imagify-cross:hover {
|
196 |
+
background: #FFF;
|
197 |
+
}
|
198 |
+
.imagify-rkt-notice .imagify-cross:hover .dashicons {
|
199 |
+
color: #412355;
|
200 |
+
}
|
201 |
+
.imagify-rkt-notice .imagify-rkt-cta,
|
202 |
+
.imagify-rkt-notice .imagify-rkt-logo,
|
203 |
+
.imagify-rkt-notice .imagify-rkt-coupon {
|
204 |
+
-webkit-flex-shrink: 0;
|
205 |
+
-ms-flex-negative: 0;
|
206 |
+
flex-shrink: 0;
|
207 |
+
}
|
208 |
+
.imagify-rkt-notice .imagify-rkt-logo {
|
209 |
+
width: 150px!important; /* !important because of a dirtugly WP Engine code */
|
210 |
+
text-align: center;
|
211 |
+
padding: 0 25px 0 30px;
|
212 |
+
line-height: 0.8;
|
213 |
+
}
|
214 |
+
.imagify-rkt-notice .imagify-rkt-msg {
|
215 |
+
width: 100%!important; /* !important because of a dirtugly WP Engine code */
|
216 |
+
padding: 0 15px;
|
217 |
+
font-size: 14px;
|
218 |
+
line-height: 1.6;
|
219 |
+
}
|
220 |
+
.imagify-rkt-notice .imagify-rkt-coupon {
|
221 |
+
width: 150px!important; /* !important because of a dirtugly WP Engine code */
|
222 |
+
padding: 0 15px;
|
223 |
+
}
|
224 |
+
.imagify-rkt-notice .imagify-rkt-coupon-code {
|
225 |
+
padding: 5px 10px;
|
226 |
+
font-size: 23px;
|
227 |
+
font-weight: bold;
|
228 |
+
border: 1px dashed #F7A933;
|
229 |
+
color: #F7A933;
|
230 |
+
}
|
231 |
+
.imagify-rkt-notice .imagify-rkt-cta {
|
232 |
+
width: 250px!important; /* !important because of a dirtugly WP Engine code */
|
233 |
+
-webkit-box-flex: 1;
|
234 |
+
-webkit-flex-grow: 1;
|
235 |
+
-ms-flex-positive: 1;
|
236 |
+
flex-grow: 1;
|
237 |
+
-webkit-flex-basis: 200px;
|
238 |
+
-ms-flex-preferred-size: 200px;
|
239 |
+
flex-basis: 200px;
|
240 |
+
}
|
241 |
+
.imagify-rkt-notice .button.button {
|
242 |
+
position: relative;
|
243 |
+
top: -1px;
|
244 |
+
height: auto;
|
245 |
+
font-weight: 600;
|
246 |
+
font-size: 14px;
|
247 |
+
box-shadow: 0 4px 0 #B27A27;
|
248 |
+
border: 0 none;
|
249 |
+
padding: 9px 18px 9px;
|
250 |
+
background: #F7A933;
|
251 |
+
text-shadow: 1px 1px 1px rgba(0,0,0,.2);
|
252 |
+
}
|
253 |
+
@media (max-width: 880px) {
|
254 |
+
.imagify-rkt-notice {
|
255 |
+
-webkit-flex-wrap: wrap;
|
256 |
+
-ms-flex-wrap: wrap;
|
257 |
+
flex-wrap: wrap;
|
258 |
+
}
|
259 |
+
.imagify-rkt-notice .imagify-rkt-msg,
|
260 |
+
.imagify-rkt-notice .imagify-rkt-cta,
|
261 |
+
.imagify-rkt-notice .imagify-rkt-logo {
|
262 |
+
text-align: left;
|
263 |
+
padding: 5px 15px;
|
264 |
+
}
|
265 |
+
.imagify-cross.imagify-cross {
|
266 |
+
top: 8px;
|
267 |
+
margin-top: 0;
|
268 |
+
}
|
269 |
+
.imagify-rkt-notice .imagify-cross .dashicons {
|
270 |
+
top: 1px;
|
271 |
+
}
|
272 |
+
}
|
assets/css/notices.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}.media_page_imagify-bulk-optimization .notice,.settings_page_imagify .notice,body[class*="_imagify-ngg-bulk-optimization"] .notice{margin-right:20px;margin-left:2px}.imagify-notice .button-mini{padding:2px 10px;font-size:13px}.imagify-notice.imagify-notice{position:relative;display:-webkit-box;display:-ms-flexbox;display:flex;padding:0;margin:10px 20px 10px 2px;border:0;background:#2E3243;-webkit-box-shadow:none;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;-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:.65em 0}.imagify-notice a{color:#40B1D0}.imagify-notice a:focus,.imagify-notice a:hover{color:#FEE102}.imagify-notice code{background:rgba(0,0,0,.4)}.imagify-notice .imagify-rate-us.imagify-rate-us{text-align:left}.imagify-notice .imagify-rate-us .stars{margin:0}.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 [class^=col-] img{float:left;margin-right:18px}.imagify-col-content{overflow:hidden}.imagify-col-title{margin:0 0 15px;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-rkt-notice.imagify-rkt-notice{position:relative;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;-ms-grid-row-align:center;align-items:center;padding:10px 45px 10px 0;border:0;-webkit-box-shadow:none;box-shadow:none;color:#FFF;background:#412355}.media_page_imagify-bulk-optimization .imagify-rkt-notice{margin-left:2px;margin-right:20px}@media (max-width:782px){.media_page_imagify-bulk-optimization .imagify-rkt-notice{margin-left:0;margin-right:12px}}.imagify-rkt-notice .imagify-cross{position:absolute;right:8px;top:50%;width:22px;height:22px;padding:0;margin-top:-11px;background:0 0;color:#FD7300;border-radius:50%;-webkit-transition:all .275s;-o-transition:all .275s;transition:all .275s}.imagify-rkt-notice .imagify-cross .dashicons{position:relative;top:2px;left:1px;-webkit-transition:all .275s;-o-transition:all .275s;transition:all .275s}.imagify-rkt-notice .imagify-cross:hover{background:#FFF}.imagify-rkt-notice .imagify-cross:hover .dashicons{color:#412355}.imagify-rkt-notice .imagify-rkt-coupon,.imagify-rkt-notice .imagify-rkt-cta,.imagify-rkt-notice .imagify-rkt-logo{-ms-flex-negative:0;flex-shrink:0}.imagify-rkt-notice .imagify-rkt-logo{width:150px!important;text-align:center;padding:0 25px 0 30px;line-height:.8}.imagify-rkt-notice .imagify-rkt-msg{width:100%!important;padding:0 15px;font-size:14px;line-height:1.6}.imagify-rkt-notice .imagify-rkt-coupon{width:150px!important;padding:0 15px}.imagify-rkt-notice .imagify-rkt-coupon-code{padding:5px 10px;font-size:23px;font-weight:700;border:1px dashed #F7A933;color:#F7A933}.imagify-rkt-notice .imagify-rkt-cta{width:250px!important;-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;-ms-flex-preferred-size:200px;flex-basis:200px}.imagify-rkt-notice .button.button{position:relative;top:-1px;height:auto;font-weight:600;font-size:14px;-webkit-box-shadow:0 4px 0 #B27A27;box-shadow:0 4px 0 #B27A27;border:0;padding:9px 18px;background:#F7A933;text-shadow:1px 1px 1px rgba(0,0,0,.2)}@media (max-width:880px){.imagify-rkt-notice{-ms-flex-wrap:wrap;flex-wrap:wrap}.imagify-rkt-notice .imagify-rkt-cta,.imagify-rkt-notice .imagify-rkt-logo,.imagify-rkt-notice .imagify-rkt-msg{text-align:left;padding:5px 15px}.imagify-cross.imagify-cross{top:8px;margin-top:0}.imagify-rkt-notice .imagify-cross .dashicons{top:1px}}
|
assets/css/options.css
ADDED
@@ -0,0 +1,317 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* The field that checks the API Key */
|
2 |
+
#imagify-check-api-container {
|
3 |
+
font-weight: bold;
|
4 |
+
}
|
5 |
+
|
6 |
+
#imagify-check-api-container .dashicons {
|
7 |
+
font-size: 25px;
|
8 |
+
}
|
9 |
+
|
10 |
+
#imagify-check-api-container .dashicons-no:before {
|
11 |
+
color: #f06e57;
|
12 |
+
vertical-align: -1px;
|
13 |
+
}
|
14 |
+
|
15 |
+
#imagify-check-api-container .dashicons-yes:before {
|
16 |
+
color: #8BC34A;
|
17 |
+
vertical-align: -1px;
|
18 |
+
}
|
19 |
+
|
20 |
+
.imagify-options-title {
|
21 |
+
padding-bottom: .5em;
|
22 |
+
border-bottom: 3px solid #F2F2F2;
|
23 |
+
font-size: 13px;
|
24 |
+
font-weight: 500;
|
25 |
+
text-transform: uppercase;
|
26 |
+
letter-spacing: 0.025em;
|
27 |
+
color: #40b1d0;
|
28 |
+
}
|
29 |
+
|
30 |
+
@media (max-width: 782px) {
|
31 |
+
.imagify-settings .form-table th {
|
32 |
+
padding-top: 2em;
|
33 |
+
padding-bottom: .5em;
|
34 |
+
}
|
35 |
+
}
|
36 |
+
.imagify-settings .form-table td {
|
37 |
+
vertical-align: top;
|
38 |
+
}
|
39 |
+
.imagify-settings .form-table th span {
|
40 |
+
cursor: pointer;
|
41 |
+
}
|
42 |
+
.imagify-middle th {
|
43 |
+
padding-top: 35px;
|
44 |
+
}
|
45 |
+
|
46 |
+
.imagify-settings input[type="text"] {
|
47 |
+
color: #4A4A4A;
|
48 |
+
font-weight: 600;
|
49 |
+
box-shadow: none;
|
50 |
+
}
|
51 |
+
|
52 |
+
.imagify-bulk-info {
|
53 |
+
margin: 1em 1em 1em 5px;
|
54 |
+
transition: margin .3s;
|
55 |
+
}
|
56 |
+
@media (max-width: 850px) {
|
57 |
+
.imagify-bulk-info {
|
58 |
+
margin: 1em;
|
59 |
+
}
|
60 |
+
}
|
61 |
+
.imagify-bulk-info p {
|
62 |
+
display: inline-block;
|
63 |
+
text-align: left;
|
64 |
+
width: 400px;
|
65 |
+
max-width: 100%;
|
66 |
+
font-weight: bold;
|
67 |
+
}
|
68 |
+
|
69 |
+
@media (min-width: 1500px) {
|
70 |
+
.imagify-settings div.submit {
|
71 |
+
display: table;
|
72 |
+
width: 100%;
|
73 |
+
}
|
74 |
+
.imagify-settings div.submit > * {
|
75 |
+
display: table-cell;
|
76 |
+
vertical-align: middle;
|
77 |
+
}
|
78 |
+
.imagify-bulk-info {
|
79 |
+
padding: 0 25px;
|
80 |
+
text-align: right;
|
81 |
+
}
|
82 |
+
}
|
83 |
+
|
84 |
+
.imagify-settings div.submit.submit {
|
85 |
+
margin-top: 2em;
|
86 |
+
padding: 40px 0 20px 235px;
|
87 |
+
}
|
88 |
+
.imagify-settings p.submit {
|
89 |
+
float: left;
|
90 |
+
margin-top: 0;
|
91 |
+
}
|
92 |
+
.imagify-settings p.submit .button {
|
93 |
+
margin: 0 5px;
|
94 |
+
}
|
95 |
+
@media (max-width: 850px) {
|
96 |
+
.imagify-settings div.submit {
|
97 |
+
padding-left: 0;
|
98 |
+
}
|
99 |
+
.imagify-settings p.submit {
|
100 |
+
text-align: center;
|
101 |
+
}
|
102 |
+
}
|
103 |
+
|
104 |
+
.imagify-sub-header th {
|
105 |
+
text-align: right;
|
106 |
+
}
|
107 |
+
.imagify-sub-header .form-table {
|
108 |
+
margin: 0;
|
109 |
+
}
|
110 |
+
.imagify-sub-header th,
|
111 |
+
.imagify-sub-header td {
|
112 |
+
padding-top: 0;
|
113 |
+
padding-bottom: 0;
|
114 |
+
}
|
115 |
+
|
116 |
+
.imagify-sub-header [for="api_key"] {
|
117 |
+
padding-top: 5px;
|
118 |
+
}
|
119 |
+
|
120 |
+
@media (max-width: 1120px) {
|
121 |
+
.imagify-settings .imagify-logo-block {
|
122 |
+
margin-right: 0;
|
123 |
+
}
|
124 |
+
.imagify-settings .imagify-rate-us.imagify-rate-us {
|
125 |
+
margin: 1em 0 -1em;
|
126 |
+
}
|
127 |
+
}
|
128 |
+
|
129 |
+
/* Label & fake labels */
|
130 |
+
label + .imagify-info,
|
131 |
+
label + .imagify-options-line,
|
132 |
+
.imagify-visual-label {
|
133 |
+
display: inline-block;
|
134 |
+
max-width: 70%;
|
135 |
+
margin-left: 15px;
|
136 |
+
margin-top: 2px!important;
|
137 |
+
-webkit-transition: opacity .3s;
|
138 |
+
transition: opacity .3s;
|
139 |
+
}
|
140 |
+
.imagify-visual-label {
|
141 |
+
vertical-align: -5px;
|
142 |
+
}
|
143 |
+
label[for="imagify_sizes_full"] + .imagify-info {
|
144 |
+
vertical-align: middle;
|
145 |
+
}
|
146 |
+
|
147 |
+
.imagify-settings.imagify-settings [type="checkbox"]:not(:checked) + label + .imagify-options-line,
|
148 |
+
.imagify-settings.imagify-settings [type="checkbox"]:not(:checked) + label .imagify-visual-label {
|
149 |
+
opacity: .5;
|
150 |
+
}
|
151 |
+
.imagify-settings.imagify-settings [type="checkbox"]:checked + label + .imagify-options-line,
|
152 |
+
.imagify-settings.imagify-settings [type="checkbox"]:checked + label .imagify-visual-label {
|
153 |
+
opacity: 1;
|
154 |
+
}
|
155 |
+
|
156 |
+
.imagify-checkbox-marged {
|
157 |
+
max-width: 500px;
|
158 |
+
margin-left: 45px;
|
159 |
+
}
|
160 |
+
|
161 |
+
input[id^="imagify_sizes_"]:checked + label {
|
162 |
+
font-weight: bold;
|
163 |
+
}
|
164 |
+
|
165 |
+
#describe-resize-larger.imagify-options-line input {
|
166 |
+
width: 5em;
|
167 |
+
}
|
168 |
+
|
169 |
+
.imagify-menu-bar-img {
|
170 |
+
margin-top: 1em;
|
171 |
+
}
|
172 |
+
|
173 |
+
/* Layout */
|
174 |
+
.imagify-main {
|
175 |
+
float: left;
|
176 |
+
width: 70%;
|
177 |
+
}
|
178 |
+
.imagify-sidebar {
|
179 |
+
float: right;
|
180 |
+
width: 28%;
|
181 |
+
max-width: 300px;
|
182 |
+
}
|
183 |
+
|
184 |
+
/* Sidebar with Ads */
|
185 |
+
.imagify-sidebar-section {
|
186 |
+
border: 1px solid #BBB;
|
187 |
+
background: #FFF;
|
188 |
+
}
|
189 |
+
.imagify-sidebar-section + .imagify-sidebar-section {
|
190 |
+
margin-top: 2em;
|
191 |
+
}
|
192 |
+
|
193 |
+
@media (max-width: 820px) {
|
194 |
+
.imagify-settings {
|
195 |
+
display: -webkit-box;
|
196 |
+
display: -ms-flexbox;
|
197 |
+
display: flex;
|
198 |
+
-webkit-box-orient: vertical;
|
199 |
+
-webkit-box-direction: normal;
|
200 |
+
-ms-flex-direction: column;
|
201 |
+
flex-direction: column;
|
202 |
+
}
|
203 |
+
.imagify-main {
|
204 |
+
width: auto;
|
205 |
+
float: none;
|
206 |
+
}
|
207 |
+
.imagify-sidebar {
|
208 |
+
order: 2;
|
209 |
+
float: none;
|
210 |
+
width: auto;
|
211 |
+
max-width: none;
|
212 |
+
margin-left: 0;
|
213 |
+
margin-top: 25px;
|
214 |
+
}
|
215 |
+
.wp-media-products {
|
216 |
+
text-align: center;
|
217 |
+
}
|
218 |
+
.wp-media-products li {
|
219 |
+
display: inline-block;
|
220 |
+
width: 100%;
|
221 |
+
max-width: 276px;
|
222 |
+
}
|
223 |
+
}
|
224 |
+
@media (min-width: 1400px) {
|
225 |
+
.imagify-main {
|
226 |
+
width: 74%;
|
227 |
+
}
|
228 |
+
}
|
229 |
+
.imagify-sidebar-content {
|
230 |
+
padding: 10px 20px;
|
231 |
+
}
|
232 |
+
.imagify-sidebar-title {
|
233 |
+
display: block;
|
234 |
+
padding: 20px 15px;
|
235 |
+
border-bottom: 1px solid #BBB;
|
236 |
+
font-size: 14px;
|
237 |
+
font-weight: bold;
|
238 |
+
color: #23282d;
|
239 |
+
background: #F2F5F7;
|
240 |
+
}
|
241 |
+
.imagify-sidebar-title img {
|
242 |
+
vertical-align: top;
|
243 |
+
margin-right: 5px;
|
244 |
+
}
|
245 |
+
.imagify-sidebar .wp-media-products {
|
246 |
+
margin-top: 0;
|
247 |
+
margin-bottom: -.5em;
|
248 |
+
}
|
249 |
+
.imagify-sidebar .wp-media-products .links {
|
250 |
+
display: block;
|
251 |
+
padding: 85px 25px 24px;
|
252 |
+
text-align: center;
|
253 |
+
background-color: #2E3243;
|
254 |
+
background-size: contain;
|
255 |
+
background-repeat: no-repeat;
|
256 |
+
background-position: 50% 0;
|
257 |
+
text-decoration: none;
|
258 |
+
}
|
259 |
+
.imagify-sidebar .wp-media-products .links p {
|
260 |
+
margin: 1.5em auto;
|
261 |
+
color: #FFF;
|
262 |
+
}
|
263 |
+
.imagify-sidebar .wp-media-products .wprocket-link {
|
264 |
+
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");
|
265 |
+
background-color: #3B1E4E;
|
266 |
+
background-repeat: repeat-x, no-repeat;
|
267 |
+
}
|
268 |
+
|
269 |
+
.imagify-mark-styled {
|
270 |
+
display: inline-block;
|
271 |
+
padding: 1px 2px 1px 4px;
|
272 |
+
line-height: 1.3;
|
273 |
+
font-weight: bold;
|
274 |
+
background: #F7A933;
|
275 |
+
transform-origin: 50% 50%;
|
276 |
+
transform: rotateZ(-2deg) rotateX(-10deg) skewX(-2deg) skewY(-3deg);
|
277 |
+
text-shadow: 1px 1px 0 rgba(0,0,0,0.2);
|
278 |
+
}
|
279 |
+
.imagify-mark-styled span {
|
280 |
+
display: inline-block;
|
281 |
+
transform: rotateZ(2deg) rotateX(10deg) skewX(2deg) skewY(3deg);
|
282 |
+
}
|
283 |
+
|
284 |
+
.imagify-discount-code {
|
285 |
+
margin: 0.35em 0 .5em;
|
286 |
+
display: block;
|
287 |
+
font-size: 2em;
|
288 |
+
letter-spacing: .05em;
|
289 |
+
font-weight: bold;
|
290 |
+
text-align: center;
|
291 |
+
text-shadow: 1px 1px 0 rgba(0,0,0,0.2);
|
292 |
+
}
|
293 |
+
.imagify-big-text {
|
294 |
+
font-size: 15px;
|
295 |
+
font-weight: bold;
|
296 |
+
}
|
297 |
+
.imagify-big-text strong {
|
298 |
+
font-size: 20px;
|
299 |
+
}
|
300 |
+
a.btn-rocket {
|
301 |
+
display: block;
|
302 |
+
font-size: 1.15em;
|
303 |
+
padding: 12px;
|
304 |
+
background: #F7A933;
|
305 |
+
box-shadow: 0 3px 0 #D69626;
|
306 |
+
border-radius: 3px;
|
307 |
+
color: #FFF;
|
308 |
+
text-transform: uppercase;
|
309 |
+
font-weight: bold;
|
310 |
+
text-shadow: 1px 1px 0 rgba(0,0,0,0.2);
|
311 |
+
text-decoration: none;
|
312 |
+
}
|
313 |
+
a.btn-rocket:hover,
|
314 |
+
a.btn-rocket:focus {
|
315 |
+
background: darkorange;
|
316 |
+
box-shadow: 0 3px 0 darkorange;
|
317 |
+
}
|
assets/css/options.min.css
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
#imagify-check-api-container{font-weight:700}#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-options-title{padding-bottom:.5em;border-bottom:3px solid #F2F2F2;font-size:13px;font-weight:500;text-transform:uppercase;letter-spacing:.025em;color:#40b1d0}@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 input[type=text]{color:#4A4A4A;font-weight:600;-webkit-box-shadow:none;box-shadow:none}.imagify-bulk-info{margin:1em 1em 1em 5px;-webkit-transition:margin .3s;-o-transition:margin .3s;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:700}@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.submit{margin-top:2em;padding:40px 0 20px 235px}.imagify-settings p.submit{float:left;margin-top:0}.imagify-settings p.submit .button{margin:0 5px}@media (max-width:850px){.imagify-settings div.submit{padding-left:0}.imagify-settings p.submit{text-align:center}}.imagify-sub-header th{text-align:right}.imagify-sub-header .form-table{margin:0}.imagify-sub-header td,.imagify-sub-header th{padding-top:0;padding-bottom:0}.imagify-sub-header [for=api_key]{padding-top:5px}@media (max-width:1120px){.imagify-settings .imagify-logo-block{margin-right:0}.imagify-settings .imagify-rate-us.imagify-rate-us{margin:1em 0 -1em}}.imagify-visual-label,label+.imagify-info,label+.imagify-options-line{display:inline-block;max-width:70%;margin-left:15px;margin-top:2px!important;-webkit-transition:opacity .3s;-o-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-visual-label,.imagify-settings.imagify-settings [type=checkbox]:not(:checked)+label+.imagify-options-line{opacity:.5}.imagify-settings.imagify-settings [type=checkbox]:checked+label .imagify-visual-label,.imagify-settings.imagify-settings [type=checkbox]:checked+label+.imagify-options-line{opacity:1}.imagify-checkbox-marged{max-width:500px;margin-left:45px}input[id^=imagify_sizes_]:checked+label{font-weight:700}#describe-resize-larger.imagify-options-line input{width:5em}.imagify-menu-bar-img{margin-top:1em}.imagify-main{float:left;width:70%}.imagify-sidebar{float:right;width:28%;max-width:300px}.imagify-sidebar-section{border:1px solid #BBB;background:#FFF}.imagify-sidebar-section+.imagify-sidebar-section{margin-top:2em}@media (max-width:820px){.imagify-main,.imagify-sidebar{float:none;width:auto}.imagify-settings{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.imagify-sidebar{-webkit-box-ordinal-group:3;-ms-flex-order:2;order:2;max-width:none;margin-left:0;margin-top:25px}.wp-media-products{text-align:center}.wp-media-products li{display:inline-block;width:100%;max-width:276px}}@media (min-width:1400px){.imagify-main{width:74%}}.imagify-sidebar-content{padding:10px 20px}.imagify-sidebar-title{display:block;padding:20px 15px;border-bottom:1px solid #BBB;font-size:14px;font-weight:700;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:-o-linear-gradient(top,rgba(59,30,78 ,0),rgba(59,30,78 ,0) 130px,rgba(59 ,30 ,78 ,1) 210px),url(../images/sidebar-wp-rocket.jpg);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-mark-styled{display:inline-block;padding:1px 2px 1px 4px;line-height:1.3;font-weight:700;background:#F7A933;-webkit-transform-origin:50% 50%;-ms-transform-origin:50% 50%;transform-origin:50% 50%;-webkit-transform:rotateZ(-2deg) rotateX(-10deg) skewX(-2deg) skewY(-3deg);transform:rotateZ(-2deg) rotateX(-10deg) skewX(-2deg) skewY(-3deg);text-shadow:1px 1px 0 rgba(0,0,0,.2)}.imagify-mark-styled span{display:inline-block;-webkit-transform:rotateZ(2deg) rotateX(10deg) skewX(2deg) skewY(3deg);transform:rotateZ(2deg) rotateX(10deg) skewX(2deg) skewY(3deg)}.imagify-discount-code,a.btn-rocket{display:block;font-weight:700;text-shadow:1px 1px 0 rgba(0,0,0,.2)}.imagify-discount-code{margin:.35em 0 .5em;font-size:2em;letter-spacing:.05em;text-align:center}.imagify-big-text{font-size:15px;font-weight:700}.imagify-big-text strong{font-size:20px}a.btn-rocket{font-size:1.15em;padding:12px;background:#F7A933;-webkit-box-shadow:0 3px 0 #D69626;box-shadow:0 3px 0 #D69626;border-radius:3px;color:#FFF;text-transform:uppercase;text-decoration:none}a.btn-rocket:focus,a.btn-rocket:hover{background:#ff8c00;-webkit-box-shadow:0 3px 0 #ff8c00;box-shadow:0 3px 0 #ff8c00}
|
assets/css/pricing-modal.css
ADDED
@@ -0,0 +1,1146 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Flexbox re-groups */
|
2 |
+
.imagify-modal-cols,
|
3 |
+
.imagify-border-styled,
|
4 |
+
.imagify-offer-header,
|
5 |
+
.imagify-payment-modal .imagify-modal-content,
|
6 |
+
.imagify-flex-table,
|
7 |
+
.imagify-tabs {
|
8 |
+
display: -webkit-box;
|
9 |
+
display: -webkit-flex;
|
10 |
+
display: -ms-flexbox;
|
11 |
+
display: flex;
|
12 |
+
-webkit-box-orient: horizontal;
|
13 |
+
-webkit-box-direction: normal;
|
14 |
+
-webkit-flex-direction: row;
|
15 |
+
-ms-flex-direction: row;
|
16 |
+
flex-direction: row;
|
17 |
+
}
|
18 |
+
.imagify-modal-cols,
|
19 |
+
.imagify-border-styled {
|
20 |
+
-webkit-box-pack: center;
|
21 |
+
-webkit-justify-content: center;
|
22 |
+
-ms-flex-pack: center;
|
23 |
+
justify-content: center;
|
24 |
+
-webkit-box-align: center;
|
25 |
+
-webkit-align-items: center;
|
26 |
+
-ms-flex-align: center;
|
27 |
+
align-items: center;
|
28 |
+
}
|
29 |
+
|
30 |
+
.imagify-payment-modal {
|
31 |
+
text-align: center;
|
32 |
+
color: #7A8996;
|
33 |
+
}
|
34 |
+
.imagify-payment-modal * {
|
35 |
+
box-sizing: border-box;
|
36 |
+
}
|
37 |
+
.imagify-modal-loader {
|
38 |
+
position: absolute;
|
39 |
+
top: 0; left: 0; right: 0; bottom: 0;
|
40 |
+
background: #fff url('../images/loader-balls.svg') center no-repeat;
|
41 |
+
z-index: 10;
|
42 |
+
}
|
43 |
+
.imagify-payment-modal .imagify-modal-content {
|
44 |
+
width: 980px;
|
45 |
+
max-width: 100%;
|
46 |
+
min-width: 925px;
|
47 |
+
padding: 0;
|
48 |
+
}
|
49 |
+
.imagify-modal-content.imagify-iframe-viewing {
|
50 |
+
width: 980px;
|
51 |
+
height: 672px;
|
52 |
+
overflow: hidden;
|
53 |
+
}
|
54 |
+
.imagify-iframe-viewing #imagify-payment-process-view {
|
55 |
+
width: 980px;
|
56 |
+
height: 668px;
|
57 |
+
}
|
58 |
+
.imagify-payment-modal .imagify-modal-main {
|
59 |
+
width: 70%;
|
60 |
+
}
|
61 |
+
.imagify-iframe-viewing .imagify-modal-main {
|
62 |
+
width: auto;
|
63 |
+
}
|
64 |
+
.imagify-payment-modal .imagify-modal-content.imagify-success-viewing {
|
65 |
+
min-width: auto;
|
66 |
+
width: 450px;
|
67 |
+
min-height: 300px;
|
68 |
+
}
|
69 |
+
.imagify-success-viewing .imagify-modal-main {
|
70 |
+
width: 100%;
|
71 |
+
}
|
72 |
+
.imagify-payment-modal .imagify-modal-sidebar {
|
73 |
+
width: 30%;
|
74 |
+
padding: 15px 20px;
|
75 |
+
background: #1F2332;
|
76 |
+
color: #FFF;
|
77 |
+
}
|
78 |
+
.imagify-modal-content.imagify-iframe-viewing .imagify-modal-sidebar,
|
79 |
+
.imagify-modal-content.imagify-success-viewing .imagify-modal-sidebar {
|
80 |
+
display: none;
|
81 |
+
}
|
82 |
+
.imagify-modal-section {
|
83 |
+
padding: 0 25px;
|
84 |
+
}
|
85 |
+
.imagify-modal-section.section-gray {
|
86 |
+
margin: 0 0 1em;
|
87 |
+
padding: 10px 25px 15px;
|
88 |
+
background: #F6F7FB;
|
89 |
+
}
|
90 |
+
.imagify-tabs-contents .section-gray {
|
91 |
+
padding: 8px 25px 10px;
|
92 |
+
}
|
93 |
+
.imagify-modal-section .imagify-modal-title:first-child {
|
94 |
+
margin-top: 1em;
|
95 |
+
margin-bottom: 1.5em;
|
96 |
+
}
|
97 |
+
.imagify-modal-section.section-gray .imagify-modal-title {
|
98 |
+
margin-top: .5em;
|
99 |
+
margin-bottom: .5em;
|
100 |
+
}
|
101 |
+
.imagify-modal-title {
|
102 |
+
font-size: 1.8em;
|
103 |
+
}
|
104 |
+
.imagify-analyzing .imagify-numbers-calc,
|
105 |
+
.imagify-numbers-notcalc,
|
106 |
+
.imagify-modal-section.imagify-analyzing .imagify-modal-cols,
|
107 |
+
.imagify-modal-section .imagify-loader {
|
108 |
+
display: none;
|
109 |
+
}
|
110 |
+
.imagify-analyzing .imagify-numbers-notcalc,
|
111 |
+
.imagify-modal-section.imagify-analyzing .imagify-loader {
|
112 |
+
display: block;
|
113 |
+
}
|
114 |
+
.imagify-modal-section .imagify-loader {
|
115 |
+
margin: 2em auto;
|
116 |
+
}
|
117 |
+
|
118 |
+
.imagify-border-styled {
|
119 |
+
width: 200px;
|
120 |
+
margin: 0 auto;
|
121 |
+
color: #8BC34A;
|
122 |
+
font-weight: bold;
|
123 |
+
font-size: 0.925em;
|
124 |
+
}
|
125 |
+
.imagify-border-styled:before,
|
126 |
+
.imagify-border-styled:after {
|
127 |
+
content: "";
|
128 |
+
height: 1px;
|
129 |
+
background: rgba(0,0,0,.1);
|
130 |
+
-webkit-flex-basis: 40px;
|
131 |
+
-ms-flex-preferred-size: 40px;
|
132 |
+
flex-basis: 40px;
|
133 |
+
}
|
134 |
+
.imagify-border-styled:before {
|
135 |
+
margin-right: 5px;
|
136 |
+
}
|
137 |
+
.imagify-border-styled:after {
|
138 |
+
margin-left: 5px;
|
139 |
+
}
|
140 |
+
.imagify-big-number {
|
141 |
+
font-size: 3.7em;
|
142 |
+
font-weight: bold;
|
143 |
+
margin: -3px 0;
|
144 |
+
color: #4A4A4A;
|
145 |
+
line-height: 1;
|
146 |
+
}
|
147 |
+
.imagify-payment-modal strong {
|
148 |
+
font-weight: bold;
|
149 |
+
color: #4A4A4A;
|
150 |
+
}
|
151 |
+
|
152 |
+
.imagify-popin-message {
|
153 |
+
padding: 5px 15px;
|
154 |
+
text-align: left;
|
155 |
+
}
|
156 |
+
.imagify-popin-message.imagify-error p {
|
157 |
+
color: #FFF;
|
158 |
+
}
|
159 |
+
|
160 |
+
.imagify-small-options {
|
161 |
+
width: 300px;
|
162 |
+
margin: 1em auto .5em;
|
163 |
+
background: #338EA6;
|
164 |
+
border-radius: 4px;
|
165 |
+
}
|
166 |
+
|
167 |
+
.imagify-small-options input[type="radio"]:not(:checked) + label,
|
168 |
+
.imagify-small-options input[type="radio"]:checked + label {
|
169 |
+
padding: 8px 10px;
|
170 |
+
font-size: 13px;
|
171 |
+
color: #FFF;
|
172 |
+
box-shadow: none;
|
173 |
+
border-left: 0;
|
174 |
+
}
|
175 |
+
|
176 |
+
.imagify-small-options input[type="radio"]:not(:checked) + label {
|
177 |
+
background: #338EA6;
|
178 |
+
color: rgba(255, 255, 255, .4);
|
179 |
+
}
|
180 |
+
.imagify-small-options input[type="radio"]:checked + label {
|
181 |
+
background: #40B1D0;
|
182 |
+
}
|
183 |
+
|
184 |
+
.imagify-cols:after {
|
185 |
+
content: "";
|
186 |
+
display: table;
|
187 |
+
clear: both;
|
188 |
+
}
|
189 |
+
|
190 |
+
.js .imagify-iframe-viewing .close-btn {
|
191 |
+
display: none;
|
192 |
+
}
|
193 |
+
|
194 |
+
.imagify-modal .imagify-cols {
|
195 |
+
padding: 0 20px;
|
196 |
+
}
|
197 |
+
.imagify-payment-modal .imagify-iconed {
|
198 |
+
margin: 1.5em 5em 1.5em 0;
|
199 |
+
}
|
200 |
+
|
201 |
+
|
202 |
+
.imagify-iconed {
|
203 |
+
position: relative;
|
204 |
+
text-align: left;
|
205 |
+
padding-left: 42px;
|
206 |
+
margin-right: 15px;
|
207 |
+
font-weight: 500;
|
208 |
+
}
|
209 |
+
.imagify-iconed .dashicons,
|
210 |
+
.imagify-iconed .icon {
|
211 |
+
position: absolute;
|
212 |
+
font-size: 2em;
|
213 |
+
left: 0; top: 2px;
|
214 |
+
color: #40B1D0;
|
215 |
+
}
|
216 |
+
.imagify-payment-modal .close-btn {
|
217 |
+
top: 10px;
|
218 |
+
right: 10px;
|
219 |
+
width: 24px;
|
220 |
+
height: 24px;
|
221 |
+
padding: 2px 0 0 4.5px; /* Safari iOS bug fix */
|
222 |
+
color: #FFF;
|
223 |
+
background: #40B1D0;
|
224 |
+
border-radius: 50%;
|
225 |
+
-webkit-transition: all .275s;
|
226 |
+
transition: all .275s;
|
227 |
+
}
|
228 |
+
.imagify-payment-modal .close-btn i {
|
229 |
+
margin-left: -3.5px;
|
230 |
+
margin-top: -0.5px;
|
231 |
+
}
|
232 |
+
.imagify-payment-modal .close-btn:hover {
|
233 |
+
background: #F6F7FB;
|
234 |
+
}
|
235 |
+
|
236 |
+
/* OFFERS */
|
237 |
+
.imagify-offer-line {
|
238 |
+
margin-top: 1.5em;
|
239 |
+
}
|
240 |
+
.imagify-offer-line + .imagify-offer-line {
|
241 |
+
margin-top: 0.75em;
|
242 |
+
}
|
243 |
+
.imagify-offer-header {
|
244 |
+
-webkit-box-pack: justify;
|
245 |
+
-webkit-justify-content: space-between;
|
246 |
+
-ms-flex-pack: justify;
|
247 |
+
justify-content: space-between;
|
248 |
+
-webkit-box-align: center;
|
249 |
+
-webkit-align-items: center;
|
250 |
+
-ms-flex-align: center;
|
251 |
+
align-items: center;
|
252 |
+
padding: 0 0 0 15px;
|
253 |
+
border-radius: 4px 4px 0 0;
|
254 |
+
-webkit-transition: all .275s;
|
255 |
+
transition: all .275s;
|
256 |
+
}
|
257 |
+
.imagify-offer-header.imagify-offer-header.imagify-offer-header .imagify-inline-options label:last-child {
|
258 |
+
border-radius: 0 4px 0 0;
|
259 |
+
}
|
260 |
+
.imagify-offer-header .imagify-inline-options {
|
261 |
+
width: auto;
|
262 |
+
}
|
263 |
+
.imagify-offer-title {
|
264 |
+
font-weight: bold;
|
265 |
+
margin: 0;
|
266 |
+
}
|
267 |
+
.imagify-offer-header,
|
268 |
+
.imagify-offer-header .imagify-inline-options input[type="radio"]:not(:checked) + label {
|
269 |
+
background: #E5EBEF;
|
270 |
+
}
|
271 |
+
.imagify-offer-onetime .imagify-offer-header {
|
272 |
+
padding-top:8px;
|
273 |
+
padding-bottom: 8px;
|
274 |
+
}
|
275 |
+
.imagify-offer-onetimes > div {
|
276 |
+
padding-top: 15px;
|
277 |
+
padding-bottom: 15px;
|
278 |
+
}
|
279 |
+
.imagify-offer-header .imagify-inline-options input[type="radio"]:not(:checked) + label,
|
280 |
+
.imagify-offer-header .imagify-inline-options input[type="radio"]:checked + label {
|
281 |
+
position: relative;
|
282 |
+
padding: 7px 30px;
|
283 |
+
font-size: 1em;
|
284 |
+
letter-spacing: 0.05em;
|
285 |
+
color: inherit;
|
286 |
+
box-shadow: 0 0 0;
|
287 |
+
border-radius: 0;
|
288 |
+
}
|
289 |
+
.imagify-offer-header .imagify-inline-options input[type="radio"]:checked + label {
|
290 |
+
background: #F6F7FB;
|
291 |
+
}
|
292 |
+
|
293 |
+
.imagify-2-free {
|
294 |
+
position: absolute;
|
295 |
+
bottom: 100%; left: 0; right: 0;
|
296 |
+
padding: 2px 10px;
|
297 |
+
margin-bottom: 8px;
|
298 |
+
font-size: 0.8em;
|
299 |
+
letter-spacing: 0;
|
300 |
+
text-transform: none;
|
301 |
+
text-align: center;
|
302 |
+
color: #FFF;
|
303 |
+
background: #10121A;
|
304 |
+
border-radius: 2px;
|
305 |
+
}
|
306 |
+
.imagify-2-free:after {
|
307 |
+
content: "";
|
308 |
+
position: absolute;
|
309 |
+
left: 50%; bottom: -3px;
|
310 |
+
margin-left: -3px;
|
311 |
+
border-top: 3px solid #10121A;
|
312 |
+
border-left: 3px solid transparent;
|
313 |
+
border-right: 3px solid transparent;
|
314 |
+
}
|
315 |
+
/* right position */
|
316 |
+
.imagify-2-free.imagify-b-right {
|
317 |
+
bottom: auto;
|
318 |
+
left: 100%; right: -100%;
|
319 |
+
margin-bottom: 0;
|
320 |
+
margin-left: 8px;
|
321 |
+
}
|
322 |
+
.imagify-2-free.imagify-b-right:after {
|
323 |
+
left: -3px; bottom: auto; top: 50%;
|
324 |
+
margin-top: -3px; margin-left: 0;
|
325 |
+
border-right: 3px solid #10121A;
|
326 |
+
border-top: 3px solid transparent;
|
327 |
+
border-bottom: 3px solid transparent;
|
328 |
+
border-left: 0;
|
329 |
+
}
|
330 |
+
|
331 |
+
/* bottom position */
|
332 |
+
.imagify-2-free.imagify-b-bottom {
|
333 |
+
bottom: -100%;
|
334 |
+
left: 0; right: 0;
|
335 |
+
margin-top: 8px;
|
336 |
+
}
|
337 |
+
|
338 |
+
.imagify-2-free.imagify-b-bottom:after {
|
339 |
+
top: -3px; bottom: auto;
|
340 |
+
border-bottom: 3px solid #10121A;
|
341 |
+
border-left: 3px solid transparent;
|
342 |
+
border-right: 3px solid transparent;
|
343 |
+
border-top: 0;
|
344 |
+
}
|
345 |
+
|
346 |
+
.imagify-offer-content {
|
347 |
+
text-align: left;
|
348 |
+
background: #F6F7FB;
|
349 |
+
border-radius: 0 0 4px 4px;
|
350 |
+
-webkit-transition: all .275s;
|
351 |
+
transition: all .275s;
|
352 |
+
}
|
353 |
+
.imagify-offer-onetime .imagify-offer-content {
|
354 |
+
padding: 10px 0;
|
355 |
+
}
|
356 |
+
|
357 |
+
/* Checkboxes adjustment */
|
358 |
+
div.imagify-col-checkbox {
|
359 |
+
position: relative;
|
360 |
+
width: 25.5%;
|
361 |
+
padding-top: 10px;
|
362 |
+
padding-bottom: 7px;
|
363 |
+
}
|
364 |
+
.imagify-col-checkbox label {
|
365 |
+
display: block;
|
366 |
+
}
|
367 |
+
.imagify-col-checkbox .imagify-checkbox.imagify-checkbox:not(:checked),
|
368 |
+
.imagify-col-checkbox .imagify-checkbox.imagify-checkbox:checked {
|
369 |
+
position: absolute;
|
370 |
+
top: 50%; left: 6px;
|
371 |
+
margin: -8px 0 0 0;
|
372 |
+
}
|
373 |
+
.imagify-col-checkbox .imagify-checkbox.imagify-checkbox:not(:checked) + label:before,
|
374 |
+
.imagify-col-checkbox .imagify-checkbox.imagify-checkbox:checked + label:before {
|
375 |
+
margin: 0;
|
376 |
+
top: -2px;
|
377 |
+
left: 6px;
|
378 |
+
-webkit-transition: all .275s;
|
379 |
+
transition: all .275s;
|
380 |
+
}
|
381 |
+
.imagify-col-checkbox .imagify-checkbox.imagify-checkbox:not(:checked) + label:after,
|
382 |
+
.imagify-col-checkbox .imagify-checkbox.imagify-checkbox:checked + label:after {
|
383 |
+
top: 1px;
|
384 |
+
left: 13px;
|
385 |
+
}
|
386 |
+
.imagify-col-checkbox label {
|
387 |
+
padding-left: 55px!important;
|
388 |
+
}
|
389 |
+
|
390 |
+
/* Offer col */
|
391 |
+
.imagify-offer-size {
|
392 |
+
font-size: 30px;
|
393 |
+
color: #2E3243;
|
394 |
+
font-weight: bold;
|
395 |
+
-webkit-transition: all .275s;
|
396 |
+
transition: all .275s;
|
397 |
+
}
|
398 |
+
.imagify-offer-by {
|
399 |
+
font-size: 10px;
|
400 |
+
-webkit-transition: all .275s;
|
401 |
+
transition: all .275s;
|
402 |
+
}
|
403 |
+
.imagify-approx {
|
404 |
+
display: none;
|
405 |
+
font-size: 11px;
|
406 |
+
line-height: 1.2;
|
407 |
+
-webkit-transition: all .275s;
|
408 |
+
transition: all .275s;
|
409 |
+
}
|
410 |
+
|
411 |
+
div.imagify-col-price {
|
412 |
+
width: 35%;
|
413 |
+
}
|
414 |
+
.imagify-flex-table .imagify-price-block {
|
415 |
+
padding-left: 0;
|
416 |
+
padding-right: 0;
|
417 |
+
}
|
418 |
+
.imagify-offer-monthly .imagify-flex-table .imagify-price-block,
|
419 |
+
.imagify-offer-monthlies .imagify-price-block {
|
420 |
+
padding-top: 0;
|
421 |
+
}
|
422 |
+
.imagify-flex-table .imagify-price-complement {
|
423 |
+
padding-right: 0;
|
424 |
+
font-size: 10px;
|
425 |
+
font-weight: bold;
|
426 |
+
}
|
427 |
+
.imagify-price-block,
|
428 |
+
.imagify-price-discount {
|
429 |
+
white-space: nowrap;
|
430 |
+
}
|
431 |
+
.imagify-price-block span,
|
432 |
+
.imagify-price-discount span {
|
433 |
+
display: inline-block;
|
434 |
+
vertical-align: middle;
|
435 |
+
}
|
436 |
+
.imagify-price-discount.imagify-price-discount {
|
437 |
+
position: relative;
|
438 |
+
flex-grow: 0;
|
439 |
+
padding-top: 15px;
|
440 |
+
font-weight: bold;
|
441 |
+
width: 70px;
|
442 |
+
}
|
443 |
+
.imagify-price-discount:before {
|
444 |
+
content: "";
|
445 |
+
position: absolute;
|
446 |
+
top: 25px;
|
447 |
+
width: 62%;
|
448 |
+
height: 2px;
|
449 |
+
background: #2E3243;
|
450 |
+
transform: rotate(-15deg);
|
451 |
+
}
|
452 |
+
.imagify-offer-onetimes .imagify-price-discount:before {
|
453 |
+
width: 100%;
|
454 |
+
}
|
455 |
+
.imagify-price-discount-dollar {
|
456 |
+
color: #2E3243;
|
457 |
+
}
|
458 |
+
.imagify-price-discount-number {
|
459 |
+
color: #8BA6B4;
|
460 |
+
}
|
461 |
+
.imagify-offer-selected .imagify-price-discount-number {
|
462 |
+
color: #FFF;
|
463 |
+
}
|
464 |
+
span.imagify-dollars {
|
465 |
+
color: #1F2332;
|
466 |
+
font-size: 18px;
|
467 |
+
font-weight: bold;
|
468 |
+
vertical-align: -2px;
|
469 |
+
}
|
470 |
+
.imagify-offer-onetime .imagify-col-price {
|
471 |
+
padding-top: 0;
|
472 |
+
}
|
473 |
+
.imagify-offer-onetime .imagify-dollars {
|
474 |
+
vertical-align: -1px;
|
475 |
+
}
|
476 |
+
.imagify-price-big,
|
477 |
+
.imagify-price-mini {
|
478 |
+
color: #40B1D0;
|
479 |
+
font-weight: bold;
|
480 |
+
}
|
481 |
+
.imagify-price-big {
|
482 |
+
font-size: 36px;
|
483 |
+
}
|
484 |
+
span.imagify-price-mini {
|
485 |
+
font-size: 18px;
|
486 |
+
vertical-align: 2px;
|
487 |
+
}
|
488 |
+
span.imagify-price-by {
|
489 |
+
font-size: 10px;
|
490 |
+
color: #1F2332;
|
491 |
+
vertical-align: -13px;
|
492 |
+
text-indent: -27px;
|
493 |
+
}
|
494 |
+
|
495 |
+
.imagify-col-other-actions {
|
496 |
+
width: 18.5%;
|
497 |
+
text-align: right;
|
498 |
+
}
|
499 |
+
.imagify-col-other-actions a {
|
500 |
+
font-size: 11px;
|
501 |
+
}
|
502 |
+
|
503 |
+
/* Offer selected */
|
504 |
+
.imagify-offer-selected,
|
505 |
+
.imagify-offer-selected .imagify-offer-title,
|
506 |
+
.imagify-offer-selected .imagify-offer-size,
|
507 |
+
.imagify-offer-selected .imagify-price-big,
|
508 |
+
.imagify-offer-selected .imagify-price-mini,
|
509 |
+
.imagify-offer-selected .imagify-price-complement,
|
510 |
+
.imagify-offer-selected .imagify-col-other-actions a {
|
511 |
+
color: #FFF;
|
512 |
+
}
|
513 |
+
.imagify-offer-selected .imagify-offer-header,
|
514 |
+
.imagify-offer-selected .imagify-offer-header .imagify-inline-options input[type="radio"]:not(:checked) + label {
|
515 |
+
background: #338EA6;
|
516 |
+
}
|
517 |
+
.imagify-offer-selected .imagify-offer-header .imagify-inline-options input[type="radio"]:checked + label {
|
518 |
+
background: #40B1D0;
|
519 |
+
}
|
520 |
+
.imagify-offer-selected .imagify-offer-content {
|
521 |
+
background: #40B1D0;
|
522 |
+
}
|
523 |
+
.imagify-offer-selected .imagify-checkbox.imagify-checkbox:not(:checked) + label:before,
|
524 |
+
.imagify-offer-selected .imagify-checkbox.imagify-checkbox:checked + label:before {
|
525 |
+
border-color: #FFF;
|
526 |
+
background: #40B1D0;
|
527 |
+
}
|
528 |
+
.imagify-offer-selected .imagify-offer-by {
|
529 |
+
color: #2E3243;
|
530 |
+
}
|
531 |
+
|
532 |
+
.imagify-enough-title {
|
533 |
+
display: none;
|
534 |
+
}
|
535 |
+
.imagify-enough-free .imagify-not-enough-title {
|
536 |
+
display: none;
|
537 |
+
}
|
538 |
+
.imagify-enough-free .imagify-enough-title {
|
539 |
+
display: block;
|
540 |
+
}
|
541 |
+
|
542 |
+
.imagify-submit-line {
|
543 |
+
display: -webkit-box;
|
544 |
+
display: -ms-flexbox;
|
545 |
+
display: flex;
|
546 |
+
-webkit-box-pack: justify;
|
547 |
+
-ms-flex-pack: justify;
|
548 |
+
justify-content: space-between;
|
549 |
+
-webkit-box-align: center;
|
550 |
+
-ms-flex-align: center;
|
551 |
+
align-items: center;
|
552 |
+
margin: 2em 0;
|
553 |
+
text-align: left;
|
554 |
+
}
|
555 |
+
.imagify-coupon-section {
|
556 |
+
display: -webkit-box;
|
557 |
+
display: -ms-flexbox;
|
558 |
+
display: flex;
|
559 |
+
-webkit-box-align: center;
|
560 |
+
-ms-flex-align: center;
|
561 |
+
align-items: center;
|
562 |
+
}
|
563 |
+
.imagify-coupon-section p {
|
564 |
+
margin: 0;
|
565 |
+
line-height: 1.3;
|
566 |
+
}
|
567 |
+
.imagify-coupon-text {
|
568 |
+
width: 200px;
|
569 |
+
max-width: 100%;
|
570 |
+
padding-right: 15px;
|
571 |
+
}
|
572 |
+
.imagify-coupon-loader {
|
573 |
+
display: none;
|
574 |
+
}
|
575 |
+
.imagify-coupon-text.checking {
|
576 |
+
text-align: right;
|
577 |
+
}
|
578 |
+
.imagify-coupon-text.checking .imagify-coupon-loader {
|
579 |
+
display: inline;
|
580 |
+
}
|
581 |
+
.imagify-coupon-text.checking label {
|
582 |
+
display: none;
|
583 |
+
}
|
584 |
+
.imagify-coupon-input {
|
585 |
+
position: relative;
|
586 |
+
}
|
587 |
+
.imagify-coupon-input input {
|
588 |
+
position: relative;
|
589 |
+
z-index: 1;
|
590 |
+
}
|
591 |
+
[id="imagify-coupon-validate"].button-secondary {
|
592 |
+
position: absolute;
|
593 |
+
top: 1px;
|
594 |
+
right: 3px;
|
595 |
+
bottom: 2px;
|
596 |
+
box-shadow: none;
|
597 |
+
padding: 4px 10px;
|
598 |
+
z-index: 0;
|
599 |
+
transition: transform .275s;
|
600 |
+
}
|
601 |
+
.imagify-canbe-validate [id="imagify-coupon-validate"] {
|
602 |
+
transform: translateX(45px);
|
603 |
+
}
|
604 |
+
|
605 |
+
/* Promotion/Discount section */
|
606 |
+
.imagify-modal-section + .imagify-modal-promotion {
|
607 |
+
margin-top: -1em;
|
608 |
+
}
|
609 |
+
.imagify-modal-promotion {
|
610 |
+
position: relative;
|
611 |
+
overflow: hidden;
|
612 |
+
display: none;
|
613 |
+
align-items: center;
|
614 |
+
padding: 15px 25px;
|
615 |
+
background: #604D90;
|
616 |
+
text-shadow: 0 0 3px rgba(0, 0, 0, 0.3);
|
617 |
+
}
|
618 |
+
.imagify-modal-promotion.active {
|
619 |
+
display: -webkit-box;
|
620 |
+
display: -ms-flexbox;
|
621 |
+
display: flex;
|
622 |
+
}
|
623 |
+
[id="imagify-pricing-tab-onetime"] .imagify-modal-promotion {
|
624 |
+
margin-bottom: 4em;
|
625 |
+
}
|
626 |
+
.imagify-modal-promotion:before {
|
627 |
+
content: "\f488";
|
628 |
+
position: absolute;
|
629 |
+
top: 28px;
|
630 |
+
left: 8%;
|
631 |
+
font-family: "dashicons";
|
632 |
+
font-size: 90px;
|
633 |
+
color: #8476A9;
|
634 |
+
text-shadow: none;
|
635 |
+
}
|
636 |
+
.imagify-modal-promotion p {
|
637 |
+
position: relative;
|
638 |
+
margin: .2em 0;
|
639 |
+
color: #FFF;
|
640 |
+
}
|
641 |
+
.imagify-promo-title {
|
642 |
+
-ms-flex-preferred-size: 100%;
|
643 |
+
flex-basis: 100%;
|
644 |
+
text-transform: uppercase;
|
645 |
+
font-size: 20px;
|
646 |
+
font-weight: bold;
|
647 |
+
letter-spacing: 0.125em;
|
648 |
+
}
|
649 |
+
.imagify-until-date {
|
650 |
+
-ms-flex-preferred-size: 200px;
|
651 |
+
flex-basis: 200px;
|
652 |
+
text-align: right;
|
653 |
+
}
|
654 |
+
.imagify-until-date strong {
|
655 |
+
color: #FFF;
|
656 |
+
}
|
657 |
+
|
658 |
+
|
659 |
+
.imagify-submit-line button {
|
660 |
+
font-size: 16px;
|
661 |
+
}
|
662 |
+
input.imagify-coupon-code {
|
663 |
+
padding: 10px;
|
664 |
+
border: 2px solid #7A8996;
|
665 |
+
font-size: 0.875em;
|
666 |
+
font-weight: bold;
|
667 |
+
border-radius: 3px;
|
668 |
+
}
|
669 |
+
.validated.imagify-coupon-section .imagify-coupon-text,
|
670 |
+
.validated.imagify-coupon-section strong {
|
671 |
+
color: #8BC34A;
|
672 |
+
}
|
673 |
+
.validated.imagify-coupon-section .imagify-coupon-code {
|
674 |
+
color: #8BC34A;
|
675 |
+
border-color: #8BC34A;
|
676 |
+
}
|
677 |
+
.invalid.imagify-coupon-section .imagify-coupon-text,
|
678 |
+
.invalid.imagify-coupon-section strong {
|
679 |
+
color: #d0021b;
|
680 |
+
}
|
681 |
+
.invalid.imagify-coupon-section .imagify-coupon-code {
|
682 |
+
color: #d0021b;
|
683 |
+
border-color: #d0021b;
|
684 |
+
}
|
685 |
+
.imagify-footer-lines {
|
686 |
+
width: 500px;
|
687 |
+
max-width: 100%;
|
688 |
+
margin: 2em auto 2.5em;
|
689 |
+
font-size: 0.85em;
|
690 |
+
line-height: 1.5;
|
691 |
+
}
|
692 |
+
|
693 |
+
/* Year selected */
|
694 |
+
.imagify-year-selected .imagify-switch-my .imagify-yearly {
|
695 |
+
display: block;
|
696 |
+
}
|
697 |
+
.imagify-year-selected .imagify-switch-my .imagify-monthly {
|
698 |
+
display: none;
|
699 |
+
}
|
700 |
+
/* Month selected */
|
701 |
+
.imagify-month-selected .imagify-switch-my .imagify-yearly {
|
702 |
+
display: none;
|
703 |
+
}
|
704 |
+
.imagify-month-selected .imagify-switch-my .imagify-monthly {
|
705 |
+
display: block;
|
706 |
+
}
|
707 |
+
|
708 |
+
/* Flexbox table */
|
709 |
+
.imagify-flex-table {
|
710 |
+
-webkit-box-align: center;
|
711 |
+
-webkit-align-items: center;
|
712 |
+
-ms-flex-align: center;
|
713 |
+
align-items: center;
|
714 |
+
}
|
715 |
+
.imagify-flex-table > * {
|
716 |
+
-webkit-box-flex: 1;
|
717 |
+
-webkit-flex-grow: 1;
|
718 |
+
-ms-flex-positive: 1;
|
719 |
+
flex-grow: 1;
|
720 |
+
padding: 7px 15px;
|
721 |
+
}
|
722 |
+
|
723 |
+
/* Pricing table */
|
724 |
+
div.imagify-col-details {
|
725 |
+
width: 22%;
|
726 |
+
padding-left: 25px;
|
727 |
+
}
|
728 |
+
.imagify-col-details p {
|
729 |
+
margin: 0;
|
730 |
+
}
|
731 |
+
.imagify-pricing-table {
|
732 |
+
margin: 0 20px;
|
733 |
+
}
|
734 |
+
.imagify-pricing-table .imagify-offer-line {
|
735 |
+
padding: .6em 0;
|
736 |
+
border: 2px solid #E8EEF0;
|
737 |
+
text-align: left;
|
738 |
+
border-radius: 3px;
|
739 |
+
}
|
740 |
+
.imagify-pricing-table .imagify-offer-line:first-child {
|
741 |
+
margin-top: .75em;
|
742 |
+
}
|
743 |
+
.imagify-pricing-table .imagify-offer-line.imagify-offer-selected:first-child {
|
744 |
+
margin-top: 1.75em;
|
745 |
+
}
|
746 |
+
.imagify-pricing-table .imagify-offer-line + .imagify-offer-line {
|
747 |
+
margin-top: -2px;
|
748 |
+
}
|
749 |
+
.imagify-pricing-table .imagify-col-other-actions {
|
750 |
+
width: 20.5%;
|
751 |
+
}
|
752 |
+
.imagify-pricing-table .imagify-approx {
|
753 |
+
margin-left: 0;
|
754 |
+
line-height: 0.5;
|
755 |
+
margin-bottom: 1em;
|
756 |
+
}
|
757 |
+
.imagify-pricing-table .imagify-offer-selected {
|
758 |
+
-webkit-transform: scale(1.03);
|
759 |
+
transform: scale(1.03);
|
760 |
+
background: #40B1D0;
|
761 |
+
border-width: 0;
|
762 |
+
}
|
763 |
+
.imagify-pricing-table .imagify-offer-selected .imagify-approx {
|
764 |
+
color: #FFF;
|
765 |
+
}
|
766 |
+
.imagify-pricing-table .imagify-button-secondary {
|
767 |
+
padding: 3px 20px;
|
768 |
+
box-shadow: none;
|
769 |
+
text-transform: uppercase;
|
770 |
+
font-size: 12px;
|
771 |
+
letter-spacing: 0.025em;
|
772 |
+
}
|
773 |
+
.imagify-offer-selected.imagify-offer-selected .imagify-button-secondary {
|
774 |
+
border: 2px solid #FFF;
|
775 |
+
background: #40B1D0;
|
776 |
+
box-shadow: none;
|
777 |
+
text-shadow: none!important;
|
778 |
+
}
|
779 |
+
.imagify-offer-selected.imagify-offer-selected .imagify-button-secondary:hover,
|
780 |
+
.imagify-offer-selected.imagify-offer-selected .imagify-button-secondary:focus {
|
781 |
+
background: #FFF;
|
782 |
+
color: #40B1D0;
|
783 |
+
}
|
784 |
+
|
785 |
+
.imagify-col .imagify-special-needs {
|
786 |
+
margin-left: 25px;
|
787 |
+
}
|
788 |
+
.imagify-special-needs strong {
|
789 |
+
font-size: 25px;
|
790 |
+
font-weight: bold;
|
791 |
+
color: #40B1D0;
|
792 |
+
}
|
793 |
+
.imagify-special-needs span {
|
794 |
+
display: block;
|
795 |
+
font-size: 12px;
|
796 |
+
margin-top: -.5em;
|
797 |
+
}
|
798 |
+
div.imagify-col-price {
|
799 |
+
position: relative;
|
800 |
+
}
|
801 |
+
|
802 |
+
/* we recommend line */
|
803 |
+
.imagify-recommend {
|
804 |
+
display: none;
|
805 |
+
position: absolute;
|
806 |
+
left: -20px; bottom: 100%;
|
807 |
+
padding: 0;
|
808 |
+
margin-bottom: 8px;
|
809 |
+
color: #1F2332;
|
810 |
+
font-weight: bold;
|
811 |
+
font-style: italic;
|
812 |
+
}
|
813 |
+
.imagify-offer-selected .imagify-recommend {
|
814 |
+
display: block;
|
815 |
+
}
|
816 |
+
[class*="imagify-onetime-"] .imagify-recommend {
|
817 |
+
left: 65px;
|
818 |
+
margin-bottom: 20px;
|
819 |
+
}
|
820 |
+
.imagify-recommend:before {
|
821 |
+
content: "";
|
822 |
+
position: absolute;
|
823 |
+
top: 7px; left: -35px;
|
824 |
+
width: 29px; height: 30px;
|
825 |
+
background: url("../images/icon-arrow-choice.png") scroll 0 no-repeat;
|
826 |
+
background-size: contain;
|
827 |
+
}
|
828 |
+
@media only screen and (min-resolution: 192dpi), only screen and (min-resolution: 2dppx) {
|
829 |
+
.imagify-recommend:before {
|
830 |
+
background-image: url("../images/icon-arrow-choice.svg");
|
831 |
+
}
|
832 |
+
}
|
833 |
+
|
834 |
+
/* One Time Adjustments */
|
835 |
+
.imagify-offer-line[class*="imagify-onetime-"] {
|
836 |
+
padding: 0;
|
837 |
+
margin: .3em 0 0;
|
838 |
+
}
|
839 |
+
.imagify-offer-line.imagify-offer-line[class*="imagify-onetime-"]:first-child {
|
840 |
+
margin-top: 2em;
|
841 |
+
}
|
842 |
+
.imagify-offer-line[class*="imagify-onetime-"] + .imagify-offer-line {
|
843 |
+
margin-top: .5em;
|
844 |
+
}
|
845 |
+
.imagify-offer-selected.imagify-offer-line[class*="imagify-onetime-"] {
|
846 |
+
-webkit-transform: scale(1);
|
847 |
+
transform: scale(1);
|
848 |
+
border-width: 2px;
|
849 |
+
}
|
850 |
+
|
851 |
+
/* cols */
|
852 |
+
.imagify-offer-line[class*="imagify-onetime-"] .imagify-col-details {
|
853 |
+
position: relative;
|
854 |
+
overflow: hidden;
|
855 |
+
width: 21%;
|
856 |
+
background: #1F2332;
|
857 |
+
color: #FFF;
|
858 |
+
}
|
859 |
+
.imagify-offer-selected.imagify-offer-line[class*="imagify-onetime-"] .imagify-col-details {
|
860 |
+
background: #338EA6;
|
861 |
+
}
|
862 |
+
.imagify-offer-line[class*="imagify-onetime-"] .imagify-col-details:before {
|
863 |
+
content: "";
|
864 |
+
position: absolute;
|
865 |
+
bottom: 0; right: 25px;
|
866 |
+
width: 75px; height: 54px;
|
867 |
+
background: url("../images/icon-pack.png");
|
868 |
+
}
|
869 |
+
.imagify-offer-line[class*="imagify-onetime-"] .imagify-col-other-actions {
|
870 |
+
width: 30%;
|
871 |
+
}
|
872 |
+
|
873 |
+
.imagify-offer-line[class*="imagify-onetime-"] .imagify-offer-size,
|
874 |
+
.imagify-offer-line[class*="imagify-onetime-"] .imagify-approx {
|
875 |
+
color: #FFF;
|
876 |
+
}
|
877 |
+
.imagify-offer-line[class*="imagify-onetime-"] .imagify-offer-size {
|
878 |
+
font-size: 24px;
|
879 |
+
}
|
880 |
+
.imagify-offer-line[class*="imagify-onetime-"] .imagify-approx {
|
881 |
+
font-size: 12px;
|
882 |
+
}
|
883 |
+
.imagify-offer-line[class*="imagify-onetime-"] .imagify-price-block {
|
884 |
+
padding-left: 10px;
|
885 |
+
}
|
886 |
+
.imagify-offer-line[class*="imagify-onetime-"] .imagify-dollars {
|
887 |
+
vertical-align: middle;
|
888 |
+
}
|
889 |
+
.imagify-offer-line[class*="imagify-onetime-"] .imagify-price-big {
|
890 |
+
vertical-align: -5px;
|
891 |
+
}
|
892 |
+
.imagify-offer-line[class*="imagify-onetime-"] .imagify-price-mini {
|
893 |
+
vertical-align: 7px;
|
894 |
+
}
|
895 |
+
|
896 |
+
/* Simple Tabs */
|
897 |
+
.imagify-tabs {
|
898 |
+
margin-bottom: 0;
|
899 |
+
list-style: none;
|
900 |
+
background: #E5EBEF;
|
901 |
+
}
|
902 |
+
.imagify-modal-content .imagify-tabs {
|
903 |
+
margin: 1em 0 0;
|
904 |
+
}
|
905 |
+
.imagify-tab {
|
906 |
+
-webkit-box-flex: 1;
|
907 |
+
-webkit-flex-grow: 1;
|
908 |
+
-ms-flex-positive: 1;
|
909 |
+
flex-grow: 1;
|
910 |
+
width: 50%;
|
911 |
+
margin: 0;
|
912 |
+
font-size: 23px;
|
913 |
+
}
|
914 |
+
.imagify-tab a {
|
915 |
+
display: block;
|
916 |
+
padding: 15px 10px;
|
917 |
+
color: inherit;
|
918 |
+
text-decoration: none;
|
919 |
+
}
|
920 |
+
.imagify-tab a:focus {
|
921 |
+
box-shadow: none;
|
922 |
+
outline: none;
|
923 |
+
color: #40B1D8;
|
924 |
+
}
|
925 |
+
.imagify-tab.imagify-current a {
|
926 |
+
background: #F6F7FB;
|
927 |
+
}
|
928 |
+
.imagify-tab-content.imagify-current {
|
929 |
+
display: block;
|
930 |
+
}
|
931 |
+
.imagify-tab-content {
|
932 |
+
display: none;
|
933 |
+
}
|
934 |
+
.imagify-tab-content .imagify-modal-section:first-child {
|
935 |
+
margin-top: 0;
|
936 |
+
}
|
937 |
+
|
938 |
+
/* Modal sidebar */
|
939 |
+
.imagify-modal-sidebar-content,
|
940 |
+
.imagify-payment-modal .imagify-modal-sidebar {
|
941 |
+
display: -webkit-box;
|
942 |
+
display: -webkit-flex;
|
943 |
+
display: -ms-flexbox;
|
944 |
+
display: flex;
|
945 |
+
-webkit-box-orient: vertical;
|
946 |
+
-webkit-box-direction: normal;
|
947 |
+
-webkit-flex-direction: column;
|
948 |
+
-ms-flex-direction: column;
|
949 |
+
flex-direction: column;
|
950 |
+
}
|
951 |
+
.imagify-modal-sidebar-content {
|
952 |
+
-webkit-box-flex: 1;
|
953 |
+
-webkit-flex-grow: 1;
|
954 |
+
-ms-flex-positive: 1;
|
955 |
+
flex-grow: 1;
|
956 |
+
}
|
957 |
+
p.imagify-modal-sidebar-title {
|
958 |
+
margin-top: 5px;
|
959 |
+
padding-right: 40px;
|
960 |
+
font-size: 18px;
|
961 |
+
color: #FFF;
|
962 |
+
}
|
963 |
+
.imagify-modal-testimony {
|
964 |
+
margin-top: 1em;
|
965 |
+
}
|
966 |
+
.imagify-modal-testimony + .imagify-modal-testimony {
|
967 |
+
margin-top: 2em;
|
968 |
+
}
|
969 |
+
@media (max-height:620px) {
|
970 |
+
.imagify-modal-testimony + .imagify-modal-testimony {
|
971 |
+
display: none;
|
972 |
+
}
|
973 |
+
}
|
974 |
+
.imagify-modal-testimony-person {
|
975 |
+
display: table;
|
976 |
+
width: 100%;
|
977 |
+
}
|
978 |
+
.imagify-modal-testimony-person > * {
|
979 |
+
display: table-cell;
|
980 |
+
vertical-align: middle;
|
981 |
+
}
|
982 |
+
.imagify-modal-avatar {
|
983 |
+
width: 114px;
|
984 |
+
line-height: 0;
|
985 |
+
}
|
986 |
+
.imagify-modal-avatar img {
|
987 |
+
border: 2px solid #FFF;
|
988 |
+
border-radius: 50%;
|
989 |
+
width: 96px; height: 96px;
|
990 |
+
}
|
991 |
+
.imagify-modal-identity a {
|
992 |
+
text-decoration: none;
|
993 |
+
font-weight: bold;
|
994 |
+
}
|
995 |
+
.imagify-modal-identity a:first-child {
|
996 |
+
font-size: 13px;
|
997 |
+
}
|
998 |
+
.imagify-modal-identity a:first-child + a {
|
999 |
+
display: block;
|
1000 |
+
font-size: 10px;
|
1001 |
+
color: #7A8996;
|
1002 |
+
}
|
1003 |
+
.imagify-modal-testimony-content p {
|
1004 |
+
font-size: 13px;
|
1005 |
+
font-style: italic;
|
1006 |
+
line-height: 1.7;
|
1007 |
+
color: #7A8996;
|
1008 |
+
}
|
1009 |
+
.imagify-modal-sidebar-trust {
|
1010 |
+
margin-top: auto;
|
1011 |
+
padding-top: 1.5em;
|
1012 |
+
}
|
1013 |
+
.imagify-modal-sidebar-trust p {
|
1014 |
+
margin: 0;
|
1015 |
+
font-weight: bold;
|
1016 |
+
font-size: 12px;
|
1017 |
+
line-height: 1.7;
|
1018 |
+
}
|
1019 |
+
.imagify-modal-sidebar-trust p img {
|
1020 |
+
margin-right: 3px;
|
1021 |
+
vertical-align: -2px;
|
1022 |
+
}
|
1023 |
+
.imagify-modal-sidebar-trust p + p {
|
1024 |
+
font-size: 11px;
|
1025 |
+
}
|
1026 |
+
|
1027 |
+
/* Cart */
|
1028 |
+
.imagify-cart {
|
1029 |
+
text-align: left;
|
1030 |
+
}
|
1031 |
+
.imagify-cart .imagify-cart-list {
|
1032 |
+
border-top: 1px solid rgba(122, 137, 150, .2);
|
1033 |
+
border-bottom: 1px solid rgba(122, 137, 150, .2);
|
1034 |
+
}
|
1035 |
+
.imagify-cart .imagify-cart-label {
|
1036 |
+
margin-bottom: 0.5em;
|
1037 |
+
font-size: 10px;
|
1038 |
+
color: #2E3243;
|
1039 |
+
}
|
1040 |
+
.imagify-cart-list p {
|
1041 |
+
margin: 0;
|
1042 |
+
font-weight: bold;
|
1043 |
+
}
|
1044 |
+
.imagify-cart-item {
|
1045 |
+
margin: .4em 0;
|
1046 |
+
}
|
1047 |
+
.imagify-cart .imagify-cart-suggestion {
|
1048 |
+
margin-top: -.3em;
|
1049 |
+
}
|
1050 |
+
.imagify-cart-suggestion a,
|
1051 |
+
.imagify-cl-description p {
|
1052 |
+
font-size: 10px;
|
1053 |
+
}
|
1054 |
+
.imagify-remove-from-cart {
|
1055 |
+
border: 0;
|
1056 |
+
padding: 0;
|
1057 |
+
width: 14px;
|
1058 |
+
height: 14px;
|
1059 |
+
line-height: 13px;
|
1060 |
+
border-radius: 50%;
|
1061 |
+
background: #40B1D0;
|
1062 |
+
cursor: pointer;
|
1063 |
+
transition: background .3s;
|
1064 |
+
}
|
1065 |
+
.imagify-remove-from-cart i:before {
|
1066 |
+
position: relative;
|
1067 |
+
top: -6px; left: -3px;
|
1068 |
+
font-size: 13px;
|
1069 |
+
color: #FFF;
|
1070 |
+
}
|
1071 |
+
.imagify-remove-from-cart:hover,
|
1072 |
+
.imagify-remove-from-cart:focus {
|
1073 |
+
background: #D0021B;
|
1074 |
+
}
|
1075 |
+
|
1076 |
+
/* col sizes */
|
1077 |
+
.imagify-cart .imagify-cl-remove {
|
1078 |
+
-webkit-box-flex: 0;
|
1079 |
+
-webkit-flex-grow: 0;
|
1080 |
+
-ms-flex-positive: 0;
|
1081 |
+
flex-grow: 0;
|
1082 |
+
width: 45px;
|
1083 |
+
}
|
1084 |
+
.imagify-cart .imagify-cl-name {
|
1085 |
+
-webkit-box-flex: 0;
|
1086 |
+
-webkit-flex-grow: 0;
|
1087 |
+
-ms-flex-positive: 0;
|
1088 |
+
flex-grow: 0;
|
1089 |
+
width: 200px;
|
1090 |
+
}
|
1091 |
+
.imagify-cart .imagify-cl-description {
|
1092 |
+
-webkit-align-self: flex-start;
|
1093 |
+
-ms-flex-item-align: start;
|
1094 |
+
align-self: flex-start;
|
1095 |
+
padding-top: 10px;
|
1096 |
+
}
|
1097 |
+
.imagify-cart .imagify-cl-price {
|
1098 |
+
text-align: right;
|
1099 |
+
}
|
1100 |
+
|
1101 |
+
#imagify-payment-iframe {
|
1102 |
+
width: 980px;
|
1103 |
+
height: 672px;
|
1104 |
+
background: #f6f7fb url(../images/loader-balls.svg) 50% 50% no-repeat;
|
1105 |
+
}
|
1106 |
+
|
1107 |
+
.imagify-success-view {
|
1108 |
+
display: -webkit-box;
|
1109 |
+
display: -webkit-flex;
|
1110 |
+
display: -ms-flexbox;
|
1111 |
+
display: flex;
|
1112 |
+
-webkit-box-align: center;
|
1113 |
+
-webkit-align-items: center;
|
1114 |
+
-ms-flex-align: center;
|
1115 |
+
align-items: center;
|
1116 |
+
-webkit-box-orient: vertical;
|
1117 |
+
-webkit-box-direction: normal;
|
1118 |
+
-webkit-flex-direction: column;
|
1119 |
+
-ms-flex-direction: column;
|
1120 |
+
flex-direction: column;
|
1121 |
+
-webkit-box-pack: center;
|
1122 |
+
-webkit-justify-content: center;
|
1123 |
+
-ms-flex-pack: center;
|
1124 |
+
justify-content: center;
|
1125 |
+
height: 100%;
|
1126 |
+
}
|
1127 |
+
.imagify-success-view p {
|
1128 |
+
font-weight: bold;
|
1129 |
+
font-size: 16px;
|
1130 |
+
}
|
1131 |
+
|
1132 |
+
/* Imagify cart item removing */
|
1133 |
+
.imagify-cart-emptied-item {
|
1134 |
+
margin: .3em auto;
|
1135 |
+
padding: 6px 20px;
|
1136 |
+
background: #E6EBEF;
|
1137 |
+
border-radius: 20px;
|
1138 |
+
}
|
1139 |
+
.imagify-cart-emptied-item.imagify-cart-emptied-item p {
|
1140 |
+
font-weight: bold;
|
1141 |
+
}
|
1142 |
+
.imagify-cart-emptied-item a {
|
1143 |
+
color: #40b1d0;
|
1144 |
+
float: right;
|
1145 |
+
font-weight: bold;
|
1146 |
+
}
|
assets/css/pricing-modal.min.css
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
.imagify-2-free:after,.imagify-cols:after,.imagify-price-discount:before{content:""}.imagify-border-styled,.imagify-flex-table,.imagify-modal-cols,.imagify-offer-header,.imagify-payment-modal .imagify-modal-content,.imagify-tabs{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row}.imagify-analyzing .imagify-numbers-calc,.imagify-modal-content.imagify-iframe-viewing .imagify-modal-sidebar,.imagify-modal-content.imagify-success-viewing .imagify-modal-sidebar,.imagify-modal-section .imagify-loader,.imagify-modal-section.imagify-analyzing .imagify-modal-cols,.imagify-numbers-notcalc{display:none}.imagify-border-styled,.imagify-modal-cols{-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.imagify-payment-modal{text-align:center;color:#7A8996}.imagify-payment-modal *{-webkit-box-sizing:border-box;box-sizing:border-box}.imagify-modal-loader{position:absolute;top:0;left:0;right:0;bottom:0;background:url(../images/loader-balls.svg) center no-repeat #fff;z-index:10}.imagify-payment-modal .imagify-modal-content{width:980px;max-width:100%;min-width:925px;padding:0}.imagify-modal-content.imagify-iframe-viewing{width:980px;height:672px;overflow:hidden}.imagify-iframe-viewing #imagify-payment-process-view{width:980px;height:668px}.imagify-payment-modal .imagify-modal-main{width:70%}.imagify-iframe-viewing .imagify-modal-main{width:auto}.imagify-payment-modal .imagify-modal-content.imagify-success-viewing{min-width:auto;width:450px;min-height:300px}.imagify-success-viewing .imagify-modal-main{width:100%}.imagify-payment-modal .imagify-modal-sidebar{width:30%;padding:15px 20px;background:#1F2332;color:#FFF}.imagify-modal-section{padding:0 25px}.imagify-modal-section.section-gray{margin:0 0 1em;padding:10px 25px 15px;background:#F6F7FB}.imagify-tabs-contents .section-gray{padding:8px 25px 10px}.imagify-modal-section .imagify-modal-title:first-child{margin-top:1em;margin-bottom:1.5em}.imagify-modal-section.section-gray .imagify-modal-title{margin-top:.5em;margin-bottom:.5em}.imagify-modal-title{font-size:1.8em}.imagify-analyzing .imagify-numbers-notcalc,.imagify-modal-section.imagify-analyzing .imagify-loader{display:block}.imagify-modal-section .imagify-loader{margin:2em auto}.imagify-border-styled{width:200px;margin:0 auto;color:#8BC34A;font-weight:700;font-size:.925em}.imagify-big-number,.imagify-payment-modal strong{font-weight:700;color:#4A4A4A}.imagify-border-styled:after,.imagify-border-styled:before{content:"";height:1px;background:rgba(0,0,0,.1);-ms-flex-preferred-size:40px;flex-basis:40px}.imagify-border-styled:before{margin-right:5px}.imagify-border-styled:after{margin-left:5px}.imagify-big-number{font-size:3.7em;margin:-3px 0;line-height:1}.imagify-popin-message{padding:5px 15px;text-align:left}.imagify-popin-message.imagify-error p{color:#FFF}.imagify-small-options{width:300px;margin:1em auto .5em;background:#338EA6;border-radius:4px}.imagify-small-options input[type=radio]:checked+label,.imagify-small-options input[type=radio]:not(:checked)+label{padding:8px 10px;font-size:13px;color:#FFF;-webkit-box-shadow:none;box-shadow:none;border-left:0}.imagify-small-options input[type=radio]:not(:checked)+label{background:#338EA6;color:rgba(255,255,255,.4)}.imagify-small-options input[type=radio]:checked+label{background:#40B1D0}.imagify-cols:after{display:table;clear:both}.js .imagify-iframe-viewing .close-btn{display:none}.imagify-modal .imagify-cols{padding:0 20px}.imagify-payment-modal .imagify-iconed{margin:1.5em 5em 1.5em 0}.imagify-iconed{position:relative;text-align:left;padding-left:42px;margin-right:15px;font-weight:500}.imagify-iconed .dashicons,.imagify-iconed .icon{position:absolute;font-size:2em;left:0;top:2px;color:#40B1D0}.imagify-payment-modal .close-btn{top:10px;right:10px;width:24px;height:24px;padding:2px 0 0 4.5px;color:#FFF;background:#40B1D0;border-radius:50%;-webkit-transition:all .275s;-o-transition:all .275s;transition:all .275s}.imagify-payment-modal .close-btn i{margin-left:-3.5px;margin-top:-.5px}.imagify-payment-modal .close-btn:hover{background:#F6F7FB}.imagify-offer-line{margin-top:1.5em}.imagify-offer-line+.imagify-offer-line{margin-top:.75em}.imagify-offer-header{-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;-webkit-box-align:center;-ms-flex-align:center;align-items:center;padding:0 0 0 15px;border-radius:4px 4px 0 0;-webkit-transition:all .275s;-o-transition:all .275s;transition:all .275s}.imagify-offer-header.imagify-offer-header.imagify-offer-header .imagify-inline-options label:last-child{border-radius:0 4px 0 0}.imagify-offer-header .imagify-inline-options{width:auto}.imagify-offer-title{font-weight:700;margin:0}.imagify-offer-header,.imagify-offer-header .imagify-inline-options input[type=radio]:not(:checked)+label{background:#E5EBEF}.imagify-offer-onetime .imagify-offer-header{padding-top:8px;padding-bottom:8px}.imagify-offer-onetimes>div{padding-top:15px;padding-bottom:15px}.imagify-offer-header .imagify-inline-options input[type=radio]:checked+label,.imagify-offer-header .imagify-inline-options input[type=radio]:not(:checked)+label{position:relative;padding:7px 30px;font-size:1em;letter-spacing:.05em;color:inherit;-webkit-box-shadow:0 0 0;box-shadow:0 0 0;border-radius:0}.imagify-offer-header .imagify-inline-options input[type=radio]:checked+label{background:#F6F7FB}.imagify-2-free{position:absolute;bottom:100%;left:0;right:0;padding:2px 10px;margin-bottom:8px;font-size:.8em;letter-spacing:0;text-transform:none;text-align:center;color:#FFF;background:#10121A;border-radius:2px}.imagify-2-free:after{position:absolute;left:50%;bottom:-3px;margin-left:-3px;border-top:3px solid #10121A;border-left:3px solid transparent;border-right:3px solid transparent}.imagify-2-free.imagify-b-right{bottom:auto;left:100%;right:-100%;margin-bottom:0;margin-left:8px}.imagify-2-free.imagify-b-right:after{left:-3px;bottom:auto;top:50%;margin-top:-3px;margin-left:0;border-right:3px solid #10121A;border-top:3px solid transparent;border-bottom:3px solid transparent;border-left:0}.imagify-2-free.imagify-b-bottom{bottom:-100%;left:0;right:0;margin-top:8px}.imagify-2-free.imagify-b-bottom:after{top:-3px;bottom:auto;border-bottom:3px solid #10121A;border-left:3px solid transparent;border-right:3px solid transparent;border-top:0}.imagify-offer-content{text-align:left;background:#F6F7FB;border-radius:0 0 4px 4px;-webkit-transition:all .275s;-o-transition:all .275s;transition:all .275s}.imagify-offer-onetime .imagify-offer-content{padding:10px 0}div.imagify-col-checkbox{position:relative;width:25.5%;padding-top:10px;padding-bottom:7px}.imagify-col-checkbox label{display:block;padding-left:55px!important}.imagify-col-checkbox .imagify-checkbox.imagify-checkbox:checked,.imagify-col-checkbox .imagify-checkbox.imagify-checkbox:not(:checked){position:absolute;top:50%;left:6px;margin:-8px 0 0}.imagify-col-checkbox .imagify-checkbox.imagify-checkbox:checked+label:before,.imagify-col-checkbox .imagify-checkbox.imagify-checkbox:not(:checked)+label:before{margin:0;top:-2px;left:6px;-webkit-transition:all .275s;-o-transition:all .275s;transition:all .275s}.imagify-offer-by,.imagify-offer-size{-webkit-transition:all .275s;-o-transition:all .275s}.imagify-col-checkbox .imagify-checkbox.imagify-checkbox:checked+label:after,.imagify-col-checkbox .imagify-checkbox.imagify-checkbox:not(:checked)+label:after{top:1px;left:13px}.imagify-offer-size{font-size:30px;color:#2E3243;font-weight:700;transition:all .275s}.imagify-offer-by{font-size:10px;transition:all .275s}.imagify-approx{display:none;font-size:11px;line-height:1.2;-webkit-transition:all .275s;-o-transition:all .275s;transition:all .275s}div.imagify-col-price{width:35%}.imagify-flex-table .imagify-price-block{padding-left:0;padding-right:0}.imagify-offer-monthlies .imagify-price-block,.imagify-offer-monthly .imagify-flex-table .imagify-price-block{padding-top:0}.imagify-flex-table .imagify-price-complement{padding-right:0;font-size:10px;font-weight:700}.imagify-price-block,.imagify-price-discount{white-space:nowrap}.imagify-price-block span,.imagify-price-discount span{display:inline-block;vertical-align:middle}.imagify-price-discount.imagify-price-discount{position:relative;-webkit-box-flex:0;-ms-flex-positive:0;flex-grow:0;padding-top:15px;font-weight:700;width:70px}.imagify-price-discount:before{position:absolute;top:25px;width:62%;height:2px;background:#2E3243;-webkit-transform:rotate(-15deg);-ms-transform:rotate(-15deg);transform:rotate(-15deg)}.imagify-offer-onetimes .imagify-price-discount:before{width:100%}.imagify-price-discount-dollar{color:#2E3243}.imagify-price-discount-number{color:#8BA6B4}.imagify-offer-selected .imagify-price-discount-number{color:#FFF}span.imagify-dollars{color:#1F2332;font-size:18px;font-weight:700;vertical-align:-2px}.imagify-offer-onetime .imagify-col-price{padding-top:0}.imagify-offer-onetime .imagify-dollars{vertical-align:-1px}.imagify-price-big,.imagify-price-mini{color:#40B1D0;font-weight:700}.imagify-price-big{font-size:36px}span.imagify-price-mini{font-size:18px;vertical-align:2px}span.imagify-price-by{font-size:10px;color:#1F2332;vertical-align:-13px;text-indent:-27px}.imagify-col-other-actions{width:18.5%;text-align:right}.imagify-col-other-actions a{font-size:11px}.imagify-offer-selected,.imagify-offer-selected .imagify-col-other-actions a,.imagify-offer-selected .imagify-offer-size,.imagify-offer-selected .imagify-offer-title,.imagify-offer-selected .imagify-price-big,.imagify-offer-selected .imagify-price-complement,.imagify-offer-selected .imagify-price-mini{color:#FFF}.imagify-offer-selected .imagify-offer-header,.imagify-offer-selected .imagify-offer-header .imagify-inline-options input[type=radio]:not(:checked)+label{background:#338EA6}.imagify-offer-selected .imagify-offer-content,.imagify-offer-selected .imagify-offer-header .imagify-inline-options input[type=radio]:checked+label{background:#40B1D0}.imagify-offer-selected .imagify-checkbox.imagify-checkbox:checked+label:before,.imagify-offer-selected .imagify-checkbox.imagify-checkbox:not(:checked)+label:before{border-color:#FFF;background:#40B1D0}.imagify-offer-selected .imagify-offer-by{color:#2E3243}.imagify-enough-free .imagify-not-enough-title,.imagify-enough-title{display:none}.imagify-enough-free .imagify-enough-title{display:block}.imagify-submit-line{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;-webkit-box-align:center;-ms-flex-align:center;align-items:center;margin:2em 0;text-align:left}.imagify-coupon-section{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.imagify-coupon-section p{margin:0;line-height:1.3}.imagify-coupon-text{width:200px;max-width:100%;padding-right:15px}.imagify-coupon-loader{display:none}.imagify-coupon-text.checking{text-align:right}.imagify-coupon-text.checking .imagify-coupon-loader{display:inline}.imagify-coupon-text.checking label{display:none}.imagify-coupon-input{position:relative}.imagify-coupon-input input{position:relative;z-index:1}[id=imagify-coupon-validate].button-secondary{position:absolute;top:1px;right:3px;bottom:2px;-webkit-box-shadow:none;box-shadow:none;padding:4px 10px;z-index:0;-webkit-transition:-webkit-transform .275s;-o-transition:transform .275s;transition:transform .275s;transition:transform .275s,-webkit-transform .275s}.imagify-canbe-validate [id=imagify-coupon-validate]{-webkit-transform:translateX(45px);-ms-transform:translateX(45px);transform:translateX(45px)}.imagify-modal-section+.imagify-modal-promotion{margin-top:-1em}.imagify-modal-promotion{position:relative;overflow:hidden;display:none;-webkit-box-align:center;-ms-flex-align:center;align-items:center;padding:15px 25px;background:#604D90;text-shadow:0 0 3px rgba(0,0,0,.3)}.imagify-modal-promotion.active{display:-webkit-box;display:-ms-flexbox;display:flex}[id=imagify-pricing-tab-onetime] .imagify-modal-promotion{margin-bottom:4em}.imagify-modal-promotion:before{content:"\f488";position:absolute;top:28px;left:8%;font-family:dashicons;font-size:90px;color:#8476A9;text-shadow:none}.imagify-modal-promotion p{position:relative;margin:.2em 0;color:#FFF}.imagify-promo-title{-ms-flex-preferred-size:100%;flex-basis:100%;text-transform:uppercase;font-size:20px;font-weight:700;letter-spacing:.125em}.imagify-until-date{-ms-flex-preferred-size:200px;flex-basis:200px;text-align:right}.imagify-until-date strong{color:#FFF}.imagify-submit-line button{font-size:16px}input.imagify-coupon-code{padding:10px;border:2px solid #7A8996;font-size:.875em;font-weight:700;border-radius:3px}.validated.imagify-coupon-section .imagify-coupon-text,.validated.imagify-coupon-section strong{color:#8BC34A}.validated.imagify-coupon-section .imagify-coupon-code{color:#8BC34A;border-color:#8BC34A}.invalid.imagify-coupon-section .imagify-coupon-text,.invalid.imagify-coupon-section strong{color:#d0021b}.invalid.imagify-coupon-section .imagify-coupon-code{color:#d0021b;border-color:#d0021b}.imagify-footer-lines{width:500px;max-width:100%;margin:2em auto 2.5em;font-size:.85em;line-height:1.5}.imagify-year-selected .imagify-switch-my .imagify-yearly{display:block}.imagify-month-selected .imagify-switch-my .imagify-yearly,.imagify-year-selected .imagify-switch-my .imagify-monthly{display:none}.imagify-month-selected .imagify-switch-my .imagify-monthly{display:block}.imagify-flex-table{-webkit-box-align:center;-ms-flex-align:center;align-items:center}.imagify-flex-table>*{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;padding:7px 15px}div.imagify-col-details{width:22%;padding-left:25px}.imagify-col-details p{margin:0}.imagify-pricing-table{margin:0 20px}.imagify-pricing-table .imagify-offer-line{padding:.6em 0;border:2px solid #E8EEF0;text-align:left;border-radius:3px}.imagify-pricing-table .imagify-offer-line:first-child{margin-top:.75em}.imagify-pricing-table .imagify-offer-line.imagify-offer-selected:first-child{margin-top:1.75em}.imagify-pricing-table .imagify-offer-line+.imagify-offer-line{margin-top:-2px}.imagify-pricing-table .imagify-col-other-actions{width:20.5%}.imagify-pricing-table .imagify-approx{margin-left:0;line-height:.5;margin-bottom:1em}.imagify-pricing-table .imagify-offer-selected{-webkit-transform:scale(1.03);-ms-transform:scale(1.03);transform:scale(1.03);background:#40B1D0;border-width:0}.imagify-pricing-table .imagify-offer-selected .imagify-approx{color:#FFF}.imagify-pricing-table .imagify-button-secondary{padding:3px 20px;-webkit-box-shadow:none;box-shadow:none;text-transform:uppercase;font-size:12px;letter-spacing:.025em}.imagify-offer-selected.imagify-offer-selected .imagify-button-secondary{border:2px solid #FFF;background:#40B1D0;-webkit-box-shadow:none;box-shadow:none;text-shadow:none!important}.imagify-offer-selected.imagify-offer-selected .imagify-button-secondary:focus,.imagify-offer-selected.imagify-offer-selected .imagify-button-secondary:hover{background:#FFF;color:#40B1D0}.imagify-col .imagify-special-needs{margin-left:25px}.imagify-special-needs strong{font-size:25px;font-weight:700;color:#40B1D0}.imagify-special-needs span{display:block;font-size:12px;margin-top:-.5em}div.imagify-col-price{position:relative}.imagify-recommend{display:none;position:absolute;left:-20px;bottom:100%;padding:0;margin-bottom:8px;color:#1F2332;font-weight:700;font-style:italic}.imagify-offer-selected .imagify-recommend,.imagify-tab-content.imagify-current{display:block}[class*=imagify-onetime-] .imagify-recommend{left:65px;margin-bottom:20px}.imagify-recommend:before{content:"";position:absolute;top:7px;left:-35px;width:29px;height:30px;background:url(../images/icon-arrow-choice.png) 0 no-repeat;background-size:contain}@media only screen and (-webkit-min-device-pixel-ratio:2),only screen and (-o-min-device-pixel-ratio:2/1),only screen and (min-resolution:192dpi),only screen and (min-resolution:2dppx){.imagify-recommend:before{background-image:url(../images/icon-arrow-choice.svg)}}.imagify-offer-line[class*=imagify-onetime-]{padding:0;margin:.3em 0 0}.imagify-offer-line.imagify-offer-line[class*=imagify-onetime-]:first-child{margin-top:2em}.imagify-offer-line[class*=imagify-onetime-]+.imagify-offer-line{margin-top:.5em}.imagify-offer-selected.imagify-offer-line[class*=imagify-onetime-]{-webkit-transform:scale(1);-ms-transform:scale(1);transform:scale(1);border-width:2px}.imagify-offer-line[class*=imagify-onetime-] .imagify-col-details{position:relative;overflow:hidden;width:21%;background:#1F2332;color:#FFF}.imagify-offer-selected.imagify-offer-line[class*=imagify-onetime-] .imagify-col-details{background:#338EA6}.imagify-offer-line[class*=imagify-onetime-] .imagify-col-details:before{content:"";position:absolute;bottom:0;right:25px;width:75px;height:54px;background:url(../images/icon-pack.png)}.imagify-offer-line[class*=imagify-onetime-] .imagify-col-other-actions{width:30%}.imagify-offer-line[class*=imagify-onetime-] .imagify-approx,.imagify-offer-line[class*=imagify-onetime-] .imagify-offer-size{color:#FFF}.imagify-offer-line[class*=imagify-onetime-] .imagify-offer-size{font-size:24px}.imagify-offer-line[class*=imagify-onetime-] .imagify-approx{font-size:12px}.imagify-offer-line[class*=imagify-onetime-] .imagify-price-block{padding-left:10px}.imagify-offer-line[class*=imagify-onetime-] .imagify-dollars{vertical-align:middle}.imagify-offer-line[class*=imagify-onetime-] .imagify-price-big{vertical-align:-5px}.imagify-offer-line[class*=imagify-onetime-] .imagify-price-mini{vertical-align:7px}.imagify-tabs{margin-bottom:0;list-style:none;background:#E5EBEF}.imagify-modal-content .imagify-tabs{margin:1em 0 0}.imagify-tab{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;width:50%;margin:0;font-size:23px}.imagify-tab a{display:block;padding:15px 10px;color:inherit;text-decoration:none}.imagify-tab a:focus{-webkit-box-shadow:none;box-shadow:none;outline:0;color:#40B1D8}.imagify-tab.imagify-current a{background:#F6F7FB}.imagify-tab-content{display:none}.imagify-tab-content .imagify-modal-section:first-child{margin-top:0}.imagify-modal-sidebar-content,.imagify-payment-modal .imagify-modal-sidebar{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.imagify-modal-sidebar-content{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1}p.imagify-modal-sidebar-title{margin-top:5px;padding-right:40px;font-size:18px;color:#FFF}.imagify-modal-testimony{margin-top:1em}.imagify-modal-testimony+.imagify-modal-testimony{margin-top:2em}@media (max-height:620px){.imagify-modal-testimony+.imagify-modal-testimony{display:none}}.imagify-modal-testimony-person{display:table;width:100%}.imagify-modal-testimony-person>*{display:table-cell;vertical-align:middle}.imagify-modal-avatar{width:114px;line-height:0}.imagify-modal-avatar img{border:2px solid #FFF;border-radius:50%;width:96px;height:96px}.imagify-modal-identity a{text-decoration:none;font-weight:700}.imagify-modal-identity a:first-child{font-size:13px}.imagify-modal-identity a:first-child+a{display:block;font-size:10px;color:#7A8996}.imagify-modal-testimony-content p{font-size:13px;font-style:italic;line-height:1.7;color:#7A8996}.imagify-modal-sidebar-trust{margin-top:auto;padding-top:1.5em}.imagify-modal-sidebar-trust p{margin:0;font-weight:700;font-size:12px;line-height:1.7}.imagify-modal-sidebar-trust p img{margin-right:3px;vertical-align:-2px}.imagify-modal-sidebar-trust p+p{font-size:11px}.imagify-cart{text-align:left}.imagify-cart .imagify-cart-list{border-top:1px solid rgba(122,137,150,.2);border-bottom:1px solid rgba(122,137,150,.2)}.imagify-cart .imagify-cart-label{margin-bottom:.5em;font-size:10px;color:#2E3243}.imagify-cart-list p{margin:0;font-weight:700}.imagify-cart-item{margin:.4em 0}.imagify-cart .imagify-cart-suggestion{margin-top:-.3em}.imagify-cart-suggestion a,.imagify-cl-description p{font-size:10px}.imagify-remove-from-cart{border:0;padding:0;width:14px;height:14px;line-height:13px;border-radius:50%;background:#40B1D0;cursor:pointer;-webkit-transition:background .3s;-o-transition:background .3s;transition:background .3s}.imagify-remove-from-cart i:before{position:relative;top:-6px;left:-3px;font-size:13px;color:#FFF}.imagify-remove-from-cart:focus,.imagify-remove-from-cart:hover{background:#D0021B}.imagify-cart .imagify-cl-remove{-webkit-box-flex:0;-ms-flex-positive:0;flex-grow:0;width:45px}.imagify-cart .imagify-cl-name{-webkit-box-flex:0;-ms-flex-positive:0;flex-grow:0;width:200px}.imagify-cart .imagify-cl-description{-webkit-align-self:flex-start;-ms-flex-item-align:start;align-self:flex-start;padding-top:10px}.imagify-cart .imagify-cl-price{text-align:right}#imagify-payment-iframe{width:980px;height:672px;background:url(../images/loader-balls.svg) 50% 50% no-repeat #f6f7fb}.imagify-success-view{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;height:100%}.imagify-success-view p{font-weight:700;font-size:16px}.imagify-cart-emptied-item{margin:.3em auto;padding:6px 20px;background:#E6EBEF;border-radius:20px}.imagify-cart-emptied-item.imagify-cart-emptied-item p{font-weight:700}.imagify-cart-emptied-item a{color:#40b1d0;float:right;font-weight:700}
|
assets/css/sweetalert-custom.css
ADDED
@@ -0,0 +1,50 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Some Sweet alert styles */
|
2 |
+
.imagify-sweet-alert button {
|
3 |
+
margin-top: 17px !important;
|
4 |
+
height: 45px !important;
|
5 |
+
letter-spacing: 3px;
|
6 |
+
text-transform: uppercase !important;
|
7 |
+
border-radius: 3px !important;
|
8 |
+
background-color: #40b1d0 !important;
|
9 |
+
box-shadow: 0 3px 0 #338ea6 !important;
|
10 |
+
}
|
11 |
+
.imagify-sweet-alert button.loading {
|
12 |
+
border-radius: 100% !important;
|
13 |
+
height: 40px !important;
|
14 |
+
padding:0!important;
|
15 |
+
box-shadow: none!important;
|
16 |
+
}
|
17 |
+
.imagify-sweet-alert button.swal2-cancel {
|
18 |
+
background: #777 !important;
|
19 |
+
box-shadow: 0 3px 0 #444 !important;
|
20 |
+
}
|
21 |
+
.imagify-sweet-alert-signup .sa-confirm-button-container {
|
22 |
+
width: 40%;
|
23 |
+
}
|
24 |
+
.imagify-sweet-alert-signup button {
|
25 |
+
width: 100%;
|
26 |
+
padding: 0 !important;
|
27 |
+
}
|
28 |
+
.imagify-sweet-alert .sa-input-error:before,
|
29 |
+
.imagify-sweet-alert .sa-input-error:after,
|
30 |
+
.imagify-sweet-alert .la-ball-fall {
|
31 |
+
top: 25% !important;
|
32 |
+
}
|
33 |
+
|
34 |
+
.imagify-sweet-alert .swal2-buttonswrapper.swal2-loading .swal2-confirm.swal2-confirm {
|
35 |
+
height: 40px !important;
|
36 |
+
border-radius: 100% !important;
|
37 |
+
border-left-width: 0 !important;
|
38 |
+
border-right-width: 0 !important;
|
39 |
+
}
|
40 |
+
|
41 |
+
/* Make the page in background blured when sweet alert is open */
|
42 |
+
#wpwrap {
|
43 |
+
transition: all .4s;
|
44 |
+
}
|
45 |
+
.stop-scrolling #wpwrap {
|
46 |
+
filter: blur(2px);
|
47 |
+
}
|
48 |
+
.stop-scrolling #wpwrap #wpadminbar {
|
49 |
+
top: -32px;
|
50 |
+
}
|
assets/css/sweetalert-custom.min.css
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
.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;-webkit-box-shadow:0 3px 0 #338ea6!important;box-shadow:0 3px 0 #338ea6!important}.imagify-sweet-alert button.loading{border-radius:100%!important;height:40px!important;padding:0!important;-webkit-box-shadow:none!important;box-shadow:none!important}.imagify-sweet-alert button.swal2-cancel{background:#777!important;-webkit-box-shadow:0 3px 0 #444!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 .la-ball-fall,.imagify-sweet-alert .sa-input-error:after,.imagify-sweet-alert .sa-input-error:before{top:25%!important}.imagify-sweet-alert .swal2-buttonswrapper.swal2-loading .swal2-confirm.swal2-confirm{height:40px!important;border-radius:100%!important;border-left-width:0!important;border-right-width:0!important}#wpwrap{-webkit-transition:all .4s;-o-transition:all .4s;transition:all .4s}.stop-scrolling #wpwrap{-webkit-filter:blur(2px);filter:blur(2px)}.stop-scrolling #wpwrap #wpadminbar{top:-32px}
|
assets/css/twentytwenty.css
CHANGED
@@ -106,6 +106,7 @@
|
|
106 |
-webkit-user-select: none;
|
107 |
-moz-user-select: none;
|
108 |
}
|
|
|
109 |
.twentytwenty-container * {
|
110 |
box-sizing: content-box;
|
111 |
}
|
@@ -152,6 +153,7 @@
|
|
152 |
z-index: 30;
|
153 |
overflow: hidden;
|
154 |
}
|
|
|
155 |
.twentytwenty-duo-buttons button {
|
156 |
float: left;
|
157 |
padding: 2px 6px;
|
@@ -165,24 +167,30 @@
|
|
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 |
}
|
@@ -199,6 +207,124 @@
|
|
199 |
border-left: 8px solid white;
|
200 |
}
|
201 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
202 |
/* Specifics for too high modals */
|
203 |
.modal-is-too-high .imagify-comparison-levels {
|
204 |
position: absolute;
|
@@ -206,4 +332,4 @@
|
|
206 |
background: rgba(31, 35, 50, 0.95);
|
207 |
bottom: 0; left: 0; right: 0;
|
208 |
margin-bottom: 0;
|
209 |
-
}
|
106 |
-webkit-user-select: none;
|
107 |
-moz-user-select: none;
|
108 |
}
|
109 |
+
|
110 |
.twentytwenty-container * {
|
111 |
box-sizing: content-box;
|
112 |
}
|
153 |
z-index: 30;
|
154 |
overflow: hidden;
|
155 |
}
|
156 |
+
|
157 |
.twentytwenty-duo-buttons button {
|
158 |
float: left;
|
159 |
padding: 2px 6px;
|
167 |
transition: all .3s;
|
168 |
cursor: pointer;
|
169 |
}
|
170 |
+
|
171 |
.twentytwenty-duo-buttons button:hover,
|
172 |
.twentytwenty-duo-buttons button:focus {
|
173 |
background: #444;
|
174 |
}
|
175 |
+
|
176 |
.twentytwenty-duo-buttons button:first-child {
|
177 |
border-radius: 3px 0 0 3px;
|
178 |
}
|
179 |
+
|
180 |
.twentytwenty-duo-buttons button:last-child {
|
181 |
border-radius: 0 3px 3px 0;
|
182 |
}
|
183 |
+
|
184 |
.twentytwenty-duo-buttons button.selected {
|
185 |
background: #8bc34a;
|
186 |
text-shadow: 0 0 1px rgba(0,0,0,.2);
|
187 |
cursor: default;
|
188 |
}
|
189 |
+
|
190 |
.twentytwenty-duo-left {
|
191 |
left: 10px;
|
192 |
}
|
193 |
+
|
194 |
.twentytwenty-duo-right {
|
195 |
right: 10px;
|
196 |
}
|
207 |
border-left: 8px solid white;
|
208 |
}
|
209 |
|
210 |
+
#imagify-visual-comparison .close-btn,
|
211 |
+
.imagify-visual-comparison .close-btn {
|
212 |
+
top: 50px;
|
213 |
+
right: 5px;
|
214 |
+
width: 33px;
|
215 |
+
height: 33px;
|
216 |
+
padding: 1px 0 0 2px;
|
217 |
+
border: 1px solid #F2F2F2;
|
218 |
+
color: #F2F2F2;
|
219 |
+
line-height: 19px;
|
220 |
+
text-align: center;
|
221 |
+
border-radius: 50%;
|
222 |
+
}
|
223 |
+
|
224 |
+
.imagify-modal .imagify-comparison-title {
|
225 |
+
font-size: 28px;
|
226 |
+
margin-bottom: 1em;
|
227 |
+
color: #F2F2F2;
|
228 |
+
text-align: left;
|
229 |
+
}
|
230 |
+
.imagify-modal .imagify-comparison-title .twentytwenty-duo-buttons {
|
231 |
+
position: static;
|
232 |
+
margin: 0 10px 0 15px;
|
233 |
+
}
|
234 |
+
.imagify-comparison-title .twentytwenty-duo-buttons button {
|
235 |
+
float: none;
|
236 |
+
padding: 6px 12px;
|
237 |
+
font-size: 16px;
|
238 |
+
text-transform: none;
|
239 |
+
border: 1px solid #40B1D0;
|
240 |
+
color: #888899;
|
241 |
+
letter-spacing: 0;
|
242 |
+
}
|
243 |
+
.imagify-comparison-title .twentytwenty-duo-buttons button:focus {
|
244 |
+
outline: none;
|
245 |
+
box-shadow: none;
|
246 |
+
}
|
247 |
+
.imagify-comparison-title .twentytwenty-duo-buttons .selected {
|
248 |
+
border: 1px solid #40B1D0;
|
249 |
+
color: #FFF;
|
250 |
+
background: #40B1D0;
|
251 |
+
}
|
252 |
+
|
253 |
+
.imagify-comparison-levels {
|
254 |
+
margin: 15px 0;
|
255 |
+
overflow: hidden;
|
256 |
+
}
|
257 |
+
.imagify-comparison-levels div {
|
258 |
+
display: none;
|
259 |
+
min-width: 175px;
|
260 |
+
font-size: 11px;
|
261 |
+
}
|
262 |
+
.imagify-comparison-levels .imagify-chart,
|
263 |
+
.imagify-comparison-levels .imagify-chart-container {
|
264 |
+
width: 25px;
|
265 |
+
float: none;
|
266 |
+
margin: 0;
|
267 |
+
}
|
268 |
+
.imagify-visual-comparison .imagify-chart-container canvas {
|
269 |
+
width: 15px!important;
|
270 |
+
height: 15px!important;
|
271 |
+
margin-right: 5px;
|
272 |
+
}
|
273 |
+
.imagify-c-level.go-left {
|
274 |
+
float: left;
|
275 |
+
}
|
276 |
+
.imagify-c-level.go-right {
|
277 |
+
float: right;
|
278 |
+
}
|
279 |
+
.imagify-c-level.go-right,
|
280 |
+
.imagify-c-level.go-left {
|
281 |
+
display: table;
|
282 |
+
}
|
283 |
+
.imagify-c-level .imagify-c-level-row {
|
284 |
+
display: table-row;
|
285 |
+
margin: 0;
|
286 |
+
color: #FFF;
|
287 |
+
}
|
288 |
+
.imagify-c-level-row > span {
|
289 |
+
display: table-cell;
|
290 |
+
padding: 2px 0;
|
291 |
+
}
|
292 |
+
.imagify-c-level-row .value {
|
293 |
+
text-align: right;
|
294 |
+
padding-left: 5px;
|
295 |
+
}
|
296 |
+
.imagify-c-level-row .value.level {
|
297 |
+
color: #40b1d0;
|
298 |
+
}
|
299 |
+
.imagify-c-level-row .value.size {
|
300 |
+
color: #8bc34a;
|
301 |
+
font-weight: bold;
|
302 |
+
}
|
303 |
+
.imagify-c-level-row .value .imagify-chart {
|
304 |
+
top: 1px;
|
305 |
+
}
|
306 |
+
|
307 |
+
/* TT Loader */
|
308 |
+
.imagify-modal .loader {
|
309 |
+
position: absolute;
|
310 |
+
top: 50%;
|
311 |
+
left: 50%;
|
312 |
+
margin: -32px 0 0 -32px;
|
313 |
+
opacity: 0;
|
314 |
+
visibility: hidden;
|
315 |
+
transition: opacity .4s;
|
316 |
+
}
|
317 |
+
.imagify-modal .loading .loader {
|
318 |
+
visibility: visible;
|
319 |
+
opacity: 1;
|
320 |
+
}
|
321 |
+
|
322 |
+
.imagify-settings .imagify-visual-comparison-text {
|
323 |
+
margin-top: 1em;
|
324 |
+
color: #40b1d0;
|
325 |
+
font-weight: bold;
|
326 |
+
}
|
327 |
+
|
328 |
/* Specifics for too high modals */
|
329 |
.modal-is-too-high .imagify-comparison-levels {
|
330 |
position: absolute;
|
332 |
background: rgba(31, 35, 50, 0.95);
|
333 |
bottom: 0; left: 0; right: 0;
|
334 |
margin-bottom: 0;
|
335 |
+
}
|
assets/css/twentytwenty.min.css
CHANGED
@@ -1 +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%;-webkit-box-shadow:0 3px 0 #338EA6;box-shadow:0 3px 0 #338EA6;background:#40B1D0;cursor:pointer}.twentytwenty-horizontal .twentytwenty-handle:after,.twentytwenty-horizontal .twentytwenty-handle:before{left:50%;width:2px;height:9999px;margin-left:-1px;content:"";position:absolute;z-index:30;display:block;background:#F2F5F7;-webkit-box-shadow:0 0 12px rgba(51,51,51,.5);box-shadow:0 0 12px rgba(51,51,51,.5)}.twentytwenty-horizontal .twentytwenty-handle:before{bottom:50%;margin-bottom:32px}.twentytwenty-horizontal .twentytwenty-handle:after{top:50%;margin-top:34px}.twentytwenty-labels,.twentytwenty-overlay{position:absolute;top:0;width:100%;height:100%;-webkit-transition-duration:.5s;-o-transition-duration:.5s;transition-duration:.5s}.twentytwenty-labels{opacity:1;-webkit-transition-property:opacity;-o-transition-property:opacity;transition-property:opacity}.twentytwenty-labels .twentytwenty-label-content{position:absolute;padding:0 12px;font-size:13px;letter-spacing:.1em;line-height:38px;color:#fff;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;top:50%;margin-top:-8px}.twentytwenty-container{-webkit-box-sizing:content-box;box-sizing:content-box;position:relative;z-index:0;overflow:hidden;-webkit-box-shadow:0 5px 10px rgba(0,0,0,.15);box-shadow:0 5px 10px rgba(0,0,0,.15);opacity:0;-webkit-transition:opacity .4s;-o-transition:opacity .4s;transition:opacity .4s;-webkit-user-select:none;-moz-user-select:none}.twentytwenty-container *{-webkit-box-sizing:content-box;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:.125em;font-weight:700;border:0;background:#1f2332;color:#FFF;-webkit-transition:all .3s;-o-transition:all .3s;transition:all .3s;cursor:pointer}.twentytwenty-duo-buttons button:focus,.twentytwenty-duo-buttons button:hover{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 #fff}.twentytwenty-right-arrow{right:50%;margin-right:-22px;border-left:8px solid #fff}.modal-is-too-high .imagify-comparison-levels{position:absolute;padding:15px 20px;background:rgba(31,35,50,.95);bottom:0;left:0;right:0;margin-bottom:0}
|
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%;-webkit-box-shadow:0 3px 0 #338EA6;box-shadow:0 3px 0 #338EA6;background:#40B1D0;cursor:pointer}.twentytwenty-horizontal .twentytwenty-handle:after,.twentytwenty-horizontal .twentytwenty-handle:before{left:50%;width:2px;height:9999px;margin-left:-1px;content:"";position:absolute;z-index:30;display:block;background:#F2F5F7;-webkit-box-shadow:0 0 12px rgba(51,51,51,.5);box-shadow:0 0 12px rgba(51,51,51,.5)}.twentytwenty-horizontal .twentytwenty-handle:before{bottom:50%;margin-bottom:32px}.twentytwenty-horizontal .twentytwenty-handle:after{top:50%;margin-top:34px}.twentytwenty-labels,.twentytwenty-overlay{position:absolute;top:0;width:100%;height:100%;-webkit-transition-duration:.5s;-o-transition-duration:.5s;transition-duration:.5s}.twentytwenty-labels{opacity:1;-webkit-transition-property:opacity;-o-transition-property:opacity;transition-property:opacity}.twentytwenty-labels .twentytwenty-label-content{position:absolute;padding:0 12px;font-size:13px;letter-spacing:.1em;line-height:38px;color:#fff;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;top:50%;margin-top:-8px}.twentytwenty-container{-webkit-box-sizing:content-box;box-sizing:content-box;position:relative;z-index:0;overflow:hidden;-webkit-box-shadow:0 5px 10px rgba(0,0,0,.15);box-shadow:0 5px 10px rgba(0,0,0,.15);opacity:0;-webkit-transition:opacity .4s;-o-transition:opacity .4s;transition:opacity .4s;-webkit-user-select:none;-moz-user-select:none}.twentytwenty-container *{-webkit-box-sizing:content-box;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:.125em;font-weight:700;border:0;background:#1f2332;color:#FFF;-webkit-transition:all .3s;-o-transition:all .3s;transition:all .3s;cursor:pointer}.twentytwenty-duo-buttons button:focus,.twentytwenty-duo-buttons button:hover{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 #fff}.twentytwenty-right-arrow{right:50%;margin-right:-22px;border-left:8px solid #fff}#imagify-visual-comparison .close-btn,.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:0;-webkit-box-shadow: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-visual-comparison .imagify-chart-container canvas{width:15px!important;height:15px!important;margin-right:5px}.imagify-c-level.go-left{float:left}.imagify-c-level.go-right{float:right}.imagify-c-level.go-left,.imagify-c-level.go-right{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:700}.imagify-c-level-row .value .imagify-chart{top:1px}.imagify-modal .loader{position:absolute;top:50%;left:50%;margin:-32px 0 0 -32px;opacity:0;visibility:hidden;-webkit-transition:opacity .4s;-o-transition:opacity .4s;transition:opacity .4s}.imagify-modal .loading .loader{visibility:visible;opacity:1}.imagify-settings .imagify-visual-comparison-text{margin-top:1em;color:#40b1d0;font-weight:700}.modal-is-too-high .imagify-comparison-levels{position:absolute;padding:15px 20px;background:rgba(31,35,50,.95);bottom:0;left:0;right:0;margin-bottom:0}
|
assets/images/big-blue-check.png
CHANGED
File without changes
|
assets/images/check-1.svg
CHANGED
File without changes
|
assets/images/check-mini-1.svg
CHANGED
File without changes
|
assets/images/icon-arrow-choice.png
CHANGED
File without changes
|
assets/images/icon-arrow-choice.svg
CHANGED
File without changes
|
assets/images/icon-lock.png
CHANGED
File without changes
|
assets/images/icon-lock.svg
CHANGED
File without changes
|
assets/images/icon-pack.png
CHANGED
File without changes
|
assets/images/icon-pack.svg
CHANGED
File without changes
|
assets/images/mushrooms-aggressive.jpg
CHANGED
File without changes
|
assets/images/mushrooms-normal.jpg
CHANGED
File without changes
|
assets/images/mushrooms-original.jpg
CHANGED
File without changes
|
assets/images/mushrooms-ultra.jpg
CHANGED
File without changes
|
assets/images/pic-ericwaltr.jpg
CHANGED
File without changes
|
assets/images/pic-srhdesign.jpg
CHANGED
File without changes
|
assets/js/admin-bar.js
ADDED
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
// Admin bar =======================================================================================
|
2 |
+
(function($, d, w, undefined) { // eslint-disable-line no-unused-vars, no-shadow, no-shadow-restricted-names
|
3 |
+
|
4 |
+
var busy = false;
|
5 |
+
|
6 |
+
$( d ).on( 'mouseenter', '#wp-admin-bar-imagify', function() {
|
7 |
+
var $adminBarProfile, url;
|
8 |
+
|
9 |
+
if ( true === busy ) {
|
10 |
+
return;
|
11 |
+
}
|
12 |
+
|
13 |
+
busy = true;
|
14 |
+
|
15 |
+
$adminBarProfile = $( '#wp-admin-bar-imagify-profile-content' );
|
16 |
+
|
17 |
+
if ( ! $adminBarProfile.is( ':empty' ) ) {
|
18 |
+
return;
|
19 |
+
}
|
20 |
+
|
21 |
+
if ( w.ajaxurl ) {
|
22 |
+
url = w.ajaxurl;
|
23 |
+
} else {
|
24 |
+
url = w.imagifyAdminBar.ajaxurl;
|
25 |
+
}
|
26 |
+
|
27 |
+
url += url.indexOf( '?' ) > 0 ? '&' : '?';
|
28 |
+
|
29 |
+
$.get( url + 'action=imagify_get_admin_bar_profile&imagifygetadminbarprofilenonce=' + $( '#imagifygetadminbarprofilenonce' ).val() )
|
30 |
+
.done( function( response ) {
|
31 |
+
$adminBarProfile.html( response.data );
|
32 |
+
$( '#wp-admin-bar-imagify-profile-loading' ).remove();
|
33 |
+
busy = false;
|
34 |
+
} );
|
35 |
+
} );
|
36 |
+
|
37 |
+
} )(jQuery, document, window);
|
assets/js/admin-bar.min.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
!function(a,b,c,d){var e=!1;a(b).on("mouseenter","#wp-admin-bar-imagify",function(){var b,d;!0!==e&&(e=!0,b=a("#wp-admin-bar-imagify-profile-content"),b.is(":empty")&&(d=c.ajaxurl?c.ajaxurl:c.imagifyAdminBar.ajaxurl,d+=d.indexOf("?")>0?"&":"?",a.get(d+"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(),e=!1})))})}(jQuery,document,window);
|
assets/js/admin.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
window.imagify =
|
2 |
concat: ajaxurl.indexOf( '?' ) > 0 ? '&' : '?',
|
3 |
log: function( content ) {
|
4 |
if ( undefined !== console ) {
|
@@ -9,179 +9,33 @@ window.imagify = window.imagify || {
|
|
9 |
if ( undefined !== console ) {
|
10 |
console.info( content ); // eslint-disable-line no-console
|
11 |
}
|
12 |
-
}
|
13 |
-
|
14 |
-
|
15 |
-
// Admin bar =======================================================================================
|
16 |
-
(function($, d, w, undefined) { // eslint-disable-line no-unused-vars, no-shadow, no-shadow-restricted-names
|
17 |
-
|
18 |
-
var busy = false;
|
19 |
-
|
20 |
-
$( '#wp-admin-bar-imagify' ).hover( function() {
|
21 |
-
var $adminBarProfile;
|
22 |
-
|
23 |
-
if ( true === busy ) {
|
24 |
-
return;
|
25 |
-
}
|
26 |
-
|
27 |
-
busy = true;
|
28 |
-
|
29 |
-
$adminBarProfile = $( '#wp-admin-bar-imagify-profile-content' );
|
30 |
-
|
31 |
-
if ( ! $adminBarProfile.is( ':empty' ) ) {
|
32 |
-
return;
|
33 |
-
}
|
34 |
-
|
35 |
-
$.get( ajaxurl + imagify.concat + 'action=imagify_get_admin_bar_profile&imagifygetadminbarprofilenonce=' + $( '#imagifygetadminbarprofilenonce' ).val() )
|
36 |
-
.done( function( response ) {
|
37 |
-
$adminBarProfile.html( response.data );
|
38 |
-
$( '#wp-admin-bar-imagify-profile-loading' ).remove();
|
39 |
-
busy = false;
|
40 |
-
} );
|
41 |
-
} );
|
42 |
-
|
43 |
-
} )(jQuery, document, window);
|
44 |
-
|
45 |
-
|
46 |
-
// The big welcome notice ==========================================================================
|
47 |
-
(function($, d, w, undefined) { // eslint-disable-line no-unused-vars, no-shadow, no-shadow-restricted-names
|
48 |
-
|
49 |
-
/**
|
50 |
-
* 1. Create a new Imagify account.
|
51 |
-
*/
|
52 |
-
$( '#imagify-signup' ).on( 'click.imagify', function( e ) {
|
53 |
-
e.preventDefault();
|
54 |
-
|
55 |
-
// Display the sign up form.
|
56 |
-
swal( {
|
57 |
-
title: imagifyAdmin.labels.signupTitle,
|
58 |
-
html: imagifyAdmin.labels.signupText,
|
59 |
-
confirmButtonText: imagifyAdmin.labels.signupConfirmButtonText,
|
60 |
-
input: 'email',
|
61 |
-
showLoaderOnConfirm: true,
|
62 |
-
customClass: 'imagify-sweet-alert imagify-sweet-alert-signup',
|
63 |
-
inputValidator: function( inputValue ) {
|
64 |
-
return new Promise( function( resolve, reject ) {
|
65 |
-
if ( $.trim( inputValue ) === '' || ! inputValue ) {
|
66 |
-
reject( imagifyAdmin.labels.signupErrorEmptyEmail );
|
67 |
-
} else {
|
68 |
-
resolve();
|
69 |
-
}
|
70 |
-
} );
|
71 |
-
},
|
72 |
-
preConfirm: function( inputValue ) {
|
73 |
-
return new Promise( function( resolve, reject ) {
|
74 |
-
setTimeout( function() {
|
75 |
-
$.get( ajaxurl + imagify.concat + 'action=imagify_signup&email=' + inputValue + '&imagifysignupnonce=' + $( '#imagifysignupnonce' ).val() )
|
76 |
-
.done( function( response ) {
|
77 |
-
if ( ! response.success ) {
|
78 |
-
reject( response.data );
|
79 |
-
} else {
|
80 |
-
resolve();
|
81 |
-
}
|
82 |
-
} );
|
83 |
-
}, 2000 );
|
84 |
-
} );
|
85 |
-
},
|
86 |
-
} ).then( function() {
|
87 |
-
swal( {
|
88 |
-
title: imagifyAdmin.labels.signupSuccessTitle,
|
89 |
-
html: imagifyAdmin.labels.signupSuccessText,
|
90 |
-
type: 'success',
|
91 |
-
customClass: 'imagify-sweet-alert'
|
92 |
-
} );
|
93 |
-
} );
|
94 |
-
} );
|
95 |
-
|
96 |
-
/**
|
97 |
-
* 2. Check and save the Imagify API Key.
|
98 |
-
*/
|
99 |
-
$( '#imagify-save-api-key' ).on( 'click.imagify', function( e ) {
|
100 |
-
e.preventDefault();
|
101 |
-
|
102 |
-
// Display the API key form.
|
103 |
-
swal( {
|
104 |
-
title: imagifyAdmin.labels.saveApiKeyTitle,
|
105 |
-
html: imagifyAdmin.labels.saveApiKeyText,
|
106 |
-
confirmButtonText: imagifyAdmin.labels.saveApiKeyConfirmButtonText,
|
107 |
-
input: 'text',
|
108 |
-
showLoaderOnConfirm: true,
|
109 |
-
customClass: 'imagify-sweet-alert imagify-sweet-alert-signup',
|
110 |
-
inputValidator: function( inputValue ) {
|
111 |
-
return new Promise( function( resolve, reject ) {
|
112 |
-
if ( $.trim( inputValue ) === '' || ! inputValue ) {
|
113 |
-
reject( imagifyAdmin.labels.ApiKeyErrorEmpty );
|
114 |
-
} else {
|
115 |
-
resolve();
|
116 |
-
}
|
117 |
-
} );
|
118 |
-
},
|
119 |
-
preConfirm: function( inputValue ) {
|
120 |
-
return new Promise( function( resolve, reject ) {
|
121 |
-
$.get( ajaxurl + imagify.concat + 'action=imagify_check_api_key_validity&api_key=' + inputValue + '&imagifycheckapikeynonce=' + $( '#imagifycheckapikeynonce' ).val() )
|
122 |
-
.done( function( response ) {
|
123 |
-
if ( ! response.success ) {
|
124 |
-
reject( response.data );
|
125 |
-
} else {
|
126 |
-
resolve();
|
127 |
-
}
|
128 |
-
} );
|
129 |
-
} );
|
130 |
-
},
|
131 |
-
} ).then( function() {
|
132 |
-
swal( {
|
133 |
-
title: imagifyAdmin.labels.ApiKeyCheckSuccessTitle,
|
134 |
-
html: imagifyAdmin.labels.ApiKeyCheckSuccessText,
|
135 |
-
type: 'success',
|
136 |
-
customClass: 'imagify-sweet-alert'
|
137 |
-
} );
|
138 |
-
} );
|
139 |
-
} );
|
140 |
-
|
141 |
-
/**
|
142 |
-
* Close an Imagify notice.
|
143 |
-
*/
|
144 |
-
$( '.imagify-notice-dismiss' ).on( 'click.imagify', function( e ) {
|
145 |
-
var $this = $( this ),
|
146 |
-
$parent = $this.parents( '.imagify-welcome, .imagify-notice' ),
|
147 |
-
href = $this.attr( 'href' );
|
148 |
-
|
149 |
-
e.preventDefault();
|
150 |
-
|
151 |
-
// Hide the notice.
|
152 |
-
$parent.fadeTo( 100 , 0, function() {
|
153 |
-
$( this ).slideUp( 100, function() {
|
154 |
-
$( this ).remove();
|
155 |
-
} );
|
156 |
-
} );
|
157 |
|
158 |
-
|
159 |
-
|
160 |
-
|
|
|
161 |
|
162 |
-
|
|
|
|
|
163 |
|
164 |
|
165 |
// Imagify light modal =============================================================================
|
166 |
(function($, d, w, undefined) { // eslint-disable-line no-unused-vars, no-shadow, no-shadow-restricted-names
|
167 |
|
168 |
-
var imagifyOpenModal = function( $the_link ) {
|
169 |
-
var the_target = $the_link.data( 'target' ) || $the_link.attr( 'href' );
|
170 |
-
|
171 |
-
$( the_target ).css( 'display', 'flex' ).hide().fadeIn( 400 ).attr( 'aria-hidden', 'false' ).attr( 'tabindex', '0' ).focus().removeAttr( 'tabindex' ).addClass( 'modal-is-open' );
|
172 |
-
$( 'body' ).addClass( 'imagify-modal-is-open' );
|
173 |
-
};
|
174 |
-
|
175 |
// Accessibility.
|
176 |
$( '.imagify-modal' ).attr( 'aria-hidden', 'true' );
|
177 |
|
178 |
$( d )
|
179 |
-
// On click on modal trigger.
|
180 |
.on( 'click.imagify', '.imagify-modal-trigger', function( e ) {
|
181 |
e.preventDefault();
|
182 |
-
|
183 |
} )
|
184 |
-
// On click on close button.
|
185 |
.on( 'click.imagify', '.imagify-modal .close-btn', function() {
|
186 |
var $modal = $( this ).closest( '.imagify-modal' );
|
187 |
|
@@ -197,11 +51,11 @@ window.imagify = window.imagify || {
|
|
197 |
$modal.attr( 'tabindex', '0' ).focus().removeAttr( 'tabindex' );
|
198 |
}
|
199 |
} )
|
200 |
-
// On click on dropped layer of modal.
|
201 |
.on( 'click.imagify', '.imagify-modal', function( e ) {
|
202 |
$( e.target ).filter( '.modal-is-open' ).find( '.close-btn' ).trigger( 'click.imagify' );
|
203 |
} )
|
204 |
-
// `Esc` key binding.
|
205 |
.on( 'keydown.imagify', function( e ) {
|
206 |
if ( 27 === e.keyCode && $( '.imagify-modal.modal-is-open' ).length > 0 ) {
|
207 |
e.preventDefault();
|
@@ -211,983 +65,3 @@ window.imagify = window.imagify || {
|
|
211 |
} );
|
212 |
|
213 |
} )(jQuery, document, window);
|
214 |
-
|
215 |
-
|
216 |
-
// Imagify payment modal ===========================================================================
|
217 |
-
(function($, d, w, undefined) { // eslint-disable-line no-unused-vars, no-shadow, no-shadow-restricted-names
|
218 |
-
|
219 |
-
/**
|
220 |
-
* Payment Modal.
|
221 |
-
*
|
222 |
-
* @since 1.6
|
223 |
-
* @since 1.6.3 include discount campaign
|
224 |
-
* @author Geoffrey
|
225 |
-
*/
|
226 |
-
var imagifyModal = {};
|
227 |
-
|
228 |
-
if ( ! $( '#imagify-pricing-modal' ).length ) {
|
229 |
-
return;
|
230 |
-
}
|
231 |
-
|
232 |
-
imagifyModal = {
|
233 |
-
$modal: $( '#imagify-pricing-modal' ),
|
234 |
-
$checkboxes: $( '.imagify-offer-line .imagify-checkbox' ),
|
235 |
-
$radios: $( '.imagify-payment-modal .imagify-radio-line input' ),
|
236 |
-
// Plans selection view & payment process view hidden by default.
|
237 |
-
$preView: $( '#imagify-pre-checkout-view' ),
|
238 |
-
$plansView: $( '#imagify-plans-selection-view' ).hide(),
|
239 |
-
$paymentView: $( '#imagify-payment-process-view' ).hide(),
|
240 |
-
$successView: $( '#imagify-success-view' ).hide(),
|
241 |
-
$anotherBtn: $( '.imagify-choose-another-plan' ),
|
242 |
-
speedFadeIn: 300,
|
243 |
-
|
244 |
-
getHtmlPrice: function( content, period ) {
|
245 |
-
var monthly, yearly, m, y, output;
|
246 |
-
|
247 |
-
if ( ! period ) {
|
248 |
-
period = null;
|
249 |
-
}
|
250 |
-
|
251 |
-
if ( typeof content !== 'object' ) {
|
252 |
-
content += ''; // Be sure content is a string.
|
253 |
-
content = content.split( '.' );
|
254 |
-
content[1] = content[1].length === 1 ? content[1] + '0' : ( '' + content[1] ).substring( 0, 2 );
|
255 |
-
|
256 |
-
output = '<span class="imagify-price-big">' + content[0] + '</span> ';
|
257 |
-
output += '<span class="imagify-price-mini">.' + content[1] + '</span>';
|
258 |
-
|
259 |
-
return output;
|
260 |
-
}
|
261 |
-
|
262 |
-
monthly = content.monthly + '';
|
263 |
-
yearly = content.yearly + '';
|
264 |
-
m = monthly.split( '.' );
|
265 |
-
y = yearly.split( '.' );
|
266 |
-
output = '<span class="imagify-switch-my">';
|
267 |
-
/* eslint-disable indent */
|
268 |
-
output += '<span aria-hidden="' + ( period === 'monthly' ? 'false' : 'true' ) + '" class="imagify-monthly">';
|
269 |
-
output += '<span class="imagify-price-big">' + m[0] + '</span> ';
|
270 |
-
output += '<span class="imagify-price-mini">.' + ( m[1].length === 1 ? m[1] + '0' : ( '' + m[1] ).substring( 0, 2 ) ) + '</span>';
|
271 |
-
output += '</span> ';
|
272 |
-
output += '<span aria-hidden="' + ( period === 'yearly' ? 'false' : 'true' ) + '" class="imagify-yearly">';
|
273 |
-
output += '<span class="imagify-price-big">' + y[0] + '</span> ';
|
274 |
-
output += '<span class="imagify-price-mini">.' + ( y[1].length === 1 ? y[1] + '0' : ( '' + y[1] ).substring( 0, 2 ) ) + '</span>';
|
275 |
-
output += '</span>';
|
276 |
-
/* eslint-enable indent */
|
277 |
-
output += '</span>';
|
278 |
-
|
279 |
-
return output;
|
280 |
-
},
|
281 |
-
|
282 |
-
getHtmlDiscountPrice: function( content, period ) {
|
283 |
-
var monthly, yearly,
|
284 |
-
output = '';
|
285 |
-
|
286 |
-
if ( ! period ) {
|
287 |
-
period = null;
|
288 |
-
}
|
289 |
-
|
290 |
-
if ( typeof content === 'object' ) {
|
291 |
-
monthly = content.monthly + '';
|
292 |
-
yearly = content.yearly + '';
|
293 |
-
|
294 |
-
output += '<span class="imagify-price-discount">';
|
295 |
-
/* eslint-disable indent */
|
296 |
-
output += '<span class="imagify-price-discount-dollar">$</span>';
|
297 |
-
output += '<span class="imagify-switch-my">';
|
298 |
-
output += '<span aria-hidden="' + ( period === 'monthly' ? 'false' : 'true' ) + '" class="imagify-monthly">';
|
299 |
-
output += '<span class="imagify-price-discount-number">' + monthly + '</span>';
|
300 |
-
output += '</span>';
|
301 |
-
output += '<span aria-hidden="' + ( period === 'yearly' ? 'false' : 'true' ) + '" class="imagify-yearly">';
|
302 |
-
output += '<span class="imagify-price-discount-number">' + yearly + '</span>';
|
303 |
-
output += '</span>';
|
304 |
-
output += '</span>';
|
305 |
-
/* eslint-enable indent */
|
306 |
-
output += '</span>';
|
307 |
-
} else {
|
308 |
-
content += ''; // Be sure content is a string.
|
309 |
-
output += '<span class="imagify-price-discount">';
|
310 |
-
/* eslint-disable indent */
|
311 |
-
output += '<span class="imagify-price-discount-dollar">$</span>';
|
312 |
-
output += '<span class="imagify-price-discount-number">' + content + '</span>';
|
313 |
-
/* eslint-enable indent */
|
314 |
-
output += '</span>';
|
315 |
-
}
|
316 |
-
|
317 |
-
return output;
|
318 |
-
},
|
319 |
-
|
320 |
-
/**
|
321 |
-
* @uses imagifyModal.getHtmlPrice()
|
322 |
-
* @uses imagifyModal.getHtmlDiscountPrice()
|
323 |
-
*/
|
324 |
-
populateOffer: function ( $offer, datas, type, classes ) {
|
325 |
-
var promo = w.imagify_discount_datas,
|
326 |
-
add = datas.additional_gb, // 4 (monthly)
|
327 |
-
ann = datas.annual_cost, // 49.9 (monthly)
|
328 |
-
id = datas.id, // 3 (monthly/onetime)
|
329 |
-
lab = datas.label, // 'lite' (monthly/onetime)
|
330 |
-
mon = datas.monthly_cost, // 4.99 (monthly)
|
331 |
-
quo = datas.quota, // 1000 (MB) - 5000 images (monthly/onetime)
|
332 |
-
cos = datas.cost, // 3.49 (onetime)
|
333 |
-
name = ( quo >= 1000 ? quo / 1000 + ' GB' : quo + ' MB' ),
|
334 |
-
pcs = type === 'monthly' ? { monthly: mon, yearly: Math.round( ann / 12 * 100 ) / 100 } : cos,
|
335 |
-
pcsd = pcs, // Used if discount is active.
|
336 |
-
percent, $datas_c, datas_content;
|
337 |
-
|
338 |
-
// Change pricing value only if discount in percentage is active and if offer is a monthly and not a onetime.
|
339 |
-
if ( promo.is_active && 'percentage' === promo.coupon_type && 'monthly' === type ) {
|
340 |
-
percent = ( 100 - promo.coupon_value ) / 100;
|
341 |
-
pcs = 'monthly' === type ? { monthly: mon * percent, yearly: Math.round( ( ann * percent ) / 12 * 100 ) / 100 } : cos * percent;
|
342 |
-
}
|
343 |
-
|
344 |
-
if ( typeof classes !== 'undefined' ) {
|
345 |
-
$offer.addClass( 'imagify-' + type + '-' + lab + classes);
|
346 |
-
}
|
347 |
-
|
348 |
-
// Name.
|
349 |
-
$offer.find( '.imagify-offer-size' ).text( name );
|
350 |
-
|
351 |
-
// Main prices (pcs can be an object or a string).
|
352 |
-
$offer.find( '.imagify-number-block' ).html( imagifyModal.getHtmlPrice( pcs, 'monthly' ) );
|
353 |
-
|
354 |
-
// discount prices
|
355 |
-
if ( promo.is_active && 'percentage' === promo.coupon_type && 'monthly' === type ) {
|
356 |
-
|
357 |
-
$offer.find( '.imagify-price-block' ).prev( '.imagify-price-discount' ).remove();
|
358 |
-
$offer.find( '.imagify-price-block' ).before( imagifyModal.getHtmlDiscountPrice( pcsd, 'monthly' ) );
|
359 |
-
}
|
360 |
-
|
361 |
-
// Nb images.
|
362 |
-
$offer.find( '.imagify-approx-nb' ).text( quo * 5 );
|
363 |
-
|
364 |
-
if ( 'monthly' === type ) {
|
365 |
-
// Additionnal price.
|
366 |
-
$offer.find( '.imagify-price-add-data' ).text( '$' + add );
|
367 |
-
}
|
368 |
-
|
369 |
-
// Button data-offer attr.
|
370 |
-
$datas_c = $offer.find( '.imagify-payment-btn-select-plan' ).length ? $offer.find( '.imagify-payment-btn-select-plan' ) : $offer;
|
371 |
-
|
372 |
-
if ( 'monthly' === type ) {
|
373 |
-
datas_content = '{"' + lab + '":{"id":' + id + ',"name":"' + name + '","data":' + quo + ',"dataf":"' + name + '","imgs":' + ( quo * 5 ) + ',"prices":{"monthly":' + pcs.monthly + ',"yearly":' + pcs.yearly + ',"add":' + add + '}}}';
|
374 |
-
} else {
|
375 |
-
datas_content = '{"ot' + lab + '":{"id":' + id + ',"name":"' + name + '","data":' + quo + ',"dataf":"' + name + '","imgs":' + ( quo * 5 ) + ',"price":' + pcs + '}}';
|
376 |
-
}
|
377 |
-
|
378 |
-
$datas_c.attr( 'data-offer', datas_content );
|
379 |
-
|
380 |
-
return $offer;
|
381 |
-
},
|
382 |
-
|
383 |
-
populatePayBtn: function() {
|
384 |
-
var pl_datas = JSON.parse( $( '.imagify-offer-monthly' ).attr( 'data-offer' ) ),
|
385 |
-
ot_datas = JSON.parse( $( '.imagify-offer-onetime' ).attr( 'data-offer' ) ),
|
386 |
-
price = 0,
|
387 |
-
price_pl = 0,
|
388 |
-
price_ot = 0;
|
389 |
-
|
390 |
-
// Calculate price_pl only if that offer is selected.
|
391 |
-
if ( $( '.imagify-offer-monthly' ).hasClass( 'imagify-offer-selected' ) ) {
|
392 |
-
if ( $( '#imagify-subscription-monthly' ).filter( ':checked' ).length ) {
|
393 |
-
price_pl = pl_datas[ Object.keys( pl_datas )[0] ].prices.monthly;
|
394 |
-
} else {
|
395 |
-
price_pl = pl_datas[ Object.keys( pl_datas )[0] ].prices.yearly * 12;
|
396 |
-
}
|
397 |
-
}
|
398 |
-
|
399 |
-
// Calculate price_ot only if that offer is selected.
|
400 |
-
if ( $( '.imagify-offer-onetime' ).hasClass( 'imagify-offer-selected' ) ) {
|
401 |
-
price_ot = ot_datas[ Object.keys( ot_datas )[0] ].price;
|
402 |
-
}
|
403 |
-
|
404 |
-
// Calculate price.
|
405 |
-
price = parseFloat( price_ot + price_pl ).toFixed( 2 );
|
406 |
-
|
407 |
-
// Edit button price.
|
408 |
-
//$( '.imagify-global-amount' ).text( price ); // Not used.
|
409 |
-
|
410 |
-
if ( '0.00' === price || 0 === price ) {
|
411 |
-
$( '#imagify-modal-checkout-btn' ).attr( 'disabled', 'disabled' ).addClass( 'imagify-button-disabled' );
|
412 |
-
} else {
|
413 |
-
$( '#imagify-modal-checkout-btn' ).removeAttr( 'disabled' ).removeClass( 'imagify-button-disabled' );
|
414 |
-
}
|
415 |
-
},
|
416 |
-
|
417 |
-
checkCoupon: function() {
|
418 |
-
var code = $( '#imagify-coupon-code' ).val(),
|
419 |
-
$cptext, $label, $section, nonce;
|
420 |
-
|
421 |
-
if ( '' === code ) {
|
422 |
-
return;
|
423 |
-
}
|
424 |
-
|
425 |
-
$cptext = $( '.imagify-coupon-text' );
|
426 |
-
$label = $cptext.find( 'label' );
|
427 |
-
$section = $( '.imagify-coupon-section' );
|
428 |
-
nonce = $( '#imagify-get-pricing-modal' ).data( 'nonce' );
|
429 |
-
|
430 |
-
$cptext.addClass( 'checking' );
|
431 |
-
|
432 |
-
// Get the true prices.
|
433 |
-
$.post( ajaxurl, { action: 'imagify_check_coupon', coupon: code, imagifynonce: nonce }, function( response ) {
|
434 |
-
var coupon_value;
|
435 |
-
|
436 |
-
$cptext.removeClass( 'checking' );
|
437 |
-
|
438 |
-
// Error during the request.
|
439 |
-
if ( ! response.success ) {
|
440 |
-
$section.removeClass( 'validated' ).addClass( 'invalid' );
|
441 |
-
$label.text( imagifyAdmin.labels.errorCouponAPI );
|
442 |
-
} else if ( response.data.success ) {
|
443 |
-
coupon_value = 'percentage' === response.data.coupon_type ? response.data.value + '%' : '$' + response.data.value;
|
444 |
-
$section.removeClass( 'invalid' ).addClass( 'validated' );
|
445 |
-
$label.html( imagifyAdmin.labels.successCouponAPI );
|
446 |
-
$label.find( '.imagify-coupon-offer' ).text( coupon_value );
|
447 |
-
$label.find( '.imagify-coupon-word' ).text( code );
|
448 |
-
} else {
|
449 |
-
$section.removeClass( 'validated' ).addClass( 'invalid' );
|
450 |
-
$label.text( response.data.detail );
|
451 |
-
}
|
452 |
-
} );
|
453 |
-
},
|
454 |
-
|
455 |
-
/**
|
456 |
-
* @uses imagifyModal.populateOffer()
|
457 |
-
* @uses imagifyModal.populatePayBtn()
|
458 |
-
* @uses imagifyModal.checkCoupon()
|
459 |
-
*/
|
460 |
-
getPricing: function( $button ){
|
461 |
-
var nonce = $button.data( 'nonce' ),
|
462 |
-
prices_rq_datas = {
|
463 |
-
action: 'imagify_get_prices',
|
464 |
-
imagifynonce: nonce
|
465 |
-
},
|
466 |
-
imgs_rq_datas = {
|
467 |
-
action: 'imagify_get_images_counts',
|
468 |
-
imagifynonce: nonce
|
469 |
-
},
|
470 |
-
prices_rq_discount = {
|
471 |
-
action: 'imagify_get_discount',
|
472 |
-
imagifynonce: nonce
|
473 |
-
};
|
474 |
-
|
475 |
-
imagifyModal.$modal.find( '.imagify-modal-loader' ).hide().show();
|
476 |
-
|
477 |
-
/**
|
478 |
-
* TODO: change the way to waterfall requests.
|
479 |
-
* Use setInterval + counter instead.
|
480 |
-
*/
|
481 |
-
|
482 |
-
// Get the true prices.
|
483 |
-
$.post( ajaxurl, prices_rq_datas, function( prices_response ) {
|
484 |
-
|
485 |
-
if ( ! prices_response.success ) {
|
486 |
-
// TODO: replace modal content by any information.
|
487 |
-
// An error occurred.
|
488 |
-
|
489 |
-
// Populate Pay button.
|
490 |
-
imagifyModal.populatePayBtn();
|
491 |
-
return;
|
492 |
-
}
|
493 |
-
|
494 |
-
// get the image estimates sizes
|
495 |
-
$.post( ajaxurl, imgs_rq_datas, function( imgs_response ) {
|
496 |
-
|
497 |
-
if ( ! imgs_response.success ) {
|
498 |
-
// TODO: replace modal content by any information.
|
499 |
-
// An error occurred.
|
500 |
-
return;
|
501 |
-
}
|
502 |
-
|
503 |
-
// Get the discount informations.
|
504 |
-
$.post( ajaxurl, prices_rq_discount, function( discount_response ) {
|
505 |
-
var images_datas, prices_datas, promo_datas, monthlies, onetimes,
|
506 |
-
mo_user_cons, ot_user_cons,
|
507 |
-
$mo_tpl, $ot_tpl,
|
508 |
-
ot_clone, mo_clone,
|
509 |
-
ot_html = '',
|
510 |
-
mo_html = '',
|
511 |
-
ot_suggested = false,
|
512 |
-
mo_suggested = false,
|
513 |
-
$estim_block, $offers_block,
|
514 |
-
$banners, date_end, promo, discount,
|
515 |
-
prev_offers, nb_to_remove, $total_offers,
|
516 |
-
i, j;
|
517 |
-
|
518 |
-
if ( ! discount_response.success ) {
|
519 |
-
// TODO: replace modal content by any information.
|
520 |
-
// An error occurred.
|
521 |
-
return;
|
522 |
-
}
|
523 |
-
|
524 |
-
images_datas = imgs_response.data;
|
525 |
-
prices_datas = prices_response.data;
|
526 |
-
promo_datas = discount_response.data;
|
527 |
-
monthlies = prices_datas.monthlies;
|
528 |
-
onetimes = prices_datas.onetimes;
|
529 |
-
mo_user_cons = Math.round( images_datas.average_month_size.raw / 1000000 ); // 1000000 in MB,
|
530 |
-
ot_user_cons = Math.round( images_datas.total_library_size.raw / 1000000 ); // in MB,
|
531 |
-
$mo_tpl = $( '#imagify-offer-monthly-template' );
|
532 |
-
$ot_tpl = $( '#imagify-offer-onetime-template' );
|
533 |
-
ot_clone = $ot_tpl.html();
|
534 |
-
mo_clone = $mo_tpl.html();
|
535 |
-
$estim_block = $( '.imagify-estimation-block' );
|
536 |
-
|
537 |
-
// Refresh Analyzing block.
|
538 |
-
$estim_block.removeClass( 'imagify-analyzing' );
|
539 |
-
$estim_block.find( '.average-month-size' ).text( images_datas.average_month_size.human );
|
540 |
-
$estim_block.find( '.total-library-size' ).text( images_datas.total_library_size.human );
|
541 |
-
|
542 |
-
// Switch offers title is < 25mb.
|
543 |
-
if ( mo_user_cons < 25 && ot_user_cons < 25 ) {
|
544 |
-
$( '.imagify-pre-checkout-offers .imagify-modal-title' ).addClass( 'imagify-enough-free' );
|
545 |
-
$( '.imagify-offer-selected' ).removeClass( 'imagify-offer-selected' ).find( '.imagify-checkbox' ).removeAttr( 'checked' );
|
546 |
-
} else {
|
547 |
-
$( '.imagify-enough-free' ).removeClass( 'imagify-enough-free' );
|
548 |
-
$( '.imagify-offer-selected' ).addClass( 'imagify-offer-selected' ).find( '.imagify-checkbox' ).attr( 'checked', 'checked' );
|
549 |
-
}
|
550 |
-
|
551 |
-
// Don't create prices table if something went wrong during request.
|
552 |
-
if ( null === monthlies || null === onetimes ) {
|
553 |
-
$offers_block = $( '.imagify-pre-checkout-offers' );
|
554 |
-
|
555 |
-
// Hide main content.
|
556 |
-
$offers_block.hide().attr( 'aria-hidden', true );
|
557 |
-
|
558 |
-
// Show error message.
|
559 |
-
$offers_block.closest( '.imagify-modal-views' ).find( '.imagify-popin-message' ).remove();
|
560 |
-
$offers_block.after( '<div class="imagify-popin-message imagify-error"><p>' + imagifyAdmin.labels.errorPriceAPI + '</p></div>' );
|
561 |
-
|
562 |
-
// Show the modal content.
|
563 |
-
imagifyModal.$modal.find( '.imagify-modal-loader' ).fadeOut( 300 );
|
564 |
-
return;
|
565 |
-
}
|
566 |
-
|
567 |
-
// Autofill coupon code & Show banner if discount is active.
|
568 |
-
w.imagify_discount_datas = promo_datas;
|
569 |
-
|
570 |
-
if ( promo_datas.is_active ) {
|
571 |
-
$banners = $( '.imagify-modal-promotion' );
|
572 |
-
date_end = promo_datas.date_end.split( 'T' )[0];
|
573 |
-
promo = promo_datas.coupon_value;
|
574 |
-
discount = 'percentage' === promo_datas.coupon_type ? promo + '%' : '$' + promo;
|
575 |
-
|
576 |
-
// Fill coupon code.
|
577 |
-
$( '#imagify-coupon-code' ).val( promo_datas.label ).attr( 'readonly', true );
|
578 |
-
|
579 |
-
// Show banners.
|
580 |
-
$banners.addClass( 'active' ).attr( 'aria-hidden', 'false' );
|
581 |
-
|
582 |
-
// Populate banners.
|
583 |
-
$banners.find( '.imagify-promotion-number' ).text( discount );
|
584 |
-
$banners.find( '.imagify-promotion-date' ).text( date_end );
|
585 |
-
|
586 |
-
// Auto validate coupon.
|
587 |
-
imagifyModal.checkCoupon();
|
588 |
-
}
|
589 |
-
|
590 |
-
/**
|
591 |
-
* Below lines will build Plan and Onetime offers lists.
|
592 |
-
* It will also pre-select a Plan and Onetime in both of views: pre-checkout and pricing tables.
|
593 |
-
*/
|
594 |
-
|
595 |
-
// Now, do the MONTHLIES Markup.
|
596 |
-
$.each( monthlies, function( index, value ) {
|
597 |
-
var $tpl, $offer,
|
598 |
-
classes = '';
|
599 |
-
|
600 |
-
// If it's free, don't show it.
|
601 |
-
if ( 'free' === value.label ) {
|
602 |
-
return true; // Continue-like (but $.each is not a loop... so).
|
603 |
-
}
|
604 |
-
|
605 |
-
$tpl = $( mo_clone ).clone();
|
606 |
-
|
607 |
-
// If offer is too big (far) than estimated needs, don't show the offer.
|
608 |
-
if ( false !== mo_suggested && ( index - mo_suggested ) > 2 ) {
|
609 |
-
return true;
|
610 |
-
}
|
611 |
-
|
612 |
-
// Parent classes.
|
613 |
-
if ( ( mo_user_cons < value.quota && false === mo_suggested ) ) {
|
614 |
-
classes = ' imagify-offer-selected';
|
615 |
-
mo_suggested = index;
|
616 |
-
|
617 |
-
// Add this offer as pre-selected item in pre-checkout view.
|
618 |
-
$offer = $( '.imagify-pre-checkout-offers' ).find( '.imagify-offer-monthly' );
|
619 |
-
|
620 |
-
// Populate the Pre-checkout view depending on user_cons.
|
621 |
-
imagifyModal.populateOffer( $offer, value, 'monthly' );
|
622 |
-
}
|
623 |
-
|
624 |
-
// Populate each offer.
|
625 |
-
$tpl = imagifyModal.populateOffer( $tpl, value, 'monthly', classes );
|
626 |
-
|
627 |
-
// Complete Monthlies HTML.
|
628 |
-
mo_html += $tpl[0].outerHTML;
|
629 |
-
} );
|
630 |
-
|
631 |
-
// Deal with the case of too much small offers (before recommanded one).
|
632 |
-
prev_offers = $( mo_html ).filter( '.imagify-offer-selected' ).prevAll();
|
633 |
-
|
634 |
-
// If we have more than 1 previous offer.
|
635 |
-
if ( prev_offers.length > 1 ) {
|
636 |
-
nb_to_remove = prev_offers.length - 1;
|
637 |
-
$total_offers = $( mo_html );
|
638 |
-
|
639 |
-
// Remove too far previous offer.
|
640 |
-
for ( i = 0; i < nb_to_remove; i++ ) {
|
641 |
-
delete $total_offers[ i ];
|
642 |
-
}
|
643 |
-
|
644 |
-
// Rebuild mo_html with removed items.
|
645 |
-
mo_html = '';
|
646 |
-
for ( j = 0; j < $total_offers.length; j++) {
|
647 |
-
mo_html += $( '<div/>' ).append( $total_offers[ j ] ).html();
|
648 |
-
}
|
649 |
-
}
|
650 |
-
|
651 |
-
// Do the ONETIMES Markup.
|
652 |
-
$.each( onetimes, function( index, value ) {
|
653 |
-
var $tpl = $( ot_clone ).clone(),
|
654 |
-
$offer = $( '.imagify-pre-checkout-offers' ).find( '.imagify-offer-onetime' ),
|
655 |
-
classes = '',
|
656 |
-
tvalue;
|
657 |
-
|
658 |
-
// Parent classes.
|
659 |
-
if ( ( ot_user_cons < value.quota && ot_suggested === false ) ) {
|
660 |
-
classes = ' imagify-offer-selected';
|
661 |
-
ot_suggested = true;
|
662 |
-
|
663 |
-
// Populate the Pre-checkout view depending on user_cons.
|
664 |
-
imagifyModal.populateOffer( $offer, value, 'onetime' );
|
665 |
-
}
|
666 |
-
|
667 |
-
// If too big, populate with the biggest offer available.
|
668 |
-
// TODO: create custom offers at this point.
|
669 |
-
if ( ( onetimes.length - 1 ) === index && false === ot_suggested ) {
|
670 |
-
// populate the Pre-checkout view depending on user_cons
|
671 |
-
tvalue = onetimes[ onetimes.length - 1 ];
|
672 |
-
imagifyModal.populateOffer( $offer, tvalue, 'onetime' );
|
673 |
-
}
|
674 |
-
|
675 |
-
// Populate each offer.
|
676 |
-
$tpl = imagifyModal.populateOffer( $tpl, value, 'onetime', classes );
|
677 |
-
|
678 |
-
// complete Onetimes HTML
|
679 |
-
ot_html += $tpl[0].outerHTML;
|
680 |
-
} );
|
681 |
-
|
682 |
-
// Fill pricing tables.
|
683 |
-
if ( $mo_tpl.parent().find( '.imagify-offer-line' ) ) {
|
684 |
-
$mo_tpl.parent().find( '.imagify-offer-line' ).remove();
|
685 |
-
}
|
686 |
-
|
687 |
-
$mo_tpl.before( mo_html );
|
688 |
-
|
689 |
-
if ( $ot_tpl.parent().find( '.imagify-offer-line' ) ) {
|
690 |
-
$ot_tpl.parent().find( '.imagify-offer-line' ).remove();
|
691 |
-
}
|
692 |
-
|
693 |
-
$ot_tpl.before( ot_html );
|
694 |
-
|
695 |
-
// Show the content.
|
696 |
-
imagifyModal.$modal.find( '.imagify-modal-loader' ).fadeOut( 300 );
|
697 |
-
|
698 |
-
} ); // Third AJAX request to get discount information.
|
699 |
-
|
700 |
-
} ); // Second AJAX request for image estimation sizes.
|
701 |
-
|
702 |
-
// Populate Pay button.
|
703 |
-
imagifyModal.populatePayBtn();
|
704 |
-
} ); // End $.post.
|
705 |
-
},
|
706 |
-
|
707 |
-
/**
|
708 |
-
* @uses imagifyModal.populatePayBtn()
|
709 |
-
*/
|
710 |
-
checkCheckbox: function( $checkbox ) {
|
711 |
-
var sel_class = 'imagify-offer-selected';
|
712 |
-
|
713 |
-
$checkbox.each( function() {
|
714 |
-
var $this = $( this );
|
715 |
-
|
716 |
-
if ( $this.is( ':checked' ) ) {
|
717 |
-
$this.closest( '.imagify-offer-line' ).addClass( sel_class );
|
718 |
-
} else {
|
719 |
-
$this.closest( '.imagify-offer-line' ).removeClass( sel_class );
|
720 |
-
}
|
721 |
-
} );
|
722 |
-
|
723 |
-
// Update pay button.
|
724 |
-
imagifyModal.populatePayBtn();
|
725 |
-
},
|
726 |
-
|
727 |
-
/**
|
728 |
-
* @uses imagifyModal.populatePayBtn()
|
729 |
-
*/
|
730 |
-
checkRadio: function( $radio ) {
|
731 |
-
var year_class = 'imagify-year-selected',
|
732 |
-
month_class = 'imagify-month-selected';
|
733 |
-
|
734 |
-
$radio.each( function() {
|
735 |
-
// To handle modal pricing & modal suggestion.
|
736 |
-
var $_this = $( this ),
|
737 |
-
$parent, $to_switch;
|
738 |
-
|
739 |
-
if ( $_this.parent( '.imagify-cart-list-switcher' ).length ) {
|
740 |
-
$parent = $_this.closest( '.imagify-cart' );
|
741 |
-
} else if ( $_this.parent( '.imagify-small-options' ).length ) {
|
742 |
-
$parent = $_this.parent( '.imagify-small-options' ).next( '.imagify-pricing-table' );
|
743 |
-
} else {
|
744 |
-
$parent = $_this.closest( '.imagify-offer-line' );
|
745 |
-
}
|
746 |
-
|
747 |
-
$to_switch = $parent.find( '.imagify-switch-my' );
|
748 |
-
|
749 |
-
if ( $_this.val() === 'yearly' ) {
|
750 |
-
$parent.addClass( year_class ).removeClass( month_class );
|
751 |
-
$to_switch.find( '.imagify-monthly' ).attr( 'aria-hidden', 'true' );
|
752 |
-
$to_switch.find( '.imagify-yearly' ).attr( 'aria-hidden', 'false' );
|
753 |
-
} else {
|
754 |
-
$parent.addClass( month_class ).removeClass( year_class );
|
755 |
-
$to_switch.find( '.imagify-monthly' ).attr( 'aria-hidden', 'false' );
|
756 |
-
$to_switch.find( '.imagify-yearly' ).attr( 'aria-hidden', 'true' );
|
757 |
-
}
|
758 |
-
} );
|
759 |
-
|
760 |
-
// Update Pay button information.
|
761 |
-
imagifyModal.populatePayBtn();
|
762 |
-
|
763 |
-
return $radio;
|
764 |
-
},
|
765 |
-
|
766 |
-
/**
|
767 |
-
* Currently not used.
|
768 |
-
* @uses imagifyModal.populatePayBtn()
|
769 |
-
*/
|
770 |
-
populateBtnPrice: setInterval( function() {
|
771 |
-
imagifyModal.populatePayBtn();
|
772 |
-
}, 1000 ),
|
773 |
-
|
774 |
-
/**
|
775 |
-
* 1) Modal Payment change/select plan
|
776 |
-
* 2) Checkout selection(s)
|
777 |
-
* 3) Payment process
|
778 |
-
*/
|
779 |
-
|
780 |
-
getPeriod: function() {
|
781 |
-
return $( '.imagify-offer-monthly' ).hasClass( 'imagify-month-selected' ) ? 'monthly' : 'yearly';
|
782 |
-
},
|
783 |
-
|
784 |
-
getApiKey: function() {
|
785 |
-
return $( '#imagify-payment-iframe' ).data( 'imagify-api' );
|
786 |
-
},
|
787 |
-
|
788 |
-
switchToView: function( $view, data ) {
|
789 |
-
var viewId = $view.attr( 'id' ),
|
790 |
-
$modalContent = imagifyModal.$modal.children( '.imagify-modal-content' );
|
791 |
-
|
792 |
-
$view.siblings( '.imagify-modal-views' ).hide().attr( 'aria-hidden', 'true' );
|
793 |
-
|
794 |
-
// Plans view has tabs: display the right one.
|
795 |
-
if ( data && data.tab ) {
|
796 |
-
$view.find( 'a[href="#' + data.tab + '"]' ).trigger( 'click.imagify' );
|
797 |
-
}
|
798 |
-
|
799 |
-
// Payment view: it's an iframe.
|
800 |
-
if ( 'imagify-payment-process-view' === viewId ) {
|
801 |
-
$modalContent.addClass( 'imagify-iframe-viewing' );
|
802 |
-
} else {
|
803 |
-
$modalContent.removeClass( 'imagify-iframe-viewing' );
|
804 |
-
}
|
805 |
-
|
806 |
-
// Success view: some tweaks.
|
807 |
-
if ( 'imagify-success-view' === viewId ) {
|
808 |
-
$modalContent.addClass( 'imagify-success-viewing' );
|
809 |
-
imagifyModal.$modal.attr( 'aria-labelledby', 'imagify-success-view' );
|
810 |
-
} else {
|
811 |
-
$modalContent.removeClass( 'imagify-success-viewing' );
|
812 |
-
imagifyModal.$modal.removeAttr( 'aria-labelledby' );
|
813 |
-
}
|
814 |
-
|
815 |
-
$view.fadeIn( imagifyModal.speedFadeIn ).attr( 'aria-hidden', 'false' );
|
816 |
-
},
|
817 |
-
|
818 |
-
/**
|
819 |
-
* @uses imagifyModal.getApiKey()
|
820 |
-
*/
|
821 |
-
iframeSetSrc: function( params ) {
|
822 |
-
/**
|
823 |
-
* params = {
|
824 |
-
* 'monthly': {
|
825 |
-
* 'lite': {
|
826 |
-
* name: 'something',
|
827 |
-
* id: ''
|
828 |
-
* }
|
829 |
-
* },
|
830 |
-
* 'onetime': {
|
831 |
-
* 'recommended': {
|
832 |
-
* name: 'Recommend',
|
833 |
-
* id: ''
|
834 |
-
* }
|
835 |
-
* },
|
836 |
-
* 'period': 'monthly'|'yearly'
|
837 |
-
* }
|
838 |
-
*/
|
839 |
-
|
840 |
-
var $iframe = $( '#imagify-payment-iframe' ),
|
841 |
-
iframe_src = $iframe.attr( 'src' ),
|
842 |
-
pay_src = $iframe.data( 'src' ),
|
843 |
-
monthly_id = 0,
|
844 |
-
onetime_id = 0,
|
845 |
-
// Stop it ESLint, you're drunk.
|
846 |
-
key, amount, // eslint-disable-line no-unused-vars
|
847 |
-
rt_onetime, rt_yearly, rt_monthly, coupon, rt_coupon, $iframeClone, tofind;
|
848 |
-
|
849 |
-
// If we only change monthly/yearly payment mode.
|
850 |
-
if ( typeof params === 'string' && '' !== iframe_src ) {
|
851 |
-
tofind = 'monthly' === params ? 'yearly' : 'monthly';
|
852 |
-
iframe_src = iframe_src.replace( tofind, params );
|
853 |
-
$iframe.attr( 'src', iframe_src );
|
854 |
-
return;
|
855 |
-
}
|
856 |
-
|
857 |
-
// If we get new informations about products.
|
858 |
-
if ( typeof params !== 'object' ) {
|
859 |
-
return;
|
860 |
-
}
|
861 |
-
|
862 |
-
if ( params.monthly ) {
|
863 |
-
monthly_id = params.monthly[ Object.keys( params.monthly )[0] ].id;
|
864 |
-
}
|
865 |
-
|
866 |
-
if ( params.onetime ) {
|
867 |
-
onetime_id = params.onetime[ Object.keys( params.onetime )[0] ].id;
|
868 |
-
// If onetime ID === 999 it's a custom plan, send datas instead.
|
869 |
-
onetime_id = ( onetime_id + '' === '999' ? params.onetime[ Object.keys( params.onetime )[0] ].data : onetime_id );
|
870 |
-
}
|
871 |
-
|
872 |
-
if ( ! params.period ) {
|
873 |
-
imagify.info( 'No period defined' );
|
874 |
-
return;
|
875 |
-
}
|
876 |
-
|
877 |
-
key = imagifyModal.getApiKey();
|
878 |
-
rt_onetime = onetime_id;
|
879 |
-
rt_yearly = 'yearly' === params.period ? monthly_id : 0;
|
880 |
-
rt_monthly = 'monthly' === params.period ? monthly_id : 0;
|
881 |
-
coupon = $( '#imagify-coupon-code' ).val();
|
882 |
-
rt_coupon = '' === coupon ? 'none' : coupon;
|
883 |
-
// Not used but...
|
884 |
-
amount = parseFloat( $( '.imagify-global-amount' ).text() ).toFixed( 2 );
|
885 |
-
|
886 |
-
// Compose route.
|
887 |
-
// pay_src + :ontimeplan(0)/:monthlyplan(0)/:yearlyplan(0)/:coupon(none)/
|
888 |
-
pay_src = pay_src + rt_onetime + '/' + rt_monthly + '/' + rt_yearly + '/' + rt_coupon + '/';
|
889 |
-
|
890 |
-
// iFrame sort of cache fix.
|
891 |
-
$iframeClone = $iframe.remove().attr( 'src', pay_src );
|
892 |
-
|
893 |
-
imagifyModal.$paymentView.html( $iframeClone );
|
894 |
-
},
|
895 |
-
|
896 |
-
/**
|
897 |
-
* Public function triggered by payement iframe.
|
898 |
-
*/
|
899 |
-
paymentClose: function() {
|
900 |
-
$( '.imagify-iframe-viewing .close-btn' ).trigger( 'click.imagify' );
|
901 |
-
$( '.imagify-iframe-viewing' ).removeClass( 'imagify-iframe-viewing' );
|
902 |
-
},
|
903 |
-
|
904 |
-
/**
|
905 |
-
* @uses imagifyModal.switchToView()
|
906 |
-
*/
|
907 |
-
paymentBack: function() {
|
908 |
-
imagifyModal.switchToView( imagifyModal.$preView );
|
909 |
-
},
|
910 |
-
|
911 |
-
/**
|
912 |
-
* @uses imagifyModal.switchToView()
|
913 |
-
*/
|
914 |
-
paymentSuccess: function() {
|
915 |
-
imagifyModal.switchToView( imagifyModal.$successView );
|
916 |
-
},
|
917 |
-
|
918 |
-
/**
|
919 |
-
* @uses imagifyModal.paymentClose()
|
920 |
-
* @uses imagifyModal.paymentBack()
|
921 |
-
* @uses imagifyModal.paymentSuccess()
|
922 |
-
*/
|
923 |
-
checkPluginMessage: function( e ) {
|
924 |
-
var origin = e.origin || e.originalEvent.origin;
|
925 |
-
|
926 |
-
if ( 'https://app.imagify.io' !== origin && 'http://dapp.imagify.io' !== origin ) {
|
927 |
-
return;
|
928 |
-
}
|
929 |
-
|
930 |
-
switch ( e.data ) {
|
931 |
-
case 'cancel':
|
932 |
-
imagifyModal.paymentClose();
|
933 |
-
break;
|
934 |
-
case 'back':
|
935 |
-
imagifyModal.paymentBack();
|
936 |
-
break;
|
937 |
-
case 'success':
|
938 |
-
imagifyModal.paymentSuccess();
|
939 |
-
break;
|
940 |
-
}
|
941 |
-
}
|
942 |
-
};
|
943 |
-
|
944 |
-
/**
|
945 |
-
* INIT.
|
946 |
-
*/
|
947 |
-
|
948 |
-
// Check all boxes on load.
|
949 |
-
imagifyModal.checkCheckbox( imagifyModal.$checkboxes );
|
950 |
-
imagifyModal.checkRadio( imagifyModal.$radios.filter( ':checked' ) );
|
951 |
-
|
952 |
-
// Check coupon onload.
|
953 |
-
imagifyModal.checkCoupon();
|
954 |
-
|
955 |
-
// Check the changed box.
|
956 |
-
imagifyModal.$checkboxes.on( 'change.imagify', function() {
|
957 |
-
imagifyModal.checkCheckbox( $( this ) );
|
958 |
-
} );
|
959 |
-
|
960 |
-
// Check the radio box.
|
961 |
-
imagifyModal.$radios.on( 'change.imagify', function() {
|
962 |
-
imagifyModal.checkRadio( $( this ) );
|
963 |
-
} );
|
964 |
-
|
965 |
-
/**
|
966 |
-
* Get pricings on modal opening.
|
967 |
-
* Build the pricing tables inside modal.
|
968 |
-
*/
|
969 |
-
$( '#imagify-get-pricing-modal' ).on( 'click.imagify-ajax', function() {
|
970 |
-
imagifyModal.getPricing( $( this ) );
|
971 |
-
} );
|
972 |
-
|
973 |
-
/**
|
974 |
-
* Reset the modal on close.
|
975 |
-
*/
|
976 |
-
$( d ).on( 'modalClosed.imagify', '.imagify-payment-modal', function() {
|
977 |
-
// Reset viewing class & aria-labelledby.
|
978 |
-
$( this ).find( '.imagify-modal-content' ).removeClass( 'imagify-success-viewing imagify-iframe-viewing' );
|
979 |
-
|
980 |
-
// Reset first view after fadeout ~= 300 ms.
|
981 |
-
setTimeout( function() {
|
982 |
-
$( '.imagify-modal-views' ).hide();
|
983 |
-
$( '#imagify-pre-checkout-view' ).show();
|
984 |
-
}, 300 );
|
985 |
-
} );
|
986 |
-
|
987 |
-
/**
|
988 |
-
* Get validation for Coupon Code
|
989 |
-
* - On blur
|
990 |
-
* - On Enter or Spacebar press
|
991 |
-
* - On click OK button
|
992 |
-
*
|
993 |
-
* @since 1.6.3 Only if field hasn't readonly attribute (discount auto-applied).
|
994 |
-
*/
|
995 |
-
$( '#imagify-coupon-code' ).on( 'blur.imagify', function() {
|
996 |
-
if ( ! $( this ).attr('readonly') ) {
|
997 |
-
imagifyModal.checkCoupon();
|
998 |
-
}
|
999 |
-
} ).on( 'keydown.imagify', function( e ) {
|
1000 |
-
var $this = $( this );
|
1001 |
-
|
1002 |
-
if ( $this.attr( 'readonly' ) ) {
|
1003 |
-
return;
|
1004 |
-
}
|
1005 |
-
if ( 13 === e.keyCode || 32 === e.keyCode ) {
|
1006 |
-
imagifyModal.checkCoupon();
|
1007 |
-
return false;
|
1008 |
-
}
|
1009 |
-
if ( $this.val().length >= 3 ) {
|
1010 |
-
$this.closest( '.imagify-coupon-input' ).addClass( 'imagify-canbe-validate' );
|
1011 |
-
} else {
|
1012 |
-
$this.closest( '.imagify-coupon-input' ).removeClass( 'imagify-canbe-validate' );
|
1013 |
-
}
|
1014 |
-
} );
|
1015 |
-
|
1016 |
-
$( '#imagify-coupon-validate' ).on( 'click.imagify', function() {
|
1017 |
-
imagifyModal.checkCoupon();
|
1018 |
-
$( this ).closest( '.imagify-canbe-validate' ).removeClass( 'imagify-canbe-validate' );
|
1019 |
-
} );
|
1020 |
-
|
1021 |
-
/**
|
1022 |
-
* View game, step by step.
|
1023 |
-
*/
|
1024 |
-
|
1025 |
-
// 1) when you decide to choose another plan.
|
1026 |
-
|
1027 |
-
/**
|
1028 |
-
* 1.a) on click, display choices.
|
1029 |
-
*
|
1030 |
-
* @uses imagifyModal.switchToView()
|
1031 |
-
*/
|
1032 |
-
imagifyModal.$anotherBtn.on( 'click.imagify', function( e ) {
|
1033 |
-
var type = $( this ).data( 'imagify-choose' ),
|
1034 |
-
tab = 'imagify-pricing-tab-' + ( 'plan' === type ? 'monthly' : 'onetime' );
|
1035 |
-
|
1036 |
-
e.preventDefault();
|
1037 |
-
|
1038 |
-
imagifyModal.switchToView( imagifyModal.$plansView, { tab: tab } );
|
1039 |
-
} );
|
1040 |
-
|
1041 |
-
/**
|
1042 |
-
* 1.b) on click in a choice, return to pre-checkout step.
|
1043 |
-
*
|
1044 |
-
* @uses imagifyModal.getHtmlPrice()
|
1045 |
-
* @uses imagifyModal.switchToView()
|
1046 |
-
* @uses imagifyModal.populatePayBtn()
|
1047 |
-
*/
|
1048 |
-
imagifyModal.$modal.on( 'click.imagify', '.imagify-payment-btn-select-plan', function( e ) {
|
1049 |
-
var $_this = $( this ),
|
1050 |
-
$offer_line = $_this.closest( '.imagify-offer-line' ),
|
1051 |
-
datas = $_this.data( 'offer' ),
|
1052 |
-
datas_str = $_this.attr( 'data-offer' ),
|
1053 |
-
is_onetime = $_this.closest( '.imagify-tab-content' ).attr( 'id' ) !== 'imagify-pricing-tab-monthly',
|
1054 |
-
$target_line = is_onetime ? imagifyModal.$preView.find( '.imagify-offer-onetime' ) : imagifyModal.$preView.find( '.imagify-offer-monthly' ),
|
1055 |
-
period = is_onetime ? null : ( $_this.closest( '.imagify-pricing-table' ).hasClass( 'imagify-month-selected' ) ? 'monthly' : 'yearly' ),
|
1056 |
-
price = is_onetime ? imagifyModal.getHtmlPrice( datas[ Object.keys( datas )[0] ].price ) : imagifyModal.getHtmlPrice( datas[ Object.keys( datas )[0] ].prices, period ),
|
1057 |
-
monthly_txt = is_onetime ? '' : '<span class="imagify-price-by">' + $offer_line.find( '.imagify-price-by' ).text() + '</span>',
|
1058 |
-
discount = $offer_line.find( '.imagify-price-discount' ).html(),
|
1059 |
-
imgs = $offer_line.find( '.imagify-approx-nb' ).text(),
|
1060 |
-
offer_size = $offer_line.find( '.imagify-offer-size' ).text();
|
1061 |
-
|
1062 |
-
e.preventDefault();
|
1063 |
-
|
1064 |
-
// Change views to go back pre-checkout.
|
1065 |
-
imagifyModal.switchToView( imagifyModal.$preView );
|
1066 |
-
|
1067 |
-
// Change price (+ "/month" if found in monthly plans).
|
1068 |
-
$target_line.find( '.imagify-number-block' ).html( price + monthly_txt );
|
1069 |
-
|
1070 |
-
// Change discount.
|
1071 |
-
$target_line.find( '.imagify-price-discount' ).html( discount );
|
1072 |
-
|
1073 |
-
// Change approx images nb.
|
1074 |
-
$target_line.find( '.imagify-approx-nb' ).text( imgs );
|
1075 |
-
|
1076 |
-
// Change offer size name.
|
1077 |
-
$target_line.find( '.imagify-offer-size' ).text( offer_size );
|
1078 |
-
|
1079 |
-
// Change datas (json).
|
1080 |
-
$target_line.attr( 'data-offer', datas_str );
|
1081 |
-
|
1082 |
-
if ( ! is_onetime ) {
|
1083 |
-
$target_line.find( '.imagify-price-add-data' ).text( $offer_line.find( '.imagify-price-add-data' ).text() );
|
1084 |
-
|
1085 |
-
// Trigger period selected from offer selection view to pre-checkout view.
|
1086 |
-
if ( 'monthly' === period ) {
|
1087 |
-
$target_line.find( '#imagify-subscription-monthly' ).trigger( 'click.imagify' );
|
1088 |
-
} else {
|
1089 |
-
$target_line.find( '#imagify-subscription-yearly' ).trigger( 'click.imagify' );
|
1090 |
-
}
|
1091 |
-
$target_line.find( '.imagify-inline-options' ).find( 'input:radio:checked' ).trigger( 'change.imagify' );
|
1092 |
-
}
|
1093 |
-
|
1094 |
-
// Update price information in button.
|
1095 |
-
imagifyModal.populatePayBtn();
|
1096 |
-
} );
|
1097 |
-
|
1098 |
-
/**
|
1099 |
-
* 2) when you checkout.
|
1100 |
-
*
|
1101 |
-
* @uses imagifyModal.switchToView()
|
1102 |
-
* @uses imagifyModal.getPeriod()
|
1103 |
-
* @uses imagifyModal.iframeSetSrc()
|
1104 |
-
*/
|
1105 |
-
$( '#imagify-modal-checkout-btn' ).on( 'click.imagify', function( e ) {
|
1106 |
-
var $monthly_offer, $onetime_offer, checkout_datas;
|
1107 |
-
|
1108 |
-
e.preventDefault();
|
1109 |
-
|
1110 |
-
// Do nothing if button disabled.
|
1111 |
-
if ( $( this ).hasClass( 'imagify-button-disabled' ) ) {
|
1112 |
-
return;
|
1113 |
-
}
|
1114 |
-
|
1115 |
-
$monthly_offer = $( '.imagify-offer-monthly' );
|
1116 |
-
$onetime_offer = $( '.imagify-offer-onetime' );
|
1117 |
-
checkout_datas = {};
|
1118 |
-
|
1119 |
-
// If user choose a monthly plan.
|
1120 |
-
if ( $monthly_offer.hasClass( 'imagify-offer-selected' ) ) {
|
1121 |
-
checkout_datas.monthly = JSON.parse( $monthly_offer.attr( 'data-offer' ) );
|
1122 |
-
}
|
1123 |
-
|
1124 |
-
// If user choose a one time plan.
|
1125 |
-
if ( $onetime_offer.hasClass( 'imagify-offer-selected' ) ) {
|
1126 |
-
checkout_datas.onetime = JSON.parse( $onetime_offer.attr( 'data-offer' ) );
|
1127 |
-
}
|
1128 |
-
|
1129 |
-
// Change views to go to checkout/payment view.
|
1130 |
-
imagifyModal.switchToView( imagifyModal.$paymentView );
|
1131 |
-
|
1132 |
-
checkout_datas.period = imagifyModal.getPeriod();
|
1133 |
-
|
1134 |
-
imagifyModal.iframeSetSrc( checkout_datas );
|
1135 |
-
} );
|
1136 |
-
|
1137 |
-
/**
|
1138 |
-
* Go back to previous step ("Choose Another Plan" links).
|
1139 |
-
*/
|
1140 |
-
$( '.imagify-back-to-plans' ).on( 'click.imagify', function( e ) {
|
1141 |
-
var $_this = $( this ),
|
1142 |
-
is_onetime = $_this.closest( '.imagify-cart-item' ).hasClass( 'imagify-cart-item-onetime' );
|
1143 |
-
|
1144 |
-
e.preventDefault();
|
1145 |
-
|
1146 |
-
if ( is_onetime ) {
|
1147 |
-
$( '.imagify-offer-onetime' ).find( '.imagify-choose-another-plan' ).trigger( 'click.imagify' );
|
1148 |
-
} else {
|
1149 |
-
$( '.imagify-offer-monthly' ).find( '.imagify-choose-another-plan' ).trigger( 'click.imagify' );
|
1150 |
-
}
|
1151 |
-
} );
|
1152 |
-
|
1153 |
-
// Message/communication API.
|
1154 |
-
w.addEventListener( 'message', imagifyModal.checkPluginMessage, true );
|
1155 |
-
|
1156 |
-
} )(jQuery, document, window);
|
1157 |
-
|
1158 |
-
|
1159 |
-
(function($, d, w, undefined) { // eslint-disable-line no-unused-vars, no-shadow, no-shadow-restricted-names
|
1160 |
-
|
1161 |
-
/**
|
1162 |
-
* Tabs.
|
1163 |
-
*
|
1164 |
-
* @Markup:
|
1165 |
-
* ul.imagify-tabs
|
1166 |
-
* li.imagify-tab.imagify-current
|
1167 |
-
* a[href="#target"]
|
1168 |
-
* div.imagify-tabs-contents
|
1169 |
-
* div.imagify-tab-content#target
|
1170 |
-
*/
|
1171 |
-
$( '.imagify-tab' ).on( 'click.imagify', function( e ) {
|
1172 |
-
var $_this = $( this ),
|
1173 |
-
curr_class = 'imagify-current',
|
1174 |
-
target;
|
1175 |
-
|
1176 |
-
e.preventDefault();
|
1177 |
-
|
1178 |
-
if ( $_this.hasClass( 'imagify-current' ) ) {
|
1179 |
-
return;
|
1180 |
-
}
|
1181 |
-
|
1182 |
-
target = $_this.find( 'a' ).attr( 'href' ) || '#' + $_this.find( 'a' ).attr( 'aria-controls' );
|
1183 |
-
|
1184 |
-
// Show right tab content.
|
1185 |
-
$_this.closest( '.imagify-tabs' ).next( '.imagify-tabs-contents' ).find( '.imagify-tab-content' ).hide().attr( 'aria-hidden', 'true' );
|
1186 |
-
$( target ).fadeIn( 275 ).attr( 'aria-hidden', 'false' );
|
1187 |
-
|
1188 |
-
// Change active tabs.
|
1189 |
-
$_this.closest( '.imagify-tabs' ).find( '.imagify-tab' ).removeClass( curr_class ).attr( 'aria-selected', 'false' );
|
1190 |
-
$_this.addClass( curr_class ).attr( 'aria-selected', 'true' );
|
1191 |
-
} );
|
1192 |
-
|
1193 |
-
} )(jQuery, document, window);
|
1 |
+
window.imagify = {
|
2 |
concat: ajaxurl.indexOf( '?' ) > 0 ? '&' : '?',
|
3 |
log: function( content ) {
|
4 |
if ( undefined !== console ) {
|
9 |
if ( undefined !== console ) {
|
10 |
console.info( content ); // eslint-disable-line no-console
|
11 |
}
|
12 |
+
},
|
13 |
+
openModal: function( $link ) {
|
14 |
+
var target = $link.data( 'target' ) || $link.attr( 'href' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
15 |
|
16 |
+
jQuery( target ).css( 'display', 'flex' ).hide().fadeIn( 400 ).attr( {
|
17 |
+
'aria-hidden': 'false',
|
18 |
+
'tabindex': '0'
|
19 |
+
} ).focus().removeAttr( 'tabindex' ).addClass( 'modal-is-open' );
|
20 |
|
21 |
+
jQuery( 'body' ).addClass( 'imagify-modal-is-open' );
|
22 |
+
}
|
23 |
+
};
|
24 |
|
25 |
|
26 |
// Imagify light modal =============================================================================
|
27 |
(function($, d, w, undefined) { // eslint-disable-line no-unused-vars, no-shadow, no-shadow-restricted-names
|
28 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
29 |
// Accessibility.
|
30 |
$( '.imagify-modal' ).attr( 'aria-hidden', 'true' );
|
31 |
|
32 |
$( d )
|
33 |
+
// On click on modal trigger, open modal.
|
34 |
.on( 'click.imagify', '.imagify-modal-trigger', function( e ) {
|
35 |
e.preventDefault();
|
36 |
+
w.imagify.openModal( $( this ) );
|
37 |
} )
|
38 |
+
// On click on close button, close modal.
|
39 |
.on( 'click.imagify', '.imagify-modal .close-btn', function() {
|
40 |
var $modal = $( this ).closest( '.imagify-modal' );
|
41 |
|
51 |
$modal.attr( 'tabindex', '0' ).focus().removeAttr( 'tabindex' );
|
52 |
}
|
53 |
} )
|
54 |
+
// On click on dropped layer of modal, close modal.
|
55 |
.on( 'click.imagify', '.imagify-modal', function( e ) {
|
56 |
$( e.target ).filter( '.modal-is-open' ).find( '.close-btn' ).trigger( 'click.imagify' );
|
57 |
} )
|
58 |
+
// `Esc` key binding, close modal.
|
59 |
.on( 'keydown.imagify', function( e ) {
|
60 |
if ( 27 === e.keyCode && $( '.imagify-modal.modal-is-open' ).length > 0 ) {
|
61 |
e.preventDefault();
|
65 |
} );
|
66 |
|
67 |
} )(jQuery, document, window);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
assets/js/admin.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
window.imagify=window.imagify||{concat:ajaxurl.indexOf("?")>0?"&":"?",log:function(a){void 0!==console&&console.log(a)},info:function(a){void 0!==console&&console.info(a)}},function(a,b,c,d){var e=!1;a("#wp-admin-bar-imagify").hover(function(){var b;!0!==e&&(e=!0,b=a("#wp-admin-bar-imagify-profile-content"),b.is(":empty")&&a.get(ajaxurl+imagify.concat+"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(),e=!1}))})}(jQuery,document,window),function(a,b,c,d){a("#imagify-signup").on("click.imagify",function(b){b.preventDefault(),swal({title:imagifyAdmin.labels.signupTitle,html:imagifyAdmin.labels.signupText,confirmButtonText:imagifyAdmin.labels.signupConfirmButtonText,input:"email",showLoaderOnConfirm:!0,customClass:"imagify-sweet-alert imagify-sweet-alert-signup",inputValidator:function(b){return new Promise(function(c,d){""!==a.trim(b)&&b?c():d(imagifyAdmin.labels.signupErrorEmptyEmail)})},preConfirm:function(b){return new Promise(function(c,d){setTimeout(function(){a.get(ajaxurl+imagify.concat+"action=imagify_signup&email="+b+"&imagifysignupnonce="+a("#imagifysignupnonce").val()).done(function(a){a.success?c():d(a.data)})},2e3)})}}).then(function(){swal({title:imagifyAdmin.labels.signupSuccessTitle,html:imagifyAdmin.labels.signupSuccessText,type:"success",customClass:"imagify-sweet-alert"})})}),a("#imagify-save-api-key").on("click.imagify",function(b){b.preventDefault(),swal({title:imagifyAdmin.labels.saveApiKeyTitle,html:imagifyAdmin.labels.saveApiKeyText,confirmButtonText:imagifyAdmin.labels.saveApiKeyConfirmButtonText,input:"text",showLoaderOnConfirm:!0,customClass:"imagify-sweet-alert imagify-sweet-alert-signup",inputValidator:function(b){return new Promise(function(c,d){""!==a.trim(b)&&b?c():d(imagifyAdmin.labels.ApiKeyErrorEmpty)})},preConfirm:function(b){return new Promise(function(c,d){a.get(ajaxurl+imagify.concat+"action=imagify_check_api_key_validity&api_key="+b+"&imagifycheckapikeynonce="+a("#imagifycheckapikeynonce").val()).done(function(a){a.success?c():d(a.data)})})}}).then(function(){swal({title:imagifyAdmin.labels.ApiKeyCheckSuccessTitle,html:imagifyAdmin.labels.ApiKeyCheckSuccessText,type:"success",customClass:"imagify-sweet-alert"})})}),a(".imagify-notice-dismiss").on("click.imagify",function(b){var c=a(this),d=c.parents(".imagify-welcome, .imagify-notice"),e=c.attr("href");b.preventDefault(),d.fadeTo(100,0,function(){a(this).slideUp(100,function(){a(this).remove()})}),a.get(e.replace("admin-post.php","admin-ajax.php"))})}(jQuery,document,window),function(a,b,c,d){var e=function(b){var c=b.data("target")||b.attr("href");a(c).css("display","flex").hide().fadeIn(400).attr("aria-hidden","false").attr("tabindex","0").focus().removeAttr("tabindex").addClass("modal-is-open"),a("body").addClass("imagify-modal-is-open")};a(".imagify-modal").attr("aria-hidden","true"),a(b).on("click.imagify",".imagify-modal-trigger",function(b){b.preventDefault(),e(a(this))}).on("click.imagify",".imagify-modal .close-btn",function(){a(this).closest(".imagify-modal").fadeOut(400).attr("aria-hidden","true").removeClass("modal-is-open").trigger("modalClosed.imagify"),a("body").removeClass("imagify-modal-is-open")}).on("blur.imagify",".imagify-modal .close-btn",function(){var b=a(this).closest(".imagify-modal");"false"===b.attr("aria-hidden")&&b.attr("tabindex","0").focus().removeAttr("tabindex")}).on("click.imagify",".imagify-modal",function(b){a(b.target).filter(".modal-is-open").find(".close-btn").trigger("click.imagify")}).on("keydown.imagify",function(b){27===b.keyCode&&a(".imagify-modal.modal-is-open").length>0&&(b.preventDefault(),a(".imagify-modal.modal-is-open").find(".close-btn").trigger("click.imagify"))})}(jQuery,document,window),function(a,b,c,d){var e={};a("#imagify-pricing-modal").length&&(e={$modal:a("#imagify-pricing-modal"),$checkboxes:a(".imagify-offer-line .imagify-checkbox"),$radios:a(".imagify-payment-modal .imagify-radio-line input"),$preView:a("#imagify-pre-checkout-view"),$plansView:a("#imagify-plans-selection-view").hide(),$paymentView:a("#imagify-payment-process-view").hide(),$successView:a("#imagify-success-view").hide(),$anotherBtn:a(".imagify-choose-another-plan"),speedFadeIn:300,getHtmlPrice:function(a,b){var c,d,e,f,g;return b||(b=null),"object"!=typeof a?(a+="",a=a.split("."),a[1]=1===a[1].length?a[1]+"0":(""+a[1]).substring(0,2),g='<span class="imagify-price-big">'+a[0]+"</span> ",g+='<span class="imagify-price-mini">.'+a[1]+"</span>"):(c=a.monthly+"",d=a.yearly+"",e=c.split("."),f=d.split("."),g='<span class="imagify-switch-my">',g+='<span aria-hidden="'+("monthly"===b?"false":"true")+'" class="imagify-monthly">',g+='<span class="imagify-price-big">'+e[0]+"</span> ",g+='<span class="imagify-price-mini">.'+(1===e[1].length?e[1]+"0":(""+e[1]).substring(0,2))+"</span>",g+="</span> ",g+='<span aria-hidden="'+("yearly"===b?"false":"true")+'" class="imagify-yearly">',g+='<span class="imagify-price-big">'+f[0]+"</span> ",g+='<span class="imagify-price-mini">.'+(1===f[1].length?f[1]+"0":(""+f[1]).substring(0,2))+"</span>",g+="</span>",g+="</span>")},getHtmlDiscountPrice:function(a,b){var c,d,e="";return b||(b=null),"object"==typeof a?(c=a.monthly+"",d=a.yearly+"",e+='<span class="imagify-price-discount">',e+='<span class="imagify-price-discount-dollar">$</span>',e+='<span class="imagify-switch-my">',e+='<span aria-hidden="'+("monthly"===b?"false":"true")+'" class="imagify-monthly">',e+='<span class="imagify-price-discount-number">'+c+"</span>",e+="</span>",e+='<span aria-hidden="'+("yearly"===b?"false":"true")+'" class="imagify-yearly">',e+='<span class="imagify-price-discount-number">'+d+"</span>",e+="</span>",e+="</span>",e+="</span>"):(a+="",e+='<span class="imagify-price-discount">',e+='<span class="imagify-price-discount-dollar">$</span>',e+='<span class="imagify-price-discount-number">'+a+"</span>",e+="</span>"),e},populateOffer:function(a,b,d,f){var g,h,i,j=c.imagify_discount_datas,k=b.additional_gb,l=b.annual_cost,m=b.id,n=b.label,o=b.monthly_cost,p=b.quota,q=b.cost,r=p>=1e3?p/1e3+" GB":p+" MB",s="monthly"===d?{monthly:o,yearly:Math.round(l/12*100)/100}:q,t=s;return j.is_active&&"percentage"===j.coupon_type&&"monthly"===d&&(g=(100-j.coupon_value)/100,s="monthly"===d?{monthly:o*g,yearly:Math.round(l*g/12*100)/100}:q*g),void 0!==f&&a.addClass("imagify-"+d+"-"+n+f),a.find(".imagify-offer-size").text(r),a.find(".imagify-number-block").html(e.getHtmlPrice(s,"monthly")),j.is_active&&"percentage"===j.coupon_type&&"monthly"===d&&(a.find(".imagify-price-block").prev(".imagify-price-discount").remove(),a.find(".imagify-price-block").before(e.getHtmlDiscountPrice(t,"monthly"))),a.find(".imagify-approx-nb").text(5*p),"monthly"===d&&a.find(".imagify-price-add-data").text("$"+k),h=a.find(".imagify-payment-btn-select-plan").length?a.find(".imagify-payment-btn-select-plan"):a,i="monthly"===d?'{"'+n+'":{"id":'+m+',"name":"'+r+'","data":'+p+',"dataf":"'+r+'","imgs":'+5*p+',"prices":{"monthly":'+s.monthly+',"yearly":'+s.yearly+',"add":'+k+"}}}":'{"ot'+n+'":{"id":'+m+',"name":"'+r+'","data":'+p+',"dataf":"'+r+'","imgs":'+5*p+',"price":'+s+"}}",h.attr("data-offer",i),a},populatePayBtn:function(){var b=JSON.parse(a(".imagify-offer-monthly").attr("data-offer")),c=JSON.parse(a(".imagify-offer-onetime").attr("data-offer")),d=0,e=0,f=0;a(".imagify-offer-monthly").hasClass("imagify-offer-selected")&&(e=a("#imagify-subscription-monthly").filter(":checked").length?b[Object.keys(b)[0]].prices.monthly:12*b[Object.keys(b)[0]].prices.yearly),a(".imagify-offer-onetime").hasClass("imagify-offer-selected")&&(f=c[Object.keys(c)[0]].price),d=parseFloat(f+e).toFixed(2),"0.00"===d||0===d?a("#imagify-modal-checkout-btn").attr("disabled","disabled").addClass("imagify-button-disabled"):a("#imagify-modal-checkout-btn").removeAttr("disabled").removeClass("imagify-button-disabled")},checkCoupon:function(){var b,c,d,e,f=a("#imagify-coupon-code").val();""!==f&&(b=a(".imagify-coupon-text"),c=b.find("label"),d=a(".imagify-coupon-section"),e=a("#imagify-get-pricing-modal").data("nonce"),b.addClass("checking"),a.post(ajaxurl,{action:"imagify_check_coupon",coupon:f,imagifynonce:e},function(a){var e;b.removeClass("checking"),a.success?a.data.success?(e="percentage"===a.data.coupon_type?a.data.value+"%":"$"+a.data.value,d.removeClass("invalid").addClass("validated"),c.html(imagifyAdmin.labels.successCouponAPI),c.find(".imagify-coupon-offer").text(e),c.find(".imagify-coupon-word").text(f)):(d.removeClass("validated").addClass("invalid"),c.text(a.data.detail)):(d.removeClass("validated").addClass("invalid"),c.text(imagifyAdmin.labels.errorCouponAPI))}))},getPricing:function(b){var d=b.data("nonce"),f={action:"imagify_get_prices",imagifynonce:d},g={action:"imagify_get_images_counts",imagifynonce:d},h={action:"imagify_get_discount",imagifynonce:d};e.$modal.find(".imagify-modal-loader").hide().show(),a.post(ajaxurl,f,function(b){if(!b.success)return void e.populatePayBtn();a.post(ajaxurl,g,function(d){d.success&&a.post(ajaxurl,h,function(f){var g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C="",D="",E=!1,F=!1;if(f.success){if(g=d.data,h=b.data,i=f.data,j=h.monthlies,k=h.onetimes,l=Math.round(g.average_month_size.raw/1e6),m=Math.round(g.total_library_size.raw/1e6),n=a("#imagify-offer-monthly-template"),o=a("#imagify-offer-onetime-template"),p=o.html(),q=n.html(),r=a(".imagify-estimation-block"),r.removeClass("imagify-analyzing"),r.find(".average-month-size").text(g.average_month_size.human),r.find(".total-library-size").text(g.total_library_size.human),l<25&&m<25?(a(".imagify-pre-checkout-offers .imagify-modal-title").addClass("imagify-enough-free"),a(".imagify-offer-selected").removeClass("imagify-offer-selected").find(".imagify-checkbox").removeAttr("checked")):(a(".imagify-enough-free").removeClass("imagify-enough-free"),a(".imagify-offer-selected").addClass("imagify-offer-selected").find(".imagify-checkbox").attr("checked","checked")),null===j||null===k)return s=a(".imagify-pre-checkout-offers"),s.hide().attr("aria-hidden",!0),s.closest(".imagify-modal-views").find(".imagify-popin-message").remove(),s.after('<div class="imagify-popin-message imagify-error"><p>'+imagifyAdmin.labels.errorPriceAPI+"</p></div>"),void e.$modal.find(".imagify-modal-loader").fadeOut(300);if(c.imagify_discount_datas=i,i.is_active&&(t=a(".imagify-modal-promotion"),u=i.date_end.split("T")[0],v=i.coupon_value,w="percentage"===i.coupon_type?v+"%":"$"+v,a("#imagify-coupon-code").val(i.label).attr("readonly",!0),t.addClass("active").attr("aria-hidden","false"),t.find(".imagify-promotion-number").text(w),t.find(".imagify-promotion-date").text(u),e.checkCoupon()),a.each(j,function(b,c){var d,f,g="";return"free"===c.label||(d=a(q).clone(),!1!==F&&b-F>2||(l<c.quota&&!1===F&&(g=" imagify-offer-selected",F=b,f=a(".imagify-pre-checkout-offers").find(".imagify-offer-monthly"),e.populateOffer(f,c,"monthly")),d=e.populateOffer(d,c,"monthly",g),void(D+=d[0].outerHTML)))}),x=a(D).filter(".imagify-offer-selected").prevAll(),x.length>1){for(y=x.length-1,z=a(D),A=0;A<y;A++)delete z[A];for(D="",B=0;B<z.length;B++)D+=a("<div/>").append(z[B]).html()}a.each(k,function(b,c){var d,f=a(p).clone(),g=a(".imagify-pre-checkout-offers").find(".imagify-offer-onetime"),h="";m<c.quota&&!1===E&&(h=" imagify-offer-selected",E=!0,e.populateOffer(g,c,"onetime")),k.length-1===b&&!1===E&&(d=k[k.length-1],e.populateOffer(g,d,"onetime")),f=e.populateOffer(f,c,"onetime",h),C+=f[0].outerHTML}),n.parent().find(".imagify-offer-line")&&n.parent().find(".imagify-offer-line").remove(),n.before(D),o.parent().find(".imagify-offer-line")&&o.parent().find(".imagify-offer-line").remove(),o.before(C),e.$modal.find(".imagify-modal-loader").fadeOut(300)}})}),e.populatePayBtn()})},checkCheckbox:function(b){b.each(function(){var b=a(this);b.is(":checked")?b.closest(".imagify-offer-line").addClass("imagify-offer-selected"):b.closest(".imagify-offer-line").removeClass("imagify-offer-selected")}),e.populatePayBtn()},checkRadio:function(b){return b.each(function(){var b,c,d=a(this);b=d.parent(".imagify-cart-list-switcher").length?d.closest(".imagify-cart"):d.parent(".imagify-small-options").length?d.parent(".imagify-small-options").next(".imagify-pricing-table"):d.closest(".imagify-offer-line"),c=b.find(".imagify-switch-my"),"yearly"===d.val()?(b.addClass("imagify-year-selected").removeClass("imagify-month-selected"),c.find(".imagify-monthly").attr("aria-hidden","true"),c.find(".imagify-yearly").attr("aria-hidden","false")):(b.addClass("imagify-month-selected").removeClass("imagify-year-selected"),c.find(".imagify-monthly").attr("aria-hidden","false"),c.find(".imagify-yearly").attr("aria-hidden","true"))}),e.populatePayBtn(),b},populateBtnPrice:setInterval(function(){e.populatePayBtn()},1e3),getPeriod:function(){return a(".imagify-offer-monthly").hasClass("imagify-month-selected")?"monthly":"yearly"},getApiKey:function(){return a("#imagify-payment-iframe").data("imagify-api")},switchToView:function(a,b){var c=a.attr("id"),d=e.$modal.children(".imagify-modal-content");a.siblings(".imagify-modal-views").hide().attr("aria-hidden","true"),b&&b.tab&&a.find('a[href="#'+b.tab+'"]').trigger("click.imagify"),"imagify-payment-process-view"===c?d.addClass("imagify-iframe-viewing"):d.removeClass("imagify-iframe-viewing"),"imagify-success-view"===c?(d.addClass("imagify-success-viewing"),e.$modal.attr("aria-labelledby","imagify-success-view")):(d.removeClass("imagify-success-viewing"),e.$modal.removeAttr("aria-labelledby")),a.fadeIn(e.speedFadeIn).attr("aria-hidden","false")},iframeSetSrc:function(b){var c,d,f,g,h,i,j,k=a("#imagify-payment-iframe"),l=k.attr("src"),m=k.data("src"),n=0,o=0;if("string"==typeof b&&""!==l)return j="monthly"===b?"yearly":"monthly",l=l.replace(j,b),void k.attr("src",l);if("object"==typeof b){if(b.monthly&&(n=b.monthly[Object.keys(b.monthly)[0]].id),b.onetime&&(o=b.onetime[Object.keys(b.onetime)[0]].id,o=o+""=="999"?b.onetime[Object.keys(b.onetime)[0]].data:o),!b.period)return void imagify.info("No period defined");e.getApiKey(),c=o,d="yearly"===b.period?n:0,f="monthly"===b.period?n:0,g=a("#imagify-coupon-code").val(),h=""===g?"none":g,parseFloat(a(".imagify-global-amount").text()).toFixed(2),m=m+c+"/"+f+"/"+d+"/"+h+"/",i=k.remove().attr("src",m),e.$paymentView.html(i)}},paymentClose:function(){a(".imagify-iframe-viewing .close-btn").trigger("click.imagify"),a(".imagify-iframe-viewing").removeClass("imagify-iframe-viewing")},paymentBack:function(){e.switchToView(e.$preView)},paymentSuccess:function(){e.switchToView(e.$successView)},checkPluginMessage:function(a){var b=a.origin||a.originalEvent.origin;if("https://app.imagify.io"===b||"http://dapp.imagify.io"===b)switch(a.data){case"cancel":e.paymentClose();break;case"back":e.paymentBack();break;case"success":e.paymentSuccess()}}},e.checkCheckbox(e.$checkboxes),e.checkRadio(e.$radios.filter(":checked")),e.checkCoupon(),e.$checkboxes.on("change.imagify",function(){e.checkCheckbox(a(this))}),e.$radios.on("change.imagify",function(){e.checkRadio(a(this))}),a("#imagify-get-pricing-modal").on("click.imagify-ajax",function(){e.getPricing(a(this))}),a(b).on("modalClosed.imagify",".imagify-payment-modal",function(){a(this).find(".imagify-modal-content").removeClass("imagify-success-viewing imagify-iframe-viewing"),setTimeout(function(){a(".imagify-modal-views").hide(),a("#imagify-pre-checkout-view").show()},300)}),a("#imagify-coupon-code").on("blur.imagify",function(){a(this).attr("readonly")||e.checkCoupon()}).on("keydown.imagify",function(b){var c=a(this);if(!c.attr("readonly"))return 13===b.keyCode||32===b.keyCode?(e.checkCoupon(),!1):void(c.val().length>=3?c.closest(".imagify-coupon-input").addClass("imagify-canbe-validate"):c.closest(".imagify-coupon-input").removeClass("imagify-canbe-validate"))}),a("#imagify-coupon-validate").on("click.imagify",function(){e.checkCoupon(),a(this).closest(".imagify-canbe-validate").removeClass("imagify-canbe-validate")}),e.$anotherBtn.on("click.imagify",function(b){var c=a(this).data("imagify-choose"),d="imagify-pricing-tab-"+("plan"===c?"monthly":"onetime");b.preventDefault(),e.switchToView(e.$plansView,{tab:d})}),e.$modal.on("click.imagify",".imagify-payment-btn-select-plan",function(b){var c=a(this),d=c.closest(".imagify-offer-line"),f=c.data("offer"),g=c.attr("data-offer"),h="imagify-pricing-tab-monthly"!==c.closest(".imagify-tab-content").attr("id"),i=h?e.$preView.find(".imagify-offer-onetime"):e.$preView.find(".imagify-offer-monthly"),j=h?null:c.closest(".imagify-pricing-table").hasClass("imagify-month-selected")?"monthly":"yearly",k=h?e.getHtmlPrice(f[Object.keys(f)[0]].price):e.getHtmlPrice(f[Object.keys(f)[0]].prices,j),l=h?"":'<span class="imagify-price-by">'+d.find(".imagify-price-by").text()+"</span>",m=d.find(".imagify-price-discount").html(),n=d.find(".imagify-approx-nb").text(),o=d.find(".imagify-offer-size").text();b.preventDefault(),e.switchToView(e.$preView),i.find(".imagify-number-block").html(k+l),i.find(".imagify-price-discount").html(m),i.find(".imagify-approx-nb").text(n),i.find(".imagify-offer-size").text(o),i.attr("data-offer",g),h||(i.find(".imagify-price-add-data").text(d.find(".imagify-price-add-data").text()),"monthly"===j?i.find("#imagify-subscription-monthly").trigger("click.imagify"):i.find("#imagify-subscription-yearly").trigger("click.imagify"),i.find(".imagify-inline-options").find("input:radio:checked").trigger("change.imagify")),e.populatePayBtn()}),a("#imagify-modal-checkout-btn").on("click.imagify",function(b){var c,d,f;b.preventDefault(),a(this).hasClass("imagify-button-disabled")||(c=a(".imagify-offer-monthly"),d=a(".imagify-offer-onetime"),f={},c.hasClass("imagify-offer-selected")&&(f.monthly=JSON.parse(c.attr("data-offer"))),d.hasClass("imagify-offer-selected")&&(f.onetime=JSON.parse(d.attr("data-offer"))),e.switchToView(e.$paymentView),f.period=e.getPeriod(),e.iframeSetSrc(f))}),a(".imagify-back-to-plans").on("click.imagify",function(b){var c=a(this),d=c.closest(".imagify-cart-item").hasClass("imagify-cart-item-onetime");b.preventDefault(),d?a(".imagify-offer-onetime").find(".imagify-choose-another-plan").trigger("click.imagify"):a(".imagify-offer-monthly").find(".imagify-choose-another-plan").trigger("click.imagify")}),c.addEventListener("message",e.checkPluginMessage,!0))}(jQuery,document,window),function(a,b,c,d){a(".imagify-tab").on("click.imagify",function(b){var c,d=a(this);b.preventDefault(),d.hasClass("imagify-current")||(c=d.find("a").attr("href")||"#"+d.find("a").attr("aria-controls"),d.closest(".imagify-tabs").next(".imagify-tabs-contents").find(".imagify-tab-content").hide().attr("aria-hidden","true"),a(c).fadeIn(275).attr("aria-hidden","false"),d.closest(".imagify-tabs").find(".imagify-tab").removeClass("imagify-current").attr("aria-selected","false"),d.addClass("imagify-current").attr("aria-selected","true"))})}(jQuery,document,window);
|
1 |
+
window.imagify={concat:ajaxurl.indexOf("?")>0?"&":"?",log:function(a){void 0!==console&&console.log(a)},info:function(a){void 0!==console&&console.info(a)},openModal:function(a){var b=a.data("target")||a.attr("href");jQuery(b).css("display","flex").hide().fadeIn(400).attr({"aria-hidden":"false",tabindex:"0"}).focus().removeAttr("tabindex").addClass("modal-is-open"),jQuery("body").addClass("imagify-modal-is-open")}},function(a,b,c,d){a(".imagify-modal").attr("aria-hidden","true"),a(b).on("click.imagify",".imagify-modal-trigger",function(b){b.preventDefault(),c.imagify.openModal(a(this))}).on("click.imagify",".imagify-modal .close-btn",function(){a(this).closest(".imagify-modal").fadeOut(400).attr("aria-hidden","true").removeClass("modal-is-open").trigger("modalClosed.imagify"),a("body").removeClass("imagify-modal-is-open")}).on("blur.imagify",".imagify-modal .close-btn",function(){var b=a(this).closest(".imagify-modal");"false"===b.attr("aria-hidden")&&b.attr("tabindex","0").focus().removeAttr("tabindex")}).on("click.imagify",".imagify-modal",function(b){a(b.target).filter(".modal-is-open").find(".close-btn").trigger("click.imagify")}).on("keydown.imagify",function(b){27===b.keyCode&&a(".imagify-modal.modal-is-open").length>0&&(b.preventDefault(),a(".imagify-modal.modal-is-open").find(".close-btn").trigger("click.imagify"))})}(jQuery,document,window);
|
assets/js/bulk.js
CHANGED
@@ -1,34 +1,20 @@
|
|
1 |
-
window.imagify = window.imagify || {
|
2 |
-
concat: ajaxurl.indexOf( '?' ) > 0 ? '&' : '?',
|
3 |
-
log: function( content ) {
|
4 |
-
if ( undefined !== console ) {
|
5 |
-
console.log( content ); // eslint-disable-line no-console
|
6 |
-
}
|
7 |
-
},
|
8 |
-
info: function( content ) {
|
9 |
-
if ( undefined !== console ) {
|
10 |
-
console.info( content ); // eslint-disable-line no-console
|
11 |
-
}
|
12 |
-
}
|
13 |
-
};
|
14 |
-
|
15 |
(function($, d, w, undefined) { // eslint-disable-line no-unused-vars, no-shadow, no-shadow-restricted-names
|
16 |
var overviewCanvas = d.getElementById( 'imagify-overview-chart' ),
|
17 |
overviewData = [
|
18 |
{
|
19 |
-
value: imagifyBulk.
|
20 |
color: '#D9E4EB',
|
21 |
highlight: '#D9E4EB',
|
22 |
label: imagifyBulk.labels.overviewChartLabels.unoptimized
|
23 |
},
|
24 |
{
|
25 |
-
value: imagifyBulk.
|
26 |
color: '#46B1CE',
|
27 |
highlight: '#46B1CE',
|
28 |
label: imagifyBulk.labels.overviewChartLabels.optimized
|
29 |
},
|
30 |
{
|
31 |
-
value: imagifyBulk.
|
32 |
color: '#2E3242',
|
33 |
highlight: '#2E3242',
|
34 |
label: imagifyBulk.labels.overviewChartLabels.error
|
@@ -129,7 +115,7 @@ window.imagify = window.imagify || {
|
|
129 |
|
130 |
// Heartbeat.
|
131 |
$( d ).on( 'heartbeat-send', function( e, data ) {
|
132 |
-
data.imagify_heartbeat = imagifyBulk.
|
133 |
} );
|
134 |
|
135 |
// Listen for the custom event "heartbeat-tick" on $(document).
|
@@ -208,10 +194,10 @@ window.imagify = window.imagify || {
|
|
208 |
title: imagifyBulk.labels.waitTitle,
|
209 |
html: imagifyBulk.labels.waitText,
|
210 |
showConfirmButton: false,
|
211 |
-
imageUrl: imagifyBulk.
|
212 |
} );
|
213 |
|
214 |
-
$.get( ajaxurl + imagify.concat + 'action=' + imagifyBulk.
|
215 |
.done( function( response ) {
|
216 |
var swal_title = '',
|
217 |
swal_text = '',
|
@@ -258,10 +244,10 @@ window.imagify = window.imagify || {
|
|
258 |
|
259 |
table = $( '.imagify-bulk-table table tbody' );
|
260 |
Optimizer = new ImagifyGulp( {
|
261 |
-
'buffer_size': imagifyBulk.
|
262 |
-
'lib': ajaxurl + imagify.concat + 'action=imagify_bulk_upload&imagifybulkuploadnonce=' + $( '#imagifybulkuploadnonce' ).val(),
|
263 |
'images': response.data,
|
264 |
-
'context': imagifyBulk.
|
265 |
} );
|
266 |
|
267 |
// Before the attachment optimization.
|
@@ -368,7 +354,7 @@ window.imagify = window.imagify || {
|
|
368 |
stopOptimization = 0;
|
369 |
} )
|
370 |
.error( function( id ) {
|
371 |
-
imagify.log( "Can't optimize image with id " + id + "." );
|
372 |
} )
|
373 |
.run();
|
374 |
} )
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
(function($, d, w, undefined) { // eslint-disable-line no-unused-vars, no-shadow, no-shadow-restricted-names
|
2 |
var overviewCanvas = d.getElementById( 'imagify-overview-chart' ),
|
3 |
overviewData = [
|
4 |
{
|
5 |
+
value: imagifyBulk.totalUnoptimizedAttachments,
|
6 |
color: '#D9E4EB',
|
7 |
highlight: '#D9E4EB',
|
8 |
label: imagifyBulk.labels.overviewChartLabels.unoptimized
|
9 |
},
|
10 |
{
|
11 |
+
value: imagifyBulk.totalOptimizedAttachments,
|
12 |
color: '#46B1CE',
|
13 |
highlight: '#46B1CE',
|
14 |
label: imagifyBulk.labels.overviewChartLabels.optimized
|
15 |
},
|
16 |
{
|
17 |
+
value: imagifyBulk.totalErrorsAttachments,
|
18 |
color: '#2E3242',
|
19 |
highlight: '#2E3242',
|
20 |
label: imagifyBulk.labels.overviewChartLabels.error
|
115 |
|
116 |
// Heartbeat.
|
117 |
$( d ).on( 'heartbeat-send', function( e, data ) {
|
118 |
+
data.imagify_heartbeat = imagifyBulk.heartbeatId;
|
119 |
} );
|
120 |
|
121 |
// Listen for the custom event "heartbeat-tick" on $(document).
|
194 |
title: imagifyBulk.labels.waitTitle,
|
195 |
html: imagifyBulk.labels.waitText,
|
196 |
showConfirmButton: false,
|
197 |
+
imageUrl: imagifyBulk.waitImageUrl
|
198 |
} );
|
199 |
|
200 |
+
$.get( ajaxurl + w.imagify.concat + 'action=' + imagifyBulk.ajaxAction + '&optimization_level=' + optimizationLevel + '&imagifybulkuploadnonce=' + $( '#imagifybulkuploadnonce' ).val() )
|
201 |
.done( function( response ) {
|
202 |
var swal_title = '',
|
203 |
swal_text = '',
|
244 |
|
245 |
table = $( '.imagify-bulk-table table tbody' );
|
246 |
Optimizer = new ImagifyGulp( {
|
247 |
+
'buffer_size': imagifyBulk.bufferSize,
|
248 |
+
'lib': ajaxurl + w.imagify.concat + 'action=imagify_bulk_upload&imagifybulkuploadnonce=' + $( '#imagifybulkuploadnonce' ).val(),
|
249 |
'images': response.data,
|
250 |
+
'context': imagifyBulk.ajaxContext
|
251 |
} );
|
252 |
|
253 |
// Before the attachment optimization.
|
354 |
stopOptimization = 0;
|
355 |
} )
|
356 |
.error( function( id ) {
|
357 |
+
w.imagify.log( "Can't optimize image with id " + id + "." );
|
358 |
} )
|
359 |
.run();
|
360 |
} )
|
assets/js/bulk.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
|
1 |
+
!function(a,b,c,d){function e(b){b.each(function(){var b=a(this),c=parseInt(b.closest(".imagify-chart").next(".imagipercent").text(),10),d=[{value:c,color:"#00B3D3"},{value:100-c,color:"#D8D8D8"}];new Chart(b[0].getContext("2d")).Doughnut(d,{segmentStrokeColor:"#FFF",segmentStrokeWidth:1,animateRotate:!0,tooltipEvents:[]})})}function f(b){b.each(function(){var b=a(this),c=parseInt(b.closest(".imagify-ac-chart").attr("data-percent"),10),d=[{value:c,color:"#40B1D0"},{value:100-c,color:"#FFFFFF"}];new Chart(b[0].getContext("2d")).Doughnut(d,{segmentStrokeColor:"transparent",segmentStrokeWidth:0,animateRotate:!0,animation:!0,percentageInnerCutout:70,tooltipEvents:[]})})}var g,h,i=b.getElementById("imagify-overview-chart"),j=[{value:imagifyBulk.totalUnoptimizedAttachments,color:"#D9E4EB",highlight:"#D9E4EB",label:imagifyBulk.labels.overviewChartLabels.unoptimized},{value:imagifyBulk.totalOptimizedAttachments,color:"#46B1CE",highlight:"#46B1CE",label:imagifyBulk.labels.overviewChartLabels.optimized},{value:imagifyBulk.totalErrorsAttachments,color:"#2E3242",highlight:"#2E3242",label:imagifyBulk.labels.overviewChartLabels.error}];i&&(g=new Chart(i.getContext("2d")).Doughnut(j,{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>',tooltipTemplate:"<%= value %>"}),h='<ul class="imagify-doughnut-legend">',a(j).each(function(a){h+='<li><span style="background-color:'+j[a].color+'"></span>'+j[a].label+"</li>"}),h+="</ul>",b.getElementById("imagify-overview-chart-legend").innerHTML=h),a(b).on("heartbeat-send",function(a,b){b.imagify_heartbeat=imagifyBulk.heartbeatId}),a(b).on("heartbeat-tick",function(b,c){var d;c.imagify_bulk_data&&(c=c.imagify_bulk_data,d=g.segments,c.unoptimized_attachments===d[0].value&&c.optimized_attachments===d[1].value&&c.errors_attachments===d[2].value||(a("#imagify-overview-chart-percent").html(c.optimized_attachments_percent+"<span>%</span>"),a(".imagify-total-percent").html(c.optimized_attachments_percent+"%"),a(".imagify-unconsumed-percent").html(c.unconsumed_quota+"%"),a(".imagify-unconsumed-bar").css("width",c.unconsumed_quota+"%"),a("#imagify-total-optimized-attachments").html(c.already_optimized_attachments),a("#imagify-original-bar").find(".imagify-barnb").html(c.original_human),a("#imagify-optimized-bar").css("width",c.optimized_percent+"%").find(".imagify-barnb").html(c.optimized_human),a("#imagify-total-optimized-attachments-pct").html(c.optimized_percent+"%"),g.segments[0].value=c.unoptimized_attachments,g.segments[1].value=c.optimized_attachments,g.segments[2].value=c.errors_attachments,g.update()))}),a("#imagify-simulate-bulk-action").on("click",function(b){b.preventDefault(),a("#imagify-bulk-action").trigger("click")}),a("#imagify-bulk-action").on("click",function(b){var d,g=a(this),h=a('[name="optimization_level"]:checked').val();b.preventDefault(),void 0===h&&(h=-1),g.attr("disabled")||(g.attr("disabled","disabled"),g.find(".dashicons").addClass("rotate"),d=function(){return imagifyBulk.labels.processing},a(c).on("beforeunload",d),swal({title:imagifyBulk.labels.waitTitle,html:imagifyBulk.labels.waitText,showConfirmButton:!1,imageUrl:imagifyBulk.waitImageUrl}),a.get(ajaxurl+c.imagify.concat+"action="+imagifyBulk.ajaxAction+"&optimization_level="+h+"&imagifybulkuploadnonce="+a("#imagifybulkuploadnonce").val()).done(function(b){var h,i,j="",k="",l=0,m=0,n=0,o=0,p=0,q=0;if(!b.success)return g.removeAttr("disabled"),g.find(".dashicons").removeClass("rotate"),a(c).off("beforeunload",d),"invalid-api-key"===b.data.message?j=imagifyBulk.labels.invalidAPIKeyTitle:"over-quota"===b.data.message?(j=imagifyBulk.labels.overQuotaTitle,k=imagifyBulk.labels.overQuotaText):"no-images"===b.data.message&&(j=imagifyBulk.labels.noAttachmentToOptimizeTitle,k=imagifyBulk.labels.noAttachmentToOptimizeText),void swal({title:j,html:k,type:"info",customClass:"imagify-sweet-alert"});swal.close(),a(".imagify-row-progress").slideDown(),a(".imagify-no-uploaded-yet, .imagify-row-complete").hide(200),i=a(".imagify-bulk-table table tbody"),h=new ImagifyGulp({buffer_size:imagifyBulk.bufferSize,lib:ajaxurl+c.imagify.concat+"action=imagify_bulk_upload&imagifybulkuploadnonce="+a("#imagifybulkuploadnonce").val(),images:b.data,context:imagifyBulk.ajaxContext}),h.before(function(a){i.find(".imagify-row-progress").after('<tr id="attachment-'+a.id+'"><td class="imagify-cell-filename"><span class="imagiuploaded"><img src="'+a.thumbnail+'" alt=""/></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>'+imagifyBulk.labels.optimizing+'<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=a("#imagify-progress-bar"),d="error",f="dismiss",g=imagifyBulk.labels.error,i=a("#attachment-"+b.image);if(c.css({width:b.progress+"%"}),c.find(".percent").html(b.progress+"%"),b.success)return++q,i.find(".imagify-cell-status").html('<span class="imagistatus status-complete"><span class="dashicons dashicons-yes"></span>'+imagifyBulk.labels.complete+"</span>"),i.find(".imagify-cell-original").html(b.original_size_human),i.find(".imagify-cell-optimized").html(b.new_size_human),i.find(".imagify-cell-percentage").html('<span class="imagify-chart"><span class="imagify-chart-container"><canvas height="18" width="18" id="imagify-consumption-chart-'+b.image+"-"+q+'" style="width: 18px; height: 18px;"></canvas></span></span><span class="imagipercent">'+b.percent+"</span>%"),e(i.find(".imagify-cell-percentage canvas")),i.find(".imagify-cell-thumbnails").html(b.thumbnails),i.find(".imagify-cell-savings").html(h.humanSize(b.overall_saving,1)),l=l+b.thumbnails+1,a(".imagify-cell-nb-files").html(imagifyBulk.labels.nbrFiles.replace("%s",l)),o+=b.original_overall_size,a(".imagify-total-original").html(h.humanSize(o,1)),p+=b.overall_saving,void a(".imagify-total-gain").html(h.humanSize(p,1));!n&&b.error.indexOf("You've consumed all your data")>=0&&(n=1,h.stopProcess(),swal({title:imagifyBulk.labels.overQuotaTitle,html:imagifyBulk.labels.overQuotaText,type:"error",customClass:"imagify-sweet-alert"}).then(function(){location.reload()})),b.error.indexOf("This image is already compressed")>=0?(d="warning",f="warning",g=imagifyBulk.labels.notice):(m++,a(".imagify-cell-errors").html(imagifyBulk.labels.nbrErrors.replace("%s",m))),i.after('<tr><td colspan="7"><span class="status-'+d+'">'+b.error+"</span></td></tr>"),i.find(".imagify-cell-status").html('<span class="imagistatus status-'+d+'"><span class="dashicons dashicons-'+f+'"></span>'+g+"</span>")}).done(function(b){var e;g.removeAttr("disabled").find(".dashicons").removeClass("rotate"),a(c).off("beforeunload",d),a(".imagify-row-progress").slideUp(),"NaN"!==b.global_percent&&(a(".imagify-row-complete").removeClass("hidden").addClass("done").attr("aria-hidden","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),e=imagifyBulk.labels.textToShare,e=e.replace("%1$s",b.global_gain_human),e=e.replace("%2$s",b.global_original_size_human),e=encodeURIComponent(e),a(".imagify-sn-twitter").attr("href","https://twitter.com/intent/tweet?source=webclient&original_referer="+imagifyBulk.labels.pluginURL+"&text="+e+"&url="+imagifyBulk.labels.pluginURL+"&related=imagify&hastags=performance,web,wordpress"),a(".imagify-ac-chart").attr("data-percent",b.global_percent),f(a(".imagify-ac-chart").find("canvas"))),n=0}).error(function(a){c.imagify.log("Can't optimize image with id "+a+".")}).run()}).fail(function(){swal({title:imagifyBulk.labels.getUnoptimizedImagesErrorTitle,html:imagifyBulk.labels.getUnoptimizedImagesErrorText,type:"error",customClass:"imagify-sweet-alert"}).then(function(){location.reload()})}))})}(jQuery,document,window),function(a,b,c,d){var e,f;c.innerWidth?(e=(c.innerWidth-700)/2,f=(c.innerHeight-290)/2):(e=(b.body.clientWidth-700)/2,f=(b.body.clientHeight-290)/2),[].forEach.call(b.querySelectorAll(".imagify-share-networks a"),function(a){a.addEventListener("click",function(a){c.open(this.href,"","status=no, scrollbars=no, menubar=no, top="+f+", left="+e+", width=700, height=290"),a.preventDefault()},!1)})}(jQuery,document,window);
|
assets/js/es6-promise.auto.js
CHANGED
File without changes
|
assets/js/es6-promise.auto.min.js
CHANGED
File without changes
|
assets/js/jquery.twentytwenty.js
CHANGED
@@ -1,17 +1,3 @@
|
|
1 |
-
window.imagify = window.imagify || {
|
2 |
-
concat: ajaxurl.indexOf( '?' ) > 0 ? '&' : '?',
|
3 |
-
log: function( content ) {
|
4 |
-
if ( undefined !== console ) {
|
5 |
-
console.log( content ); // eslint-disable-line no-console
|
6 |
-
}
|
7 |
-
},
|
8 |
-
info: function( content ) {
|
9 |
-
if ( undefined !== console ) {
|
10 |
-
console.info( content ); // eslint-disable-line no-console
|
11 |
-
}
|
12 |
-
}
|
13 |
-
};
|
14 |
-
|
15 |
/* eslint-disable */
|
16 |
(function($, d, w, undefined) {
|
17 |
|
@@ -175,14 +161,8 @@ window.imagify = window.imagify || {
|
|
175 |
/**
|
176 |
* Dynamic modal
|
177 |
*
|
178 |
-
* @param {object}
|
179 |
*/
|
180 |
-
imagifyOpenModal = function( $theLink ) {
|
181 |
-
var theTarget = $theLink.data( 'target' ) || $theLink.attr( 'href' );
|
182 |
-
|
183 |
-
$( theTarget ).css( 'display', 'flex' ).hide().fadeIn( 400 ).attr( 'aria-hidden', 'false' ).attr( 'tabindex', '0' ).focus().removeAttr( 'tabindex' ).addClass( 'modal-is-open' );
|
184 |
-
$( 'body' ).addClass( 'imagify-modal-is-open' );
|
185 |
-
},
|
186 |
imagifyTwentyModal = function( options ) {
|
187 |
var defaults = {
|
188 |
width: 0, //px
|
@@ -244,8 +224,8 @@ window.imagify = window.imagify || {
|
|
244 |
|
245 |
e.preventDefault();
|
246 |
|
247 |
-
if (
|
248 |
-
|
249 |
}
|
250 |
|
251 |
$modal.find( '.imagify-modal-content').css( {
|
@@ -272,8 +252,8 @@ window.imagify = window.imagify || {
|
|
272 |
$tt.twentytwenty( {
|
273 |
handlePosition: 0.3,
|
274 |
orientation: 'horizontal',
|
275 |
-
labelBefore: imagifyTTT.labels.
|
276 |
-
labelAfter: imagifyTTT.labels.
|
277 |
}, function() {
|
278 |
var windowH = $( w ).height(),
|
279 |
ttH = $modal.find( '.twentytwenty-container' ).height(),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
/* eslint-disable */
|
2 |
(function($, d, w, undefined) {
|
3 |
|
161 |
/**
|
162 |
* Dynamic modal
|
163 |
*
|
164 |
+
* @param {object} Parameters to build modal with datas
|
165 |
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
166 |
imagifyTwentyModal = function( options ) {
|
167 |
var defaults = {
|
168 |
width: 0, //px
|
224 |
|
225 |
e.preventDefault();
|
226 |
|
227 |
+
if ( settings.openModal ) {
|
228 |
+
w.imagify.openModal( $( this ) );
|
229 |
}
|
230 |
|
231 |
$modal.find( '.imagify-modal-content').css( {
|
252 |
$tt.twentytwenty( {
|
253 |
handlePosition: 0.3,
|
254 |
orientation: 'horizontal',
|
255 |
+
labelBefore: imagifyTTT.labels.originalL,
|
256 |
+
labelAfter: imagifyTTT.labels.optimizedL
|
257 |
}, function() {
|
258 |
var windowH = $( w ).height(),
|
259 |
ttH = $modal.find( '.twentytwenty-container' ).height(),
|
assets/js/jquery.twentytwenty.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
window.imagify=window.imagify||{concat:ajaxurl.indexOf("?")>0?"&":"?",log:function(a){void 0!==console&&console.log(a)},info:function(a){void 0!==console&&console.info(a)}},function(a,b,c,d){a.fn.twentytwenty=function(b,d){return b=a.extend({handlePosition:.5,orientation:"horizontal",labelBefore:"Before",labelAfter:"After"},b),this.each(function(){var e=b.handlePosition,f=a(this),g=b.orientation,h="vertical"===g?"down":"left",i="vertical"===g?"up":"right",j=f.find("img:first"),k=f.find("img:last");f.wrap('<div class="twentytwenty-wrapper twentytwenty-'+g+'"></div>'),f.append('<div class="twentytwenty-overlay"></div>'),f.append('<div class="twentytwenty-handle"></div>');var l=f.find(".twentytwenty-handle");l.append('<span class="twentytwenty-'+h+'-arrow"></span>'),l.append('<span class="twentytwenty-'+i+'-arrow"></span>'),f.addClass("twentytwenty-container"),j.addClass("twentytwenty-before"),k.addClass("twentytwenty-after");var m=f.find(".twentytwenty-overlay");m.append('<div class="twentytwenty-labels twentytwenty-before-label"><span class="twentytwenty-label-content">'+b.labelBefore+"</span></div>"),m.append('<div class="twentytwenty-labels twentytwenty-after-label"><span class="twentytwenty-label-content">'+b.labelAfter+"</span></div>");var n=function(a){var b=j.width(),c=j.height();return{w:b+"px",h:c+"px",cw:a*b+"px",ch:a*c+"px"}},o=function(a){var b=f.find(".twentytwenty-before");"vertical"===g?b.css("clip","rect(0,"+a.w+","+a.ch+",0)"):b.css("clip","rect(0,"+a.cw+","+a.h+",0)"),f.css("height",a.h),"function"==typeof d&&d()},p=function(a){var b=n(a);l.css("vertical"===g?"top":"left","vertical"===g?b.ch:b.cw),o(b)},q=0,r=0,s=0,t=0;a(c).on("resize.twentytwenty",function(){p(e)}),l.on("movestart",function(a){(a.distX>a.distY&&a.distX<-a.distY||a.distX<a.distY&&a.distX>-a.distY)&&"vertical"!==g?a.preventDefault():(a.distX<a.distY&&a.distX<-a.distY||a.distX>a.distY&&a.distX>-a.distY)&&"vertical"===g&&a.preventDefault(),f.addClass("active"),q=f.offset().left,r=f.offset().top,s=j.width(),t=j.height()}),l.on("moveend",function(){f.removeClass("active")}),l.on("move",function(a){f.hasClass("active")&&(e="vertical"===g?(a.pageY-r)/t:(a.pageX-q)/s,e<0&&(e=0),e>1&&(e=1),p(e))}),f.find("img").on("mousedown",function(a){a.preventDefault()}),a(c).trigger("resize.twentytwenty")})}}(jQuery,document,window),function(a,b,c,d){var e=function(b){b.each(function(){var b=a(this),c=parseInt(b.closest(".imagify-chart").next(".imagify-chart-value").text(),10),d=[{value:c,color:"#00B3D3"},{value:100-c,color:"#D8D8D8"}];new Chart(b[0].getContext("2d")).Doughnut(d,{segmentStrokeColor:"#2A2E3C",segmentStrokeWidth:1,animateRotate:!0,percentageInnerCutout:60,tooltipEvents:[]})})},f=function(b){var c=b.data("target")||b.attr("href");a(c).css("display","flex").hide().fadeIn(400).attr("aria-hidden","false").attr("tabindex","0").focus().removeAttr("tabindex").addClass("modal-is-open"),a("body").addClass("imagify-modal-is-open")},g=function(b){var d,g={width:0,height:0,originalUrl:"",optimizedUrl:"",originalSize:0,optimizedSize:0,saving:0,modalAppendTo:a("body"),trigger:a('[data-target="imagify-visual-comparison"]'),modalId:"imagify-visual-comparison",openModal:!1},h=a.extend({},g,b);if(0===h.width||0===h.height||""===h.originalUrl||""===h.optimizedUrl||0===h.originalSize||0===h.optimizedSize||0===h.saving)return"error";d='<div id="'+h.modalId+'" class="imagify-modal imagify-visual-comparison" aria-hidden="true">',d+='<div class="imagify-modal-content loading">',d+='<div class="twentytwenty-container">',d+='<img class="imagify-img-before" alt="" width="'+h.width+'" height="'+h.height+'">',d+='<img class="imagify-img-after" alt="" width="'+h.width+'" height="'+h.height+'">',d+="</div>",d+='<div class="imagify-comparison-levels">',d+='<div class="imagify-c-level imagify-level-original go-left">',d+='<p class="imagify-c-level-row">',d+='<span class="label">'+imagifyTTT.labels.filesize+"</span>",d+='<span class="value level">'+h.originalSize+"</span>",d+="</p>",d+="</div>",d+='<div class="imagify-c-level imagify-level-optimized go-right">',d+='<p class="imagify-c-level-row">',d+='<span class="label">'+imagifyTTT.labels.filesize+"</span>",d+='<span class="value level">'+h.optimizedSize+"</span>",d+="</p>",d+='<p class="imagify-c-level-row">',d+='<span class="label">'+imagifyTTT.labels.saving+"</span>",d+='<span class="value"><span class="imagify-chart"><span class="imagify-chart-container"><canvas id="imagify-consumption-chart-normal" width="15" height="15"></canvas></span></span><span class="imagify-chart-value">'+h.saving+"</span>%</span>",d+="</p>",d+="</div>",d+="</div>",d+='<button class="close-btn absolute" type="button"><i aria-hidden="true" class="dashicons dashicons-no-alt"></i><span class="screen-reader-text">'+imagifyTTT.labels.close+"</span></button>",d+="</div>",d+="</div>",h.modalAppendTo.append(d),h.trigger.on("click.imagify",function(b){var d,g,i=a(a(this).data("target")),j=0;b.preventDefault(),"function"==typeof f&&h.openModal&&f(a(this)),i.find(".imagify-modal-content").css({width:.85*a(c).outerWidth()+"px","max-width":h.width}),i.find(".imagify-img-before").on("load",function(){j++}).attr("src",h.originalUrl),i.find(".imagify-img-after").on("load",function(){j++}).attr("src",h.optimizedUrl),d=i.find(".twentytwenty-container"),g=setInterval(function(){if(2===j)return d.twentytwenty({handlePosition:.3,orientation:"horizontal",labelBefore:imagifyTTT.labels.original_l,labelAfter:imagifyTTT.labels.optimized_l},function(){var b,f,g,h,j,k,l=a(c).height(),m=i.find(".twentytwenty-container").height(),n=i.find(".twentytwenty-wrapper").position().top;d.closest(".imagify-modal-content").hasClass("loaded")||(d.closest(".imagify-modal-content").removeClass("loading").addClass("loaded"),e(i.find(".imagify-level-optimized").find(".imagify-chart").find("canvas"))),l<m&&!i.hasClass("modal-is-too-high")&&(i.addClass("modal-is-too-high"),b=i.find(".twentytwenty-handle"),f=i.find(".twentytwenty-label-content"),g=i.find(".imagify-comparison-levels"),h=g.outerHeight(),j=(l-n-b.height())/2,k=l-3*n-h,b.css({top:j}),f.css({top:k,bottom:"auto"}),i.find(".twentytwenty-wrapper").css({paddingBottom:h}),i.find(".imagify-modal-content").on("scroll.imagify",function(){var c=a(this).scrollTop();b.css({top:j+c}),f.css({top:k+c}),g.css({bottom:-c})}))}),clearInterval(g),g=null,"done"},75)})};if(a(".imagify-visual-comparison-btn").on("click",function(){var b,d,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B;1!==a(".twentytwenty-wrapper").length&&(a(a(this).data("target")).find(".imagify-modal-content").css("width",.95*a(c).outerWidth()+"px"),a(".twentytwenty-container").length>0&&a(c).outerWidth()<=800||(b=a(".twentytwenty-container"),d=0,f=b.data("loader"),g=b.data("label-original"),h=b.data("label-normal"),i=b.data("label-aggressive"),j=b.data("label-ultra"),k=b.data("original-label").replace(/\*\*/,"<strong>").replace(/\*\*/,"</strong>"),l=b.data("original-alt"),m=b.data("original-img"),n=b.data("original-dim").split("x"),o=b.data("normal-alt"),p=b.data("normal-img"),q=b.data("normal-dim").split("x"),r=b.data("aggressive-alt"),s=b.data("aggressive-img"),t=b.data("aggressive-dim").split("x"),u=b.data("ultra-label").replace(/\*\*/,"<strong>").replace(/\*\*/,"</strong>"),v=b.data("ultra-alt"),w=b.data("ultra-img"),x=b.data("ultra-dim").split("x"),y='<span class="twentytwenty-duo-buttons twentytwenty-duo-left">',y+='<button type="button" class="imagify-comparison-original selected" data-img="original">'+g+"</button>",y+='<button type="button" class="imagify-comparison-normal" data-img="normal">'+h+"</button>",y+='<button type="button" class="imagify-comparison-aggressive" data-img="aggressive">'+i+"</button>",y+="</span>",z='<span class="twentytwenty-duo-buttons twentytwenty-duo-right">',z+='<button type="button" class="imagify-comparison-normal" data-img="normal">'+h+"</button>",z+='<button type="button" class="imagify-comparison-aggressive" data-img="aggressive">'+i+"</button>",z+='<button type="button" class="imagify-comparison-ultra selected" data-img="ultra">'+j+"</button>",z+="</span>",b.before('<img class="loader" src="'+f+'" alt="Loading…" width="64" height="64">'),a(".twentytwenty-left-buttons").append(y),a(".twentytwenty-right-buttons").append(z),A='<img class="img-original" alt="'+l+'" width="'+n[0]+'" height="'+n[1]+'">',A+='<img class="img-normal" alt="'+o+'" width="'+q[0]+'" height="'+q[1]+'">',A+='<img class="img-aggressive" alt="'+r+'" width="'+t[0]+'" height="'+t[1]+'">',A+='<img class="img-ultra" alt="'+v+'" width="'+x[0]+'" height="'+x[1]+'">',A+=a(".twentytwenty-left-buttons").lenght?y+z:"",b.closest(".imagify-modal-content").addClass("loading").find(".twentytwenty-container").append(A),a(".img-original").on("load",function(){d++}).attr("src",m),a(".img-normal").on("load",function(){d++}).attr("src",p),a(".img-aggressive").on("load",function(){d++}).attr("src",s),a(".img-ultra").on("load",function(){d++}).attr("src",w),B=setInterval(function(){4===d&&(b.twentytwenty({handlePosition:.6,orientation:"horizontal",labelBefore:k,labelAfter:u},function(){b.closest(".imagify-modal-content").hasClass("loaded")||(b.closest(".imagify-modal-content").removeClass("loading").addClass("loaded"),e(a(".imagify-level-ultra").find(".imagify-chart").find("canvas")))}),clearInterval(B),B=null)},75),a(".imagify-comparison-title").on("click",".twentytwenty-duo-buttons button:not(.selected)",function(b){var c,d=a(this),f=d.closest(".imagify-comparison-title").nextAll(".twentytwenty-wrapper").find(".twentytwenty-container"),g=d.closest(".twentytwenty-duo-buttons").hasClass("twentytwenty-duo-left")?"left":"right",h="left"===g?d.closest(".imagify-comparison-title").find(".twentytwenty-duo-right"):d.closest(".imagify-comparison-title").find(".twentytwenty-duo-left"),i=d.closest(".twentytwenty-duo-buttons").find("button"),j=f.find(".twentytwenty-before"),k=f.find(".twentytwenty-after"),l=d.data("img");b.stopPropagation(),b.preventDefault(),i.removeClass("selected"),d.addClass("selected"),h.find(".selected").data("img")===l&&h.find("button:not(.selected)").eq(0).trigger("click"),"left"===g&&(c=j.css("clip"),j.attr("style",""),j.removeClass("twentytwenty-before"),f.find(".img-"+l).addClass("twentytwenty-before").css("clip",c),a(".twentytwenty-before-label").find(".twentytwenty-label-content").text(f.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"===g&&(k.removeClass("twentytwenty-after"),f.find(".img-"+l).addClass("twentytwenty-after"),a(".twentytwenty-after-label").find(".twentytwenty-label-content").text(f.data(l+"-label")),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")),e(a(".imagify-level-"+l).find(".imagify-chart").find("canvas"))})))}),a(".post-php").find(".wp_attachment_image").find(".thumbnail").length>0){var h,i,j=a(".post-php").find(".wp_attachment_image"),k=j.find(".thumbnail"),l={src:k.prop("src"),width:k.width(),height:k.height()},m={src:a("#imagify-full-original").val(),size:a("#imagify-full-original-size").val()},n=a("#misc-publishing-actions").find(".misc-pub-imagify").find(".button-primary");l.width>360&&a("#imagify-full-original").length>0&&""!==a("#imagify-full-original").val()?(h=a(".misc-pub-filesize").find("strong").text(),i=a(".imagify-data-item").find(".imagify-chart-value").text(),a('[id^="imgedit-open-btn-"]').before('<button type="button" class="imagify-button-primary button-primary imagify-modal-trigger" data-target="#imagify-visual-comparison" id="imagify-start-comparison">'+imagifyTTT.labels.compare+"</button>"),g({width:l.width,height:l.height,originalUrl:m.src,optimizedUrl:l.src,originalSize:m.size,optimizedSize:h,saving:i,modalAppendTo:j,trigger:a("#imagify-start-comparison"),modalId:"imagify-visual-comparison"})):l.width<360&&a("#imagify-full-original").length>0&&""!==a("#imagify-full-original").val()||a("#imagify-full-original").length>0&&""===a("#imagify-full-original").val()||1===a("#misc-publishing-actions").find(".misc-pub-imagify").find(".button-primary").length&&(a('[id^="imgedit-open-btn-"]').before('<span class="spinner imagify-hidden"></span><a class="imagify-button-primary button-primary imagify-optimize-trigger" id="imagify-optimize-trigger" href="'+n.attr("href")+'">'+imagifyTTT.labels.optimize+"</a>"),a("#imagify-optimize-trigger").on("click",function(){a(this).prev(".spinner").removeClass("imagify-hidden").addClass("is-active")}))}if(a(".upload-php").find(".imagify-compare-images").length>0&&a(".imagify-compare-images").each(function(){var b=a(this),c=b.data("id"),d=b.closest("#post-"+c).find(".column-imagify_optimized_file");g({width:b.data("full-width"),height:b.data("full-height"),originalUrl:b.data("backup-src"),optimizedUrl:b.data("full-src"),originalSize:d.find(".original").text(),optimizedSize:d.find(".imagify-data-item").find(".big").text(),saving:d.find(".imagify-chart-value").text(),modalAppendTo:b.closest(".column-primary"),trigger:b,modalId:"imagify-comparison-"+c})}),a(".upload-php").length>0)var o=function(a){var b={};return c.location.href.replace(/[?&]+([^=&]+)=?([^&]*)?/gi,function(a,c,d){b[c]=void 0!==d?d:""}),a?b[a]?b[a]:null:b},p=function(){var b=setInterval(function(){var c;a(".media-modal").find(".imagify-datas-details").length&&(a("#imagify-original-src").length>0&&""!==a("#imagify-original-src")&&(a(".media-frame-content").find(".attachment-actions").prepend('<button type="button" class="imagify-button-primary button-primary imagify-modal-trigger" data-target="#imagify-comparison-modal" id="imagify-media-frame-comparison-btn">'+imagifyTTT.labels.compare+"</button>"),c=a(".media-frame-content").find(".compat-field-imagify"),g({width:a("#imagify-full-width").val(),height:a("#imagify-full-height").val(),originalUrl:a("#imagify-original-src").val(),optimizedUrl:a("#imagify-full-src").val(),originalSize:a("#imagify-original-size").val(),optimizedSize:c.find(".imagify-data-item").find(".big").text(),saving:c.find(".imagify-chart-value").text(),modalAppendTo:a(".media-frame-content").find(".thumbnail-image"),trigger:a("#imagify-media-frame-comparison-btn"),modalId:"imagify-comparison-modal",openModal:!0})),clearInterval(b),b=null)},20)},q=setInterval(function(){a(".upload-php").find(".media-frame.mode-grid").find(".attachments").length&&(a(".upload-php").find(".media-frame.mode-grid").on("click",".attachment",function(){p()}),o("item")&&p(),clearInterval(q),q=null)},100)}(jQuery,document,window);
|
1 |
+
!function(a,b,c,d){a.fn.twentytwenty=function(b,d){return b=a.extend({handlePosition:.5,orientation:"horizontal",labelBefore:"Before",labelAfter:"After"},b),this.each(function(){var e=b.handlePosition,f=a(this),g=b.orientation,h="vertical"===g?"down":"left",i="vertical"===g?"up":"right",j=f.find("img:first"),k=f.find("img:last");f.wrap('<div class="twentytwenty-wrapper twentytwenty-'+g+'"></div>'),f.append('<div class="twentytwenty-overlay"></div>'),f.append('<div class="twentytwenty-handle"></div>');var l=f.find(".twentytwenty-handle");l.append('<span class="twentytwenty-'+h+'-arrow"></span>'),l.append('<span class="twentytwenty-'+i+'-arrow"></span>'),f.addClass("twentytwenty-container"),j.addClass("twentytwenty-before"),k.addClass("twentytwenty-after");var m=f.find(".twentytwenty-overlay");m.append('<div class="twentytwenty-labels twentytwenty-before-label"><span class="twentytwenty-label-content">'+b.labelBefore+"</span></div>"),m.append('<div class="twentytwenty-labels twentytwenty-after-label"><span class="twentytwenty-label-content">'+b.labelAfter+"</span></div>");var n=function(a){var b=j.width(),c=j.height();return{w:b+"px",h:c+"px",cw:a*b+"px",ch:a*c+"px"}},o=function(a){var b=f.find(".twentytwenty-before");"vertical"===g?b.css("clip","rect(0,"+a.w+","+a.ch+",0)"):b.css("clip","rect(0,"+a.cw+","+a.h+",0)"),f.css("height",a.h),"function"==typeof d&&d()},p=function(a){var b=n(a);l.css("vertical"===g?"top":"left","vertical"===g?b.ch:b.cw),o(b)},q=0,r=0,s=0,t=0;a(c).on("resize.twentytwenty",function(){p(e)}),l.on("movestart",function(a){(a.distX>a.distY&&a.distX<-a.distY||a.distX<a.distY&&a.distX>-a.distY)&&"vertical"!==g?a.preventDefault():(a.distX<a.distY&&a.distX<-a.distY||a.distX>a.distY&&a.distX>-a.distY)&&"vertical"===g&&a.preventDefault(),f.addClass("active"),q=f.offset().left,r=f.offset().top,s=j.width(),t=j.height()}),l.on("moveend",function(){f.removeClass("active")}),l.on("move",function(a){f.hasClass("active")&&(e="vertical"===g?(a.pageY-r)/t:(a.pageX-q)/s,e<0&&(e=0),e>1&&(e=1),p(e))}),f.find("img").on("mousedown",function(a){a.preventDefault()}),a(c).trigger("resize.twentytwenty")})}}(jQuery,document,window),function(a,b,c,d){var e=function(b){b.each(function(){var b=a(this),c=parseInt(b.closest(".imagify-chart").next(".imagify-chart-value").text(),10),d=[{value:c,color:"#00B3D3"},{value:100-c,color:"#D8D8D8"}];new Chart(b[0].getContext("2d")).Doughnut(d,{segmentStrokeColor:"#2A2E3C",segmentStrokeWidth:1,animateRotate:!0,percentageInnerCutout:60,tooltipEvents:[]})})},f=function(b){var d,f={width:0,height:0,originalUrl:"",optimizedUrl:"",originalSize:0,optimizedSize:0,saving:0,modalAppendTo:a("body"),trigger:a('[data-target="imagify-visual-comparison"]'),modalId:"imagify-visual-comparison",openModal:!1},g=a.extend({},f,b);if(0===g.width||0===g.height||""===g.originalUrl||""===g.optimizedUrl||0===g.originalSize||0===g.optimizedSize||0===g.saving)return"error";d='<div id="'+g.modalId+'" class="imagify-modal imagify-visual-comparison" aria-hidden="true">',d+='<div class="imagify-modal-content loading">',d+='<div class="twentytwenty-container">',d+='<img class="imagify-img-before" alt="" width="'+g.width+'" height="'+g.height+'">',d+='<img class="imagify-img-after" alt="" width="'+g.width+'" height="'+g.height+'">',d+="</div>",d+='<div class="imagify-comparison-levels">',d+='<div class="imagify-c-level imagify-level-original go-left">',d+='<p class="imagify-c-level-row">',d+='<span class="label">'+imagifyTTT.labels.filesize+"</span>",d+='<span class="value level">'+g.originalSize+"</span>",d+="</p>",d+="</div>",d+='<div class="imagify-c-level imagify-level-optimized go-right">',d+='<p class="imagify-c-level-row">',d+='<span class="label">'+imagifyTTT.labels.filesize+"</span>",d+='<span class="value level">'+g.optimizedSize+"</span>",d+="</p>",d+='<p class="imagify-c-level-row">',d+='<span class="label">'+imagifyTTT.labels.saving+"</span>",d+='<span class="value"><span class="imagify-chart"><span class="imagify-chart-container"><canvas id="imagify-consumption-chart-normal" width="15" height="15"></canvas></span></span><span class="imagify-chart-value">'+g.saving+"</span>%</span>",d+="</p>",d+="</div>",d+="</div>",d+='<button class="close-btn absolute" type="button"><i aria-hidden="true" class="dashicons dashicons-no-alt"></i><span class="screen-reader-text">'+imagifyTTT.labels.close+"</span></button>",d+="</div>",d+="</div>",g.modalAppendTo.append(d),g.trigger.on("click.imagify",function(b){var d,f,h=a(a(this).data("target")),i=0;b.preventDefault(),g.openModal&&c.imagify.openModal(a(this)),h.find(".imagify-modal-content").css({width:.85*a(c).outerWidth()+"px","max-width":g.width}),h.find(".imagify-img-before").on("load",function(){i++}).attr("src",g.originalUrl),h.find(".imagify-img-after").on("load",function(){i++}).attr("src",g.optimizedUrl),d=h.find(".twentytwenty-container"),f=setInterval(function(){if(2===i)return d.twentytwenty({handlePosition:.3,orientation:"horizontal",labelBefore:imagifyTTT.labels.originalL,labelAfter:imagifyTTT.labels.optimizedL},function(){var b,f,g,i,j,k,l=a(c).height(),m=h.find(".twentytwenty-container").height(),n=h.find(".twentytwenty-wrapper").position().top;d.closest(".imagify-modal-content").hasClass("loaded")||(d.closest(".imagify-modal-content").removeClass("loading").addClass("loaded"),e(h.find(".imagify-level-optimized").find(".imagify-chart").find("canvas"))),l<m&&!h.hasClass("modal-is-too-high")&&(h.addClass("modal-is-too-high"),b=h.find(".twentytwenty-handle"),f=h.find(".twentytwenty-label-content"),g=h.find(".imagify-comparison-levels"),i=g.outerHeight(),j=(l-n-b.height())/2,k=l-3*n-i,b.css({top:j}),f.css({top:k,bottom:"auto"}),h.find(".twentytwenty-wrapper").css({paddingBottom:i}),h.find(".imagify-modal-content").on("scroll.imagify",function(){var c=a(this).scrollTop();b.css({top:j+c}),f.css({top:k+c}),g.css({bottom:-c})}))}),clearInterval(f),f=null,"done"},75)})};if(a(".imagify-visual-comparison-btn").on("click",function(){var b,d,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B;1!==a(".twentytwenty-wrapper").length&&(a(a(this).data("target")).find(".imagify-modal-content").css("width",.95*a(c).outerWidth()+"px"),a(".twentytwenty-container").length>0&&a(c).outerWidth()<=800||(b=a(".twentytwenty-container"),d=0,f=b.data("loader"),g=b.data("label-original"),h=b.data("label-normal"),i=b.data("label-aggressive"),j=b.data("label-ultra"),k=b.data("original-label").replace(/\*\*/,"<strong>").replace(/\*\*/,"</strong>"),l=b.data("original-alt"),m=b.data("original-img"),n=b.data("original-dim").split("x"),o=b.data("normal-alt"),p=b.data("normal-img"),q=b.data("normal-dim").split("x"),r=b.data("aggressive-alt"),s=b.data("aggressive-img"),t=b.data("aggressive-dim").split("x"),u=b.data("ultra-label").replace(/\*\*/,"<strong>").replace(/\*\*/,"</strong>"),v=b.data("ultra-alt"),w=b.data("ultra-img"),x=b.data("ultra-dim").split("x"),y='<span class="twentytwenty-duo-buttons twentytwenty-duo-left">',y+='<button type="button" class="imagify-comparison-original selected" data-img="original">'+g+"</button>",y+='<button type="button" class="imagify-comparison-normal" data-img="normal">'+h+"</button>",y+='<button type="button" class="imagify-comparison-aggressive" data-img="aggressive">'+i+"</button>",y+="</span>",z='<span class="twentytwenty-duo-buttons twentytwenty-duo-right">',z+='<button type="button" class="imagify-comparison-normal" data-img="normal">'+h+"</button>",z+='<button type="button" class="imagify-comparison-aggressive" data-img="aggressive">'+i+"</button>",z+='<button type="button" class="imagify-comparison-ultra selected" data-img="ultra">'+j+"</button>",z+="</span>",b.before('<img class="loader" src="'+f+'" alt="Loading…" width="64" height="64">'),a(".twentytwenty-left-buttons").append(y),a(".twentytwenty-right-buttons").append(z),A='<img class="img-original" alt="'+l+'" width="'+n[0]+'" height="'+n[1]+'">',A+='<img class="img-normal" alt="'+o+'" width="'+q[0]+'" height="'+q[1]+'">',A+='<img class="img-aggressive" alt="'+r+'" width="'+t[0]+'" height="'+t[1]+'">',A+='<img class="img-ultra" alt="'+v+'" width="'+x[0]+'" height="'+x[1]+'">',A+=a(".twentytwenty-left-buttons").lenght?y+z:"",b.closest(".imagify-modal-content").addClass("loading").find(".twentytwenty-container").append(A),a(".img-original").on("load",function(){d++}).attr("src",m),a(".img-normal").on("load",function(){d++}).attr("src",p),a(".img-aggressive").on("load",function(){d++}).attr("src",s),a(".img-ultra").on("load",function(){d++}).attr("src",w),B=setInterval(function(){4===d&&(b.twentytwenty({handlePosition:.6,orientation:"horizontal",labelBefore:k,labelAfter:u},function(){b.closest(".imagify-modal-content").hasClass("loaded")||(b.closest(".imagify-modal-content").removeClass("loading").addClass("loaded"),e(a(".imagify-level-ultra").find(".imagify-chart").find("canvas")))}),clearInterval(B),B=null)},75),a(".imagify-comparison-title").on("click",".twentytwenty-duo-buttons button:not(.selected)",function(b){var c,d=a(this),f=d.closest(".imagify-comparison-title").nextAll(".twentytwenty-wrapper").find(".twentytwenty-container"),g=d.closest(".twentytwenty-duo-buttons").hasClass("twentytwenty-duo-left")?"left":"right",h="left"===g?d.closest(".imagify-comparison-title").find(".twentytwenty-duo-right"):d.closest(".imagify-comparison-title").find(".twentytwenty-duo-left"),i=d.closest(".twentytwenty-duo-buttons").find("button"),j=f.find(".twentytwenty-before"),k=f.find(".twentytwenty-after"),l=d.data("img");b.stopPropagation(),b.preventDefault(),i.removeClass("selected"),d.addClass("selected"),h.find(".selected").data("img")===l&&h.find("button:not(.selected)").eq(0).trigger("click"),"left"===g&&(c=j.css("clip"),j.attr("style",""),j.removeClass("twentytwenty-before"),f.find(".img-"+l).addClass("twentytwenty-before").css("clip",c),a(".twentytwenty-before-label").find(".twentytwenty-label-content").text(f.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"===g&&(k.removeClass("twentytwenty-after"),f.find(".img-"+l).addClass("twentytwenty-after"),a(".twentytwenty-after-label").find(".twentytwenty-label-content").text(f.data(l+"-label")),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")),e(a(".imagify-level-"+l).find(".imagify-chart").find("canvas"))})))}),a(".post-php").find(".wp_attachment_image").find(".thumbnail").length>0){var g,h,i=a(".post-php").find(".wp_attachment_image"),j=i.find(".thumbnail"),k={src:j.prop("src"),width:j.width(),height:j.height()},l={src:a("#imagify-full-original").val(),size:a("#imagify-full-original-size").val()},m=a("#misc-publishing-actions").find(".misc-pub-imagify").find(".button-primary");k.width>360&&a("#imagify-full-original").length>0&&""!==a("#imagify-full-original").val()?(g=a(".misc-pub-filesize").find("strong").text(),h=a(".imagify-data-item").find(".imagify-chart-value").text(),a('[id^="imgedit-open-btn-"]').before('<button type="button" class="imagify-button-primary button-primary imagify-modal-trigger" data-target="#imagify-visual-comparison" id="imagify-start-comparison">'+imagifyTTT.labels.compare+"</button>"),f({width:k.width,height:k.height,originalUrl:l.src,optimizedUrl:k.src,originalSize:l.size,optimizedSize:g,saving:h,modalAppendTo:i,trigger:a("#imagify-start-comparison"),modalId:"imagify-visual-comparison"})):k.width<360&&a("#imagify-full-original").length>0&&""!==a("#imagify-full-original").val()||a("#imagify-full-original").length>0&&""===a("#imagify-full-original").val()||1===a("#misc-publishing-actions").find(".misc-pub-imagify").find(".button-primary").length&&(a('[id^="imgedit-open-btn-"]').before('<span class="spinner imagify-hidden"></span><a class="imagify-button-primary button-primary imagify-optimize-trigger" id="imagify-optimize-trigger" href="'+m.attr("href")+'">'+imagifyTTT.labels.optimize+"</a>"),a("#imagify-optimize-trigger").on("click",function(){a(this).prev(".spinner").removeClass("imagify-hidden").addClass("is-active")}))}if(a(".upload-php").find(".imagify-compare-images").length>0&&a(".imagify-compare-images").each(function(){var b=a(this),c=b.data("id"),d=b.closest("#post-"+c).find(".column-imagify_optimized_file");f({width:b.data("full-width"),height:b.data("full-height"),originalUrl:b.data("backup-src"),optimizedUrl:b.data("full-src"),originalSize:d.find(".original").text(),optimizedSize:d.find(".imagify-data-item").find(".big").text(),saving:d.find(".imagify-chart-value").text(),modalAppendTo:b.closest(".column-primary"),trigger:b,modalId:"imagify-comparison-"+c})}),a(".upload-php").length>0)var n=function(a){var b={};return c.location.href.replace(/[?&]+([^=&]+)=?([^&]*)?/gi,function(a,c,d){b[c]=void 0!==d?d:""}),a?b[a]?b[a]:null:b},o=function(){var b=setInterval(function(){var c;a(".media-modal").find(".imagify-datas-details").length&&(a("#imagify-original-src").length>0&&""!==a("#imagify-original-src")&&(a(".media-frame-content").find(".attachment-actions").prepend('<button type="button" class="imagify-button-primary button-primary imagify-modal-trigger" data-target="#imagify-comparison-modal" id="imagify-media-frame-comparison-btn">'+imagifyTTT.labels.compare+"</button>"),c=a(".media-frame-content").find(".compat-field-imagify"),f({width:a("#imagify-full-width").val(),height:a("#imagify-full-height").val(),originalUrl:a("#imagify-original-src").val(),optimizedUrl:a("#imagify-full-src").val(),originalSize:a("#imagify-original-size").val(),optimizedSize:c.find(".imagify-data-item").find(".big").text(),saving:c.find(".imagify-chart-value").text(),modalAppendTo:a(".media-frame-content").find(".thumbnail-image"),trigger:a("#imagify-media-frame-comparison-btn"),modalId:"imagify-comparison-modal",openModal:!0})),clearInterval(b),b=null)},20)},p=setInterval(function(){a(".upload-php").find(".media-frame.mode-grid").find(".attachments").length&&(a(".upload-php").find(".media-frame.mode-grid").on("click",".attachment",function(){o()}),n("item")&&o(),clearInterval(p),p=null)},100)}(jQuery,document,window);
|
assets/js/library.js
ADDED
@@ -0,0 +1,51 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
(function($, d, w, undefined) { // eslint-disable-line no-unused-vars, no-shadow, no-shadow-restricted-names
|
2 |
+
|
3 |
+
var bulkOpt;
|
4 |
+
/**
|
5 |
+
* Add a "Imagify'em all" in the select list.
|
6 |
+
*/
|
7 |
+
bulkOpt = '<option value="imagify-bulk-upload">' + imagifyLibrary.labels.bulkActionsOptimize + '</option>';
|
8 |
+
|
9 |
+
if ( $( '.button-imagify-optimize-missing-sizes' ).length ) {
|
10 |
+
// If we have items that have missing sizes.
|
11 |
+
bulkOpt += '<option value="imagify-bulk-optimize_missing_sizes">' + imagifyLibrary.labels.bulkActionsOptimizeMissingSizes + '</option>';
|
12 |
+
}
|
13 |
+
|
14 |
+
if ( imagifyLibrary.backupOption || $( '.attachment-has-backup' ).length ) {
|
15 |
+
// If the backup option is enabled, or if we have items that can be restored.
|
16 |
+
bulkOpt += '<option value="imagify-bulk-restore">' + imagifyLibrary.labels.bulkActionsRestore + '</option>';
|
17 |
+
}
|
18 |
+
|
19 |
+
$( '.bulkactions select[name="action"] option:last-child' ).before( bulkOpt );
|
20 |
+
$( '.bulkactions select[name="action2"] option:last-child' ).before( bulkOpt );
|
21 |
+
$( '#bulkaction option:last-child' ).after( bulkOpt );
|
22 |
+
|
23 |
+
/**
|
24 |
+
* Process optimization for all selected images.
|
25 |
+
*/
|
26 |
+
$( '#doaction' )
|
27 |
+
.add( '#doaction2' )
|
28 |
+
.add( '#bulkaction + [name="showThickbox"]' )
|
29 |
+
.on( 'click', function( e ) {
|
30 |
+
var value = $( this ).prev( 'select' ).val().split( '-' ),
|
31 |
+
action, ids;
|
32 |
+
|
33 |
+
if ( 'imagify' !== value[0] ) {
|
34 |
+
return;
|
35 |
+
}
|
36 |
+
|
37 |
+
e.preventDefault();
|
38 |
+
|
39 |
+
action = value[2];
|
40 |
+
ids = $( 'input[name^="media"]:checked, input[name^="doaction"]:checked' ).map( function() {
|
41 |
+
return this.value;
|
42 |
+
} ).get();
|
43 |
+
|
44 |
+
ids.forEach( function( id, index ) {
|
45 |
+
setTimeout( function() {
|
46 |
+
$( '#imagify-' + action + '-' + id ).trigger( 'click' );
|
47 |
+
}, index * 300 );
|
48 |
+
} );
|
49 |
+
} );
|
50 |
+
|
51 |
+
} )(jQuery, document, window);
|
assets/js/library.min.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
!function(a,b,c,d){var e;e='<option value="imagify-bulk-upload">'+imagifyLibrary.labels.bulkActionsOptimize+"</option>",a(".button-imagify-optimize-missing-sizes").length&&(e+='<option value="imagify-bulk-optimize_missing_sizes">'+imagifyLibrary.labels.bulkActionsOptimizeMissingSizes+"</option>"),(imagifyLibrary.backupOption||a(".attachment-has-backup").length)&&(e+='<option value="imagify-bulk-restore">'+imagifyLibrary.labels.bulkActionsRestore+"</option>"),a('.bulkactions select[name="action"] option:last-child').before(e),a('.bulkactions select[name="action2"] option:last-child').before(e),a("#bulkaction option:last-child").after(e),a("#doaction").add("#doaction2").add('#bulkaction + [name="showThickbox"]').on("click",function(b){var c,d,e=a(this).prev("select").val().split("-");"imagify"===e[0]&&(b.preventDefault(),c=e[2],d=a('input[name^="media"]:checked, input[name^="doaction"]:checked').map(function(){return this.value}).get(),d.forEach(function(b,d){setTimeout(function(){a("#imagify-"+c+"-"+b).trigger("click")},300*d)}))})}(jQuery,document,window);
|
assets/js/media-modal.js
ADDED
@@ -0,0 +1,98 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* Mini chart.
|
3 |
+
*
|
4 |
+
* @param {element} canvas The canvas element.
|
5 |
+
*/
|
6 |
+
window.imagify.drawMeAChart = function( canvas ) {
|
7 |
+
canvas.each( function() {
|
8 |
+
var $this = jQuery( this ),
|
9 |
+
theValue = parseInt( $this.closest( '.imagify-chart' ).next( '.imagify-chart-value' ).text() ),
|
10 |
+
overviewData = [
|
11 |
+
{
|
12 |
+
value: theValue,
|
13 |
+
color: '#00B3D3'
|
14 |
+
},
|
15 |
+
{
|
16 |
+
value: 100 - theValue,
|
17 |
+
color: '#D8D8D8'
|
18 |
+
}
|
19 |
+
];
|
20 |
+
|
21 |
+
new Chart( $this[0].getContext( '2d' ) ).Doughnut( overviewData, { // eslint-disable-line new-cap
|
22 |
+
segmentStrokeColor: '#FFF',
|
23 |
+
segmentStrokeWidth: 1,
|
24 |
+
animateRotate: true,
|
25 |
+
tooltipEvents: []
|
26 |
+
} );
|
27 |
+
} );
|
28 |
+
};
|
29 |
+
|
30 |
+
(function($, d, w, undefined) { // eslint-disable-line no-unused-vars, no-shadow, no-shadow-restricted-names
|
31 |
+
|
32 |
+
var working = false;
|
33 |
+
|
34 |
+
/**
|
35 |
+
* Toggle slide in custom column.
|
36 |
+
*/
|
37 |
+
$( '.imagify-datas-details' ).hide();
|
38 |
+
|
39 |
+
$( d ).on( 'click', '.imagify-datas-more-action a', function( e ) {
|
40 |
+
var $this = $( this );
|
41 |
+
|
42 |
+
e.preventDefault();
|
43 |
+
|
44 |
+
if ( $this.hasClass( 'is-open' ) ) {
|
45 |
+
$( $this.attr( 'href' ) ).slideUp( 300 ).removeClass( 'is-open' );
|
46 |
+
$this.removeClass( 'is-open' ).find( '.the-text' ).text( $this.data( 'open' ) );
|
47 |
+
} else {
|
48 |
+
$( $this.attr( 'href' ) ).slideDown( 300 ).addClass( 'is-open' );
|
49 |
+
$this.addClass( 'is-open' ).find( '.the-text' ).text( $this.data( 'close' ) );
|
50 |
+
}
|
51 |
+
} );
|
52 |
+
|
53 |
+
/**
|
54 |
+
* Process to one of these actions: restore, optimize, re-optimize, or optimize missing sizes.
|
55 |
+
*/
|
56 |
+
$( d ).on( 'click', '.button-imagify-restore, .button-imagify-manual-upload, .button-imagify-manual-override-upload, .button-imagify-optimize-missing-sizes', function( e ) {
|
57 |
+
var $obj = $( this ),
|
58 |
+
$parent = $obj.parents( '.column-imagify_optimized_file, .compat-field-imagify .field' ),
|
59 |
+
href = $obj.attr( 'href' );
|
60 |
+
|
61 |
+
e.preventDefault();
|
62 |
+
|
63 |
+
if ( ! $parent.length ) {
|
64 |
+
$parent = $obj.closest( '.column' );
|
65 |
+
}
|
66 |
+
|
67 |
+
$parent.html( '<div class="button"><span class="imagify-spinner"></span>' + $obj.data( 'waiting-label' ) + '</div>' );
|
68 |
+
|
69 |
+
$.get( href.replace( 'admin-post.php', 'admin-ajax.php' ) )
|
70 |
+
.done( function( response ) {
|
71 |
+
working = true;
|
72 |
+
$parent.html( response.data );
|
73 |
+
$parent.find( '.imagify-datas-more-action a' ).addClass( 'is-open' ).find( '.the-text' ).text( $parent.find( '.imagify-datas-more-action a' ).data( 'close' ) );
|
74 |
+
$parent.find( '.imagify-datas-details' ).addClass( 'is-open' );
|
75 |
+
|
76 |
+
w.imagify.drawMeAChart( $parent.find( '.imagify-consumption-chart' ) );
|
77 |
+
working = false;
|
78 |
+
} );
|
79 |
+
} );
|
80 |
+
|
81 |
+
/**
|
82 |
+
* Update the chart in the media modal when a media is selected, and the ones already printed.
|
83 |
+
*/
|
84 |
+
$( w ).on( 'canvasprinted.imagify', function( e, selector ) {
|
85 |
+
var $canvas;
|
86 |
+
|
87 |
+
selector = selector || '.imagify-consumption-chart';
|
88 |
+
$canvas = $( selector );
|
89 |
+
|
90 |
+
w.imagify.drawMeAChart( $canvas );
|
91 |
+
|
92 |
+
if ( ! working ) {
|
93 |
+
$canvas.closest( '.imagify-datas-list' ).siblings( '.imagify-datas-details' ).hide();
|
94 |
+
}
|
95 |
+
} )
|
96 |
+
.trigger( 'canvasprinted.imagify' );
|
97 |
+
|
98 |
+
} )(jQuery, document, window);
|
assets/js/media-modal.min.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
window.imagify.drawMeAChart=function(a){a.each(function(){var a=jQuery(this),b=parseInt(a.closest(".imagify-chart").next(".imagify-chart-value").text()),c=[{value:b,color:"#00B3D3"},{value:100-b,color:"#D8D8D8"}];new Chart(a[0].getContext("2d")).Doughnut(c,{segmentStrokeColor:"#FFF",segmentStrokeWidth:1,animateRotate:!0,tooltipEvents:[]})})},function(a,b,c,d){var e=!1;a(".imagify-datas-details").hide(),a(b).on("click",".imagify-datas-more-action a",function(b){var c=a(this);b.preventDefault(),c.hasClass("is-open")?(a(c.attr("href")).slideUp(300).removeClass("is-open"),c.removeClass("is-open").find(".the-text").text(c.data("open"))):(a(c.attr("href")).slideDown(300).addClass("is-open"),c.addClass("is-open").find(".the-text").text(c.data("close")))}),a(b).on("click",".button-imagify-restore, .button-imagify-manual-upload, .button-imagify-manual-override-upload, .button-imagify-optimize-missing-sizes",function(b){var d=a(this),f=d.parents(".column-imagify_optimized_file, .compat-field-imagify .field"),g=d.attr("href");b.preventDefault(),f.length||(f=d.closest(".column")),f.html('<div class="button"><span class="imagify-spinner"></span>'+d.data("waiting-label")+"</div>"),a.get(g.replace("admin-post.php","admin-ajax.php")).done(function(a){e=!0,f.html(a.data),f.find(".imagify-datas-more-action a").addClass("is-open").find(".the-text").text(f.find(".imagify-datas-more-action a").data("close")),f.find(".imagify-datas-details").addClass("is-open"),c.imagify.drawMeAChart(f.find(".imagify-consumption-chart")),e=!1})}),a(c).on("canvasprinted.imagify",function(b,d){var f;d=d||".imagify-consumption-chart",f=a(d),c.imagify.drawMeAChart(f),e||f.closest(".imagify-datas-list").siblings(".imagify-datas-details").hide()}).trigger("canvasprinted.imagify")}(jQuery,document,window);
|
assets/js/notices.js
ADDED
@@ -0,0 +1,123 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
// All notices =====================================================================================
|
2 |
+
(function($, d, w, undefined) { // eslint-disable-line no-unused-vars, no-shadow, no-shadow-restricted-names
|
3 |
+
|
4 |
+
/**
|
5 |
+
* Close an Imagify notice.
|
6 |
+
*/
|
7 |
+
$( '.imagify-notice-dismiss' ).on( 'click.imagify', function( e ) {
|
8 |
+
var $this = $( this ),
|
9 |
+
$parent = $this.parents( '.imagify-welcome, .imagify-notice, .imagify-rkt-notice' ),
|
10 |
+
href = $this.attr( 'href' );
|
11 |
+
|
12 |
+
e.preventDefault();
|
13 |
+
|
14 |
+
// Hide the notice.
|
15 |
+
$parent.fadeTo( 100 , 0, function() {
|
16 |
+
$( this ).slideUp( 100, function() {
|
17 |
+
$( this ).remove();
|
18 |
+
} );
|
19 |
+
} );
|
20 |
+
|
21 |
+
// Save the dismiss notice.
|
22 |
+
$.get( href.replace( 'admin-post.php', 'admin-ajax.php' ) );
|
23 |
+
} );
|
24 |
+
|
25 |
+
} )(jQuery, document, window);
|
26 |
+
|
27 |
+
|
28 |
+
// The "welcome steps" notice + "wrong API key" notice =============================================
|
29 |
+
(function($, d, w, undefined) { // eslint-disable-line no-unused-vars, no-shadow, no-shadow-restricted-names
|
30 |
+
|
31 |
+
/**
|
32 |
+
* 1. Create a new Imagify account.
|
33 |
+
*/
|
34 |
+
$( '#imagify-signup' ).on( 'click.imagify', function( e ) {
|
35 |
+
e.preventDefault();
|
36 |
+
|
37 |
+
// Display the sign up form.
|
38 |
+
swal( {
|
39 |
+
title: imagifyNotices.labels.signupTitle,
|
40 |
+
html: imagifyNotices.labels.signupText,
|
41 |
+
confirmButtonText: imagifyNotices.labels.signupConfirmButtonText,
|
42 |
+
input: 'email',
|
43 |
+
showLoaderOnConfirm: true,
|
44 |
+
customClass: 'imagify-sweet-alert imagify-sweet-alert-signup',
|
45 |
+
inputValidator: function( inputValue ) {
|
46 |
+
return new Promise( function( resolve, reject ) {
|
47 |
+
if ( $.trim( inputValue ) === '' || ! inputValue ) {
|
48 |
+
reject( imagifyNotices.labels.signupErrorEmptyEmail );
|
49 |
+
} else {
|
50 |
+
resolve();
|
51 |
+
}
|
52 |
+
} );
|
53 |
+
},
|
54 |
+
preConfirm: function( inputValue ) {
|
55 |
+
return new Promise( function( resolve, reject ) {
|
56 |
+
setTimeout( function() {
|
57 |
+
$.get( ajaxurl + w.imagify.concat + 'action=imagify_signup&email=' + inputValue + '&imagifysignupnonce=' + $( '#imagifysignupnonce' ).val() )
|
58 |
+
.done( function( response ) {
|
59 |
+
if ( ! response.success ) {
|
60 |
+
reject( response.data );
|
61 |
+
} else {
|
62 |
+
resolve();
|
63 |
+
}
|
64 |
+
} );
|
65 |
+
}, 2000 );
|
66 |
+
} );
|
67 |
+
},
|
68 |
+
} ).then( function() {
|
69 |
+
swal( {
|
70 |
+
title: imagifyNotices.labels.signupSuccessTitle,
|
71 |
+
html: imagifyNotices.labels.signupSuccessText,
|
72 |
+
type: 'success',
|
73 |
+
customClass: 'imagify-sweet-alert'
|
74 |
+
} );
|
75 |
+
} );
|
76 |
+
} );
|
77 |
+
|
78 |
+
/**
|
79 |
+
* 2. Check and save the Imagify API Key.
|
80 |
+
*/
|
81 |
+
$( '#imagify-save-api-key' ).on( 'click.imagify', function( e ) {
|
82 |
+
e.preventDefault();
|
83 |
+
|
84 |
+
// Display the API key form.
|
85 |
+
swal( {
|
86 |
+
title: imagifyNotices.labels.saveApiKeyTitle,
|
87 |
+
html: imagifyNotices.labels.saveApiKeyText,
|
88 |
+
confirmButtonText: imagifyNotices.labels.saveApiKeyConfirmButtonText,
|
89 |
+
input: 'text',
|
90 |
+
showLoaderOnConfirm: true,
|
91 |
+
customClass: 'imagify-sweet-alert imagify-sweet-alert-signup',
|
92 |
+
inputValidator: function( inputValue ) {
|
93 |
+
return new Promise( function( resolve, reject ) {
|
94 |
+
if ( $.trim( inputValue ) === '' || ! inputValue ) {
|
95 |
+
reject( imagifyNotices.labels.ApiKeyErrorEmpty );
|
96 |
+
} else {
|
97 |
+
resolve();
|
98 |
+
}
|
99 |
+
} );
|
100 |
+
},
|
101 |
+
preConfirm: function( inputValue ) {
|
102 |
+
return new Promise( function( resolve, reject ) {
|
103 |
+
$.get( ajaxurl + w.imagify.concat + 'action=imagify_check_api_key_validity&api_key=' + inputValue + '&imagifycheckapikeynonce=' + $( '#imagifycheckapikeynonce' ).val() )
|
104 |
+
.done( function( response ) {
|
105 |
+
if ( ! response.success ) {
|
106 |
+
reject( response.data );
|
107 |
+
} else {
|
108 |
+
resolve();
|
109 |
+
}
|
110 |
+
} );
|
111 |
+
} );
|
112 |
+
},
|
113 |
+
} ).then( function() {
|
114 |
+
swal( {
|
115 |
+
title: imagifyNotices.labels.ApiKeyCheckSuccessTitle,
|
116 |
+
html: imagifyNotices.labels.ApiKeyCheckSuccessText,
|
117 |
+
type: 'success',
|
118 |
+
customClass: 'imagify-sweet-alert'
|
119 |
+
} );
|
120 |
+
} );
|
121 |
+
} );
|
122 |
+
|
123 |
+
} )(jQuery, document, window);
|
assets/js/notices.min.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
!function(a,b,c,d){a(".imagify-notice-dismiss").on("click.imagify",function(b){var c=a(this),d=c.parents(".imagify-welcome, .imagify-notice, .imagify-rkt-notice"),e=c.attr("href");b.preventDefault(),d.fadeTo(100,0,function(){a(this).slideUp(100,function(){a(this).remove()})}),a.get(e.replace("admin-post.php","admin-ajax.php"))})}(jQuery,document,window),function(a,b,c,d){a("#imagify-signup").on("click.imagify",function(b){b.preventDefault(),swal({title:imagifyNotices.labels.signupTitle,html:imagifyNotices.labels.signupText,confirmButtonText:imagifyNotices.labels.signupConfirmButtonText,input:"email",showLoaderOnConfirm:!0,customClass:"imagify-sweet-alert imagify-sweet-alert-signup",inputValidator:function(b){return new Promise(function(c,d){""!==a.trim(b)&&b?c():d(imagifyNotices.labels.signupErrorEmptyEmail)})},preConfirm:function(b){return new Promise(function(d,e){setTimeout(function(){a.get(ajaxurl+c.imagify.concat+"action=imagify_signup&email="+b+"&imagifysignupnonce="+a("#imagifysignupnonce").val()).done(function(a){a.success?d():e(a.data)})},2e3)})}}).then(function(){swal({title:imagifyNotices.labels.signupSuccessTitle,html:imagifyNotices.labels.signupSuccessText,type:"success",customClass:"imagify-sweet-alert"})})}),a("#imagify-save-api-key").on("click.imagify",function(b){b.preventDefault(),swal({title:imagifyNotices.labels.saveApiKeyTitle,html:imagifyNotices.labels.saveApiKeyText,confirmButtonText:imagifyNotices.labels.saveApiKeyConfirmButtonText,input:"text",showLoaderOnConfirm:!0,customClass:"imagify-sweet-alert imagify-sweet-alert-signup",inputValidator:function(b){return new Promise(function(c,d){""!==a.trim(b)&&b?c():d(imagifyNotices.labels.ApiKeyErrorEmpty)})},preConfirm:function(b){return new Promise(function(d,e){a.get(ajaxurl+c.imagify.concat+"action=imagify_check_api_key_validity&api_key="+b+"&imagifycheckapikeynonce="+a("#imagifycheckapikeynonce").val()).done(function(a){a.success?d():e(a.data)})})}}).then(function(){swal({title:imagifyNotices.labels.ApiKeyCheckSuccessTitle,html:imagifyNotices.labels.ApiKeyCheckSuccessText,type:"success",customClass:"imagify-sweet-alert"})})})}(jQuery,document,window);
|
assets/js/options.js
CHANGED
@@ -1,17 +1,3 @@
|
|
1 |
-
window.imagify = window.imagify || {
|
2 |
-
concat: ajaxurl.indexOf( '?' ) > 0 ? '&' : '?',
|
3 |
-
log: function( content ) {
|
4 |
-
if ( undefined !== console ) {
|
5 |
-
console.log( content ); // eslint-disable-line no-console
|
6 |
-
}
|
7 |
-
},
|
8 |
-
info: function( content ) {
|
9 |
-
if ( undefined !== console ) {
|
10 |
-
console.info( content ); // eslint-disable-line no-console
|
11 |
-
}
|
12 |
-
}
|
13 |
-
};
|
14 |
-
|
15 |
(function($, d, w, undefined) { // eslint-disable-line no-unused-vars, no-shadow, no-shadow-restricted-names
|
16 |
/*
|
17 |
* Process an API key check validity.
|
@@ -28,7 +14,7 @@ window.imagify = window.imagify || {
|
|
28 |
}
|
29 |
|
30 |
if ( $( '#check_api_key' ).val() === value ) {
|
31 |
-
$( '#imagify-check-api-container' ).html( '<span class="dashicons dashicons-yes"></span> ' +
|
32 |
return false;
|
33 |
}
|
34 |
|
@@ -36,12 +22,12 @@ window.imagify = window.imagify || {
|
|
36 |
xhr.abort();
|
37 |
} else {
|
38 |
$( '#imagify-check-api-container' ).remove();
|
39 |
-
obj.after( '<span id="imagify-check-api-container"><span class="imagify-spinner"></span>' +
|
40 |
}
|
41 |
|
42 |
busy = true;
|
43 |
|
44 |
-
xhr = $.get( ajaxurl + imagify.concat + 'action=imagify_check_api_key_validity&api_key=' + obj.val() + '&imagifycheckapikeynonce=' + $( '#imagifycheckapikeynonce' ).val() )
|
45 |
.done( function( response ) {
|
46 |
if ( ! response.success ) {
|
47 |
$( '#imagify-check-api-container' ).html( '<span class="dashicons dashicons-no"></span> ' + response.data );
|
@@ -49,8 +35,8 @@ window.imagify = window.imagify || {
|
|
49 |
// Success, the API key is valid.
|
50 |
$( '#imagify-check-api-container' ).remove();
|
51 |
swal( {
|
52 |
-
title:
|
53 |
-
html:
|
54 |
type: 'success',
|
55 |
customClass: 'imagify-sweet-alert'
|
56 |
} ).then( function() {
|
@@ -121,12 +107,12 @@ window.imagify = window.imagify || {
|
|
121 |
|
122 |
// Are you sure? No backup?
|
123 |
swal( {
|
124 |
-
title: imagifyOptions.noBackupTitle,
|
125 |
-
html: imagifyOptions.noBackupText,
|
126 |
type: 'warning',
|
127 |
customClass: 'imagify-sweet-alert',
|
128 |
showCancelButton: true,
|
129 |
-
cancelButtonText:
|
130 |
reverseButtons: true
|
131 |
} ).then(
|
132 |
function() {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
(function($, d, w, undefined) { // eslint-disable-line no-unused-vars, no-shadow, no-shadow-restricted-names
|
2 |
/*
|
3 |
* Process an API key check validity.
|
14 |
}
|
15 |
|
16 |
if ( $( '#check_api_key' ).val() === value ) {
|
17 |
+
$( '#imagify-check-api-container' ).html( '<span class="dashicons dashicons-yes"></span> ' + imagifyOptions.labels.ValidApiKeyText );
|
18 |
return false;
|
19 |
}
|
20 |
|
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>' + imagifyOptions.labels.waitApiKeyCheckText + '</span>' );
|
26 |
}
|
27 |
|
28 |
busy = true;
|
29 |
|
30 |
+
xhr = $.get( ajaxurl + w.imagify.concat + '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 );
|
35 |
// Success, the API key is valid.
|
36 |
$( '#imagify-check-api-container' ).remove();
|
37 |
swal( {
|
38 |
+
title: imagifyOptions.labels.ApiKeyCheckSuccessTitle,
|
39 |
+
html: imagifyOptions.labels.ApiKeyCheckSuccessText,
|
40 |
type: 'success',
|
41 |
customClass: 'imagify-sweet-alert'
|
42 |
} ).then( function() {
|
107 |
|
108 |
// Are you sure? No backup?
|
109 |
swal( {
|
110 |
+
title: imagifyOptions.labels.noBackupTitle,
|
111 |
+
html: imagifyOptions.labels.noBackupText,
|
112 |
type: 'warning',
|
113 |
customClass: 'imagify-sweet-alert',
|
114 |
showCancelButton: true,
|
115 |
+
cancelButtonText: imagifySwal.labels.cancelButtonText,
|
116 |
reverseButtons: true
|
117 |
} ).then(
|
118 |
function() {
|
assets/js/options.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
|
1 |
+
!function(a,b,c,d){var e=!1,f=!1;a("#imagify-settings #api_key").on("blur",function(){var b=a(this),d=b.val();return""!==a.trim(d)&&(a("#check_api_key").val()===d?(a("#imagify-check-api-container").html('<span class="dashicons dashicons-yes"></span> '+imagifyOptions.labels.ValidApiKeyText),!1):(!0===e?f.abort():(a("#imagify-check-api-container").remove(),b.after('<span id="imagify-check-api-container"><span class="imagify-spinner"></span>'+imagifyOptions.labels.waitApiKeyCheckText+"</span>")),e=!0,void(f=a.get(ajaxurl+c.imagify.concat+"action=imagify_check_api_key_validity&api_key="+b.val()+"&imagifycheckapikeynonce="+a("#imagifycheckapikeynonce").val()).done(function(b){b.success?(a("#imagify-check-api-container").remove(),swal({title:imagifyOptions.labels.ApiKeyCheckSuccessTitle,html:imagifyOptions.labels.ApiKeyCheckSuccessText,type:"success",customClass:"imagify-sweet-alert"}).then(function(){location.reload()})):a("#imagify-check-api-container").html('<span class="dashicons dashicons-no"></span> '+b.data),e=!1}))))}),a(".imagify-options-line").css("cursor","pointer").on("click",function(b){if("INPUT"!==b.target.nodeName)return a('input[aria-describedby="'+a(this).attr("id")+'"]').trigger("click"),!1}),a(".imagify-settings th span").on("click",function(){var b=a(this).parent().next("td").find("input:checkbox");1===b.length&&b.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(){var b=a(this),c=b.siblings("#backup-dir-is-writable"),d={action:"imagify_check_backup_dir_is_writable",_wpnonce:c.data("nonce")};if(b.is(":checked"))return void a.getJSON(ajaxurl,d).done(function(b){a.isPlainObject(b)&&b.success&&(b.data.is_writable?c.addClass("hidden"):c.removeClass("hidden"))});swal({title:imagifyOptions.labels.noBackupTitle,html:imagifyOptions.labels.noBackupText,type:"warning",customClass:"imagify-sweet-alert",showCancelButton:!0,cancelButtonText:imagifySwal.labels.cancelButtonText,reverseButtons:!0}).then(function(){c.addClass("hidden")},function(){b.prop("checked",!0)})})}(jQuery,document,window),function(a,b,c,d){var e=c.propHooks.checked;c.propHooks.checked={set:function(a,b,d){var f;return f=void 0===e?a[d]=b:e(a,b,d),c(a).trigger("change.imagify"),f}},c(".imagify-check-group .imagify-row-check").on("click",function(){var a=c(this).closest(".imagify-check-group"),b=0===a.find(".imagify-row-check").filter(":visible:enabled").not(":checked").length;a.find(".imagify-toggle-check").prop("checked",b)}).first().trigger("change.imagify"),c(".imagify-check-group .imagify-toggle-check").on("click.wp-toggle-checkboxes",function(a){var b=c(this),d=b.closest(".imagify-check-group"),e=b.prop("checked"),f=a.shiftKey||b.data("wp-toggle");d.find(".imagify-toggle-check").prop("checked",function(){var a=c(this);return!a.is(":hidden,:disabled")&&(f?!a.prop("checked"):!!e)}),d.find(".imagify-row-check").prop("checked",function(){return!f&&!!e})})}(window,document,jQuery);
|
assets/js/pricing-modal.js
ADDED
@@ -0,0 +1,977 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
// Imagify tabs ====================================================================================
|
2 |
+
(function($, d, w, undefined) { // eslint-disable-line no-unused-vars, no-shadow, no-shadow-restricted-names
|
3 |
+
|
4 |
+
/**
|
5 |
+
* @Markup:
|
6 |
+
* ul.imagify-tabs
|
7 |
+
* li.imagify-tab.imagify-current
|
8 |
+
* a[href="#target"]
|
9 |
+
* div.imagify-tabs-contents
|
10 |
+
* div.imagify-tab-content#target
|
11 |
+
*/
|
12 |
+
$( d ).on( 'click.imagify', '.imagify-tab', function( e ) {
|
13 |
+
var $_this = $( this ),
|
14 |
+
curr_class = 'imagify-current',
|
15 |
+
target;
|
16 |
+
|
17 |
+
e.preventDefault();
|
18 |
+
|
19 |
+
if ( $_this.hasClass( 'imagify-current' ) ) {
|
20 |
+
return;
|
21 |
+
}
|
22 |
+
|
23 |
+
target = $_this.find( 'a' ).attr( 'href' ) || '#' + $_this.find( 'a' ).attr( 'aria-controls' );
|
24 |
+
|
25 |
+
// Show right tab content.
|
26 |
+
$_this.closest( '.imagify-tabs' ).next( '.imagify-tabs-contents' ).find( '.imagify-tab-content' ).hide().attr( 'aria-hidden', 'true' );
|
27 |
+
$( target ).fadeIn( 275 ).attr( 'aria-hidden', 'false' );
|
28 |
+
|
29 |
+
// Change active tabs.
|
30 |
+
$_this.closest( '.imagify-tabs' ).find( '.imagify-tab' ).removeClass( curr_class ).attr( 'aria-selected', 'false' );
|
31 |
+
$_this.addClass( curr_class ).attr( 'aria-selected', 'true' );
|
32 |
+
} );
|
33 |
+
|
34 |
+
} )(jQuery, document, window);
|
35 |
+
|
36 |
+
|
37 |
+
// Imagify payment modal ===========================================================================
|
38 |
+
(function($, d, w, undefined) { // eslint-disable-line no-unused-vars, no-shadow, no-shadow-restricted-names
|
39 |
+
|
40 |
+
/**
|
41 |
+
* Payment Modal.
|
42 |
+
*
|
43 |
+
* @since 1.6
|
44 |
+
* @since 1.6.3 include discount campaign
|
45 |
+
* @author Geoffrey
|
46 |
+
*/
|
47 |
+
var imagifyModal = {};
|
48 |
+
|
49 |
+
if ( ! $( '#imagify-pricing-modal' ).length ) {
|
50 |
+
return;
|
51 |
+
}
|
52 |
+
|
53 |
+
imagifyModal = {
|
54 |
+
$modal: $( '#imagify-pricing-modal' ),
|
55 |
+
$checkboxes: $( '.imagify-offer-line .imagify-checkbox' ),
|
56 |
+
$radios: $( '.imagify-payment-modal .imagify-radio-line input' ),
|
57 |
+
// Plans selection view & payment process view hidden by default.
|
58 |
+
$preView: $( '#imagify-pre-checkout-view' ),
|
59 |
+
$plansView: $( '#imagify-plans-selection-view' ).hide(),
|
60 |
+
$paymentView: $( '#imagify-payment-process-view' ).hide(),
|
61 |
+
$successView: $( '#imagify-success-view' ).hide(),
|
62 |
+
$anotherBtn: $( '.imagify-choose-another-plan' ),
|
63 |
+
speedFadeIn: 300,
|
64 |
+
|
65 |
+
getHtmlPrice: function( content, period ) {
|
66 |
+
var monthly, yearly, m, y, output;
|
67 |
+
|
68 |
+
if ( ! period ) {
|
69 |
+
period = null;
|
70 |
+
}
|
71 |
+
|
72 |
+
if ( typeof content !== 'object' ) {
|
73 |
+
content += ''; // Be sure content is a string.
|
74 |
+
content = content.split( '.' );
|
75 |
+
content[1] = content[1].length === 1 ? content[1] + '0' : ( '' + content[1] ).substring( 0, 2 );
|
76 |
+
|
77 |
+
output = '<span class="imagify-price-big">' + content[0] + '</span> ';
|
78 |
+
output += '<span class="imagify-price-mini">.' + content[1] + '</span>';
|
79 |
+
|
80 |
+
return output;
|
81 |
+
}
|
82 |
+
|
83 |
+
monthly = content.monthly + '';
|
84 |
+
yearly = content.yearly + '';
|
85 |
+
m = monthly.split( '.' );
|
86 |
+
y = yearly.split( '.' );
|
87 |
+
output = '<span class="imagify-switch-my">';
|
88 |
+
/* eslint-disable indent */
|
89 |
+
output += '<span aria-hidden="' + ( period === 'monthly' ? 'false' : 'true' ) + '" class="imagify-monthly">';
|
90 |
+
output += '<span class="imagify-price-big">' + m[0] + '</span> ';
|
91 |
+
output += '<span class="imagify-price-mini">.' + ( m[1].length === 1 ? m[1] + '0' : ( '' + m[1] ).substring( 0, 2 ) ) + '</span>';
|
92 |
+
output += '</span> ';
|
93 |
+
output += '<span aria-hidden="' + ( period === 'yearly' ? 'false' : 'true' ) + '" class="imagify-yearly">';
|
94 |
+
output += '<span class="imagify-price-big">' + y[0] + '</span> ';
|
95 |
+
output += '<span class="imagify-price-mini">.' + ( y[1].length === 1 ? y[1] + '0' : ( '' + y[1] ).substring( 0, 2 ) ) + '</span>';
|
96 |
+
output += '</span>';
|
97 |
+
/* eslint-enable indent */
|
98 |
+
output += '</span>';
|
99 |
+
|
100 |
+
return output;
|
101 |
+
},
|
102 |
+
|
103 |
+
getHtmlDiscountPrice: function( content, period ) {
|
104 |
+
var monthly, yearly,
|
105 |
+
output = '';
|
106 |
+
|
107 |
+
if ( ! period ) {
|
108 |
+
period = null;
|
109 |
+
}
|
110 |
+
|
111 |
+
if ( typeof content === 'object' ) {
|
112 |
+
monthly = content.monthly + '';
|
113 |
+
yearly = content.yearly + '';
|
114 |
+
|
115 |
+
output += '<span class="imagify-price-discount">';
|
116 |
+
/* eslint-disable indent */
|
117 |
+
output += '<span class="imagify-price-discount-dollar">$</span>';
|
118 |
+
output += '<span class="imagify-switch-my">';
|
119 |
+
output += '<span aria-hidden="' + ( period === 'monthly' ? 'false' : 'true' ) + '" class="imagify-monthly">';
|
120 |
+
output += '<span class="imagify-price-discount-number">' + monthly + '</span>';
|
121 |
+
output += '</span>';
|
122 |
+
output += '<span aria-hidden="' + ( period === 'yearly' ? 'false' : 'true' ) + '" class="imagify-yearly">';
|
123 |
+
output += '<span class="imagify-price-discount-number">' + yearly + '</span>';
|
124 |
+
output += '</span>';
|
125 |
+
output += '</span>';
|
126 |
+
/* eslint-enable indent */
|
127 |
+
output += '</span>';
|
128 |
+
} else {
|
129 |
+
content += ''; // Be sure content is a string.
|
130 |
+
output += '<span class="imagify-price-discount">';
|
131 |
+
/* eslint-disable indent */
|
132 |
+
output += '<span class="imagify-price-discount-dollar">$</span>';
|
133 |
+
output += '<span class="imagify-price-discount-number">' + content + '</span>';
|
134 |
+
/* eslint-enable indent */
|
135 |
+
output += '</span>';
|
136 |
+
}
|
137 |
+
|
138 |
+
return output;
|
139 |
+
},
|
140 |
+
|
141 |
+
/**
|
142 |
+
* @uses imagifyModal.getHtmlPrice()
|
143 |
+
* @uses imagifyModal.getHtmlDiscountPrice()
|
144 |
+
*/
|
145 |
+
populateOffer: function ( $offer, datas, type, classes ) {
|
146 |
+
var promo = w.imagify_discount_datas,
|
147 |
+
add = datas.additional_gb, // 4 (monthly)
|
148 |
+
ann = datas.annual_cost, // 49.9 (monthly)
|
149 |
+
id = datas.id, // 3 (monthly/onetime)
|
150 |
+
lab = datas.label, // 'lite' (monthly/onetime)
|
151 |
+
mon = datas.monthly_cost, // 4.99 (monthly)
|
152 |
+
quo = datas.quota, // 1000 (MB) - 5000 images (monthly/onetime)
|
153 |
+
cos = datas.cost, // 3.49 (onetime)
|
154 |
+
name = ( quo >= 1000 ? quo / 1000 + ' GB' : quo + ' MB' ),
|
155 |
+
pcs = type === 'monthly' ? { monthly: mon, yearly: Math.round( ann / 12 * 100 ) / 100 } : cos,
|
156 |
+
pcsd = pcs, // Used if discount is active.
|
157 |
+
percent, $datas_c, datas_content;
|
158 |
+
|
159 |
+
// Change pricing value only if discount in percentage is active and if offer is a monthly and not a onetime.
|
160 |
+
if ( promo.is_active && 'percentage' === promo.coupon_type && 'monthly' === type ) {
|
161 |
+
percent = ( 100 - promo.coupon_value ) / 100;
|
162 |
+
pcs = 'monthly' === type ? { monthly: mon * percent, yearly: Math.round( ( ann * percent ) / 12 * 100 ) / 100 } : cos * percent;
|
163 |
+
}
|
164 |
+
|
165 |
+
if ( typeof classes !== 'undefined' ) {
|
166 |
+
$offer.addClass( 'imagify-' + type + '-' + lab + classes);
|
167 |
+
}
|
168 |
+
|
169 |
+
// Name.
|
170 |
+
$offer.find( '.imagify-offer-size' ).text( name );
|
171 |
+
|
172 |
+
// Main prices (pcs can be an object or a string).
|
173 |
+
$offer.find( '.imagify-number-block' ).html( imagifyModal.getHtmlPrice( pcs, 'monthly' ) );
|
174 |
+
|
175 |
+
// discount prices
|
176 |
+
if ( promo.is_active && 'percentage' === promo.coupon_type && 'monthly' === type ) {
|
177 |
+
|
178 |
+
$offer.find( '.imagify-price-block' ).prev( '.imagify-price-discount' ).remove();
|
179 |
+
$offer.find( '.imagify-price-block' ).before( imagifyModal.getHtmlDiscountPrice( pcsd, 'monthly' ) );
|
180 |
+
}
|
181 |
+
|
182 |
+
// Nb images.
|
183 |
+
$offer.find( '.imagify-approx-nb' ).text( quo * 5 );
|
184 |
+
|
185 |
+
if ( 'monthly' === type ) {
|
186 |
+
// Additionnal price.
|
187 |
+
$offer.find( '.imagify-price-add-data' ).text( '$' + add );
|
188 |
+
}
|
189 |
+
|
190 |
+
// Button data-offer attr.
|
191 |
+
$datas_c = $offer.find( '.imagify-payment-btn-select-plan' ).length ? $offer.find( '.imagify-payment-btn-select-plan' ) : $offer;
|
192 |
+
|
193 |
+
if ( 'monthly' === type ) {
|
194 |
+
datas_content = '{"' + lab + '":{"id":' + id + ',"name":"' + name + '","data":' + quo + ',"dataf":"' + name + '","imgs":' + ( quo * 5 ) + ',"prices":{"monthly":' + pcs.monthly + ',"yearly":' + pcs.yearly + ',"add":' + add + '}}}';
|
195 |
+
} else {
|
196 |
+
datas_content = '{"ot' + lab + '":{"id":' + id + ',"name":"' + name + '","data":' + quo + ',"dataf":"' + name + '","imgs":' + ( quo * 5 ) + ',"price":' + pcs + '}}';
|
197 |
+
}
|
198 |
+
|
199 |
+
$datas_c.attr( 'data-offer', datas_content );
|
200 |
+
|
201 |
+
return $offer;
|
202 |
+
},
|
203 |
+
|
204 |
+
populatePayBtn: function() {
|
205 |
+
var pl_datas = JSON.parse( $( '.imagify-offer-monthly' ).attr( 'data-offer' ) ),
|
206 |
+
ot_datas = JSON.parse( $( '.imagify-offer-onetime' ).attr( 'data-offer' ) ),
|
207 |
+
price = 0,
|
208 |
+
price_pl = 0,
|
209 |
+
price_ot = 0;
|
210 |
+
|
211 |
+
// Calculate price_pl only if that offer is selected.
|
212 |
+
if ( $( '.imagify-offer-monthly' ).hasClass( 'imagify-offer-selected' ) ) {
|
213 |
+
if ( $( '#imagify-subscription-monthly' ).filter( ':checked' ).length ) {
|
214 |
+
price_pl = pl_datas[ Object.keys( pl_datas )[0] ].prices.monthly;
|
215 |
+
} else {
|
216 |
+
price_pl = pl_datas[ Object.keys( pl_datas )[0] ].prices.yearly * 12;
|
217 |
+
}
|
218 |
+
}
|
219 |
+
|
220 |
+
// Calculate price_ot only if that offer is selected.
|
221 |
+
if ( $( '.imagify-offer-onetime' ).hasClass( 'imagify-offer-selected' ) ) {
|
222 |
+
price_ot = ot_datas[ Object.keys( ot_datas )[0] ].price;
|
223 |
+
}
|
224 |
+
|
225 |
+
// Calculate price.
|
226 |
+
price = parseFloat( price_ot + price_pl ).toFixed( 2 );
|
227 |
+
|
228 |
+
// Edit button price.
|
229 |
+
//$( '.imagify-global-amount' ).text( price ); // Not used.
|
230 |
+
|
231 |
+
if ( '0.00' === price || 0 === price ) {
|
232 |
+
$( '#imagify-modal-checkout-btn' ).attr( 'disabled', 'disabled' ).addClass( 'imagify-button-disabled' );
|
233 |
+
} else {
|
234 |
+
$( '#imagify-modal-checkout-btn' ).removeAttr( 'disabled' ).removeClass( 'imagify-button-disabled' );
|
235 |
+
}
|
236 |
+
},
|
237 |
+
|
238 |
+
checkCoupon: function() {
|
239 |
+
var code = $( '#imagify-coupon-code' ).val(),
|
240 |
+
$cptext, $label, $section, nonce;
|
241 |
+
|
242 |
+
if ( '' === code ) {
|
243 |
+
return;
|
244 |
+
}
|
245 |
+
|
246 |
+
$cptext = $( '.imagify-coupon-text' );
|
247 |
+
$label = $cptext.find( 'label' );
|
248 |
+
$section = $( '.imagify-coupon-section' );
|
249 |
+
nonce = $( '#imagify-get-pricing-modal' ).data( 'nonce' );
|
250 |
+
|
251 |
+
$cptext.addClass( 'checking' );
|
252 |
+
|
253 |
+
// Get the true prices.
|
254 |
+
$.post( ajaxurl, { action: 'imagify_check_coupon', coupon: code, imagifynonce: nonce }, function( response ) {
|
255 |
+
var coupon_value;
|
256 |
+
|
257 |
+
$cptext.removeClass( 'checking' );
|
258 |
+
|
259 |
+
// Error during the request.
|
260 |
+
if ( ! response.success ) {
|
261 |
+
$section.removeClass( 'validated' ).addClass( 'invalid' );
|
262 |
+
$label.text( imagifyPricingModal.labels.errorCouponAPI );
|
263 |
+
} else if ( response.data.success ) {
|
264 |
+
coupon_value = 'percentage' === response.data.coupon_type ? response.data.value + '%' : '$' + response.data.value;
|
265 |
+
$section.removeClass( 'invalid' ).addClass( 'validated' );
|
266 |
+
$label.html( imagifyPricingModal.labels.successCouponAPI );
|
267 |
+
$label.find( '.imagify-coupon-offer' ).text( coupon_value );
|
268 |
+
$label.find( '.imagify-coupon-word' ).text( code );
|
269 |
+
} else {
|
270 |
+
$section.removeClass( 'validated' ).addClass( 'invalid' );
|
271 |
+
$label.text( response.data.detail );
|
272 |
+
}
|
273 |
+
} );
|
274 |
+
},
|
275 |
+
|
276 |
+
/**
|
277 |
+
* @uses imagifyModal.populateOffer()
|
278 |
+
* @uses imagifyModal.populatePayBtn()
|
279 |
+
* @uses imagifyModal.checkCoupon()
|
280 |
+
*/
|
281 |
+
getPricing: function( $button ){
|
282 |
+
var nonce = $button.data( 'nonce' ),
|
283 |
+
prices_rq_datas = {
|
284 |
+
action: 'imagify_get_prices',
|
285 |
+
imagifynonce: nonce
|
286 |
+
},
|
287 |
+
imgs_rq_datas = {
|
288 |
+
action: 'imagify_get_images_counts',
|
289 |
+
imagifynonce: nonce
|
290 |
+
},
|
291 |
+
prices_rq_discount = {
|
292 |
+
action: 'imagify_get_discount',
|
293 |
+
imagifynonce: nonce
|
294 |
+
};
|
295 |
+
|
296 |
+
imagifyModal.$modal.find( '.imagify-modal-loader' ).hide().show();
|
297 |
+
|
298 |
+
/**
|
299 |
+
* TODO: change the way to waterfall requests.
|
300 |
+
* Use setInterval + counter instead.
|
301 |
+
*/
|
302 |
+
|
303 |
+
// Get the true prices.
|
304 |
+
$.post( ajaxurl, prices_rq_datas, function( prices_response ) {
|
305 |
+
|
306 |
+
if ( ! prices_response.success ) {
|
307 |
+
// TODO: replace modal content by any information.
|
308 |
+
// An error occurred.
|
309 |
+
|
310 |
+
// Populate Pay button.
|
311 |
+
imagifyModal.populatePayBtn();
|
312 |
+
return;
|
313 |
+
}
|
314 |
+
|
315 |
+
// get the image estimates sizes
|
316 |
+
$.post( ajaxurl, imgs_rq_datas, function( imgs_response ) {
|
317 |
+
|
318 |
+
if ( ! imgs_response.success ) {
|
319 |
+
// TODO: replace modal content by any information.
|
320 |
+
// An error occurred.
|
321 |
+
return;
|
322 |
+
}
|
323 |
+
|
324 |
+
// Get the discount informations.
|
325 |
+
$.post( ajaxurl, prices_rq_discount, function( discount_response ) {
|
326 |
+
var images_datas, prices_datas, promo_datas, monthlies, onetimes,
|
327 |
+
mo_user_cons, ot_user_cons,
|
328 |
+
$mo_tpl, $ot_tpl,
|
329 |
+
ot_clone, mo_clone,
|
330 |
+
ot_html = '',
|
331 |
+
mo_html = '',
|
332 |
+
ot_suggested = false,
|
333 |
+
mo_suggested = false,
|
334 |
+
$estim_block, $offers_block,
|
335 |
+
$banners, date_end, promo, discount,
|
336 |
+
prev_offers, nb_to_remove, $total_offers,
|
337 |
+
i, j;
|
338 |
+
|
339 |
+
if ( ! discount_response.success ) {
|
340 |
+
// TODO: replace modal content by any information.
|
341 |
+
// An error occurred.
|
342 |
+
return;
|
343 |
+
}
|
344 |
+
|
345 |
+
images_datas = imgs_response.data;
|
346 |
+
prices_datas = prices_response.data;
|
347 |
+
promo_datas = discount_response.data;
|
348 |
+
monthlies = prices_datas.monthlies;
|
349 |
+
onetimes = prices_datas.onetimes;
|
350 |
+
mo_user_cons = Math.round( images_datas.average_month_size.raw / 1000000 ); // 1000000 in MB,
|
351 |
+
ot_user_cons = Math.round( images_datas.total_library_size.raw / 1000000 ); // in MB,
|
352 |
+
$mo_tpl = $( '#imagify-offer-monthly-template' );
|
353 |
+
$ot_tpl = $( '#imagify-offer-onetime-template' );
|
354 |
+
ot_clone = $ot_tpl.html();
|
355 |
+
mo_clone = $mo_tpl.html();
|
356 |
+
$estim_block = $( '.imagify-estimation-block' );
|
357 |
+
|
358 |
+
// Refresh Analyzing block.
|
359 |
+
$estim_block.removeClass( 'imagify-analyzing' );
|
360 |
+
$estim_block.find( '.average-month-size' ).text( images_datas.average_month_size.human );
|
361 |
+
$estim_block.find( '.total-library-size' ).text( images_datas.total_library_size.human );
|
362 |
+
|
363 |
+
// Switch offers title is < 25mb.
|
364 |
+
if ( mo_user_cons < 25 && ot_user_cons < 25 ) {
|
365 |
+
$( '.imagify-pre-checkout-offers .imagify-modal-title' ).addClass( 'imagify-enough-free' );
|
366 |
+
$( '.imagify-offer-selected' ).removeClass( 'imagify-offer-selected' ).find( '.imagify-checkbox' ).removeAttr( 'checked' );
|
367 |
+
} else {
|
368 |
+
$( '.imagify-enough-free' ).removeClass( 'imagify-enough-free' );
|
369 |
+
$( '.imagify-offer-selected' ).addClass( 'imagify-offer-selected' ).find( '.imagify-checkbox' ).attr( 'checked', 'checked' );
|
370 |
+
}
|
371 |
+
|
372 |
+
// Don't create prices table if something went wrong during request.
|
373 |
+
if ( null === monthlies || null === onetimes ) {
|
374 |
+
$offers_block = $( '.imagify-pre-checkout-offers' );
|
375 |
+
|
376 |
+
// Hide main content.
|
377 |
+
$offers_block.hide().attr( 'aria-hidden', true );
|
378 |
+
|
379 |
+
// Show error message.
|
380 |
+
$offers_block.closest( '.imagify-modal-views' ).find( '.imagify-popin-message' ).remove();
|
381 |
+
$offers_block.after( '<div class="imagify-popin-message imagify-error"><p>' + imagifyPricingModal.labels.errorPriceAPI + '</p></div>' );
|
382 |
+
|
383 |
+
// Show the modal content.
|
384 |
+
imagifyModal.$modal.find( '.imagify-modal-loader' ).fadeOut( 300 );
|
385 |
+
return;
|
386 |
+
}
|
387 |
+
|
388 |
+
// Autofill coupon code & Show banner if discount is active.
|
389 |
+
w.imagify_discount_datas = promo_datas;
|
390 |
+
|
391 |
+
if ( promo_datas.is_active ) {
|
392 |
+
$banners = $( '.imagify-modal-promotion' );
|
393 |
+
date_end = promo_datas.date_end.split( 'T' )[0];
|
394 |
+
promo = promo_datas.coupon_value;
|
395 |
+
discount = 'percentage' === promo_datas.coupon_type ? promo + '%' : '$' + promo;
|
396 |
+
|
397 |
+
// Fill coupon code.
|
398 |
+
$( '#imagify-coupon-code' ).val( promo_datas.label ).attr( 'readonly', true );
|
399 |
+
|
400 |
+
// Show banners.
|
401 |
+
$banners.addClass( 'active' ).attr( 'aria-hidden', 'false' );
|
402 |
+
|
403 |
+
// Populate banners.
|
404 |
+
$banners.find( '.imagify-promotion-number' ).text( discount );
|
405 |
+
$banners.find( '.imagify-promotion-date' ).text( date_end );
|
406 |
+
|
407 |
+
// Auto validate coupon.
|
408 |
+
imagifyModal.checkCoupon();
|
409 |
+
}
|
410 |
+
|
411 |
+
/**
|
412 |
+
* Below lines will build Plan and Onetime offers lists.
|
413 |
+
* It will also pre-select a Plan and Onetime in both of views: pre-checkout and pricing tables.
|
414 |
+
*/
|
415 |
+
|
416 |
+
// Now, do the MONTHLIES Markup.
|
417 |
+
$.each( monthlies, function( index, value ) {
|
418 |
+
var $tpl, $offer,
|
419 |
+
classes = '';
|
420 |
+
|
421 |
+
// If it's free, don't show it.
|
422 |
+
if ( 'free' === value.label ) {
|
423 |
+
return true; // Continue-like (but $.each is not a loop... so).
|
424 |
+
}
|
425 |
+
|
426 |
+
$tpl = $( mo_clone ).clone();
|
427 |
+
|
428 |
+
// If offer is too big (far) than estimated needs, don't show the offer.
|
429 |
+
if ( false !== mo_suggested && ( index - mo_suggested ) > 2 ) {
|
430 |
+
return true;
|
431 |
+
}
|
432 |
+
|
433 |
+
// Parent classes.
|
434 |
+
if ( ( mo_user_cons < value.quota && false === mo_suggested ) ) {
|
435 |
+
classes = ' imagify-offer-selected';
|
436 |
+
mo_suggested = index;
|
437 |
+
|
438 |
+
// Add this offer as pre-selected item in pre-checkout view.
|
439 |
+
$offer = $( '.imagify-pre-checkout-offers' ).find( '.imagify-offer-monthly' );
|
440 |
+
|
441 |
+
// Populate the Pre-checkout view depending on user_cons.
|
442 |
+
imagifyModal.populateOffer( $offer, value, 'monthly' );
|
443 |
+
}
|
444 |
+
|
445 |
+
// Populate each offer.
|
446 |
+
$tpl = imagifyModal.populateOffer( $tpl, value, 'monthly', classes );
|
447 |
+
|
448 |
+
// Complete Monthlies HTML.
|
449 |
+
mo_html += $tpl[0].outerHTML;
|
450 |
+
} );
|
451 |
+
|
452 |
+
// Deal with the case of too much small offers (before recommanded one).
|
453 |
+
prev_offers = $( mo_html ).filter( '.imagify-offer-selected' ).prevAll();
|
454 |
+
|
455 |
+
// If we have more than 1 previous offer.
|
456 |
+
if ( prev_offers.length > 1 ) {
|
457 |
+
nb_to_remove = prev_offers.length - 1;
|
458 |
+
$total_offers = $( mo_html );
|
459 |
+
|
460 |
+
// Remove too far previous offer.
|
461 |
+
for ( i = 0; i < nb_to_remove; i++ ) {
|
462 |
+
delete $total_offers[ i ];
|
463 |
+
}
|
464 |
+
|
465 |
+
// Rebuild mo_html with removed items.
|
466 |
+
mo_html = '';
|
467 |
+
for ( j = 0; j < $total_offers.length; j++) {
|
468 |
+
mo_html += $( '<div/>' ).append( $total_offers[ j ] ).html();
|
469 |
+
}
|
470 |
+
}
|
471 |
+
|
472 |
+
// Do the ONETIMES Markup.
|
473 |
+
$.each( onetimes, function( index, value ) {
|
474 |
+
var $tpl = $( ot_clone ).clone(),
|
475 |
+
$offer = $( '.imagify-pre-checkout-offers' ).find( '.imagify-offer-onetime' ),
|
476 |
+
classes = '',
|
477 |
+
tvalue;
|
478 |
+
|
479 |
+
// Parent classes.
|
480 |
+
if ( ( ot_user_cons < value.quota && ot_suggested === false ) ) {
|
481 |
+
classes = ' imagify-offer-selected';
|
482 |
+
ot_suggested = true;
|
483 |
+
|
484 |
+
// Populate the Pre-checkout view depending on user_cons.
|
485 |
+
imagifyModal.populateOffer( $offer, value, 'onetime' );
|
486 |
+
}
|
487 |
+
|
488 |
+
// If too big, populate with the biggest offer available.
|
489 |
+
// TODO: create custom offers at this point.
|
490 |
+
if ( ( onetimes.length - 1 ) === index && false === ot_suggested ) {
|
491 |
+
// populate the Pre-checkout view depending on user_cons
|
492 |
+
tvalue = onetimes[ onetimes.length - 1 ];
|
493 |
+
imagifyModal.populateOffer( $offer, tvalue, 'onetime' );
|
494 |
+
}
|
495 |
+
|
496 |
+
// Populate each offer.
|
497 |
+
$tpl = imagifyModal.populateOffer( $tpl, value, 'onetime', classes );
|
498 |
+
|
499 |
+
// complete Onetimes HTML
|
500 |
+
ot_html += $tpl[0].outerHTML;
|
501 |
+
} );
|
502 |
+
|
503 |
+
// Fill pricing tables.
|
504 |
+
if ( $mo_tpl.parent().find( '.imagify-offer-line' ) ) {
|
505 |
+
$mo_tpl.parent().find( '.imagify-offer-line' ).remove();
|
506 |
+
}
|
507 |
+
|
508 |
+
$mo_tpl.before( mo_html );
|
509 |
+
|
510 |
+
if ( $ot_tpl.parent().find( '.imagify-offer-line' ) ) {
|
511 |
+
$ot_tpl.parent().find( '.imagify-offer-line' ).remove();
|
512 |
+
}
|
513 |
+
|
514 |
+
$ot_tpl.before( ot_html );
|
515 |
+
|
516 |
+
// Show the content.
|
517 |
+
imagifyModal.$modal.find( '.imagify-modal-loader' ).fadeOut( 300 );
|
518 |
+
|
519 |
+
} ); // Third AJAX request to get discount information.
|
520 |
+
|
521 |
+
} ); // Second AJAX request for image estimation sizes.
|
522 |
+
|
523 |
+
// Populate Pay button.
|
524 |
+
imagifyModal.populatePayBtn();
|
525 |
+
} ); // End $.post.
|
526 |
+
},
|
527 |
+
|
528 |
+
/**
|
529 |
+
* @uses imagifyModal.populatePayBtn()
|
530 |
+
*/
|
531 |
+
checkCheckbox: function( $checkbox ) {
|
532 |
+
var sel_class = 'imagify-offer-selected';
|
533 |
+
|
534 |
+
$checkbox.each( function() {
|
535 |
+
var $this = $( this );
|
536 |
+
|
537 |
+
if ( $this.is( ':checked' ) ) {
|
538 |
+
$this.closest( '.imagify-offer-line' ).addClass( sel_class );
|
539 |
+
} else {
|
540 |
+
$this.closest( '.imagify-offer-line' ).removeClass( sel_class );
|
541 |
+
}
|
542 |
+
} );
|
543 |
+
|
544 |
+
// Update pay button.
|
545 |
+
imagifyModal.populatePayBtn();
|
546 |
+
},
|
547 |
+
|
548 |
+
/**
|
549 |
+
* @uses imagifyModal.populatePayBtn()
|
550 |
+
*/
|
551 |
+
checkRadio: function( $radio ) {
|
552 |
+
var year_class = 'imagify-year-selected',
|
553 |
+
month_class = 'imagify-month-selected';
|
554 |
+
|
555 |
+
$radio.each( function() {
|
556 |
+
// To handle modal pricing & modal suggestion.
|
557 |
+
var $_this = $( this ),
|
558 |
+
$parent, $to_switch;
|
559 |
+
|
560 |
+
if ( $_this.parent( '.imagify-cart-list-switcher' ).length ) {
|
561 |
+
$parent = $_this.closest( '.imagify-cart' );
|
562 |
+
} else if ( $_this.parent( '.imagify-small-options' ).length ) {
|
563 |
+
$parent = $_this.parent( '.imagify-small-options' ).next( '.imagify-pricing-table' );
|
564 |
+
} else {
|
565 |
+
$parent = $_this.closest( '.imagify-offer-line' );
|
566 |
+
}
|
567 |
+
|
568 |
+
$to_switch = $parent.find( '.imagify-switch-my' );
|
569 |
+
|
570 |
+
if ( $_this.val() === 'yearly' ) {
|
571 |
+
$parent.addClass( year_class ).removeClass( month_class );
|
572 |
+
$to_switch.find( '.imagify-monthly' ).attr( 'aria-hidden', 'true' );
|
573 |
+
$to_switch.find( '.imagify-yearly' ).attr( 'aria-hidden', 'false' );
|
574 |
+
} else {
|
575 |
+
$parent.addClass( month_class ).removeClass( year_class );
|
576 |
+
$to_switch.find( '.imagify-monthly' ).attr( 'aria-hidden', 'false' );
|
577 |
+
$to_switch.find( '.imagify-yearly' ).attr( 'aria-hidden', 'true' );
|
578 |
+
}
|
579 |
+
} );
|
580 |
+
|
581 |
+
// Update Pay button information.
|
582 |
+
imagifyModal.populatePayBtn();
|
583 |
+
|
584 |
+
return $radio;
|
585 |
+
},
|
586 |
+
|
587 |
+
/**
|
588 |
+
* Currently not used.
|
589 |
+
* @uses imagifyModal.populatePayBtn()
|
590 |
+
*/
|
591 |
+
populateBtnPrice: setInterval( function() {
|
592 |
+
imagifyModal.populatePayBtn();
|
593 |
+
}, 1000 ),
|
594 |
+
|
595 |
+
/**
|
596 |
+
* 1) Modal Payment change/select plan
|
597 |
+
* 2) Checkout selection(s)
|
598 |
+
* 3) Payment process
|
599 |
+
*/
|
600 |
+
|
601 |
+
getPeriod: function() {
|
602 |
+
return $( '.imagify-offer-monthly' ).hasClass( 'imagify-month-selected' ) ? 'monthly' : 'yearly';
|
603 |
+
},
|
604 |
+
|
605 |
+
getApiKey: function() {
|
606 |
+
return $( '#imagify-payment-iframe' ).data( 'imagify-api' );
|
607 |
+
},
|
608 |
+
|
609 |
+
switchToView: function( $view, data ) {
|
610 |
+
var viewId = $view.attr( 'id' ),
|
611 |
+
$modalContent = imagifyModal.$modal.children( '.imagify-modal-content' );
|
612 |
+
|
613 |
+
$view.siblings( '.imagify-modal-views' ).hide().attr( 'aria-hidden', 'true' );
|
614 |
+
|
615 |
+
// Plans view has tabs: display the right one.
|
616 |
+
if ( data && data.tab ) {
|
617 |
+
$view.find( 'a[href="#' + data.tab + '"]' ).trigger( 'click.imagify' );
|
618 |
+
}
|
619 |
+
|
620 |
+
// Payment view: it's an iframe.
|
621 |
+
if ( 'imagify-payment-process-view' === viewId ) {
|
622 |
+
$modalContent.addClass( 'imagify-iframe-viewing' );
|
623 |
+
} else {
|
624 |
+
$modalContent.removeClass( 'imagify-iframe-viewing' );
|
625 |
+
}
|
626 |
+
|
627 |
+
// Success view: some tweaks.
|
628 |
+
if ( 'imagify-success-view' === viewId ) {
|
629 |
+
$modalContent.addClass( 'imagify-success-viewing' );
|
630 |
+
imagifyModal.$modal.attr( 'aria-labelledby', 'imagify-success-view' );
|
631 |
+
} else {
|
632 |
+
$modalContent.removeClass( 'imagify-success-viewing' );
|
633 |
+
imagifyModal.$modal.removeAttr( 'aria-labelledby' );
|
634 |
+
}
|
635 |
+
|
636 |
+
$view.fadeIn( imagifyModal.speedFadeIn ).attr( 'aria-hidden', 'false' );
|
637 |
+
},
|
638 |
+
|
639 |
+
/**
|
640 |
+
* @uses imagifyModal.getApiKey()
|
641 |
+
*/
|
642 |
+
iframeSetSrc: function( params ) {
|
643 |
+
/**
|
644 |
+
* params = {
|
645 |
+
* 'monthly': {
|
646 |
+
* 'lite': {
|
647 |
+
* name: 'something',
|
648 |
+
* id: ''
|
649 |
+
* }
|
650 |
+
* },
|
651 |
+
* 'onetime': {
|
652 |
+
* 'recommended': {
|
653 |
+
* name: 'Recommend',
|
654 |
+
* id: ''
|
655 |
+
* }
|
656 |
+
* },
|
657 |
+
* 'period': 'monthly'|'yearly'
|
658 |
+
* }
|
659 |
+
*/
|
660 |
+
|
661 |
+
var $iframe = $( '#imagify-payment-iframe' ),
|
662 |
+
iframe_src = $iframe.attr( 'src' ),
|
663 |
+
pay_src = $iframe.data( 'src' ),
|
664 |
+
monthly_id = 0,
|
665 |
+
onetime_id = 0,
|
666 |
+
// Stop it ESLint, you're drunk.
|
667 |
+
key, amount, // eslint-disable-line no-unused-vars
|
668 |
+
rt_onetime, rt_yearly, rt_monthly, coupon, rt_coupon, $iframeClone, tofind;
|
669 |
+
|
670 |
+
// If we only change monthly/yearly payment mode.
|
671 |
+
if ( typeof params === 'string' && '' !== iframe_src ) {
|
672 |
+
tofind = 'monthly' === params ? 'yearly' : 'monthly';
|
673 |
+
iframe_src = iframe_src.replace( tofind, params );
|
674 |
+
$iframe.attr( 'src', iframe_src );
|
675 |
+
return;
|
676 |
+
}
|
677 |
+
|
678 |
+
// If we get new informations about products.
|
679 |
+
if ( typeof params !== 'object' ) {
|
680 |
+
return;
|
681 |
+
}
|
682 |
+
|
683 |
+
if ( params.monthly ) {
|
684 |
+
monthly_id = params.monthly[ Object.keys( params.monthly )[0] ].id;
|
685 |
+
}
|
686 |
+
|
687 |
+
if ( params.onetime ) {
|
688 |
+
onetime_id = params.onetime[ Object.keys( params.onetime )[0] ].id;
|
689 |
+
// If onetime ID === 999 it's a custom plan, send datas instead.
|
690 |
+
onetime_id = ( onetime_id + '' === '999' ? params.onetime[ Object.keys( params.onetime )[0] ].data : onetime_id );
|
691 |
+
}
|
692 |
+
|
693 |
+
if ( ! params.period ) {
|
694 |
+
w.imagify.info( 'No period defined' );
|
695 |
+
return;
|
696 |
+
}
|
697 |
+
|
698 |
+
key = imagifyModal.getApiKey();
|
699 |
+
rt_onetime = onetime_id;
|
700 |
+
rt_yearly = 'yearly' === params.period ? monthly_id : 0;
|
701 |
+
rt_monthly = 'monthly' === params.period ? monthly_id : 0;
|
702 |
+
coupon = $( '#imagify-coupon-code' ).val();
|
703 |
+
rt_coupon = '' === coupon ? 'none' : coupon;
|
704 |
+
// Not used but...
|
705 |
+
amount = parseFloat( $( '.imagify-global-amount' ).text() ).toFixed( 2 );
|
706 |
+
|
707 |
+
// Compose route.
|
708 |
+
// pay_src + :ontimeplan(0)/:monthlyplan(0)/:yearlyplan(0)/:coupon(none)/
|
709 |
+
pay_src = pay_src + rt_onetime + '/' + rt_monthly + '/' + rt_yearly + '/' + rt_coupon + '/';
|
710 |
+
|
711 |
+
// iFrame sort of cache fix.
|
712 |
+
$iframeClone = $iframe.remove().attr( 'src', pay_src );
|
713 |
+
|
714 |
+
imagifyModal.$paymentView.html( $iframeClone );
|
715 |
+
},
|
716 |
+
|
717 |
+
/**
|
718 |
+
* Public function triggered by payement iframe.
|
719 |
+
*/
|
720 |
+
paymentClose: function() {
|
721 |
+
$( '.imagify-iframe-viewing .close-btn' ).trigger( 'click.imagify' );
|
722 |
+
$( '.imagify-iframe-viewing' ).removeClass( 'imagify-iframe-viewing' );
|
723 |
+
},
|
724 |
+
|
725 |
+
/**
|
726 |
+
* @uses imagifyModal.switchToView()
|
727 |
+
*/
|
728 |
+
paymentBack: function() {
|
729 |
+
imagifyModal.switchToView( imagifyModal.$preView );
|
730 |
+
},
|
731 |
+
|
732 |
+
/**
|
733 |
+
* @uses imagifyModal.switchToView()
|
734 |
+
*/
|
735 |
+
paymentSuccess: function() {
|
736 |
+
imagifyModal.switchToView( imagifyModal.$successView );
|
737 |
+
},
|
738 |
+
|
739 |
+
/**
|
740 |
+
* @uses imagifyModal.paymentClose()
|
741 |
+
* @uses imagifyModal.paymentBack()
|
742 |
+
* @uses imagifyModal.paymentSuccess()
|
743 |
+
*/
|
744 |
+
checkPluginMessage: function( e ) {
|
745 |
+
var origin = e.origin || e.originalEvent.origin;
|
746 |
+
|
747 |
+
if ( 'https://app.imagify.io' !== origin && 'http://dapp.imagify.io' !== origin ) {
|
748 |
+
return;
|
749 |
+
}
|
750 |
+
|
751 |
+
switch ( e.data ) {
|
752 |
+
case 'cancel':
|
753 |
+
imagifyModal.paymentClose();
|
754 |
+
break;
|
755 |
+
case 'back':
|
756 |
+
imagifyModal.paymentBack();
|
757 |
+
break;
|
758 |
+
case 'success':
|
759 |
+
imagifyModal.paymentSuccess();
|
760 |
+
break;
|
761 |
+
}
|
762 |
+
}
|
763 |
+
};
|
764 |
+
|
765 |
+
/**
|
766 |
+
* INIT.
|
767 |
+
*/
|
768 |
+
|
769 |
+
// Check all boxes on load.
|
770 |
+
imagifyModal.checkCheckbox( imagifyModal.$checkboxes );
|
771 |
+
imagifyModal.checkRadio( imagifyModal.$radios.filter( ':checked' ) );
|
772 |
+
|
773 |
+
// Check coupon onload.
|
774 |
+
imagifyModal.checkCoupon();
|
775 |
+
|
776 |
+
// Check the changed box.
|
777 |
+
imagifyModal.$checkboxes.on( 'change.imagify', function() {
|
778 |
+
imagifyModal.checkCheckbox( $( this ) );
|
779 |
+
} );
|
780 |
+
|
781 |
+
// Check the radio box.
|
782 |
+
imagifyModal.$radios.on( 'change.imagify', function() {
|
783 |
+
imagifyModal.checkRadio( $( this ) );
|
784 |
+
} );
|
785 |
+
|
786 |
+
/**
|
787 |
+
* Get pricings on modal opening.
|
788 |
+
* Build the pricing tables inside modal.
|
789 |
+
*/
|
790 |
+
$( '#imagify-get-pricing-modal' ).on( 'click.imagify-ajax', function() {
|
791 |
+
imagifyModal.getPricing( $( this ) );
|
792 |
+
} );
|
793 |
+
|
794 |
+
/**
|
795 |
+
* Reset the modal on close.
|
796 |
+
*/
|
797 |
+
$( d ).on( 'modalClosed.imagify', '.imagify-payment-modal', function() {
|
798 |
+
// Reset viewing class & aria-labelledby.
|
799 |
+
$( this ).find( '.imagify-modal-content' ).removeClass( 'imagify-success-viewing imagify-iframe-viewing' );
|
800 |
+
|
801 |
+
// Reset first view after fadeout ~= 300 ms.
|
802 |
+
setTimeout( function() {
|
803 |
+
$( '.imagify-modal-views' ).hide();
|
804 |
+
$( '#imagify-pre-checkout-view' ).show();
|
805 |
+
}, 300 );
|
806 |
+
} );
|
807 |
+
|
808 |
+
/**
|
809 |
+
* Get validation for Coupon Code
|
810 |
+
* - On blur
|
811 |
+
* - On Enter or Spacebar press
|
812 |
+
* - On click OK button
|
813 |
+
*
|
814 |
+
* @since 1.6.3 Only if field hasn't readonly attribute (discount auto-applied).
|
815 |
+
*/
|
816 |
+
$( '#imagify-coupon-code' ).on( 'blur.imagify', function() {
|
817 |
+
if ( ! $( this ).attr('readonly') ) {
|
818 |
+
imagifyModal.checkCoupon();
|
819 |
+
}
|
820 |
+
} ).on( 'keydown.imagify', function( e ) {
|
821 |
+
var $this = $( this );
|
822 |
+
|
823 |
+
if ( $this.attr( 'readonly' ) ) {
|
824 |
+
return;
|
825 |
+
}
|
826 |
+
if ( 13 === e.keyCode || 32 === e.keyCode ) {
|
827 |
+
imagifyModal.checkCoupon();
|
828 |
+
return false;
|
829 |
+
}
|
830 |
+
if ( $this.val().length >= 3 ) {
|
831 |
+
$this.closest( '.imagify-coupon-input' ).addClass( 'imagify-canbe-validate' );
|
832 |
+
} else {
|
833 |
+
$this.closest( '.imagify-coupon-input' ).removeClass( 'imagify-canbe-validate' );
|
834 |
+
}
|
835 |
+
} );
|
836 |
+
|
837 |
+
$( '#imagify-coupon-validate' ).on( 'click.imagify', function() {
|
838 |
+
imagifyModal.checkCoupon();
|
839 |
+
$( this ).closest( '.imagify-canbe-validate' ).removeClass( 'imagify-canbe-validate' );
|
840 |
+
} );
|
841 |
+
|
842 |
+
/**
|
843 |
+
* View game, step by step.
|
844 |
+
*/
|
845 |
+
|
846 |
+
// 1) when you decide to choose another plan.
|
847 |
+
|
848 |
+
/**
|
849 |
+
* 1.a) on click, display choices.
|
850 |
+
*
|
851 |
+
* @uses imagifyModal.switchToView()
|
852 |
+
*/
|
853 |
+
imagifyModal.$anotherBtn.on( 'click.imagify', function( e ) {
|
854 |
+
var type = $( this ).data( 'imagify-choose' ),
|
855 |
+
tab = 'imagify-pricing-tab-' + ( 'plan' === type ? 'monthly' : 'onetime' );
|
856 |
+
|
857 |
+
e.preventDefault();
|
858 |
+
|
859 |
+
imagifyModal.switchToView( imagifyModal.$plansView, { tab: tab } );
|
860 |
+
} );
|
861 |
+
|
862 |
+
/**
|
863 |
+
* 1.b) on click in a choice, return to pre-checkout step.
|
864 |
+
*
|
865 |
+
* @uses imagifyModal.getHtmlPrice()
|
866 |
+
* @uses imagifyModal.switchToView()
|
867 |
+
* @uses imagifyModal.populatePayBtn()
|
868 |
+
*/
|
869 |
+
imagifyModal.$modal.on( 'click.imagify', '.imagify-payment-btn-select-plan', function( e ) {
|
870 |
+
var $_this = $( this ),
|
871 |
+
$offer_line = $_this.closest( '.imagify-offer-line' ),
|
872 |
+
datas = $_this.data( 'offer' ),
|
873 |
+
datas_str = $_this.attr( 'data-offer' ),
|
874 |
+
is_onetime = $_this.closest( '.imagify-tab-content' ).attr( 'id' ) !== 'imagify-pricing-tab-monthly',
|
875 |
+
$target_line = is_onetime ? imagifyModal.$preView.find( '.imagify-offer-onetime' ) : imagifyModal.$preView.find( '.imagify-offer-monthly' ),
|
876 |
+
period = is_onetime ? null : ( $_this.closest( '.imagify-pricing-table' ).hasClass( 'imagify-month-selected' ) ? 'monthly' : 'yearly' ),
|
877 |
+
price = is_onetime ? imagifyModal.getHtmlPrice( datas[ Object.keys( datas )[0] ].price ) : imagifyModal.getHtmlPrice( datas[ Object.keys( datas )[0] ].prices, period ),
|
878 |
+
monthly_txt = is_onetime ? '' : '<span class="imagify-price-by">' + $offer_line.find( '.imagify-price-by' ).text() + '</span>',
|
879 |
+
discount = $offer_line.find( '.imagify-price-discount' ).html(),
|
880 |
+
imgs = $offer_line.find( '.imagify-approx-nb' ).text(),
|
881 |
+
offer_size = $offer_line.find( '.imagify-offer-size' ).text();
|
882 |
+
|
883 |
+
e.preventDefault();
|
884 |
+
|
885 |
+
// Change views to go back pre-checkout.
|
886 |
+
imagifyModal.switchToView( imagifyModal.$preView );
|
887 |
+
|
888 |
+
// Change price (+ "/month" if found in monthly plans).
|
889 |
+
$target_line.find( '.imagify-number-block' ).html( price + monthly_txt );
|
890 |
+
|
891 |
+
// Change discount.
|
892 |
+
$target_line.find( '.imagify-price-discount' ).html( discount );
|
893 |
+
|
894 |
+
// Change approx images nb.
|
895 |
+
$target_line.find( '.imagify-approx-nb' ).text( imgs );
|
896 |
+
|
897 |
+
// Change offer size name.
|
898 |
+
$target_line.find( '.imagify-offer-size' ).text( offer_size );
|
899 |
+
|
900 |
+
// Change datas (json).
|
901 |
+
$target_line.attr( 'data-offer', datas_str );
|
902 |
+
|
903 |
+
if ( ! is_onetime ) {
|
904 |
+
$target_line.find( '.imagify-price-add-data' ).text( $offer_line.find( '.imagify-price-add-data' ).text() );
|
905 |
+
|
906 |
+
// Trigger period selected from offer selection view to pre-checkout view.
|
907 |
+
if ( 'monthly' === period ) {
|
908 |
+
$target_line.find( '#imagify-subscription-monthly' ).trigger( 'click.imagify' );
|
909 |
+
} else {
|
910 |
+
$target_line.find( '#imagify-subscription-yearly' ).trigger( 'click.imagify' );
|
911 |
+
}
|
912 |
+
$target_line.find( '.imagify-inline-options' ).find( 'input:radio:checked' ).trigger( 'change.imagify' );
|
913 |
+
}
|
914 |
+
|
915 |
+
// Update price information in button.
|
916 |
+
imagifyModal.populatePayBtn();
|
917 |
+
} );
|
918 |
+
|
919 |
+
/**
|
920 |
+
* 2) when you checkout.
|
921 |
+
*
|
922 |
+
* @uses imagifyModal.switchToView()
|
923 |
+
* @uses imagifyModal.getPeriod()
|
924 |
+
* @uses imagifyModal.iframeSetSrc()
|
925 |
+
*/
|
926 |
+
$( '#imagify-modal-checkout-btn' ).on( 'click.imagify', function( e ) {
|
927 |
+
var $monthly_offer, $onetime_offer, checkout_datas;
|
928 |
+
|
929 |
+
e.preventDefault();
|
930 |
+
|
931 |
+
// Do nothing if button disabled.
|
932 |
+
if ( $( this ).hasClass( 'imagify-button-disabled' ) ) {
|
933 |
+
return;
|
934 |
+
}
|
935 |
+
|
936 |
+
$monthly_offer = $( '.imagify-offer-monthly' );
|
937 |
+
$onetime_offer = $( '.imagify-offer-onetime' );
|
938 |
+
checkout_datas = {};
|
939 |
+
|
940 |
+
// If user choose a monthly plan.
|
941 |
+
if ( $monthly_offer.hasClass( 'imagify-offer-selected' ) ) {
|
942 |
+
checkout_datas.monthly = JSON.parse( $monthly_offer.attr( 'data-offer' ) );
|
943 |
+
}
|
944 |
+
|
945 |
+
// If user choose a one time plan.
|
946 |
+
if ( $onetime_offer.hasClass( 'imagify-offer-selected' ) ) {
|
947 |
+
checkout_datas.onetime = JSON.parse( $onetime_offer.attr( 'data-offer' ) );
|
948 |
+
}
|
949 |
+
|
950 |
+
// Change views to go to checkout/payment view.
|
951 |
+
imagifyModal.switchToView( imagifyModal.$paymentView );
|
952 |
+
|
953 |
+
checkout_datas.period = imagifyModal.getPeriod();
|
954 |
+
|
955 |
+
imagifyModal.iframeSetSrc( checkout_datas );
|
956 |
+
} );
|
957 |
+
|
958 |
+
/**
|
959 |
+
* Go back to previous step ("Choose Another Plan" links).
|
960 |
+
*/
|
961 |
+
$( '.imagify-back-to-plans' ).on( 'click.imagify', function( e ) {
|
962 |
+
var $_this = $( this ),
|
963 |
+
is_onetime = $_this.closest( '.imagify-cart-item' ).hasClass( 'imagify-cart-item-onetime' );
|
964 |
+
|
965 |
+
e.preventDefault();
|
966 |
+
|
967 |
+
if ( is_onetime ) {
|
968 |
+
$( '.imagify-offer-onetime' ).find( '.imagify-choose-another-plan' ).trigger( 'click.imagify' );
|
969 |
+
} else {
|
970 |
+
$( '.imagify-offer-monthly' ).find( '.imagify-choose-another-plan' ).trigger( 'click.imagify' );
|
971 |
+
}
|
972 |
+
} );
|
973 |
+
|
974 |
+
// Message/communication API.
|
975 |
+
w.addEventListener( 'message', imagifyModal.checkPluginMessage, true );
|
976 |
+
|
977 |
+
} )(jQuery, document, window);
|
assets/js/pricing-modal.min.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
!function(a,b,c,d){a(b).on("click.imagify",".imagify-tab",function(b){var c,d=a(this);b.preventDefault(),d.hasClass("imagify-current")||(c=d.find("a").attr("href")||"#"+d.find("a").attr("aria-controls"),d.closest(".imagify-tabs").next(".imagify-tabs-contents").find(".imagify-tab-content").hide().attr("aria-hidden","true"),a(c).fadeIn(275).attr("aria-hidden","false"),d.closest(".imagify-tabs").find(".imagify-tab").removeClass("imagify-current").attr("aria-selected","false"),d.addClass("imagify-current").attr("aria-selected","true"))})}(jQuery,document,window),function(a,b,c,d){var e={};a("#imagify-pricing-modal").length&&(e={$modal:a("#imagify-pricing-modal"),$checkboxes:a(".imagify-offer-line .imagify-checkbox"),$radios:a(".imagify-payment-modal .imagify-radio-line input"),$preView:a("#imagify-pre-checkout-view"),$plansView:a("#imagify-plans-selection-view").hide(),$paymentView:a("#imagify-payment-process-view").hide(),$successView:a("#imagify-success-view").hide(),$anotherBtn:a(".imagify-choose-another-plan"),speedFadeIn:300,getHtmlPrice:function(a,b){var c,d,e,f,g;return b||(b=null),"object"!=typeof a?(a+="",a=a.split("."),a[1]=1===a[1].length?a[1]+"0":(""+a[1]).substring(0,2),g='<span class="imagify-price-big">'+a[0]+"</span> ",g+='<span class="imagify-price-mini">.'+a[1]+"</span>"):(c=a.monthly+"",d=a.yearly+"",e=c.split("."),f=d.split("."),g='<span class="imagify-switch-my">',g+='<span aria-hidden="'+("monthly"===b?"false":"true")+'" class="imagify-monthly">',g+='<span class="imagify-price-big">'+e[0]+"</span> ",g+='<span class="imagify-price-mini">.'+(1===e[1].length?e[1]+"0":(""+e[1]).substring(0,2))+"</span>",g+="</span> ",g+='<span aria-hidden="'+("yearly"===b?"false":"true")+'" class="imagify-yearly">',g+='<span class="imagify-price-big">'+f[0]+"</span> ",g+='<span class="imagify-price-mini">.'+(1===f[1].length?f[1]+"0":(""+f[1]).substring(0,2))+"</span>",g+="</span>",g+="</span>")},getHtmlDiscountPrice:function(a,b){var c,d,e="";return b||(b=null),"object"==typeof a?(c=a.monthly+"",d=a.yearly+"",e+='<span class="imagify-price-discount">',e+='<span class="imagify-price-discount-dollar">$</span>',e+='<span class="imagify-switch-my">',e+='<span aria-hidden="'+("monthly"===b?"false":"true")+'" class="imagify-monthly">',e+='<span class="imagify-price-discount-number">'+c+"</span>",e+="</span>",e+='<span aria-hidden="'+("yearly"===b?"false":"true")+'" class="imagify-yearly">',e+='<span class="imagify-price-discount-number">'+d+"</span>",e+="</span>",e+="</span>",e+="</span>"):(a+="",e+='<span class="imagify-price-discount">',e+='<span class="imagify-price-discount-dollar">$</span>',e+='<span class="imagify-price-discount-number">'+a+"</span>",e+="</span>"),e},populateOffer:function(a,b,d,f){var g,h,i,j=c.imagify_discount_datas,k=b.additional_gb,l=b.annual_cost,m=b.id,n=b.label,o=b.monthly_cost,p=b.quota,q=b.cost,r=p>=1e3?p/1e3+" GB":p+" MB",s="monthly"===d?{monthly:o,yearly:Math.round(l/12*100)/100}:q,t=s;return j.is_active&&"percentage"===j.coupon_type&&"monthly"===d&&(g=(100-j.coupon_value)/100,s="monthly"===d?{monthly:o*g,yearly:Math.round(l*g/12*100)/100}:q*g),void 0!==f&&a.addClass("imagify-"+d+"-"+n+f),a.find(".imagify-offer-size").text(r),a.find(".imagify-number-block").html(e.getHtmlPrice(s,"monthly")),j.is_active&&"percentage"===j.coupon_type&&"monthly"===d&&(a.find(".imagify-price-block").prev(".imagify-price-discount").remove(),a.find(".imagify-price-block").before(e.getHtmlDiscountPrice(t,"monthly"))),a.find(".imagify-approx-nb").text(5*p),"monthly"===d&&a.find(".imagify-price-add-data").text("$"+k),h=a.find(".imagify-payment-btn-select-plan").length?a.find(".imagify-payment-btn-select-plan"):a,i="monthly"===d?'{"'+n+'":{"id":'+m+',"name":"'+r+'","data":'+p+',"dataf":"'+r+'","imgs":'+5*p+',"prices":{"monthly":'+s.monthly+',"yearly":'+s.yearly+',"add":'+k+"}}}":'{"ot'+n+'":{"id":'+m+',"name":"'+r+'","data":'+p+',"dataf":"'+r+'","imgs":'+5*p+',"price":'+s+"}}",h.attr("data-offer",i),a},populatePayBtn:function(){var b=JSON.parse(a(".imagify-offer-monthly").attr("data-offer")),c=JSON.parse(a(".imagify-offer-onetime").attr("data-offer")),d=0,e=0,f=0;a(".imagify-offer-monthly").hasClass("imagify-offer-selected")&&(e=a("#imagify-subscription-monthly").filter(":checked").length?b[Object.keys(b)[0]].prices.monthly:12*b[Object.keys(b)[0]].prices.yearly),a(".imagify-offer-onetime").hasClass("imagify-offer-selected")&&(f=c[Object.keys(c)[0]].price),d=parseFloat(f+e).toFixed(2),"0.00"===d||0===d?a("#imagify-modal-checkout-btn").attr("disabled","disabled").addClass("imagify-button-disabled"):a("#imagify-modal-checkout-btn").removeAttr("disabled").removeClass("imagify-button-disabled")},checkCoupon:function(){var b,c,d,e,f=a("#imagify-coupon-code").val();""!==f&&(b=a(".imagify-coupon-text"),c=b.find("label"),d=a(".imagify-coupon-section"),e=a("#imagify-get-pricing-modal").data("nonce"),b.addClass("checking"),a.post(ajaxurl,{action:"imagify_check_coupon",coupon:f,imagifynonce:e},function(a){var e;b.removeClass("checking"),a.success?a.data.success?(e="percentage"===a.data.coupon_type?a.data.value+"%":"$"+a.data.value,d.removeClass("invalid").addClass("validated"),c.html(imagifyPricingModal.labels.successCouponAPI),c.find(".imagify-coupon-offer").text(e),c.find(".imagify-coupon-word").text(f)):(d.removeClass("validated").addClass("invalid"),c.text(a.data.detail)):(d.removeClass("validated").addClass("invalid"),c.text(imagifyPricingModal.labels.errorCouponAPI))}))},getPricing:function(b){var d=b.data("nonce"),f={action:"imagify_get_prices",imagifynonce:d},g={action:"imagify_get_images_counts",imagifynonce:d},h={action:"imagify_get_discount",imagifynonce:d};e.$modal.find(".imagify-modal-loader").hide().show(),a.post(ajaxurl,f,function(b){if(!b.success)return void e.populatePayBtn();a.post(ajaxurl,g,function(d){d.success&&a.post(ajaxurl,h,function(f){var g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C="",D="",E=!1,F=!1;if(f.success){if(g=d.data,h=b.data,i=f.data,j=h.monthlies,k=h.onetimes,l=Math.round(g.average_month_size.raw/1e6),m=Math.round(g.total_library_size.raw/1e6),n=a("#imagify-offer-monthly-template"),o=a("#imagify-offer-onetime-template"),p=o.html(),q=n.html(),r=a(".imagify-estimation-block"),r.removeClass("imagify-analyzing"),r.find(".average-month-size").text(g.average_month_size.human),r.find(".total-library-size").text(g.total_library_size.human),l<25&&m<25?(a(".imagify-pre-checkout-offers .imagify-modal-title").addClass("imagify-enough-free"),a(".imagify-offer-selected").removeClass("imagify-offer-selected").find(".imagify-checkbox").removeAttr("checked")):(a(".imagify-enough-free").removeClass("imagify-enough-free"),a(".imagify-offer-selected").addClass("imagify-offer-selected").find(".imagify-checkbox").attr("checked","checked")),null===j||null===k)return s=a(".imagify-pre-checkout-offers"),s.hide().attr("aria-hidden",!0),s.closest(".imagify-modal-views").find(".imagify-popin-message").remove(),s.after('<div class="imagify-popin-message imagify-error"><p>'+imagifyPricingModal.labels.errorPriceAPI+"</p></div>"),void e.$modal.find(".imagify-modal-loader").fadeOut(300);if(c.imagify_discount_datas=i,i.is_active&&(t=a(".imagify-modal-promotion"),u=i.date_end.split("T")[0],v=i.coupon_value,w="percentage"===i.coupon_type?v+"%":"$"+v,a("#imagify-coupon-code").val(i.label).attr("readonly",!0),t.addClass("active").attr("aria-hidden","false"),t.find(".imagify-promotion-number").text(w),t.find(".imagify-promotion-date").text(u),e.checkCoupon()),a.each(j,function(b,c){var d,f,g="";return"free"===c.label||(d=a(q).clone(),!1!==F&&b-F>2||(l<c.quota&&!1===F&&(g=" imagify-offer-selected",F=b,f=a(".imagify-pre-checkout-offers").find(".imagify-offer-monthly"),e.populateOffer(f,c,"monthly")),d=e.populateOffer(d,c,"monthly",g),void(D+=d[0].outerHTML)))}),x=a(D).filter(".imagify-offer-selected").prevAll(),x.length>1){for(y=x.length-1,z=a(D),A=0;A<y;A++)delete z[A];for(D="",B=0;B<z.length;B++)D+=a("<div/>").append(z[B]).html()}a.each(k,function(b,c){var d,f=a(p).clone(),g=a(".imagify-pre-checkout-offers").find(".imagify-offer-onetime"),h="";m<c.quota&&!1===E&&(h=" imagify-offer-selected",E=!0,e.populateOffer(g,c,"onetime")),k.length-1===b&&!1===E&&(d=k[k.length-1],e.populateOffer(g,d,"onetime")),f=e.populateOffer(f,c,"onetime",h),C+=f[0].outerHTML}),n.parent().find(".imagify-offer-line")&&n.parent().find(".imagify-offer-line").remove(),n.before(D),o.parent().find(".imagify-offer-line")&&o.parent().find(".imagify-offer-line").remove(),o.before(C),e.$modal.find(".imagify-modal-loader").fadeOut(300)}})}),e.populatePayBtn()})},checkCheckbox:function(b){b.each(function(){var b=a(this);b.is(":checked")?b.closest(".imagify-offer-line").addClass("imagify-offer-selected"):b.closest(".imagify-offer-line").removeClass("imagify-offer-selected")}),e.populatePayBtn()},checkRadio:function(b){return b.each(function(){var b,c,d=a(this);b=d.parent(".imagify-cart-list-switcher").length?d.closest(".imagify-cart"):d.parent(".imagify-small-options").length?d.parent(".imagify-small-options").next(".imagify-pricing-table"):d.closest(".imagify-offer-line"),c=b.find(".imagify-switch-my"),"yearly"===d.val()?(b.addClass("imagify-year-selected").removeClass("imagify-month-selected"),c.find(".imagify-monthly").attr("aria-hidden","true"),c.find(".imagify-yearly").attr("aria-hidden","false")):(b.addClass("imagify-month-selected").removeClass("imagify-year-selected"),c.find(".imagify-monthly").attr("aria-hidden","false"),c.find(".imagify-yearly").attr("aria-hidden","true"))}),e.populatePayBtn(),b},populateBtnPrice:setInterval(function(){e.populatePayBtn()},1e3),getPeriod:function(){return a(".imagify-offer-monthly").hasClass("imagify-month-selected")?"monthly":"yearly"},getApiKey:function(){return a("#imagify-payment-iframe").data("imagify-api")},switchToView:function(a,b){var c=a.attr("id"),d=e.$modal.children(".imagify-modal-content");a.siblings(".imagify-modal-views").hide().attr("aria-hidden","true"),b&&b.tab&&a.find('a[href="#'+b.tab+'"]').trigger("click.imagify"),"imagify-payment-process-view"===c?d.addClass("imagify-iframe-viewing"):d.removeClass("imagify-iframe-viewing"),"imagify-success-view"===c?(d.addClass("imagify-success-viewing"),e.$modal.attr("aria-labelledby","imagify-success-view")):(d.removeClass("imagify-success-viewing"),e.$modal.removeAttr("aria-labelledby")),a.fadeIn(e.speedFadeIn).attr("aria-hidden","false")},iframeSetSrc:function(b){var d,f,g,h,i,j,k,l=a("#imagify-payment-iframe"),m=l.attr("src"),n=l.data("src"),o=0,p=0;if("string"==typeof b&&""!==m)return k="monthly"===b?"yearly":"monthly",m=m.replace(k,b),void l.attr("src",m);if("object"==typeof b){if(b.monthly&&(o=b.monthly[Object.keys(b.monthly)[0]].id),b.onetime&&(p=b.onetime[Object.keys(b.onetime)[0]].id,p=p+""=="999"?b.onetime[Object.keys(b.onetime)[0]].data:p),!b.period)return void c.imagify.info("No period defined");e.getApiKey(),d=p,f="yearly"===b.period?o:0,g="monthly"===b.period?o:0,h=a("#imagify-coupon-code").val(),i=""===h?"none":h,parseFloat(a(".imagify-global-amount").text()).toFixed(2),n=n+d+"/"+g+"/"+f+"/"+i+"/",j=l.remove().attr("src",n),e.$paymentView.html(j)}},paymentClose:function(){a(".imagify-iframe-viewing .close-btn").trigger("click.imagify"),a(".imagify-iframe-viewing").removeClass("imagify-iframe-viewing")},paymentBack:function(){e.switchToView(e.$preView)},paymentSuccess:function(){e.switchToView(e.$successView)},checkPluginMessage:function(a){var b=a.origin||a.originalEvent.origin;if("https://app.imagify.io"===b||"http://dapp.imagify.io"===b)switch(a.data){case"cancel":e.paymentClose();break;case"back":e.paymentBack();break;case"success":e.paymentSuccess()}}},e.checkCheckbox(e.$checkboxes),e.checkRadio(e.$radios.filter(":checked")),e.checkCoupon(),e.$checkboxes.on("change.imagify",function(){e.checkCheckbox(a(this))}),e.$radios.on("change.imagify",function(){e.checkRadio(a(this))}),a("#imagify-get-pricing-modal").on("click.imagify-ajax",function(){e.getPricing(a(this))}),a(b).on("modalClosed.imagify",".imagify-payment-modal",function(){a(this).find(".imagify-modal-content").removeClass("imagify-success-viewing imagify-iframe-viewing"),setTimeout(function(){a(".imagify-modal-views").hide(),a("#imagify-pre-checkout-view").show()},300)}),a("#imagify-coupon-code").on("blur.imagify",function(){a(this).attr("readonly")||e.checkCoupon()}).on("keydown.imagify",function(b){var c=a(this);if(!c.attr("readonly"))return 13===b.keyCode||32===b.keyCode?(e.checkCoupon(),!1):void(c.val().length>=3?c.closest(".imagify-coupon-input").addClass("imagify-canbe-validate"):c.closest(".imagify-coupon-input").removeClass("imagify-canbe-validate"))}),a("#imagify-coupon-validate").on("click.imagify",function(){e.checkCoupon(),a(this).closest(".imagify-canbe-validate").removeClass("imagify-canbe-validate")}),e.$anotherBtn.on("click.imagify",function(b){var c=a(this).data("imagify-choose"),d="imagify-pricing-tab-"+("plan"===c?"monthly":"onetime");b.preventDefault(),e.switchToView(e.$plansView,{tab:d})}),e.$modal.on("click.imagify",".imagify-payment-btn-select-plan",function(b){var c=a(this),d=c.closest(".imagify-offer-line"),f=c.data("offer"),g=c.attr("data-offer"),h="imagify-pricing-tab-monthly"!==c.closest(".imagify-tab-content").attr("id"),i=h?e.$preView.find(".imagify-offer-onetime"):e.$preView.find(".imagify-offer-monthly"),j=h?null:c.closest(".imagify-pricing-table").hasClass("imagify-month-selected")?"monthly":"yearly",k=h?e.getHtmlPrice(f[Object.keys(f)[0]].price):e.getHtmlPrice(f[Object.keys(f)[0]].prices,j),l=h?"":'<span class="imagify-price-by">'+d.find(".imagify-price-by").text()+"</span>",m=d.find(".imagify-price-discount").html(),n=d.find(".imagify-approx-nb").text(),o=d.find(".imagify-offer-size").text();b.preventDefault(),e.switchToView(e.$preView),i.find(".imagify-number-block").html(k+l),i.find(".imagify-price-discount").html(m),i.find(".imagify-approx-nb").text(n),i.find(".imagify-offer-size").text(o),i.attr("data-offer",g),h||(i.find(".imagify-price-add-data").text(d.find(".imagify-price-add-data").text()),"monthly"===j?i.find("#imagify-subscription-monthly").trigger("click.imagify"):i.find("#imagify-subscription-yearly").trigger("click.imagify"),i.find(".imagify-inline-options").find("input:radio:checked").trigger("change.imagify")),e.populatePayBtn()}),a("#imagify-modal-checkout-btn").on("click.imagify",function(b){var c,d,f;b.preventDefault(),a(this).hasClass("imagify-button-disabled")||(c=a(".imagify-offer-monthly"),d=a(".imagify-offer-onetime"),f={},c.hasClass("imagify-offer-selected")&&(f.monthly=JSON.parse(c.attr("data-offer"))),d.hasClass("imagify-offer-selected")&&(f.onetime=JSON.parse(d.attr("data-offer"))),e.switchToView(e.$paymentView),f.period=e.getPeriod(),e.iframeSetSrc(f))}),a(".imagify-back-to-plans").on("click.imagify",function(b){var c=a(this),d=c.closest(".imagify-cart-item").hasClass("imagify-cart-item-onetime");b.preventDefault(),d?a(".imagify-offer-onetime").find(".imagify-choose-another-plan").trigger("click.imagify"):a(".imagify-offer-monthly").find(".imagify-choose-another-plan").trigger("click.imagify")}),c.addEventListener("message",e.checkPluginMessage,!0))}(jQuery,document,window);
|
assets/js/upload.js
DELETED
@@ -1,192 +0,0 @@
|
|
1 |
-
window.imagify = window.imagify || {
|
2 |
-
concat: ajaxurl.indexOf( '?' ) > 0 ? '&' : '?',
|
3 |
-
log: function( content ) {
|
4 |
-
if ( undefined !== console ) {
|
5 |
-
console.log( content ); // eslint-disable-line no-console
|
6 |
-
}
|
7 |
-
},
|
8 |
-
info: function( content ) {
|
9 |
-
if ( undefined !== console ) {
|
10 |
-
console.info( content ); // eslint-disable-line no-console
|
11 |
-
}
|
12 |
-
}
|
13 |
-
};
|
14 |
-
|
15 |
-
(function($, d, w, undefined) { // eslint-disable-line no-unused-vars, no-shadow, no-shadow-restricted-names
|
16 |
-
/**
|
17 |
-
* Add a "Imagify'em all" in the select list.
|
18 |
-
*/
|
19 |
-
var bulk_opt, get_var, check_modal;
|
20 |
-
|
21 |
-
bulk_opt = '<option value="imagify-bulk-upload">' + imagifyUpload.bulkActionsLabels.optimize + '</option>';
|
22 |
-
|
23 |
-
if ( imagifyUpload.backup_option || $( '.attachment-has-backup' ).length ) {
|
24 |
-
// If the backup option is enabled, or if we have items that can be restored.
|
25 |
-
bulk_opt += '<option value="imagify-bulk-restore">' + imagifyUpload.bulkActionsLabels.restore + '</option>';
|
26 |
-
}
|
27 |
-
|
28 |
-
$( '.bulkactions select[name="action"]' ).find( 'option:last-child' ).before( bulk_opt );
|
29 |
-
$( '.bulkactions select[name="action2"]' ).find( 'option:last-child' ).before( bulk_opt );
|
30 |
-
|
31 |
-
/**
|
32 |
-
* Mini chart.
|
33 |
-
*
|
34 |
-
* @param {element} canvas
|
35 |
-
*/
|
36 |
-
function drawMeAChart( canvas ) {
|
37 |
-
canvas.each( function() {
|
38 |
-
var $this = $( this ),
|
39 |
-
theValue = parseInt( $this.closest( '.imagify-chart' ).next( '.imagify-chart-value' ).text() ),
|
40 |
-
overviewData = [
|
41 |
-
{
|
42 |
-
value: theValue,
|
43 |
-
color: '#00B3D3'
|
44 |
-
},
|
45 |
-
{
|
46 |
-
value: 100 - theValue,
|
47 |
-
color: '#D8D8D8'
|
48 |
-
}
|
49 |
-
];
|
50 |
-
|
51 |
-
new Chart( $this[0].getContext( '2d' ) ).Doughnut( overviewData, { // eslint-disable-line new-cap
|
52 |
-
segmentStrokeColor: '#FFF',
|
53 |
-
segmentStrokeWidth: 1,
|
54 |
-
animateRotate: true,
|
55 |
-
tooltipEvents: []
|
56 |
-
} );
|
57 |
-
} );
|
58 |
-
}
|
59 |
-
|
60 |
-
/**
|
61 |
-
* Process optimization for all selected images.
|
62 |
-
*/
|
63 |
-
$( '#doaction' )
|
64 |
-
.add( '#doaction2' )
|
65 |
-
.on( 'click', function( e ) {
|
66 |
-
var value = $( this ).prev( 'select' ).val().split( '-' ),
|
67 |
-
action, ids;
|
68 |
-
|
69 |
-
if ( 'imagify' !== value[0] ) {
|
70 |
-
return;
|
71 |
-
}
|
72 |
-
|
73 |
-
e.preventDefault();
|
74 |
-
|
75 |
-
action = value[2];
|
76 |
-
ids = $( 'input[name^="media"]:checked' ).map( function() {
|
77 |
-
return this.value;
|
78 |
-
} ).get();
|
79 |
-
|
80 |
-
ids.forEach( function( id, index ) {
|
81 |
-
setTimeout( function() {
|
82 |
-
$( '#imagify-' + action + '-' + id ).trigger( 'click' );
|
83 |
-
}, index * 300 );
|
84 |
-
} );
|
85 |
-
} );
|
86 |
-
|
87 |
-
/**
|
88 |
-
* Process to one of these actions: restore, optimize or re-optimize.
|
89 |
-
*/
|
90 |
-
$( d ).on( 'click', '.button-imagify-restore, .button-imagify-manual-upload, .button-imagify-manual-override-upload', function( e ) {
|
91 |
-
var $obj = $( this ),
|
92 |
-
$parent = $obj.parents( '.column-imagify_optimized_file, .compat-field-imagify .field' ),
|
93 |
-
href = $obj.attr( 'href' );
|
94 |
-
|
95 |
-
e.preventDefault();
|
96 |
-
|
97 |
-
if ( ! $parent.length ) {
|
98 |
-
$parent = $obj.closest( '.column' );
|
99 |
-
}
|
100 |
-
|
101 |
-
$parent.html( '<div class="button"><span class="imagify-spinner"></span>' + $obj.data( 'waiting-label' ) + '</div>' );
|
102 |
-
|
103 |
-
$.get( href.replace( 'admin-post.php', 'admin-ajax.php' ) )
|
104 |
-
.done( function( response ){
|
105 |
-
$parent.html( response.data );
|
106 |
-
$parent.find( '.imagify-datas-more-action a' ).addClass( 'is-open' ).find( '.the-text' ).text( $parent.find( '.imagify-datas-more-action a' ).data( 'close' ) );
|
107 |
-
$parent.find( '.imagify-datas-details' ).addClass( 'is-open' );
|
108 |
-
|
109 |
-
drawMeAChart( $parent.find( '.imagify-chart-container' ).find( 'canvas' ) );
|
110 |
-
} );
|
111 |
-
} );
|
112 |
-
|
113 |
-
/**
|
114 |
-
* Toggle slide in custom column.
|
115 |
-
*/
|
116 |
-
$( '.imagify-datas-details' ).hide();
|
117 |
-
|
118 |
-
$( d ).on( 'click', '.imagify-datas-more-action a', function( e ) {
|
119 |
-
var $this = $( this );
|
120 |
-
|
121 |
-
e.preventDefault();
|
122 |
-
|
123 |
-
if ( $this.hasClass( 'is-open' ) ) {
|
124 |
-
$( $this.attr( 'href' ) ).slideUp( 300 ).removeClass( 'is-open' );
|
125 |
-
$this.removeClass( 'is-open' ).find( '.the-text' ).text( $this.data( 'open' ) );
|
126 |
-
} else {
|
127 |
-
$( $this.attr( 'href' ) ).slideDown( 300 ).addClass( 'is-open' );
|
128 |
-
$this.addClass( 'is-open' ).find( '.the-text' ).text( $this.data( 'close' ) );
|
129 |
-
}
|
130 |
-
} );
|
131 |
-
|
132 |
-
/**
|
133 |
-
* Some usefull functions to help us with media modal.
|
134 |
-
*/
|
135 |
-
get_var = function ( param ) {
|
136 |
-
var vars = {};
|
137 |
-
|
138 |
-
w.location.href.replace( /[?&]+([^=&]+)=?([^&]*)?/gi, function( m, key, value ) {
|
139 |
-
vars[ key ] = undefined !== value ? value : '';
|
140 |
-
} );
|
141 |
-
|
142 |
-
if ( param ) {
|
143 |
-
return vars[ param ] ? vars[ param ] : null;
|
144 |
-
}
|
145 |
-
|
146 |
-
return vars;
|
147 |
-
};
|
148 |
-
|
149 |
-
check_modal = function() {
|
150 |
-
var tempTimer = setInterval( function() {
|
151 |
-
var $details = $( '.media-modal .imagify-datas-details' );
|
152 |
-
|
153 |
-
if ( $details.length ) {
|
154 |
-
$details.hide();
|
155 |
-
drawMeAChart( $( '#imagify-consumption-chart' ) );
|
156 |
-
clearInterval( tempTimer );
|
157 |
-
tempTimer = null;
|
158 |
-
}
|
159 |
-
}, 20 );
|
160 |
-
};
|
161 |
-
|
162 |
-
/**
|
163 |
-
* Intercept the right moment if media details is clicked (mode grid).
|
164 |
-
* Bear Feint.
|
165 |
-
*/
|
166 |
-
$( '.upload-php' ).find( '.media-frame.mode-grid' ).on( 'click', '.attachment', function() {
|
167 |
-
check_modal();
|
168 |
-
} );
|
169 |
-
|
170 |
-
// On page load in upload.php check if item param exists.
|
171 |
-
if ( $( '.upload-php' ).length && get_var( 'item' ) ) {
|
172 |
-
check_modal();
|
173 |
-
}
|
174 |
-
|
175 |
-
// On media clicked.
|
176 |
-
$( '#insert-media-button' ).on( 'click.imagify', function() {
|
177 |
-
var waitContent = setInterval( function() {
|
178 |
-
var $attachments = $( '.media-frame-content .attachments' );
|
179 |
-
|
180 |
-
if ( $attachments.length ) {
|
181 |
-
$attachments.on( 'click.imagify', '.attachment', function() {
|
182 |
-
check_modal();
|
183 |
-
} );
|
184 |
-
clearInterval( waitContent );
|
185 |
-
waitContent = null;
|
186 |
-
}
|
187 |
-
}, 100);
|
188 |
-
} );
|
189 |
-
|
190 |
-
drawMeAChart( $( '.imagify-chart-container' ).find( 'canvas' ) );
|
191 |
-
|
192 |
-
} )(jQuery, document, window);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
assets/js/upload.min.js
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
window.imagify=window.imagify||{concat:ajaxurl.indexOf("?")>0?"&":"?",log:function(a){void 0!==console&&console.log(a)},info:function(a){void 0!==console&&console.info(a)}},function(a,b,c,d){function e(b){b.each(function(){var b=a(this),c=parseInt(b.closest(".imagify-chart").next(".imagify-chart-value").text()),d=[{value:c,color:"#00B3D3"},{value:100-c,color:"#D8D8D8"}];new Chart(b[0].getContext("2d")).Doughnut(d,{segmentStrokeColor:"#FFF",segmentStrokeWidth:1,animateRotate:!0,tooltipEvents:[]})})}var f,g,h;f='<option value="imagify-bulk-upload">'+imagifyUpload.bulkActionsLabels.optimize+"</option>",(imagifyUpload.backup_option||a(".attachment-has-backup").length)&&(f+='<option value="imagify-bulk-restore">'+imagifyUpload.bulkActionsLabels.restore+"</option>"),a('.bulkactions select[name="action"]').find("option:last-child").before(f),a('.bulkactions select[name="action2"]').find("option:last-child").before(f),a("#doaction").add("#doaction2").on("click",function(b){var c,d,e=a(this).prev("select").val().split("-");"imagify"===e[0]&&(b.preventDefault(),c=e[2],d=a('input[name^="media"]:checked').map(function(){return this.value}).get(),d.forEach(function(b,d){setTimeout(function(){a("#imagify-"+c+"-"+b).trigger("click")},300*d)}))}),a(b).on("click",".button-imagify-restore, .button-imagify-manual-upload, .button-imagify-manual-override-upload",function(b){var c=a(this),d=c.parents(".column-imagify_optimized_file, .compat-field-imagify .field"),f=c.attr("href");b.preventDefault(),d.length||(d=c.closest(".column")),d.html('<div class="button"><span class="imagify-spinner"></span>'+c.data("waiting-label")+"</div>"),a.get(f.replace("admin-post.php","admin-ajax.php")).done(function(a){d.html(a.data),d.find(".imagify-datas-more-action a").addClass("is-open").find(".the-text").text(d.find(".imagify-datas-more-action a").data("close")),d.find(".imagify-datas-details").addClass("is-open"),e(d.find(".imagify-chart-container").find("canvas"))})}),a(".imagify-datas-details").hide(),a(b).on("click",".imagify-datas-more-action a",function(b){var c=a(this);b.preventDefault(),c.hasClass("is-open")?(a(c.attr("href")).slideUp(300).removeClass("is-open"),c.removeClass("is-open").find(".the-text").text(c.data("open"))):(a(c.attr("href")).slideDown(300).addClass("is-open"),c.addClass("is-open").find(".the-text").text(c.data("close")))}),g=function(a){var b={};return c.location.href.replace(/[?&]+([^=&]+)=?([^&]*)?/gi,function(a,c,d){b[c]=void 0!==d?d:""}),a?b[a]?b[a]:null:b},h=function(){var b=setInterval(function(){var c=a(".media-modal .imagify-datas-details");c.length&&(c.hide(),e(a("#imagify-consumption-chart")),clearInterval(b),b=null)},20)},a(".upload-php").find(".media-frame.mode-grid").on("click",".attachment",function(){h()}),a(".upload-php").length&&g("item")&&h(),a("#insert-media-button").on("click.imagify",function(){var b=setInterval(function(){var c=a(".media-frame-content .attachments");c.length&&(c.on("click.imagify",".attachment",function(){h()}),clearInterval(b),b=null)},100)}),e(a(".imagify-chart-container").find("canvas"))}(jQuery,document,window);
|
|
imagify.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Plugin Name: Imagify
|
4 |
* Plugin URI: https://wordpress.org/plugins/imagify/
|
5 |
* Description: Dramaticaly reduce image file sizes without losing quality, make your website load faster, boost your SEO and save money on your bandwidth using Imagify, the new most advanced image optimization tool.
|
6 |
-
* Version: 1.6.
|
7 |
* Author: WP Media
|
8 |
* Author URI: https://wp-media.me/
|
9 |
* Licence: GPLv2
|
@@ -17,7 +17,7 @@
|
|
17 |
defined( 'ABSPATH' ) || die( 'Cheatin\' uh?' );
|
18 |
|
19 |
// Imagify defines.
|
20 |
-
define( 'IMAGIFY_VERSION' , '1.6.
|
21 |
define( 'IMAGIFY_SLUG' , 'imagify' );
|
22 |
define( 'IMAGIFY_SETTINGS_SLUG' , IMAGIFY_SLUG . '_settings' );
|
23 |
define( 'IMAGIFY_WEB_MAIN' , 'https://imagify.io' );
|
@@ -26,7 +26,6 @@ define( 'IMAGIFY_PAYMENT_URL' , IMAGIFY_APP_MAIN . '/#/plugin/' );
|
|
26 |
define( 'IMAGIFY_FILE' , __FILE__ );
|
27 |
define( 'IMAGIFY_PATH' , realpath( plugin_dir_path( IMAGIFY_FILE ) ) . '/' );
|
28 |
define( 'IMAGIFY_INC_PATH' , realpath( IMAGIFY_PATH . 'inc/' ) . '/' );
|
29 |
-
define( 'IMAGIFY_API_PATH' , realpath( IMAGIFY_INC_PATH . 'api/' ) . '/' );
|
30 |
define( 'IMAGIFY_ADMIN_PATH' , realpath( IMAGIFY_INC_PATH . 'admin' ) . '/' );
|
31 |
define( 'IMAGIFY_ADMIN_UI_PATH' , realpath( IMAGIFY_ADMIN_PATH . 'ui' ) . '/' );
|
32 |
define( 'IMAGIFY_COMMON_PATH' , realpath( IMAGIFY_INC_PATH . 'common' ) . '/' );
|
@@ -59,15 +58,13 @@ function _imagify_init() {
|
|
59 |
return;
|
60 |
}
|
61 |
|
62 |
-
require(
|
63 |
-
require( IMAGIFY_API_PATH . 'imagify.php' );
|
64 |
require( IMAGIFY_FUNCTIONS_PATH . 'deprecated.php' );
|
65 |
require( IMAGIFY_FUNCTIONS_PATH . 'common.php' );
|
66 |
require( IMAGIFY_FUNCTIONS_PATH . 'options.php' );
|
67 |
require( IMAGIFY_FUNCTIONS_PATH . 'formatting.php' );
|
68 |
require( IMAGIFY_FUNCTIONS_PATH . 'files.php' );
|
69 |
require( IMAGIFY_FUNCTIONS_PATH . 'admin.php' );
|
70 |
-
require( IMAGIFY_FUNCTIONS_PATH . 'notices.php' );
|
71 |
require( IMAGIFY_FUNCTIONS_PATH . 'api.php' );
|
72 |
require( IMAGIFY_FUNCTIONS_PATH . 'attachments.php' );
|
73 |
require( IMAGIFY_FUNCTIONS_PATH . 'process.php' );
|
@@ -79,6 +76,8 @@ function _imagify_init() {
|
|
79 |
require( IMAGIFY_CLASSES_PATH . 'class-imagify.php' );
|
80 |
require( IMAGIFY_CLASSES_PATH . 'class-imagify-user.php' );
|
81 |
require( IMAGIFY_CLASSES_PATH . 'class-imagify-attachment.php' );
|
|
|
|
|
82 |
require( IMAGIFY_COMMON_PATH . 'attachments.php' );
|
83 |
require( IMAGIFY_COMMON_PATH . 'admin-bar.php' );
|
84 |
require( IMAGIFY_COMMON_PATH . 'cron.php' );
|
@@ -93,13 +92,15 @@ function _imagify_init() {
|
|
93 |
require( IMAGIFY_ADMIN_PATH . 'plugins.php' );
|
94 |
require( IMAGIFY_ADMIN_PATH . 'upload.php' );
|
95 |
require( IMAGIFY_ADMIN_PATH . 'media.php' );
|
96 |
-
require( IMAGIFY_ADMIN_PATH . 'enqueue.php' );
|
97 |
require( IMAGIFY_ADMIN_PATH . 'meta-boxes.php' );
|
98 |
require( IMAGIFY_ADMIN_UI_PATH . 'options.php' );
|
99 |
require( IMAGIFY_ADMIN_UI_PATH . 'bulk.php' );
|
100 |
-
|
|
|
101 |
}
|
102 |
|
|
|
|
|
103 |
/**
|
104 |
* Fires when Imagify is correctly loaded.
|
105 |
*
|
3 |
* Plugin Name: Imagify
|
4 |
* Plugin URI: https://wordpress.org/plugins/imagify/
|
5 |
* Description: Dramaticaly reduce image file sizes without losing quality, make your website load faster, boost your SEO and save money on your bandwidth using Imagify, the new most advanced image optimization tool.
|
6 |
+
* Version: 1.6.10
|
7 |
* Author: WP Media
|
8 |
* Author URI: https://wp-media.me/
|
9 |
* Licence: GPLv2
|
17 |
defined( 'ABSPATH' ) || die( 'Cheatin\' uh?' );
|
18 |
|
19 |
// Imagify defines.
|
20 |
+
define( 'IMAGIFY_VERSION' , '1.6.10' );
|
21 |
define( 'IMAGIFY_SLUG' , 'imagify' );
|
22 |
define( 'IMAGIFY_SETTINGS_SLUG' , IMAGIFY_SLUG . '_settings' );
|
23 |
define( 'IMAGIFY_WEB_MAIN' , 'https://imagify.io' );
|
26 |
define( 'IMAGIFY_FILE' , __FILE__ );
|
27 |
define( 'IMAGIFY_PATH' , realpath( plugin_dir_path( IMAGIFY_FILE ) ) . '/' );
|
28 |
define( 'IMAGIFY_INC_PATH' , realpath( IMAGIFY_PATH . 'inc/' ) . '/' );
|
|
|
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' ) . '/' );
|
58 |
return;
|
59 |
}
|
60 |
|
61 |
+
require( IMAGIFY_FUNCTIONS_PATH . 'compat.php' );
|
|
|
62 |
require( IMAGIFY_FUNCTIONS_PATH . 'deprecated.php' );
|
63 |
require( IMAGIFY_FUNCTIONS_PATH . 'common.php' );
|
64 |
require( IMAGIFY_FUNCTIONS_PATH . 'options.php' );
|
65 |
require( IMAGIFY_FUNCTIONS_PATH . 'formatting.php' );
|
66 |
require( IMAGIFY_FUNCTIONS_PATH . 'files.php' );
|
67 |
require( IMAGIFY_FUNCTIONS_PATH . 'admin.php' );
|
|
|
68 |
require( IMAGIFY_FUNCTIONS_PATH . 'api.php' );
|
69 |
require( IMAGIFY_FUNCTIONS_PATH . 'attachments.php' );
|
70 |
require( IMAGIFY_FUNCTIONS_PATH . 'process.php' );
|
76 |
require( IMAGIFY_CLASSES_PATH . 'class-imagify.php' );
|
77 |
require( IMAGIFY_CLASSES_PATH . 'class-imagify-user.php' );
|
78 |
require( IMAGIFY_CLASSES_PATH . 'class-imagify-attachment.php' );
|
79 |
+
require( IMAGIFY_CLASSES_PATH . 'class-imagify-notices.php' );
|
80 |
+
require( IMAGIFY_CLASSES_PATH . 'class-imagify-assets.php' );
|
81 |
require( IMAGIFY_COMMON_PATH . 'attachments.php' );
|
82 |
require( IMAGIFY_COMMON_PATH . 'admin-bar.php' );
|
83 |
require( IMAGIFY_COMMON_PATH . 'cron.php' );
|
92 |
require( IMAGIFY_ADMIN_PATH . 'plugins.php' );
|
93 |
require( IMAGIFY_ADMIN_PATH . 'upload.php' );
|
94 |
require( IMAGIFY_ADMIN_PATH . 'media.php' );
|
|
|
95 |
require( IMAGIFY_ADMIN_PATH . 'meta-boxes.php' );
|
96 |
require( IMAGIFY_ADMIN_UI_PATH . 'options.php' );
|
97 |
require( IMAGIFY_ADMIN_UI_PATH . 'bulk.php' );
|
98 |
+
|
99 |
+
Imagify_Notices::get_instance()->init();
|
100 |
}
|
101 |
|
102 |
+
Imagify_Assets::get_instance()->init();
|
103 |
+
|
104 |
/**
|
105 |
* Fires when Imagify is correctly loaded.
|
106 |
*
|
inc/3rd-party/3rd-party.php
CHANGED
@@ -7,6 +7,7 @@ require( IMAGIFY_3RD_PARTY_PATH . 'nextgen-gallery/nextgen-gallery.php' );
|
|
7 |
require( IMAGIFY_3RD_PARTY_PATH . 'screets-lc.php' );
|
8 |
require( IMAGIFY_3RD_PARTY_PATH . 'wp-retina-2x.php' );
|
9 |
require( IMAGIFY_3RD_PARTY_PATH . 'wp-rocket.php' );
|
|
|
10 |
|
11 |
// Hosting.
|
12 |
require( IMAGIFY_3RD_PARTY_PATH . 'hosting/wpengine.php' );
|
7 |
require( IMAGIFY_3RD_PARTY_PATH . 'screets-lc.php' );
|
8 |
require( IMAGIFY_3RD_PARTY_PATH . 'wp-retina-2x.php' );
|
9 |
require( IMAGIFY_3RD_PARTY_PATH . 'wp-rocket.php' );
|
10 |
+
require( IMAGIFY_3RD_PARTY_PATH . 'yoast-seo.php' );
|
11 |
|
12 |
// Hosting.
|
13 |
require( IMAGIFY_3RD_PARTY_PATH . 'hosting/wpengine.php' );
|
inc/3rd-party/amazon-s3-and-cloudfront/inc/classes/class-imagify-as3cf-attachment.php
CHANGED
@@ -14,7 +14,7 @@ class Imagify_AS3CF_Attachment extends Imagify_Attachment {
|
|
14 |
*
|
15 |
* @var string
|
16 |
*/
|
17 |
-
const VERSION = '1.
|
18 |
|
19 |
/**
|
20 |
* Tell if AS3CF settings will be used for this attachment.
|
@@ -334,6 +334,178 @@ class Imagify_AS3CF_Attachment extends Imagify_Attachment {
|
|
334 |
return $optimized_data;
|
335 |
}
|
336 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
337 |
/**
|
338 |
* Process an attachment restoration from the backup file.
|
339 |
*
|
14 |
*
|
15 |
* @var string
|
16 |
*/
|
17 |
+
const VERSION = '1.1';
|
18 |
|
19 |
/**
|
20 |
* Tell if AS3CF settings will be used for this attachment.
|
334 |
return $optimized_data;
|
335 |
}
|
336 |
|
337 |
+
/**
|
338 |
+
* Optimize missing thumbnail sizes with Imagify.
|
339 |
+
*
|
340 |
+
* @since 1.6.10
|
341 |
+
* @access public
|
342 |
+
* @author Grégory Viguier
|
343 |
+
*
|
344 |
+
* @param int $optimization_level The optimization level (2=ultra, 1=aggressive, 0=normal).
|
345 |
+
* @return array|object An array of thumbnail data, size by size. A WP_Error object on failure.
|
346 |
+
*/
|
347 |
+
public function optimize_missing_thumbnails( $optimization_level = null ) {
|
348 |
+
// Check if the attachment extension is allowed.
|
349 |
+
if ( ! $this->is_mime_type_supported() ) {
|
350 |
+
return new WP_Error( 'mime_type_not_supported', __( 'This type of file is not supported.', 'imagify' ) );
|
351 |
+
}
|
352 |
+
|
353 |
+
/**
|
354 |
+
* Create missing thumbnails and optimize them.
|
355 |
+
*/
|
356 |
+
$result = parent::optimize_missing_thumbnails( $optimization_level );
|
357 |
+
$result_sizes = array();
|
358 |
+
|
359 |
+
// Set the "optimization status" transient back.
|
360 |
+
set_transient( $this->optimization_state_transient, true, 10 * MINUTE_IN_SECONDS );
|
361 |
+
|
362 |
+
if ( is_array( $result ) ) {
|
363 |
+
// All good.
|
364 |
+
$result_sizes = $result;
|
365 |
+
} elseif ( is_wp_error( $result ) ) {
|
366 |
+
// Some thumbnails could not be created. Lets see if some were.
|
367 |
+
$result_sizes = $result->get_error_data( 'image_resize_error' );
|
368 |
+
$result_sizes = ! empty( $result_sizes['sizes_succeeded'] ) ? $result_sizes['sizes_succeeded'] : array();
|
369 |
+
}
|
370 |
+
|
371 |
+
if ( ! $result_sizes ) {
|
372 |
+
// No thumbnails created.
|
373 |
+
delete_transient( $this->optimization_state_transient );
|
374 |
+
return $result;
|
375 |
+
}
|
376 |
+
|
377 |
+
/**
|
378 |
+
* Fetch all images from S3 if they're not on the server.
|
379 |
+
* S3 Offload needs ALL images (so it can update its metas), we can't just send some of them without entering Hell -_-'.
|
380 |
+
*/
|
381 |
+
$metadata = $this->set_deletion_status();
|
382 |
+
|
383 |
+
if ( ! $this->can_send_to_s3() ) {
|
384 |
+
// The other thumbnails are not on S3, so we don't need to send the new ones.
|
385 |
+
delete_transient( $this->optimization_state_transient );
|
386 |
+
return $result;
|
387 |
+
}
|
388 |
+
|
389 |
+
/**
|
390 |
+
* The main file.
|
391 |
+
*/
|
392 |
+
$attachment_path = $this->get_original_path();
|
393 |
+
$filesystem = imagify_get_filesystem();
|
394 |
+
$to_delete = array();
|
395 |
+
$to_skip = array();
|
396 |
+
$filesize_total = 0;
|
397 |
+
$metadata_changed = false;
|
398 |
+
|
399 |
+
if ( ! $attachment_path ) {
|
400 |
+
// WAT?!
|
401 |
+
if ( ! is_wp_error( $result ) ) {
|
402 |
+
$result = new WP_Error( 'no_attachment_path', __( 'Files could not be sent to Amazon S3.', 'imagify' ), array(
|
403 |
+
'sizes_succeeded' => $result_sizes,
|
404 |
+
) );
|
405 |
+
} else {
|
406 |
+
$result->add( 'no_attachment_path', __( 'Files could not be sent to Amazon S3.', 'imagify' ) );
|
407 |
+
}
|
408 |
+
|
409 |
+
delete_transient( $this->optimization_state_transient );
|
410 |
+
return $result;
|
411 |
+
}
|
412 |
+
|
413 |
+
if ( ! $filesystem->exists( $attachment_path ) && ! $this->get_file_from_s3( $attachment_path ) ) {
|
414 |
+
// The file doesn't exist and couldn't be retrieved from S3.
|
415 |
+
if ( ! is_wp_error( $result ) ) {
|
416 |
+
$result = new WP_Error( 'main_file_not_on_s3', __( 'The main image could not be retrieved from Amazon S3.', 'imagify' ), array(
|
417 |
+
'sizes_succeeded' => $result_sizes,
|
418 |
+
) );
|
419 |
+
} else {
|
420 |
+
$result->add( 'main_file_not_on_s3', __( 'The main image could not be retrieved from Amazon S3.', 'imagify' ) );
|
421 |
+
}
|
422 |
+
|
423 |
+
delete_transient( $this->optimization_state_transient );
|
424 |
+
return $result;
|
425 |
+
}
|
426 |
+
|
427 |
+
// Files that must not be retrieved from S3.
|
428 |
+
foreach ( $result_sizes as $size_key => $size_data ) {
|
429 |
+
$to_skip[] = $this->get_thumbnail_path( $size_data['file'] );
|
430 |
+
}
|
431 |
+
|
432 |
+
// Store the paths of the files that may be deleted once sent to S3.
|
433 |
+
if ( $this->delete_files ) {
|
434 |
+
$to_delete[] = $attachment_path;
|
435 |
+
$to_delete = array_merge( $to_delete, $to_skip );
|
436 |
+
|
437 |
+
// This is used by AS3CF.
|
438 |
+
$bytes = $filesystem->size( $attachment_path );
|
439 |
+
|
440 |
+
if ( false !== $bytes ) {
|
441 |
+
$metadata_changed = true;
|
442 |
+
$filesize_total += $bytes;
|
443 |
+
$metadata['filesize'] = $bytes;
|
444 |
+
} elseif ( ! isset( $metadata['filesize'] ) ) {
|
445 |
+
$metadata_changed = true;
|
446 |
+
$metadata['filesize'] = 0;
|
447 |
+
}
|
448 |
+
}
|
449 |
+
|
450 |
+
/**
|
451 |
+
* The thumbnails.
|
452 |
+
*/
|
453 |
+
if ( ! empty( $metadata['sizes'] ) ) {
|
454 |
+
$to_skip = array_flip( $to_skip );
|
455 |
+
|
456 |
+
foreach ( $metadata['sizes'] as $size_key => $size_data ) {
|
457 |
+
$thumbnail_path = $this->get_thumbnail_path( $size_data['file'] );
|
458 |
+
|
459 |
+
if ( isset( $to_skip[ $thumbnail_path ] ) ) {
|
460 |
+
continue;
|
461 |
+
}
|
462 |
+
|
463 |
+
if ( ! $filesystem->exists( $thumbnail_path ) && ! $this->get_file_from_s3( $thumbnail_path ) ) {
|
464 |
+
// The file doesn't exist and couldn't be retrieved from S3.
|
465 |
+
if ( ! is_wp_error( $result ) ) {
|
466 |
+
$result = new WP_Error( 'thumbnail_not_on_s3', __( 'This size could not be retrieved from Amazon S3.', 'imagify' ), array(
|
467 |
+
'sizes_succeeded' => $result_sizes,
|
468 |
+
'size' => $size_key,
|
469 |
+
) );
|
470 |
+
} else {
|
471 |
+
$result->add( 'thumbnail_not_on_s3', __( 'This size could not be retrieved from Amazon S3.', 'imagify' ), array(
|
472 |
+
'size' => $size_key,
|
473 |
+
) );
|
474 |
+
}
|
475 |
+
|
476 |
+
delete_transient( $this->optimization_state_transient );
|
477 |
+
return $result;
|
478 |
+
}
|
479 |
+
|
480 |
+
if ( $this->delete_files ) {
|
481 |
+
$to_delete[] = $thumbnail_path;
|
482 |
+
|
483 |
+
// This is used by AS3CF.
|
484 |
+
$bytes = $filesystem->size( $thumbnail_path );
|
485 |
+
|
486 |
+
if ( false !== $bytes ) {
|
487 |
+
$filesize_total += $bytes;
|
488 |
+
}
|
489 |
+
}
|
490 |
+
} // End foreach().
|
491 |
+
} // End if().
|
492 |
+
|
493 |
+
if ( $this->delete_files && $filesize_total ) {
|
494 |
+
// Add the total file size for all image sizes. This is a meta used by AS3CF.
|
495 |
+
update_post_meta( $this->id, 'wpos3_filesize_total', $filesize_total );
|
496 |
+
}
|
497 |
+
|
498 |
+
$sent = $this->maybe_send_attachment_to_s3( $metadata, $attachment_path );
|
499 |
+
// Update metadata only if they changed.
|
500 |
+
$metadata = $metadata_changed ? $metadata : false;
|
501 |
+
// Delete files only if they have been uploaded to S3.
|
502 |
+
$to_delete = $sent ? $to_delete : array();
|
503 |
+
|
504 |
+
$this->cleanup( $metadata, $to_delete );
|
505 |
+
|
506 |
+
return $result;
|
507 |
+
}
|
508 |
+
|
509 |
/**
|
510 |
* Process an attachment restoration from the backup file.
|
511 |
*
|
inc/3rd-party/amazon-s3-and-cloudfront/inc/classes/class-imagify-as3cf.php
CHANGED
@@ -83,6 +83,11 @@ class Imagify_AS3CF {
|
|
83 |
*/
|
84 |
add_filter( 'imagify_optimize_attachment_context', array( $this, 'optimize_attachment_context' ), 10, 2 );
|
85 |
|
|
|
|
|
|
|
|
|
|
|
86 |
/**
|
87 |
* Bulk optimization.
|
88 |
*/
|
@@ -97,7 +102,7 @@ class Imagify_AS3CF {
|
|
97 |
* Automatic optimisation.
|
98 |
*/
|
99 |
// Remove some of our hooks: let S3 work first in these cases.
|
100 |
-
remove_filter( 'wp_generate_attachment_metadata', '_imagify_optimize_attachment',
|
101 |
remove_action( 'wp_ajax_imagify_async_optimize_as3cf', '_do_admin_post_async_optimize_upload_new_media' );
|
102 |
remove_action( 'shutdown', '_imagify_optimize_save_image_editor_file' );
|
103 |
remove_action( 'wp_ajax_imagify_async_optimize_save_image_editor_file', '_do_admin_post_async_optimize_save_image_editor_file' );
|
@@ -127,12 +132,26 @@ class Imagify_AS3CF {
|
|
127 |
* @return string The new context.
|
128 |
*/
|
129 |
public function optimize_attachment_context( $context, $attachment_id ) {
|
130 |
-
if ( self::CONTEXT === $context || imagify_is_attachment_mime_type_supported( $attachment_id ) ) {
|
131 |
return self::CONTEXT;
|
132 |
}
|
133 |
return $context;
|
134 |
}
|
135 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
136 |
/**
|
137 |
* When getting all unoptimized attachment ids before performing a bulk optimization, download the missing files from S3.
|
138 |
*
|
83 |
*/
|
84 |
add_filter( 'imagify_optimize_attachment_context', array( $this, 'optimize_attachment_context' ), 10, 2 );
|
85 |
|
86 |
+
/**
|
87 |
+
* Redirections.
|
88 |
+
*/
|
89 |
+
add_filter( 'imagify_redirect_to', array( $this, 'redirect_referrer' ) );
|
90 |
+
|
91 |
/**
|
92 |
* Bulk optimization.
|
93 |
*/
|
102 |
* Automatic optimisation.
|
103 |
*/
|
104 |
// Remove some of our hooks: let S3 work first in these cases.
|
105 |
+
remove_filter( 'wp_generate_attachment_metadata', '_imagify_optimize_attachment', IMAGIFY_INT_MAX );
|
106 |
remove_action( 'wp_ajax_imagify_async_optimize_as3cf', '_do_admin_post_async_optimize_upload_new_media' );
|
107 |
remove_action( 'shutdown', '_imagify_optimize_save_image_editor_file' );
|
108 |
remove_action( 'wp_ajax_imagify_async_optimize_save_image_editor_file', '_do_admin_post_async_optimize_save_image_editor_file' );
|
132 |
* @return string The new context.
|
133 |
*/
|
134 |
public function optimize_attachment_context( $context, $attachment_id ) {
|
135 |
+
if ( self::CONTEXT === $context || ( 'wp' === $context && imagify_is_attachment_mime_type_supported( $attachment_id ) ) ) {
|
136 |
return self::CONTEXT;
|
137 |
}
|
138 |
return $context;
|
139 |
}
|
140 |
|
141 |
+
/**
|
142 |
+
* After a non-ajax optimization, remove some unnecessary arguments from the referrer used for the redirection.
|
143 |
+
* Those arguments don't break anything, they're just not relevant and display obsolete admin notices.
|
144 |
+
*
|
145 |
+
* @since 1.6.10
|
146 |
+
* @author Grégory Viguier
|
147 |
+
*
|
148 |
+
* @param string $redirect The URL to redirect to.
|
149 |
+
* @return string
|
150 |
+
*/
|
151 |
+
public function redirect_referrer( $redirect ) {
|
152 |
+
return remove_query_arg( array( 'as3cfpro-action', 'as3cf_id', 'errors', 'count' ), $redirect );
|
153 |
+
}
|
154 |
+
|
155 |
/**
|
156 |
* When getting all unoptimized attachment ids before performing a bulk optimization, download the missing files from S3.
|
157 |
*
|
inc/3rd-party/enable-media-replace/inc/classes/class-imagify-enable-media-replace.php
CHANGED
@@ -87,7 +87,7 @@ class Imagify_Enable_Media_Replace {
|
|
87 |
}
|
88 |
|
89 |
// Remove the automatic optimization.
|
90 |
-
remove_filter( 'wp_generate_attachment_metadata', '_imagify_optimize_attachment',
|
91 |
|
92 |
// Store the old backup file path.
|
93 |
add_filter( 'emr_unique_filename', array( $this, 'store_old_backup_path' ), 10, 3 );
|
87 |
}
|
88 |
|
89 |
// Remove the automatic optimization.
|
90 |
+
remove_filter( 'wp_generate_attachment_metadata', '_imagify_optimize_attachment', IMAGIFY_INT_MAX );
|
91 |
|
92 |
// Store the old backup file path.
|
93 |
add_filter( 'emr_unique_filename', array( $this, 'store_old_backup_path' ), 10, 3 );
|
inc/3rd-party/nextgen-gallery/inc/admin/ajax.php
CHANGED
@@ -11,11 +11,8 @@ add_action( 'wp_ajax_imagify_ngg_get_unoptimized_attachment_ids', '_do_wp_ajax_i
|
|
11 |
function _do_wp_ajax_imagify_ngg_get_unoptimized_attachment_ids() {
|
12 |
global $wpdb;
|
13 |
|
14 |
-
|
15 |
-
|
16 |
-
if ( ! current_user_can( 'upload_files' ) ) {
|
17 |
-
wp_send_json_error();
|
18 |
-
}
|
19 |
|
20 |
$user = new Imagify_User();
|
21 |
|
11 |
function _do_wp_ajax_imagify_ngg_get_unoptimized_attachment_ids() {
|
12 |
global $wpdb;
|
13 |
|
14 |
+
imagify_check_nonce( 'imagify-bulk-upload', 'imagifybulkuploadnonce' );
|
15 |
+
imagify_check_user_capacity( 'upload_files' );
|
|
|
|
|
|
|
16 |
|
17 |
$user = new Imagify_User();
|
18 |
|
inc/3rd-party/nextgen-gallery/inc/admin/bulk.php
CHANGED
File without changes
|
inc/3rd-party/nextgen-gallery/inc/admin/db.php
CHANGED
File without changes
|
inc/3rd-party/nextgen-gallery/inc/admin/enqueue.php
CHANGED
@@ -1,64 +1,51 @@
|
|
1 |
<?php
|
2 |
defined( 'ABSPATH' ) || die( 'Cheatin\' uh?' );
|
3 |
|
4 |
-
add_action( '
|
5 |
/**
|
6 |
-
* Add some JS for NGG compatibility.
|
7 |
*
|
8 |
-
* @since
|
|
|
9 |
* @author Jonathan Buttigieg
|
|
|
10 |
*/
|
11 |
function _imagify_ngg_admin_print_styles() {
|
12 |
-
$
|
|
|
13 |
|
14 |
/**
|
15 |
-
*
|
16 |
*/
|
17 |
-
if (
|
18 |
-
$
|
19 |
-
|
20 |
-
'optimize' => __( 'Optimize', 'imagify' ),
|
21 |
-
'restore' => __( 'Restore Original', 'imagify' ),
|
22 |
-
),
|
23 |
-
);
|
24 |
-
wp_localize_script( 'imagify-js-upload', 'imagifyUpload', $upload_data );
|
25 |
-
|
26 |
-
wp_enqueue_script( 'imagify-js-chart' );
|
27 |
-
wp_enqueue_script( 'imagify-js-upload' );
|
28 |
}
|
29 |
|
30 |
/**
|
31 |
-
*
|
32 |
*/
|
33 |
-
|
34 |
-
|
|
|
|
|
35 |
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
$bulk_data['ajax_context'] = 'NGG';
|
40 |
|
41 |
-
|
42 |
-
$bulk_data['buffer_size'] = apply_filters( 'imagify_bulk_buffer_size', 4 );
|
43 |
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
|
|
50 |
|
51 |
-
|
52 |
-
/**
|
53 |
-
* Add Intercom on Options page an Bulk Optimization
|
54 |
-
*
|
55 |
-
* @since 1.5
|
56 |
-
* @author Jonathan Buttigieg
|
57 |
-
*/
|
58 |
-
function _imagify_ngg_admin_print_intercom() {
|
59 |
-
$current_screen = get_current_screen();
|
60 |
|
61 |
-
|
62 |
-
|
63 |
-
}
|
64 |
}
|
1 |
<?php
|
2 |
defined( 'ABSPATH' ) || die( 'Cheatin\' uh?' );
|
3 |
|
4 |
+
add_action( 'imagify_assets_enqueued', '_imagify_ngg_admin_print_styles' );
|
5 |
/**
|
6 |
+
* Add some CSS and JS for NGG compatibility.
|
7 |
*
|
8 |
+
* @since 1.5
|
9 |
+
* @since 1.6.10 Use the new class Imagify_Assets.
|
10 |
* @author Jonathan Buttigieg
|
11 |
+
* @author Grégory Viguier
|
12 |
*/
|
13 |
function _imagify_ngg_admin_print_styles() {
|
14 |
+
global $admin_page_hooks;
|
15 |
+
$assets = Imagify_Assets::get_instance();
|
16 |
|
17 |
/**
|
18 |
+
* Manage Gallery Images.
|
19 |
*/
|
20 |
+
if ( imagify_is_screen( 'nggallery-manage-images' ) ) {
|
21 |
+
$assets->enqueue_style( 'admin' )->enqueue_script( 'library' );
|
22 |
+
return;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
23 |
}
|
24 |
|
25 |
/**
|
26 |
+
* NGG Bulk Optimization.
|
27 |
*/
|
28 |
+
// Because WP nonsense, the screen ID depends on the menu title, which is translated. So the screen ID changes depending on the administration locale.
|
29 |
+
$ngg_menu_slug = defined( 'NGGFOLDER' ) ? plugin_basename( NGGFOLDER ) : 'nextgen-gallery';
|
30 |
+
$ngg_menu_slug = isset( $admin_page_hooks[ $ngg_menu_slug ] ) ? $admin_page_hooks[ $ngg_menu_slug ] : 'gallery';
|
31 |
+
$bulk_screen_id = $ngg_menu_slug . '_page_' . IMAGIFY_SLUG . '-ngg-bulk-optimization';
|
32 |
|
33 |
+
if ( ! imagify_is_screen( $bulk_screen_id ) ) {
|
34 |
+
return;
|
35 |
+
}
|
|
|
36 |
|
37 |
+
$assets->remove_deferred_localization( 'bulk', 'imagifyBulk' );
|
|
|
38 |
|
39 |
+
$l10n = $assets->get_localization_data( 'bulk', array(
|
40 |
+
'heartbeatId' => 'update_ngg_bulk_data',
|
41 |
+
'ajaxAction' => 'imagify_ngg_get_unoptimized_attachment_ids',
|
42 |
+
'ajaxContext' => 'NGG',
|
43 |
+
/** This filter is documented in inc/classes/class-imagify-assets.php */
|
44 |
+
'bufferSize' => apply_filters( 'imagify_bulk_buffer_size', 4 ),
|
45 |
+
) );
|
46 |
|
47 |
+
$assets->enqueue_assets( array( 'pricing-modal', 'bulk' ) )->localize( 'imagifyBulk', $l10n );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
48 |
|
49 |
+
// Intercom.
|
50 |
+
add_action( 'admin_footer-' . $bulk_screen_id, array( $assets, 'print_intercom' ) );
|
|
|
51 |
}
|
inc/3rd-party/nextgen-gallery/inc/admin/gallery.php
CHANGED
@@ -5,7 +5,7 @@ add_filter( 'ngg_manage_images_number_of_columns', '_imagify_ngg_manage_images_n
|
|
5 |
/**
|
6 |
* Add "Imagify" column in admin.php?page=nggallery-manage-gallery.
|
7 |
*
|
8 |
-
* @since
|
9 |
* @author Jonathan Buttigieg
|
10 |
*
|
11 |
* @param int $count Number of columns.
|
@@ -22,7 +22,7 @@ function _imagify_ngg_manage_images_number_of_columns( $count ) {
|
|
22 |
/**
|
23 |
* Get the column title.
|
24 |
*
|
25 |
-
* @since
|
26 |
* @author Jonathan Buttigieg
|
27 |
*
|
28 |
* @return string
|
@@ -34,7 +34,7 @@ function _imagify_ngg_manage_media_columns() {
|
|
34 |
/**
|
35 |
* Get the column content.
|
36 |
*
|
37 |
-
* @since
|
38 |
* @author Jonathan Buttigieg
|
39 |
*
|
40 |
* @param string $output The column content.
|
@@ -45,3 +45,19 @@ function _imagify_ngg_manage_media_custom_column( $output, $image ) {
|
|
45 |
$attachment = new Imagify_NGG_Attachment( $image );
|
46 |
return get_imagify_media_column_content( $attachment, 'NGG' );
|
47 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5 |
/**
|
6 |
* Add "Imagify" column in admin.php?page=nggallery-manage-gallery.
|
7 |
*
|
8 |
+
* @since 1.5
|
9 |
* @author Jonathan Buttigieg
|
10 |
*
|
11 |
* @param int $count Number of columns.
|
22 |
/**
|
23 |
* Get the column title.
|
24 |
*
|
25 |
+
* @since 1.5
|
26 |
* @author Jonathan Buttigieg
|
27 |
*
|
28 |
* @return string
|
34 |
/**
|
35 |
* Get the column content.
|
36 |
*
|
37 |
+
* @since 1.5
|
38 |
* @author Jonathan Buttigieg
|
39 |
*
|
40 |
* @param string $output The column content.
|
45 |
$attachment = new Imagify_NGG_Attachment( $image );
|
46 |
return get_imagify_media_column_content( $attachment, 'NGG' );
|
47 |
}
|
48 |
+
|
49 |
+
add_filter( 'imagify_display_missing_thumbnails_link', '_imagify_ngg_hide_missing_thumbnails_link', 10, 3 );
|
50 |
+
/**
|
51 |
+
* Hide the "Optimize missing thumbnails" link.
|
52 |
+
*
|
53 |
+
* @since 1.6.10
|
54 |
+
* @author Grégory Viguier
|
55 |
+
*
|
56 |
+
* @param bool $display True to display the link. False to not display it.
|
57 |
+
* @param object $attachment The attachement object.
|
58 |
+
* @param string $context The context.
|
59 |
+
* @return bool
|
60 |
+
*/
|
61 |
+
function _imagify_ngg_hide_missing_thumbnails_link( $display, $attachment, $context ) {
|
62 |
+
return 'NGG' === $context ? false : $display;
|
63 |
+
}
|
inc/3rd-party/nextgen-gallery/inc/admin/heartbeat.php
CHANGED
@@ -43,5 +43,5 @@ function _imagify_ngg_heartbeat_received( $response, $data ) {
|
|
43 |
* @since 1.5
|
44 |
*/
|
45 |
if ( 'admin.php' === $pagenow && isset( $_GET['page'] ) && 'imagify-ngg-bulk-optimization' === $_GET['page'] ) { // WPCS: CSRF ok.
|
46 |
-
add_filter( 'heartbeat_settings', '_imagify_heartbeat_settings',
|
47 |
}
|
43 |
* @since 1.5
|
44 |
*/
|
45 |
if ( 'admin.php' === $pagenow && isset( $_GET['page'] ) && 'imagify-ngg-bulk-optimization' === $_GET['page'] ) { // WPCS: CSRF ok.
|
46 |
+
add_filter( 'heartbeat_settings', '_imagify_heartbeat_settings', IMAGIFY_INT_MAX );
|
47 |
}
|
inc/3rd-party/nextgen-gallery/inc/admin/menu.php
CHANGED
File without changes
|
inc/3rd-party/nextgen-gallery/inc/classes/class-imagify-ngg-attachment.php
CHANGED
@@ -105,7 +105,7 @@ class Imagify_NGG_Attachment extends Imagify_Attachment {
|
|
105 |
* @return string|false
|
106 |
*/
|
107 |
public function get_backup_url() {
|
108 |
-
return site_url( '/' ) .
|
109 |
}
|
110 |
|
111 |
/**
|
105 |
* @return string|false
|
106 |
*/
|
107 |
public function get_backup_url() {
|
108 |
+
return site_url( '/' ) . imagify_make_file_path_relative( $this->get_backup_path() );
|
109 |
}
|
110 |
|
111 |
/**
|
inc/3rd-party/nextgen-gallery/inc/common/attachments.php
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?php
|
2 |
defined( 'ABSPATH' ) || die( 'Cheatin\' uh?' );
|
3 |
|
4 |
-
add_action( 'ngg_after_new_images_added', '_imagify_ngg_optimize_attachment',
|
5 |
/**
|
6 |
* Auto-optimize when a new attachment is generated.
|
7 |
*
|
1 |
<?php
|
2 |
defined( 'ABSPATH' ) || die( 'Cheatin\' uh?' );
|
3 |
|
4 |
+
add_action( 'ngg_after_new_images_added', '_imagify_ngg_optimize_attachment', IMAGIFY_INT_MAX, 2 );
|
5 |
/**
|
6 |
* Auto-optimize when a new attachment is generated.
|
7 |
*
|
inc/3rd-party/nextgen-gallery/inc/functions/admin-stats.php
CHANGED
File without changes
|
inc/3rd-party/wp-rocket.php
CHANGED
@@ -1,21 +1,28 @@
|
|
1 |
<?php
|
2 |
defined( 'ABSPATH' ) || die( 'Cheatin\' uh?' );
|
3 |
|
4 |
-
|
5 |
-
|
|
|
6 |
/**
|
7 |
-
* Don't load Imagify CSS & JS files on WP Rocket options screen to avoid conflict.
|
|
|
8 |
*
|
9 |
-
* @since
|
|
|
10 |
* @author Jonathan Buttigieg
|
|
|
11 |
*/
|
12 |
-
add_action( 'admin_print_styles', 'imagify_dequeue_sweetalert_wprocket', 11 );
|
13 |
function imagify_dequeue_sweetalert_wprocket() {
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
|
|
19 |
}
|
|
|
|
|
20 |
}
|
21 |
-
|
|
1 |
<?php
|
2 |
defined( 'ABSPATH' ) || die( 'Cheatin\' uh?' );
|
3 |
|
4 |
+
if ( defined( 'WP_ROCKET_VERSION' ) ) :
|
5 |
+
|
6 |
+
add_action( 'imagify_assets_enqueued', 'imagify_dequeue_sweetalert_wprocket' );
|
7 |
/**
|
8 |
+
* Don't load Imagify CSS & JS files on WP Rocket options screen to avoid conflict with older version of SweetAlert.
|
9 |
+
* Since 1.6.10 they should be enqueued only if one of our notices displays here.
|
10 |
*
|
11 |
+
* @since 1.6.9.1
|
12 |
+
* @since 1.6.10 Use the new class Imagify_Assets.
|
13 |
* @author Jonathan Buttigieg
|
14 |
+
* @author Grégory Viguier
|
15 |
*/
|
|
|
16 |
function imagify_dequeue_sweetalert_wprocket() {
|
17 |
+
if ( ! defined( 'WP_ROCKET_PLUGIN_SLUG' ) ) {
|
18 |
+
return;
|
19 |
+
}
|
20 |
+
|
21 |
+
if ( ! imagify_is_screen( 'settings_page_' . WP_ROCKET_PLUGIN_SLUG ) && ! imagify_is_screen( 'settings_page_' . WP_ROCKET_PLUGIN_SLUG . '-network' ) ) {
|
22 |
+
return;
|
23 |
}
|
24 |
+
|
25 |
+
Imagify_Assets::get_instance()->dequeue_script( array( 'sweetalert-core', 'sweetalert', 'notices' ) );
|
26 |
}
|
27 |
+
|
28 |
+
endif;
|
inc/3rd-party/yoast-seo.php
ADDED
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
defined( 'ABSPATH' ) || die( 'Cheatin\' uh?' );
|
3 |
+
|
4 |
+
if ( defined( 'WPSEO_VERSION' ) && is_admin() && ! defined( 'DOING_AJAX' ) ) :
|
5 |
+
|
6 |
+
add_action( 'wp_print_scripts', '_imagify_dequeue_yoastseo_script' );
|
7 |
+
/**
|
8 |
+
* Remove Yoast SEO bugged script.
|
9 |
+
*
|
10 |
+
* @since 1.4.1
|
11 |
+
*/
|
12 |
+
function _imagify_dequeue_yoastseo_script() {
|
13 |
+
$current_screen = get_current_screen();
|
14 |
+
|
15 |
+
if ( isset( $current_screen ) && 'post' === $current_screen->base && 'attachment' === $current_screen->post_type ) {
|
16 |
+
wp_dequeue_script( 'yoast-seo' );
|
17 |
+
wp_deregister_script( 'yoast-seo' );
|
18 |
+
}
|
19 |
+
}
|
20 |
+
|
21 |
+
endif;
|
inc/admin/ajax.php
CHANGED
@@ -14,18 +14,11 @@ add_action( 'admin_post_imagify_manual_upload', '_do_admin_post_imagify_manual_u
|
|
14 |
* @author Jonathan Buttigieg
|
15 |
*/
|
16 |
function _do_admin_post_imagify_manual_upload() {
|
17 |
-
|
18 |
-
|
19 |
-
} else {
|
20 |
-
check_admin_referer( 'imagify-manual-upload' );
|
21 |
-
}
|
22 |
|
23 |
-
if (
|
24 |
-
|
25 |
-
wp_send_json_error();
|
26 |
-
} else {
|
27 |
-
wp_nonce_ays( '' );
|
28 |
-
}
|
29 |
}
|
30 |
|
31 |
$context = esc_html( $_GET['context'] );
|
@@ -36,10 +29,7 @@ function _do_admin_post_imagify_manual_upload() {
|
|
36 |
// Optimize it!!!!!
|
37 |
$attachment->optimize();
|
38 |
|
39 |
-
|
40 |
-
wp_safe_redirect( wp_get_referer() );
|
41 |
-
die();
|
42 |
-
}
|
43 |
|
44 |
// Return the optimization statistics.
|
45 |
$output = get_imagify_attachment_optimization_text( $attachment, $context );
|
@@ -55,18 +45,11 @@ add_action( 'admin_post_imagify_manual_override_upload', '_do_admin_post_imagify
|
|
55 |
* @author Jonathan Buttigieg
|
56 |
*/
|
57 |
function _do_admin_post_imagify_manual_override_upload() {
|
58 |
-
|
59 |
-
|
60 |
-
} else {
|
61 |
-
check_admin_referer( 'imagify-manual-override-upload' );
|
62 |
-
}
|
63 |
|
64 |
-
if (
|
65 |
-
|
66 |
-
wp_send_json_error();
|
67 |
-
} else {
|
68 |
-
wp_nonce_ays( '' );
|
69 |
-
}
|
70 |
}
|
71 |
|
72 |
$context = esc_html( $_GET['context'] );
|
@@ -80,11 +63,39 @@ function _do_admin_post_imagify_manual_override_upload() {
|
|
80 |
// Optimize it!!!!!
|
81 |
$attachment->optimize( (int) $_GET['optimization_level'] );
|
82 |
|
83 |
-
|
84 |
-
|
85 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
86 |
}
|
87 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
88 |
// Return the optimization statistics.
|
89 |
$output = get_imagify_attachment_optimization_text( $attachment, $context );
|
90 |
wp_send_json_success( $output );
|
@@ -99,18 +110,11 @@ add_action( 'admin_post_imagify_restore_upload', '_do_admin_post_imagify_restore
|
|
99 |
* @author Jonathan Buttigieg
|
100 |
*/
|
101 |
function _do_admin_post_imagify_restore_upload() {
|
102 |
-
|
103 |
-
|
104 |
-
} else {
|
105 |
-
check_admin_referer( 'imagify-restore-upload' );
|
106 |
-
}
|
107 |
|
108 |
-
if (
|
109 |
-
|
110 |
-
wp_send_json_error();
|
111 |
-
} else {
|
112 |
-
wp_nonce_ays( '' );
|
113 |
-
}
|
114 |
}
|
115 |
|
116 |
$context = esc_html( $_GET['context'] );
|
@@ -121,10 +125,7 @@ function _do_admin_post_imagify_restore_upload() {
|
|
121 |
// Restore the backup file.
|
122 |
$attachment->restore();
|
123 |
|
124 |
-
|
125 |
-
wp_safe_redirect( wp_get_referer() );
|
126 |
-
die();
|
127 |
-
}
|
128 |
|
129 |
// Return the optimization button.
|
130 |
$output = get_imagify_admin_url( 'manual-upload', array( 'attachment_id' => $attachment->id, 'context' => $context ) );
|
@@ -140,10 +141,11 @@ add_action( 'wp_ajax_imagify_bulk_upload', '_do_wp_ajax_imagify_bulk_upload' );
|
|
140 |
* @author Jonathan Buttigieg
|
141 |
*/
|
142 |
function _do_wp_ajax_imagify_bulk_upload() {
|
143 |
-
|
|
|
144 |
|
145 |
-
if (
|
146 |
-
|
147 |
}
|
148 |
|
149 |
$context = esc_html( $_POST['context'] );
|
@@ -170,7 +172,7 @@ function _do_wp_ajax_imagify_bulk_upload() {
|
|
170 |
$data['success'] = false;
|
171 |
$data['error'] = $fullsize_data['error'];
|
172 |
|
173 |
-
|
174 |
}
|
175 |
|
176 |
$data['success'] = true;
|
@@ -193,16 +195,17 @@ add_action( 'wp_ajax_imagify_async_optimize_upload_new_media', '_do_admin_post_a
|
|
193 |
/**
|
194 |
* Optimize image on picture uploading with async request.
|
195 |
*
|
196 |
-
* @since
|
197 |
* @author Julio Potier
|
198 |
-
* @see
|
199 |
*/
|
200 |
function _do_admin_post_async_optimize_upload_new_media() {
|
201 |
-
if (
|
202 |
return;
|
203 |
}
|
204 |
|
205 |
-
|
|
|
206 |
|
207 |
$context = esc_html( $_POST['context'] );
|
208 |
$attachment_id = absint( $_POST['attachment_id'] );
|
@@ -222,13 +225,14 @@ add_action( 'wp_ajax_imagify_async_optimize_save_image_editor_file', '_do_admin_
|
|
222 |
* @author Julio Potier
|
223 |
*/
|
224 |
function _do_admin_post_async_optimize_save_image_editor_file() {
|
225 |
-
|
|
|
|
|
226 |
return;
|
227 |
}
|
228 |
|
229 |
-
|
230 |
-
|
231 |
-
$attachment_id = absint( $_POST['postid'] );
|
232 |
|
233 |
if ( ! get_post_meta( $attachment_id, '_imagify_data', true ) ) {
|
234 |
return;
|
@@ -275,11 +279,8 @@ add_action( 'wp_ajax_imagify_get_unoptimized_attachment_ids', '_do_wp_ajax_imagi
|
|
275 |
function _do_wp_ajax_imagify_get_unoptimized_attachment_ids() {
|
276 |
global $wpdb;
|
277 |
|
278 |
-
|
279 |
-
|
280 |
-
if ( ! current_user_can( 'upload_files' ) ) {
|
281 |
-
wp_send_json_error();
|
282 |
-
}
|
283 |
|
284 |
if ( ! imagify_valid_key() ) {
|
285 |
wp_send_json_error( array( 'message' => 'invalid-api-key' ) );
|
@@ -452,11 +453,8 @@ add_action( 'wp_ajax_imagify_check_backup_dir_is_writable', '_do_wp_ajax_imagify
|
|
452 |
* @author Grégory Viguier
|
453 |
*/
|
454 |
function _do_wp_ajax_imagify_check_backup_dir_is_writable() {
|
455 |
-
|
456 |
-
|
457 |
-
if ( ! current_user_can( imagify_get_capacity() ) ) {
|
458 |
-
wp_send_json_error();
|
459 |
-
}
|
460 |
|
461 |
wp_send_json_success( array(
|
462 |
'is_writable' => (int) imagify_backup_dir_is_writable(),
|
@@ -475,10 +473,15 @@ add_action( 'wp_ajax_imagify_signup', '_do_wp_ajax_imagify_signup' );
|
|
475 |
* @author Jonathan Buttigieg
|
476 |
*/
|
477 |
function _do_wp_ajax_imagify_signup() {
|
478 |
-
|
|
|
479 |
|
480 |
-
if (
|
481 |
-
|
|
|
|
|
|
|
|
|
482 |
}
|
483 |
|
484 |
$data = array(
|
@@ -490,7 +493,7 @@ function _do_wp_ajax_imagify_signup() {
|
|
490 |
$response = add_imagify_user( $data );
|
491 |
|
492 |
if ( is_wp_error( $response ) ) {
|
493 |
-
|
494 |
}
|
495 |
|
496 |
wp_send_json_success();
|
@@ -504,16 +507,17 @@ add_action( 'wp_ajax_imagify_check_api_key_validity', '_do_wp_ajax_imagify_check
|
|
504 |
* @author Jonathan Buttigieg
|
505 |
*/
|
506 |
function _do_wp_ajax_imagify_check_api_key_validity() {
|
507 |
-
|
|
|
508 |
|
509 |
-
if (
|
510 |
-
|
511 |
}
|
512 |
|
513 |
$response = get_imagify_status( $_GET['api_key'] );
|
514 |
|
515 |
if ( is_wp_error( $response ) ) {
|
516 |
-
|
517 |
}
|
518 |
|
519 |
$options = get_site_option( IMAGIFY_SETTINGS_SLUG );
|
@@ -532,7 +536,8 @@ add_action( 'wp_ajax_imagify_get_admin_bar_profile', '_do_wp_ajax_imagify_get_ad
|
|
532 |
* @author Jonathan Buttigieg
|
533 |
*/
|
534 |
function _do_wp_ajax_imagify_get_admin_bar_profile() {
|
535 |
-
|
|
|
536 |
|
537 |
$user = new Imagify_User();
|
538 |
$unconsumed_quota = $user->get_percent_unconsumed_quota();
|
@@ -554,7 +559,7 @@ function _do_wp_ajax_imagify_get_admin_bar_profile() {
|
|
554 |
$message .= '<p><i class="dashicons dashicons-warning" aria-hidden="true"></i><strong>' . __( 'Oops, It\'s almost over!', 'imagify' ) . '</strong></p>';
|
555 |
/* translators: %s is a line break. */
|
556 |
$message .= '<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>';
|
557 |
-
$message .= '<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>';
|
558 |
$message .= '</div>';
|
559 |
}
|
560 |
|
@@ -567,7 +572,7 @@ function _do_wp_ajax_imagify_get_admin_bar_profile() {
|
|
567 |
size_format( $user->quota * 1048576 ),
|
568 |
date_i18n( get_option( 'date_format' ), strtotime( $user->next_date_update ) )
|
569 |
) . '</p>';
|
570 |
-
$message .= '<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>';
|
571 |
$message .= '</div>';
|
572 |
}
|
573 |
|
@@ -617,18 +622,17 @@ add_action( 'wp_ajax_imagify_get_prices', '_imagify_get_prices_from_api' );
|
|
617 |
* @author Geoffrey Crofte
|
618 |
*/
|
619 |
function _imagify_get_prices_from_api() {
|
620 |
-
|
621 |
-
|
622 |
-
}
|
623 |
|
624 |
$prices_all = get_imagify_all_prices();
|
625 |
|
626 |
if ( is_wp_error( $prices_all ) ) {
|
627 |
-
|
628 |
}
|
629 |
|
630 |
if ( ! is_object( $prices_all ) ) {
|
631 |
-
|
632 |
}
|
633 |
|
634 |
wp_send_json_success( array(
|
@@ -645,11 +649,23 @@ add_action( 'wp_ajax_imagify_check_coupon', '_imagify_check_coupon_code' );
|
|
645 |
* @author Geoffrey Crofte
|
646 |
*/
|
647 |
function _imagify_check_coupon_code() {
|
648 |
-
|
649 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
650 |
}
|
651 |
|
652 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
653 |
}
|
654 |
|
655 |
add_action( 'wp_ajax_imagify_get_discount', '_imagify_get_discount' );
|
@@ -660,11 +676,10 @@ add_action( 'wp_ajax_imagify_get_discount', '_imagify_get_discount' );
|
|
660 |
* @author Geoffrey Crofte
|
661 |
*/
|
662 |
function _imagify_get_discount() {
|
663 |
-
|
664 |
-
|
665 |
-
}
|
666 |
|
667 |
-
wp_send_json_success( check_imagify_discount() );
|
668 |
}
|
669 |
|
670 |
add_action( 'wp_ajax_imagify_get_images_counts', '_imagify_get_estimated_sizes' );
|
@@ -675,9 +690,8 @@ add_action( 'wp_ajax_imagify_get_images_counts', '_imagify_get_estimated_sizes'
|
|
675 |
* @author Geoffrey Crofte
|
676 |
*/
|
677 |
function _imagify_get_estimated_sizes() {
|
678 |
-
|
679 |
-
|
680 |
-
}
|
681 |
|
682 |
$raw_total_size_in_library = imagify_calculate_total_size_images_library();
|
683 |
$raw_average_per_month = imagify_calculate_average_size_images_per_month();
|
@@ -698,7 +712,8 @@ add_action( 'wp_ajax_imagify_update_estimate_sizes', '_imagify_update_estimate_s
|
|
698 |
* @author Remy Perona
|
699 |
*/
|
700 |
function _imagify_update_estimate_sizes() {
|
701 |
-
|
|
|
702 |
|
703 |
$raw_total_size_in_library = imagify_calculate_total_size_images_library();
|
704 |
$raw_average_per_month = imagify_calculate_average_size_images_per_month();
|
@@ -708,69 +723,3 @@ function _imagify_update_estimate_sizes() {
|
|
708 |
|
709 |
die( 1 );
|
710 |
}
|
711 |
-
|
712 |
-
/** --------------------------------------------------------------------------------------------- */
|
713 |
-
/** OTHER ======================================================================================= */
|
714 |
-
/** --------------------------------------------------------------------------------------------- */
|
715 |
-
|
716 |
-
add_action( 'wp_ajax_imagify_dismiss_notice', '_do_admin_post_imagify_dismiss_notice' );
|
717 |
-
add_action( 'admin_post_imagify_dismiss_notice', '_do_admin_post_imagify_dismiss_notice' );
|
718 |
-
/**
|
719 |
-
* Process a dismissed notice.
|
720 |
-
*
|
721 |
-
* @since 1.0
|
722 |
-
* @author Jonathan Buttigieg
|
723 |
-
*/
|
724 |
-
function _do_admin_post_imagify_dismiss_notice() {
|
725 |
-
if ( defined( 'DOING_AJAX' ) ) {
|
726 |
-
check_ajax_referer( 'imagify-dismiss-notice' );
|
727 |
-
} else {
|
728 |
-
check_admin_referer( 'imagify-dismiss-notice' );
|
729 |
-
}
|
730 |
-
|
731 |
-
if ( ! isset( $_GET['notice'] ) || ! current_user_can( 'manage_options' ) ) {
|
732 |
-
if ( defined( 'DOING_AJAX' ) ) {
|
733 |
-
wp_send_json_error();
|
734 |
-
} else {
|
735 |
-
wp_nonce_ays( '' );
|
736 |
-
}
|
737 |
-
}
|
738 |
-
|
739 |
-
$notice = $_GET['notice'];
|
740 |
-
|
741 |
-
imagify_dismiss_notice( $notice );
|
742 |
-
|
743 |
-
/**
|
744 |
-
* Fires when a notice is dismissed.
|
745 |
-
*
|
746 |
-
* @since 1.4.2
|
747 |
-
*
|
748 |
-
* @param int $notice The notice slug
|
749 |
-
*/
|
750 |
-
do_action( 'imagify_dismiss_notice', $notice );
|
751 |
-
|
752 |
-
if ( ! defined( 'DOING_AJAX' ) ) {
|
753 |
-
wp_safe_redirect( wp_get_referer() );
|
754 |
-
die();
|
755 |
-
}
|
756 |
-
|
757 |
-
wp_send_json_success();
|
758 |
-
}
|
759 |
-
|
760 |
-
add_action( 'admin_post_imagify_deactivate_plugin', '_imagify_deactivate_plugin' );
|
761 |
-
/**
|
762 |
-
* Disable a plugin which can be in conflict with Imagify
|
763 |
-
*
|
764 |
-
* @since 1.2
|
765 |
-
* @author Jonathan Buttigieg
|
766 |
-
*/
|
767 |
-
function _imagify_deactivate_plugin() {
|
768 |
-
if ( ! wp_verify_nonce( $_GET['_wpnonce'], 'imagifydeactivatepluginnonce' ) ) {
|
769 |
-
wp_nonce_ays( '' );
|
770 |
-
}
|
771 |
-
|
772 |
-
deactivate_plugins( $_GET['plugin'] );
|
773 |
-
|
774 |
-
wp_safe_redirect( wp_get_referer() );
|
775 |
-
die();
|
776 |
-
}
|
14 |
* @author Jonathan Buttigieg
|
15 |
*/
|
16 |
function _do_admin_post_imagify_manual_upload() {
|
17 |
+
imagify_check_nonce( 'imagify-manual-upload' );
|
18 |
+
imagify_check_user_capacity( 'upload_files' );
|
|
|
|
|
|
|
19 |
|
20 |
+
if ( empty( $_GET['attachment_id'] ) || empty( $_GET['context'] ) ) {
|
21 |
+
imagify_die( __( 'Invalid request', 'imagify' ) );
|
|
|
|
|
|
|
|
|
22 |
}
|
23 |
|
24 |
$context = esc_html( $_GET['context'] );
|
29 |
// Optimize it!!!!!
|
30 |
$attachment->optimize();
|
31 |
|
32 |
+
imagify_maybe_redirect();
|
|
|
|
|
|
|
33 |
|
34 |
// Return the optimization statistics.
|
35 |
$output = get_imagify_attachment_optimization_text( $attachment, $context );
|
45 |
* @author Jonathan Buttigieg
|
46 |
*/
|
47 |
function _do_admin_post_imagify_manual_override_upload() {
|
48 |
+
imagify_check_nonce( 'imagify-manual-override-upload' );
|
49 |
+
imagify_check_user_capacity( 'upload_files' );
|
|
|
|
|
|
|
50 |
|
51 |
+
if ( empty( $_GET['attachment_id'] ) || empty( $_GET['context'] ) ) {
|
52 |
+
imagify_die( __( 'Invalid request', 'imagify' ) );
|
|
|
|
|
|
|
|
|
53 |
}
|
54 |
|
55 |
$context = esc_html( $_GET['context'] );
|
63 |
// Optimize it!!!!!
|
64 |
$attachment->optimize( (int) $_GET['optimization_level'] );
|
65 |
|
66 |
+
imagify_maybe_redirect();
|
67 |
+
|
68 |
+
// Return the optimization statistics.
|
69 |
+
$output = get_imagify_attachment_optimization_text( $attachment, $context );
|
70 |
+
wp_send_json_success( $output );
|
71 |
+
}
|
72 |
+
|
73 |
+
add_action( 'wp_ajax_imagify_optimize_missing_sizes', '_do_admin_post_imagify_optimize_missing_sizes' );
|
74 |
+
add_action( 'admin_post_imagify_optimize_missing_sizes', '_do_admin_post_imagify_optimize_missing_sizes' );
|
75 |
+
/**
|
76 |
+
* Process one or some thumbnails that are not optimized yet.
|
77 |
+
*
|
78 |
+
* @since 1.6.10
|
79 |
+
* @author Grégory Viguier
|
80 |
+
*/
|
81 |
+
function _do_admin_post_imagify_optimize_missing_sizes() {
|
82 |
+
imagify_check_nonce( 'imagify-optimize-missing-sizes' );
|
83 |
+
imagify_check_user_capacity( 'upload_files' );
|
84 |
+
|
85 |
+
if ( empty( $_GET['attachment_id'] ) || empty( $_GET['context'] ) ) {
|
86 |
+
imagify_die( __( 'Invalid request', 'imagify' ) );
|
87 |
}
|
88 |
|
89 |
+
$context = esc_html( $_GET['context'] );
|
90 |
+
$attachment_id = absint( $_GET['attachment_id'] );
|
91 |
+
$class_name = get_imagify_attachment_class_name( $context, $attachment_id, 'imagify_optimize_missing_sizes' );
|
92 |
+
$attachment = new $class_name( $attachment_id );
|
93 |
+
|
94 |
+
// Optimize the missing thumbnails.
|
95 |
+
$attachment->optimize_missing_thumbnails();
|
96 |
+
|
97 |
+
imagify_maybe_redirect();
|
98 |
+
|
99 |
// Return the optimization statistics.
|
100 |
$output = get_imagify_attachment_optimization_text( $attachment, $context );
|
101 |
wp_send_json_success( $output );
|
110 |
* @author Jonathan Buttigieg
|
111 |
*/
|
112 |
function _do_admin_post_imagify_restore_upload() {
|
113 |
+
imagify_check_nonce( 'imagify-restore-upload' );
|
114 |
+
imagify_check_user_capacity( 'upload_files' );
|
|
|
|
|
|
|
115 |
|
116 |
+
if ( empty( $_GET['attachment_id'] ) || empty( $_GET['context'] ) ) {
|
117 |
+
imagify_die( __( 'Invalid request', 'imagify' ) );
|
|
|
|
|
|
|
|
|
118 |
}
|
119 |
|
120 |
$context = esc_html( $_GET['context'] );
|
125 |
// Restore the backup file.
|
126 |
$attachment->restore();
|
127 |
|
128 |
+
imagify_maybe_redirect();
|
|
|
|
|
|
|
129 |
|
130 |
// Return the optimization button.
|
131 |
$output = get_imagify_admin_url( 'manual-upload', array( 'attachment_id' => $attachment->id, 'context' => $context ) );
|
141 |
* @author Jonathan Buttigieg
|
142 |
*/
|
143 |
function _do_wp_ajax_imagify_bulk_upload() {
|
144 |
+
imagify_check_nonce( 'imagify-bulk-upload', 'imagifybulkuploadnonce' );
|
145 |
+
imagify_check_user_capacity( 'upload_files' );
|
146 |
|
147 |
+
if ( empty( $_POST['image'] ) || empty( $_POST['context'] ) ) {
|
148 |
+
imagify_die( __( 'Invalid request', 'imagify' ) );
|
149 |
}
|
150 |
|
151 |
$context = esc_html( $_POST['context'] );
|
172 |
$data['success'] = false;
|
173 |
$data['error'] = $fullsize_data['error'];
|
174 |
|
175 |
+
imagify_die( $data );
|
176 |
}
|
177 |
|
178 |
$data['success'] = true;
|
195 |
/**
|
196 |
* Optimize image on picture uploading with async request.
|
197 |
*
|
198 |
+
* @since 1.5
|
199 |
* @author Julio Potier
|
200 |
+
* @see _imagify_optimize_attachment()
|
201 |
*/
|
202 |
function _do_admin_post_async_optimize_upload_new_media() {
|
203 |
+
if ( empty( $_POST['_ajax_nonce'] ) || empty( $_POST['attachment_id'] ) || empty( $_POST['metadata'] ) || empty( $_POST['context'] ) ) { // WPCS: CSRF ok.
|
204 |
return;
|
205 |
}
|
206 |
|
207 |
+
imagify_check_nonce( 'new_media-' . $_POST['attachment_id'] );
|
208 |
+
imagify_check_user_capacity( 'upload_files' );
|
209 |
|
210 |
$context = esc_html( $_POST['context'] );
|
211 |
$attachment_id = absint( $_POST['attachment_id'] );
|
225 |
* @author Julio Potier
|
226 |
*/
|
227 |
function _do_admin_post_async_optimize_save_image_editor_file() {
|
228 |
+
$attachment_id = ! empty( $_POST['postid'] ) ? (int) $_POST['postid'] : 0; // WPCS: CSRF ok.
|
229 |
+
|
230 |
+
if ( ! $attachment_id || empty( $_POST['do'] ) ) { // WPCS: CSRF ok.
|
231 |
return;
|
232 |
}
|
233 |
|
234 |
+
imagify_check_nonce( 'image_editor-' . $attachment_id );
|
235 |
+
imagify_check_user_capacity( 'edit_post', $attachment_id );
|
|
|
236 |
|
237 |
if ( ! get_post_meta( $attachment_id, '_imagify_data', true ) ) {
|
238 |
return;
|
279 |
function _do_wp_ajax_imagify_get_unoptimized_attachment_ids() {
|
280 |
global $wpdb;
|
281 |
|
282 |
+
imagify_check_nonce( 'imagify-bulk-upload', 'imagifybulkuploadnonce' );
|
283 |
+
imagify_check_user_capacity( imagify_get_capacity( true ) );
|
|
|
|
|
|
|
284 |
|
285 |
if ( ! imagify_valid_key() ) {
|
286 |
wp_send_json_error( array( 'message' => 'invalid-api-key' ) );
|
453 |
* @author Grégory Viguier
|
454 |
*/
|
455 |
function _do_wp_ajax_imagify_check_backup_dir_is_writable() {
|
456 |
+
imagify_check_nonce( 'imagify_check_backup_dir_is_writable' );
|
457 |
+
imagify_check_user_capacity();
|
|
|
|
|
|
|
458 |
|
459 |
wp_send_json_success( array(
|
460 |
'is_writable' => (int) imagify_backup_dir_is_writable(),
|
473 |
* @author Jonathan Buttigieg
|
474 |
*/
|
475 |
function _do_wp_ajax_imagify_signup() {
|
476 |
+
imagify_check_nonce( 'imagify-signup', 'imagifysignupnonce' );
|
477 |
+
imagify_check_user_capacity();
|
478 |
|
479 |
+
if ( empty( $_GET['email'] ) ) {
|
480 |
+
imagify_die( __( 'Empty email address.', 'imagify' ) );
|
481 |
+
}
|
482 |
+
|
483 |
+
if ( ! is_email( $_GET['email'] ) ) {
|
484 |
+
imagify_die( __( 'Not a valid email address.', 'imagify' ) );
|
485 |
}
|
486 |
|
487 |
$data = array(
|
493 |
$response = add_imagify_user( $data );
|
494 |
|
495 |
if ( is_wp_error( $response ) ) {
|
496 |
+
imagify_die( $response );
|
497 |
}
|
498 |
|
499 |
wp_send_json_success();
|
507 |
* @author Jonathan Buttigieg
|
508 |
*/
|
509 |
function _do_wp_ajax_imagify_check_api_key_validity() {
|
510 |
+
imagify_check_nonce( 'imagify-check-api-key', 'imagifycheckapikeynonce' );
|
511 |
+
imagify_check_user_capacity();
|
512 |
|
513 |
+
if ( empty( $_GET['api_key'] ) ) {
|
514 |
+
imagify_die( __( 'Empty API key.', 'imagify' ) );
|
515 |
}
|
516 |
|
517 |
$response = get_imagify_status( $_GET['api_key'] );
|
518 |
|
519 |
if ( is_wp_error( $response ) ) {
|
520 |
+
imagify_die( $response );
|
521 |
}
|
522 |
|
523 |
$options = get_site_option( IMAGIFY_SETTINGS_SLUG );
|
536 |
* @author Jonathan Buttigieg
|
537 |
*/
|
538 |
function _do_wp_ajax_imagify_get_admin_bar_profile() {
|
539 |
+
imagify_check_nonce( 'imagify-get-admin-bar-profile', 'imagifygetadminbarprofilenonce' );
|
540 |
+
imagify_check_user_capacity();
|
541 |
|
542 |
$user = new Imagify_User();
|
543 |
$unconsumed_quota = $user->get_percent_unconsumed_quota();
|
559 |
$message .= '<p><i class="dashicons dashicons-warning" aria-hidden="true"></i><strong>' . __( 'Oops, It\'s almost over!', 'imagify' ) . '</strong></p>';
|
560 |
/* translators: %s is a line break. */
|
561 |
$message .= '<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>';
|
562 |
+
$message .= '<p class="center txt-center text-center"><a class="btn imagify-btn-ghost" href="' . IMAGIFY_APP_MAIN . '/#/subscription" target="_blank">' . __( 'View My Subscription', 'imagify' ) . '</a></p>';
|
563 |
$message .= '</div>';
|
564 |
}
|
565 |
|
572 |
size_format( $user->quota * 1048576 ),
|
573 |
date_i18n( get_option( 'date_format' ), strtotime( $user->next_date_update ) )
|
574 |
) . '</p>';
|
575 |
+
$message .= '<p class="center txt-center text-center"><a class="btn imagify-btn-ghost" href="' . IMAGIFY_APP_MAIN . '/#/subscription" target="_blank">' . __( 'Upgrade My Subscription', 'imagify' ) . '</a></p>';
|
576 |
$message .= '</div>';
|
577 |
}
|
578 |
|
622 |
* @author Geoffrey Crofte
|
623 |
*/
|
624 |
function _imagify_get_prices_from_api() {
|
625 |
+
imagify_check_nonce( 'imagify_get_pricing_' . get_current_user_id(), 'imagifynonce' );
|
626 |
+
imagify_check_user_capacity();
|
|
|
627 |
|
628 |
$prices_all = get_imagify_all_prices();
|
629 |
|
630 |
if ( is_wp_error( $prices_all ) ) {
|
631 |
+
imagify_die( $prices_all );
|
632 |
}
|
633 |
|
634 |
if ( ! is_object( $prices_all ) ) {
|
635 |
+
imagify_die( __( 'Wrongly formatted response from our server.', 'imagify' ) );
|
636 |
}
|
637 |
|
638 |
wp_send_json_success( array(
|
649 |
* @author Geoffrey Crofte
|
650 |
*/
|
651 |
function _imagify_check_coupon_code() {
|
652 |
+
imagify_check_nonce( 'imagify_get_pricing_' . get_current_user_id(), 'imagifynonce' );
|
653 |
+
imagify_check_user_capacity();
|
654 |
+
|
655 |
+
if ( empty( $_POST['coupon'] ) ) {
|
656 |
+
wp_send_json_success( array(
|
657 |
+
'success' => false,
|
658 |
+
'detail' => __( 'Coupon is empty.', 'imagify' ),
|
659 |
+
) );
|
660 |
}
|
661 |
|
662 |
+
$coupon = check_imagify_coupon_code( $_POST['coupon'] );
|
663 |
+
|
664 |
+
if ( is_wp_error( $coupon ) ) {
|
665 |
+
imagify_die( $coupon );
|
666 |
+
}
|
667 |
+
|
668 |
+
wp_send_json_success( imagify_translate_api_message( $coupon ) );
|
669 |
}
|
670 |
|
671 |
add_action( 'wp_ajax_imagify_get_discount', '_imagify_get_discount' );
|
676 |
* @author Geoffrey Crofte
|
677 |
*/
|
678 |
function _imagify_get_discount() {
|
679 |
+
imagify_check_nonce( 'imagify_get_pricing_' . get_current_user_id(), 'imagifynonce' );
|
680 |
+
imagify_check_user_capacity();
|
|
|
681 |
|
682 |
+
wp_send_json_success( imagify_translate_api_message( check_imagify_discount() ) );
|
683 |
}
|
684 |
|
685 |
add_action( 'wp_ajax_imagify_get_images_counts', '_imagify_get_estimated_sizes' );
|
690 |
* @author Geoffrey Crofte
|
691 |
*/
|
692 |
function _imagify_get_estimated_sizes() {
|
693 |
+
imagify_check_nonce( 'imagify_get_pricing_' . get_current_user_id(), 'imagifynonce' );
|
694 |
+
imagify_check_user_capacity();
|
|
|
695 |
|
696 |
$raw_total_size_in_library = imagify_calculate_total_size_images_library();
|
697 |
$raw_average_per_month = imagify_calculate_average_size_images_per_month();
|
712 |
* @author Remy Perona
|
713 |
*/
|
714 |
function _imagify_update_estimate_sizes() {
|
715 |
+
imagify_check_nonce( 'update_estimate_sizes' );
|
716 |
+
imagify_check_user_capacity();
|
717 |
|
718 |
$raw_total_size_in_library = imagify_calculate_total_size_images_library();
|
719 |
$raw_average_per_month = imagify_calculate_average_size_images_per_month();
|
723 |
|
724 |
die( 1 );
|
725 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
inc/admin/enqueue.php
DELETED
@@ -1,244 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
defined( 'ABSPATH' ) || die( 'Cheatin\' uh?' );
|
3 |
-
|
4 |
-
add_action( 'admin_print_styles', '_imagify_admin_print_styles' );
|
5 |
-
/**
|
6 |
-
* Add some CSS on the whole administration
|
7 |
-
*
|
8 |
-
* @since 1.0
|
9 |
-
*/
|
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 |
-
/**
|
17 |
-
* 3rd Party Styles.
|
18 |
-
*/
|
19 |
-
wp_register_style(
|
20 |
-
'imagify-css-sweetalert',
|
21 |
-
IMAGIFY_ASSETS_CSS_URL . 'sweetalert2' . $css_ext,
|
22 |
-
array(),
|
23 |
-
'4.6.6'
|
24 |
-
);
|
25 |
-
|
26 |
-
/**
|
27 |
-
* Imagify Styles.
|
28 |
-
*/
|
29 |
-
wp_register_style(
|
30 |
-
'imagify-css-twentytwenty',
|
31 |
-
IMAGIFY_ASSETS_CSS_URL . 'twentytwenty' . $css_ext,
|
32 |
-
array(),
|
33 |
-
IMAGIFY_VERSION
|
34 |
-
);
|
35 |
-
|
36 |
-
wp_register_style(
|
37 |
-
'imagify-css-admin',
|
38 |
-
IMAGIFY_ASSETS_CSS_URL . 'admin' . $css_ext,
|
39 |
-
array(),
|
40 |
-
IMAGIFY_VERSION
|
41 |
-
);
|
42 |
-
|
43 |
-
/**
|
44 |
-
* 3rd Party Scripts.
|
45 |
-
*/
|
46 |
-
wp_register_script(
|
47 |
-
'imagify-js-promise-polyfill',
|
48 |
-
IMAGIFY_ASSETS_JS_URL . 'es6-promise.auto' . $js_ext,
|
49 |
-
array(),
|
50 |
-
'4.1.1',
|
51 |
-
true
|
52 |
-
);
|
53 |
-
|
54 |
-
wp_register_script(
|
55 |
-
'imagify-js-sweetalert',
|
56 |
-
IMAGIFY_ASSETS_JS_URL . 'sweetalert2' . $js_ext,
|
57 |
-
array( 'jquery', 'imagify-js-promise-polyfill' ),
|
58 |
-
'4.6.6',
|
59 |
-
true
|
60 |
-
);
|
61 |
-
|
62 |
-
wp_register_script(
|
63 |
-
'imagify-js-chart',
|
64 |
-
IMAGIFY_ASSETS_JS_URL . 'chart' . $js_ext,
|
65 |
-
array(),
|
66 |
-
'1.0.2',
|
67 |
-
true
|
68 |
-
);
|
69 |
-
|
70 |
-
wp_register_script(
|
71 |
-
'imagify-js-event-move',
|
72 |
-
IMAGIFY_ASSETS_JS_URL . 'jquery.event.move' . $js_ext,
|
73 |
-
array( 'jquery' ),
|
74 |
-
'2.0.1',
|
75 |
-
true
|
76 |
-
);
|
77 |
-
|
78 |
-
/**
|
79 |
-
* Imagify Scripts.
|
80 |
-
*/
|
81 |
-
wp_register_script(
|
82 |
-
'imagify-js-async',
|
83 |
-
IMAGIFY_ASSETS_JS_URL . 'imagify-gulp' . $js_ext,
|
84 |
-
array(),
|
85 |
-
'2017-07-28',
|
86 |
-
true
|
87 |
-
);
|
88 |
-
|
89 |
-
wp_register_script(
|
90 |
-
'imagify-js-bulk',
|
91 |
-
IMAGIFY_ASSETS_JS_URL . 'bulk' . $js_ext,
|
92 |
-
array( 'jquery', 'imagify-js-chart', 'imagify-js-sweetalert', 'imagify-js-async' ),
|
93 |
-
IMAGIFY_VERSION,
|
94 |
-
true
|
95 |
-
);
|
96 |
-
|
97 |
-
wp_register_script(
|
98 |
-
'imagify-js-admin',
|
99 |
-
IMAGIFY_ASSETS_JS_URL . 'admin' . $js_ext,
|
100 |
-
array( 'jquery', 'imagify-js-sweetalert' ),
|
101 |
-
IMAGIFY_VERSION,
|
102 |
-
true
|
103 |
-
);
|
104 |
-
|
105 |
-
wp_register_script(
|
106 |
-
'imagify-js-options',
|
107 |
-
IMAGIFY_ASSETS_JS_URL . 'options' . $js_ext,
|
108 |
-
array( 'jquery', 'imagify-js-sweetalert' ),
|
109 |
-
IMAGIFY_VERSION,
|
110 |
-
true
|
111 |
-
);
|
112 |
-
|
113 |
-
wp_register_script(
|
114 |
-
'imagify-js-upload',
|
115 |
-
IMAGIFY_ASSETS_JS_URL . 'upload' . $js_ext,
|
116 |
-
array( 'jquery', 'imagify-js-chart' ),
|
117 |
-
IMAGIFY_VERSION,
|
118 |
-
true
|
119 |
-
);
|
120 |
-
|
121 |
-
wp_register_script(
|
122 |
-
'imagify-js-twentytwenty',
|
123 |
-
IMAGIFY_ASSETS_JS_URL . 'jquery.twentytwenty' . $js_ext,
|
124 |
-
array( 'jquery', 'imagify-js-event-move', 'imagify-js-chart' ),
|
125 |
-
IMAGIFY_VERSION,
|
126 |
-
true
|
127 |
-
);
|
128 |
-
|
129 |
-
/*
|
130 |
-
* Loaded in the whole admnistration.
|
131 |
-
*/
|
132 |
-
wp_enqueue_style( 'imagify-css-admin' );
|
133 |
-
wp_enqueue_style( 'imagify-css-sweetalert' );
|
134 |
-
|
135 |
-
wp_enqueue_script( 'imagify-js-admin' );
|
136 |
-
wp_localize_script( 'imagify-js-admin', 'imagifyAdmin', get_imagify_localize_script_translations( 'admin' ) );
|
137 |
-
|
138 |
-
/*
|
139 |
-
* Loaded in /wp-admin/options-general.php?page=imagify.
|
140 |
-
*/
|
141 |
-
if ( isset( $current_screen ) && ( 'settings_page_imagify' === $current_screen->base || 'settings_page_imagify-network' === $current_screen->base ) ) {
|
142 |
-
wp_enqueue_style( 'imagify-css-twentytwenty' );
|
143 |
-
|
144 |
-
wp_enqueue_script( 'imagify-js-twentytwenty' );
|
145 |
-
wp_enqueue_script( 'imagify-js-options' );
|
146 |
-
wp_localize_script( 'imagify-js-options', 'imagifyOptions', get_imagify_localize_script_translations( 'options' ) );
|
147 |
-
}
|
148 |
-
|
149 |
-
/**
|
150 |
-
* Loaded in /wp-admin/upload.php and post.php.
|
151 |
-
*/
|
152 |
-
if ( isset( $current_screen ) && ( 'upload' === $current_screen->base || 'post' === $current_screen->base ) ) {
|
153 |
-
wp_enqueue_script( 'imagify-js-upload' );
|
154 |
-
|
155 |
-
$upload_data = get_imagify_localize_script_translations( 'upload' );
|
156 |
-
|
157 |
-
if ( 'upload' === $current_screen->base && get_imagify_option( 'backup' ) ) {
|
158 |
-
$upload_data['backup_option'] = 1;
|
159 |
-
}
|
160 |
-
|
161 |
-
wp_localize_script( 'imagify-js-upload', 'imagifyUpload', $upload_data );
|
162 |
-
}
|
163 |
-
|
164 |
-
/**
|
165 |
-
* Loaded in:
|
166 |
-
* /wp-admin/post.php (for attachment post type),
|
167 |
-
* /wp-admin/upload.php (for attachments list).
|
168 |
-
*/
|
169 |
-
if ( isset( $current_screen ) && ( ('post' === $current_screen->base && 'attachment' === $current_screen->post_type ) || 'upload' === $current_screen->base ) ) {
|
170 |
-
wp_enqueue_style( 'imagify-css-twentytwenty' );
|
171 |
-
|
172 |
-
wp_enqueue_script( 'imagify-js-twentytwenty' );
|
173 |
-
wp_localize_script( 'imagify-js-twentytwenty', 'imagifyTTT', get_imagify_localize_script_translations( 'twentytwenty' ) );
|
174 |
-
}
|
175 |
-
|
176 |
-
/**
|
177 |
-
* Loaded in /wp-admin/upload.php?page=imagify-bulk-optimization.
|
178 |
-
*/
|
179 |
-
if ( isset( $current_screen ) && 'media_page_imagify-bulk-optimization' === $current_screen->base ) {
|
180 |
-
wp_enqueue_script( 'heartbeat' );
|
181 |
-
wp_enqueue_script( 'imagify-js-bulk' );
|
182 |
-
|
183 |
-
$bulk_data = get_imagify_localize_script_translations( 'bulk' );
|
184 |
-
$bulk_data['heartbeat_id'] = 'update_bulk_data';
|
185 |
-
$bulk_data['ajax_action'] = 'imagify_get_unoptimized_attachment_ids';
|
186 |
-
$bulk_data['ajax_context'] = 'wp';
|
187 |
-
$bulk_data['buffer_size'] = get_imagify_bulk_buffer_size();
|
188 |
-
|
189 |
-
/**
|
190 |
-
* Filter the number of parallel queries during the Bulk Optimization
|
191 |
-
*
|
192 |
-
* @since 1.5.4
|
193 |
-
*
|
194 |
-
* @param int $buffer_size Number of parallel queries.
|
195 |
-
*/
|
196 |
-
$bulk_data['buffer_size'] = apply_filters( 'imagify_bulk_buffer_size', $bulk_data['buffer_size'] );
|
197 |
-
|
198 |
-
wp_localize_script( 'imagify-js-bulk', 'imagifyBulk', $bulk_data );
|
199 |
-
}
|
200 |
-
}
|
201 |
-
|
202 |
-
add_action( 'admin_footer-media_page_imagify-bulk-optimization', '_imagify_admin_print_intercom' );
|
203 |
-
add_action( 'admin_footer-settings_page_imagify', '_imagify_admin_print_intercom' );
|
204 |
-
/**
|
205 |
-
* Add Intercom on Options page an Bulk Optimization
|
206 |
-
*
|
207 |
-
* @since 1.0
|
208 |
-
*/
|
209 |
-
function _imagify_admin_print_intercom() {
|
210 |
-
if ( ! imagify_valid_key() ) {
|
211 |
-
return;
|
212 |
-
}
|
213 |
-
|
214 |
-
$user = get_imagify_user();
|
215 |
-
|
216 |
-
if ( empty( $user->is_intercom ) || false === $user->display_support ) {
|
217 |
-
return;
|
218 |
-
}
|
219 |
-
?>
|
220 |
-
<script>
|
221 |
-
window.intercomSettings = {
|
222 |
-
app_id: 'cd6nxj3z',
|
223 |
-
user_id: <?php echo (int) $user->id; ?>,
|
224 |
-
};
|
225 |
-
</script>
|
226 |
-
<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>
|
227 |
-
<?php
|
228 |
-
}
|
229 |
-
|
230 |
-
add_action( 'wp_print_scripts', '_imagify_dequeue_yoastseo_script' );
|
231 |
-
/**
|
232 |
-
* Remove Yoast SEO bugged script
|
233 |
-
*
|
234 |
-
* @since 1.4.1
|
235 |
-
*/
|
236 |
-
function _imagify_dequeue_yoastseo_script() {
|
237 |
-
global $pagenow;
|
238 |
-
$current_screen = get_current_screen();
|
239 |
-
|
240 |
-
if ( isset( $current_screen ) && 'post' === $current_screen->base && 'attachment' === $current_screen->post_type ) {
|
241 |
-
wp_dequeue_script( 'yoast-seo' );
|
242 |
-
wp_deregister_script( 'yoast-seo' );
|
243 |
-
}
|
244 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
inc/admin/heartbeat.php
CHANGED
@@ -38,7 +38,7 @@ function _imagify_heartbeat_received( $response, $data ) {
|
|
38 |
|
39 |
|
40 |
if ( 'upload.php' === $pagenow && isset( $_GET['page'] ) && 'imagify-bulk-optimization' === $_GET['page'] ) { // WPCS: CSRF ok.
|
41 |
-
add_filter( 'heartbeat_settings', '_imagify_heartbeat_settings',
|
42 |
}
|
43 |
/**
|
44 |
* Update the Heartbeat API settings.
|
38 |
|
39 |
|
40 |
if ( 'upload.php' === $pagenow && isset( $_GET['page'] ) && 'imagify-bulk-optimization' === $_GET['page'] ) { // WPCS: CSRF ok.
|
41 |
+
add_filter( 'heartbeat_settings', '_imagify_heartbeat_settings', IMAGIFY_INT_MAX );
|
42 |
}
|
43 |
/**
|
44 |
* Update the Heartbeat API settings.
|
inc/admin/media.php
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?php
|
2 |
defined( 'ABSPATH' ) || die( 'Cheatin\' uh?' );
|
3 |
|
4 |
-
add_filter( 'attachment_fields_to_edit', '_imagify_attachment_fields_to_edit',
|
5 |
/**
|
6 |
* Add "Imagify" column in the Media Uploader
|
7 |
*
|
@@ -33,7 +33,7 @@ function _imagify_attachment_fields_to_edit( $form_fields, $post ) {
|
|
33 |
return $form_fields;
|
34 |
}
|
35 |
|
36 |
-
add_filter( 'media_row_actions', '_imagify_add_actions_to_media_list_row',
|
37 |
/**
|
38 |
* Add "Compare Original VS Optimized" link to the media row action
|
39 |
*
|
1 |
<?php
|
2 |
defined( 'ABSPATH' ) || die( 'Cheatin\' uh?' );
|
3 |
|
4 |
+
add_filter( 'attachment_fields_to_edit', '_imagify_attachment_fields_to_edit', IMAGIFY_INT_MAX, 2 );
|
5 |
/**
|
6 |
* Add "Imagify" column in the Media Uploader
|
7 |
*
|
33 |
return $form_fields;
|
34 |
}
|
35 |
|
36 |
+
add_filter( 'media_row_actions', '_imagify_add_actions_to_media_list_row', IMAGIFY_INT_MAX, 2 );
|
37 |
/**
|
38 |
* Add "Compare Original VS Optimized" link to the media row action
|
39 |
*
|
inc/admin/meta-boxes.php
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?php
|
2 |
defined( 'ABSPATH' ) || die( 'Cheatin\' uh?' );
|
3 |
|
4 |
-
add_action( 'attachment_submitbox_misc_actions', '_imagify_attachment_submitbox_misc_actions',
|
5 |
/**
|
6 |
* Add a "Optimize It" button or the Imagify optimization data in the attachment submit area.
|
7 |
*
|
1 |
<?php
|
2 |
defined( 'ABSPATH' ) || die( 'Cheatin\' uh?' );
|
3 |
|
4 |
+
add_action( 'attachment_submitbox_misc_actions', '_imagify_attachment_submitbox_misc_actions', IMAGIFY_INT_MAX );
|
5 |
/**
|
6 |
* Add a "Optimize It" button or the Imagify optimization data in the attachment submit area.
|
7 |
*
|
inc/admin/options.php
CHANGED
@@ -143,10 +143,10 @@ function _imagify_after_save_options( $old_value, $value ) {
|
|
143 |
}
|
144 |
|
145 |
if ( is_wp_error( get_imagify_user() ) ) {
|
146 |
-
|
147 |
delete_site_transient( 'imagify_check_licence_1' );
|
148 |
} else {
|
149 |
-
|
150 |
}
|
151 |
}
|
152 |
|
143 |
}
|
144 |
|
145 |
if ( is_wp_error( get_imagify_user() ) ) {
|
146 |
+
Imagify_Notices::renew_notice( 'wrong-api-key' );
|
147 |
delete_site_transient( 'imagify_check_licence_1' );
|
148 |
} else {
|
149 |
+
Imagify_Notices::dismiss_notice( 'wrong-api-key' );
|
150 |
}
|
151 |
}
|
152 |
|
inc/admin/ui/notice-backup-folder-not-writable.php
ADDED
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
defined( 'ABSPATH' ) || die( 'Cheatin\' uh?' );
|
3 |
+
|
4 |
+
$this->render_view( 'header' );
|
5 |
+
|
6 |
+
$filesystem = imagify_get_filesystem();
|
7 |
+
$backup_path = imagify_make_file_path_relative( get_imagify_backup_dir_path( true ) );
|
8 |
+
|
9 |
+
if ( $filesystem->exists( get_imagify_backup_dir_path() ) ) {
|
10 |
+
/* translators: %s is a file path. */
|
11 |
+
$message = __( 'The backup folder %s is not writable by the server, original images cannot be saved!', 'imagify' );
|
12 |
+
} else {
|
13 |
+
/* translators: %s is a file path. */
|
14 |
+
$message = __( 'The backup folder %s cannot be created. Is its parent directory writable by the server? Original images cannot be saved!', 'imagify' );
|
15 |
+
}
|
16 |
+
|
17 |
+
echo '<p>' . sprintf( $message, "<code>$backup_path</code>" ) . '</p>';
|
18 |
+
|
19 |
+
$this->render_view( 'footer' );
|
inc/admin/ui/notice-footer.php
ADDED
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
defined( 'ABSPATH' ) || die( 'Cheatin\' uh?' );
|
3 |
+
?>
|
4 |
+
</div>
|
5 |
+
<?php if ( ! empty( $data['dismissible'] ) ) : ?>
|
6 |
+
<a href="<?php echo esc_url( get_imagify_admin_url( 'dismiss-notice', $data['dismissible'] ) ); ?>" 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>
|
7 |
+
<?php endif; ?>
|
8 |
+
</div>
|
inc/admin/ui/notice-free-over-quota.php
ADDED
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
defined( 'ABSPATH' ) || die( 'Cheatin\' uh?' );
|
3 |
+
|
4 |
+
$this->render_view( 'header', array(
|
5 |
+
'title' => __( 'Oops, It\'s Over!', 'imagify' ),
|
6 |
+
) );
|
7 |
+
?>
|
8 |
+
<p>
|
9 |
+
<?php
|
10 |
+
printf(
|
11 |
+
/* translators: 1 is a "bold" tag start, 2 is a formatted data quota, 3 is a date, 4 is the "bold" tag end. */
|
12 |
+
__( 'You have consumed all your credit for this month. You will have %1$s%2$s back on %3$s%4$s.', 'imagify' ),
|
13 |
+
'<strong>',
|
14 |
+
size_format( $data->quota * 1048576 ),
|
15 |
+
date_i18n( get_option( 'date_format' ), strtotime( $data->next_date_update ) ),
|
16 |
+
'</strong>'
|
17 |
+
);
|
18 |
+
echo '<br/><br/>';
|
19 |
+
printf(
|
20 |
+
/* translators: 1 is a link tag start, 2 is the link tag end. */
|
21 |
+
__( 'To continue to optimize your images, log in to your Imagify account to %1$sbuy a pack or subscribe to a plan%2$s.', 'imagify' ),
|
22 |
+
'<a target="_blank" href="' . IMAGIFY_APP_MAIN . '/#/subscription">',
|
23 |
+
'</a>'
|
24 |
+
);
|
25 |
+
?>
|
26 |
+
</p>
|
27 |
+
<?php
|
28 |
+
$this->render_view( 'footer', array(
|
29 |
+
'dismissible' => 'free-over-quota',
|
30 |
+
) );
|
inc/admin/ui/notice-grid-view.php
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
defined( 'ABSPATH' ) || die( 'Cheatin\' uh?' );
|
3 |
+
|
4 |
+
$this->render_view( 'header', array(
|
5 |
+
'title' => __( 'You\'re missing out!', 'imagify' ),
|
6 |
+
) );
|
7 |
+
?>
|
8 |
+
<p><?php _e( 'Use the List view to optimize images with Imagify.', 'imagify' ); ?></p>
|
9 |
+
<p><a href="<?php echo esc_url( admin_url( 'upload.php?mode=list' ) ); ?>"><?php _e( 'Switch to the List View', 'imagify' ); ?></a></p>
|
10 |
+
<?php
|
11 |
+
$this->render_view( 'footer', array(
|
12 |
+
'dismissible' => 'grid-view',
|
13 |
+
) );
|
inc/admin/ui/notice-header.php
ADDED
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
defined( 'ABSPATH' ) || die( 'Cheatin\' uh?' );
|
3 |
+
?>
|
4 |
+
<div class="clear"></div>
|
5 |
+
<div class="error imagify-notice below-h2">
|
6 |
+
<div class="imagify-notice-logo">
|
7 |
+
<img class="imagify-logo" src="<?php echo IMAGIFY_ASSETS_IMG_URL; ?>imagify-logo.png" width="138" height="16" alt="Imagify" />
|
8 |
+
</div>
|
9 |
+
<div class="imagify-notice-content">
|
10 |
+
<?php if ( ! empty( $data['title'] ) ) : ?>
|
11 |
+
<p class="imagify-notice-title"><strong><?php echo $data['title']; ?></strong></p>
|
12 |
+
<?php endif; ?>
|
inc/admin/ui/notice-http-block-external.php
ADDED
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
defined( 'ABSPATH' ) || die( 'Cheatin\' uh?' );
|
3 |
+
|
4 |
+
$this->render_view( 'header', array(
|
5 |
+
'title' => __( 'The external HTTP requests are blocked!', 'imagify' ),
|
6 |
+
) );
|
7 |
+
?>
|
8 |
+
<p>
|
9 |
+
<?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' ); ?>
|
10 |
+
</p>
|
11 |
+
<p>
|
12 |
+
<?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/>
|
13 |
+
<?php _e( 'Click on the field and press Ctrl-A to select all.', 'imagify' ); ?>
|
14 |
+
</p>
|
15 |
+
<p>
|
16 |
+
<textarea readonly="readonly" class="large-text readonly" rows="1">define( 'WP_ACCESSIBLE_HOSTS', '*.imagify.io' );</textarea>
|
17 |
+
</p>
|
18 |
+
<?php
|
19 |
+
$this->render_view( 'footer', array(
|
20 |
+
'dismissible' => 'http-block-external',
|
21 |
+
) );
|
inc/admin/ui/notice-plugins-to-deactivate.php
ADDED
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
defined( 'ABSPATH' ) || die( 'Cheatin\' uh?' );
|
3 |
+
|
4 |
+
$this->render_view( 'header' );
|
5 |
+
?>
|
6 |
+
<p><?php echo _n( 'The following plugin is not compatible with this plugin and may cause unexpected results:', 'The following plugins are not compatible with this plugin and may cause unexpected results:', count( $data ), 'imagify' ); ?></p>
|
7 |
+
|
8 |
+
<ul class="imagify-plugins-error">
|
9 |
+
<?php
|
10 |
+
foreach ( $data as $plugin ) {
|
11 |
+
$plugin_data = get_plugin_data( WP_PLUGIN_DIR . DIRECTORY_SEPARATOR . $plugin );
|
12 |
+
$deactivate_url = esc_url( wp_nonce_url( admin_url( 'admin-post.php?action=imagify_deactivate_plugin&plugin=' . rawurlencode( $plugin ) ), self::DEACTIVATE_PLUGIN_NONCE_ACTION ) );
|
13 |
+
echo '<li>' . $plugin_data['Name'] . '</span> <a href="' . $deactivate_url . '" class="button button-mini alignright">' . __( 'Deactivate', 'imagify' ) . '</a></li>';
|
14 |
+
}
|
15 |
+
?>
|
16 |
+
</ul>
|
17 |
+
<?php
|
18 |
+
$this->render_view( 'footer' );
|
inc/admin/ui/notice-rating.php
ADDED
@@ -0,0 +1,36 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
defined( 'ABSPATH' ) || die( 'Cheatin\' uh?' );
|
3 |
+
|
4 |
+
$this->render_view( 'header' );
|
5 |
+
?>
|
6 |
+
<p>
|
7 |
+
<?php
|
8 |
+
printf(
|
9 |
+
/* translators: 1 is a "bold" tag start, 2 is the "bold" tag end, 3 is a formatted number (don't use %3$d). */
|
10 |
+
__( '%1$sCongratulations%2$s, you have optimized %1$s%3$s images%2$s and improved your website\'s speed by reducing your images size.', 'imagify' ),
|
11 |
+
'<strong>',
|
12 |
+
'</strong>',
|
13 |
+
number_format_i18n( $data )
|
14 |
+
);
|
15 |
+
?>
|
16 |
+
</p>
|
17 |
+
<p class="imagify-rate-us">
|
18 |
+
<?php
|
19 |
+
$imagify_rate_url = 'https://wordpress.org/support/view/plugin-reviews/imagify?rate=5#postform';
|
20 |
+
|
21 |
+
printf(
|
22 |
+
/* translators: 1 is a "bold" tag start, 2 is the "bold" tag end + a line break tag, 3 is a link tag start, 4 is the link tag end. */
|
23 |
+
__( '%1$sDo you like this plugin?%2$s Please take a few seconds to %3$srate it on WordPress.org%4$s!', 'imagify' ),
|
24 |
+
'<strong>',
|
25 |
+
'</strong><br />',
|
26 |
+
'<a target="_blank" href="' . $imagify_rate_url . '">',
|
27 |
+
'</a>'
|
28 |
+
);
|
29 |
+
?>
|
30 |
+
<br>
|
31 |
+
<a class="stars" target="_blank" href="<?php echo $imagify_rate_url; ?>">☆☆☆☆☆</a>
|
32 |
+
</p>
|
33 |
+
<?php
|
34 |
+
$this->render_view( 'footer', array(
|
35 |
+
'dismissible' => 'rating',
|
36 |
+
) );
|
inc/admin/ui/notice-welcome-steps.php
ADDED
@@ -0,0 +1,55 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
defined( 'ABSPATH' ) || die( 'Cheatin\' uh?' );
|
3 |
+
?>
|
4 |
+
<div class="imagify-welcome">
|
5 |
+
<div class="imagify-title">
|
6 |
+
<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>
|
7 |
+
<span class="baseline">
|
8 |
+
<?php _e( 'Welcome to Imagify, the best way to easily optimize your images!', 'imagify' ); ?>
|
9 |
+
</span>
|
10 |
+
<a href="<?php echo esc_url( get_imagify_admin_url( 'dismiss-notice', 'welcome-steps' ) ); ?>" class="imagify-notice-dismiss imagify-welcome-remove" title="<?php esc_attr_e( 'Dismiss this notice', 'imagify' ); ?>"><span class="dashicons dashicons-dismiss"></span><span class="screen-reader-text"><?php _e( 'Dismiss this notice', 'imagify' ); ?></span></a>
|
11 |
+
</div>
|
12 |
+
<div class="imagify-settings-section">
|
13 |
+
<div class="imagify-columns counter">
|
14 |
+
<div class="col-1-3">
|
15 |
+
<img src="<?php echo IMAGIFY_ASSETS_IMG_URL; ?>user.svg" width="48" height="48" alt="">
|
16 |
+
<div class="imagify-col-content">
|
17 |
+
<p class="imagify-col-title"><?php _e( 'Create an Account', 'imagify' ); ?></p>
|
18 |
+
<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>
|
19 |
+
<p>
|
20 |
+
<?php wp_nonce_field( 'imagify-signup', 'imagifysignupnonce', false ); ?>
|
21 |
+
<a id="imagify-signup" target="_blank" href="<?php echo IMAGIFY_APP_MAIN; ?>/#/register" class="button button-primary"><?php _e( 'Sign up, It\'s FREE!', 'imagify' ); ?></a>
|
22 |
+
</p>
|
23 |
+
</div>
|
24 |
+
</div>
|
25 |
+
<div class="col-1-3">
|
26 |
+
<img src="<?php echo IMAGIFY_ASSETS_IMG_URL; ?>key.svg" width="48" height="48" alt="">
|
27 |
+
<div class="imagify-col-content">
|
28 |
+
<p class="imagify-col-title"><?php _e( 'Enter your API Key', 'imagify' ); ?></p>
|
29 |
+
<p class="imagify-col-desc">
|
30 |
+
<?php
|
31 |
+
printf(
|
32 |
+
/* translators: 1 is a link tag start, 2 is the link tag end. */
|
33 |
+
__( 'Save your API Key you have received by email or you can get it on your %1$sImagify account page%2$s.', 'imagify' ),
|
34 |
+
'<a target="_blank" href="' . IMAGIFY_APP_MAIN . '/#/api">',
|
35 |
+
'</a>'
|
36 |
+
);
|
37 |
+
?>
|
38 |
+
</p>
|
39 |
+
<p>
|
40 |
+
<?php wp_nonce_field( 'imagify-check-api-key', 'imagifycheckapikeynonce', false ); ?>
|
41 |
+
<a id="imagify-save-api-key" href="<?php echo esc_url( get_imagify_admin_url() ); ?>" class="button button-primary"><?php _e( 'I have my API key', 'imagify' ); ?></a>
|
42 |
+
</p>
|
43 |
+
</div>
|
44 |
+
</div>
|
45 |
+
<div class="col-1-3">
|
46 |
+
<img src="<?php echo IMAGIFY_ASSETS_IMG_URL; ?>gear.svg" width="48" height="48" alt="">
|
47 |
+
<div class="imagify-col-content">
|
48 |
+
<p class="imagify-col-title"><?php _e( 'Configure it', 'imagify' ); ?></p>
|
49 |
+
<p class="imagify-col-desc"><?php _e( 'It’s almost done! You have just to configure your optimization settings.', 'imagify' ); ?></p>
|
50 |
+
<p><a href="<?php echo esc_url( get_imagify_admin_url() ); ?>" class="button button-primary"><?php _e( 'Go to Settings', 'imagify' ); ?></a></p>
|
51 |
+
</div>
|
52 |
+
</div>
|
53 |
+
</div>
|
54 |
+
</div>
|
55 |
+
</div>
|
inc/admin/ui/notice-wp-rocket.php
ADDED
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
defined( 'ABSPATH' ) || die( 'Cheatin\' uh?' );
|
3 |
+
|
4 |
+
$dismiss_url = get_imagify_admin_url( 'dismiss-notice', 'wp-rocket' );
|
5 |
+
$coupon_code = 'IMAGIFY20';
|
6 |
+
$wprocket_url = imagify_get_wp_rocket_url();
|
7 |
+
?>
|
8 |
+
<div class="updated imagify-rkt-notice">
|
9 |
+
<a href="<?php echo esc_url( $dismiss_url ); ?>" class="imagify-notice-dismiss imagify-cross"><span class="dashicons dashicons-no"></span></a>
|
10 |
+
|
11 |
+
<p class="imagify-rkt-logo">
|
12 |
+
<img src="<?php echo IMAGIFY_ASSETS_IMG_URL; ?>logo-wprocket.png" srcset="<?php echo IMAGIFY_ASSETS_IMG_URL; ?>logo-wprocket2x.png 2x" alt="WP Rocket" width="118" height="32">
|
13 |
+
</p>
|
14 |
+
<p class="imagify-rkt-msg">
|
15 |
+
<?php
|
16 |
+
esc_html_e( 'Discover the best caching plugin to speed up your website.', 'imagify' );
|
17 |
+
echo '<br>';
|
18 |
+
printf(
|
19 |
+
/* translators: 1 is a "bold" tag start, 2 is a pourcentage, 3 is the "bold" tag end, 4 is a coupon code. */
|
20 |
+
esc_html__( '%1$sGet %2$s off%3$s with this coupon code: %4$s', 'imagify' ),
|
21 |
+
'<strong>', '20%', '</strong>', $coupon_code
|
22 |
+
);
|
23 |
+
?>
|
24 |
+
</p>
|
25 |
+
<p class="imagify-rkt-coupon">
|
26 |
+
<span class="imagify-rkt-coupon-code"><?php echo $coupon_code; ?></span>
|
27 |
+
</p>
|
28 |
+
<p class="imagify-rkt-cta">
|
29 |
+
<a target="_blank" href="<?php echo esc_url( $wprocket_url ); ?>" class="button button-primary tgm-plugin-update-modal"><?php esc_html_e( 'Get WP Rocket now', 'imagify' ); ?></a>
|
30 |
+
</p>
|
31 |
+
</div>
|
inc/admin/ui/notice-wrong-api-key.php
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
defined( 'ABSPATH' ) || die( 'Cheatin\' uh?' );
|
3 |
+
|
4 |
+
$this->render_view( 'header', array(
|
5 |
+
'title' => __( 'Your API key isn\'t valid!', 'imagify' ),
|
6 |
+
) );
|
7 |
+
?>
|
8 |
+
<p>
|
9 |
+
<?php wp_nonce_field( 'imagify-signup', 'imagifysignupnonce', false ); ?>
|
10 |
+
<?php
|
11 |
+
printf(
|
12 |
+
/* translators: 1 and 2 are link tag starts, 3 is a link tag end. */
|
13 |
+
__( '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' ),
|
14 |
+
'<a href="' . esc_url( get_imagify_admin_url() ) . '">',
|
15 |
+
'<a id="imagify-signup" target="_blank" href="' . IMAGIFY_WEB_MAIN . '">',
|
16 |
+
'</a>'
|
17 |
+
);
|
18 |
+
?>
|
19 |
+
</p>
|
20 |
+
<?php
|
21 |
+
$this->render_view( 'footer', array(
|
22 |
+
'dismissible' => 'wrong-api-key',
|
23 |
+
) );
|
inc/admin/ui/notices.php
DELETED
@@ -1,511 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
defined( 'ABSPATH' ) || die( 'Cheatin\' uh?' );
|
3 |
-
|
4 |
-
add_action( 'all_admin_notices', '_imagify_warning_empty_api_key_notice' );
|
5 |
-
/**
|
6 |
-
* This warning is displayed when the API key is empty.
|
7 |
-
*
|
8 |
-
* @since 1.0
|
9 |
-
* @author Jonathan Buttigieg
|
10 |
-
*/
|
11 |
-
function _imagify_warning_empty_api_key_notice() {
|
12 |
-
$current_screen = get_current_screen();
|
13 |
-
|
14 |
-
if ( ! empty( $current_screen ) && ( 'settings_page_imagify' === $current_screen->base || 'settings_page_imagify-network' === $current_screen->base ) ) {
|
15 |
-
return;
|
16 |
-
}
|
17 |
-
|
18 |
-
if ( imagify_notice_is_dismissed( 'welcome-steps' ) || get_imagify_option( 'api_key' ) || ! current_user_can( imagify_get_capacity() ) ) {
|
19 |
-
return;
|
20 |
-
}
|
21 |
-
?>
|
22 |
-
<div class="imagify-welcome">
|
23 |
-
<div class="imagify-title">
|
24 |
-
<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>
|
25 |
-
<span class="baseline">
|
26 |
-
<?php _e( 'Welcome to Imagify, the best way to easily optimize your images!', 'imagify' ); ?>
|
27 |
-
</span>
|
28 |
-
<a href="<?php echo esc_url( get_imagify_admin_url( 'dismiss-notice', 'welcome-steps' ) ); ?>" class="imagify-notice-dismiss imagify-welcome-remove" title="<?php esc_attr_e( 'Dismiss this notice', 'imagify' ); ?>"><span class="dashicons dashicons-dismiss"></span><span class="screen-reader-text"><?php _e( 'Dismiss this notice', 'imagify' ); ?></span></a>
|
29 |
-
</div>
|
30 |
-
<div class="imagify-settings-section">
|
31 |
-
<div class="imagify-columns counter">
|
32 |
-
<div class="col-1-3">
|
33 |
-
<img src="<?php echo IMAGIFY_ASSETS_IMG_URL; ?>user.svg" width="48" height="48" alt="">
|
34 |
-
<div class="imagify-col-content">
|
35 |
-
<p class="imagify-col-title"><?php _e( 'Create an Account', 'imagify' ); ?></p>
|
36 |
-
<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>
|
37 |
-
<p>
|
38 |
-
<?php wp_nonce_field( 'imagify-signup', 'imagifysignupnonce', false ); ?>
|
39 |
-
<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>
|
40 |
-
</div>
|
41 |
-
</div>
|
42 |
-
<div class="col-1-3">
|
43 |
-
<img src="<?php echo IMAGIFY_ASSETS_IMG_URL; ?>key.svg" width="48" height="48" alt="">
|
44 |
-
<div class="imagify-col-content">
|
45 |
-
<p class="imagify-col-title"><?php _e( 'Enter your API Key', 'imagify' ); ?></p>
|
46 |
-
<p class="imagify-col-desc">
|
47 |
-
<?php
|
48 |
-
printf(
|
49 |
-
/* translators: 1 is a link tag start, 2 is the link tag end. */
|
50 |
-
__( 'Save your API Key you have received by email or you can get it on your %1$sImagify account page%2$s.', 'imagify' ),
|
51 |
-
'<a href="' . IMAGIFY_APP_MAIN . '/#/api">',
|
52 |
-
'</a>'
|
53 |
-
);
|
54 |
-
?>
|
55 |
-
</p>
|
56 |
-
<p>
|
57 |
-
<?php wp_nonce_field( 'imagify-check-api-key', 'imagifycheckapikeynonce', false ); ?>
|
58 |
-
<a id="imagify-save-api-key" href="<?php echo esc_url( get_imagify_admin_url() ); ?>" class="button button-primary"><?php _e( 'I have my API key', 'imagify' ); ?></a>
|
59 |
-
</p>
|
60 |
-
</div>
|
61 |
-
</div>
|
62 |
-
<div class="col-1-3">
|
63 |
-
<img src="<?php echo IMAGIFY_ASSETS_IMG_URL; ?>gear.svg" width="48" height="48" alt="">
|
64 |
-
<div class="imagify-col-content">
|
65 |
-
<p class="imagify-col-title"><?php _e( 'Configure it', 'imagify' ); ?></p>
|
66 |
-
<p class="imagify-col-desc"><?php _e( 'It’s almost done! You have just to configure your optimization settings.', 'imagify' ); ?></p>
|
67 |
-
<p><a href="<?php echo esc_url( get_imagify_admin_url() ); ?>" class="button button-primary"><?php _e( 'Go to Settings', 'imagify' ); ?></a></p>
|
68 |
-
</div>
|
69 |
-
</div>
|
70 |
-
</div>
|
71 |
-
</div>
|
72 |
-
</div>
|
73 |
-
<?php
|
74 |
-
}
|
75 |
-
|
76 |
-
add_action( 'all_admin_notices', '_imagify_warning_wrong_api_key_notice' );
|
77 |
-
/**
|
78 |
-
* This warning is displayed when the API key is empty.
|
79 |
-
*
|
80 |
-
* @since 1.0
|
81 |
-
* @author Jonathan Buttigieg
|
82 |
-
*/
|
83 |
-
function _imagify_warning_wrong_api_key_notice() {
|
84 |
-
$current_screen = get_current_screen();
|
85 |
-
|
86 |
-
if ( empty( $current_screen ) || 'media_page_imagify-bulk-optimization' !== $current_screen->base ) {
|
87 |
-
return;
|
88 |
-
}
|
89 |
-
|
90 |
-
$api_key = get_imagify_option( 'api_key', false );
|
91 |
-
|
92 |
-
if ( imagify_notice_is_dismissed( 'wrong-api-key' ) || empty( $api_key ) || imagify_valid_key() || ! current_user_can( imagify_get_capacity() ) ) {
|
93 |
-
return;
|
94 |
-
}
|
95 |
-
?>
|
96 |
-
<div class="clear"></div>
|
97 |
-
<div class="error imagify-notice below-h2">
|
98 |
-
<div class="imagify-notice-logo">
|
99 |
-
<img class="imagify-logo" src="<?php echo IMAGIFY_ASSETS_IMG_URL; ?>imagify-logo.png" width="138" height="16" alt="Imagify" />
|
100 |
-
</div>
|
101 |
-
<div class="imagify-notice-content">
|
102 |
-
<p class="imagify-notice-title"><strong><?php _e( 'Your API key isn\'t valid!', 'imagify' ); ?></strong></p>
|
103 |
-
<p>
|
104 |
-
<?php wp_nonce_field( 'imagify-signup', 'imagifysignupnonce', false ); ?>
|
105 |
-
<?php
|
106 |
-
printf(
|
107 |
-
/* translators: 1 and 2 are link tag starts, 3 is a link tag end. */
|
108 |
-
__( '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' ),
|
109 |
-
'<a href="' . get_imagify_admin_url() . '">',
|
110 |
-
'<a id="imagify-signup" href="' . IMAGIFY_WEB_MAIN . '">',
|
111 |
-
'</a>'
|
112 |
-
);
|
113 |
-
?>
|
114 |
-
</p>
|
115 |
-
</div>
|
116 |
-
<a href="<?php echo esc_url( 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>
|
117 |
-
</div>
|
118 |
-
|
119 |
-
<?php
|
120 |
-
}
|
121 |
-
|
122 |
-
add_action( 'all_admin_notices', '_imagify_warning_plugins_to_deactivate_notice' );
|
123 |
-
/**
|
124 |
-
* This warning is displayed when some plugins may conflict with Imagify.
|
125 |
-
*
|
126 |
-
* @since 1.0
|
127 |
-
* @author Jonathan Buttigieg
|
128 |
-
*/
|
129 |
-
function _imagify_warning_plugins_to_deactivate_notice() {
|
130 |
-
$plugins_to_deactivate = array();
|
131 |
-
|
132 |
-
// Deactivate all plugins who can cause conflicts with Imagify.
|
133 |
-
$plugins = array(
|
134 |
-
'wp-smush' => 'wp-smushit/wp-smush.php', // WP Smush.
|
135 |
-
'wp-smush-pro' => 'wp-smush-pro/wp-smush.php', // WP Smush Pro.
|
136 |
-
'kraken' => 'kraken-image-optimizer/kraken.php', // Kraken.io.
|
137 |
-
'tinypng' => 'tiny-compress-images/tiny-compress-images.php', // TinyPNG.
|
138 |
-
'shortpixel' => 'shortpixel-image-optimiser/wp-shortpixel.php', // Shortpixel.
|
139 |
-
'ewww' => 'ewww-image-optimizer/ewww-image-optimizer.php', // EWWW Image Optimizer.
|
140 |
-
'ewww-cloud' => 'ewww-image-optimizer-cloud/ewww-image-optimizer-cloud.php', // EWWW Image Optimizer Cloud.
|
141 |
-
'imagerecycle' => 'imagerecycle-pdf-image-compression/wp-image-recycle.php', // ImageRecycle.
|
142 |
-
);
|
143 |
-
|
144 |
-
/**
|
145 |
-
* Filter the recommended plugins to deactivate to prevent conflicts.
|
146 |
-
*
|
147 |
-
* @since 1.0
|
148 |
-
*
|
149 |
-
* @param string $plugins List of recommended plugins to deactivate.
|
150 |
-
*/
|
151 |
-
$plugins = apply_filters( 'imagify_plugins_to_deactivate', $plugins );
|
152 |
-
$plugins = array_filter( $plugins, 'is_plugin_active' );
|
153 |
-
|
154 |
-
if ( ! $plugins || ! current_user_can( imagify_get_capacity() ) ) {
|
155 |
-
return;
|
156 |
-
}
|
157 |
-
?>
|
158 |
-
<div class="clear"></div>
|
159 |
-
<div class="imagify-notice error below-h2">
|
160 |
-
<div class="imagify-notice-logo">
|
161 |
-
<img class="imagify-logo" src="<?php echo IMAGIFY_ASSETS_IMG_URL; ?>imagify-logo.png" width="138" height="16" alt="Imagify" />
|
162 |
-
</div>
|
163 |
-
<div class="imagify-notice-content">
|
164 |
-
<p><?php _e( 'The following plugins are not compatible with this plugin and may cause unexpected results:', 'imagify' ); ?></p>
|
165 |
-
|
166 |
-
<ul class="imagify-plugins-error">
|
167 |
-
<?php
|
168 |
-
foreach ( $plugins as $plugin ) {
|
169 |
-
$plugin_data = get_plugin_data( WP_PLUGIN_DIR . DIRECTORY_SEPARATOR . $plugin );
|
170 |
-
$deactivate_url = esc_url( wp_nonce_url( admin_url( 'admin-post.php?action=imagify_deactivate_plugin&plugin=' . rawurlencode( $plugin ) ), 'imagifydeactivatepluginnonce' ) );
|
171 |
-
echo '<li>' . $plugin_data['Name'] . '</span> <a href="' . $deactivate_url . '" class="button button-mini alignright">' . __( 'Deactivate', 'imagify' ) . '</a></li>';
|
172 |
-
}
|
173 |
-
?>
|
174 |
-
</ul>
|
175 |
-
</div>
|
176 |
-
</div>
|
177 |
-
<?php
|
178 |
-
}
|
179 |
-
|
180 |
-
add_action( 'all_admin_notices', '_imagify_http_block_external_notice' );
|
181 |
-
/**
|
182 |
-
* This notice is displayed when external HTTP requests are blocked via the WP_HTTP_BLOCK_EXTERNAL constant.
|
183 |
-
*
|
184 |
-
* @since 1.0
|
185 |
-
* @author Jonathan Buttigieg
|
186 |
-
*/
|
187 |
-
function _imagify_http_block_external_notice() {
|
188 |
-
$current_screen = get_current_screen();
|
189 |
-
|
190 |
-
if ( empty( $current_screen ) || ( 'settings_page_imagify' === $current_screen->base || 'settings_page_imagify-network' === $current_screen->base ) ) {
|
191 |
-
return;
|
192 |
-
}
|
193 |
-
|
194 |
-
if ( imagify_notice_is_dismissed( 'http-block-external' ) || ! current_user_can( imagify_get_capacity( true ) ) || ! is_imagify_blocked() ) {
|
195 |
-
return;
|
196 |
-
}
|
197 |
-
?>
|
198 |
-
<div class="clear"></div>
|
199 |
-
<div class="error imagify-notice below-h2">
|
200 |
-
<div class="imagify-notice-logo">
|
201 |
-
<img class="imagify-logo" src="<?php echo IMAGIFY_ASSETS_IMG_URL; ?>imagify-logo.png" width="138" height="16" alt="Imagify" />
|
202 |
-
</div>
|
203 |
-
<div class="imagify-notice-content">
|
204 |
-
<p class="imagify-notice-title"><strong><?php _e( 'The external HTTP requests are blocked!', 'imagify' ); ?></strong></p>
|
205 |
-
<p>
|
206 |
-
<?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' ); ?>
|
207 |
-
</p>
|
208 |
-
<p>
|
209 |
-
<?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/>
|
210 |
-
<?php _e( 'Click on the field and press Ctrl-A to select all.', 'imagify' ); ?>
|
211 |
-
</p>
|
212 |
-
<p><textarea readonly="readonly" class="large-text readonly" rows="1">define( 'WP_ACCESSIBLE_HOSTS', '*.imagify.io' );</textarea></p>
|
213 |
-
</div>
|
214 |
-
<a href="<?php echo esc_url( 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>
|
215 |
-
</div>
|
216 |
-
<?php
|
217 |
-
}
|
218 |
-
|
219 |
-
add_action( 'all_admin_notices', '_imagify_warning_grid_view_notice' );
|
220 |
-
/**
|
221 |
-
* This warning is displayed when the grid view is active on the library.
|
222 |
-
*
|
223 |
-
* @since 1.0.2
|
224 |
-
* @author Jonathan Buttigieg
|
225 |
-
*/
|
226 |
-
function _imagify_warning_grid_view_notice() {
|
227 |
-
global $wp_version;
|
228 |
-
|
229 |
-
$current_screen = get_current_screen();
|
230 |
-
|
231 |
-
if ( empty( $current_screen ) || 'upload' !== $current_screen->base ) {
|
232 |
-
return;
|
233 |
-
}
|
234 |
-
|
235 |
-
$media_library_mode = get_user_option( 'media_library_mode', get_current_user_id() );
|
236 |
-
|
237 |
-
if ( imagify_notice_is_dismissed( 'grid-view' ) || ! current_user_can( 'upload_files' ) || 'list' === $media_library_mode || version_compare( $wp_version, '4.0' ) < 0 ) {
|
238 |
-
return;
|
239 |
-
}
|
240 |
-
|
241 |
-
// Don't display the notice if the API key isn't valid.
|
242 |
-
if ( ! imagify_valid_key() ) {
|
243 |
-
return;
|
244 |
-
}
|
245 |
-
?>
|
246 |
-
<div class="clear"></div>
|
247 |
-
<div class="error imagify-notice below-h2">
|
248 |
-
<div class="imagify-notice-logo">
|
249 |
-
<img class="imagify-logo" src="<?php echo IMAGIFY_ASSETS_IMG_URL; ?>imagify-logo.png" width="138" height="16" alt="Imagify" />
|
250 |
-
</div>
|
251 |
-
<div class="imagify-notice-content">
|
252 |
-
<p class="imagify-notice-title"><strong><?php _e( 'You\'re missing out!', 'imagify' ); ?></strong></p>
|
253 |
-
<p><?php _e( 'Use the List view to optimize images with Imagify.', 'imagify' ); ?></p>
|
254 |
-
<p><a href="<?php echo esc_url( admin_url( 'upload.php?mode=list' ) ); ?>"><?php _e( 'Switch to the List View', 'imagify' ); ?></a></p>
|
255 |
-
</div>
|
256 |
-
<a href="<?php echo esc_url( 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>
|
257 |
-
</div>
|
258 |
-
<?php
|
259 |
-
}
|
260 |
-
|
261 |
-
add_action( 'all_admin_notices', '_imagify_warning_over_quota_notice' );
|
262 |
-
/**
|
263 |
-
* This warning is displayed to warn the user that its quota is consumed for the current month.
|
264 |
-
*
|
265 |
-
* @since 1.1.1
|
266 |
-
* @author Jonathan Buttigieg
|
267 |
-
*/
|
268 |
-
function _imagify_warning_over_quota_notice() {
|
269 |
-
$current_screen = get_current_screen();
|
270 |
-
|
271 |
-
if ( empty( $current_screen ) || ( 'media_page_imagify-bulk-optimization' !== $current_screen->base && 'settings_page_imagify' !== $current_screen->base && 'settings_page_imagify-network' !== $current_screen->base ) ) {
|
272 |
-
return;
|
273 |
-
}
|
274 |
-
|
275 |
-
if ( imagify_notice_is_dismissed( 'free-over-quota' ) || ! current_user_can( imagify_get_capacity() ) ) {
|
276 |
-
return;
|
277 |
-
}
|
278 |
-
|
279 |
-
$user = new Imagify_User();
|
280 |
-
|
281 |
-
// Don't display the notice if the user doesn't use all his quota or the API key isn't valid.
|
282 |
-
if ( ! $user->is_over_quota() || ! imagify_valid_key() ) {
|
283 |
-
return;
|
284 |
-
}
|
285 |
-
|
286 |
-
?>
|
287 |
-
<div class="clear"></div>
|
288 |
-
<div class="error imagify-notice below-h2">
|
289 |
-
<div class="imagify-notice-logo">
|
290 |
-
<img class="imagify-logo" src="<?php echo IMAGIFY_ASSETS_IMG_URL; ?>imagify-logo.png" width="138" height="16" alt="Imagify" />
|
291 |
-
</div>
|
292 |
-
<div class="imagify-notice-content">
|
293 |
-
<p class="imagify-notice-title"><strong><?php _e( 'Oops, It\'s Over!', 'imagify' ); ?></strong></p>
|
294 |
-
<p>
|
295 |
-
<?php
|
296 |
-
printf(
|
297 |
-
/* translators: 1 is a "bold" tag start, 2 is a formatted data quota, 3 is a date, 4 is the "bold" tag end. */
|
298 |
-
__( 'You have consumed all your credit for this month. You will have %1$s%2$s back on %3$s%4$s.', 'imagify' ),
|
299 |
-
'<strong>',
|
300 |
-
size_format( $user->quota * 1048576 ),
|
301 |
-
date_i18n( get_option( 'date_format' ), strtotime( $user->next_date_update ) ),
|
302 |
-
'</strong>'
|
303 |
-
);
|
304 |
-
echo '<br/><br/>';
|
305 |
-
printf(
|
306 |
-
/* translators: 1 is a link tag start, 2 is the link tag end. */
|
307 |
-
__( 'To continue to optimize your images, log in to your Imagify account to %1$sbuy a pack or subscribe to a plan%2$s.', 'imagify' ),
|
308 |
-
'<a href="' . IMAGIFY_APP_MAIN . '/#/subscription">',
|
309 |
-
'</a>'
|
310 |
-
);
|
311 |
-
?>
|
312 |
-
</p>
|
313 |
-
</div>
|
314 |
-
<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>
|
315 |
-
</div>
|
316 |
-
<?php
|
317 |
-
}
|
318 |
-
|
319 |
-
add_action( 'all_admin_notices', '_imagify_warning_backup_folder_not_writable_notice' );
|
320 |
-
/**
|
321 |
-
* This warning is displayed if the backup folder is not writable.
|
322 |
-
*
|
323 |
-
* @since 1.6.8
|
324 |
-
* @author Grégory Viguier
|
325 |
-
*/
|
326 |
-
function _imagify_warning_backup_folder_not_writable_notice() {
|
327 |
-
global $post_id;
|
328 |
-
$current_screen = get_current_screen();
|
329 |
-
|
330 |
-
if ( empty( $current_screen ) ) {
|
331 |
-
return;
|
332 |
-
}
|
333 |
-
|
334 |
-
// If the automatic optimization is enabled, we'll display the notice only on some pages.
|
335 |
-
$auto = get_imagify_option( 'auto_optimize' );
|
336 |
-
$bases = array(
|
337 |
-
'settings_page_' . IMAGIFY_SLUG => 1,
|
338 |
-
'settings_page_' . IMAGIFY_SLUG . '-network' => 1,
|
339 |
-
'media_page_' . IMAGIFY_SLUG . '-bulk-optimization' => 1,
|
340 |
-
'media_page_' . IMAGIFY_SLUG . '-ngg-bulk-optimization' => 1,
|
341 |
-
'upload' => 1,
|
342 |
-
'media' => 1,
|
343 |
-
'attachment' => 1,
|
344 |
-
);
|
345 |
-
|
346 |
-
if ( ! $auto && empty( $bases[ $current_screen->id ] ) ) {
|
347 |
-
return;
|
348 |
-
}
|
349 |
-
|
350 |
-
if ( ! $auto && 'attachment' === $current_screen->id && $post_id && ! imagify_is_attachment_mime_type_supported( $post_id ) ) {
|
351 |
-
return;
|
352 |
-
}
|
353 |
-
|
354 |
-
if ( ! get_imagify_option( 'backup' ) || ! current_user_can( imagify_get_capacity( true ) ) ) {
|
355 |
-
return;
|
356 |
-
}
|
357 |
-
|
358 |
-
if ( imagify_backup_dir_is_writable() ) {
|
359 |
-
return;
|
360 |
-
}
|
361 |
-
|
362 |
-
$filesystem = imagify_get_filesystem();
|
363 |
-
|
364 |
-
if ( $filesystem->exists( get_imagify_backup_dir_path() ) ) {
|
365 |
-
/* translators: %s is a file path. */
|
366 |
-
$message = __( 'The backup folder %s is not writable by the server, original images cannot be saved!', 'imagify' );
|
367 |
-
} else {
|
368 |
-
/* translators: %s is a file path. */
|
369 |
-
$message = __( 'The backup folder %s cannot be created. Is its parent directory writable by the server? Original images cannot be saved!', 'imagify' );
|
370 |
-
}
|
371 |
-
|
372 |
-
$backup_path = imagify_make_file_path_replative( get_imagify_backup_dir_path( true ) );
|
373 |
-
?>
|
374 |
-
<div class="clear"></div>
|
375 |
-
<div class="imagify-notice error below-h2">
|
376 |
-
<div class="imagify-notice-logo">
|
377 |
-
<img class="imagify-logo" src="<?php echo IMAGIFY_ASSETS_IMG_URL; ?>imagify-logo.png" width="138" height="16" alt="Imagify" />
|
378 |
-
</div>
|
379 |
-
<div class="imagify-notice-content">
|
380 |
-
<p><?php printf( $message, "<code>$backup_path</code>" ); ?></p>
|
381 |
-
</div>
|
382 |
-
</div>
|
383 |
-
<?php
|
384 |
-
}
|
385 |
-
|
386 |
-
add_action( 'admin_notices', '_imagify_rocket_notice' );
|
387 |
-
/**
|
388 |
-
* Add a message about WP Rocket on the "Bulk Optimization" screen.
|
389 |
-
*
|
390 |
-
* @since 2.7
|
391 |
-
* @author Jonathan Buttigieg
|
392 |
-
*/
|
393 |
-
function _imagify_rocket_notice() {
|
394 |
-
$current_screen = get_current_screen();
|
395 |
-
|
396 |
-
if ( empty( $current_screen ) || 'media_page_imagify-bulk-optimization' !== $current_screen->base ) {
|
397 |
-
return;
|
398 |
-
}
|
399 |
-
|
400 |
-
if ( defined( 'WP_ROCKET_VERSION' ) || imagify_notice_is_dismissed( 'wp-rocket' ) || ! current_user_can( imagify_get_capacity( true ) ) ) {
|
401 |
-
return;
|
402 |
-
}
|
403 |
-
|
404 |
-
$dismiss_url = get_imagify_admin_url( 'dismiss-notice', 'wp-rocket' );
|
405 |
-
$coupon_code = 'IMAGIFY20';
|
406 |
-
$wprocket_url = imagify_get_wp_rocket_url();
|
407 |
-
?>
|
408 |
-
|
409 |
-
<div class="updated imagify-rkt-notice">
|
410 |
-
<a href="<?php echo esc_url( $dismiss_url ); ?>" class="imagify-cross" target="_blank"><span class="dashicons dashicons-no"></span></a>
|
411 |
-
|
412 |
-
<p class="imagify-rkt-logo">
|
413 |
-
<img src="<?php echo IMAGIFY_ASSETS_IMG_URL; ?>logo-wprocket.png" srcset="<?php echo IMAGIFY_ASSETS_IMG_URL; ?>logo-wprocket2x.png 2x" alt="WP Rocket" width="118" height="32">
|
414 |
-
</p>
|
415 |
-
<p class="imagify-rkt-msg">
|
416 |
-
<?php
|
417 |
-
esc_html_e( 'Discover the best caching plugin to speed up your website.', 'imagify' );
|
418 |
-
echo '<br>';
|
419 |
-
printf(
|
420 |
-
/* translators: 1 is a "bold" tag start, 2 is a pourcentage, 3 is the "bold" tag end, 4 is a coupon code. */
|
421 |
-
esc_html__( '%1$sGet %2$s off%3$s with this coupon code: %4$s', 'imagify' ),
|
422 |
-
'<strong>', '20%', '</strong>', $coupon_code
|
423 |
-
);
|
424 |
-
?>
|
425 |
-
</p>
|
426 |
-
<p class="imagify-rkt-coupon">
|
427 |
-
<span class="imagify-rkt-coupon-code"><?php echo $coupon_code; ?></span>
|
428 |
-
</p>
|
429 |
-
<p class="imagify-rkt-cta">
|
430 |
-
<a href="<?php echo esc_url( $wprocket_url ); ?>" class="button button-primary tgm-plugin-update-modal"><?php esc_html_e( 'Get WP Rocket now', 'imagify' ); ?></a>
|
431 |
-
</p>
|
432 |
-
</div>
|
433 |
-
|
434 |
-
<?php
|
435 |
-
}
|
436 |
-
|
437 |
-
add_action( 'all_admin_notices', '_imagify_rating_notice' );
|
438 |
-
/**
|
439 |
-
* This notice is displayed to rate the plugin after 100 optimization & 7 days after the first installation.
|
440 |
-
*
|
441 |
-
* @since 1.4.2
|
442 |
-
* @author Jonathan Buttigieg
|
443 |
-
*/
|
444 |
-
function _imagify_rating_notice() {
|
445 |
-
$current_screen = get_current_screen();
|
446 |
-
|
447 |
-
if ( empty( $current_screen ) || ( 'media_page_imagify-bulk-optimization' !== $current_screen->base && 'upload' !== $current_screen->base && 'media' !== $current_screen->base ) ) {
|
448 |
-
return;
|
449 |
-
}
|
450 |
-
|
451 |
-
if ( imagify_notice_is_dismissed( 'rating' ) || ! current_user_can( imagify_get_capacity( true ) ) ) {
|
452 |
-
return;
|
453 |
-
}
|
454 |
-
|
455 |
-
$user_images_count = (int) get_site_transient( 'imagify_user_images_count' );
|
456 |
-
|
457 |
-
if ( ! $user_images_count || get_site_transient( 'imagify_seen_rating_notice' ) ) {
|
458 |
-
return;
|
459 |
-
}
|
460 |
-
?>
|
461 |
-
<div class="clear"></div>
|
462 |
-
<div class="updated imagify-notice below-h2">
|
463 |
-
<div class="imagify-notice-logo">
|
464 |
-
<img class="imagify-logo" src="<?php echo IMAGIFY_ASSETS_IMG_URL; ?>imagify-logo.png" width="138" height="16" alt="Imagify" />
|
465 |
-
</div>
|
466 |
-
<div class="imagify-notice-content">
|
467 |
-
<p>
|
468 |
-
<?php
|
469 |
-
printf(
|
470 |
-
/* translators: 1 is a "bold" tag start, 2 is the "bold" tag end, 3 is a formatted number (don't use %3$d). */
|
471 |
-
__( '%1$sCongratulations%2$s, you have optimized %1$s%3$s images%2$s and improved your website\'s speed by reducing your images size.', 'imagify' ),
|
472 |
-
'<strong>',
|
473 |
-
'</strong>',
|
474 |
-
number_format_i18n( $user_images_count )
|
475 |
-
);
|
476 |
-
?>
|
477 |
-
</p>
|
478 |
-
<p class="imagify-rate-us">
|
479 |
-
<?php
|
480 |
-
$imagify_rate_url = 'https://wordpress.org/support/view/plugin-reviews/imagify?rate=5#postform';
|
481 |
-
|
482 |
-
printf(
|
483 |
-
/* translators: 1 is a "bold" tag start, 2 is the "bold" tag end + a line break tag, 3 is a link tag start, 4 is the link tag end. */
|
484 |
-
__( '%1$sDo you like this plugin?%2$s Please take a few seconds to %3$srate it on WordPress.org%4$s!', 'imagify' ),
|
485 |
-
'<strong>',
|
486 |
-
'</strong><br />',
|
487 |
-
'<a href="' . $imagify_rate_url . '">',
|
488 |
-
'</a>'
|
489 |
-
);
|
490 |
-
?>
|
491 |
-
<br>
|
492 |
-
<a class="stars" href="<?php echo $imagify_rate_url; ?>">☆☆☆☆☆</a>
|
493 |
-
</p>
|
494 |
-
</div>
|
495 |
-
<a href="<?php echo esc_url( get_imagify_admin_url( 'dismiss-notice', 'rating' ) ); ?>" 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>
|
496 |
-
</div>
|
497 |
-
<?php
|
498 |
-
}
|
499 |
-
|
500 |
-
add_action( 'imagify_dismiss_notice', '_imagify_clear_scheduled_rating' );
|
501 |
-
/**
|
502 |
-
* Stop the rating cron when the notice is dismissed.
|
503 |
-
*
|
504 |
-
* @param string $notice The notice name.
|
505 |
-
*/
|
506 |
-
function _imagify_clear_scheduled_rating( $notice ) {
|
507 |
-
if ( 'rating' === $notice ) {
|
508 |
-
set_site_transient( 'do_imagify_rating_cron', 'no' );
|
509 |
-
wp_clear_scheduled_hook( 'imagify_rating_event' );
|
510 |
-
}
|
511 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
inc/admin/ui/options.php
CHANGED
@@ -7,7 +7,7 @@ defined( 'ABSPATH' ) || die( 'Cheatin\' uh?' );
|
|
7 |
* @since 1.0
|
8 |
*/
|
9 |
function _imagify_display_options_page() {
|
10 |
-
global $
|
11 |
|
12 |
if ( isset( $_POST['submit-goto-bulk'] ) ) { // WPCS: CSRF ok.
|
13 |
wp_safe_redirect( get_admin_url( get_current_blog_id(), 'upload.php?page=imagify-bulk-optimization' ) );
|
@@ -61,7 +61,12 @@ function _imagify_display_options_page() {
|
|
61 |
<div class="imagify-col imagify-main">
|
62 |
<?php $heading_tag = version_compare( $wp_version, '4.3' ) >= 0 ? 'h1' : 'h2'; ?>
|
63 |
<div class="imagify-title">
|
64 |
-
<
|
|
|
|
|
|
|
|
|
|
|
65 |
|
66 |
<?php $imagify_rate_url = 'https://wordpress.org/support/view/plugin-reviews/imagify?rate=5#postform'; ?>
|
67 |
<p class="imagify-rate-us">
|
@@ -126,7 +131,7 @@ function _imagify_display_options_page() {
|
|
126 |
printf(
|
127 |
/* translators: 1 is a link tag start, 2 is the link tag end. */
|
128 |
__( 'Don\'t have an API Key yet? %1$sCreate one, it\'s FREE%2$s.', 'imagify' ),
|
129 |
-
'<a id="imagify-signup" href="' . IMAGIFY_APP_MAIN . '/#/register">',
|
130 |
'</a>'
|
131 |
);
|
132 |
echo '</p>';
|
@@ -215,7 +220,7 @@ function _imagify_display_options_page() {
|
|
215 |
|
216 |
<br/><strong id="backup-dir-is-writable" class="imagify-error<?php echo $backup_error_class; ?>" data-nonce="<?php echo esc_attr( wp_create_nonce( 'imagify_check_backup_dir_is_writable' ) ); ?>">
|
217 |
<?php
|
218 |
-
$backup_path =
|
219 |
/* translators: %s is a file path. */
|
220 |
printf( __( 'The backup folder %s cannot be created or is not writable by the server, original images cannot be saved!', 'imagify' ), "<code>$backup_path</code>" );
|
221 |
?>
|
7 |
* @since 1.0
|
8 |
*/
|
9 |
function _imagify_display_options_page() {
|
10 |
+
global $wp_version;
|
11 |
|
12 |
if ( isset( $_POST['submit-goto-bulk'] ) ) { // WPCS: CSRF ok.
|
13 |
wp_safe_redirect( get_admin_url( get_current_blog_id(), 'upload.php?page=imagify-bulk-optimization' ) );
|
61 |
<div class="imagify-col imagify-main">
|
62 |
<?php $heading_tag = version_compare( $wp_version, '4.3' ) >= 0 ? 'h1' : 'h2'; ?>
|
63 |
<div class="imagify-title">
|
64 |
+
<div class="imagify-logo-block">
|
65 |
+
<img width="225" height="26" alt="Imagify" src="<?php echo IMAGIFY_ASSETS_IMG_URL; ?>imagify-logo.png" class="imagify-logo" />
|
66 |
+
<small>
|
67 |
+
<sup><?php echo IMAGIFY_VERSION; ?></sup>
|
68 |
+
</small>
|
69 |
+
</div>
|
70 |
|
71 |
<?php $imagify_rate_url = 'https://wordpress.org/support/view/plugin-reviews/imagify?rate=5#postform'; ?>
|
72 |
<p class="imagify-rate-us">
|
131 |
printf(
|
132 |
/* translators: 1 is a link tag start, 2 is the link tag end. */
|
133 |
__( 'Don\'t have an API Key yet? %1$sCreate one, it\'s FREE%2$s.', 'imagify' ),
|
134 |
+
'<a id="imagify-signup" target="_blank" href="' . IMAGIFY_APP_MAIN . '/#/register">',
|
135 |
'</a>'
|
136 |
);
|
137 |
echo '</p>';
|
220 |
|
221 |
<br/><strong id="backup-dir-is-writable" class="imagify-error<?php echo $backup_error_class; ?>" data-nonce="<?php echo esc_attr( wp_create_nonce( 'imagify_check_backup_dir_is_writable' ) ); ?>">
|
222 |
<?php
|
223 |
+
$backup_path = imagify_make_file_path_relative( get_imagify_backup_dir_path( true ) );
|
224 |
/* translators: %s is a file path. */
|
225 |
printf( __( 'The backup folder %s cannot be created or is not writable by the server, original images cannot be saved!', 'imagify' ), "<code>$backup_path</code>" );
|
226 |
?>
|
inc/api/imagify.php
DELETED
@@ -1,156 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
defined( 'ABSPATH' ) || die( 'Cheatin\' uh?' );
|
3 |
-
|
4 |
-
/**
|
5 |
-
* Create a new user on Imagify.
|
6 |
-
*
|
7 |
-
* @param array $data All user data.
|
8 |
-
* @return object
|
9 |
-
*/
|
10 |
-
function add_imagify_user( $data ) {
|
11 |
-
return imagify()->create_user( $data );
|
12 |
-
}
|
13 |
-
|
14 |
-
/**
|
15 |
-
* Update your Imagify account.
|
16 |
-
*
|
17 |
-
* @param string $data All user data.
|
18 |
-
* @return object
|
19 |
-
*/
|
20 |
-
function update_imagify_user( $data ) {
|
21 |
-
return imagify()->update_user( $data );
|
22 |
-
}
|
23 |
-
|
24 |
-
/**
|
25 |
-
* Get your Imagify account infos.
|
26 |
-
*
|
27 |
-
* @return object
|
28 |
-
*/
|
29 |
-
function get_imagify_user() {
|
30 |
-
return imagify()->get_user();
|
31 |
-
}
|
32 |
-
|
33 |
-
/**
|
34 |
-
* Get the Imagify API version.
|
35 |
-
*
|
36 |
-
* @return object
|
37 |
-
*/
|
38 |
-
function get_imagify_api_version() {
|
39 |
-
return imagify()->get_api_version();
|
40 |
-
}
|
41 |
-
|
42 |
-
/**
|
43 |
-
* Check your Imagify API key status.
|
44 |
-
*
|
45 |
-
* @param string $data An API key.
|
46 |
-
* @return bool
|
47 |
-
*/
|
48 |
-
function get_imagify_status( $data ) {
|
49 |
-
return imagify()->get_status( $data );
|
50 |
-
}
|
51 |
-
|
52 |
-
/**
|
53 |
-
* Optimize an image by uploading it on Imagify.
|
54 |
-
*
|
55 |
-
* @param array $data All image data.
|
56 |
-
* @return object
|
57 |
-
*/
|
58 |
-
function fetch_imagify_image( $data ) {
|
59 |
-
return imagify()->fetch_image( $data );
|
60 |
-
}
|
61 |
-
|
62 |
-
/**
|
63 |
-
* Optimize an image by sharing its URL on Imagify.
|
64 |
-
*
|
65 |
-
* @since 1.6.7 $data['image'] can contain the file path (prefered) or the result of `curl_file_create()`.
|
66 |
-
*
|
67 |
-
* @param array $data All image data.
|
68 |
-
* @return object
|
69 |
-
*/
|
70 |
-
function upload_imagify_image( $data ) {
|
71 |
-
return imagify()->upload_image( $data );
|
72 |
-
}
|
73 |
-
|
74 |
-
/**
|
75 |
-
* Get Imagify Plans Prices.
|
76 |
-
*
|
77 |
-
* @since 1.5
|
78 |
-
* @author Geoffrey Crofte
|
79 |
-
*
|
80 |
-
* @return object
|
81 |
-
*/
|
82 |
-
function get_imagify_plans_prices() {
|
83 |
-
return imagify()->get_plans_prices();
|
84 |
-
}
|
85 |
-
|
86 |
-
/**
|
87 |
-
* Get Imagify Plans Prices.
|
88 |
-
*
|
89 |
-
* @since 1.5
|
90 |
-
* @author Geoffrey Crofte
|
91 |
-
*
|
92 |
-
* @return object
|
93 |
-
*/
|
94 |
-
function get_imagify_packs_prices() {
|
95 |
-
return imagify()->get_packs_prices();
|
96 |
-
}
|
97 |
-
|
98 |
-
/**
|
99 |
-
* Get Imagify All Prices (plan & packs).
|
100 |
-
*
|
101 |
-
* @since 1.5.4
|
102 |
-
* @author Geoffrey Crofte
|
103 |
-
*
|
104 |
-
* @return object
|
105 |
-
*/
|
106 |
-
function get_imagify_all_prices() {
|
107 |
-
return imagify()->get_all_prices();
|
108 |
-
}
|
109 |
-
|
110 |
-
/**
|
111 |
-
* Check if Coupon Code exists.
|
112 |
-
*
|
113 |
-
* @since 1.6
|
114 |
-
* @author Geoffrey Crofte
|
115 |
-
*
|
116 |
-
* @param string $coupon the coupon code to check.
|
117 |
-
* @return object
|
118 |
-
*/
|
119 |
-
function check_imagify_coupon_code( $coupon ) {
|
120 |
-
return imagify()->check_coupon_code( $coupon );
|
121 |
-
}
|
122 |
-
|
123 |
-
/**
|
124 |
-
* Check if Discount/Promotion is available.
|
125 |
-
*
|
126 |
-
* @since 1.6.3
|
127 |
-
* @author Geoffrey Crofte
|
128 |
-
*
|
129 |
-
* @return object
|
130 |
-
*/
|
131 |
-
function check_imagify_discount() {
|
132 |
-
return imagify()->check_discount();
|
133 |
-
}
|
134 |
-
|
135 |
-
/**
|
136 |
-
* Get Maximum image size for free plan.
|
137 |
-
*
|
138 |
-
* @since 1.5.6
|
139 |
-
* @author Remy Perona
|
140 |
-
*
|
141 |
-
* @return string
|
142 |
-
*/
|
143 |
-
function get_imagify_max_image_size() {
|
144 |
-
$max_image_size = get_transient( 'imagify_max_image_size' );
|
145 |
-
|
146 |
-
if ( false === $max_image_size ) {
|
147 |
-
$max_image_size = imagify()->get_public_info();
|
148 |
-
|
149 |
-
if ( ! is_wp_error( $max_image_size ) ) {
|
150 |
-
$max_image_size = $max_image_size->max_image_size;
|
151 |
-
set_transient( 'imagify_max_image_size', $max_image_size, 6 * HOUR_IN_SECONDS );
|
152 |
-
}
|
153 |
-
}
|
154 |
-
|
155 |
-
return $max_image_size;
|
156 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
inc/classes/abstracts/class-imagify-abstract-attachment.php
CHANGED
@@ -13,7 +13,7 @@ class Imagify_Abstract_Attachment {
|
|
13 |
*
|
14 |
* @var string
|
15 |
*/
|
16 |
-
const VERSION = '1.
|
17 |
|
18 |
/**
|
19 |
* The attachment ID.
|
@@ -403,6 +403,97 @@ class Imagify_Abstract_Attachment {
|
|
403 |
}
|
404 |
}
|
405 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
406 |
/**
|
407 |
* Fills statistics data with values from $data array.
|
408 |
*
|
@@ -435,6 +526,20 @@ class Imagify_Abstract_Attachment {
|
|
435 |
return array();
|
436 |
}
|
437 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
438 |
/**
|
439 |
* Process an attachment restoration from the backup file.
|
440 |
*
|
13 |
*
|
14 |
* @var string
|
15 |
*/
|
16 |
+
const VERSION = '1.1';
|
17 |
|
18 |
/**
|
19 |
* The attachment ID.
|
403 |
}
|
404 |
}
|
405 |
|
406 |
+
/**
|
407 |
+
* Get the registered sizes.
|
408 |
+
*
|
409 |
+
* @since 1.6.10
|
410 |
+
* @author Grégory Viguier
|
411 |
+
*
|
412 |
+
* @return array Data for the registered thumbnail sizes.
|
413 |
+
*/
|
414 |
+
static public function get_registered_sizes() {
|
415 |
+
static $registered_sizes;
|
416 |
+
|
417 |
+
if ( ! isset( $registered_sizes ) ) {
|
418 |
+
$registered_sizes = get_imagify_thumbnail_sizes();
|
419 |
+
}
|
420 |
+
|
421 |
+
return $registered_sizes;
|
422 |
+
}
|
423 |
+
|
424 |
+
/**
|
425 |
+
* Get the unoptimized sizes for a specific attachment.
|
426 |
+
*
|
427 |
+
* @since 1.6.10
|
428 |
+
* @author Grégory Viguier
|
429 |
+
*
|
430 |
+
* @return array Data for the unoptimized thumbnail sizes.
|
431 |
+
* Each size data has a "file" key containing the name the thumbnail "should" have.
|
432 |
+
*/
|
433 |
+
public function get_unoptimized_sizes() {
|
434 |
+
// The attachment must have been optimized once and have a backup.
|
435 |
+
if ( ! $this->is_optimized() || ! $this->has_backup() ) {
|
436 |
+
return array();
|
437 |
+
}
|
438 |
+
|
439 |
+
$registered_sizes = static::get_registered_sizes();
|
440 |
+
$attachment_sizes = $this->get_data();
|
441 |
+
$attachment_sizes = ! empty( $attachment_sizes['sizes'] ) ? $attachment_sizes['sizes'] : array();
|
442 |
+
$missing_sizes = array_diff_key( $registered_sizes, $attachment_sizes );
|
443 |
+
|
444 |
+
if ( ! $missing_sizes ) {
|
445 |
+
// We have everything we need.
|
446 |
+
return array();
|
447 |
+
}
|
448 |
+
|
449 |
+
// Get full size dimensions.
|
450 |
+
$orig = wp_get_attachment_metadata( $this->id );
|
451 |
+
$orig_f = ! empty( $orig['file'] ) ? $orig['file'] : '';
|
452 |
+
$orig_w = ! empty( $orig['width'] ) ? (int) $orig['width'] : 0;
|
453 |
+
$orig_h = ! empty( $orig['height'] ) ? (int) $orig['height'] : 0;
|
454 |
+
|
455 |
+
if ( ! $orig_f || ! $orig_w || ! $orig_h ) {
|
456 |
+
return array();
|
457 |
+
}
|
458 |
+
|
459 |
+
$orig_f = pathinfo( $orig_f );
|
460 |
+
$orig_f = $orig_f['filename'] . '-{%suffix%}.' . $orig_f['extension'];
|
461 |
+
|
462 |
+
// Test if the missing sizes are needed.
|
463 |
+
$disallowed_sizes = get_imagify_option( 'disallowed-sizes', array() );
|
464 |
+
$is_active_for_network = imagify_is_active_for_network();
|
465 |
+
|
466 |
+
foreach ( $missing_sizes as $size_name => $size_data ) {
|
467 |
+
$duplicate = ( $orig_w === $size_data['width'] ) && ( $orig_h === $size_data['height'] );
|
468 |
+
|
469 |
+
if ( $duplicate ) {
|
470 |
+
// Same dimensions as the full size.
|
471 |
+
unset( $missing_sizes[ $size_name ] );
|
472 |
+
continue;
|
473 |
+
}
|
474 |
+
|
475 |
+
if ( ! $is_active_for_network && isset( $disallowed_sizes[ $size_name ] ) ) {
|
476 |
+
// This size must be optimized.
|
477 |
+
unset( $missing_sizes[ $size_name ] );
|
478 |
+
continue;
|
479 |
+
}
|
480 |
+
|
481 |
+
$resize_result = image_resize_dimensions( $orig_w, $orig_h, $size_data['width'], $size_data['height'], $size_data['crop'] );
|
482 |
+
|
483 |
+
if ( ! $resize_result ) {
|
484 |
+
// This size is not needed.
|
485 |
+
unset( $missing_sizes[ $size_name ] );
|
486 |
+
continue;
|
487 |
+
}
|
488 |
+
|
489 |
+
// Provide what should be the file name.
|
490 |
+
list( , , , , $dst_w, $dst_h ) = $resize_result;
|
491 |
+
$missing_sizes[ $size_name ]['file'] = str_replace( '{%suffix%}', "{$dst_w}x{$dst_h}", $orig_f );
|
492 |
+
}
|
493 |
+
|
494 |
+
return $missing_sizes;
|
495 |
+
}
|
496 |
+
|
497 |
/**
|
498 |
* Fills statistics data with values from $data array.
|
499 |
*
|
526 |
return array();
|
527 |
}
|
528 |
|
529 |
+
/**
|
530 |
+
* Optimize missing sizes with Imagify.
|
531 |
+
*
|
532 |
+
* @since 1.6.10
|
533 |
+
* @access public
|
534 |
+
* @author Grégory Viguier
|
535 |
+
*
|
536 |
+
* @param int $optimization_level The optimization level (2=ultra, 1=aggressive, 0=normal).
|
537 |
+
* @return array|object An array of thumbnail data, size by size. A WP_Error object on failure.
|
538 |
+
*/
|
539 |
+
public function optimize_missing_thumbnails( $optimization_level = null ) {
|
540 |
+
return array();
|
541 |
+
}
|
542 |
+
|
543 |
/**
|
544 |
* Process an attachment restoration from the backup file.
|
545 |
*
|
inc/classes/class-imagify-assets.php
ADDED
@@ -0,0 +1,803 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
defined( 'ABSPATH' ) || die( 'Cheatin\' uh?' );
|
3 |
+
|
4 |
+
/**
|
5 |
+
* Class that handles stylesheets and JavaScripts.
|
6 |
+
*
|
7 |
+
* @since 1.6.10
|
8 |
+
* @author Grégory Viguier
|
9 |
+
*/
|
10 |
+
class Imagify_Assets {
|
11 |
+
|
12 |
+
/**
|
13 |
+
* Class version.
|
14 |
+
*
|
15 |
+
* @var string
|
16 |
+
*/
|
17 |
+
const VERSION = '1.0';
|
18 |
+
|
19 |
+
/**
|
20 |
+
* Prefix used for stylesheet handles.
|
21 |
+
*
|
22 |
+
* @var string
|
23 |
+
*/
|
24 |
+
const CSS_PREFIX = 'imagify-';
|
25 |
+
|
26 |
+
/**
|
27 |
+
* Prefix used for script handles.
|
28 |
+
*
|
29 |
+
* @var string
|
30 |
+
*/
|
31 |
+
const JS_PREFIX = 'imagify-';
|
32 |
+
|
33 |
+
/**
|
34 |
+
* An array containing our registered styles.
|
35 |
+
*
|
36 |
+
* @var array
|
37 |
+
*/
|
38 |
+
protected $styles = array();
|
39 |
+
|
40 |
+
/**
|
41 |
+
* An array containing our registered scripts.
|
42 |
+
*
|
43 |
+
* @var array
|
44 |
+
*/
|
45 |
+
protected $scripts = array();
|
46 |
+
|
47 |
+
/**
|
48 |
+
* Current handle.
|
49 |
+
*
|
50 |
+
* @var string
|
51 |
+
*/
|
52 |
+
protected $current_handle;
|
53 |
+
|
54 |
+
/**
|
55 |
+
* Current handle type.
|
56 |
+
*
|
57 |
+
* @var string 'css' or 'js'.
|
58 |
+
*/
|
59 |
+
protected $current_handle_type;
|
60 |
+
|
61 |
+
/**
|
62 |
+
* Array of scripts that should be localized when they are enqueued.
|
63 |
+
*
|
64 |
+
* @var array
|
65 |
+
*/
|
66 |
+
protected $deferred_localizations = array();
|
67 |
+
|
68 |
+
/**
|
69 |
+
* A "random" script version to use when debug is on.
|
70 |
+
*
|
71 |
+
* @var int
|
72 |
+
*/
|
73 |
+
protected static $version;
|
74 |
+
|
75 |
+
/**
|
76 |
+
* The single instance of the class.
|
77 |
+
*
|
78 |
+
* @var object
|
79 |
+
*/
|
80 |
+
protected static $_instance;
|
81 |
+
|
82 |
+
/**
|
83 |
+
* The constructor.
|
84 |
+
*
|
85 |
+
* @return void
|
86 |
+
*/
|
87 |
+
protected function __construct() {
|
88 |
+
if ( ! isset( self::$version ) ) {
|
89 |
+
self::$version = time();
|
90 |
+
}
|
91 |
+
}
|
92 |
+
|
93 |
+
|
94 |
+
/** ----------------------------------------------------------------------------------------- */
|
95 |
+
/** PUBLIC METHODS ========================================================================== */
|
96 |
+
/** ----------------------------------------------------------------------------------------- */
|
97 |
+
|
98 |
+
/**
|
99 |
+
* Get the main Instance.
|
100 |
+
*
|
101 |
+
* @since 1.6.10
|
102 |
+
* @author Grégory Viguier
|
103 |
+
*
|
104 |
+
* @return object Main instance.
|
105 |
+
*/
|
106 |
+
public static function get_instance() {
|
107 |
+
if ( ! isset( self::$_instance ) ) {
|
108 |
+
self::$_instance = new self();
|
109 |
+
}
|
110 |
+
|
111 |
+
return self::$_instance;
|
112 |
+
}
|
113 |
+
|
114 |
+
/**
|
115 |
+
* Launch the hooks.
|
116 |
+
*
|
117 |
+
* @since 1.6.10
|
118 |
+
* @author Grégory Viguier
|
119 |
+
*/
|
120 |
+
public function init() {
|
121 |
+
if ( ! is_admin() ) {
|
122 |
+
add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_styles_and_scripts_frontend' ) );
|
123 |
+
return;
|
124 |
+
}
|
125 |
+
|
126 |
+
add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_styles_and_scripts' ) );
|
127 |
+
add_action( 'wp_enqueue_media', array( $this, 'enqueue_media_modal' ) );
|
128 |
+
|
129 |
+
add_action( 'admin_footer-media_page_imagify-bulk-optimization', array( $this, 'print_support_script' ) );
|
130 |
+
add_action( 'admin_footer-settings_page_imagify', array( $this, 'print_support_script' ) );
|
131 |
+
}
|
132 |
+
|
133 |
+
/**
|
134 |
+
* Enqueue stylesheets and scripts for the frontend.
|
135 |
+
*
|
136 |
+
* @since 1.6.10
|
137 |
+
* @author Grégory Viguier
|
138 |
+
*/
|
139 |
+
public function enqueue_styles_and_scripts_frontend() {
|
140 |
+
if ( ! $this->is_admin_bar_item_showing() ) {
|
141 |
+
return;
|
142 |
+
}
|
143 |
+
|
144 |
+
$this->register_style( 'admin-bar' );
|
145 |
+
$this->register_script( 'admin-bar', 'admin-bar', array( 'jquery' ) );
|
146 |
+
|
147 |
+
$this->enqueue_assets( 'admin-bar' )->localize( 'imagifyAdminBar' );
|
148 |
+
}
|
149 |
+
|
150 |
+
/**
|
151 |
+
* Register stylesheets and scripts for the administration area.
|
152 |
+
*
|
153 |
+
* @since 1.6.10
|
154 |
+
* @author Grégory Viguier
|
155 |
+
*/
|
156 |
+
public function register_styles_and_scripts() {
|
157 |
+
static $done = false;
|
158 |
+
|
159 |
+
if ( $done ) {
|
160 |
+
return;
|
161 |
+
}
|
162 |
+
$done = true;
|
163 |
+
|
164 |
+
/**
|
165 |
+
* 3rd Party Styles.
|
166 |
+
*/
|
167 |
+
$this->register_style( 'sweetalert-core', 'sweetalert2', array(), '4.6.6' );
|
168 |
+
|
169 |
+
/**
|
170 |
+
* Imagify Styles.
|
171 |
+
*/
|
172 |
+
$this->register_style( 'sweetalert', 'sweetalert-custom', array( 'sweetalert-core' ) );
|
173 |
+
|
174 |
+
$this->register_style( 'admin-bar' );
|
175 |
+
|
176 |
+
$this->register_style( 'admin' );
|
177 |
+
|
178 |
+
$this->register_style( 'notices', 'notices', array( 'admin' ) ); // Needs SweetAlert on some cases.
|
179 |
+
|
180 |
+
$this->register_style( 'twentytwenty', 'twentytwenty', array( 'admin' ) );
|
181 |
+
|
182 |
+
$this->register_style( 'pricing-modal', 'pricing-modal', array( 'admin' ) );
|
183 |
+
|
184 |
+
$this->register_style( 'bulk', 'bulk', array( 'sweetalert', 'admin' ) );
|
185 |
+
|
186 |
+
$this->register_style( 'options', 'options', array( 'sweetalert', 'admin' ) );
|
187 |
+
|
188 |
+
/**
|
189 |
+
* 3rd Party Scripts.
|
190 |
+
*/
|
191 |
+
$this->register_script( 'promise-polyfill', 'es6-promise.auto', array(), '4.1.1' );
|
192 |
+
|
193 |
+
$this->register_script( 'sweetalert', 'sweetalert2', array( 'promise-polyfill' ), '4.6.6' )->localize( 'imagifySwal' );
|
194 |
+
|
195 |
+
$this->register_script( 'chart', 'chart', array(), '1.0.2' );
|
196 |
+
|
197 |
+
$this->register_script( 'event-move', 'jquery.event.move', array( 'jquery' ), '2.0.1' );
|
198 |
+
|
199 |
+
/**
|
200 |
+
* Imagify Scripts.
|
201 |
+
*/
|
202 |
+
$this->register_script( 'admin-bar', 'admin-bar', array( 'jquery' ) )->defer_localization( 'imagifyAdminBar' );
|
203 |
+
|
204 |
+
$this->register_script( 'admin', 'admin', array( 'jquery' ) );
|
205 |
+
|
206 |
+
$this->register_script( 'notices', 'notices', array( 'jquery', 'admin' ) )->defer_localization( 'imagifyNotices' ); // Needs SweetAlert on some cases.
|
207 |
+
|
208 |
+
$this->register_script( 'twentytwenty', 'jquery.twentytwenty', array( 'jquery', 'event-move', 'chart', 'admin' ) )->defer_localization( 'imagifyTTT' );
|
209 |
+
|
210 |
+
$this->register_script( 'media-modal', 'media-modal', array( 'jquery', 'chart', 'admin' ) );
|
211 |
+
|
212 |
+
$this->register_script( 'pricing-modal', 'pricing-modal', array( 'jquery', 'admin' ) )->defer_localization( 'imagifyPricingModal' );
|
213 |
+
|
214 |
+
$this->register_script( 'library', 'library', array( 'jquery', 'media-modal' ) )->defer_localization( 'imagifyLibrary' );
|
215 |
+
|
216 |
+
$this->register_script( 'async', 'imagify-gulp', array(), '2017-07-28' );
|
217 |
+
|
218 |
+
$this->register_script( 'bulk', 'bulk', array( 'jquery', 'heartbeat', 'chart', 'sweetalert', 'async', 'admin' ) )->defer_localization( 'imagifyBulk' );
|
219 |
+
|
220 |
+
$this->register_script( 'options', 'options', array( 'jquery', 'sweetalert', 'admin' ) )->defer_localization( 'imagifyOptions' );
|
221 |
+
}
|
222 |
+
|
223 |
+
/**
|
224 |
+
* Enqueue stylesheets and scripts for the administration area.
|
225 |
+
*
|
226 |
+
* @since 1.6.10
|
227 |
+
* @author Grégory Viguier
|
228 |
+
*/
|
229 |
+
public function enqueue_styles_and_scripts() {
|
230 |
+
static $done = false;
|
231 |
+
|
232 |
+
if ( $done ) {
|
233 |
+
return;
|
234 |
+
}
|
235 |
+
$done = true;
|
236 |
+
|
237 |
+
/*
|
238 |
+
* Register stylesheets and scripts.
|
239 |
+
*/
|
240 |
+
$this->register_styles_and_scripts();
|
241 |
+
|
242 |
+
/**
|
243 |
+
* Admin bar.
|
244 |
+
*/
|
245 |
+
if ( $this->is_admin_bar_item_showing() ) {
|
246 |
+
$this->enqueue_assets( 'admin-bar' );
|
247 |
+
}
|
248 |
+
|
249 |
+
/**
|
250 |
+
* Notices.
|
251 |
+
*/
|
252 |
+
$notices = Imagify_Notices::get_instance();
|
253 |
+
|
254 |
+
if ( $notices->has_notices() ) {
|
255 |
+
if ( $notices->display_welcome_steps() || $notices->display_wrong_api_key() ) {
|
256 |
+
// This is where we display things about the API key.
|
257 |
+
$this->enqueue_assets( 'sweetalert' );
|
258 |
+
}
|
259 |
+
|
260 |
+
$this->enqueue_assets( 'notices' );
|
261 |
+
}
|
262 |
+
|
263 |
+
/**
|
264 |
+
* Loaded in the library and attachment edition.
|
265 |
+
*/
|
266 |
+
if ( imagify_is_screen( 'library' ) || imagify_is_screen( 'attachment' ) ) {
|
267 |
+
$this->enqueue_assets( 'twentytwenty' );
|
268 |
+
}
|
269 |
+
|
270 |
+
/**
|
271 |
+
* Loaded in the library.
|
272 |
+
*/
|
273 |
+
if ( imagify_is_screen( 'library' ) ) {
|
274 |
+
$this->enqueue_style( 'admin' )->enqueue_script( 'library' );
|
275 |
+
}
|
276 |
+
|
277 |
+
/**
|
278 |
+
* Loaded in the bulk optimization page.
|
279 |
+
*/
|
280 |
+
if ( imagify_is_screen( 'bulk' ) ) {
|
281 |
+
$this->enqueue_assets( array( 'pricing-modal', 'bulk' ) );
|
282 |
+
}
|
283 |
+
|
284 |
+
/*
|
285 |
+
* Loaded in settings page.
|
286 |
+
*/
|
287 |
+
if ( imagify_is_screen( 'imagify-settings' ) ) {
|
288 |
+
$this->enqueue_assets( array( 'sweetalert', 'notices', 'twentytwenty', 'pricing-modal', 'options' ) );
|
289 |
+
}
|
290 |
+
|
291 |
+
/**
|
292 |
+
* Triggered after Imagify CSS and JS have been enqueued.
|
293 |
+
*
|
294 |
+
* @since 1.6.10
|
295 |
+
* @author Grégory Viguier
|
296 |
+
*/
|
297 |
+
do_action( 'imagify_assets_enqueued' );
|
298 |
+
}
|
299 |
+
|
300 |
+
/**
|
301 |
+
* Enqueue stylesheets and scripts for the media modal.
|
302 |
+
*
|
303 |
+
* @since 1.6.10
|
304 |
+
* @author Grégory Viguier
|
305 |
+
*/
|
306 |
+
public function enqueue_media_modal() {
|
307 |
+
static $done = false;
|
308 |
+
|
309 |
+
if ( $done ) {
|
310 |
+
return;
|
311 |
+
}
|
312 |
+
$done = true;
|
313 |
+
|
314 |
+
/*
|
315 |
+
* Register stylesheets and scripts.
|
316 |
+
*/
|
317 |
+
$this->register_styles_and_scripts();
|
318 |
+
|
319 |
+
$this->enqueue_style( 'admin' )->enqueue_script( 'media-modal' );
|
320 |
+
|
321 |
+
/**
|
322 |
+
* Triggered after Imagify CSS and JS have been enqueued for the media modal.
|
323 |
+
*
|
324 |
+
* @since 1.6.10
|
325 |
+
* @author Grégory Viguier
|
326 |
+
*/
|
327 |
+
do_action( 'imagify_media_modal_assets_enqueued' );
|
328 |
+
}
|
329 |
+
|
330 |
+
/**
|
331 |
+
* Add Intercom on Options page an Bulk Optimization.
|
332 |
+
* Previously was _imagify_admin_print_intercom()
|
333 |
+
*
|
334 |
+
* @since 1.6.10
|
335 |
+
* @author Grégory Viguier
|
336 |
+
*/
|
337 |
+
public function print_support_script() {
|
338 |
+
if ( ! imagify_valid_key() ) {
|
339 |
+
return;
|
340 |
+
}
|
341 |
+
|
342 |
+
$user = get_imagify_user();
|
343 |
+
|
344 |
+
if ( empty( $user->is_intercom ) || false === $user->display_support ) {
|
345 |
+
return;
|
346 |
+
}
|
347 |
+
?>
|
348 |
+
<script>
|
349 |
+
window.intercomSettings = {
|
350 |
+
app_id: 'cd6nxj3z',
|
351 |
+
user_id: <?php echo (int) $user->id; ?>
|
352 |
+
};
|
353 |
+
(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);}}})()
|
354 |
+
</script>
|
355 |
+
<?php
|
356 |
+
}
|
357 |
+
|
358 |
+
|
359 |
+
/** ----------------------------------------------------------------------------------------- */
|
360 |
+
/** PUBLIC TOOLS ============================================================================ */
|
361 |
+
/** ----------------------------------------------------------------------------------------- */
|
362 |
+
|
363 |
+
/**
|
364 |
+
* Register a style.
|
365 |
+
*
|
366 |
+
* @since 1.6.10
|
367 |
+
* @author Grégory Viguier
|
368 |
+
*
|
369 |
+
* @param string $handle Name of the stylesheet. Should be unique.
|
370 |
+
* @param string|null $file_name The file name, without the extension. If null, $handle is used.
|
371 |
+
* @param array $dependencies An array of registered stylesheet handles this stylesheet depends on.
|
372 |
+
* @param string|null $version String specifying stylesheet version number. If set to null, the plugin version is used. If SCRIPT_DEBUG is true, a random string is used.
|
373 |
+
* @return object This class instance.
|
374 |
+
*/
|
375 |
+
public function register_style( $handle, $file_name = null, $dependencies = array(), $version = null ) {
|
376 |
+
// If we register it, it's one of our styles.
|
377 |
+
$this->styles[ $handle ] = 1;
|
378 |
+
$this->current_handle = $handle;
|
379 |
+
$this->current_handle_type = 'css';
|
380 |
+
|
381 |
+
$file_name = $file_name ? $file_name : $handle;
|
382 |
+
$version = $version ? $version : IMAGIFY_VERSION;
|
383 |
+
$version = $this->is_debug() ? self::$version : $version;
|
384 |
+
$extension = $this->is_debug() ? '.css' : '.min.css';
|
385 |
+
$handle = self::CSS_PREFIX . $handle;
|
386 |
+
$dependencies = $this->prefix_dependencies( $dependencies, 'css' );
|
387 |
+
|
388 |
+
wp_register_style(
|
389 |
+
$handle,
|
390 |
+
IMAGIFY_ASSETS_CSS_URL . $file_name . $extension,
|
391 |
+
$dependencies,
|
392 |
+
$version
|
393 |
+
);
|
394 |
+
|
395 |
+
return $this;
|
396 |
+
}
|
397 |
+
|
398 |
+
/**
|
399 |
+
* Enqueue a style.
|
400 |
+
*
|
401 |
+
* @since 1.6.10
|
402 |
+
* @author Grégory Viguier
|
403 |
+
*
|
404 |
+
* @param string|array $handles Name of the stylesheet. Should be unique. Can be an array to enqueue several stylesheets.
|
405 |
+
* @return object This class instance.
|
406 |
+
*/
|
407 |
+
public function enqueue_style( $handles ) {
|
408 |
+
$handles = (array) $handles;
|
409 |
+
|
410 |
+
foreach ( $handles as $handle ) {
|
411 |
+
$this->current_handle = $handle;
|
412 |
+
$this->current_handle_type = 'css';
|
413 |
+
|
414 |
+
if ( ! empty( $this->styles[ $handle ] ) ) {
|
415 |
+
// If we registered it, it's one of our styles.
|
416 |
+
$handle = self::CSS_PREFIX . $handle;
|
417 |
+
}
|
418 |
+
|
419 |
+
wp_enqueue_style( $handle );
|
420 |
+
}
|
421 |
+
|
422 |
+
return $this;
|
423 |
+
}
|
424 |
+
|
425 |
+
/**
|
426 |
+
* Dequeue a style.
|
427 |
+
*
|
428 |
+
* @since 1.6.10
|
429 |
+
* @author Grégory Viguier
|
430 |
+
*
|
431 |
+
* @param string|array $handles Name of the stylesheet. Should be unique. Can be an array to dequeue several stylesheets.
|
432 |
+
* @return object This class instance.
|
433 |
+
*/
|
434 |
+
public function dequeue_style( $handles ) {
|
435 |
+
$handles = (array) $handles;
|
436 |
+
|
437 |
+
foreach ( $handles as $handle ) {
|
438 |
+
$this->current_handle = $handle;
|
439 |
+
$this->current_handle_type = 'css';
|
440 |
+
|
441 |
+
if ( ! empty( $this->styles[ $handle ] ) ) {
|
442 |
+
// If we registered it, it's one of our styles.
|
443 |
+
$handle = self::CSS_PREFIX . $handle;
|
444 |
+
}
|
445 |
+
|
446 |
+
wp_dequeue_style( $handle );
|
447 |
+
}
|
448 |
+
|
449 |
+
return $this;
|
450 |
+
}
|
451 |
+
|
452 |
+
/**
|
453 |
+
* Register a script.
|
454 |
+
*
|
455 |
+
* @since 1.6.10
|
456 |
+
* @author Grégory Viguier
|
457 |
+
*
|
458 |
+
* @param string $handle Name of the script. Should be unique.
|
459 |
+
* @param string|null $file_name The file name, without the extension. If null, $handle is used.
|
460 |
+
* @param array $dependencies An array of registered script handles this script depends on.
|
461 |
+
* @param string|null $version String specifying script version number. If set to null, the plugin version is used. If SCRIPT_DEBUG is true, a random string is used.
|
462 |
+
* @return object This class instance.
|
463 |
+
*/
|
464 |
+
public function register_script( $handle, $file_name = null, $dependencies = array(), $version = null ) {
|
465 |
+
// If we register it, it's one of our scripts.
|
466 |
+
$this->scripts[ $handle ] = 1;
|
467 |
+
// Set the current handler and handler type.
|
468 |
+
$this->current_handle = $handle;
|
469 |
+
$this->current_handle_type = 'js';
|
470 |
+
|
471 |
+
$file_name = $file_name ? $file_name : $handle;
|
472 |
+
$version = $version ? $version : IMAGIFY_VERSION;
|
473 |
+
$version = $this->is_debug() ? self::$version : $version;
|
474 |
+
$extension = $this->is_debug() ? '.js' : '.min.js';
|
475 |
+
$handle = self::JS_PREFIX . $handle;
|
476 |
+
$dependencies = $this->prefix_dependencies( $dependencies );
|
477 |
+
|
478 |
+
wp_register_script(
|
479 |
+
$handle,
|
480 |
+
IMAGIFY_ASSETS_JS_URL . $file_name . $extension,
|
481 |
+
$dependencies,
|
482 |
+
$version,
|
483 |
+
true
|
484 |
+
);
|
485 |
+
|
486 |
+
return $this;
|
487 |
+
}
|
488 |
+
|
489 |
+
/**
|
490 |
+
* Enqueue a script.
|
491 |
+
*
|
492 |
+
* @since 1.6.10
|
493 |
+
* @author Grégory Viguier
|
494 |
+
*
|
495 |
+
* @param string|array $handles Name of the script. Should be unique. Can be an array to enqueue several scripts.
|
496 |
+
* @return object This class instance.
|
497 |
+
*/
|
498 |
+
public function enqueue_script( $handles ) {
|
499 |
+
$handles = (array) $handles;
|
500 |
+
|
501 |
+
foreach ( $handles as $handle ) {
|
502 |
+
// Enqueue the corresponding style.
|
503 |
+
if ( ! empty( $this->styles[ $handle ] ) ) {
|
504 |
+
$this->enqueue_style( $handle );
|
505 |
+
}
|
506 |
+
|
507 |
+
$this->current_handle = $handle;
|
508 |
+
$this->current_handle_type = 'js';
|
509 |
+
|
510 |
+
if ( ! empty( $this->scripts[ $handle ] ) ) {
|
511 |
+
// If we registered it, it's one of our scripts.
|
512 |
+
$handle = self::JS_PREFIX . $handle;
|
513 |
+
}
|
514 |
+
|
515 |
+
wp_enqueue_script( $handle );
|
516 |
+
|
517 |
+
// Deferred localization.
|
518 |
+
if ( ! empty( $this->deferred_localizations[ $this->current_handle ] ) ) {
|
519 |
+
array_map( array( $this, 'localize' ), $this->deferred_localizations[ $this->current_handle ] );
|
520 |
+
unset( $this->deferred_localizations[ $this->current_handle ] );
|
521 |
+
}
|
522 |
+
}
|
523 |
+
|
524 |
+
return $this;
|
525 |
+
}
|
526 |
+
|
527 |
+
/**
|
528 |
+
* Dequeue a script.
|
529 |
+
*
|
530 |
+
* @since 1.6.10
|
531 |
+
* @author Grégory Viguier
|
532 |
+
*
|
533 |
+
* @param string|array $handles Name of the script. Should be unique. Can be an array to dequeue several scripts.
|
534 |
+
* @return object This class instance.
|
535 |
+
*/
|
536 |
+
public function dequeue_script( $handles ) {
|
537 |
+
$handles = (array) $handles;
|
538 |
+
|
539 |
+
foreach ( $handles as $handle ) {
|
540 |
+
// Enqueue the corresponding style.
|
541 |
+
if ( ! empty( $this->styles[ $handle ] ) ) {
|
542 |
+
$this->dequeue_style( $handle );
|
543 |
+
}
|
544 |
+
|
545 |
+
$this->current_handle = $handle;
|
546 |
+
$this->current_handle_type = 'js';
|
547 |
+
|
548 |
+
if ( ! empty( $this->scripts[ $handle ] ) ) {
|
549 |
+
// If we registered it, it's one of our scripts.
|
550 |
+
$handle = self::JS_PREFIX . $handle;
|
551 |
+
}
|
552 |
+
|
553 |
+
wp_dequeue_script( $handle );
|
554 |
+
}
|
555 |
+
|
556 |
+
return $this;
|
557 |
+
}
|
558 |
+
|
559 |
+
/**
|
560 |
+
* Localize a script.
|
561 |
+
*
|
562 |
+
* @since 1.6.10
|
563 |
+
* @author Grégory Viguier
|
564 |
+
*
|
565 |
+
* @param string $handle Name of the script. Should be unique.
|
566 |
+
* @param string $object_name Name for the JavaScript object. Passed directly, so it should be qualified JS variable. Example: '/[a-zA-Z0-9_]+/'.
|
567 |
+
* @param string|array|null $l10n The data itself. The data can be either a single or multi-dimensional array. If null, $handle is used.
|
568 |
+
* @return object This class instance.
|
569 |
+
*/
|
570 |
+
public function localize_script( $handle, $object_name, $l10n = null ) {
|
571 |
+
$this->current_handle = $handle;
|
572 |
+
$this->current_handle_type = 'js';
|
573 |
+
|
574 |
+
if ( ! isset( $l10n ) ) {
|
575 |
+
$l10n = $handle;
|
576 |
+
}
|
577 |
+
|
578 |
+
if ( is_string( $l10n ) ) {
|
579 |
+
$l10n = $this->get_localization_data( $l10n );
|
580 |
+
}
|
581 |
+
|
582 |
+
if ( ! $l10n ) {
|
583 |
+
return $this;
|
584 |
+
}
|
585 |
+
|
586 |
+
if ( ! empty( $this->scripts[ $handle ] ) ) {
|
587 |
+
// If we registered it, it's one of our scripts.
|
588 |
+
$handle = self::JS_PREFIX . $handle;
|
589 |
+
}
|
590 |
+
|
591 |
+
wp_localize_script( $handle, $object_name, $l10n );
|
592 |
+
|
593 |
+
return $this;
|
594 |
+
}
|
595 |
+
|
596 |
+
/**
|
597 |
+
* Enqueue a style and a script that have the same handle.
|
598 |
+
*
|
599 |
+
* @since 1.6.10
|
600 |
+
* @author Grégory Viguier
|
601 |
+
*
|
602 |
+
* @param string|array $handles Name of the script. Should be unique. Can be an array to enqueue several scripts.
|
603 |
+
* @return object This class instance.
|
604 |
+
*/
|
605 |
+
public function enqueue_assets( $handles ) {
|
606 |
+
$handles = (array) $handles;
|
607 |
+
|
608 |
+
foreach ( $handles as $handle ) {
|
609 |
+
$this->enqueue_style( $handle );
|
610 |
+
$this->enqueue_script( $handle );
|
611 |
+
}
|
612 |
+
|
613 |
+
return $this;
|
614 |
+
}
|
615 |
+
|
616 |
+
/**
|
617 |
+
* Dequeue a style and a script that have the same handle.
|
618 |
+
*
|
619 |
+
* @since 1.6.10
|
620 |
+
* @author Grégory Viguier
|
621 |
+
*
|
622 |
+
* @param string|array $handles Name of the script. Should be unique. Can be an array to dequeue several scripts.
|
623 |
+
* @return object This class instance.
|
624 |
+
*/
|
625 |
+
public function dequeue_assets( $handles ) {
|
626 |
+
$handles = (array) $handles;
|
627 |
+
|
628 |
+
foreach ( $handles as $handle ) {
|
629 |
+
$this->dequeue_style( $handle );
|
630 |
+
$this->dequeue_script( $handle );
|
631 |
+
}
|
632 |
+
|
633 |
+
return $this;
|
634 |
+
}
|
635 |
+
|
636 |
+
/**
|
637 |
+
* Enqueue the current script or style.
|
638 |
+
*
|
639 |
+
* @since 1.6.10
|
640 |
+
* @author Grégory Viguier
|
641 |
+
*
|
642 |
+
* @return object This class instance.
|
643 |
+
*/
|
644 |
+
public function enqueue() {
|
645 |
+
if ( 'js' === $this->current_handle_type ) {
|
646 |
+
$this->enqueue_script( $this->current_handle );
|
647 |
+
} elseif ( 'css' === $this->current_handle_type ) {
|
648 |
+
$this->enqueue_style( $this->current_handle );
|
649 |
+
}
|
650 |
+
|
651 |
+
return $this;
|
652 |
+
}
|
653 |
+
|
654 |
+
/**
|
655 |
+
* Localize the current script.
|
656 |
+
*
|
657 |
+
* @since 1.6.10
|
658 |
+
* @author Grégory Viguier
|
659 |
+
*
|
660 |
+
* @param string $object_name Name for the JavaScript object. Passed directly, so it should be qualified JS variable. Example: '/[a-zA-Z0-9_]+/'.
|
661 |
+
* @param string|array|null $l10n The data itself. The data can be either a single or multi-dimensional array. If null, $handle is used.
|
662 |
+
* @return object This class instance.
|
663 |
+
*/
|
664 |
+
public function localize( $object_name, $l10n = null ) {
|
665 |
+
return $this->localize_script( $this->current_handle, $object_name, $l10n );
|
666 |
+
}
|
667 |
+
|
668 |
+
/**
|
669 |
+
* Localize the current script when it is enqueued with `$this->enqueue()` or `$this->enqueue_script()`. This should be used right after `$this->register_script()`.
|
670 |
+
* Be careful, it won't work if the script is enqueued because it's a dependency.
|
671 |
+
* This is handy to not forget to localize the script later. It also prevents to localize the script right away, and maybe execute all localizations while the script is not enqueued (so we localize for nothing).
|
672 |
+
*
|
673 |
+
* @since 1.6.10
|
674 |
+
* @author Grégory Viguier
|
675 |
+
*
|
676 |
+
* @param string $object_name Name for the JavaScript object. Passed directly, so it should be qualified JS variable. Example: '/[a-zA-Z0-9_]+/'.
|
677 |
+
* @return object This class instance.
|
678 |
+
*/
|
679 |
+
public function defer_localization( $object_name ) {
|
680 |
+
if ( ! isset( $this->deferred_localizations[ $this->current_handle ] ) ) {
|
681 |
+
$this->deferred_localizations[ $this->current_handle ] = array();
|
682 |
+
}
|
683 |
+
|
684 |
+
$this->deferred_localizations[ $this->current_handle ][ $object_name ] = $object_name;
|
685 |
+
|
686 |
+
return $this;
|
687 |
+
}
|
688 |
+
|
689 |
+
/**
|
690 |
+
* Remove a deferred localization.
|
691 |
+
*
|
692 |
+
* @since 1.6.10
|
693 |
+
* @author Grégory Viguier
|
694 |
+
*
|
695 |
+
* @param string $handle Name of the script. Should be unique.
|
696 |
+
* @param string $object_name Name for the JavaScript object. Passed directly, so it should be qualified JS variable. Example: '/[a-zA-Z0-9_]+/'.
|
697 |
+
* @return object This class instance.
|
698 |
+
*/
|
699 |
+
public function remove_deferred_localization( $handle, $object_name = null ) {
|
700 |
+
if ( empty( $this->deferred_localizations[ $handle ] ) ) {
|
701 |
+
return $this;
|
702 |
+
}
|
703 |
+
|
704 |
+
if ( $object_name ) {
|
705 |
+
unset( $this->deferred_localizations[ $handle ][ $object_name ] );
|
706 |
+
} else {
|
707 |
+
unset( $this->deferred_localizations[ $handle ] );
|
708 |
+
}
|
709 |
+
|
710 |
+
return $this;
|
711 |
+
}
|
712 |
+
|
713 |
+
/**
|
714 |
+
* Get all translations we can use with wp_localize_script().
|
715 |
+
*
|
716 |
+
* @since 1.6.10
|
717 |
+
* @author Grégory Viguier
|
718 |
+
*
|
719 |
+
* @param string $context The translation context.
|
720 |
+
* @param array $more_data More data to merge.
|
721 |
+
* @return array $translations The translations.
|
722 |
+
*/
|
723 |
+
public function get_localization_data( $context, $more_data = array() ) {
|
724 |
+
$data = get_imagify_localize_script_translations( $context );
|
725 |
+
|
726 |
+
if ( $more_data ) {
|
727 |
+
return array_merge( $data, $more_data );
|
728 |
+
}
|
729 |
+
|
730 |
+
return $data;
|
731 |
+
}
|
732 |
+
|
733 |
+
|
734 |
+
/** ----------------------------------------------------------------------------------------- */
|
735 |
+
/** INTERNAL TOOLS ========================================================================== */
|
736 |
+
/** ----------------------------------------------------------------------------------------- */
|
737 |
+
|
738 |
+
/**
|
739 |
+
* Prefix the dependencies if they are ours.
|
740 |
+
*
|
741 |
+
* @since 1.6.10
|
742 |
+
* @author Grégory Viguier
|
743 |
+
*
|
744 |
+
* @param array $dependencies An array of registered script handles this script depends on.
|
745 |
+
* @param string $type Type of dependency: css or js.
|
746 |
+
* @return array
|
747 |
+
*/
|
748 |
+
protected function prefix_dependencies( $dependencies, $type = 'js' ) {
|
749 |
+
if ( ! $dependencies ) {
|
750 |
+
return array();
|
751 |
+
}
|
752 |
+
|
753 |
+
if ( 'js' === $type ) {
|
754 |
+
$prefix = self::JS_PREFIX;
|
755 |
+
$scripts = $this->scripts;
|
756 |
+
} else {
|
757 |
+
$prefix = self::CSS_PREFIX;
|
758 |
+
$scripts = $this->styles;
|
759 |
+
}
|
760 |
+
|
761 |
+
$depts = array();
|
762 |
+
|
763 |
+
foreach ( $dependencies as $dept ) {
|
764 |
+
if ( ! empty( $scripts[ $dept ] ) ) {
|
765 |
+
$depts[] = $prefix . $dept;
|
766 |
+
} else {
|
767 |
+
$depts[] = $dept;
|
768 |
+
}
|
769 |
+
}
|
770 |
+
|
771 |
+
return $depts;
|
772 |
+
}
|
773 |
+
|
774 |
+
/**
|
775 |
+
* Tell if debug is on.
|
776 |
+
*
|
777 |
+
* @since 1.6.10
|
778 |
+
* @author Grégory Viguier
|
779 |
+
*
|
780 |
+
* @return bool
|
781 |
+
*/
|
782 |
+
protected function is_debug() {
|
783 |
+
return defined( 'IMAGIFY_DEBUG' ) && IMAGIFY_DEBUG || defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG;
|
784 |
+
}
|
785 |
+
|
786 |
+
/**
|
787 |
+
* Tell if the admin bar item is displaying.
|
788 |
+
*
|
789 |
+
* @since 1.6.10
|
790 |
+
* @author Grégory Viguier
|
791 |
+
*
|
792 |
+
* @return bool
|
793 |
+
*/
|
794 |
+
protected function is_admin_bar_item_showing() {
|
795 |
+
if ( defined( 'IMAGIFY_HIDDEN_ACCOUNT' ) && IMAGIFY_HIDDEN_ACCOUNT ) {
|
796 |
+
return false;
|
797 |
+
}
|
798 |
+
|
799 |
+
$has_api_key = ( defined( 'IMAGIFY_API_KEY' ) && IMAGIFY_API_KEY ) || get_imagify_option( 'api_key' );
|
800 |
+
|
801 |
+
return $has_api_key && is_admin_bar_showing() && current_user_can( imagify_get_capacity() ) && get_imagify_option( 'admin_bar_menu' );
|
802 |
+
}
|
803 |
+
}
|
inc/classes/class-imagify-attachment.php
CHANGED
@@ -13,7 +13,17 @@ class Imagify_Attachment extends Imagify_Abstract_Attachment {
|
|
13 |
*
|
14 |
* @var string
|
15 |
*/
|
16 |
-
const VERSION = '1.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
17 |
|
18 |
/**
|
19 |
* Get the attachment backup file path.
|
@@ -194,6 +204,114 @@ class Imagify_Attachment extends Imagify_Abstract_Attachment {
|
|
194 |
return $data;
|
195 |
}
|
196 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
197 |
/**
|
198 |
* Optimize all sizes with Imagify.
|
199 |
*
|
@@ -293,9 +411,14 @@ class Imagify_Attachment extends Imagify_Abstract_Attachment {
|
|
293 |
|
294 |
// Optimize all thumbnails.
|
295 |
if ( $sizes ) {
|
|
|
|
|
|
|
|
|
|
|
296 |
foreach ( $sizes as $size_key => $size_data ) {
|
297 |
// Check if this size has to be optimized.
|
298 |
-
if (
|
299 |
$data['sizes'][ $size_key ] = array(
|
300 |
'success' => false,
|
301 |
'error' => __( 'This size isn\'t authorized to be optimized. Update your Imagify settings if you want to optimize it.', 'imagify' ),
|
@@ -303,8 +426,8 @@ class Imagify_Attachment extends Imagify_Abstract_Attachment {
|
|
303 |
continue;
|
304 |
}
|
305 |
|
306 |
-
$thumbnail_path =
|
307 |
-
$thumbnail_url =
|
308 |
|
309 |
// Optimize the thumbnail size.
|
310 |
$response = do_imagify( $thumbnail_path, array(
|
@@ -347,7 +470,7 @@ class Imagify_Attachment extends Imagify_Abstract_Attachment {
|
|
347 |
*
|
348 |
* @param int $id The attachment ID.
|
349 |
* @param array $optimized_data The optimization data.
|
350 |
-
|
351 |
do_action( 'after_imagify_optimize_attachment', $this->id, $optimized_data );
|
352 |
|
353 |
delete_transient( 'imagify-async-in-progress-' . $this->id );
|
@@ -355,6 +478,113 @@ class Imagify_Attachment extends Imagify_Abstract_Attachment {
|
|
355 |
return $optimized_data;
|
356 |
}
|
357 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
358 |
/**
|
359 |
* Process an attachment restoration from the backup file.
|
360 |
*
|
@@ -395,7 +625,7 @@ class Imagify_Attachment extends Imagify_Abstract_Attachment {
|
|
395 |
require_once( ABSPATH . 'wp-admin/includes/image.php' );
|
396 |
}
|
397 |
|
398 |
-
remove_filter( 'wp_generate_attachment_metadata', '_imagify_optimize_attachment',
|
399 |
wp_generate_attachment_metadata( $this->id, $attachment_path );
|
400 |
|
401 |
// Remove old optimization data.
|
13 |
*
|
14 |
* @var string
|
15 |
*/
|
16 |
+
const VERSION = '1.1';
|
17 |
+
|
18 |
+
/**
|
19 |
+
* The editor instance used to resize files.
|
20 |
+
*
|
21 |
+
* @since 1.6.10
|
22 |
+
*
|
23 |
+
* @var object
|
24 |
+
* @access protected
|
25 |
+
*/
|
26 |
+
protected $editor;
|
27 |
|
28 |
/**
|
29 |
* Get the attachment backup file path.
|
204 |
return $data;
|
205 |
}
|
206 |
|
207 |
+
/**
|
208 |
+
* Create a thumbnail if it doesn't exist.
|
209 |
+
*
|
210 |
+
* @since 1.6.10
|
211 |
+
* @access protected
|
212 |
+
* @author Grégory Viguier
|
213 |
+
*
|
214 |
+
* @param array $thumbnail_data The thumbnail data (width, height, crop, name, file).
|
215 |
+
* @return bool|array|object True if the file exists. An array of thumbnail data if the file has just been created (width, height, crop, file). A WP_Error object on error.
|
216 |
+
*/
|
217 |
+
protected function create_thumbnail( $thumbnail_data ) {
|
218 |
+
$thumbnail_size = $thumbnail_data['name'];
|
219 |
+
$metadata = wp_get_attachment_metadata( $this->id );
|
220 |
+
$metadata_sizes = ! empty( $metadata['sizes'] ) && is_array( $metadata['sizes'] ) ? $metadata['sizes'] : array();
|
221 |
+
|
222 |
+
$original_dirname = trailingslashit( dirname( $this->get_original_path() ) );
|
223 |
+
$thumbnail_path = $original_dirname . $thumbnail_data['file'];
|
224 |
+
|
225 |
+
if ( ! empty( $metadata_sizes[ $thumbnail_size ] ) && $filesystem->exists( $thumbnail_path ) ) {
|
226 |
+
imagify_chmod_file( $thumbnail_path );
|
227 |
+
return true;
|
228 |
+
}
|
229 |
+
|
230 |
+
// Get the editor.
|
231 |
+
if ( ! isset( $this->editor ) ) {
|
232 |
+
$this->editor = wp_get_image_editor( $this->get_backup_path() );
|
233 |
+
}
|
234 |
+
|
235 |
+
if ( is_wp_error( $this->editor ) ) {
|
236 |
+
return $this->editor;
|
237 |
+
}
|
238 |
+
|
239 |
+
// Create the file.
|
240 |
+
$result = $this->editor->multi_resize( array( $thumbnail_size => $thumbnail_data ) );
|
241 |
+
|
242 |
+
if ( ! $result ) {
|
243 |
+
return new WP_Error( 'image_resize_error' );
|
244 |
+
}
|
245 |
+
|
246 |
+
$filesystem = imagify_get_filesystem();
|
247 |
+
// The file name can change from what we expected (1px wider, etc).
|
248 |
+
$backup_dirname = trailingslashit( dirname( $this->get_backup_path() ) );
|
249 |
+
$backup_thumb_path = $backup_dirname . $result[ $thumbnail_size ]['file'];
|
250 |
+
$thumbnail_path = $original_dirname . $result[ $thumbnail_size ]['file'];
|
251 |
+
|
252 |
+
// Since we used the backup image as source, the new image is still in the backup folder, we need to move it.
|
253 |
+
$filesystem->move( $backup_thumb_path, $thumbnail_path, true );
|
254 |
+
|
255 |
+
if ( $filesystem->exists( $backup_thumb_path ) ) {
|
256 |
+
$filesystem->delete( $backup_thumb_path );
|
257 |
+
}
|
258 |
+
|
259 |
+
if ( ! $filesystem->exists( $thumbnail_path ) ) {
|
260 |
+
return new WP_Error( 'image_resize_error' );
|
261 |
+
}
|
262 |
+
|
263 |
+
imagify_chmod_file( $thumbnail_path );
|
264 |
+
|
265 |
+
return reset( $result );
|
266 |
+
}
|
267 |
+
|
268 |
+
/**
|
269 |
+
* Create all missing thumbnails if they don't exist and update the attachment metadata.
|
270 |
+
*
|
271 |
+
* @since 1.6.10
|
272 |
+
* @access protected
|
273 |
+
* @author Grégory Viguier
|
274 |
+
*
|
275 |
+
* @param array $missing_sizes An array of thumbnail data (width, height, crop, name, file) for each thumbnail size.
|
276 |
+
* @return array An array of thumbnail data (width, height, crop, file).
|
277 |
+
*/
|
278 |
+
protected function create_missing_thumbnails( $missing_sizes ) {
|
279 |
+
if ( ! $missing_sizes ) {
|
280 |
+
return array();
|
281 |
+
}
|
282 |
+
|
283 |
+
$metadata = wp_get_attachment_metadata( $this->id );
|
284 |
+
$metadata['sizes'] = ! empty( $metadata['sizes'] ) && is_array( $metadata['sizes'] ) ? $metadata['sizes'] : array();
|
285 |
+
$thumbnail_new_datas = array();
|
286 |
+
$thumbnail_metadatas = array();
|
287 |
+
|
288 |
+
// Create the missing thumbnails.
|
289 |
+
foreach ( $missing_sizes as $size_name => $thumbnail_data ) {
|
290 |
+
$result = $this->create_thumbnail( $thumbnail_data );
|
291 |
+
|
292 |
+
if ( is_array( $result ) ) {
|
293 |
+
// New file.
|
294 |
+
$thumbnail_new_datas[ $size_name ] = $result;
|
295 |
+
unset( $thumbnail_new_datas[ $size_name ]['name'] );
|
296 |
+
} elseif ( true === $result ) {
|
297 |
+
// The file already exists.
|
298 |
+
$thumbnail_metadatas[ $size_name ] = $metadata['sizes'][ $size_name ];
|
299 |
+
}
|
300 |
+
}
|
301 |
+
|
302 |
+
// Save the new data into the attachment metadata.
|
303 |
+
if ( $thumbnail_new_datas ) {
|
304 |
+
$metadata['sizes'] = array_merge( $metadata['sizes'], $thumbnail_new_datas );
|
305 |
+
|
306 |
+
/**
|
307 |
+
* Here we don't use wp_update_attachment_metadata() to prevent triggering unwanted hooks.
|
308 |
+
*/
|
309 |
+
update_post_meta( $this->id, '_wp_attachment_metadata', $metadata );
|
310 |
+
}
|
311 |
+
|
312 |
+
return array_merge( $thumbnail_metadatas, $thumbnail_new_datas );
|
313 |
+
}
|
314 |
+
|
315 |
/**
|
316 |
* Optimize all sizes with Imagify.
|
317 |
*
|
411 |
|
412 |
// Optimize all thumbnails.
|
413 |
if ( $sizes ) {
|
414 |
+
$disallowed_sizes = get_imagify_option( 'disallowed-sizes', array() );
|
415 |
+
$is_active_for_network = imagify_is_active_for_network();
|
416 |
+
$attachment_path_dirname = trailingslashit( dirname( $attachment_path ) );
|
417 |
+
$attachment_url_dirname = trailingslashit( dirname( $attachment_url ) );
|
418 |
+
|
419 |
foreach ( $sizes as $size_key => $size_data ) {
|
420 |
// Check if this size has to be optimized.
|
421 |
+
if ( ! $is_active_for_network && isset( $disallowed_sizes[ $size_key ] ) ) {
|
422 |
$data['sizes'][ $size_key ] = array(
|
423 |
'success' => false,
|
424 |
'error' => __( 'This size isn\'t authorized to be optimized. Update your Imagify settings if you want to optimize it.', 'imagify' ),
|
426 |
continue;
|
427 |
}
|
428 |
|
429 |
+
$thumbnail_path = $attachment_path_dirname . $size_data['file'];
|
430 |
+
$thumbnail_url = $attachment_url_dirname . $size_data['file'];
|
431 |
|
432 |
// Optimize the thumbnail size.
|
433 |
$response = do_imagify( $thumbnail_path, array(
|
470 |
*
|
471 |
* @param int $id The attachment ID.
|
472 |
* @param array $optimized_data The optimization data.
|
473 |
+
*/
|
474 |
do_action( 'after_imagify_optimize_attachment', $this->id, $optimized_data );
|
475 |
|
476 |
delete_transient( 'imagify-async-in-progress-' . $this->id );
|
478 |
return $optimized_data;
|
479 |
}
|
480 |
|
481 |
+
/**
|
482 |
+
* Optimize missing thumbnail sizes with Imagify.
|
483 |
+
*
|
484 |
+
* @since 1.6.10
|
485 |
+
* @access public
|
486 |
+
* @author Grégory Viguier
|
487 |
+
*
|
488 |
+
* @param int $optimization_level The optimization level (2=ultra, 1=aggressive, 0=normal).
|
489 |
+
* @return array|object An array of thumbnail data, size by size. A WP_Error object on failure.
|
490 |
+
*/
|
491 |
+
public function optimize_missing_thumbnails( $optimization_level = null ) {
|
492 |
+
// Check if the attachment extension is allowed.
|
493 |
+
if ( ! imagify_is_attachment_mime_type_supported( $this->id ) ) {
|
494 |
+
return new WP_Error( 'mime_type_not_supported', __( 'This type of file is not supported.', 'imagify' ) );
|
495 |
+
}
|
496 |
+
|
497 |
+
$optimization_level = is_null( $optimization_level ) ? (int) get_imagify_option( 'optimization_level', 1 ) : (int) $optimization_level;
|
498 |
+
$missing_sizes = $this->get_unoptimized_sizes();
|
499 |
+
|
500 |
+
if ( ! $missing_sizes ) {
|
501 |
+
// We have everything we need.
|
502 |
+
return array();
|
503 |
+
}
|
504 |
+
|
505 |
+
/**
|
506 |
+
* Fires before optimizing the missing thumbnails.
|
507 |
+
*
|
508 |
+
* @since 1.6.10
|
509 |
+
* @author Grégory Viguier
|
510 |
+
* @see $this->get_unoptimized_sizes()
|
511 |
+
*
|
512 |
+
* @param int $id The attachment ID.
|
513 |
+
* @param array $missing_sizes An array of the missing sizes.
|
514 |
+
*/
|
515 |
+
do_action( 'before_imagify_optimize_missing_thumbnails', $this->id, $missing_sizes );
|
516 |
+
|
517 |
+
set_transient( 'imagify-async-in-progress-' . $this->id, true, 10 * MINUTE_IN_SECONDS );
|
518 |
+
|
519 |
+
$errors = new WP_Error();
|
520 |
+
|
521 |
+
// Create the missing thumbnails.
|
522 |
+
$result_sizes = $this->create_missing_thumbnails( $missing_sizes );
|
523 |
+
$failed_sizes = array_diff_key( $missing_sizes, $result_sizes );
|
524 |
+
|
525 |
+
if ( $failed_sizes ) {
|
526 |
+
$failed_count = count( $failed_sizes );
|
527 |
+
/* translators: %d is a number of thumbnails. */
|
528 |
+
$error_message = _n( '%d thumbnail failed to be created', '%d thumbnails failed to be created', $failed_count, 'imagify' );
|
529 |
+
$error_message = sprintf( $error_message, $failed_count );
|
530 |
+
$errors->add( 'image_resize_error', $error_message, array( 'nbr_failed' => $failed_count, 'sizes_failed' => $failed_sizes, 'sizes_succeeded' => $result_sizes ) );
|
531 |
+
}
|
532 |
+
|
533 |
+
if ( ! $result_sizes ) {
|
534 |
+
delete_transient( 'imagify-async-in-progress-' . $this->id );
|
535 |
+
return $errors;
|
536 |
+
}
|
537 |
+
|
538 |
+
// Optimize.
|
539 |
+
$imagify_data = $this->get_data();
|
540 |
+
$original_dirname = trailingslashit( dirname( $this->get_original_path() ) );
|
541 |
+
$orig_url_dirname = trailingslashit( dirname( $this->get_original_url() ) );
|
542 |
+
|
543 |
+
foreach ( $result_sizes as $size_name => $thumbnail_data ) {
|
544 |
+
$thumbnail_path = $original_dirname . $thumbnail_data['file'];
|
545 |
+
$thumbnail_url = $orig_url_dirname . $thumbnail_data['file'];
|
546 |
+
|
547 |
+
// Optimize the thumbnail size.
|
548 |
+
$response = do_imagify( $thumbnail_path, array(
|
549 |
+
'backup' => false,
|
550 |
+
'optimization_level' => $optimization_level,
|
551 |
+
'context' => 'wp',
|
552 |
+
) );
|
553 |
+
|
554 |
+
$imagify_data = $this->fill_data( $imagify_data, $response, $thumbnail_url, $size_name );
|
555 |
+
|
556 |
+
/** This filter is documented in inc/classes/class-imagify-attachment.php. */
|
557 |
+
$imagify_data = apply_filters( 'imagify_fill_thumbnail_data', $imagify_data, $response, $this->id, $thumbnail_path, $thumbnail_url, $size_name, $optimization_level );
|
558 |
+
}
|
559 |
+
|
560 |
+
// Save Imagify data.
|
561 |
+
$imagify_data['stats']['percent'] = round( ( ( $imagify_data['stats']['original_size'] - $imagify_data['stats']['optimized_size'] ) / $imagify_data['stats']['original_size'] ) * 100, 2 );
|
562 |
+
|
563 |
+
update_post_meta( $this->id, '_imagify_data', $imagify_data );
|
564 |
+
|
565 |
+
/**
|
566 |
+
* Fires after optimizing the missing thumbnails.
|
567 |
+
*
|
568 |
+
* @since 1.6.10
|
569 |
+
* @author Grégory Viguier
|
570 |
+
* @see $this->create_missing_thumbnails()
|
571 |
+
*
|
572 |
+
* @param int $id The attachment ID.
|
573 |
+
* @param array $result_sizes An array of created thumbnails.
|
574 |
+
* @param object $errors A WP_Error object that stores thumbnail creation failures.
|
575 |
+
*/
|
576 |
+
do_action( 'after_imagify_optimize_missing_thumbnails', $this->id, $result_sizes, $errors );
|
577 |
+
|
578 |
+
delete_transient( 'imagify-async-in-progress-' . $this->id );
|
579 |
+
|
580 |
+
// Return the result.
|
581 |
+
if ( $errors->get_error_codes() ) {
|
582 |
+
return $errors;
|
583 |
+
}
|
584 |
+
|
585 |
+
return $result_sizes;
|
586 |
+
}
|
587 |
+
|
588 |
/**
|
589 |
* Process an attachment restoration from the backup file.
|
590 |
*
|
625 |
require_once( ABSPATH . 'wp-admin/includes/image.php' );
|
626 |
}
|
627 |
|
628 |
+
remove_filter( 'wp_generate_attachment_metadata', '_imagify_optimize_attachment', IMAGIFY_INT_MAX );
|
629 |
wp_generate_attachment_metadata( $this->id, $attachment_path );
|
630 |
|
631 |
// Remove old optimization data.
|
inc/classes/class-imagify-notices.php
ADDED
@@ -0,0 +1,758 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
defined( 'ABSPATH' ) || die( 'Cheatin\' uh?' );
|
3 |
+
|
4 |
+
/**
|
5 |
+
* Class that handles the admin notices.
|
6 |
+
*
|
7 |
+
* @since 1.6.10
|
8 |
+
* @author Grégory Viguier
|
9 |
+
*/
|
10 |
+
class Imagify_Notices {
|
11 |
+
|
12 |
+
/**
|
13 |
+
* Class version.
|
14 |
+
*
|
15 |
+
* @var string
|
16 |
+
*/
|
17 |
+
const VERSION = '1.0';
|
18 |
+
|
19 |
+
/**
|
20 |
+
* Name of the user meta that stores the dismissed notice IDs.
|
21 |
+
*
|
22 |
+
* @var string
|
23 |
+
*/
|
24 |
+
const DISMISS_META_NAME = '_imagify_ignore_notices';
|
25 |
+
|
26 |
+
/**
|
27 |
+
* Action used in the nonce to dismiss a notice.
|
28 |
+
*
|
29 |
+
* @var string
|
30 |
+
*/
|
31 |
+
const DISMISS_NONCE_ACTION = 'imagify-dismiss-notice';
|
32 |
+
|
33 |
+
/**
|
34 |
+
* Action used in the nonce to deactivate a plugin.
|
35 |
+
*
|
36 |
+
* @var string
|
37 |
+
*/
|
38 |
+
const DEACTIVATE_PLUGIN_NONCE_ACTION = 'imagify-deactivate-plugin';
|
39 |
+
|
40 |
+
/**
|
41 |
+
* The path to the folder containing the views.
|
42 |
+
*
|
43 |
+
* @var string
|
44 |
+
*/
|
45 |
+
protected static $views_folder = IMAGIFY_ADMIN_UI_PATH;
|
46 |
+
|
47 |
+
/**
|
48 |
+
* List of notice IDs.
|
49 |
+
* They correspond to method names and IDs stored in the "dismissed" transient.
|
50 |
+
* Only use "-" character, not "_".
|
51 |
+
*
|
52 |
+
* @var array
|
53 |
+
*/
|
54 |
+
protected static $notice_ids = array(
|
55 |
+
// This warning is displayed when the API key is empty. Dismissible.
|
56 |
+
'welcome-steps',
|
57 |
+
// This warning is displayed when the API key is wrong. Dismissible.
|
58 |
+
'wrong-api-key',
|
59 |
+
// This warning is displayed if some plugins are active. NOT dismissible.
|
60 |
+
'plugins-to-deactivate',
|
61 |
+
// This notice is displayed when external HTTP requests are blocked via the WP_HTTP_BLOCK_EXTERNAL constant. Dismissible.
|
62 |
+
'http-block-external',
|
63 |
+
// This warning is displayed when the grid view is active on the library. Dismissible.
|
64 |
+
'grid-view',
|
65 |
+
// This warning is displayed to warn the user that its quota is consumed for the current month. Dismissible.
|
66 |
+
'free-over-quota',
|
67 |
+
// This warning is displayed if the backup folder is not writable. NOT dismissible.
|
68 |
+
'backup-folder-not-writable',
|
69 |
+
// This notice is displayed to rate the plugin after 100 optimizations & 7 days after the first installation. Dismissible.
|
70 |
+
'rating',
|
71 |
+
// Add a message about WP Rocket on the "Bulk Optimization" screen. Dismissible.
|
72 |
+
'wp-rocket',
|
73 |
+
);
|
74 |
+
|
75 |
+
/**
|
76 |
+
* List of user capabilities to use for each notice.
|
77 |
+
* Default value is not listed.
|
78 |
+
*
|
79 |
+
* @var array
|
80 |
+
*/
|
81 |
+
protected static $capabilities = array(
|
82 |
+
'grid-view' => 'upload',
|
83 |
+
'backup-folder-not-writable' => 'admin',
|
84 |
+
'rating' => 'admin',
|
85 |
+
'wp-rocket' => 'admin',
|
86 |
+
);
|
87 |
+
|
88 |
+
/**
|
89 |
+
* List of plugins that conflict with Imagify.
|
90 |
+
*
|
91 |
+
* @var array
|
92 |
+
*/
|
93 |
+
protected static $conflicting_plugins = array(
|
94 |
+
'wp-smush' => 'wp-smushit/wp-smush.php', // WP Smush.
|
95 |
+
'wp-smush-pro' => 'wp-smush-pro/wp-smush.php', // WP Smush Pro.
|
96 |
+
'kraken' => 'kraken-image-optimizer/kraken.php', // Kraken.io.
|
97 |
+
'tinypng' => 'tiny-compress-images/tiny-compress-images.php', // TinyPNG.
|
98 |
+
'shortpixel' => 'shortpixel-image-optimiser/wp-shortpixel.php', // Shortpixel.
|
99 |
+
'ewww' => 'ewww-image-optimizer/ewww-image-optimizer.php', // EWWW Image Optimizer.
|
100 |
+
'ewww-cloud' => 'ewww-image-optimizer-cloud/ewww-image-optimizer-cloud.php', // EWWW Image Optimizer Cloud.
|
101 |
+
'imagerecycle' => 'imagerecycle-pdf-image-compression/wp-image-recycle.php', // ImageRecycle.
|
102 |
+
);
|
103 |
+
|
104 |
+
/**
|
105 |
+
* The single instance of the class.
|
106 |
+
*
|
107 |
+
* @var object
|
108 |
+
*/
|
109 |
+
protected static $_instance;
|
110 |
+
|
111 |
+
/**
|
112 |
+
* The constructor.
|
113 |
+
*
|
114 |
+
* @return void
|
115 |
+
*/
|
116 |
+
protected function __construct() {}
|
117 |
+
|
118 |
+
|
119 |
+
/** ----------------------------------------------------------------------------------------- */
|
120 |
+
/** INIT ==================================================================================== */
|
121 |
+
/** ----------------------------------------------------------------------------------------- */
|
122 |
+
|
123 |
+
/**
|
124 |
+
* Get the main Instance.
|
125 |
+
*
|
126 |
+
* @since 1.6.10
|
127 |
+
* @author Grégory Viguier
|
128 |
+
*
|
129 |
+
* @return object Main instance.
|
130 |
+
*/
|
131 |
+
public static function get_instance() {
|
132 |
+
if ( ! isset( self::$_instance ) ) {
|
133 |
+
self::$_instance = new self();
|
134 |
+
}
|
135 |
+
|
136 |
+
return self::$_instance;
|
137 |
+
}
|
138 |
+
|
139 |
+
/**
|
140 |
+
* Launch the hooks.
|
141 |
+
*
|
142 |
+
* @since 1.6.10
|
143 |
+
* @author Grégory Viguier
|
144 |
+
*/
|
145 |
+
public function init() {
|
146 |
+
add_action( 'all_admin_notices', array( $this, 'render_notices' ) );
|
147 |
+
add_action( 'wp_ajax_imagify_dismiss_notice', array( $this, 'admin_post_dismiss_notice' ) );
|
148 |
+
add_action( 'admin_post_imagify_dismiss_notice', array( $this, 'admin_post_dismiss_notice' ) );
|
149 |
+
add_action( 'imagify_dismiss_notice', array( $this, 'clear_scheduled_rating' ) );
|
150 |
+
add_action( 'admin_post_imagify_deactivate_plugin', array( $this, 'deactivate_plugin' ) );
|
151 |
+
}
|
152 |
+
|
153 |
+
|
154 |
+
/** ----------------------------------------------------------------------------------------- */
|
155 |
+
/** HOOKS =================================================================================== */
|
156 |
+
/** ----------------------------------------------------------------------------------------- */
|
157 |
+
|
158 |
+
/**
|
159 |
+
* Maybe display some notices.
|
160 |
+
*
|
161 |
+
* @since 1.6.10
|
162 |
+
* @author Grégory Viguier
|
163 |
+
*/
|
164 |
+
public function render_notices() {
|
165 |
+
foreach ( $this->get_notice_ids() as $notice_id ) {
|
166 |
+
// Get the name of the method that will tell if this notice should be displayed.
|
167 |
+
$callback = 'display_' . str_replace( '-', '_', $notice_id );
|
168 |
+
|
169 |
+
if ( ! method_exists( $this, $callback ) ) {
|
170 |
+
continue;
|
171 |
+
}
|
172 |
+
|
173 |
+
$data = call_user_func( array( $this, $callback ) );
|
174 |
+
|
175 |
+
if ( $data ) {
|
176 |
+
// The notice must be displayed: render the view.
|
177 |
+
$this->render_view( str_replace( '_', '-', $notice_id ), $data );
|
178 |
+
}
|
179 |
+
}
|
180 |
+
}
|
181 |
+
|
182 |
+
/**
|
183 |
+
* Process a dismissed notice.
|
184 |
+
*
|
185 |
+
* @since 1.6.10
|
186 |
+
* @author Grégory Viguier
|
187 |
+
* @see _do_admin_post_imagify_dismiss_notice()
|
188 |
+
*/
|
189 |
+
public function admin_post_dismiss_notice() {
|
190 |
+
imagify_check_nonce( self::DISMISS_NONCE_ACTION );
|
191 |
+
|
192 |
+
$notice = ! empty( $_GET['notice'] ) ? esc_html( $_GET['notice'] ) : false;
|
193 |
+
$notices = $this->get_notice_ids();
|
194 |
+
$notices = array_flip( $notices );
|
195 |
+
|
196 |
+
if ( ! $notice || ! isset( $notices[ $notice ] ) || ! $this->user_can( $notice ) ) {
|
197 |
+
imagify_die();
|
198 |
+
}
|
199 |
+
|
200 |
+
self::dismiss_notice( $notice );
|
201 |
+
|
202 |
+
/**
|
203 |
+
* Fires when a notice is dismissed.
|
204 |
+
*
|
205 |
+
* @since 1.4.2
|
206 |
+
*
|
207 |
+
* @param int $notice The notice slug
|
208 |
+
*/
|
209 |
+
do_action( 'imagify_dismiss_notice', $notice );
|
210 |
+
|
211 |
+
imagify_maybe_redirect();
|
212 |
+
wp_send_json_success();
|
213 |
+
}
|
214 |
+
|
215 |
+
/**
|
216 |
+
* Stop the rating cron when the notice is dismissed.
|
217 |
+
*
|
218 |
+
* @since 1.6.10
|
219 |
+
* @author Grégory Viguier
|
220 |
+
* @see _imagify_clear_scheduled_rating()
|
221 |
+
*
|
222 |
+
* @param string $notice The notice name.
|
223 |
+
*/
|
224 |
+
public function clear_scheduled_rating( $notice ) {
|
225 |
+
if ( 'rating' === $notice ) {
|
226 |
+
set_site_transient( 'do_imagify_rating_cron', 'no' );
|
227 |
+
wp_clear_scheduled_hook( 'imagify_rating_event' );
|
228 |
+
}
|
229 |
+
}
|
230 |
+
|
231 |
+
/**
|
232 |
+
* Disable a plugin which can be in conflict with Imagify.
|
233 |
+
*
|
234 |
+
* @since 1.6.10
|
235 |
+
* @author Grégory Viguier
|
236 |
+
* @see _imagify_deactivate_plugin()
|
237 |
+
*/
|
238 |
+
public function deactivate_plugin() {
|
239 |
+
imagify_check_nonce( self::DEACTIVATE_PLUGIN_NONCE_ACTION );
|
240 |
+
|
241 |
+
if ( empty( $_GET['plugin'] ) || ! $this->user_can( 'plugins-to-deactivate' ) ) {
|
242 |
+
imagify_die();
|
243 |
+
}
|
244 |
+
|
245 |
+
$plugin = esc_html( $_GET['plugin'] );
|
246 |
+
$plugins = $this->get_conflicting_plugins();
|
247 |
+
$plugins = array_flip( $plugins );
|
248 |
+
|
249 |
+
if ( empty( $plugins[ $plugin ] ) ) {
|
250 |
+
imagify_die();
|
251 |
+
}
|
252 |
+
|
253 |
+
deactivate_plugins( $plugin );
|
254 |
+
|
255 |
+
imagify_maybe_redirect();
|
256 |
+
wp_send_json_success();
|
257 |
+
}
|
258 |
+
|
259 |
+
|
260 |
+
/** ----------------------------------------------------------------------------------------- */
|
261 |
+
/** NOTICES ================================================================================= */
|
262 |
+
/** ----------------------------------------------------------------------------------------- */
|
263 |
+
|
264 |
+
/**
|
265 |
+
* Tell if the 'welcome-steps' notice should be displayed.
|
266 |
+
*
|
267 |
+
* @since 1.6.10
|
268 |
+
* @author Grégory Viguier
|
269 |
+
*
|
270 |
+
* @return bool
|
271 |
+
*/
|
272 |
+
public function display_welcome_steps() {
|
273 |
+
static $display;
|
274 |
+
|
275 |
+
if ( isset( $display ) ) {
|
276 |
+
return $display;
|
277 |
+
}
|
278 |
+
|
279 |
+
$display = false;
|
280 |
+
|
281 |
+
if ( ! $this->user_can( 'welcome-steps' ) ) {
|
282 |
+
return $display;
|
283 |
+
}
|
284 |
+
|
285 |
+
if ( imagify_is_screen( 'imagify-settings' ) ) {
|
286 |
+
return $display;
|
287 |
+
}
|
288 |
+
|
289 |
+
if ( self::notice_is_dismissed( 'welcome-steps' ) || get_imagify_option( 'api_key' ) ) {
|
290 |
+
return $display;
|
291 |
+
}
|
292 |
+
|
293 |
+
$display = true;
|
294 |
+
return $display;
|
295 |
+
}
|
296 |
+
|
297 |
+
/**
|
298 |
+
* Tell if the 'wrong-api-key' notice should be displayed.
|
299 |
+
*
|
300 |
+
* @since 1.6.10
|
301 |
+
* @author Grégory Viguier
|
302 |
+
*
|
303 |
+
* @return bool
|
304 |
+
*/
|
305 |
+
public function display_wrong_api_key() {
|
306 |
+
static $display;
|
307 |
+
|
308 |
+
if ( isset( $display ) ) {
|
309 |
+
return $display;
|
310 |
+
}
|
311 |
+
|
312 |
+
$display = false;
|
313 |
+
|
314 |
+
if ( ! $this->user_can( 'wrong-api-key' ) ) {
|
315 |
+
return $display;
|
316 |
+
}
|
317 |
+
|
318 |
+
if ( ! imagify_is_screen( 'bulk' ) ) {
|
319 |
+
return $display;
|
320 |
+
}
|
321 |
+
|
322 |
+
if ( self::notice_is_dismissed( 'wrong-api-key' ) || ! get_imagify_option( 'api_key' ) || imagify_valid_key() ) {
|
323 |
+
return $display;
|
324 |
+
}
|
325 |
+
|
326 |
+
$display = true;
|
327 |
+
return $display;
|
328 |
+
}
|
329 |
+
|
330 |
+
/**
|
331 |
+
* Tell if the 'plugins-to-deactivate' notice should be displayed.
|
332 |
+
*
|
333 |
+
* @since 1.6.10
|
334 |
+
* @author Grégory Viguier
|
335 |
+
*
|
336 |
+
* @return array An array of plugins to deactivate.
|
337 |
+
*/
|
338 |
+
public function display_plugins_to_deactivate() {
|
339 |
+
static $display;
|
340 |
+
|
341 |
+
if ( isset( $display ) ) {
|
342 |
+
return $display;
|
343 |
+
}
|
344 |
+
|
345 |
+
if ( ! $this->user_can( 'plugins-to-deactivate' ) ) {
|
346 |
+
$display = false;
|
347 |
+
return $display;
|
348 |
+
}
|
349 |
+
|
350 |
+
$display = $this->get_conflicting_plugins();
|
351 |
+
return $display;
|
352 |
+
}
|
353 |
+
|
354 |
+
/**
|
355 |
+
* Tell if the 'plugins-to-deactivate' notice should be displayed.
|
356 |
+
*
|
357 |
+
* @since 1.6.10
|
358 |
+
* @author Grégory Viguier
|
359 |
+
*
|
360 |
+
* @return bool
|
361 |
+
*/
|
362 |
+
public function display_http_block_external() {
|
363 |
+
static $display;
|
364 |
+
|
365 |
+
if ( isset( $display ) ) {
|
366 |
+
return $display;
|
367 |
+
}
|
368 |
+
|
369 |
+
$display = false;
|
370 |
+
|
371 |
+
if ( ! $this->user_can( 'http-block-external' ) ) {
|
372 |
+
return $display;
|
373 |
+
}
|
374 |
+
|
375 |
+
if ( imagify_is_screen( 'imagify-settings' ) ) {
|
376 |
+
return $display;
|
377 |
+
}
|
378 |
+
|
379 |
+
if ( self::notice_is_dismissed( 'http-block-external' ) || ! is_imagify_blocked() ) {
|
380 |
+
return $display;
|
381 |
+
}
|
382 |
+
|
383 |
+
$display = true;
|
384 |
+
return $display;
|
385 |
+
}
|
386 |
+
|
387 |
+
/**
|
388 |
+
* Tell if the 'grid-view' notice should be displayed.
|
389 |
+
*
|
390 |
+
* @since 1.6.10
|
391 |
+
* @author Grégory Viguier
|
392 |
+
*
|
393 |
+
* @return bool
|
394 |
+
*/
|
395 |
+
public function display_grid_view() {
|
396 |
+
global $wp_version;
|
397 |
+
static $display;
|
398 |
+
|
399 |
+
if ( isset( $display ) ) {
|
400 |
+
return $display;
|
401 |
+
}
|
402 |
+
|
403 |
+
$display = false;
|
404 |
+
|
405 |
+
if ( ! $this->user_can( 'grid-view' ) ) {
|
406 |
+
return $display;
|
407 |
+
}
|
408 |
+
|
409 |
+
if ( ! imagify_is_screen( 'library' ) ) {
|
410 |
+
return $display;
|
411 |
+
}
|
412 |
+
|
413 |
+
$media_library_mode = get_user_option( 'media_library_mode', get_current_user_id() );
|
414 |
+
|
415 |
+
if ( 'list' === $media_library_mode || self::notice_is_dismissed( 'grid-view' ) || version_compare( $wp_version, '4.0' ) < 0 ) {
|
416 |
+
return $display;
|
417 |
+
}
|
418 |
+
|
419 |
+
// Don't display the notice if the API key isn't valid.
|
420 |
+
if ( ! imagify_valid_key() ) {
|
421 |
+
return $display;
|
422 |
+
}
|
423 |
+
|
424 |
+
$display = true;
|
425 |
+
return $display;
|
426 |
+
}
|
427 |
+
|
428 |
+
/**
|
429 |
+
* Tell if the 'over-quota' notice should be displayed.
|
430 |
+
*
|
431 |
+
* @since 1.6.10
|
432 |
+
* @author Grégory Viguier
|
433 |
+
*
|
434 |
+
* @return bool|object An Imagify user object. False otherwise.
|
435 |
+
*/
|
436 |
+
public function display_free_over_quota() {
|
437 |
+
static $display;
|
438 |
+
|
439 |
+
if ( isset( $display ) ) {
|
440 |
+
return $display;
|
441 |
+
}
|
442 |
+
|
443 |
+
$display = false;
|
444 |
+
|
445 |
+
if ( ! $this->user_can( 'free-over-quota' ) ) {
|
446 |
+
return $display;
|
447 |
+
}
|
448 |
+
|
449 |
+
if ( ! imagify_is_screen( 'imagify-settings' ) && ! imagify_is_screen( 'bulk' ) ) {
|
450 |
+
return $display;
|
451 |
+
}
|
452 |
+
|
453 |
+
if ( self::notice_is_dismissed( 'free-over-quota' ) ) {
|
454 |
+
return $display;
|
455 |
+
}
|
456 |
+
|
457 |
+
$user = new Imagify_User();
|
458 |
+
|
459 |
+
// Don't display the notice if the user doesn't use all his quota or the API key isn't valid.
|
460 |
+
if ( ! $user->is_over_quota() || ! imagify_valid_key() ) {
|
461 |
+
return $display;
|
462 |
+
}
|
463 |
+
|
464 |
+
$display = $user;
|
465 |
+
return $display;
|
466 |
+
}
|
467 |
+
|
468 |
+
/**
|
469 |
+
* Tell if the 'backup-folder-not-writable' notice should be displayed.
|
470 |
+
*
|
471 |
+
* @since 1.6.10
|
472 |
+
* @author Grégory Viguier
|
473 |
+
*
|
474 |
+
* @return bool
|
475 |
+
*/
|
476 |
+
public function display_backup_folder_not_writable() {
|
477 |
+
global $post_id;
|
478 |
+
static $display;
|
479 |
+
|
480 |
+
if ( isset( $display ) ) {
|
481 |
+
return $display;
|
482 |
+
}
|
483 |
+
|
484 |
+
$display = false;
|
485 |
+
|
486 |
+
if ( ! $this->user_can( 'backup-folder-not-writable' ) ) {
|
487 |
+
return $display;
|
488 |
+
}
|
489 |
+
|
490 |
+
// Every places where images can be optimized, automatically or not (+ the settings page).
|
491 |
+
if ( ! imagify_is_screen( 'imagify-settings' ) && ! imagify_is_screen( 'library' ) && ! imagify_is_screen( 'upload' ) && ! imagify_is_screen( 'bulk' ) && ! imagify_is_screen( 'media-modal' ) ) {
|
492 |
+
return $display;
|
493 |
+
}
|
494 |
+
|
495 |
+
if ( ! get_imagify_option( 'backup' ) ) {
|
496 |
+
return $display;
|
497 |
+
}
|
498 |
+
|
499 |
+
if ( imagify_backup_dir_is_writable() ) {
|
500 |
+
return $display;
|
501 |
+
}
|
502 |
+
|
503 |
+
$display = true;
|
504 |
+
return $display;
|
505 |
+
}
|
506 |
+
|
507 |
+
/**
|
508 |
+
* Tell if the 'rating' notice should be displayed.
|
509 |
+
*
|
510 |
+
* @since 1.6.10
|
511 |
+
* @author Grégory Viguier
|
512 |
+
*
|
513 |
+
* @return bool|int
|
514 |
+
*/
|
515 |
+
public function display_rating() {
|
516 |
+
static $display;
|
517 |
+
|
518 |
+
if ( isset( $display ) ) {
|
519 |
+
return $display;
|
520 |
+
}
|
521 |
+
|
522 |
+
$display = false;
|
523 |
+
|
524 |
+
if ( ! $this->user_can( 'rating' ) ) {
|
525 |
+
return $display;
|
526 |
+
}
|
527 |
+
|
528 |
+
if ( ! imagify_is_screen( 'bulk' ) && ! imagify_is_screen( 'library' ) && ! imagify_is_screen( 'upload' ) ) {
|
529 |
+
return $display;
|
530 |
+
}
|
531 |
+
|
532 |
+
if ( self::notice_is_dismissed( 'rating' ) ) {
|
533 |
+
return $display;
|
534 |
+
}
|
535 |
+
|
536 |
+
$user_images_count = (int) get_site_transient( 'imagify_user_images_count' );
|
537 |
+
|
538 |
+
if ( ! $user_images_count || get_site_transient( 'imagify_seen_rating_notice' ) ) {
|
539 |
+
return $display;
|
540 |
+
}
|
541 |
+
|
542 |
+
$display = $user_images_count;
|
543 |
+
return $display;
|
544 |
+
}
|
545 |
+
|
546 |
+
/**
|
547 |
+
* Tell if the 'wp-rocket' notice should be displayed.
|
548 |
+
*
|
549 |
+
* @since 1.6.10
|
550 |
+
* @author Grégory Viguier
|
551 |
+
*
|
552 |
+
* @return bool
|
553 |
+
*/
|
554 |
+
public function display_wp_rocket() {
|
555 |
+
static $display;
|
556 |
+
|
557 |
+
if ( isset( $display ) ) {
|
558 |
+
return $display;
|
559 |
+
}
|
560 |
+
|
561 |
+
$display = false;
|
562 |
+
|
563 |
+
if ( ! $this->user_can( 'wp-rocket' ) ) {
|
564 |
+
return $display;
|
565 |
+
}
|
566 |
+
|
567 |
+
if ( ! imagify_is_screen( 'bulk' ) ) {
|
568 |
+
return $display;
|
569 |
+
}
|
570 |
+
|
571 |
+
if ( defined( 'WP_ROCKET_VERSION' ) || self::notice_is_dismissed( 'wp-rocket' ) ) {
|
572 |
+
return $display;
|
573 |
+
}
|
574 |
+
|
575 |
+
$display = true;
|
576 |
+
return $display;
|
577 |
+
}
|
578 |
+
|
579 |
+
|
580 |
+
/** ----------------------------------------------------------------------------------------- */
|
581 |
+
/** PUBLIC TOOLS ============================================================================ */
|
582 |
+
/** ----------------------------------------------------------------------------------------- */
|
583 |
+
|
584 |
+
/**
|
585 |
+
* Renew a dismissed Imagify notice.
|
586 |
+
*
|
587 |
+
* @since 1.6.10
|
588 |
+
* @author Grégory Viguier
|
589 |
+
* @see imagify_renew_notice()
|
590 |
+
*
|
591 |
+
* @param string $notice A notice ID.
|
592 |
+
* @param int $user_id A user ID.
|
593 |
+
*/
|
594 |
+
public static function renew_notice( $notice, $user_id = 0 ) {
|
595 |
+
$user_id = $user_id ? (int) $user_id : get_current_user_id();
|
596 |
+
$notices = get_user_meta( $user_id, self::DISMISS_META_NAME, true );
|
597 |
+
$notices = $notices && is_array( $notices ) ? array_flip( $notices ) : array();
|
598 |
+
|
599 |
+
if ( ! isset( $notices[ $notice ] ) ) {
|
600 |
+
return;
|
601 |
+
}
|
602 |
+
|
603 |
+
unset( $notices[ $notice ] );
|
604 |
+
$notices = array_flip( $notices );
|
605 |
+
$notices = array_filter( $notices );
|
606 |
+
$notices = array_values( $notices );
|
607 |
+
|
608 |
+
update_user_meta( $user_id, self::DISMISS_META_NAME, $notices );
|
609 |
+
}
|
610 |
+
|
611 |
+
/**
|
612 |
+
* Dismiss an Imagify notice.
|
613 |
+
*
|
614 |
+
* @since 1.6.10
|
615 |
+
* @author Grégory Viguier
|
616 |
+
* @see imagify_dismiss_notice()
|
617 |
+
*
|
618 |
+
* @param string $notice A notice ID.
|
619 |
+
* @param int $user_id A user ID.
|
620 |
+
*/
|
621 |
+
public static function dismiss_notice( $notice, $user_id = 0 ) {
|
622 |
+
$user_id = $user_id ? (int) $user_id : get_current_user_id();
|
623 |
+
$notices = get_user_meta( $user_id, self::DISMISS_META_NAME, true );
|
624 |
+
$notices = $notices && is_array( $notices ) ? array_flip( $notices ) : array();
|
625 |
+
|
626 |
+
if ( isset( $notices[ $notice ] ) ) {
|
627 |
+
return;
|
628 |
+
}
|
629 |
+
|
630 |
+
$notices = array_flip( $notices );
|
631 |
+
$notices[] = $notice;
|
632 |
+
$notices = array_filter( $notices );
|
633 |
+
$notices = array_values( $notices );
|
634 |
+
|
635 |
+
update_user_meta( $user_id, self::DISMISS_META_NAME, $notices );
|
636 |
+
}
|
637 |
+
|
638 |
+
/**
|
639 |
+
* Tell if an Imagify notice is dismissed.
|
640 |
+
*
|
641 |
+
* @since 1.6.10
|
642 |
+
* @author Grégory Viguier
|
643 |
+
* @see imagify_notice_is_dismissed()
|
644 |
+
*
|
645 |
+
* @param string $notice A notice ID.
|
646 |
+
* @param int $user_id A user ID.
|
647 |
+
* @return bool
|
648 |
+
*/
|
649 |
+
public static function notice_is_dismissed( $notice, $user_id = 0 ) {
|
650 |
+
$user_id = $user_id ? (int) $user_id : get_current_user_id();
|
651 |
+
$notices = get_user_meta( $user_id, self::DISMISS_META_NAME, true );
|
652 |
+
$notices = $notices && is_array( $notices ) ? array_flip( $notices ) : array();
|
653 |
+
|
654 |
+
return isset( $notices[ $notice ] );
|
655 |
+
}
|
656 |
+
|
657 |
+
/**
|
658 |
+
* Tell if one or more notices will be displayed later in the page.
|
659 |
+
*
|
660 |
+
* @since 1.6.10
|
661 |
+
* @author Grégory Viguier
|
662 |
+
*
|
663 |
+
* @return bool
|
664 |
+
*/
|
665 |
+
public function has_notices() {
|
666 |
+
foreach ( self::$notice_ids as $notice_id ) {
|
667 |
+
$callback = 'display_' . str_replace( '-', '_', $notice_id );
|
668 |
+
|
669 |
+
if ( method_exists( $this, $callback ) && call_user_func( array( $this, $callback ) ) ) {
|
670 |
+
return true;
|
671 |
+
}
|
672 |
+
}
|
673 |
+
|
674 |
+
return false;
|
675 |
+
}
|
676 |
+
|
677 |
+
/**
|
678 |
+
* Include the view file.
|
679 |
+
*
|
680 |
+
* @since 1.6.10
|
681 |
+
* @author Grégory Viguier
|
682 |
+
*
|
683 |
+
* @param string $view The view ID.
|
684 |
+
* @param mixed $data Some data to pass to the view.
|
685 |
+
*/
|
686 |
+
public function render_view( $view, $data = array() ) {
|
687 |
+
require self::$views_folder . 'notice-' . $view . '.php';
|
688 |
+
}
|
689 |
+
|
690 |
+
|
691 |
+
/** ----------------------------------------------------------------------------------------- */
|
692 |
+
/** INTERNAL TOOLS ========================================================================== */
|
693 |
+
/** ----------------------------------------------------------------------------------------- */
|
694 |
+
|
695 |
+
/**
|
696 |
+
* Get all notice IDs.
|
697 |
+
*
|
698 |
+
* @since 1.6.10
|
699 |
+
* @author Grégory Viguier
|
700 |
+
*/
|
701 |
+
protected function get_notice_ids() {
|
702 |
+
/**
|
703 |
+
* Filter the notices Imagify can display.
|
704 |
+
*
|
705 |
+
* @since 1.6.10
|
706 |
+
* @author Grégory Viguier
|
707 |
+
*
|
708 |
+
* @param array $notice_ids An array of notice "IDs".
|
709 |
+
*/
|
710 |
+
return apply_filters( 'imagify_notices', self::$notice_ids );
|
711 |
+
}
|
712 |
+
|
713 |
+
/**
|
714 |
+
* Tell if the current user can see the notices.
|
715 |
+
*
|
716 |
+
* @since 1.6.10
|
717 |
+
* @author Grégory Viguier
|
718 |
+
*
|
719 |
+
* @param string $notice_id A notice ID.
|
720 |
+
* @return bool
|
721 |
+
*/
|
722 |
+
protected function user_can( $notice_id ) {
|
723 |
+
static $user_can;
|
724 |
+
|
725 |
+
if ( ! isset( $user_can ) ) {
|
726 |
+
$user_can = array(
|
727 |
+
'network' => current_user_can( imagify_get_capacity() ),
|
728 |
+
'admin' => current_user_can( imagify_get_capacity( true ) ),
|
729 |
+
'upload' => current_user_can( 'upload_files' ),
|
730 |
+
);
|
731 |
+
}
|
732 |
+
|
733 |
+
$capability = isset( self::$capabilities[ $notice_id ] ) ? self::$capabilities[ $notice_id ] : 'network';
|
734 |
+
|
735 |
+
return isset( $user_can[ $capability ] ) ? $user_can[ $capability ] : $user_can['network'];
|
736 |
+
}
|
737 |
+
|
738 |
+
/**
|
739 |
+
* Get a list of plugins that can conflict with Imagify.
|
740 |
+
*
|
741 |
+
* @since 1.6.10
|
742 |
+
* @author Grégory Viguier
|
743 |
+
*
|
744 |
+
* @return array
|
745 |
+
*/
|
746 |
+
protected function get_conflicting_plugins() {
|
747 |
+
/**
|
748 |
+
* Filter the recommended plugins to deactivate to prevent conflicts.
|
749 |
+
*
|
750 |
+
* @since 1.0
|
751 |
+
*
|
752 |
+
* @param string $plugins List of recommended plugins to deactivate.
|
753 |
+
*/
|
754 |
+
$plugins = apply_filters( 'imagify_plugins_to_deactivate', self::$conflicting_plugins );
|
755 |
+
|
756 |
+
return array_filter( $plugins, 'is_plugin_active' );
|
757 |
+
}
|
758 |
+
}
|
inc/classes/class-imagify.php
CHANGED
@@ -492,8 +492,9 @@ class Imagify extends Imagify_Deprecated {
|
|
492 |
}
|
493 |
|
494 |
if ( 200 !== $http_code ) {
|
|
|
495 |
$error = '' !== $error ? ' - ' . htmlentities( $error ) : '';
|
496 |
-
return new WP_Error( $http_code, "Unknown error occurred ({$http_code}
|
497 |
}
|
498 |
|
499 |
return $response;
|
492 |
}
|
493 |
|
494 |
if ( 200 !== $http_code ) {
|
495 |
+
$error = trim( (string) $error );
|
496 |
$error = '' !== $error ? ' - ' . htmlentities( $error ) : '';
|
497 |
+
return new WP_Error( $http_code, "Unknown error occurred ({$http_code}{$error})" );
|
498 |
}
|
499 |
|
500 |
return $response;
|
inc/common/admin-bar.php
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?php
|
2 |
defined( 'ABSPATH' ) || die( 'Cheatin\' uh?' );
|
3 |
|
4 |
-
add_action( 'admin_bar_menu', '_imagify_admin_bar',
|
5 |
/**
|
6 |
* Add Imagify menu in the admin bar.
|
7 |
*
|
@@ -10,7 +10,7 @@ add_action( 'admin_bar_menu', '_imagify_admin_bar', PHP_INT_MAX );
|
|
10 |
* @param object $wp_admin_bar WP_Admin_Bar instance, passed by reference.
|
11 |
*/
|
12 |
function _imagify_admin_bar( $wp_admin_bar ) {
|
13 |
-
if ( ! current_user_can( imagify_get_capacity() ) || ! get_imagify_option( 'admin_bar_menu'
|
14 |
return;
|
15 |
}
|
16 |
|
@@ -61,18 +61,3 @@ function _imagify_admin_bar( $wp_admin_bar ) {
|
|
61 |
) );
|
62 |
}
|
63 |
}
|
64 |
-
|
65 |
-
add_action( 'admin_bar_init', '_imagify_admin_bar_styles' );
|
66 |
-
/**
|
67 |
-
* Include Admin Bar Profile informations styles in front.
|
68 |
-
*
|
69 |
-
* @since 1.2
|
70 |
-
*/
|
71 |
-
function _imagify_admin_bar_styles() {
|
72 |
-
if ( is_admin() || ! get_imagify_option( 'admin_bar_menu', 0 ) ) {
|
73 |
-
return;
|
74 |
-
}
|
75 |
-
|
76 |
-
$css_ext = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '.css' : '.min.css';
|
77 |
-
wp_enqueue_style( 'imagify-css-admin-bar', IMAGIFY_ASSETS_CSS_URL . 'admin-bar' . $css_ext, array(), IMAGIFY_VERSION, 'all' );
|
78 |
-
}
|
1 |
<?php
|
2 |
defined( 'ABSPATH' ) || die( 'Cheatin\' uh?' );
|
3 |
|
4 |
+
add_action( 'admin_bar_menu', '_imagify_admin_bar', IMAGIFY_INT_MAX );
|
5 |
/**
|
6 |
* Add Imagify menu in the admin bar.
|
7 |
*
|
10 |
* @param object $wp_admin_bar WP_Admin_Bar instance, passed by reference.
|
11 |
*/
|
12 |
function _imagify_admin_bar( $wp_admin_bar ) {
|
13 |
+
if ( ! current_user_can( imagify_get_capacity() ) || ! get_imagify_option( 'admin_bar_menu' ) ) {
|
14 |
return;
|
15 |
}
|
16 |
|
61 |
) );
|
62 |
}
|
63 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
inc/common/attachments.php
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?php
|
2 |
defined( 'ABSPATH' ) || die( 'Cheatin\' uh?' );
|
3 |
|
4 |
-
add_filter( 'wp_generate_attachment_metadata', '_imagify_optimize_attachment',
|
5 |
/**
|
6 |
* Auto-optimize when a new attachment is generated.
|
7 |
*
|
1 |
<?php
|
2 |
defined( 'ABSPATH' ) || die( 'Cheatin\' uh?' );
|
3 |
|
4 |
+
add_filter( 'wp_generate_attachment_metadata', '_imagify_optimize_attachment', IMAGIFY_INT_MAX, 2 );
|
5 |
/**
|
6 |
* Auto-optimize when a new attachment is generated.
|
7 |
*
|
inc/common/cron.php
CHANGED
@@ -16,8 +16,7 @@ function _imagify_rating_scheduled() {
|
|
16 |
|
17 |
add_action( 'imagify_rating_event', '_do_imagify_rating_cron' );
|
18 |
/**
|
19 |
-
*
|
20 |
-
* in a notice message to ask him to rate Imagify on WordPress.org.
|
21 |
*
|
22 |
* @since 1.4.2
|
23 |
*/
|
@@ -43,7 +42,7 @@ add_filter( 'cron_schedules', 'imagify_purge_cron_schedule' );
|
|
43 |
/**
|
44 |
* Adds weekly interval for cron jobs.
|
45 |
*
|
46 |
-
* @since
|
47 |
* @author Remy Perona
|
48 |
*
|
49 |
* @param Array $schedules An array of intervals used by cron jobs.
|
@@ -67,7 +66,7 @@ add_action( 'init', '_imagify_update_library_size_calculations_scheduled' );
|
|
67 |
* Planning cron task to update weekly the size of the images and the size of images uploaded by month.
|
68 |
* If the task is not programmed, it is automatically triggered.
|
69 |
*
|
70 |
-
* @since
|
71 |
* @author Remy Perona
|
72 |
*/
|
73 |
function _imagify_update_library_size_calculations_scheduled() {
|
@@ -80,7 +79,7 @@ add_action( 'imagify_update_library_size_calculations_event', '_do_imagify_updat
|
|
80 |
/**
|
81 |
* Cron task to update weekly the size of the images and the size of images uploaded by month.
|
82 |
*
|
83 |
-
* @since
|
84 |
* @author Remy Perona
|
85 |
*/
|
86 |
function _do_imagify_update_library_size_calculations() {
|
16 |
|
17 |
add_action( 'imagify_rating_event', '_do_imagify_rating_cron' );
|
18 |
/**
|
19 |
+
* Save the user images count to display it later in a notice message to ask him to rate Imagify on WordPress.org.
|
|
|
20 |
*
|
21 |
* @since 1.4.2
|
22 |
*/
|
42 |
/**
|
43 |
* Adds weekly interval for cron jobs.
|
44 |
*
|
45 |
+
* @since 1.6
|
46 |
* @author Remy Perona
|
47 |
*
|
48 |
* @param Array $schedules An array of intervals used by cron jobs.
|
66 |
* Planning cron task to update weekly the size of the images and the size of images uploaded by month.
|
67 |
* If the task is not programmed, it is automatically triggered.
|
68 |
*
|
69 |
+
* @since 1.6
|
70 |
* @author Remy Perona
|
71 |
*/
|
72 |
function _imagify_update_library_size_calculations_scheduled() {
|
79 |
/**
|
80 |
* Cron task to update weekly the size of the images and the size of images uploaded by month.
|
81 |
*
|
82 |
+
* @since 1.6
|
83 |
* @author Remy Perona
|
84 |
*/
|
85 |
function _do_imagify_update_library_size_calculations() {
|
inc/functions/admin-stats.php
CHANGED
@@ -31,16 +31,29 @@ function imagify_count_attachments() {
|
|
31 |
return $count;
|
32 |
}
|
33 |
|
34 |
-
$
|
35 |
-
|
|
|
|
|
|
|
|
|
|
|
36 |
FROM $wpdb->posts
|
37 |
-
WHERE
|
38 |
-
AND
|
39 |
-
AND
|
40 |
);
|
41 |
|
|
|
|
|
|
|
|
|
|
|
42 |
if ( $count > apply_filters( 'imagify_unoptimized_attachment_limit', 10000 ) ) {
|
43 |
set_transient( 'imagify_large_library', 1 );
|
|
|
|
|
|
|
44 |
}
|
45 |
|
46 |
return $count;
|
@@ -76,15 +89,20 @@ function imagify_count_error_attachments() {
|
|
76 |
return $count;
|
77 |
}
|
78 |
|
79 |
-
$
|
|
|
|
|
|
|
|
|
|
|
80 |
SELECT COUNT( $wpdb->posts.ID )
|
81 |
FROM $wpdb->posts
|
82 |
INNER JOIN $wpdb->postmeta
|
83 |
ON $wpdb->posts.ID = $wpdb->postmeta.post_id
|
84 |
-
WHERE
|
85 |
-
AND $wpdb->postmeta.meta_key = '_imagify_status' AND CAST( $wpdb->postmeta.meta_value AS CHAR ) = 'error'
|
86 |
AND $wpdb->posts.post_type = 'attachment'
|
87 |
-
AND $wpdb->posts.post_status = 'inherit'
|
|
|
88 |
);
|
89 |
|
90 |
return $count;
|
@@ -120,15 +138,24 @@ function imagify_count_optimized_attachments() {
|
|
120 |
return $count;
|
121 |
}
|
122 |
|
123 |
-
$
|
|
|
|
|
|
|
|
|
|
|
124 |
SELECT COUNT( $wpdb->posts.ID )
|
125 |
FROM $wpdb->posts
|
126 |
INNER JOIN $wpdb->postmeta
|
127 |
ON $wpdb->posts.ID = $wpdb->postmeta.post_id
|
128 |
-
WHERE
|
129 |
-
AND ( ( $wpdb->postmeta.meta_key = '_imagify_status' AND CAST( $wpdb->postmeta.meta_value AS CHAR ) = 'success' ) OR ( $wpdb->postmeta.meta_key = '_imagify_status' AND CAST( $wpdb->postmeta.meta_value AS CHAR ) = 'already_optimized' ) )
|
130 |
AND $wpdb->posts.post_type = 'attachment'
|
131 |
-
AND $wpdb->posts.post_status = 'inherit'
|
|
|
|
|
|
|
|
|
|
|
132 |
);
|
133 |
|
134 |
return $count;
|
@@ -261,7 +288,6 @@ function imagify_count_saving_data( $key = '' ) {
|
|
261 |
}
|
262 |
}
|
263 |
} else {
|
264 |
-
|
265 |
/**
|
266 |
* Filter the chunk size of the requests fetching the data.
|
267 |
* 15,000 seems to be a good balance between memory used, speed, and number of DB hits.
|
@@ -361,14 +387,19 @@ function imagify_count_saving_data( $key = '' ) {
|
|
361 |
function imagify_calculate_total_size_images_library() {
|
362 |
global $wpdb;
|
363 |
|
364 |
-
$
|
365 |
-
|
366 |
-
|
367 |
-
AND post_type = 'attachment' AND ( post_status = 'inherit' )
|
368 |
-
LIMIT 250
|
369 |
-
", ARRAY_A );
|
370 |
|
371 |
-
$image_ids =
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
372 |
|
373 |
if ( ! $image_ids ) {
|
374 |
return 0;
|
@@ -400,13 +431,13 @@ function imagify_calculate_average_size_images_per_month() {
|
|
400 |
'post_status' => 'inherit',
|
401 |
'post_mime_type' => $imagify_mime_types,
|
402 |
'posts_per_page' => 250,
|
|
|
403 |
'date_query' => array(
|
404 |
array(
|
405 |
'before' => 'now',
|
406 |
'after' => '1 month ago',
|
407 |
),
|
408 |
),
|
409 |
-
'fields' => 'ids',
|
410 |
) );
|
411 |
|
412 |
$partial_images_uploaded_two_months_ago = new WP_Query( array(
|
@@ -414,13 +445,13 @@ function imagify_calculate_average_size_images_per_month() {
|
|
414 |
'post_status' => 'inherit',
|
415 |
'post_mime_type' => $imagify_mime_types,
|
416 |
'posts_per_page' => 250,
|
|
|
417 |
'date_query' => array(
|
418 |
array(
|
419 |
'before' => '1 month ago',
|
420 |
'after' => '2 months ago',
|
421 |
),
|
422 |
),
|
423 |
-
'fields' => 'ids',
|
424 |
) );
|
425 |
|
426 |
$partial_images_uploaded_three_months_ago = new WP_Query( array(
|
@@ -428,13 +459,13 @@ function imagify_calculate_average_size_images_per_month() {
|
|
428 |
'post_status' => 'inherit',
|
429 |
'post_mime_type' => $imagify_mime_types,
|
430 |
'posts_per_page' => 250,
|
|
|
431 |
'date_query' => array(
|
432 |
array(
|
433 |
'before' => '2 months ago',
|
434 |
'after' => '3 months ago',
|
435 |
),
|
436 |
),
|
437 |
-
'fields' => 'ids',
|
438 |
) );
|
439 |
|
440 |
$partial_images_uploaded_id = array_merge( $partial_images_uploaded_last_month->posts, $partial_images_uploaded_two_months_ago->posts, $partial_images_uploaded_three_months_ago->posts );
|
@@ -448,21 +479,23 @@ function imagify_calculate_average_size_images_per_month() {
|
|
448 |
'post_status' => 'inherit',
|
449 |
'post_mime_type' => $imagify_mime_types,
|
450 |
'posts_per_page' => -1,
|
|
|
451 |
'date_query' => array(
|
452 |
array(
|
453 |
'before' => 'now',
|
454 |
'after' => '3 months ago',
|
455 |
),
|
456 |
),
|
457 |
-
'fields' => 'ids',
|
458 |
) );
|
459 |
|
460 |
if ( ! $images_uploaded_id->posts ) {
|
461 |
return 0;
|
462 |
}
|
463 |
|
|
|
464 |
$partial_total_images_uploaded = count( $partial_images_uploaded_id );
|
465 |
-
|
|
|
466 |
$average_size_images_per_month = imagify_calculate_total_image_size( $partial_images_uploaded_id, $partial_total_images_uploaded, $total_images_uploaded ) / 3;
|
467 |
|
468 |
return $average_size_images_per_month;
|
@@ -475,8 +508,8 @@ function imagify_calculate_average_size_images_per_month() {
|
|
475 |
* @author Remy Perona
|
476 |
*
|
477 |
* @param array $image_ids Array of image IDs.
|
478 |
-
* @param int $partial_total_images The number of
|
479 |
-
* @param int $total_images The total number of
|
480 |
* @return int The estimated total size of images.
|
481 |
*/
|
482 |
function imagify_calculate_total_image_size( $image_ids, $partial_total_images, $total_images ) {
|
@@ -499,7 +532,9 @@ function imagify_calculate_total_image_size( $image_ids, $partial_total_images,
|
|
499 |
'statuses' => '_imagify_status',
|
500 |
), $image_ids );
|
501 |
|
502 |
-
//
|
|
|
|
|
503 |
$partial_size_images = 0;
|
504 |
// Total number of thumbnails.
|
505 |
$partial_total_intermediate_images = 0;
|
@@ -511,12 +546,26 @@ function imagify_calculate_total_image_size( $image_ids, $partial_total_images,
|
|
511 |
$attachment_status = isset( $results['statuses'][ $image_id ] ) ? $results['statuses'][ $image_id ] : false;
|
512 |
|
513 |
if ( 'success' === $attachment_status ) {
|
|
|
|
|
|
|
|
|
514 |
$partial_size_images += isset( $results['imagify_data'][ $image_id ]['stats']['original_size'] ) ? $results['imagify_data'][ $image_id ]['stats']['original_size'] : 0;
|
|
|
515 |
$partial_total_intermediate_images += count( $results['imagify_data'][ $image_id ]['sizes'] );
|
516 |
-
unset(
|
|
|
|
|
|
|
|
|
|
|
|
|
517 |
continue;
|
518 |
}
|
519 |
|
|
|
|
|
|
|
520 |
// Create an array containing all this attachment files.
|
521 |
$files = array(
|
522 |
'full' => get_imagify_attached_file( $results['filenames'][ $image_id ] ),
|
@@ -528,15 +577,15 @@ function imagify_calculate_total_image_size( $image_ids, $partial_total_images,
|
|
528 |
$sizes = isset( $results['data'][ $image_id ]['sizes'] ) ? $results['data'][ $image_id ]['sizes'] : array();
|
529 |
|
530 |
if ( $sizes && is_array( $sizes ) ) {
|
531 |
-
$full_dirname = trailingslashit( dirname( $files['full'] ) );
|
532 |
-
|
533 |
if ( ! $is_active_for_network ) {
|
534 |
-
$sizes =
|
535 |
}
|
536 |
|
537 |
if ( $sizes ) {
|
|
|
|
|
538 |
foreach ( $sizes as $size_key => $size_data ) {
|
539 |
-
$files[ $size_key ] = $full_dirname . $size_data['file'];
|
540 |
}
|
541 |
}
|
542 |
}
|
@@ -569,11 +618,28 @@ function imagify_calculate_total_image_size( $image_ids, $partial_total_images,
|
|
569 |
$partial_total_intermediate_images += count( $files );
|
570 |
}
|
571 |
|
572 |
-
unset(
|
|
|
|
|
|
|
|
|
|
|
|
|
573 |
} // End foreach().
|
574 |
|
|
|
575 |
$intermediate_images_per_image = $partial_total_intermediate_images / $partial_total_images;
|
|
|
|
|
|
|
|
|
|
|
576 |
$average_size_images = $partial_size_images / ( $partial_total_images + $partial_total_intermediate_images );
|
|
|
|
|
|
|
|
|
|
|
577 |
$total_size_images = $average_size_images * ( $total_images + ( $intermediate_images_per_image * $total_images ) );
|
578 |
|
579 |
return $total_size_images;
|
31 |
return $count;
|
32 |
}
|
33 |
|
34 |
+
$mime_types = get_imagify_mime_type();
|
35 |
+
$mime_types = esc_sql( $mime_types );
|
36 |
+
$mime_types = "'" . implode( "','", $mime_types ) . "'";
|
37 |
+
|
38 |
+
$count = (int) $wpdb->get_var( // WPCS: unprepared SQL ok.
|
39 |
+
"
|
40 |
+
SELECT COUNT( ID )
|
41 |
FROM $wpdb->posts
|
42 |
+
WHERE post_mime_type IN ( $mime_types )
|
43 |
+
AND post_type = 'attachment'
|
44 |
+
AND post_status != 'trash'"
|
45 |
);
|
46 |
|
47 |
+
/**
|
48 |
+
* Filter the limit from which the library is considered large.
|
49 |
+
*
|
50 |
+
* @param int $limit Number of attachments.
|
51 |
+
*/
|
52 |
if ( $count > apply_filters( 'imagify_unoptimized_attachment_limit', 10000 ) ) {
|
53 |
set_transient( 'imagify_large_library', 1 );
|
54 |
+
} elseif ( get_transient( 'imagify_large_library' ) ) {
|
55 |
+
// In case the number is decreasing under our limit.
|
56 |
+
delete_transient( 'imagify_large_library' );
|
57 |
}
|
58 |
|
59 |
return $count;
|
89 |
return $count;
|
90 |
}
|
91 |
|
92 |
+
$mime_types = get_imagify_mime_type();
|
93 |
+
$mime_types = esc_sql( $mime_types );
|
94 |
+
$mime_types = "'" . implode( "','", $mime_types ) . "'";
|
95 |
+
|
96 |
+
$count = (int) $wpdb->get_var( // WPCS: unprepared SQL ok.
|
97 |
+
"
|
98 |
SELECT COUNT( $wpdb->posts.ID )
|
99 |
FROM $wpdb->posts
|
100 |
INNER JOIN $wpdb->postmeta
|
101 |
ON $wpdb->posts.ID = $wpdb->postmeta.post_id
|
102 |
+
WHERE $wpdb->posts.post_mime_type IN ( $mime_types )
|
|
|
103 |
AND $wpdb->posts.post_type = 'attachment'
|
104 |
+
AND $wpdb->posts.post_status = 'inherit'
|
105 |
+
AND $wpdb->postmeta.meta_key = '_imagify_status' AND CAST( $wpdb->postmeta.meta_value AS CHAR ) = 'error'"
|
106 |
);
|
107 |
|
108 |
return $count;
|
138 |
return $count;
|
139 |
}
|
140 |
|
141 |
+
$mime_types = get_imagify_mime_type();
|
142 |
+
$mime_types = esc_sql( $mime_types );
|
143 |
+
$mime_types = "'" . implode( "','", $mime_types ) . "'";
|
144 |
+
|
145 |
+
$count = (int) $wpdb->get_var( // WPCS: unprepared SQL ok.
|
146 |
+
"
|
147 |
SELECT COUNT( $wpdb->posts.ID )
|
148 |
FROM $wpdb->posts
|
149 |
INNER JOIN $wpdb->postmeta
|
150 |
ON $wpdb->posts.ID = $wpdb->postmeta.post_id
|
151 |
+
WHERE $wpdb->posts.post_mime_type IN ( $mime_types )
|
|
|
152 |
AND $wpdb->posts.post_type = 'attachment'
|
153 |
+
AND $wpdb->posts.post_status = 'inherit'
|
154 |
+
AND (
|
155 |
+
( $wpdb->postmeta.meta_key = '_imagify_status' AND CAST( $wpdb->postmeta.meta_value AS CHAR ) = 'success' )
|
156 |
+
OR
|
157 |
+
( $wpdb->postmeta.meta_key = '_imagify_status' AND CAST( $wpdb->postmeta.meta_value AS CHAR ) = 'already_optimized' )
|
158 |
+
)"
|
159 |
);
|
160 |
|
161 |
return $count;
|
288 |
}
|
289 |
}
|
290 |
} else {
|
|
|
291 |
/**
|
292 |
* Filter the chunk size of the requests fetching the data.
|
293 |
* 15,000 seems to be a good balance between memory used, speed, and number of DB hits.
|
387 |
function imagify_calculate_total_size_images_library() {
|
388 |
global $wpdb;
|
389 |
|
390 |
+
$mime_types = get_imagify_mime_type();
|
391 |
+
$mime_types = esc_sql( $mime_types );
|
392 |
+
$mime_types = "'" . implode( "','", $mime_types ) . "'";
|
|
|
|
|
|
|
393 |
|
394 |
+
$image_ids = $wpdb->get_col( // WPCS: unprepared SQL ok.
|
395 |
+
"
|
396 |
+
SELECT ID
|
397 |
+
FROM $wpdb->posts
|
398 |
+
WHERE post_mime_type IN ( $mime_types )
|
399 |
+
AND post_type = 'attachment'
|
400 |
+
AND post_status = 'inherit'
|
401 |
+
LIMIT 250
|
402 |
+
" );
|
403 |
|
404 |
if ( ! $image_ids ) {
|
405 |
return 0;
|
431 |
'post_status' => 'inherit',
|
432 |
'post_mime_type' => $imagify_mime_types,
|
433 |
'posts_per_page' => 250,
|
434 |
+
'fields' => 'ids',
|
435 |
'date_query' => array(
|
436 |
array(
|
437 |
'before' => 'now',
|
438 |
'after' => '1 month ago',
|
439 |
),
|
440 |
),
|
|
|
441 |
) );
|
442 |
|
443 |
$partial_images_uploaded_two_months_ago = new WP_Query( array(
|
445 |
'post_status' => 'inherit',
|
446 |
'post_mime_type' => $imagify_mime_types,
|
447 |
'posts_per_page' => 250,
|
448 |
+
'fields' => 'ids',
|
449 |
'date_query' => array(
|
450 |
array(
|
451 |
'before' => '1 month ago',
|
452 |
'after' => '2 months ago',
|
453 |
),
|
454 |
),
|
|
|
455 |
) );
|
456 |
|
457 |
$partial_images_uploaded_three_months_ago = new WP_Query( array(
|
459 |
'post_status' => 'inherit',
|
460 |
'post_mime_type' => $imagify_mime_types,
|
461 |
'posts_per_page' => 250,
|
462 |
+
'fields' => 'ids',
|
463 |
'date_query' => array(
|
464 |
array(
|
465 |
'before' => '2 months ago',
|
466 |
'after' => '3 months ago',
|
467 |
),
|
468 |
),
|
|
|
469 |
) );
|
470 |
|
471 |
$partial_images_uploaded_id = array_merge( $partial_images_uploaded_last_month->posts, $partial_images_uploaded_two_months_ago->posts, $partial_images_uploaded_three_months_ago->posts );
|
479 |
'post_status' => 'inherit',
|
480 |
'post_mime_type' => $imagify_mime_types,
|
481 |
'posts_per_page' => -1,
|
482 |
+
'fields' => 'ids',
|
483 |
'date_query' => array(
|
484 |
array(
|
485 |
'before' => 'now',
|
486 |
'after' => '3 months ago',
|
487 |
),
|
488 |
),
|
|
|
489 |
) );
|
490 |
|
491 |
if ( ! $images_uploaded_id->posts ) {
|
492 |
return 0;
|
493 |
}
|
494 |
|
495 |
+
// Number of image attachments uploaded for the 3 latest months, limited to 250 per month.
|
496 |
$partial_total_images_uploaded = count( $partial_images_uploaded_id );
|
497 |
+
// Total number of image attachments uploaded for the 3 latest months.
|
498 |
+
$total_images_uploaded = (int) $images_uploaded_id->post_count;
|
499 |
$average_size_images_per_month = imagify_calculate_total_image_size( $partial_images_uploaded_id, $partial_total_images_uploaded, $total_images_uploaded ) / 3;
|
500 |
|
501 |
return $average_size_images_per_month;
|
508 |
* @author Remy Perona
|
509 |
*
|
510 |
* @param array $image_ids Array of image IDs.
|
511 |
+
* @param int $partial_total_images The number of image attachments we're doing the calculation with.
|
512 |
+
* @param int $total_images The total number of image attachments.
|
513 |
* @return int The estimated total size of images.
|
514 |
*/
|
515 |
function imagify_calculate_total_image_size( $image_ids, $partial_total_images, $total_images ) {
|
532 |
'statuses' => '_imagify_status',
|
533 |
), $image_ids );
|
534 |
|
535 |
+
// Number of image attachments we're doing the calculation with. In case array_filter() removed results.
|
536 |
+
$partial_total_images = count( $image_ids );
|
537 |
+
// Total size of unoptimized size.
|
538 |
$partial_size_images = 0;
|
539 |
// Total number of thumbnails.
|
540 |
$partial_total_intermediate_images = 0;
|
546 |
$attachment_status = isset( $results['statuses'][ $image_id ] ) ? $results['statuses'][ $image_id ] : false;
|
547 |
|
548 |
if ( 'success' === $attachment_status ) {
|
549 |
+
/**
|
550 |
+
* The image files have been optimized.
|
551 |
+
*/
|
552 |
+
// Original size.
|
553 |
$partial_size_images += isset( $results['imagify_data'][ $image_id ]['stats']['original_size'] ) ? $results['imagify_data'][ $image_id ]['stats']['original_size'] : 0;
|
554 |
+
// Number of thumbnails.
|
555 |
$partial_total_intermediate_images += count( $results['imagify_data'][ $image_id ]['sizes'] );
|
556 |
+
unset(
|
557 |
+
$image_ids[ $i ],
|
558 |
+
$results['filenames'][ $image_id ],
|
559 |
+
$results['data'][ $image_id ],
|
560 |
+
$results['imagify_data'][ $image_id ],
|
561 |
+
$results['statuses'][ $image_id ]
|
562 |
+
);
|
563 |
continue;
|
564 |
}
|
565 |
|
566 |
+
/**
|
567 |
+
* The image files are not optimized.
|
568 |
+
*/
|
569 |
// Create an array containing all this attachment files.
|
570 |
$files = array(
|
571 |
'full' => get_imagify_attached_file( $results['filenames'][ $image_id ] ),
|
577 |
$sizes = isset( $results['data'][ $image_id ]['sizes'] ) ? $results['data'][ $image_id ]['sizes'] : array();
|
578 |
|
579 |
if ( $sizes && is_array( $sizes ) ) {
|
|
|
|
|
580 |
if ( ! $is_active_for_network ) {
|
581 |
+
$sizes = array_diff_key( $sizes, $disallowed_sizes );
|
582 |
}
|
583 |
|
584 |
if ( $sizes ) {
|
585 |
+
$full_dirname = dirname( $files['full'] );
|
586 |
+
|
587 |
foreach ( $sizes as $size_key => $size_data ) {
|
588 |
+
$files[ $size_key ] = $full_dirname . '/' . $size_data['file'];
|
589 |
}
|
590 |
}
|
591 |
}
|
618 |
$partial_total_intermediate_images += count( $files );
|
619 |
}
|
620 |
|
621 |
+
unset(
|
622 |
+
$image_ids[ $i ],
|
623 |
+
$results['filenames'][ $image_id ],
|
624 |
+
$results['data'][ $image_id ],
|
625 |
+
$results['imagify_data'][ $image_id ],
|
626 |
+
$results['statuses'][ $image_id ]
|
627 |
+
);
|
628 |
} // End foreach().
|
629 |
|
630 |
+
// Number of thumbnails per attachment = Number of thumbnails / Number of attachments.
|
631 |
$intermediate_images_per_image = $partial_total_intermediate_images / $partial_total_images;
|
632 |
+
/**
|
633 |
+
* Note: Number of attachments ($partial_total_images) === Number of full sizes.
|
634 |
+
* Average image size = Size of the images / ( Number of full sizes + Number of thumbnails ).
|
635 |
+
* Average image size = Size of the images / Number of images.
|
636 |
+
*/
|
637 |
$average_size_images = $partial_size_images / ( $partial_total_images + $partial_total_intermediate_images );
|
638 |
+
/**
|
639 |
+
* Note: Total number of attachments ($total_images) === Total number of full sizes.
|
640 |
+
* Total images size = Average image size * ( Total number of full sizes + ( Number of thumbnails per attachment * Total number of attachments ) ).
|
641 |
+
* Total images size = Average image size * ( Total number of full sizes + Total number of thumbnails ).
|
642 |
+
*/
|
643 |
$total_size_images = $average_size_images * ( $total_images + ( $intermediate_images_per_image * $total_images ) );
|
644 |
|
645 |
return $total_size_images;
|
inc/functions/admin-ui.php
CHANGED
@@ -12,48 +12,61 @@ defined( 'ABSPATH' ) || die( 'Cheatin\' uh?' );
|
|
12 |
* @return string The output to print.
|
13 |
*/
|
14 |
function get_imagify_attachment_optimization_text( $attachment, $context = 'wp' ) {
|
15 |
-
global $pagenow;
|
16 |
|
17 |
-
$
|
18 |
-
$
|
19 |
-
$
|
|
|
|
|
20 |
$reoptimize_link = get_imagify_attachment_reoptimize_link( $attachment, $context );
|
|
|
21 |
$reoptimize_output = $reoptimize_link ? $reoptimize_link : '';
|
22 |
$reoptimize_output_before = '<div class="imagify-datas-actions-links">';
|
23 |
$reoptimize_output_after = '</div><!-- .imagify-datas-actions-links -->';
|
24 |
$error = get_imagify_attachment_error_text( $attachment, $context );
|
25 |
|
26 |
if ( $error ) {
|
27 |
-
if (
|
28 |
$reoptimize_output .= '<span class="attachment-has-backup hidden"></span>';
|
29 |
}
|
30 |
|
31 |
$reoptimize_output = $reoptimize_output_before . $reoptimize_output . $reoptimize_output_after;
|
32 |
|
33 |
-
return
|
34 |
}
|
35 |
|
36 |
$attachment_id = $attachment->id;
|
37 |
$data = $attachment->get_data();
|
38 |
$optimization_level = $attachment->get_optimization_level_label();
|
39 |
|
40 |
-
if (
|
41 |
$output .= $output_before . '<span class="data">' . __( 'New Filesize:', 'imagify' ) . '</span> <strong class="big">' . size_format( $data['sizes']['full']['optimized_size'], 2 ) . '</strong>' . $output_after;
|
42 |
}
|
43 |
|
44 |
-
$chart = '
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
49 |
|
50 |
$output .= $output_before;
|
51 |
$output .= '<span class="data">' . __( 'Original Saving:', 'imagify' ) . '</span> ';
|
52 |
-
$output .= '<strong>' .
|
53 |
$output .= $output_after;
|
54 |
|
55 |
// More details section.
|
56 |
-
if (
|
57 |
// New list.
|
58 |
$output .= '</ul>';
|
59 |
$output .= '<p class="imagify-datas-more-action">';
|
@@ -78,10 +91,10 @@ function get_imagify_attachment_optimization_text( $attachment, $context = 'wp'
|
|
78 |
}
|
79 |
|
80 |
// End of list.
|
81 |
-
$output .=
|
82 |
|
83 |
// Actions section.
|
84 |
-
$output .=
|
85 |
$output .= $reoptimize_output_before;
|
86 |
$output .= $reoptimize_output;
|
87 |
|
@@ -90,12 +103,13 @@ function get_imagify_attachment_optimization_text( $attachment, $context = 'wp'
|
|
90 |
'attachment_id' => $attachment_id,
|
91 |
'context' => $context,
|
92 |
);
|
93 |
-
$class =
|
94 |
-
$
|
|
|
95 |
$output .= '<span class="dashicons dashicons-image-rotate"></span>' . __( 'Restore Original', 'imagify' );
|
96 |
$output .= '</a>';
|
97 |
|
98 |
-
if (
|
99 |
$image = wp_get_attachment_image_src( $attachment_id, 'full' );
|
100 |
|
101 |
$output .= '<input id="imagify-original-src" type="hidden" value="' . esc_url( $attachment->get_backup_url() ) . '">';
|
@@ -107,7 +121,7 @@ function get_imagify_attachment_optimization_text( $attachment, $context = 'wp'
|
|
107 |
}
|
108 |
|
109 |
$output .= $reoptimize_output_after;
|
110 |
-
$output .=
|
111 |
|
112 |
return $output;
|
113 |
}
|
@@ -123,8 +137,9 @@ function get_imagify_attachment_optimization_text( $attachment, $context = 'wp'
|
|
123 |
* @return string The output to print.
|
124 |
*/
|
125 |
function get_imagify_attachment_error_text( $attachment, $context = 'wp' ) {
|
126 |
-
global $pagenow;
|
127 |
|
|
|
128 |
$attachment_id = $attachment->id;
|
129 |
$data = $attachment->get_data();
|
130 |
$output = '';
|
@@ -134,9 +149,10 @@ function get_imagify_attachment_error_text( $attachment, $context = 'wp' ) {
|
|
134 |
);
|
135 |
|
136 |
if ( isset( $data['sizes']['full']['success'] ) && ! $data['sizes']['full']['success'] ) {
|
137 |
-
$class =
|
138 |
-
$
|
139 |
-
$output .= '<
|
|
|
140 |
}
|
141 |
|
142 |
return $output;
|
@@ -153,7 +169,7 @@ function get_imagify_attachment_error_text( $attachment, $context = 'wp' ) {
|
|
153 |
* @return string The output to print.
|
154 |
*/
|
155 |
function get_imagify_attachment_reoptimize_link( $attachment, $context = 'wp' ) {
|
156 |
-
global $pagenow;
|
157 |
|
158 |
// Stop the process if the API key isn't valid.
|
159 |
if ( ! imagify_valid_key() ) {
|
@@ -167,6 +183,7 @@ function get_imagify_attachment_reoptimize_link( $attachment, $context = 'wp' )
|
|
167 |
return '';
|
168 |
}
|
169 |
|
|
|
170 |
$attachment_id = $attachment->id;
|
171 |
$level = $attachment->get_optimization_level();
|
172 |
$args = array(
|
@@ -174,12 +191,13 @@ function get_imagify_attachment_reoptimize_link( $attachment, $context = 'wp' )
|
|
174 |
'context' => $context,
|
175 |
);
|
176 |
$output = '';
|
177 |
-
$class =
|
|
|
178 |
|
179 |
// Re-optimize to Ultra.
|
180 |
if ( 1 === $level || 0 === $level ) {
|
181 |
$args['optimization_level'] = 2;
|
182 |
-
$output .= '<a href="' . esc_url( get_imagify_admin_url( 'manual-override-upload', $args ) ) . '"
|
183 |
/* translators: %s is an optimization level. */
|
184 |
$output .= '<span class="dashicons dashicons-admin-generic"></span><span class="imagify-hide-if-small">' . sprintf( __( 'Re-Optimize to %s', 'imagify' ), '</span>' . __( 'Ultra', 'imagify' ) . '<span class="imagify-hide-if-small">' ) . '</span>';
|
185 |
$output .= '</a>';
|
@@ -188,7 +206,7 @@ function get_imagify_attachment_reoptimize_link( $attachment, $context = 'wp' )
|
|
188 |
// Re-optimize to Aggressive.
|
189 |
if ( ( 2 === $level && ! $is_already_optimized ) || 0 === $level ) {
|
190 |
$args['optimization_level'] = 1;
|
191 |
-
$output .= '<a href="' . esc_url( get_imagify_admin_url( 'manual-override-upload', $args ) ) . '"
|
192 |
/* translators: %s is an optimization level. */
|
193 |
$output .= '<span class="dashicons dashicons-admin-generic"></span><span class="imagify-hide-if-small">' . sprintf( __( 'Re-Optimize to %s', 'imagify' ), '</span>' . __( 'Aggressive', 'imagify' ) . '<span class="imagify-hide-if-small">' ) . '</span>';
|
194 |
$output .= '</a>';
|
@@ -197,7 +215,7 @@ function get_imagify_attachment_reoptimize_link( $attachment, $context = 'wp' )
|
|
197 |
// Re-optimize to Normal.
|
198 |
if ( ( 2 === $level || 1 === $level ) && ! $is_already_optimized ) {
|
199 |
$args['optimization_level'] = 0;
|
200 |
-
$output .= '<a href="' . esc_url( get_imagify_admin_url( 'manual-override-upload', $args ) ) . '"
|
201 |
/* translators: %s is an optimization level. */
|
202 |
$output .= '<span class="dashicons dashicons-admin-generic"></span><span class="imagify-hide-if-small">' . sprintf( __( 'Re-Optimize to %s', 'imagify' ), '</span>' . __( 'Normal', 'imagify' ) . '<span class="imagify-hide-if-small">' ) . '</span>';
|
203 |
$output .= '</a>';
|
@@ -206,6 +224,53 @@ function get_imagify_attachment_reoptimize_link( $attachment, $context = 'wp' )
|
|
206 |
return $output;
|
207 |
}
|
208 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
209 |
/**
|
210 |
* Get all data to diplay for a specific attachment.
|
211 |
*
|
@@ -270,7 +335,7 @@ function get_imagify_media_column_content( $attachment, $context = 'wp' ) {
|
|
270 |
* @return string HTML.
|
271 |
*/
|
272 |
function get_imagify_new_to_imagify() {
|
273 |
-
if ( ! imagify_valid_key() ) {
|
274 |
return '';
|
275 |
}
|
276 |
|
12 |
* @return string The output to print.
|
13 |
*/
|
14 |
function get_imagify_attachment_optimization_text( $attachment, $context = 'wp' ) {
|
15 |
+
global $pagenow, $typenow;
|
16 |
|
17 |
+
$is_media_page = 'post.php' === $pagenow && 'attachment' === $typenow;
|
18 |
+
$is_library_page = 'upload.php' === $pagenow;
|
19 |
+
$output = $is_media_page ? '' : '<ul class="imagify-datas-list">';
|
20 |
+
$output_before = $is_media_page ? '<div class="misc-pub-section misc-pub-imagify imagify-data-item">' : '<li class="imagify-data-item">';
|
21 |
+
$output_after = $is_media_page ? '</div>' : '</li>';
|
22 |
$reoptimize_link = get_imagify_attachment_reoptimize_link( $attachment, $context );
|
23 |
+
$reoptimize_link .= get_imagify_attachment_optimize_missing_thumbnails_link( $attachment, $context );
|
24 |
$reoptimize_output = $reoptimize_link ? $reoptimize_link : '';
|
25 |
$reoptimize_output_before = '<div class="imagify-datas-actions-links">';
|
26 |
$reoptimize_output_after = '</div><!-- .imagify-datas-actions-links -->';
|
27 |
$error = get_imagify_attachment_error_text( $attachment, $context );
|
28 |
|
29 |
if ( $error ) {
|
30 |
+
if ( ! $is_media_page && $reoptimize_link && $attachment->has_backup() ) {
|
31 |
$reoptimize_output .= '<span class="attachment-has-backup hidden"></span>';
|
32 |
}
|
33 |
|
34 |
$reoptimize_output = $reoptimize_output_before . $reoptimize_output . $reoptimize_output_after;
|
35 |
|
36 |
+
return $is_media_page ? $output_before . $error . $reoptimize_output . $output_after : $error . $reoptimize_output;
|
37 |
}
|
38 |
|
39 |
$attachment_id = $attachment->id;
|
40 |
$data = $attachment->get_data();
|
41 |
$optimization_level = $attachment->get_optimization_level_label();
|
42 |
|
43 |
+
if ( ! $is_media_page ) {
|
44 |
$output .= $output_before . '<span class="data">' . __( 'New Filesize:', 'imagify' ) . '</span> <strong class="big">' . size_format( $data['sizes']['full']['optimized_size'], 2 ) . '</strong>' . $output_after;
|
45 |
}
|
46 |
|
47 |
+
$chart = '';
|
48 |
+
|
49 |
+
if ( ! $is_media_page ) {
|
50 |
+
if ( ! $is_library_page ) {
|
51 |
+
// No need to print this on the library page, the event whould be triggered before the handler is attached (the JS file is loaded in the footer).
|
52 |
+
$chart = '<script type="text/javascript">jQuery( window ).trigger( "canvasprinted.imagify", [ ".imagify-consumption-chart-' . $attachment_id . '" ] ); </script>';
|
53 |
+
}
|
54 |
+
|
55 |
+
$chart = '<span class="imagify-chart">
|
56 |
+
<span class="imagify-chart-container">
|
57 |
+
<canvas class="imagify-consumption-chart imagify-consumption-chart-' . $attachment_id . '" width="15" height="15"></canvas>
|
58 |
+
' . $chart . '
|
59 |
+
</span>
|
60 |
+
</span>';
|
61 |
+
}
|
62 |
|
63 |
$output .= $output_before;
|
64 |
$output .= '<span class="data">' . __( 'Original Saving:', 'imagify' ) . '</span> ';
|
65 |
+
$output .= '<strong>' . $chart . '<span class="imagify-chart-value">' . $data['sizes']['full']['percent'] . '</span>%</strong>';
|
66 |
$output .= $output_after;
|
67 |
|
68 |
// More details section.
|
69 |
+
if ( ! $is_media_page ) {
|
70 |
// New list.
|
71 |
$output .= '</ul>';
|
72 |
$output .= '<p class="imagify-datas-more-action">';
|
91 |
}
|
92 |
|
93 |
// End of list.
|
94 |
+
$output .= $is_media_page ? '' : '</ul>';
|
95 |
|
96 |
// Actions section.
|
97 |
+
$output .= $is_media_page ? $output_before : '';
|
98 |
$output .= $reoptimize_output_before;
|
99 |
$output .= $reoptimize_output;
|
100 |
|
103 |
'attachment_id' => $attachment_id,
|
104 |
'context' => $context,
|
105 |
);
|
106 |
+
$class = $is_media_page ? '' : ' class="button-imagify-restore attachment-has-backup"';
|
107 |
+
$waiting = $is_media_page ? '' : ' data-waiting-label="' . esc_attr__( 'Optimizing...', 'imagify' ) . '"';
|
108 |
+
$output .= '<a id="imagify-restore-' . $attachment_id . '" href="' . get_imagify_admin_url( 'restore-upload', $args ) . '"' . $class . $waiting . '>';
|
109 |
$output .= '<span class="dashicons dashicons-image-rotate"></span>' . __( 'Restore Original', 'imagify' );
|
110 |
$output .= '</a>';
|
111 |
|
112 |
+
if ( ! $is_library_page ) {
|
113 |
$image = wp_get_attachment_image_src( $attachment_id, 'full' );
|
114 |
|
115 |
$output .= '<input id="imagify-original-src" type="hidden" value="' . esc_url( $attachment->get_backup_url() ) . '">';
|
121 |
}
|
122 |
|
123 |
$output .= $reoptimize_output_after;
|
124 |
+
$output .= $is_media_page ? $output_after : '';
|
125 |
|
126 |
return $output;
|
127 |
}
|
137 |
* @return string The output to print.
|
138 |
*/
|
139 |
function get_imagify_attachment_error_text( $attachment, $context = 'wp' ) {
|
140 |
+
global $pagenow, $typenow;
|
141 |
|
142 |
+
$is_media_page = 'post.php' === $pagenow && 'attachment' === $typenow;
|
143 |
$attachment_id = $attachment->id;
|
144 |
$data = $attachment->get_data();
|
145 |
$output = '';
|
149 |
);
|
150 |
|
151 |
if ( isset( $data['sizes']['full']['success'] ) && ! $data['sizes']['full']['success'] ) {
|
152 |
+
$class = $is_media_page ? '' : ' button-imagify-manual-upload';
|
153 |
+
$waiting = $is_media_page ? '' : ' data-waiting-label="' . esc_attr__( 'Optimizing...', 'imagify' ) . '"';
|
154 |
+
$output .= '<strong>' . imagify_translate_api_message( $data['sizes']['full']['error'] ) . '</strong><br/>';
|
155 |
+
$output .= '<a id="imagify-upload-' . $attachment_id . '" class="button' . $class . '" href="' . esc_url( get_imagify_admin_url( 'manual-upload', $args ) ) . '"' . $waiting . '>' . __( 'Try again', 'imagify' ) . '</a>';
|
156 |
}
|
157 |
|
158 |
return $output;
|
169 |
* @return string The output to print.
|
170 |
*/
|
171 |
function get_imagify_attachment_reoptimize_link( $attachment, $context = 'wp' ) {
|
172 |
+
global $pagenow, $typenow;
|
173 |
|
174 |
// Stop the process if the API key isn't valid.
|
175 |
if ( ! imagify_valid_key() ) {
|
183 |
return '';
|
184 |
}
|
185 |
|
186 |
+
$is_media_page = 'post.php' === $pagenow && 'attachment' === $typenow;
|
187 |
$attachment_id = $attachment->id;
|
188 |
$level = $attachment->get_optimization_level();
|
189 |
$args = array(
|
191 |
'context' => $context,
|
192 |
);
|
193 |
$output = '';
|
194 |
+
$class = $is_media_page ? '' : ' class="button-imagify-manual-override-upload"';
|
195 |
+
$waiting = $is_media_page ? '' : ' data-waiting-label="' . esc_attr__( 'Optimizing...', 'imagify' ) . '"';
|
196 |
|
197 |
// Re-optimize to Ultra.
|
198 |
if ( 1 === $level || 0 === $level ) {
|
199 |
$args['optimization_level'] = 2;
|
200 |
+
$output .= '<a href="' . esc_url( get_imagify_admin_url( 'manual-override-upload', $args ) ) . '"' . $class . $waiting . '>';
|
201 |
/* translators: %s is an optimization level. */
|
202 |
$output .= '<span class="dashicons dashicons-admin-generic"></span><span class="imagify-hide-if-small">' . sprintf( __( 'Re-Optimize to %s', 'imagify' ), '</span>' . __( 'Ultra', 'imagify' ) . '<span class="imagify-hide-if-small">' ) . '</span>';
|
203 |
$output .= '</a>';
|
206 |
// Re-optimize to Aggressive.
|
207 |
if ( ( 2 === $level && ! $is_already_optimized ) || 0 === $level ) {
|
208 |
$args['optimization_level'] = 1;
|
209 |
+
$output .= '<a href="' . esc_url( get_imagify_admin_url( 'manual-override-upload', $args ) ) . '"' . $class . $waiting . '>';
|
210 |
/* translators: %s is an optimization level. */
|
211 |
$output .= '<span class="dashicons dashicons-admin-generic"></span><span class="imagify-hide-if-small">' . sprintf( __( 'Re-Optimize to %s', 'imagify' ), '</span>' . __( 'Aggressive', 'imagify' ) . '<span class="imagify-hide-if-small">' ) . '</span>';
|
212 |
$output .= '</a>';
|
215 |
// Re-optimize to Normal.
|
216 |
if ( ( 2 === $level || 1 === $level ) && ! $is_already_optimized ) {
|
217 |
$args['optimization_level'] = 0;
|
218 |
+
$output .= '<a href="' . esc_url( get_imagify_admin_url( 'manual-override-upload', $args ) ) . '"' . $class . $waiting . '>';
|
219 |
/* translators: %s is an optimization level. */
|
220 |
$output .= '<span class="dashicons dashicons-admin-generic"></span><span class="imagify-hide-if-small">' . sprintf( __( 'Re-Optimize to %s', 'imagify' ), '</span>' . __( 'Normal', 'imagify' ) . '<span class="imagify-hide-if-small">' ) . '</span>';
|
221 |
$output .= '</a>';
|
224 |
return $output;
|
225 |
}
|
226 |
|
227 |
+
/**
|
228 |
+
* Get the link to optimize missing thumbnail sizes for a specific attachment.
|
229 |
+
*
|
230 |
+
* @since 1.6.10
|
231 |
+
* @author Grégory Viguier
|
232 |
+
*
|
233 |
+
* @param object $attachment The attachement object.
|
234 |
+
* @param string $context A context.
|
235 |
+
* @return string The output to print.
|
236 |
+
*/
|
237 |
+
function get_imagify_attachment_optimize_missing_thumbnails_link( $attachment, $context = 'wp' ) {
|
238 |
+
/**
|
239 |
+
* Allow to not display the "Optimize missing thumbnails" link.
|
240 |
+
*
|
241 |
+
* @since 1.6.10
|
242 |
+
* @author Grégory Viguier
|
243 |
+
*
|
244 |
+
* @param bool $display True to display the link. False to not display it.
|
245 |
+
* @param object $attachment The attachement object.
|
246 |
+
* @param string $context The context.
|
247 |
+
*/
|
248 |
+
$display = apply_filters( 'imagify_display_missing_thumbnails_link', true, $attachment, $context );
|
249 |
+
|
250 |
+
// Stop the process if the filter is false or if the API key isn't valid.
|
251 |
+
if ( ! $display || ! imagify_valid_key() ) {
|
252 |
+
return '';
|
253 |
+
}
|
254 |
+
|
255 |
+
$missing_sizes = $attachment->get_unoptimized_sizes();
|
256 |
+
|
257 |
+
if ( ! $missing_sizes ) {
|
258 |
+
return '';
|
259 |
+
}
|
260 |
+
|
261 |
+
$url = get_imagify_admin_url( 'optimize-missing-sizes', array(
|
262 |
+
'attachment_id' => $attachment->id,
|
263 |
+
'context' => $context,
|
264 |
+
) );
|
265 |
+
|
266 |
+
$output = '<a href="' . esc_url( $url ) . '" id="imagify-optimize_missing_sizes-' . $attachment->id . '" class="button-imagify-optimize-missing-sizes" data-waiting-label="' . esc_attr__( 'Optimizing...', 'imagify' ) . '">';
|
267 |
+
/* translators: 1 is the number of thumbnails to optimize, 2 is the opening of a HTML tag that will be hidden on small screens, 3 is the closing tag. */
|
268 |
+
$output .= '<span class="dashicons dashicons-admin-generic"></span>' . sprintf( _n( '%2$sOptimize %3$s%1$d missing thumbnail', '%2$sOptimize %3$s%1$d missing thumbnails', count( $missing_sizes ), 'imagify' ), count( $missing_sizes ), '<span class="imagify-hide-if-small">', '</span>' );
|
269 |
+
$output .= '</a>';
|
270 |
+
|
271 |
+
return $output;
|
272 |
+
}
|
273 |
+
|
274 |
/**
|
275 |
* Get all data to diplay for a specific attachment.
|
276 |
*
|
335 |
* @return string HTML.
|
336 |
*/
|
337 |
function get_imagify_new_to_imagify() {
|
338 |
+
if ( ! current_user_can( imagify_get_capacity() ) || ! imagify_valid_key() ) {
|
339 |
return '';
|
340 |
}
|
341 |
|
inc/functions/admin.php
CHANGED
@@ -29,6 +29,68 @@ function imagify_is_active_for_network() {
|
|
29 |
return $is;
|
30 |
}
|
31 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
32 |
/**
|
33 |
* Get the URL related to specific admin page or action.
|
34 |
*
|
@@ -49,6 +111,9 @@ function get_imagify_admin_url( $action = 'options-general', $arg = array() ) {
|
|
49 |
case 'manual-override-upload':
|
50 |
return wp_nonce_url( admin_url( 'admin-post.php?action=imagify_manual_override_upload&attachment_id=' . $id . '&optimization_level=' . $level . '&context=' . $context ), 'imagify-manual-override-upload' );
|
51 |
|
|
|
|
|
|
|
52 |
case 'manual-upload':
|
53 |
return wp_nonce_url( admin_url( 'admin-post.php?action=imagify_manual_upload&attachment_id=' . $id . '&context=' . $context ), 'imagify-manual-upload' );
|
54 |
|
@@ -56,7 +121,7 @@ function get_imagify_admin_url( $action = 'options-general', $arg = array() ) {
|
|
56 |
return wp_nonce_url( admin_url( 'admin-post.php?action=imagify_restore_upload&attachment_id=' . $id . '&context=' . $context ), 'imagify-restore-upload' );
|
57 |
|
58 |
case 'dismiss-notice':
|
59 |
-
return wp_nonce_url( admin_url( 'admin-post.php?action=imagify_dismiss_notice¬ice=' . $arg ),
|
60 |
|
61 |
case 'bulk-optimization':
|
62 |
return admin_url( 'upload.php?page=' . IMAGIFY_SLUG . '-bulk-optimization' );
|
@@ -75,32 +140,17 @@ function get_imagify_admin_url( $action = 'options-general', $arg = array() ) {
|
|
75 |
* @return array An array containing the max width and height.
|
76 |
*/
|
77 |
function get_imagify_max_intermediate_image_size() {
|
78 |
-
global $_wp_additional_image_sizes;
|
79 |
-
|
80 |
$width = 0;
|
81 |
$height = 0;
|
82 |
$limit = 9999;
|
83 |
-
$sizes = array( 'thumbnail' => 1, 'medium' => 1, 'large' => 1 );
|
84 |
-
$get_intermediate_image_sizes = get_intermediate_image_sizes();
|
85 |
-
|
86 |
-
// Create the full array with sizes and crop info.
|
87 |
-
foreach ( $get_intermediate_image_sizes as $_size ) {
|
88 |
-
if ( isset( $sizes[ $_size ] ) ) {
|
89 |
-
$_size_width = get_option( $_size . '_size_w' );
|
90 |
-
$_size_height = get_option( $_size . '_size_h' );
|
91 |
-
} elseif ( isset( $_wp_additional_image_sizes[ $_size ] ) ) {
|
92 |
-
$_size_width = $_wp_additional_image_sizes[ $_size ]['width'];
|
93 |
-
$_size_height = $_wp_additional_image_sizes[ $_size ]['height'];
|
94 |
-
} else {
|
95 |
-
continue;
|
96 |
-
}
|
97 |
|
98 |
-
|
99 |
-
|
|
|
100 |
}
|
101 |
|
102 |
-
if ( $
|
103 |
-
$height =
|
104 |
}
|
105 |
}
|
106 |
|
@@ -284,3 +334,124 @@ function imagify_get_wp_rocket_url( $path = false, $query = array() ) {
|
|
284 |
|
285 |
return add_query_arg( $query, $wprocket_url );
|
286 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
29 |
return $is;
|
30 |
}
|
31 |
|
32 |
+
/**
|
33 |
+
* Tell if the current screen is what we're looking for.
|
34 |
+
*
|
35 |
+
* @since 1.6.10
|
36 |
+
* @author Grégory Viguier
|
37 |
+
*
|
38 |
+
* @param string $identifier The screen "name".
|
39 |
+
* @return bool
|
40 |
+
*/
|
41 |
+
function imagify_is_screen( $identifier ) {
|
42 |
+
global $post_id;
|
43 |
+
|
44 |
+
if ( ! $identifier ) {
|
45 |
+
return false;
|
46 |
+
}
|
47 |
+
|
48 |
+
$current_screen = get_current_screen();
|
49 |
+
|
50 |
+
if ( ! $current_screen || ! $current_screen->in_admin() ) {
|
51 |
+
return false;
|
52 |
+
}
|
53 |
+
|
54 |
+
switch ( $identifier ) {
|
55 |
+
case 'imagify-settings':
|
56 |
+
// Imagify Settings or Imagify Network Settings.
|
57 |
+
return 'settings_page_' . IMAGIFY_SLUG === $current_screen->id || 'settings_page_' . IMAGIFY_SLUG . '-network' === $current_screen->id;
|
58 |
+
|
59 |
+
case 'imagify-network-settings':
|
60 |
+
// Imagify Network Settings.
|
61 |
+
return 'settings_page_' . IMAGIFY_SLUG . '-network' === $current_screen->id;
|
62 |
+
|
63 |
+
case 'library':
|
64 |
+
// Media Library.
|
65 |
+
return 'upload' === $current_screen->id;
|
66 |
+
|
67 |
+
case 'upload':
|
68 |
+
// Upload New Media.
|
69 |
+
return 'media' === $current_screen->id;
|
70 |
+
|
71 |
+
case 'post':
|
72 |
+
// Edit Post, Page, Attachment, etc.
|
73 |
+
return 'post' === $current_screen->base;
|
74 |
+
|
75 |
+
case 'attachment':
|
76 |
+
case 'post-attachment':
|
77 |
+
// Edit Attachment.
|
78 |
+
return 'post' === $current_screen->base && 'attachment' === $current_screen->id && $post_id && imagify_is_attachment_mime_type_supported( $post_id );
|
79 |
+
|
80 |
+
case 'bulk':
|
81 |
+
case 'bulk-optimization':
|
82 |
+
// Bulk Optimization.
|
83 |
+
return 'media_page_' . IMAGIFY_SLUG . '-bulk-optimization' === $current_screen->id;
|
84 |
+
|
85 |
+
case 'media-modal':
|
86 |
+
// Media modal.
|
87 |
+
return did_action( 'wp_enqueue_media' ) || doing_filter( 'wp_enqueue_media' );
|
88 |
+
|
89 |
+
default:
|
90 |
+
return $identifier === $current_screen->id;
|
91 |
+
}
|
92 |
+
}
|
93 |
+
|
94 |
/**
|
95 |
* Get the URL related to specific admin page or action.
|
96 |
*
|
111 |
case 'manual-override-upload':
|
112 |
return wp_nonce_url( admin_url( 'admin-post.php?action=imagify_manual_override_upload&attachment_id=' . $id . '&optimization_level=' . $level . '&context=' . $context ), 'imagify-manual-override-upload' );
|
113 |
|
114 |
+
case 'optimize-missing-sizes':
|
115 |
+
return wp_nonce_url( admin_url( 'admin-post.php?action=imagify_optimize_missing_sizes&attachment_id=' . $id . '&context=' . $context ), 'imagify-optimize-missing-sizes' );
|
116 |
+
|
117 |
case 'manual-upload':
|
118 |
return wp_nonce_url( admin_url( 'admin-post.php?action=imagify_manual_upload&attachment_id=' . $id . '&context=' . $context ), 'imagify-manual-upload' );
|
119 |
|
121 |
return wp_nonce_url( admin_url( 'admin-post.php?action=imagify_restore_upload&attachment_id=' . $id . '&context=' . $context ), 'imagify-restore-upload' );
|
122 |
|
123 |
case 'dismiss-notice':
|
124 |
+
return wp_nonce_url( admin_url( 'admin-post.php?action=imagify_dismiss_notice¬ice=' . $arg ), Imagify_Notices::DISMISS_NONCE_ACTION );
|
125 |
|
126 |
case 'bulk-optimization':
|
127 |
return admin_url( 'upload.php?page=' . IMAGIFY_SLUG . '-bulk-optimization' );
|
140 |
* @return array An array containing the max width and height.
|
141 |
*/
|
142 |
function get_imagify_max_intermediate_image_size() {
|
|
|
|
|
143 |
$width = 0;
|
144 |
$height = 0;
|
145 |
$limit = 9999;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
146 |
|
147 |
+
foreach ( get_imagify_thumbnail_sizes() as $_size ) {
|
148 |
+
if ( $_size['width'] > $width && $_size['width'] < $limit ) {
|
149 |
+
$width = $_size['width'];
|
150 |
}
|
151 |
|
152 |
+
if ( $_size['height'] > $height && $_size['height'] < $limit ) {
|
153 |
+
$height = $_size['height'];
|
154 |
}
|
155 |
}
|
156 |
|
334 |
|
335 |
return add_query_arg( $query, $wprocket_url );
|
336 |
}
|
337 |
+
|
338 |
+
/**
|
339 |
+
* Check for nonce.
|
340 |
+
*
|
341 |
+
* @since 1.6.10
|
342 |
+
* @author Grégory Viguier
|
343 |
+
*
|
344 |
+
* @param string $action Action nonce.
|
345 |
+
* @param string|bool $query_arg Optional. Key to check for the nonce in `$_REQUEST`. If false, `$_REQUEST` values will be evaluated for '_ajax_nonce', and '_wpnonce' (in that order). Default false.
|
346 |
+
*/
|
347 |
+
function imagify_check_nonce( $action, $query_arg = false ) {
|
348 |
+
if ( ! check_ajax_referer( $action, $query_arg, false ) ) {
|
349 |
+
imagify_die();
|
350 |
+
}
|
351 |
+
}
|
352 |
+
|
353 |
+
/**
|
354 |
+
* Check for user capacity.
|
355 |
+
*
|
356 |
+
* @since 1.6.10
|
357 |
+
* @author Grégory Viguier
|
358 |
+
*
|
359 |
+
* @param string $capacity A user capacity.
|
360 |
+
* @param int $post_id A post ID.
|
361 |
+
*/
|
362 |
+
function imagify_check_user_capacity( $capacity = null, $post_id = null ) {
|
363 |
+
if ( ! isset( $capacity ) ) {
|
364 |
+
$capacity = imagify_get_capacity();
|
365 |
+
}
|
366 |
+
|
367 |
+
if ( ! current_user_can( $capacity, $post_id ) ) {
|
368 |
+
imagify_die();
|
369 |
+
}
|
370 |
+
}
|
371 |
+
|
372 |
+
/**
|
373 |
+
* Die Today.
|
374 |
+
*
|
375 |
+
* @since 1.6.10
|
376 |
+
* @author Grégory Viguier
|
377 |
+
*
|
378 |
+
* @param string $message A message to display.
|
379 |
+
*/
|
380 |
+
function imagify_die( $message = null ) {
|
381 |
+
if ( ! isset( $message ) ) {
|
382 |
+
/* translators: This sentense already exists in WordPress. */
|
383 |
+
$message = __( 'Sorry, you are not allowed to do that.', 'imagify' );
|
384 |
+
} elseif ( is_wp_error( $message ) ) {
|
385 |
+
$message = imagify_translate_api_message( $message->get_error_message() );
|
386 |
+
}
|
387 |
+
|
388 |
+
if ( is_array( $message ) ) {
|
389 |
+
if ( ! empty( $message['error'] ) ) {
|
390 |
+
$message['error'] = imagify_translate_api_message( $message['error'] );
|
391 |
+
} elseif ( ! empty( $message['detail'] ) ) {
|
392 |
+
$message['detail'] = imagify_translate_api_message( $message['detail'] );
|
393 |
+
}
|
394 |
+
}
|
395 |
+
|
396 |
+
if ( defined( 'DOING_AJAX' ) ) {
|
397 |
+
wp_send_json_error( $message );
|
398 |
+
}
|
399 |
+
|
400 |
+
if ( is_array( $message ) ) {
|
401 |
+
if ( ! empty( $message['error'] ) ) {
|
402 |
+
$message = $message['error'];
|
403 |
+
} elseif ( ! empty( $message['detail'] ) ) {
|
404 |
+
$message = $message['detail'];
|
405 |
+
} else {
|
406 |
+
$message = reset( $message );
|
407 |
+
}
|
408 |
+
}
|
409 |
+
|
410 |
+
if ( wp_get_referer() ) {
|
411 |
+
$message .= '</p><p>';
|
412 |
+
$message .= sprintf( '<a href="%s">%s</a>',
|
413 |
+
esc_url( remove_query_arg( 'updated', wp_get_referer() ) ),
|
414 |
+
/* translators: This sentense already exists in WordPress. */
|
415 |
+
__( 'Go back', 'imagify' )
|
416 |
+
);
|
417 |
+
}
|
418 |
+
|
419 |
+
/* translators: %s is the plugin name. */
|
420 |
+
wp_die( $message, sprintf( __( '%s Failure Notice', 'imagify' ), 'Imagify' ), 403 );
|
421 |
+
}
|
422 |
+
|
423 |
+
/**
|
424 |
+
* Redirect if not an ajax request.
|
425 |
+
*
|
426 |
+
* @since 1.6.10
|
427 |
+
* @author Grégory Viguier
|
428 |
+
*
|
429 |
+
* @param string $message A message to display in an admin notice once redirected.
|
430 |
+
* @param array|string $args_or_url An array of query args to add to the redirection URL. If a string, the complete URL.
|
431 |
+
*/
|
432 |
+
function imagify_maybe_redirect( $message = false, $args_or_url = array() ) {
|
433 |
+
if ( defined( 'DOING_AJAX' ) ) {
|
434 |
+
return;
|
435 |
+
}
|
436 |
+
|
437 |
+
if ( $args_or_url && is_array( $args_or_url ) ) {
|
438 |
+
$redirect = add_query_arg( $args_or_url, wp_get_referer() );
|
439 |
+
} elseif ( $args_or_url && is_string( $args_or_url ) ) {
|
440 |
+
$redirect = $args_or_url;
|
441 |
+
} else {
|
442 |
+
$redirect = wp_get_referer();
|
443 |
+
}
|
444 |
+
|
445 |
+
/**
|
446 |
+
* Filter the URL to redirect to.
|
447 |
+
*
|
448 |
+
* @since 1.6.10
|
449 |
+
* @author Grégory Viguier
|
450 |
+
*
|
451 |
+
* @param string $redirect The URL to redirect to.
|
452 |
+
*/
|
453 |
+
$redirect = apply_filters( 'imagify_redirect_to', $redirect );
|
454 |
+
|
455 |
+
wp_safe_redirect( esc_url_raw( $redirect ) );
|
456 |
+
die();
|
457 |
+
}
|
inc/functions/api.php
CHANGED
@@ -1,6 +1,160 @@
|
|
1 |
<?php
|
2 |
defined( 'ABSPATH' ) || die( 'Cheatin\' uh?' );
|
3 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
/**
|
5 |
* Check if external requests are blocked for Imagify.
|
6 |
*
|
@@ -31,29 +185,110 @@ function is_imagify_blocked() {
|
|
31 |
* @return bool True if the Imagify API is available.
|
32 |
*/
|
33 |
function is_imagify_servers_up() {
|
34 |
-
static $
|
35 |
|
36 |
-
if ( isset( $
|
37 |
-
return $
|
38 |
}
|
39 |
|
40 |
$transient_name = 'imagify_check_api_version';
|
41 |
$transient_expiration = 3 * MINUTE_IN_SECONDS;
|
42 |
|
43 |
if ( get_site_transient( $transient_name ) ) {
|
44 |
-
$
|
45 |
-
return $
|
46 |
}
|
47 |
|
48 |
if ( is_wp_error( get_imagify_api_version() ) ) {
|
49 |
set_site_transient( $transient_name, 0, $transient_expiration );
|
50 |
|
51 |
-
$
|
52 |
-
return $
|
53 |
}
|
54 |
|
55 |
set_site_transient( $transient_name, 1, $transient_expiration );
|
56 |
|
57 |
-
$
|
58 |
-
return $
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
59 |
}
|
1 |
<?php
|
2 |
defined( 'ABSPATH' ) || die( 'Cheatin\' uh?' );
|
3 |
|
4 |
+
/**
|
5 |
+
* Create a new user on Imagify.
|
6 |
+
*
|
7 |
+
* @param array $data All user data.
|
8 |
+
* @return object
|
9 |
+
*/
|
10 |
+
function add_imagify_user( $data ) {
|
11 |
+
return imagify()->create_user( $data );
|
12 |
+
}
|
13 |
+
|
14 |
+
/**
|
15 |
+
* Update your Imagify account.
|
16 |
+
*
|
17 |
+
* @param string $data All user data.
|
18 |
+
* @return object
|
19 |
+
*/
|
20 |
+
function update_imagify_user( $data ) {
|
21 |
+
return imagify()->update_user( $data );
|
22 |
+
}
|
23 |
+
|
24 |
+
/**
|
25 |
+
* Get your Imagify account infos.
|
26 |
+
*
|
27 |
+
* @return object
|
28 |
+
*/
|
29 |
+
function get_imagify_user() {
|
30 |
+
return imagify()->get_user();
|
31 |
+
}
|
32 |
+
|
33 |
+
/**
|
34 |
+
* Get the Imagify API version.
|
35 |
+
*
|
36 |
+
* @return object
|
37 |
+
*/
|
38 |
+
function get_imagify_api_version() {
|
39 |
+
return imagify()->get_api_version();
|
40 |
+
}
|
41 |
+
|
42 |
+
/**
|
43 |
+
* Check your Imagify API key status.
|
44 |
+
*
|
45 |
+
* @param string $data An API key.
|
46 |
+
* @return bool
|
47 |
+
*/
|
48 |
+
function get_imagify_status( $data ) {
|
49 |
+
return imagify()->get_status( $data );
|
50 |
+
}
|
51 |
+
|
52 |
+
/**
|
53 |
+
* Optimize an image by uploading it on Imagify.
|
54 |
+
*
|
55 |
+
* @param array $data All image data.
|
56 |
+
* @return object
|
57 |
+
*/
|
58 |
+
function fetch_imagify_image( $data ) {
|
59 |
+
return imagify()->fetch_image( $data );
|
60 |
+
}
|
61 |
+
|
62 |
+
/**
|
63 |
+
* Optimize an image by sharing its URL on Imagify.
|
64 |
+
*
|
65 |
+
* @since 1.6.7 $data['image'] can contain the file path (prefered) or the result of `curl_file_create()`.
|
66 |
+
*
|
67 |
+
* @param array $data All image data.
|
68 |
+
* @return object
|
69 |
+
*/
|
70 |
+
function upload_imagify_image( $data ) {
|
71 |
+
return imagify()->upload_image( $data );
|
72 |
+
}
|
73 |
+
|
74 |
+
/**
|
75 |
+
* Get Imagify Plans Prices.
|
76 |
+
*
|
77 |
+
* @since 1.5
|
78 |
+
* @author Geoffrey Crofte
|
79 |
+
*
|
80 |
+
* @return object
|
81 |
+
*/
|
82 |
+
function get_imagify_plans_prices() {
|
83 |
+
return imagify()->get_plans_prices();
|
84 |
+
}
|
85 |
+
|
86 |
+
/**
|
87 |
+
* Get Imagify Plans Prices.
|
88 |
+
*
|
89 |
+
* @since 1.5
|
90 |
+
* @author Geoffrey Crofte
|
91 |
+
*
|
92 |
+
* @return object
|
93 |
+
*/
|
94 |
+
function get_imagify_packs_prices() {
|
95 |
+
return imagify()->get_packs_prices();
|
96 |
+
}
|
97 |
+
|
98 |
+
/**
|
99 |
+
* Get Imagify All Prices (plan & packs).
|
100 |
+
*
|
101 |
+
* @since 1.5.4
|
102 |
+
* @author Geoffrey Crofte
|
103 |
+
*
|
104 |
+
* @return object
|
105 |
+
*/
|
106 |
+
function get_imagify_all_prices() {
|
107 |
+
return imagify()->get_all_prices();
|
108 |
+
}
|
109 |
+
|
110 |
+
/**
|
111 |
+
* Check if Coupon Code exists.
|
112 |
+
*
|
113 |
+
* @since 1.6
|
114 |
+
* @author Geoffrey Crofte
|
115 |
+
*
|
116 |
+
* @param string $coupon the coupon code to check.
|
117 |
+
* @return object
|
118 |
+
*/
|
119 |
+
function check_imagify_coupon_code( $coupon ) {
|
120 |
+
return imagify()->check_coupon_code( $coupon );
|
121 |
+
}
|
122 |
+
|
123 |
+
/**
|
124 |
+
* Check if Discount/Promotion is available.
|
125 |
+
*
|
126 |
+
* @since 1.6.3
|
127 |
+
* @author Geoffrey Crofte
|
128 |
+
*
|
129 |
+
* @return object
|
130 |
+
*/
|
131 |
+
function check_imagify_discount() {
|
132 |
+
return imagify()->check_discount();
|
133 |
+
}
|
134 |
+
|
135 |
+
/**
|
136 |
+
* Get Maximum image size for free plan.
|
137 |
+
*
|
138 |
+
* @since 1.5.6
|
139 |
+
* @author Remy Perona
|
140 |
+
*
|
141 |
+
* @return string
|
142 |
+
*/
|
143 |
+
function get_imagify_max_image_size() {
|
144 |
+
$max_image_size = get_transient( 'imagify_max_image_size' );
|
145 |
+
|
146 |
+
if ( false === $max_image_size ) {
|
147 |
+
$max_image_size = imagify()->get_public_info();
|
148 |
+
|
149 |
+
if ( ! is_wp_error( $max_image_size ) ) {
|
150 |
+
$max_image_size = $max_image_size->max_image_size;
|
151 |
+
set_transient( 'imagify_max_image_size', $max_image_size, 6 * HOUR_IN_SECONDS );
|
152 |
+
}
|
153 |
+
}
|
154 |
+
|
155 |
+
return $max_image_size;
|
156 |
+
}
|
157 |
+
|
158 |
/**
|
159 |
* Check if external requests are blocked for Imagify.
|
160 |
*
|
185 |
* @return bool True if the Imagify API is available.
|
186 |
*/
|
187 |
function is_imagify_servers_up() {
|
188 |
+
static $is_up;
|
189 |
|
190 |
+
if ( isset( $is_up ) ) {
|
191 |
+
return $is_up;
|
192 |
}
|
193 |
|
194 |
$transient_name = 'imagify_check_api_version';
|
195 |
$transient_expiration = 3 * MINUTE_IN_SECONDS;
|
196 |
|
197 |
if ( get_site_transient( $transient_name ) ) {
|
198 |
+
$is_up = true;
|
199 |
+
return $is_up;
|
200 |
}
|
201 |
|
202 |
if ( is_wp_error( get_imagify_api_version() ) ) {
|
203 |
set_site_transient( $transient_name, 0, $transient_expiration );
|
204 |
|
205 |
+
$is_up = false;
|
206 |
+
return $is_up;
|
207 |
}
|
208 |
|
209 |
set_site_transient( $transient_name, 1, $transient_expiration );
|
210 |
|
211 |
+
$is_up = true;
|
212 |
+
return $is_up;
|
213 |
+
}
|
214 |
+
|
215 |
+
/**
|
216 |
+
* Translate a message from our servers.
|
217 |
+
*
|
218 |
+
* @since 1.6.10
|
219 |
+
* @author Grégory Viguier
|
220 |
+
* @see Imagify::curl_http_call()
|
221 |
+
* @see Imagify::handle_response()
|
222 |
+
*
|
223 |
+
* @param string $message The message from the server (in English).
|
224 |
+
* @return string If in our list, the translated message. The original message otherwise.
|
225 |
+
*/
|
226 |
+
function imagify_translate_api_message( $message ) {
|
227 |
+
if ( ! $message ) {
|
228 |
+
return imagify_translate_api_message( 'Unknown error occurred' );
|
229 |
+
}
|
230 |
+
|
231 |
+
if ( is_wp_error( $message ) ) {
|
232 |
+
if ( $message->errors ) {
|
233 |
+
foreach ( (array) $message->errors as $code => $messages ) {
|
234 |
+
if ( $messages ) {
|
235 |
+
$message->errors[ $code ] = array_map( 'imagify_translate_api_message', (array) $messages );
|
236 |
+
}
|
237 |
+
}
|
238 |
+
}
|
239 |
+
|
240 |
+
return $message;
|
241 |
+
}
|
242 |
+
|
243 |
+
if ( is_object( $message ) && ! empty( $message->detail ) ) {
|
244 |
+
$message->detail = imagify_translate_api_message( $message->detail );
|
245 |
+
}
|
246 |
+
|
247 |
+
if ( ! is_string( $message ) ) {
|
248 |
+
return $message;
|
249 |
+
}
|
250 |
+
|
251 |
+
$trim_message = trim( $message, '. ' );
|
252 |
+
|
253 |
+
$messages = array(
|
254 |
+
// Local messages from Imagify::curl_http_call() and Imagify::handle_response().
|
255 |
+
'Unknown error occurred' => __( 'Unknown error occurred.', 'imagify' ),
|
256 |
+
'Your image is too big to be uploaded on our server' => __( 'Your image is too big to be uploaded on our server.', 'imagify' ),
|
257 |
+
// API messages.
|
258 |
+
'Authentification not provided' => __( 'Authentication not provided.', 'imagify' ),
|
259 |
+
'Cannot create client token' => __( 'Cannot create client token.', 'imagify' ),
|
260 |
+
'Confirm your account to continue optimizing image' => __( 'Confirm your account to continue optimizing images.', 'imagify' ),
|
261 |
+
'Coupon doesn\'t exist' => __( 'Coupon does not exist.', 'imagify' ),
|
262 |
+
'Email field shouldn\'t be empty' => __( 'Email field should not be empty.', 'imagify' ),
|
263 |
+
'Error uploading to data Storage' => __( 'Error uploading to Data Storage.', 'imagify' ),
|
264 |
+
'Not able to connect to Data Storage API to get the token' => __( 'Unable to connect to Data Storage API to get the token.', 'imagify' ),
|
265 |
+
'Not able to connect to Data Storage API' => __( 'Unable to connect to Data Storage API.', 'imagify' ),
|
266 |
+
'Not able to retrieve the token from DataStorage API' => __( 'Unable to retrieve the token from Data Storage API.', 'imagify' ),
|
267 |
+
'This email is already registered, you should try another email' => __( 'This email is already registered, you should try another email.', 'imagify' ),
|
268 |
+
'This user doesn\'t exit' => __( 'This user does not exist.', 'imagify' ),
|
269 |
+
'Too many request, be patient' => __( 'Too many requests, please be patient.', 'imagify' ),
|
270 |
+
'Unable to regenerate access token' => __( 'Unable to regenerate access token.', 'imagify' ),
|
271 |
+
'User not valid' => __( 'User not valid.', 'imagify' ),
|
272 |
+
'WELL DONE. This image is already compressed, no further compression required' => __( 'WELL DONE. This image is already optimized, no further optimization is required.', 'imagify' ),
|
273 |
+
'You are not authorized to perform this action' => __( 'You are not authorized to perform this action.', 'imagify' ),
|
274 |
+
'You\'ve consumed all your data. You have to upgrade your account to continue' => __( 'You have consumed all your data. You have to upgrade your account to continue.', 'imagify' ),
|
275 |
+
);
|
276 |
+
|
277 |
+
if ( isset( $messages[ $trim_message ] ) ) {
|
278 |
+
return $messages[ $trim_message ];
|
279 |
+
}
|
280 |
+
|
281 |
+
// Local message.
|
282 |
+
if ( preg_match( '@^Unknown error occurred \((\d+)(.*?)\)$@', $trim_message, $matches ) ) {
|
283 |
+
/* translators: 1 is a http status code, 2 is an error message. */
|
284 |
+
return sprintf( __( 'Unknown error occurred (%1$d%2$s).', 'imagify' ), $matches[1], esc_html( strip_tags( $matches[2] ) ) );
|
285 |
+
}
|
286 |
+
|
287 |
+
// API message.
|
288 |
+
if ( preg_match( '@^Custom one time plan starts from (\d+) MB$@', $trim_message, $matches ) ) {
|
289 |
+
/* translators: %s is a formatted number, dont use %d. */
|
290 |
+
return sprintf( __( 'Custom one time plan starts from %s MB.', 'imagify' ), number_format_i18n( (int) $matches[1] ) );
|
291 |
+
}
|
292 |
+
|
293 |
+
return $message;
|
294 |
}
|
inc/functions/attachments.php
CHANGED
@@ -215,45 +215,57 @@ function get_imagify_attachment_url( $file_path ) {
|
|
215 |
}
|
216 |
|
217 |
/**
|
218 |
-
* Get size information for all currently
|
219 |
*
|
220 |
-
* @since
|
221 |
-
* @
|
|
|
|
|
222 |
*
|
223 |
-
* @return array Data for all currently
|
224 |
*/
|
225 |
function get_imagify_thumbnail_sizes() {
|
226 |
-
|
|
|
|
|
|
|
|
|
227 |
|
228 |
-
|
229 |
-
$
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
234 |
|
235 |
-
|
236 |
-
|
237 |
-
|
|
|
|
|
|
|
|
|
238 |
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
'name' => $size_name,
|
246 |
-
);
|
247 |
-
} elseif ( isset( $_wp_additional_image_sizes[ $size ] ) ) {
|
248 |
-
$sizes[ $size ] = array(
|
249 |
-
'width' => $_wp_additional_image_sizes[ $size ]['width'],
|
250 |
-
'height' => $_wp_additional_image_sizes[ $size ]['height'],
|
251 |
-
'name' => $size_name,
|
252 |
-
);
|
253 |
}
|
254 |
}
|
255 |
|
256 |
-
return $
|
257 |
}
|
258 |
|
259 |
/**
|
215 |
}
|
216 |
|
217 |
/**
|
218 |
+
* Get size information for all currently registered thumbnail sizes.
|
219 |
*
|
220 |
+
* @since 1.5.10
|
221 |
+
* @since 1.6.10 For consistency, revamped the function like WP does with wp_generate_attachment_metadata().
|
222 |
+
* Removed the filter, added crop value to each size.
|
223 |
+
* @author Grégory Viguier
|
224 |
*
|
225 |
+
* @return array Data for all currently registered thumbnail sizes (width, height, crop, name).
|
226 |
*/
|
227 |
function get_imagify_thumbnail_sizes() {
|
228 |
+
// All image size names.
|
229 |
+
$intermediate_image_sizes = get_intermediate_image_sizes();
|
230 |
+
$intermediate_image_sizes = array_flip( $intermediate_image_sizes );
|
231 |
+
// Additional image size attributes.
|
232 |
+
$additional_image_sizes = wp_get_additional_image_sizes();
|
233 |
|
234 |
+
// Create the full array with sizes and crop info.
|
235 |
+
foreach ( $intermediate_image_sizes as $size_name => $s ) {
|
236 |
+
$intermediate_image_sizes[ $size_name ] = array(
|
237 |
+
'width' => '',
|
238 |
+
'height' => '',
|
239 |
+
'crop' => false,
|
240 |
+
'name' => $size_name,
|
241 |
+
);
|
242 |
+
|
243 |
+
if ( isset( $additional_image_sizes[ $size_name ]['width'] ) ) {
|
244 |
+
// For theme-added sizes.
|
245 |
+
$intermediate_image_sizes[ $size_name ]['width'] = (int) $additional_image_sizes[ $size_name ]['width'];
|
246 |
+
} else {
|
247 |
+
// For default sizes set in options.
|
248 |
+
$intermediate_image_sizes[ $size_name ]['width'] = (int) get_option( "{$size_name}_size_w" );
|
249 |
+
}
|
250 |
|
251 |
+
if ( isset( $additional_image_sizes[ $size_name ]['height'] ) ) {
|
252 |
+
// For theme-added sizes.
|
253 |
+
$intermediate_image_sizes[ $size_name ]['height'] = (int) $additional_image_sizes[ $size_name ]['height'];
|
254 |
+
} else {
|
255 |
+
// For default sizes set in options.
|
256 |
+
$intermediate_image_sizes[ $size_name ]['height'] = (int) get_option( "{$size_name}_size_h" );
|
257 |
+
}
|
258 |
|
259 |
+
if ( isset( $additional_image_sizes[ $size_name ]['crop'] ) ) {
|
260 |
+
// For theme-added sizes.
|
261 |
+
$intermediate_image_sizes[ $size_name ]['crop'] = (int) $additional_image_sizes[ $size_name ]['crop'];
|
262 |
+
} else {
|
263 |
+
// For default sizes set in options.
|
264 |
+
$intermediate_image_sizes[ $size_name ]['crop'] = (int) get_option( "{$size_name}_crop" );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
265 |
}
|
266 |
}
|
267 |
|
268 |
+
return $intermediate_image_sizes;
|
269 |
}
|
270 |
|
271 |
/**
|
inc/functions/common.php
CHANGED
@@ -4,7 +4,7 @@ defined( 'ABSPATH' ) || die( 'Cheatin\' uh?' );
|
|
4 |
/**
|
5 |
* Get user capacity to operate Imagify.
|
6 |
*
|
7 |
-
* @since
|
8 |
* @author Grégory Viguier
|
9 |
*
|
10 |
* @param bool $force_mono Force capacity for mono-site.
|
4 |
/**
|
5 |
* Get user capacity to operate Imagify.
|
6 |
*
|
7 |
+
* @since 1.6.5
|
8 |
* @author Grégory Viguier
|
9 |
*
|
10 |
* @param bool $force_mono Force capacity for mono-site.
|
inc/{compat.php → functions/compat.php}
RENAMED
@@ -1,8 +1,11 @@
|
|
1 |
<?php
|
2 |
defined( 'ABSPATH' ) || die( 'Cheatin\' uh?' );
|
3 |
|
4 |
-
|
|
|
|
|
5 |
|
|
|
6 |
/**
|
7 |
* PHP-agnostic version of curl_file_create(): create a CURLFile object.
|
8 |
*
|
@@ -20,7 +23,6 @@ if ( ! function_exists( 'curl_file_create' ) ) :
|
|
20 |
. ( $postname ? $postname : basename( $filename ) )
|
21 |
. ( $mimetype ? ";type=$mimetype" : '' );
|
22 |
}
|
23 |
-
|
24 |
endif;
|
25 |
|
26 |
if ( ! function_exists( 'array_replace' ) ) :
|
@@ -56,8 +58,11 @@ if ( ! function_exists( 'array_replace' ) ) :
|
|
56 |
}
|
57 |
endif;
|
58 |
|
59 |
-
|
|
|
|
|
60 |
|
|
|
61 |
/**
|
62 |
* Encode a variable into JSON, with some sanity checks.
|
63 |
*
|
@@ -103,18 +108,16 @@ if ( ! function_exists( 'wp_json_encode' ) ) :
|
|
103 |
|
104 |
return call_user_func_array( 'json_encode', $args );
|
105 |
}
|
106 |
-
|
107 |
endif;
|
108 |
|
109 |
if ( ! function_exists( '_wp_json_prepare_data' ) ) :
|
110 |
-
|
111 |
/**
|
112 |
* Prepares response data to be serialized to JSON.
|
113 |
*
|
114 |
* This supports the JsonSerializable interface for PHP 5.2-5.3 as well.
|
115 |
*
|
116 |
-
* @since
|
117 |
-
* @since
|
118 |
* @access private
|
119 |
*
|
120 |
* @param mixed $data Native representation.
|
@@ -157,16 +160,14 @@ if ( ! function_exists( '_wp_json_prepare_data' ) ) :
|
|
157 |
return null;
|
158 |
}
|
159 |
}
|
160 |
-
|
161 |
endif;
|
162 |
|
163 |
if ( ! function_exists( '_wp_json_sanity_check' ) ) :
|
164 |
-
|
165 |
/**
|
166 |
* Perform sanity checks on data that shall be encoded to JSON.
|
167 |
*
|
168 |
-
* @since
|
169 |
-
* @since
|
170 |
* @access private
|
171 |
* @throws Exception If the depth limit is reached.
|
172 |
*
|
@@ -225,16 +226,14 @@ if ( ! function_exists( '_wp_json_sanity_check' ) ) :
|
|
225 |
|
226 |
return $output;
|
227 |
}
|
228 |
-
|
229 |
endif;
|
230 |
|
231 |
if ( ! function_exists( '_wp_json_convert_string' ) ) :
|
232 |
-
|
233 |
/**
|
234 |
* Convert a string to UTF-8, so that it can be safely encoded to JSON.
|
235 |
*
|
236 |
-
* @since
|
237 |
-
* @since
|
238 |
* @access private
|
239 |
*
|
240 |
* @see _wp_json_sanity_check()
|
@@ -261,11 +260,9 @@ if ( ! function_exists( '_wp_json_convert_string' ) ) :
|
|
261 |
return wp_check_invalid_utf8( $string, true );
|
262 |
}
|
263 |
}
|
264 |
-
|
265 |
endif;
|
266 |
|
267 |
if ( ! function_exists( 'wp_normalize_path' ) ) :
|
268 |
-
|
269 |
/**
|
270 |
* Normalize a filesystem path.
|
271 |
*
|
@@ -290,9 +287,27 @@ if ( ! function_exists( 'wp_normalize_path' ) ) :
|
|
290 |
}
|
291 |
return $path;
|
292 |
}
|
293 |
-
|
294 |
endif;
|
295 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
296 |
|
297 |
if ( ! function_exists( 'wp_parse_url' ) ) :
|
298 |
/**
|
1 |
<?php
|
2 |
defined( 'ABSPATH' ) || die( 'Cheatin\' uh?' );
|
3 |
|
4 |
+
/** --------------------------------------------------------------------------------------------- */
|
5 |
+
/** PHP ========================================================================================= */
|
6 |
+
/** --------------------------------------------------------------------------------------------- */
|
7 |
|
8 |
+
if ( ! function_exists( 'curl_file_create' ) ) :
|
9 |
/**
|
10 |
* PHP-agnostic version of curl_file_create(): create a CURLFile object.
|
11 |
*
|
23 |
. ( $postname ? $postname : basename( $filename ) )
|
24 |
. ( $mimetype ? ";type=$mimetype" : '' );
|
25 |
}
|
|
|
26 |
endif;
|
27 |
|
28 |
if ( ! function_exists( 'array_replace' ) ) :
|
58 |
}
|
59 |
endif;
|
60 |
|
61 |
+
/** --------------------------------------------------------------------------------------------- */
|
62 |
+
/** WORDPRESS =================================================================================== */
|
63 |
+
/** --------------------------------------------------------------------------------------------- */
|
64 |
|
65 |
+
if ( ! function_exists( 'wp_json_encode' ) ) :
|
66 |
/**
|
67 |
* Encode a variable into JSON, with some sanity checks.
|
68 |
*
|
108 |
|
109 |
return call_user_func_array( 'json_encode', $args );
|
110 |
}
|
|
|
111 |
endif;
|
112 |
|
113 |
if ( ! function_exists( '_wp_json_prepare_data' ) ) :
|
|
|
114 |
/**
|
115 |
* Prepares response data to be serialized to JSON.
|
116 |
*
|
117 |
* This supports the JsonSerializable interface for PHP 5.2-5.3 as well.
|
118 |
*
|
119 |
+
* @since 1.6.5
|
120 |
+
* @since WP 4.4.0
|
121 |
* @access private
|
122 |
*
|
123 |
* @param mixed $data Native representation.
|
160 |
return null;
|
161 |
}
|
162 |
}
|
|
|
163 |
endif;
|
164 |
|
165 |
if ( ! function_exists( '_wp_json_sanity_check' ) ) :
|
|
|
166 |
/**
|
167 |
* Perform sanity checks on data that shall be encoded to JSON.
|
168 |
*
|
169 |
+
* @since 1.6.5
|
170 |
+
* @since WP 4.1.0
|
171 |
* @access private
|
172 |
* @throws Exception If the depth limit is reached.
|
173 |
*
|
226 |
|
227 |
return $output;
|
228 |
}
|
|
|
229 |
endif;
|
230 |
|
231 |
if ( ! function_exists( '_wp_json_convert_string' ) ) :
|
|
|
232 |
/**
|
233 |
* Convert a string to UTF-8, so that it can be safely encoded to JSON.
|
234 |
*
|
235 |
+
* @since 1.6.5
|
236 |
+
* @since WP 4.1.0
|
237 |
* @access private
|
238 |
*
|
239 |
* @see _wp_json_sanity_check()
|
260 |
return wp_check_invalid_utf8( $string, true );
|
261 |
}
|
262 |
}
|
|
|
263 |
endif;
|
264 |
|
265 |
if ( ! function_exists( 'wp_normalize_path' ) ) :
|
|
|
266 |
/**
|
267 |
* Normalize a filesystem path.
|
268 |
*
|
287 |
}
|
288 |
return $path;
|
289 |
}
|
|
|
290 |
endif;
|
291 |
|
292 |
+
if ( ! function_exists( 'wp_get_additional_image_sizes' ) ) :
|
293 |
+
/**
|
294 |
+
* Retrieve additional image sizes.
|
295 |
+
*
|
296 |
+
* @since 1.6.10
|
297 |
+
* @since WP 4.7.0
|
298 |
+
*
|
299 |
+
* @global array $_wp_additional_image_sizes
|
300 |
+
*
|
301 |
+
* @return array Additional images size data.
|
302 |
+
*/
|
303 |
+
function wp_get_additional_image_sizes() {
|
304 |
+
global $_wp_additional_image_sizes;
|
305 |
+
if ( ! $_wp_additional_image_sizes ) {
|
306 |
+
$_wp_additional_image_sizes = array(); // WPCS: override ok.
|
307 |
+
}
|
308 |
+
return $_wp_additional_image_sizes;
|
309 |
+
}
|
310 |
+
endif;
|
311 |
|
312 |
if ( ! function_exists( 'wp_parse_url' ) ) :
|
313 |
/**
|
inc/functions/deprecated.php
CHANGED
@@ -238,3 +238,288 @@ if ( function_exists( 'emr_delete_current_files' ) ) :
|
|
238 |
}
|
239 |
|
240 |
endif;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
238 |
}
|
239 |
|
240 |
endif;
|
241 |
+
|
242 |
+
/**
|
243 |
+
* Include Admin Bar Profile informations styles in front.
|
244 |
+
*
|
245 |
+
* @since 1.2
|
246 |
+
* @since 1.6.10 Deprecated.
|
247 |
+
*/
|
248 |
+
function _imagify_admin_bar_styles() {
|
249 |
+
_deprecated_function( __FUNCTION__ . '()', '1.6.10', 'Imagify_Assets::get_instance()->enqueue_styles_and_scripts_frontend()' );
|
250 |
+
|
251 |
+
if ( ! is_admin() ) {
|
252 |
+
Imagify_Assets::get_instance()->enqueue_styles_and_scripts_frontend();
|
253 |
+
}
|
254 |
+
}
|
255 |
+
|
256 |
+
|
257 |
+
/**
|
258 |
+
* Make an absolute path relative to WordPress' root folder.
|
259 |
+
* Also works for files from registered symlinked plugins.
|
260 |
+
*
|
261 |
+
* @since 1.6.8
|
262 |
+
* @since 1.6.10 Deprecated. Don't laugh.
|
263 |
+
* @author Grégory Viguier
|
264 |
+
*
|
265 |
+
* @param string $file_path An absolute path.
|
266 |
+
* @return string A relative path. Can return the absolute path in case of a failure.
|
267 |
+
*/
|
268 |
+
function imagify_make_file_path_replative( $file_path ) {
|
269 |
+
_deprecated_function( __FUNCTION__ . '()', '1.6.10', 'imagify_make_file_path_relative( $file_path )' );
|
270 |
+
|
271 |
+
return imagify_make_file_path_relative( $file_path );
|
272 |
+
}
|
273 |
+
|
274 |
+
if ( is_admin() ) :
|
275 |
+
|
276 |
+
/**
|
277 |
+
* Add some CSS on the whole administration.
|
278 |
+
*
|
279 |
+
* @since 1.0
|
280 |
+
* @since 1.6.10 Deprecated.
|
281 |
+
*/
|
282 |
+
function _imagify_admin_print_styles() {
|
283 |
+
_deprecated_function( __FUNCTION__ . '()', '1.6.10', 'Imagify_Assets::get_instance()->enqueue_styles_and_scripts()' );
|
284 |
+
|
285 |
+
Imagify_Assets::get_instance()->enqueue_styles_and_scripts();
|
286 |
+
}
|
287 |
+
|
288 |
+
/**
|
289 |
+
* Add Intercom on Options page an Bulk Optimization.
|
290 |
+
*
|
291 |
+
* @since 1.0
|
292 |
+
* @since 1.6.10 Deprecated.
|
293 |
+
*/
|
294 |
+
function _imagify_admin_print_intercom() {
|
295 |
+
_deprecated_function( __FUNCTION__ . '()', '1.6.10', 'Imagify_Assets::get_instance()->print_support_script()' );
|
296 |
+
|
297 |
+
Imagify_Assets::get_instance()->print_support_script();
|
298 |
+
}
|
299 |
+
|
300 |
+
/**
|
301 |
+
* Add Intercom on Options page an Bulk Optimization
|
302 |
+
*
|
303 |
+
* @since 1.5
|
304 |
+
* @since 1.6.10 Deprecated.
|
305 |
+
* @author Jonathan Buttigieg
|
306 |
+
*/
|
307 |
+
function _imagify_ngg_admin_print_intercom() {
|
308 |
+
_deprecated_function( __FUNCTION__ . '()', '1.6.10', 'Imagify_Assets::get_instance()->print_support_script()' );
|
309 |
+
|
310 |
+
$current_screen = get_current_screen();
|
311 |
+
|
312 |
+
if ( isset( $current_screen ) && false !== strpos( $current_screen->base, '_page_imagify-ngg-bulk-optimization' ) ) {
|
313 |
+
Imagify_Assets::get_instance()->print_support_script();
|
314 |
+
}
|
315 |
+
}
|
316 |
+
|
317 |
+
/**
|
318 |
+
* A helper to deprecate old admin notice functions.
|
319 |
+
*
|
320 |
+
* @since 1.6.10
|
321 |
+
* @author Grégory Viguier
|
322 |
+
* @see Imagify_Notices::notices()
|
323 |
+
*
|
324 |
+
* @param string $function The function to deprecate.
|
325 |
+
* @param string $notice_id The notice to deprecate.
|
326 |
+
*/
|
327 |
+
function _imagify_deprecate_old_notice( $function, $notice_id ) {
|
328 |
+
_deprecated_function( $function . '()', '1.6.10' );
|
329 |
+
|
330 |
+
$notices = Imagify_Notices::get_instance();
|
331 |
+
$callback = 'display_' . str_replace( '-', '_', $notice_id );
|
332 |
+
$data = method_exists( $notices, $callback ) ? call_user_func( array( $notices, $callback ) ) : false;
|
333 |
+
|
334 |
+
if ( $data ) {
|
335 |
+
$this->render_view( str_replace( '_', '-', $notice_id ), $data );
|
336 |
+
}
|
337 |
+
}
|
338 |
+
|
339 |
+
/**
|
340 |
+
* This warning is displayed when the API key is empty.
|
341 |
+
*
|
342 |
+
* @since 1.0
|
343 |
+
* @since 1.6.10 Deprecated.
|
344 |
+
* @author Jonathan Buttigieg
|
345 |
+
*/
|
346 |
+
function _imagify_warning_empty_api_key_notice() {
|
347 |
+
_imagify_deprecate_old_notice( __FUNCTION__, 'welcome-steps' );
|
348 |
+
}
|
349 |
+
|
350 |
+
/**
|
351 |
+
* This warning is displayed when the API key is empty.
|
352 |
+
*
|
353 |
+
* @since 1.0
|
354 |
+
* @since 1.6.10 Deprecated.
|
355 |
+
* @author Jonathan Buttigieg
|
356 |
+
*/
|
357 |
+
function _imagify_warning_wrong_api_key_notice() {
|
358 |
+
_imagify_deprecate_old_notice( __FUNCTION__, 'wrong-api-key' );
|
359 |
+
}
|
360 |
+
|
361 |
+
/**
|
362 |
+
* This warning is displayed when some plugins may conflict with Imagify.
|
363 |
+
*
|
364 |
+
* @since 1.0
|
365 |
+
* @since 1.6.10 Deprecated.
|
366 |
+
* @author Jonathan Buttigieg
|
367 |
+
*/
|
368 |
+
function _imagify_warning_plugins_to_deactivate_notice() {
|
369 |
+
_imagify_deprecate_old_notice( __FUNCTION__, 'plugins-to-deactivate' );
|
370 |
+
}
|
371 |
+
|
372 |
+
/**
|
373 |
+
* This notice is displayed when external HTTP requests are blocked via the WP_HTTP_BLOCK_EXTERNAL constant.
|
374 |
+
*
|
375 |
+
* @since 1.0
|
376 |
+
* @since 1.6.10 Deprecated.
|
377 |
+
* @author Jonathan Buttigieg
|
378 |
+
*/
|
379 |
+
function _imagify_http_block_external_notice() {
|
380 |
+
_imagify_deprecate_old_notice( __FUNCTION__, 'http-block-external' );
|
381 |
+
}
|
382 |
+
|
383 |
+
/**
|
384 |
+
* This warning is displayed when the grid view is active on the library.
|
385 |
+
*
|
386 |
+
* @since 1.0.2
|
387 |
+
* @since 1.6.10 Deprecated.
|
388 |
+
* @author Jonathan Buttigieg
|
389 |
+
*/
|
390 |
+
function _imagify_warning_grid_view_notice() {
|
391 |
+
_imagify_deprecate_old_notice( __FUNCTION__, 'grid-view' );
|
392 |
+
}
|
393 |
+
|
394 |
+
/**
|
395 |
+
* This warning is displayed to warn the user that its quota is consumed for the current month.
|
396 |
+
*
|
397 |
+
* @since 1.1.1
|
398 |
+
* @since 1.6.10 Deprecated.
|
399 |
+
* @author Jonathan Buttigieg
|
400 |
+
*/
|
401 |
+
function _imagify_warning_over_quota_notice() {
|
402 |
+
_imagify_deprecate_old_notice( __FUNCTION__, 'over-quota' );
|
403 |
+
}
|
404 |
+
|
405 |
+
/**
|
406 |
+
* This warning is displayed if the backup folder is not writable.
|
407 |
+
*
|
408 |
+
* @since 1.6.8
|
409 |
+
* @since 1.6.10 Deprecated.
|
410 |
+
* @author Grégory Viguier
|
411 |
+
*/
|
412 |
+
function _imagify_warning_backup_folder_not_writable_notice() {
|
413 |
+
_imagify_deprecate_old_notice( __FUNCTION__, 'backup-folder-not-writable' );
|
414 |
+
}
|
415 |
+
|
416 |
+
/**
|
417 |
+
* Add a message about WP Rocket on the "Bulk Optimization" screen.
|
418 |
+
*
|
419 |
+
* @since 1.6.10 Deprecated.
|
420 |
+
* @author Jonathan Buttigieg
|
421 |
+
*/
|
422 |
+
function _imagify_rocket_notice() {
|
423 |
+
_imagify_deprecate_old_notice( __FUNCTION__, 'rocket' );
|
424 |
+
}
|
425 |
+
|
426 |
+
/**
|
427 |
+
* This notice is displayed to rate the plugin after 100 optimization & 7 days after the first installation.
|
428 |
+
*
|
429 |
+
* @since 1.4.2
|
430 |
+
* @since 1.6.10 Deprecated.
|
431 |
+
* @author Jonathan Buttigieg
|
432 |
+
*/
|
433 |
+
function _imagify_rating_notice() {
|
434 |
+
_imagify_deprecate_old_notice( __FUNCTION__, 'rating' );
|
435 |
+
}
|
436 |
+
|
437 |
+
/**
|
438 |
+
* Stop the rating cron when the notice is dismissed.
|
439 |
+
*
|
440 |
+
* @since 1.6.10 Deprecated.
|
441 |
+
*
|
442 |
+
* @param string $notice The notice name.
|
443 |
+
*/
|
444 |
+
function _imagify_clear_scheduled_rating( $notice ) {
|
445 |
+
_deprecated_function( __FUNCTION__ . '()', '1.6.10', 'Imagify_Notices::get_instance()->clear_scheduled_rating( $notice )' );
|
446 |
+
|
447 |
+
Imagify_Notices::get_instance()->clear_scheduled_rating( $notice );
|
448 |
+
}
|
449 |
+
|
450 |
+
/**
|
451 |
+
* Process a dismissed notice.
|
452 |
+
*
|
453 |
+
* @since 1.0
|
454 |
+
* @since 1.6.10 Deprecated.
|
455 |
+
* @author Jonathan Buttigieg
|
456 |
+
*/
|
457 |
+
function _do_admin_post_imagify_dismiss_notice() {
|
458 |
+
_deprecated_function( __FUNCTION__ . '()', '1.6.10', 'Imagify_Notices::get_instance()->admin_post_dismiss_notice()' );
|
459 |
+
|
460 |
+
Imagify_Notices::get_instance()->admin_post_dismiss_notice();
|
461 |
+
}
|
462 |
+
|
463 |
+
/**
|
464 |
+
* Disable a plugin which can be in conflict with Imagify
|
465 |
+
*
|
466 |
+
* @since 1.2
|
467 |
+
* @since 1.6.10 Deprecated.
|
468 |
+
* @author Jonathan Buttigieg
|
469 |
+
*/
|
470 |
+
function _imagify_deactivate_plugin() {
|
471 |
+
_deprecated_function( __FUNCTION__ . '()', '1.6.10', 'Imagify_Notices::get_instance()->deactivate_plugin()' );
|
472 |
+
|
473 |
+
Imagify_Notices::get_instance()->deactivate_plugin();
|
474 |
+
}
|
475 |
+
|
476 |
+
/**
|
477 |
+
* Renew a dismissed Imagify notice.
|
478 |
+
*
|
479 |
+
* @since 1.0
|
480 |
+
* @since 1.6.10 Deprecated.
|
481 |
+
*
|
482 |
+
* @param string $notice A notice ID.
|
483 |
+
* @param int $user_id A user ID.
|
484 |
+
* @return void
|
485 |
+
*/
|
486 |
+
function imagify_renew_notice( $notice, $user_id = 0 ) {
|
487 |
+
_deprecated_function( __FUNCTION__ . '()', '1.6.10', 'Imagify_Notices::renew_notice( $notice, $user_id )' );
|
488 |
+
|
489 |
+
Imagify_Notices::renew_notice( $notice, $user_id );
|
490 |
+
}
|
491 |
+
|
492 |
+
/**
|
493 |
+
* Dismiss an Imagify notice.
|
494 |
+
*
|
495 |
+
* @since 1.0
|
496 |
+
* @since 1.6.10 Deprecated.
|
497 |
+
*
|
498 |
+
* @param string $notice A notice ID.
|
499 |
+
* @param int $user_id A user ID.
|
500 |
+
* @return void
|
501 |
+
*/
|
502 |
+
function imagify_dismiss_notice( $notice, $user_id = 0 ) {
|
503 |
+
_deprecated_function( __FUNCTION__ . '()', '1.6.10', 'Imagify_Notices::dismiss_notice( $notice, $user_id )' );
|
504 |
+
|
505 |
+
Imagify_Notices::dismiss_notice( $notice, $user_id );
|
506 |
+
}
|
507 |
+
|
508 |
+
/**
|
509 |
+
* Tell if an Imagify notice is dismissed.
|
510 |
+
*
|
511 |
+
* @since 1.6.5
|
512 |
+
* @since 1.6.10 Deprecated.
|
513 |
+
* @author Grégory Viguier
|
514 |
+
*
|
515 |
+
* @param string $notice A notice ID.
|
516 |
+
* @param int $user_id A user ID.
|
517 |
+
* @return bool
|
518 |
+
*/
|
519 |
+
function imagify_notice_is_dismissed( $notice, $user_id = 0 ) {
|
520 |
+
_deprecated_function( __FUNCTION__ . '()', '1.6.10', 'Imagify_Notices::notice_is_dismissed( $notice, $user_id )' );
|
521 |
+
|
522 |
+
return Imagify_Notices::notice_is_dismissed( $notice, $user_id );
|
523 |
+
}
|
524 |
+
|
525 |
+
endif;
|
inc/functions/files.php
CHANGED
@@ -4,7 +4,7 @@ defined( 'ABSPATH' ) || die( 'Cheatin\' uh?' );
|
|
4 |
/**
|
5 |
* Get WP Direct filesystem object. Also define chmod constants if not done yet.
|
6 |
*
|
7 |
-
* @since
|
8 |
* @author Grégory Viguier
|
9 |
*
|
10 |
* @return object A `$wp_filesystem` object.
|
@@ -94,13 +94,13 @@ function imagify_get_abspath() {
|
|
94 |
* Make an absolute path relative to WordPress' root folder.
|
95 |
* Also works for files from registered symlinked plugins.
|
96 |
*
|
97 |
-
* @since 1.6.
|
98 |
* @author Grégory Viguier
|
99 |
*
|
100 |
* @param string $file_path An absolute path.
|
101 |
* @return string A relative path. Can return the absolute path in case of a failure.
|
102 |
*/
|
103 |
-
function
|
104 |
static $abspath;
|
105 |
global $wp_plugin_paths;
|
106 |
|
4 |
/**
|
5 |
* Get WP Direct filesystem object. Also define chmod constants if not done yet.
|
6 |
*
|
7 |
+
* @since 1.6.5
|
8 |
* @author Grégory Viguier
|
9 |
*
|
10 |
* @return object A `$wp_filesystem` object.
|
94 |
* Make an absolute path relative to WordPress' root folder.
|
95 |
* Also works for files from registered symlinked plugins.
|
96 |
*
|
97 |
+
* @since 1.6.10
|
98 |
* @author Grégory Viguier
|
99 |
*
|
100 |
* @param string $file_path An absolute path.
|
101 |
* @return string A relative path. Can return the absolute path in case of a failure.
|
102 |
*/
|
103 |
+
function imagify_make_file_path_relative( $file_path ) {
|
104 |
static $abspath;
|
105 |
global $wp_plugin_paths;
|
106 |
|
inc/functions/formatting.php
CHANGED
@@ -4,7 +4,7 @@ defined( 'ABSPATH' ) || die( 'Cheatin\' uh?' );
|
|
4 |
/**
|
5 |
* Round UP to nearest half integer.
|
6 |
*
|
7 |
-
* @since
|
8 |
* @source http://stackoverflow.com/a/13526408
|
9 |
*
|
10 |
* @param int|float|string $number The number to round up.
|
@@ -47,10 +47,15 @@ function imagify_round_half_five( $number ) {
|
|
47 |
*/
|
48 |
function get_imagify_attachment_class_name( $context, $attachment_id, $identifier ) {
|
49 |
$context = $context ? $context : 'wp';
|
|
|
|
|
|
|
|
|
|
|
50 |
/**
|
51 |
* Filter the context used for the optimization.
|
52 |
*
|
53 |
-
* @since
|
54 |
* @author Grégory Viguier
|
55 |
*
|
56 |
* @param string $context The context.
|
4 |
/**
|
5 |
* Round UP to nearest half integer.
|
6 |
*
|
7 |
+
* @since 1.0
|
8 |
* @source http://stackoverflow.com/a/13526408
|
9 |
*
|
10 |
* @param int|float|string $number The number to round up.
|
47 |
*/
|
48 |
function get_imagify_attachment_class_name( $context, $attachment_id, $identifier ) {
|
49 |
$context = $context ? $context : 'wp';
|
50 |
+
|
51 |
+
if ( 'wp' !== $context && 'wp' === strtolower( $context ) ) {
|
52 |
+
$context = 'wp';
|
53 |
+
}
|
54 |
+
|
55 |
/**
|
56 |
* Filter the context used for the optimization.
|
57 |
*
|
58 |
+
* @since 1.6.6
|
59 |
* @author Grégory Viguier
|
60 |
*
|
61 |
* @param string $context The context.
|
inc/functions/i18n.php
CHANGED
@@ -11,11 +11,18 @@ defined( 'ABSPATH' ) || die( 'Cheatin\' uh?' );
|
|
11 |
* @return array $translations The translations.
|
12 |
*/
|
13 |
function get_imagify_localize_script_translations( $context ) {
|
14 |
-
$translations = array();
|
15 |
-
|
16 |
switch ( $context ) {
|
17 |
-
case 'admin':
|
18 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
19 |
'labels' => array(
|
20 |
/* translators: Don't use escaped HTML entities here (like ). */
|
21 |
'signupTitle' => __( 'Let\'s get you started!', 'imagify' ),
|
@@ -24,119 +31,151 @@ function get_imagify_localize_script_translations( $context ) {
|
|
24 |
'signupErrorEmptyEmail' => __( 'You need to specify an email!', 'imagify' ),
|
25 |
/* translators: Don't use escaped HTML entities here (like ). */
|
26 |
'signupSuccessTitle' => __( 'Congratulations!', 'imagify' ),
|
27 |
-
'signupSuccessText' => __( 'Your account has been
|
28 |
/* translators: Don't use escaped HTML entities here (like ). */
|
29 |
'saveApiKeyTitle' => __( 'Connect to Imagify!', 'imagify' ),
|
30 |
'saveApiKeyText' => __( 'Paste your API key below:', 'imagify' ),
|
31 |
'saveApiKeyConfirmButtonText' => __( 'Connect me', 'imagify' ),
|
32 |
-
'waitApiKeyCheckText' => __( 'Check in progress...', 'imagify' ),
|
33 |
'ApiKeyErrorEmpty' => __( 'You need to specify your api key!', 'imagify' ),
|
34 |
'ApiKeyCheckSuccessTitle' => __( 'Congratulations!', 'imagify' ),
|
35 |
'ApiKeyCheckSuccessText' => __( 'Your API key is valid. You can now configure the Imagify settings to optimize your images.', 'imagify' ),
|
36 |
-
'ValidApiKeyText' => __( 'Your API key is valid.', 'imagify' ),
|
37 |
-
'swalCancel' => __( 'Cancel' ),
|
38 |
-
'errorPriceAPI' => __( 'Something went wrong with getting our updated offers. Please retry later.', 'imagify' ),
|
39 |
-
'errorCouponAPI' => __( 'Error with checking this coupon.', 'imagify' ),
|
40 |
-
/* translators: 1 is a percentage, 2 is a coupon code. */
|
41 |
-
'successCouponAPI' => sprintf( _x( '%1$s off with %2$s', 'coupon validated', 'imagify' ), '<span class="imagify-coupon-offer"></span>', '<strong class="imagify-coupon-word"></strong>' ),
|
42 |
),
|
43 |
);
|
44 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
45 |
|
46 |
case 'options':
|
47 |
-
|
48 |
-
'
|
49 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
50 |
);
|
51 |
-
break;
|
52 |
|
53 |
-
case '
|
54 |
-
|
55 |
-
'
|
56 |
-
'
|
57 |
-
|
|
|
|
|
58 |
),
|
59 |
);
|
60 |
-
break;
|
61 |
|
62 |
case 'twentytwenty':
|
63 |
-
|
64 |
'labels' => array(
|
65 |
-
'
|
66 |
-
'
|
67 |
-
'
|
68 |
-
'
|
69 |
-
'
|
70 |
-
'
|
71 |
-
'optimize'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
72 |
),
|
73 |
);
|
74 |
-
break;
|
75 |
|
76 |
case 'bulk':
|
77 |
-
$user = get_imagify_user();
|
78 |
$translations = array(
|
79 |
-
'
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
|
|
|
|
86 |
'overviewChartLabels' => array(
|
87 |
-
'optimized' => __( 'Optimized', 'imagify' ),
|
88 |
'unoptimized' => __( 'Unoptimized', 'imagify' ),
|
|
|
89 |
'error' => __( 'Error', 'imagify' ),
|
90 |
),
|
|
|
|
|
|
|
|
|
91 |
'overQuotaTitle' => __( 'Oops, It\'s Over!', 'imagify' ),
|
|
|
92 |
'noAttachmentToOptimizeTitle' => __( 'Hold on!', 'imagify' ),
|
93 |
'noAttachmentToOptimizeText' => __( 'All your images have been optimized by Imagify. Congratulations!', 'imagify' ),
|
94 |
-
/* translators: Plugin URI of the plugin/theme */
|
95 |
-
'pluginURL' => __( 'https://wordpress.org/plugins/imagify/', 'imagify' ),
|
96 |
-
/* translators: 1 and 2 are file sizes. */
|
97 |
-
'textToShare' => __( 'Discover @imagify, the new compression tool to optimize your images for free. I saved %1$s out of %2$s!', 'imagify' ),
|
98 |
-
'totalOptimizedAttachments' => imagify_count_optimized_attachments(),
|
99 |
-
'totalUnoptimizedAttachments' => imagify_count_unoptimized_attachments(),
|
100 |
-
'totalErrorsAttachments' => imagify_count_error_attachments(),
|
101 |
-
'processing' => __( 'Imagify is still processing. Are you sure you want to leave this page?', 'imagify' ),
|
102 |
'optimizing' => __( 'Optimizing', 'imagify' ),
|
103 |
-
'complete' => _x( 'Complete', 'adjective', 'imagify' ),
|
104 |
'error' => __( 'Error', 'imagify' ),
|
105 |
-
'
|
106 |
/* translators: %s is a number. Don't use %d. */
|
107 |
'nbrFiles' => __( '%s file(s)', 'imagify' ),
|
|
|
108 |
/* translators: %s is a number. Don't use %d. */
|
109 |
'nbrErrors' => __( '%s error(s)', 'imagify' ),
|
|
|
|
|
|
|
|
|
|
|
|
|
110 |
),
|
111 |
);
|
112 |
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
/* translators: 1 is a data quota, 2 is a date. */
|
125 |
-
__( 'You have consumed all your credit for this month. You will have <strong>%1$s back on %2$s</strong>.', 'imagify' ),
|
126 |
-
size_format( $user->quota * 1048576 ),
|
127 |
-
date_i18n( __( 'F j, Y' ), strtotime( $user->next_date_update ) )
|
128 |
-
);
|
129 |
-
$translations['overQuotaText'] .= '<br/><br/>';
|
130 |
-
$translations['overQuotaText'] .= sprintf(
|
131 |
-
/* translators: 1 is a link tag start, 2 is the link tag end. */
|
132 |
-
__( 'To continue to optimize your images, log in to your Imagify account to %1$sbuy a pack or subscribe to a plan%2$s.', 'imagify' ),
|
133 |
-
'<a href="' . IMAGIFY_APP_MAIN . '/#/subscription">',
|
134 |
-
'</a>'
|
135 |
-
);
|
136 |
-
}
|
137 |
}
|
138 |
-
break;
|
139 |
-
} // End switch().
|
140 |
|
141 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
142 |
}
|
11 |
* @return array $translations The translations.
|
12 |
*/
|
13 |
function get_imagify_localize_script_translations( $context ) {
|
|
|
|
|
14 |
switch ( $context ) {
|
15 |
+
case 'admin-bar':
|
16 |
+
if ( is_admin() ) {
|
17 |
+
return array();
|
18 |
+
}
|
19 |
+
|
20 |
+
return array(
|
21 |
+
'ajaxurl' => admin_url( 'admin-ajax.php' ),
|
22 |
+
);
|
23 |
+
|
24 |
+
case 'notices':
|
25 |
+
return array(
|
26 |
'labels' => array(
|
27 |
/* translators: Don't use escaped HTML entities here (like ). */
|
28 |
'signupTitle' => __( 'Let\'s get you started!', 'imagify' ),
|
31 |
'signupErrorEmptyEmail' => __( 'You need to specify an email!', 'imagify' ),
|
32 |
/* translators: Don't use escaped HTML entities here (like ). */
|
33 |
'signupSuccessTitle' => __( 'Congratulations!', 'imagify' ),
|
34 |
+
'signupSuccessText' => __( 'Your account has been successfully created. Please check your mailbox, you are going to receive an email with API key.', 'imagify' ),
|
35 |
/* translators: Don't use escaped HTML entities here (like ). */
|
36 |
'saveApiKeyTitle' => __( 'Connect to Imagify!', 'imagify' ),
|
37 |
'saveApiKeyText' => __( 'Paste your API key below:', 'imagify' ),
|
38 |
'saveApiKeyConfirmButtonText' => __( 'Connect me', 'imagify' ),
|
|
|
39 |
'ApiKeyErrorEmpty' => __( 'You need to specify your api key!', 'imagify' ),
|
40 |
'ApiKeyCheckSuccessTitle' => __( 'Congratulations!', 'imagify' ),
|
41 |
'ApiKeyCheckSuccessText' => __( 'Your API key is valid. You can now configure the Imagify settings to optimize your images.', 'imagify' ),
|
|
|
|
|
|
|
|
|
|
|
|
|
42 |
),
|
43 |
);
|
44 |
+
|
45 |
+
case 'sweetalert':
|
46 |
+
return array(
|
47 |
+
'labels' => array(
|
48 |
+
'cancelButtonText' => __( 'Cancel' ),
|
49 |
+
),
|
50 |
+
);
|
51 |
|
52 |
case 'options':
|
53 |
+
return array(
|
54 |
+
'labels' => array(
|
55 |
+
'ValidApiKeyText' => __( 'Your API key is valid.', 'imagify' ),
|
56 |
+
'waitApiKeyCheckText' => __( 'Check in progress...', 'imagify' ),
|
57 |
+
'ApiKeyCheckSuccessTitle' => __( 'Congratulations!', 'imagify' ),
|
58 |
+
'ApiKeyCheckSuccessText' => __( 'Your API key is valid. You can now configure the Imagify settings to optimize your images.', 'imagify' ),
|
59 |
+
'noBackupTitle' => __( 'Don\'t Need a Parachute?', 'imagify' ),
|
60 |
+
'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' ),
|
61 |
+
),
|
62 |
);
|
|
|
63 |
|
64 |
+
case 'pricing-modal':
|
65 |
+
return array(
|
66 |
+
'labels' => array(
|
67 |
+
'errorCouponAPI' => __( 'Error with checking this coupon.', 'imagify' ),
|
68 |
+
/* translators: 1 is a percentage, 2 is a coupon code. */
|
69 |
+
'successCouponAPI' => sprintf( _x( '%1$s off with %2$s', 'coupon validated', 'imagify' ), '<span class="imagify-coupon-offer"></span>', '<strong class="imagify-coupon-word"></strong>' ),
|
70 |
+
'errorPriceAPI' => __( 'Something went wrong with getting our updated offers. Please retry later.', 'imagify' ),
|
71 |
),
|
72 |
);
|
|
|
73 |
|
74 |
case 'twentytwenty':
|
75 |
+
return array(
|
76 |
'labels' => array(
|
77 |
+
'filesize' => __( 'File Size:', 'imagify' ),
|
78 |
+
'saving' => __( 'Original Saving:', 'imagify' ),
|
79 |
+
'close' => __( 'Close', 'imagify' ),
|
80 |
+
'originalL' => __( 'Original Image', 'imagify' ),
|
81 |
+
'optimizedL' => __( 'Optimized Image', 'imagify' ),
|
82 |
+
'compare' => __( 'Compare Original VS Optimized', 'imagify' ),
|
83 |
+
'optimize' => __( 'Optimize', 'imagify' ),
|
84 |
+
),
|
85 |
+
);
|
86 |
+
|
87 |
+
case 'library':
|
88 |
+
return array(
|
89 |
+
'backupOption' => (int) get_imagify_option( 'backup' ),
|
90 |
+
'labels' => array(
|
91 |
+
'bulkActionsOptimize' => __( 'Optimize', 'imagify' ),
|
92 |
+
'bulkActionsOptimizeMissingSizes' => __( 'Optimize Missing Sizes', 'imagify' ),
|
93 |
+
'bulkActionsRestore' => __( 'Restore Original', 'imagify' ),
|
94 |
),
|
95 |
);
|
|
|
96 |
|
97 |
case 'bulk':
|
|
|
98 |
$translations = array(
|
99 |
+
'totalUnoptimizedAttachments' => imagify_count_unoptimized_attachments(),
|
100 |
+
'totalOptimizedAttachments' => imagify_count_optimized_attachments(),
|
101 |
+
'totalErrorsAttachments' => imagify_count_error_attachments(),
|
102 |
+
'heartbeatId' => 'update_bulk_data',
|
103 |
+
'waitImageUrl' => IMAGIFY_ASSETS_IMG_URL . 'popin-loader.svg',
|
104 |
+
'ajaxAction' => 'imagify_get_unoptimized_attachment_ids',
|
105 |
+
'ajaxContext' => 'wp',
|
106 |
+
'bufferSize' => get_imagify_bulk_buffer_size(),
|
107 |
+
'labels' => array(
|
108 |
'overviewChartLabels' => array(
|
|
|
109 |
'unoptimized' => __( 'Unoptimized', 'imagify' ),
|
110 |
+
'optimized' => __( 'Optimized', 'imagify' ),
|
111 |
'error' => __( 'Error', 'imagify' ),
|
112 |
),
|
113 |
+
'processing' => __( 'Imagify is still processing. Are you sure you want to leave this page?', 'imagify' ),
|
114 |
+
'waitTitle' => __( 'Please wait...', 'imagify' ),
|
115 |
+
'waitText' => __( 'We are trying to get your unoptimized images, it may take time depending on the number of images.', 'imagify' ),
|
116 |
+
'invalidAPIKeyTitle' => __( 'Your API key isn\'t valid!', 'imagify' ),
|
117 |
'overQuotaTitle' => __( 'Oops, It\'s Over!', 'imagify' ),
|
118 |
+
'overQuotaText' => '',
|
119 |
'noAttachmentToOptimizeTitle' => __( 'Hold on!', 'imagify' ),
|
120 |
'noAttachmentToOptimizeText' => __( 'All your images have been optimized by Imagify. Congratulations!', 'imagify' ),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
121 |
'optimizing' => __( 'Optimizing', 'imagify' ),
|
|
|
122 |
'error' => __( 'Error', 'imagify' ),
|
123 |
+
'complete' => _x( 'Complete', 'adjective', 'imagify' ),
|
124 |
/* translators: %s is a number. Don't use %d. */
|
125 |
'nbrFiles' => __( '%s file(s)', 'imagify' ),
|
126 |
+
'notice' => _x( 'Notice', 'noun', 'imagify' ),
|
127 |
/* translators: %s is a number. Don't use %d. */
|
128 |
'nbrErrors' => __( '%s error(s)', 'imagify' ),
|
129 |
+
/* translators: 1 and 2 are file sizes. */
|
130 |
+
'textToShare' => __( 'Discover @imagify, the new compression tool to optimize your images for free. I saved %1$s out of %2$s!', 'imagify' ),
|
131 |
+
/* translators: Plugin URI of the plugin/theme */
|
132 |
+
'pluginURL' => __( 'https://wordpress.org/plugins/imagify/', 'imagify' ),
|
133 |
+
'getUnoptimizedImagesErrorTitle' => __( 'Oops, There is something wrong!', 'imagify' ),
|
134 |
+
'getUnoptimizedImagesErrorText' => __( 'An unknown error occurred when we tried to get all your unoptimized images. Try again and if the issue still persists, please contact us!', 'imagify' ),
|
135 |
),
|
136 |
);
|
137 |
|
138 |
+
/**
|
139 |
+
* Filter the number of parallel queries during the Bulk Optimization.
|
140 |
+
*
|
141 |
+
* @since 1.5.4
|
142 |
+
*
|
143 |
+
* @param int $buffer_size Number of parallel queries.
|
144 |
+
*/
|
145 |
+
$translations['bufferSize'] = apply_filters( 'imagify_bulk_buffer_size', $translations['bufferSize'] );
|
146 |
+
|
147 |
+
if ( ! imagify_valid_key() ) {
|
148 |
+
return $translations;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
149 |
}
|
|
|
|
|
150 |
|
151 |
+
$user = get_imagify_user();
|
152 |
+
|
153 |
+
if ( is_wp_error( $user ) ) {
|
154 |
+
$translations['labels']['overQuotaText'] = sprintf(
|
155 |
+
/* translators: 1 is a link tag start, 2 is the link tag end. */
|
156 |
+
__( 'To continue to optimize your images, log in to your Imagify account to %1$sbuy a pack or subscribe to a plan%2$s.', 'imagify' ),
|
157 |
+
'<a target="_blank" href="' . IMAGIFY_APP_MAIN . '/#/subscription">',
|
158 |
+
'</a>'
|
159 |
+
);
|
160 |
+
} else {
|
161 |
+
$translations['labels']['overQuotaText'] = sprintf(
|
162 |
+
/* translators: 1 is a data quota, 2 is a date. */
|
163 |
+
__( 'You have consumed all your credit for this month. You will have <strong>%1$s back on %2$s</strong>.', 'imagify' ),
|
164 |
+
size_format( $user->quota * 1048576 ),
|
165 |
+
date_i18n( __( 'F j, Y' ), strtotime( $user->next_date_update ) )
|
166 |
+
);
|
167 |
+
$translations['labels']['overQuotaText'] .= '<br/><br/>';
|
168 |
+
$translations['labels']['overQuotaText'] .= sprintf(
|
169 |
+
/* translators: 1 is a link tag start, 2 is the link tag end. */
|
170 |
+
__( 'To continue to optimize your images, log in to your Imagify account to %1$sbuy a pack or subscribe to a plan%2$s.', 'imagify' ),
|
171 |
+
'<a target="_blank" href="' . IMAGIFY_APP_MAIN . '/#/subscription">',
|
172 |
+
'</a>'
|
173 |
+
);
|
174 |
+
}
|
175 |
+
|
176 |
+
return $translations;
|
177 |
+
|
178 |
+
default:
|
179 |
+
return array();
|
180 |
+
} // End switch().
|
181 |
}
|
inc/functions/notices.php
DELETED
@@ -1,72 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
defined( 'ABSPATH' ) || die( 'Cheatin\' uh?' );
|
3 |
-
|
4 |
-
/**
|
5 |
-
* Renew a dismissed Imagify notice.
|
6 |
-
*
|
7 |
-
* @since 1.0
|
8 |
-
*
|
9 |
-
* @param string $notice A notice ID.
|
10 |
-
* @param int $user_id A user ID.
|
11 |
-
* @return void
|
12 |
-
*/
|
13 |
-
function imagify_renew_notice( $notice, $user_id = 0 ) {
|
14 |
-
$user_id = $user_id ? (int) $user_id : get_current_user_id();
|
15 |
-
$notices = get_user_meta( $user_id, '_imagify_ignore_notices', true );
|
16 |
-
$notices = $notices && is_array( $notices ) ? array_flip( $notices ) : array();
|
17 |
-
|
18 |
-
if ( ! isset( $notices[ $notice ] ) ) {
|
19 |
-
return;
|
20 |
-
}
|
21 |
-
|
22 |
-
unset( $notices[ $notice ] );
|
23 |
-
$notices = array_flip( $notices );
|
24 |
-
$notices = array_filter( $notices );
|
25 |
-
$notices = array_values( $notices );
|
26 |
-
|
27 |
-
update_user_meta( $user_id, '_imagify_ignore_notices', $notices );
|
28 |
-
}
|
29 |
-
|
30 |
-
/**
|
31 |
-
* Dismiss an Imagify notice.
|
32 |
-
*
|
33 |
-
* @since 1.0
|
34 |
-
*
|
35 |
-
* @param string $notice A notice ID.
|
36 |
-
* @param int $user_id A user ID.
|
37 |
-
* @return void
|
38 |
-
*/
|
39 |
-
function imagify_dismiss_notice( $notice, $user_id = 0 ) {
|
40 |
-
$user_id = $user_id ? (int) $user_id : get_current_user_id();
|
41 |
-
$notices = get_user_meta( $user_id, '_imagify_ignore_notices', true );
|
42 |
-
$notices = $notices && is_array( $notices ) ? array_flip( $notices ) : array();
|
43 |
-
|
44 |
-
if ( isset( $notices[ $notice ] ) ) {
|
45 |
-
return;
|
46 |
-
}
|
47 |
-
|
48 |
-
$notices[ $notice ] = 1;
|
49 |
-
$notices = array_flip( $notices );
|
50 |
-
$notices = array_filter( $notices );
|
51 |
-
$notices = array_values( $notices );
|
52 |
-
|
53 |
-
update_user_meta( $user_id, '_imagify_ignore_notices', $notices );
|
54 |
-
}
|
55 |
-
|
56 |
-
/**
|
57 |
-
* Tell if an Imagify notice is dismissed.
|
58 |
-
*
|
59 |
-
* @since 1.6.5
|
60 |
-
* @author Grégory Viguier
|
61 |
-
*
|
62 |
-
* @param string $notice A notice ID.
|
63 |
-
* @param int $user_id A user ID.
|
64 |
-
* @return bool
|
65 |
-
*/
|
66 |
-
function imagify_notice_is_dismissed( $notice, $user_id = 0 ) {
|
67 |
-
$user_id = $user_id ? (int) $user_id : get_current_user_id();
|
68 |
-
$notices = get_user_meta( $user_id, '_imagify_ignore_notices', true );
|
69 |
-
$notices = $notices && is_array( $notices ) ? array_flip( $notices ) : array();
|
70 |
-
|
71 |
-
return isset( $notices[ $notice ] );
|
72 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
inc/functions/options.php
CHANGED
@@ -30,9 +30,8 @@ function get_imagify_option( $option, $default = false ) {
|
|
30 |
$basename = plugin_basename( IMAGIFY_FILE );
|
31 |
}
|
32 |
|
33 |
-
$
|
34 |
-
$
|
35 |
-
$value = isset( $options[ $option ] ) && $default !== $options[ $option ] ? $options[ $option ] : $default;
|
36 |
|
37 |
if ( 'api_key' === $option && defined( 'IMAGIFY_API_KEY' ) && IMAGIFY_API_KEY ) {
|
38 |
$value = IMAGIFY_API_KEY;
|
@@ -60,7 +59,9 @@ function get_imagify_option( $option, $default = false ) {
|
|
60 |
* @return void
|
61 |
*/
|
62 |
function update_imagify_option( $key, $value ) {
|
63 |
-
$options
|
|
|
|
|
64 |
$options[ $key ] = $value;
|
65 |
|
66 |
update_option( IMAGIFY_SETTINGS_SLUG, $options );
|
@@ -74,29 +75,29 @@ function update_imagify_option( $key, $value ) {
|
|
74 |
* @return bool True if the API key is valid.
|
75 |
*/
|
76 |
function imagify_valid_key() {
|
77 |
-
static $
|
78 |
|
79 |
-
if ( isset( $
|
80 |
-
return $
|
81 |
}
|
82 |
|
83 |
-
if ( ! get_imagify_option( 'api_key'
|
84 |
-
$
|
85 |
-
return
|
86 |
}
|
87 |
|
88 |
if ( get_site_transient( 'imagify_check_licence_1' ) ) {
|
89 |
-
$
|
90 |
-
return
|
91 |
}
|
92 |
|
93 |
if ( is_wp_error( get_imagify_user() ) ) {
|
94 |
-
$
|
95 |
-
return
|
96 |
}
|
97 |
|
98 |
-
$
|
99 |
-
set_site_transient( 'imagify_check_licence_1',
|
100 |
|
101 |
-
return
|
102 |
}
|
30 |
$basename = plugin_basename( IMAGIFY_FILE );
|
31 |
}
|
32 |
|
33 |
+
$options = imagify_is_active_for_network() ? get_site_option( IMAGIFY_SETTINGS_SLUG ) : get_option( IMAGIFY_SETTINGS_SLUG );
|
34 |
+
$value = isset( $options[ $option ] ) ? $options[ $option ] : $default;
|
|
|
35 |
|
36 |
if ( 'api_key' === $option && defined( 'IMAGIFY_API_KEY' ) && IMAGIFY_API_KEY ) {
|
37 |
$value = IMAGIFY_API_KEY;
|
59 |
* @return void
|
60 |
*/
|
61 |
function update_imagify_option( $key, $value ) {
|
62 |
+
$options = get_option( IMAGIFY_SETTINGS_SLUG );
|
63 |
+
$options = is_array( $options ) ? $options : array();
|
64 |
+
|
65 |
$options[ $key ] = $value;
|
66 |
|
67 |
update_option( IMAGIFY_SETTINGS_SLUG, $options );
|
75 |
* @return bool True if the API key is valid.
|
76 |
*/
|
77 |
function imagify_valid_key() {
|
78 |
+
static $is_valid;
|
79 |
|
80 |
+
if ( isset( $is_valid ) ) {
|
81 |
+
return $is_valid;
|
82 |
}
|
83 |
|
84 |
+
if ( ! get_imagify_option( 'api_key' ) ) {
|
85 |
+
$is_valid = false;
|
86 |
+
return $is_valid;
|
87 |
}
|
88 |
|
89 |
if ( get_site_transient( 'imagify_check_licence_1' ) ) {
|
90 |
+
$is_valid = true;
|
91 |
+
return $is_valid;
|
92 |
}
|
93 |
|
94 |
if ( is_wp_error( get_imagify_user() ) ) {
|
95 |
+
$is_valid = false;
|
96 |
+
return $is_valid;
|
97 |
}
|
98 |
|
99 |
+
$is_valid = true;
|
100 |
+
set_site_transient( 'imagify_check_licence_1', $is_valid, YEAR_IN_SECONDS );
|
101 |
|
102 |
+
return $is_valid;
|
103 |
}
|
inc/functions/process.php
CHANGED
@@ -197,7 +197,7 @@ function imagify_backup_file( $file_path, $backup_path = null ) {
|
|
197 |
// Make sure the source file exists.
|
198 |
if ( ! $filesystem->exists( $file_path ) ) {
|
199 |
return new WP_Error( 'source_doesnt_exist', __( 'The file to backup does not exist.', 'imagify' ), array(
|
200 |
-
'file_path' =>
|
201 |
) );
|
202 |
}
|
203 |
|
@@ -241,8 +241,8 @@ function imagify_backup_file( $file_path, $backup_path = null ) {
|
|
241 |
// Make sure the backup copy exists.
|
242 |
if ( ! $filesystem->exists( $backup_path ) ) {
|
243 |
return new WP_Error( 'backup_doesnt_exist', __( 'The file could not be saved.', 'imagify' ), array(
|
244 |
-
'file_path' =>
|
245 |
-
'backup_path' =>
|
246 |
) );
|
247 |
}
|
248 |
|
197 |
// Make sure the source file exists.
|
198 |
if ( ! $filesystem->exists( $file_path ) ) {
|
199 |
return new WP_Error( 'source_doesnt_exist', __( 'The file to backup does not exist.', 'imagify' ), array(
|
200 |
+
'file_path' => imagify_make_file_path_relative( $file_path ),
|
201 |
) );
|
202 |
}
|
203 |
|
241 |
// Make sure the backup copy exists.
|
242 |
if ( ! $filesystem->exists( $backup_path ) ) {
|
243 |
return new WP_Error( 'backup_doesnt_exist', __( 'The file could not be saved.', 'imagify' ), array(
|
244 |
+
'file_path' => imagify_make_file_path_relative( $file_path ),
|
245 |
+
'backup_path' => imagify_make_file_path_relative( $backup_path ),
|
246 |
) );
|
247 |
}
|
248 |
|
readme.txt
CHANGED
@@ -2,8 +2,8 @@
|
|
2 |
Contributors: wp_media, GregLone
|
3 |
Tags: compress image, images, performance, optimization, photos, upload, resize, gif, png, jpg, reduce image size, retina
|
4 |
Requires at least: 3.7.0
|
5 |
-
Tested up to: 4.8.
|
6 |
-
Stable tag: 1.6.
|
7 |
|
8 |
Dramatically reduce image file sizes without losing quality, make your website load faster, boost your SEO and save money on your bandwidth.
|
9 |
|
@@ -136,8 +136,20 @@ When the plugin is disabled, your existing images remain optimized. Backups of t
|
|
136 |
3. Media Page
|
137 |
|
138 |
== Changelog ==
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
139 |
= 1.6.9.1 =
|
140 |
-
* Regression fix:
|
141 |
|
142 |
= 1.6.9 =
|
143 |
* Improvement: the bulk optimization now stops as soon as the quota is fully consumed, instead of trying to optimize more images and getting error messages one after the other.
|
2 |
Contributors: wp_media, GregLone
|
3 |
Tags: compress image, images, performance, optimization, photos, upload, resize, gif, png, jpg, reduce image size, retina
|
4 |
Requires at least: 3.7.0
|
5 |
+
Tested up to: 4.8.2
|
6 |
+
Stable tag: 1.6.10
|
7 |
|
8 |
Dramatically reduce image file sizes without losing quality, make your website load faster, boost your SEO and save money on your bandwidth.
|
9 |
|
136 |
3. Media Page
|
137 |
|
138 |
== Changelog ==
|
139 |
+
= 1.6.10 =
|
140 |
+
* New: if new thumbnail sizes appear after activating a new theme or plugin, you can now optimize only these missing sizes instead of restoring and re-optimizing all images.
|
141 |
+
* Improvement: CSS and JS files have been split and are loaded only when needed.
|
142 |
+
* Improvement: in each NextGen Galleries you now have "Optimize" and "Restore" bulk actions.
|
143 |
+
* Improvement: better banner placements with languages with long sentences (looking at you, Germany).
|
144 |
+
* Improvement: messages like the "WELL DONE" one can now be translated.
|
145 |
+
* Bug Fix: the account infos in the admin bar now works properly on front-end.
|
146 |
+
* Bug Fix: some thumbnail sizes with curious name were not listed in the settings page.
|
147 |
+
* Bug Fix: improved library size calculation for "What plan do I need?". Some thumbnail sizes were missing, lowering the result.
|
148 |
+
* Regression fix: the issue with Imagify's popup on WP Rocket options screen is now also solved when WP Rocket is white-labelled.
|
149 |
+
* Lots of various small fixes and code improvements.
|
150 |
+
|
151 |
= 1.6.9.1 =
|
152 |
+
* Regression fix: don't load Imagify's popup files on WP Rocket options screen to avoid conflicts.
|
153 |
|
154 |
= 1.6.9 =
|
155 |
* Improvement: the bulk optimization now stops as soon as the quota is fully consumed, instead of trying to optimize more images and getting error messages one after the other.
|