Imagify Image Optimizer - Version 1.8.3

Version Description

  • 2018/11/24 =
  • Improvement: compatibility with new version of WP Offload Media plugin.
  • Improvement: some wording about EXIF Data and the 2MB limit.
  • Bug Fix: the lock icon now displays correctly.
  • Bug Fix: a text encoding issue with some server configurations.
Download this release

Release Info

Developer wp_media
Plugin Icon 128x128 Imagify Image Optimizer
Version 1.8.3
Comparing to
See all releases

Code changes from version 1.8.1 to 1.8.3

Files changed (154) hide show
  1. assets/css/admin.css +1 -3
  2. assets/css/admin.min.css +1 -1469
  3. assets/css/options.css +20 -1
  4. assets/css/options.min.css +1 -1
  5. assets/css/pricing-modal.min.css +1 -1150
  6. assets/images/icon-lock.svg +2 -18
  7. assets/images/imagify-menu-bar-de.jpg +0 -0
  8. assets/images/imagify-menu-bar-en.jpg +0 -0
  9. assets/images/imagify-menu-bar-es.jpg +0 -0
  10. assets/images/imagify-menu-bar-fr.jpg +0 -0
  11. assets/images/imagify-menu-bar-it.jpg +0 -0
  12. assets/images/imagify-menu-bar.jpg +0 -0
  13. assets/js/admin.min.js +1 -103
  14. assets/js/bulk.min.js +1 -1384
  15. assets/js/options.js +4 -4
  16. assets/js/options.min.js +1 -472
  17. assets/js/pricing-modal.min.js +1 -1136
  18. imagify.php +18 -19
  19. inc/3rd-party/3rd-party.php +2 -1
  20. inc/3rd-party/amazon-s3-and-cloudfront/amazon-s3-and-cloudfront.php +1 -1
  21. inc/3rd-party/amazon-s3-and-cloudfront/inc/classes/class-imagify-as3cf-attachment.php +21 -4
  22. inc/3rd-party/amazon-s3-and-cloudfront/inc/classes/class-imagify-as3cf.php +6 -2
  23. inc/3rd-party/enable-media-replace/enable-media-replace.php +1 -1
  24. inc/3rd-party/enable-media-replace/inc/classes/class-imagify-enable-media-replace.php +1 -1
  25. inc/3rd-party/formidable-pro/formidable-pro.php +1 -1
  26. inc/3rd-party/formidable-pro/inc/classes/class-imagify-formidable-pro.php +1 -1
  27. inc/3rd-party/hosting/siteground.php +1 -1
  28. inc/3rd-party/hosting/wpengine.php +1 -1
  29. inc/3rd-party/nextgen-gallery/inc/admin/ajax.php +1 -1
  30. inc/3rd-party/nextgen-gallery/inc/admin/bulk.php +1 -1
  31. inc/3rd-party/nextgen-gallery/inc/admin/enqueue.php +1 -1
  32. inc/3rd-party/nextgen-gallery/inc/admin/gallery.php +1 -1
  33. inc/3rd-party/nextgen-gallery/inc/admin/heartbeat.php +1 -1
  34. inc/3rd-party/nextgen-gallery/inc/admin/menu.php +1 -1
  35. inc/3rd-party/nextgen-gallery/inc/classes/class-imagify-ngg-attachment.php +1 -1
  36. inc/3rd-party/nextgen-gallery/inc/classes/class-imagify-ngg-db.php +1 -1
  37. inc/3rd-party/nextgen-gallery/inc/classes/class-imagify-ngg-dynamic-thumbnails-background-process.php +1 -1
  38. inc/3rd-party/nextgen-gallery/inc/classes/class-imagify-ngg-storage.php +1 -1
  39. inc/3rd-party/nextgen-gallery/inc/classes/class-imagify-ngg.php +1 -1
  40. inc/3rd-party/nextgen-gallery/inc/common/attachments.php +1 -1
  41. inc/3rd-party/nextgen-gallery/inc/functions/admin-stats.php +1 -1
  42. inc/3rd-party/nextgen-gallery/inc/functions/attachments.php +1 -1
  43. inc/3rd-party/nextgen-gallery/inc/functions/common.php +1 -1
  44. inc/3rd-party/nextgen-gallery/nextgen-gallery.php +1 -1
  45. inc/3rd-party/regenerate-thumbnails/inc/classes/class-imagify-regenerate-thumbnails.php +1 -1
  46. inc/3rd-party/regenerate-thumbnails/regenerate-thumbnails.php +1 -1
  47. inc/3rd-party/screets-lc.php +1 -1
  48. inc/3rd-party/wp-real-media-library.php +1 -1
  49. inc/3rd-party/wp-retina-2x/inc/classes/class-imagify-wp-retina-2x-core.php +1 -1
  50. inc/3rd-party/wp-retina-2x/inc/classes/class-imagify-wp-retina-2x.php +1 -1
  51. inc/3rd-party/wp-retina-2x/wp-retina-2x.php +1 -1
  52. inc/3rd-party/wp-rocket.php +1 -1
  53. inc/3rd-party/wp-time-capsule/inc/classes/class-imagify-wp-time-capsule.php +337 -0
  54. inc/3rd-party/wp-time-capsule/wp-time-capsule.php +8 -0
  55. inc/3rd-party/yoast-seo.php +1 -1
  56. inc/admin/custom-folders.php +1 -1
  57. inc/admin/heartbeat.php +1 -1
  58. inc/admin/media.php +1 -1
  59. inc/admin/meta-boxes.php +1 -1
  60. inc/admin/upgrader.php +5 -0
  61. inc/admin/upload.php +1 -1
  62. inc/classes/class-imagify-abstract-attachment.php +1 -1
  63. inc/classes/class-imagify-abstract-background-process.php +1 -1
  64. inc/classes/class-imagify-abstract-cron.php +1 -1
  65. inc/classes/class-imagify-abstract-db.php +1 -1
  66. inc/classes/class-imagify-abstract-options.php +1 -1
  67. inc/classes/class-imagify-admin-ajax-post.php +2 -2
  68. inc/classes/class-imagify-assets.php +1 -1
  69. inc/classes/class-imagify-attachment.php +1 -1
  70. inc/classes/class-imagify-cron-library-size.php +1 -1
  71. inc/classes/class-imagify-cron-rating.php +1 -1
  72. inc/classes/class-imagify-cron-sync-files.php +1 -1
  73. inc/classes/class-imagify-custom-folders.php +1 -1
  74. inc/classes/class-imagify-data.php +1 -1
  75. inc/classes/class-imagify-db.php +1 -1
  76. inc/classes/class-imagify-file-attachment.php +1 -1
  77. inc/classes/class-imagify-files-db.php +1 -1
  78. inc/classes/class-imagify-files-iterator.php +11 -3
  79. inc/classes/class-imagify-files-list-table.php +1 -1
  80. inc/classes/class-imagify-files-recursive-iterator.php +8 -2
  81. inc/classes/class-imagify-files-scan.php +1 -1
  82. inc/classes/class-imagify-files-stats.php +1 -1
  83. inc/classes/class-imagify-filesystem.php +29 -21
  84. inc/classes/class-imagify-folders-db.php +1 -1
  85. inc/classes/class-imagify-notices.php +1 -1
  86. inc/classes/class-imagify-options.php +4 -1
  87. inc/classes/class-imagify-requirements.php +1 -1
  88. inc/classes/class-imagify-settings.php +1 -1
  89. inc/classes/class-imagify-user.php +1 -1
  90. inc/classes/class-imagify-views.php +1 -1
  91. inc/classes/class-imagify.php +1 -1
  92. inc/classes/class-wp-async-request.php +1 -1
  93. inc/classes/class-wp-background-process.php +1 -1
  94. inc/common/admin-bar.php +1 -1
  95. inc/common/attachments.php +1 -1
  96. inc/common/partners.php +1 -1
  97. inc/functions/admin-stats.php +1 -1
  98. inc/functions/admin-ui.php +1 -1
  99. inc/functions/admin.php +1 -1
  100. inc/functions/api.php +1 -1
  101. inc/functions/attachments.php +1 -1
  102. inc/functions/common.php +10 -3
  103. inc/functions/compat-spl-autoload.php +1 -1
  104. inc/functions/compat.php +1 -1
  105. inc/functions/deprecated.php +1 -1
  106. inc/functions/formatting.php +1 -1
  107. inc/functions/i18n.php +1 -1
  108. inc/functions/options.php +1 -1
  109. inc/functions/partners.php +1 -1
  110. inc/functions/process.php +1 -1
  111. readme.txt +19 -2
  112. uninstall.php +3 -3
  113. views/modal-payment.php +1 -1
  114. views/modal-settings-infos.php +1 -1
  115. views/modal-settings-partners-infos.php +18 -0
  116. views/modal-settings-visual-comparison.php +1 -1
  117. views/notice-almost-over-quota.php +1 -1
  118. views/notice-backup-folder-not-writable.php +1 -1
  119. views/notice-footer.php +1 -1
  120. views/notice-grid-view.php +1 -1
  121. views/notice-header.php +1 -1
  122. views/notice-http-block-external.php +1 -1
  123. views/notice-plugins-to-deactivate.php +1 -1
  124. views/notice-rating.php +1 -1
  125. views/notice-temporary.php +1 -1
  126. views/notice-welcome-steps.php +1 -1
  127. views/notice-wp-rocket.php +1 -1
  128. views/notice-wrong-api-key.php +1 -1
  129. views/page-bulk.php +2 -2
  130. views/page-files-list.php +1 -1
  131. views/page-settings.php +44 -6
  132. views/part-bulk-optimization-header-row-custom-folders.php +1 -1
  133. views/part-bulk-optimization-header-row-library.php +1 -1
  134. views/part-bulk-optimization-header.php +1 -1
  135. views/part-bulk-optimization-infos.php +1 -1
  136. views/part-bulk-optimization-newbie.php +1 -1
  137. views/part-bulk-optimization-overquota-alert.php +1 -1
  138. views/part-bulk-optimization-spinner.php +1 -1
  139. views/part-bulk-optimization-success.php +1 -1
  140. views/part-bulk-optimization-table-row-folder-type.php +1 -1
  141. views/part-bulk-optimization-table.php +1 -1
  142. views/part-bulk-optimization-underscore-file-row-custom-folders.php +1 -1
  143. views/part-bulk-optimization-underscore-file-row-library.php +1 -1
  144. views/part-discount-banner.php +1 -1
  145. views/part-documentation-link.php +1 -1
  146. views/part-files-list-header.php +1 -1
  147. views/part-rocket-ad.php +1 -1
  148. views/part-settings-account.php +1 -1
  149. views/part-settings-custom-folders.php +1 -1
  150. views/part-settings-files-tree-row.php +22 -21
  151. views/part-settings-footer.php +1 -1
  152. views/part-settings-header.php +1 -1
  153. views/part-settings-library.php +1 -1
  154. views/part-settings-row-custom-folder.php +1 -1
assets/css/admin.css CHANGED
@@ -1081,7 +1081,6 @@ p.imagify-section-title.imagify-section-title {
1081
  ul.imagify-datas-list.imagify-datas-list {
1082
  margin: 0 auto;
1083
  color: #555;
1084
- font-size: 10px;
1085
  }
1086
  ul.imagify-datas-list .big {
1087
  font-size: 12px;
@@ -1179,7 +1178,7 @@ ul.imagify-datas-details.imagify-datas-details {
1179
  overflow: hidden;
1180
  border-top: 2px solid transparent;
1181
  padding-top: 5px;
1182
- font-size: 8px;
1183
  }
1184
  .nggform .imagify-datas-actions-links {
1185
  position: relative;
@@ -1211,7 +1210,6 @@ ul.imagify-datas-details.imagify-datas-details {
1211
  /* Media edition */
1212
  .compat-field-imagify .imagify-datas-actions-links a,
1213
  .misc-pub-imagify .imagify-datas-actions-links a {
1214
- font-size: 10px;
1215
  float: left;
1216
  width: 50%;
1217
  }
1081
  ul.imagify-datas-list.imagify-datas-list {
1082
  margin: 0 auto;
1083
  color: #555;
 
1084
  }
1085
  ul.imagify-datas-list .big {
1086
  font-size: 12px;
1178
  overflow: hidden;
1179
  border-top: 2px solid transparent;
1180
  padding-top: 5px;
1181
+ font-size: 11px;
1182
  }
1183
  .nggform .imagify-datas-actions-links {
1184
  position: relative;
1210
  /* Media edition */
1211
  .compat-field-imagify .imagify-datas-actions-links a,
1212
  .misc-pub-imagify .imagify-datas-actions-links a {
 
1213
  float: left;
1214
  width: 50%;
1215
  }
assets/css/admin.min.css CHANGED
@@ -1,1469 +1 @@
1
- /**
2
- * == Utilities Classes
3
- */
4
-
5
- /* Util: Flexbox */
6
- .imagify-flex {
7
- display: flex;
8
- }
9
- .imagify-vcenter {
10
- align-items: center;
11
- }
12
- .imagify-noshrink {
13
- flex-shrink: 0;
14
- }
15
- .imagify-nogrow {
16
- flex-grow: 0;
17
- }
18
-
19
- /* Util: dimension */
20
- .imagify-wauto {
21
- width: auto;
22
- }
23
- .imagify-hauto {
24
- height: auto;
25
- }
26
- .imagify-full-width {
27
- width: 100%;
28
- }
29
-
30
- /* Util: float */
31
- .imagify-start {
32
- float: left;
33
- }
34
- .imagify-end {
35
- float: right;
36
- }
37
-
38
- /* Util: text-align */
39
- .imagify-txt-start.imagify-txt-start.imagify-txt-start {
40
- text-align: left;
41
- }
42
- .imagify-txt-center.imagify-txt-center.imagify-txt-center {
43
- text-align: center;
44
- }
45
- .imagify-txt-end.imagify-txt-end.imagify-txt-end {
46
- text-align: right;
47
- }
48
-
49
- /* Util: margin/padding */
50
- .imagify-mt0.imagify-mt0 {
51
- margin-top: 0;
52
- }
53
- .imagify-mt1.imagify-mt1 {
54
- margin-top: 1em;
55
- }
56
- .imagify-mt2.imagify-mt2 {
57
- margin-top: 2em;
58
- }
59
- .imagify-mt3.imagify-mt3 {
60
- margin-top: 3em;
61
- }
62
- .imagify-mb0.imagify-mb0 {
63
- margin-bottom: 0;
64
- }
65
- .imagify-mb1.imagify-mb1 {
66
- margin-bottom: 1em;
67
- }
68
- .imagify-mr1.imagify-mr1 {
69
- margin-right: 1em;
70
- }
71
- .imagify-ml2.imagify-ml2 {
72
- margin-left: 2em;
73
- }
74
- .imagify-mr2.imagify-mr2 {
75
- margin-right: 2em;
76
- }
77
-
78
- .imagify-pl0.imagify-pl0.imagify-pl0 {
79
- padding-left: 0;
80
- }
81
- .imagify-pb0.imagify-pb0 {
82
- padding-bottom: 0;
83
- }
84
- .imagify-pr1.imagify-pr1 {
85
- padding-right: 1em;
86
- }
87
- .imagify-pr2.imagify-pr2 {
88
- padding-right: 2em;
89
- }
90
-
91
- /* Util: Overflow */
92
- .imagify-oh {
93
- overflow: hidden;
94
- }
95
- .imagify-clear {
96
- clear: both;
97
- }
98
- .imagify-clearfix:after,
99
- .imagify-inline-options:after,
100
- .imagify-settings-main-content:after,
101
- .imagify-settings-section:after {
102
- content: "";
103
- display: table;
104
- width: 100%;
105
- clear: both;
106
- }
107
- .imagify-setting-optim-level .imagify-inline-options:after {
108
- display: none;
109
- }
110
-
111
- /* Util: Dividers */
112
- .imagify-divider {
113
- height: 1px;
114
- margin: 20px 0;
115
- background: #D2D3D6;
116
- }
117
- .imagify-pipe {
118
- display: inline-block;
119
- margin: 0 .75em;
120
- vertical-align: middle;
121
- height: 15px;
122
- width: 1px;
123
- background: #979797;
124
- }
125
-
126
- /* Titles */
127
- .imagify-h3-like.imagify-h3-like.imagify-h3-like {
128
- margin-bottom: 0;
129
- font-size: 19px;
130
- font-weight: 500;
131
- color: #1F2332;
132
- }
133
- .imagify-h4-like.imagify-h4-like.imagify-h4-like {
134
- font-size: 14px;
135
- font-weight: bold;
136
- color: #2E3243;
137
- }
138
-
139
- /* Default counter */
140
- .imagify-count.imagify-count {
141
- counter-reset: num;
142
- }
143
- .imagify-count .imagify-count-title {
144
- font-weight: bold;
145
- }
146
- .imagify-default-settings {
147
- color: #73818c;
148
- font-weight: normal;
149
- }
150
- .imagify-count .imagify-count-title:before {
151
- counter-increment: num 1;
152
- content: counter(num) ". ";
153
- }
154
-
155
- /* List counter */
156
- .imagify-count-list {
157
- counter-reset: listcount;
158
- }
159
- .imagify-count-list li {
160
- display: flex;
161
- align-items: center;
162
- }
163
- .imagify-count-list li + li {
164
- margin-top: .5em;
165
- }
166
- .imagify-count-list li:before {
167
- display: flex;
168
- flex-basis: 24px;
169
- flex-shrink: 0;
170
- flex-grow: 0;
171
- align-items: center;
172
- justify-content: center;
173
- margin-right: 16px;
174
- border: 2px solid #40b1d0;
175
- width: 24px;
176
- height: 24px;
177
- counter-increment: listcount 1;
178
- content: counter(listcount);
179
- color: #40b1d0;
180
- border-radius: 50%;
181
- }
182
-
183
- /* Table layout */
184
- .imagify-table {
185
- display: table;
186
- width: 100%;
187
- }
188
- .imagify-cell {
189
- display: table-cell;
190
- padding: 10px;
191
- vertical-align: top;
192
- }
193
- .imagify-cell.va-top,
194
- .va-top .imagify-cell {
195
- vertical-align: top;
196
- }
197
-
198
- .imagify-bulk-submit .imagify-cell {
199
- padding-top: 0;
200
- }
201
-
202
- /* When an "Imagify" modal is open in a page */
203
- body.imagify-modal-is-open {
204
- overflow: hidden;
205
- }
206
-
207
- /* Loader/Spinner */
208
- .imagify-spinner {
209
- display: inline-block;
210
- width: 20px;
211
- height: 20px;
212
- margin-right: 5px;
213
- vertical-align: middle;
214
- background: rgba(0, 0, 0, 0) url("../images/spinner.gif") no-repeat scroll 0 0 / 20px 20px;
215
- opacity: 0.7;
216
- }
217
- .spinner.imagify-hidden {
218
- width: 0;
219
- margin: 4px 0 0 0;
220
- }
221
-
222
- /* Some basic colors */
223
- .imagify-primary.imagify-primary.imagify-primary {
224
- color: #40b1d0;
225
- }
226
- .imagify-secondary.imagify-secondary.imagify-secondary,
227
- .imagify-valid {
228
- color: #8BC34A;
229
- }
230
-
231
- /* Informations in column (media popin, media details) */
232
- .misc-pub-section.misc-pub-imagify h4 {
233
- font-size: 14px;
234
- margin-top: 5px;
235
- margin-bottom: 0;
236
- }
237
-
238
- /* Doughnut */
239
- .imagify-chart {
240
- position: relative;
241
- top: 1px;
242
- display: inline-block;
243
- vertical-align: middle;
244
- }
245
- .imagify-chart-container {
246
- position: relative;
247
- display: inline-block;
248
- margin-right: 5px;
249
- }
250
- .imagify-chart-container canvas {
251
- display: block;
252
- }
253
-
254
- /**
255
- *
256
- * == Settings page
257
- *
258
- */
259
-
260
-
261
- /* Basic HTML elements for Options and Bulk pages */
262
- .imagify-settings a,
263
- .imagify-settings .button,
264
- .imagify-settings input,
265
- .imagify-welcome a,
266
- .imagify-welcome .button,
267
- .imagify-weolcome input {
268
- -webkit-transition: all .275s;
269
- transition: all .275s;
270
- }
271
- .imagify-settings a {
272
- color: #40b1d0;
273
- }
274
-
275
- .imagify-settings,
276
- .imagify-settings p,
277
- .imagify-settings th {
278
- color: #5F758E;
279
- }
280
-
281
- /* Buttons */
282
- .imagify-settings .button,
283
- .imagify-welcome .button,
284
- .imagify-notice .button,
285
- .imagify-button.imagify-button,
286
- .imagify-button-primary.imagify-button-primary,
287
- .imagify-button-secondary.imagify-button-secondary {
288
- height: auto;
289
- padding: 11px 22px;
290
- border: 0 none;
291
- font-size: 14px;
292
- font-weight: 600;
293
- text-transform: uppercase;
294
- letter-spacing: 0.01em;
295
- word-spacing: 0.01em;
296
- box-shadow: 0 3px 0 rgba(0, 0, 0, .15);
297
- border-radius: 3px;
298
- cursor: pointer;
299
- transition: all .275s;
300
- }
301
-
302
- .button-primary.button-mini {
303
- padding: 2px 10px;
304
- }
305
- .imagify-settings .button.button-mini-flat {
306
- padding: 3px 6px 5px;
307
- font-size: 12px;
308
- box-shadow: none!important;
309
- line-height: 1.2;
310
- }
311
- .imagify-settings .button.button-mini-flat:hover,
312
- .imagify-settings .button.button-mini-flat:focus {
313
- box-shadow: none!important;
314
- }
315
-
316
- .imagify-title .button-ghost.button-ghost,
317
- .imagify-button-ghost.imagify-button-ghost {
318
- padding: 2px 9px;
319
- border: 1px solid #40B1D0;
320
- font-size: 12px;
321
- font-weight: normal;
322
- color: #40B1D0;
323
- background: transparent;
324
- box-shadow: none;
325
- }
326
- .imagify-title .button-ghost.button-ghost:hover,
327
- .imagify-title .button-ghost.button-ghost:focus,
328
- .imagify-button-ghost.imagify-button-ghost:hover,
329
- .imagify-button-ghost.imagify-button-ghost:focus {
330
- border-color: transparent;
331
- color: #000;
332
- background: #40B1D0;
333
- }
334
- .imagify-button-ghost.imagify-button-ghost:hover,
335
- .imagify-button-ghost.imagify-button-ghost:focus {
336
- color: #FFF;
337
- }
338
- .imagify-button-medium.imagify-button-medium {
339
- text-transform: uppercase;
340
- letter-spacing: 0.1em;
341
- padding: 3px 10px;
342
- font-weight: bold;
343
- }
344
- .imagify-button-medium.imagify-button-ghost {
345
- border-width: 2px;
346
- }
347
- [class*="imagify-"] .button .dashicons {
348
- margin-right: 5px;
349
- vertical-align: middle;
350
- }
351
-
352
- .imagify-settings .button-primary.button-primary,
353
- .imagify-welcome .button-primary.button-primary,
354
- .imagify-button-primary.imagify-button-primary {
355
- background: #40B1D0;
356
- color: #FFF;
357
- box-shadow: 0 3px 0 rgba(51, 142, 166, 1);
358
- text-shadow: 0 -1px 1px #006799, 1px 0 1px #006799, 0 1px 1px #006799!important;
359
- }
360
- .imagify-button-secondary.imagify-button-secondary {
361
- background: #8BC34A;
362
- color: #FFF;
363
- box-shadow: 0 3px 0 #6F9C3B;
364
- text-shadow: 0 -1px 1px #6F9C3B, 1px 0 1px #6F9C3B, 0 1px 1px #6F9C3B!important;
365
- }
366
- .imagify-settings .button-primary:hover,
367
- .imagify-settings .button-primary:focus,
368
- .imagify-welcome .button-primary:hover,
369
- .imagify-welcome .button-primary:focus,
370
- .imagify-button-primary.imagify-button-primary:hover,
371
- .imagify-button-primary.imagify-button-primary:focus {
372
- background: rgb(51, 142, 166);
373
- box-shadow: 0 3px 0 rgb(31, 122, 146);
374
- }
375
- .imagify-button-secondary.imagify-button-secondary:hover,
376
- .imagify-button-secondary.imagify-button-secondary:focus {
377
- background: #6F9C3B;
378
- color: #FFF;
379
- }
380
-
381
- .imagify-button-light.imagify-button-light {
382
- background: #FFF;
383
- color: #4a4a4a;
384
- box-shadow: 0 2px 0 rgba(0, 0, 0, .2);
385
- }
386
- .imagify-block-secondary .imagify-button-light.imagify-button-light {
387
- color: #6F9C3B;
388
- }
389
- .imagify-button-light.imagify-button-light:hover,
390
- .imagify-button-light.imagify-button-light:focus {
391
- color: #FFF;
392
- background: rgba(0, 0, 0, .2);
393
- }
394
-
395
- /* Buttons clean */
396
- .button.imagify-button-clean,
397
- .imagify-button-clean {
398
- padding: 0;
399
- background: transparent;
400
- box-shadow: none;
401
- }
402
- .imagify-button-clean .dashicons-plus {
403
- width: 32px;
404
- height: 25px;
405
- }
406
- .imagify-button-clean .dashicons-plus:before {
407
- display: flex;
408
- align-items: center;
409
- justify-content: center;
410
- width: 25px;
411
- height: 22px;
412
- margin-left: 2px;
413
- padding-top: 3px;
414
- font-size: 17px;
415
- background: #40B1D0;
416
- color: #FFF;
417
- transition: all .275s;
418
- }
419
- .button.imagify-button-clean:hover,
420
- .button.imagify-button-clean:focus,
421
- .button.imagify-button-clean:active,
422
- .button.imagify-button-clean[disabled] {
423
- background: transparent!important;
424
- color: #343A49;
425
- box-shadow: none;
426
- }
427
- .button.imagify-button-clean:hover .dashicons-plus:before,
428
- .button.imagify-button-clean:focus .dashicons-plus:before {
429
- background: #343A49;
430
- }
431
-
432
- /* Buttons link-like */
433
- button.imagify-link-like {
434
- border: 0;
435
- padding: 0;
436
- color: inherit;
437
- text-decoration: underline;
438
- font-size: 13px;
439
- box-shadow: none;
440
- background: transparent;
441
- cursor: pointer;
442
- }
443
-
444
- /* Modifier */
445
- .imagify-section-positive .imagify-button-light {
446
- color: #709A41;
447
- }
448
- .imagify-button.imagify-button-big {
449
- font-size: 15px;
450
- padding: 11px 30px;
451
- }
452
- .imagify-button-big .dashicons {
453
- font-size: 1.45em;
454
- margin-right: 6px;
455
- margin-left: -4px;
456
- }
457
-
458
- .imagify-settings .button .dashicons,
459
- .imagify-welcome .button .dashicons,
460
- .imagify-notice .button .dashicons,
461
- .imagify-button.imagify-button .dashicons,
462
- .imagify-button-primary.imagify-button-primary .dashicons,
463
- .imagify-button-secondary.imagify-button-secondary .dashicons {
464
- vertical-align: middle;
465
- }
466
-
467
- [class*="imagify-"] .button-text {
468
- display: inline-block;
469
- vertical-align: middle;
470
- }
471
-
472
- /* Exception in Media edition page and post Edition pages (insert media popin) */
473
- .wp_attachment_image .imagify-button-primary,
474
- .media-frame-content .imagify-button-primary {
475
- padding: 0 10px 1px;
476
- margin: 0 5px 2px 0;
477
- font-size: 13px;
478
- line-height: 26px;
479
- box-shadow: 0 3px 0 rgba(51, 142, 166, 1);
480
- }
481
- .wp_attachment_image .imagify-button-primary {
482
- float: left;
483
- }
484
-
485
- /**
486
- * == Header & Subheader & Sections
487
- *
488
- * (options, Welcome Notice, Bulk)
489
- */
490
- .imagify-title.imagify-title {
491
- position: relative;
492
- padding: 10px 30px;
493
- font-size: 23px;
494
- background: #1F2332;
495
- color: #FFF;
496
- }
497
- .imagify-welcome .imagify-logo {
498
- opacity: 1;
499
- }
500
- .imagify-welcome .imagify-title {
501
- display: flex;
502
- padding: 20px 30px;
503
- }
504
- .imagify-settings .imagify-title { /* (options and bulk) */
505
- display: flex;
506
- justify-content: space-between;
507
- align-items: center;
508
- }
509
- .imagify-settings .imagify-logo-block {
510
- display: flex;
511
- align-items: center;
512
- flex-shrink: 0;
513
- flex-grow: 0;
514
- padding: 0;
515
- margin-right: 35px;
516
- color: inherit;
517
- }
518
- .imagify-logo-block sup {
519
- color: #1F2332;
520
- }
521
- .imagify-settings .imagify-title + .imagify-notice {
522
- margin: 0;
523
- border-right: 1px solid #D9D9D9;
524
- padding-top: 15px;
525
- padding-bottom: 15px;
526
- }
527
- .imagify-title .title-text {
528
- font-size: 28px;
529
- font-weight: bold;
530
- color: #FFF;
531
- }
532
- .imagify-lb-icon {
533
- padding-right: 18px;
534
- }
535
- .imagify-lb-text img {
536
- margin-bottom: .15em;
537
- }
538
- .imagify-lb-text {
539
- font-size: 23px;
540
- font-weight: bold;
541
- color: #FFF;
542
- }
543
- .imagify-logo {
544
- display: block;
545
- vertical-align: top;
546
- opacity: .4;
547
- }
548
- .imagify-sub-header,
549
- .imagify-sub-title.imagify-sub-title, /* heavier is better */
550
- .imagify-settings div.submit,
551
- .imagify-section {
552
- margin: 0;
553
- padding: 20px;
554
- background: #F2F5F7;
555
- }
556
- .imagify-sub-title.imagify-sub-title,
557
- .imagify-section-positive {
558
- padding-left: 40px;
559
- }
560
- .imagify-section-positive {
561
- background: #8cc152;
562
- color: #FFF;
563
- }
564
- .imagify-section-positive p {
565
- color: #FFF
566
- }
567
- .imagify-section-gray {
568
- background: #D9E4EB;
569
- }
570
- .imagify-section-gray .imagify-count-title {
571
- color: #4a4a4a;
572
- }
573
- .imagify-section p:first-child {
574
- margin-top: 0;
575
- }
576
- .imagify-section p:last-child {
577
- margin-bottom: 0;
578
- }
579
-
580
- /* Documentation link */
581
- .imagify-settings .imagify-documentation-link-box {
582
- display: flex;
583
- padding: 12px 13px 14px;
584
- border: 1px solid #40b1d0;
585
- color: #E5EBEF;
586
- border-radius: 3px;
587
- }
588
- .imagify-documentation-link-icon {
589
- width: 23px;
590
- height: 31px;
591
- font-size: 2.6em;
592
- margin-right: 15px;
593
- line-height: 1.3;
594
- }
595
- .imagify-documentation-link-box span {
596
- font-size: 12px;
597
- }
598
- .imagify-documentation-link-box a {
599
- font-weight: bold;
600
- }
601
-
602
- @media (max-width: 1120px) {
603
- .imagify-settings .imagify-title {
604
- flex-wrap: wrap;
605
- }
606
- }
607
-
608
- .imagify-settings-section {
609
- padding: 10px 20px;
610
- }
611
- .imagify-account-info-col .imagify-settings-section {
612
- padding-right: 0;
613
- }
614
- .imagify-settings-main-content,
615
- .imagify-welcome .imagify-settings-section {
616
- border: 1px solid #D9D9D9;
617
- border-top-width: 0;
618
- background: #FFF;
619
- }
620
-
621
- .imagify-settings-main-content {
622
- padding-bottom: 20px;
623
- }
624
- .imagify-settings-main-content p {
625
- font-size: 14px;
626
- }
627
-
628
- .imagify-settings-main-content + .imagify-settings-main-content {
629
- margin-top: 20px;
630
- border-top-width: 1px;
631
- }
632
-
633
- .imagify-br {
634
- line-height: 2;
635
- }
636
-
637
- /* New to imagify, title */
638
- p.imagify-section-title.imagify-section-title {
639
- font-size: 20px;
640
- margin-top: -.3em;
641
- margin-bottom: -.6em;
642
- }
643
-
644
- /**
645
- * == Rating (Notice + Settings)
646
- */
647
- .imagify-rate-us.imagify-rate-us {
648
- text-align: right;
649
- margin: -1em -2.4em -1em 0;
650
- color: #FFF;
651
- }
652
- .imagify-rate-us a {
653
- color: #40B1D0;
654
- }
655
- .imagify-rate-us .stars {
656
- display: inline-block;
657
- margin: 2px 0 0 10px;
658
- text-decoration: none;
659
- letter-spacing: .2em;
660
- vertical-align: -1px;
661
- }
662
- .imagify-rate-us .stars .dashicons:before {
663
- font-size: 18px;
664
- }
665
- .imagify-rate-us a:hover,
666
- .imagify-rate-us a:focus {
667
- color: #FEE102;
668
- }
669
- @media (max-width: 1220px) {
670
- .imagify-rate-us.imagify-rate-us {
671
- position: static;
672
- margin-bottom: 0;
673
- text-align: left;
674
- }
675
- .imagify-rate-us.imagify-rate-us br {
676
- display: none;
677
- }
678
- .imagify-rate-us .stars {
679
- display: block;
680
- margin-left: 0;
681
- }
682
- }
683
-
684
- /**
685
- * == Messages & infos
686
- */
687
- .imagify-important {
688
- color: #F5A623;
689
- }
690
- .imagify-success,
691
- .imagify-settings .imagify-success {
692
- color: #8BC34A;
693
- }
694
- .imagify-info,
695
- .imagify-info a {
696
- color: #7A8996;
697
- font-size: 12px;
698
- }
699
- .imagify-info {
700
- position: relative;
701
- display: inline-block;
702
- padding-left: 25px;
703
- }
704
- .imagify-info .dashicons {
705
- position: absolute;
706
- left: 0; top: 0;
707
- color: #40B1D0;
708
- }
709
-
710
- /* Custom checkboxes in CSS */
711
- .imagify-settings.imagify-settings [type="checkbox"]:not(:checked),
712
- .imagify-settings.imagify-settings [type="checkbox"]:checked,
713
- .imagify-checkbox.imagify-checkbox:not(:checked),
714
- .imagify-checkbox.imagify-checkbox:checked {
715
- position: absolute;
716
- opacity: 0.01;
717
- }
718
- .imagify-settings.imagify-settings [type="checkbox"]:not(:checked):focus,
719
- .imagify-settings.imagify-settings [type="checkbox"]:checked:focus,
720
- .imagify-checkbox.imagify-checkbox:not(:checked):focus,
721
- .imagify-checkbox.imagify-checkbox:checked:focus {
722
- box-shadow: none!important; /* system value to override */
723
- outline: none!important;
724
- border: 0 none!important;
725
- }
726
-
727
- .imagify-settings [type="checkbox"]:not(:checked) + label,
728
- .imagify-settings [type="checkbox"]:checked + label,
729
- .imagify-checkbox.imagify-checkbox:not(:checked) + label,
730
- .imagify-checkbox.imagify-checkbox:checked + label {
731
- position: relative;
732
- display: flex;
733
- align-items: center;
734
- min-height: 24px;
735
- padding-left: 40px;
736
- cursor: pointer;
737
- font-size: 14px;
738
- font-weight: bold;
739
- color: #2E3243;
740
- }
741
-
742
- /* checkbox aspect */
743
- .imagify-settings [type="checkbox"]:not(:checked) + label:before,
744
- .imagify-settings [type="checkbox"]:checked + label:before,
745
- .imagify-checkbox.imagify-checkbox:not(:checked) + label:before,
746
- .imagify-checkbox.imagify-checkbox:checked + label:before {
747
- content: '';
748
- position: absolute;
749
- left: 0; top: 0;
750
- width: 22px; height: 22px;
751
- border: 2px solid #8BA6B4;
752
- background: #FFFFFF;
753
- border-radius: 3px;
754
- }
755
- /* checked mark aspect */
756
- .imagify-settings [type="checkbox"]:not(:checked) + label:after,
757
- .imagify-settings [type="checkbox"]:checked + label:after,
758
- .imagify-checkbox.imagify-checkbox:not(:checked) + label:after,
759
- .imagify-checkbox.imagify-checkbox:checked + label:after {
760
- content: "✓";
761
- position: absolute;
762
- font-size: 1.4em;
763
- top: -2px; left: 4.5px;
764
- color: #8BA6B4;
765
- font-weight: normal;
766
- -webkit-transition: all .2s;
767
- -moz-transition: all .2s;
768
- -ms-transition: all .2s;
769
- transition: all .2s;
770
- }
771
- /* disabled aspect */
772
- .imagify-settings [type="checkbox"][disabled]:not(:checked) + label:before,
773
- .imagify-settings [type="checkbox"][disabled]:checked + label:before,
774
- .imagify-checkbox.imagify-checkbox[disabled]:not(:checked) + label:before,
775
- .imagify-checkbox.imagify-checkbox[disabled]:checked + label:before {
776
- border-color: #ccc;
777
- background: #ddd;
778
- }
779
- /* checked mark aspect changes */
780
- .imagify-settings [type="checkbox"]:not(:checked) + label:after,
781
- .imagify-checkbox.imagify-checkbox:not(:checked) + label:after {
782
- opacity: 0;
783
- -webkit-transform: scale(0);
784
- -moz-transform: scale(0);
785
- -ms-transform: scale(0);
786
- transform: scale(0);
787
- }
788
- .imagify-settings [type="checkbox"]:checked + label:after,
789
- .imagify-checkbox.imagify-checkbox:checked + label:after {
790
- opacity: 1;
791
- -webkit-transform: scale(1);
792
- -moz-transform: scale(1);
793
- -ms-transform: scale(1);
794
- transform: scale(1);
795
- }
796
-
797
- /* medium version */
798
- .medium.imagify-checkbox:not(:checked) + label:before,
799
- .medium.imagify-checkbox:checked + label:before {
800
- width: 22px;
801
- height: 22px;
802
- border-width: 1.5px;
803
- border-radius: 2px;
804
- margin-top: 0;
805
- }
806
- .medium.imagify-checkbox:not(:checked) + label:after,
807
- .medium.imagify-checkbox:checked + label:after {
808
- font-size: 1.1em;
809
- left: -17px;
810
- top: 3px;
811
- }
812
-
813
- /* mini version */
814
- .imagify-settings .mini[type="checkbox"]:not(:checked) + label:before,
815
- .imagify-settings .mini[type="checkbox"]:checked + label:before,
816
- .mini.imagify-checkbox:not(:checked) + label:before,
817
- .mini.imagify-checkbox:checked + label:before {
818
- width: 15px;
819
- height: 15px;
820
- border-width: 1px;
821
- border-radius: 2px;
822
- margin-top: 0;
823
- }
824
- .imagify-settings .mini[type="checkbox"]:not(:checked) + label:after,
825
- .imagify-settings .mini[type="checkbox"]:checked + label:after,
826
- .mini.imagify-checkbox:not(:checked) + label:after,
827
- .mini.imagify-checkbox:checked + label:after {
828
- font-size: .9em;
829
- left: -21px;
830
- top: -0.5px;
831
- }
832
- /* focus aspect */
833
- .imagify-settings [type="checkbox"]:not(:checked):focus + label:before,
834
- .imagify-settings [type="checkbox"]:checked:focus + label:before,
835
- .imagify-checkbox.imagify-checkbox:not(:checked):focus + label:before,
836
- .imagify-checkbox.imagify-checkbox:checked:focus + label:before {
837
- border-style: dotted;
838
- border-color: #40b1d0;
839
- }
840
-
841
- /* Checkbox groups */
842
- .imagify-check-group {
843
- padding-left: 2px;
844
- margin-bottom: 0;
845
- }
846
- .imagify-check-group.imagify-is-scrollable {
847
- max-height: 15em;
848
- overflow-y: auto;
849
- padding: 8px;
850
- margin: 1.5em 0 0 -8px;
851
- background: #F4F7F9;
852
- border: 1px solid #D2D3D6;
853
- border-radius: 3px;
854
- }
855
- .imagify-is-scrollable legend + p {
856
- margin-top: 0;
857
- }
858
- .imagify-is-scrollable [type="checkbox"]:not(:checked) + label:before,
859
- .imagify-is-scrollable [type="checkbox"]:checked + label:before {
860
- background: #F4F7F9;
861
- }
862
- .imagify-settings .imagify-check-group.imagify-check-group label {
863
- color: #338EA6;
864
- font-weight: 500;
865
- }
866
-
867
- /* Custom radio in CSS */
868
- .imagify-inline-options {
869
- position: relative;
870
- display: table;
871
- width: 100%;
872
- max-width: 600px;
873
- border-collapse: collapse;
874
- }
875
-
876
- .imagify-inline-options input[type="radio"]:not(:checked),
877
- .imagify-inline-options input[type="radio"]:checked {
878
- position: absolute;
879
- left: 5px; top: 5px;
880
- display: none;
881
- }
882
-
883
- .imagify-inline-options input[type="radio"]:not(:checked) + label,
884
- .imagify-inline-options input[type="radio"]:checked + label {
885
- position: relative;
886
- display: table-cell;
887
- padding: 13px 10px;
888
- text-align: center;
889
-
890
- font-weight: 600;
891
- font-size: 16px;
892
- text-transform: uppercase;
893
- letter-spacing: 0.1em;
894
- color: #FFF;
895
- background: #2E3243;
896
- box-shadow: 0 -3px 0 rgba(0, 0, 0, 0.1) inset;
897
- z-index: 2;
898
- -webkit-transition: all .275s;
899
- transition: all .275s;
900
- }
901
-
902
- .imagify-inline-options input[type="radio"]:not(:checked) + label:first-of-type,
903
- .imagify-inline-options input[type="radio"]:checked + label:first-of-type {
904
- border-radius: 3px 0 0 3px;
905
- }
906
-
907
- .imagify-inline-options input[type="radio"]:not(:checked) + label:last-of-type,
908
- .imagify-inline-options input[type="radio"]:checked + label:last-of-type {
909
- border-radius: 0 3px 3px 0;
910
- }
911
-
912
- .imagify-inline-options input[type="radio"]:checked + label {
913
- background: #8BC34A
914
- }
915
-
916
- .imagify-inline-options .imagify-info {
917
- margin-top: 15px;
918
- }
919
-
920
- /**
921
- * Account information columns (Settings & Bulk)
922
- */
923
- .imagify-col.imagify-col.imagify-account-info-col,
924
- .imagify-account-info-col {
925
- width: 380px;
926
- max-width: 100%;
927
- padding: 0 20px 0 0;
928
- }
929
- .imagify-col.imagify-col.imagify-shared-with-account-col,
930
- .imagify-shared-with-account-col {
931
- width: calc(100% - 380px);
932
- padding: 0;
933
- }
934
-
935
- .imagify-account-info-col .imagify-options-title {
936
- padding: 24px 26px;
937
- color: #FFF;
938
- background: #1F2332;
939
- }
940
- .imagify-block-secondary {
941
- padding: 26px 26px 35px;
942
- border: 1px solid #75A345;
943
- background: #8BC34A;
944
- border-radius: 3px;
945
- color: #FFF;
946
- }
947
- .imagify-block-secondary.imagify-block-secondary p,
948
- .imagify-account-info-col .imagify-block-secondary.imagify-block-secondary h3 {
949
- color: inherit;
950
- }
951
- .imagify-account-info-col .imagify-col-content h3:first-child {
952
- margin-top: 0;
953
- }
954
- .imagify-account-info-col .imagify-col-content h3 {
955
- font-size: 19px;
956
- }
957
- .imagify-account-info-col .imagify-col-content p {
958
- margin: 1.5em 0;
959
- }
960
- .imagify-account-info-col .imagify-col-content p:first-child {
961
- margin-top: 0;
962
- }
963
-
964
- .imagify-user-plan-label {
965
- float: right;
966
- margin-top: -4px;
967
- padding: 2px 10px;
968
- border: 2px solid #40B1D0;
969
- font-size: 14px;
970
- text-transform: uppercase;
971
- letter-spacing: 0.02em;
972
- color: #40B1D0;
973
- border-radius: 3px;
974
- }
975
-
976
- /* Content given after remote answer, avoid "flash" effect on content */
977
- .imagify-user-plan-label:empty {
978
- display: none;
979
- }
980
-
981
- /**
982
- * == Columns
983
- */
984
- .imagify-columns {
985
- overflow: hidden;
986
- padding: 15px 0;
987
- counter-reset: cols;
988
- }
989
- .imagify-columns [class^="col-"] {
990
- float: left;
991
- -webkit-box-sizing: border-box;
992
- -moz-box-sizing: border-box;
993
- box-sizing: border-box;
994
- }
995
- .imagify-columns .col-1-3 {
996
- width: 33.333%;
997
- padding-left: 28px;
998
- }
999
- .imagify-columns .col-2-3 {
1000
- width: 66.666%;
1001
- padding-left: 28px
1002
- }
1003
- .imagify-columns .col-1-2 {
1004
- width: 50%;
1005
- padding: 0 20px;
1006
- }
1007
-
1008
- @media (max-width: 830px) {
1009
- .imagify-columns [class^="col-"] {
1010
- float: none;
1011
- margin-bottom: 1.5em;
1012
- }
1013
- .imagify-columns .col-1-3,
1014
- .imagify-columns .col-1-2 {
1015
- width: auto;
1016
- padding: 0 28px;
1017
- clear: both;
1018
- padding-top: 1em;
1019
- }
1020
- }
1021
-
1022
- /**
1023
- * == Custom column & Metabox
1024
- */
1025
- .column-imagify_optimized_file.column-imagify_optimized_file {
1026
- width: 300px;
1027
- text-align: center;
1028
- vertical-align: middle;
1029
- }
1030
- .column-imagify_optimized_file > * {
1031
- max-width: 21em;
1032
- margin: 0 auto;
1033
- }
1034
- @media (min-width: 1151px) and (max-width: 1800px) {
1035
- .column-imagify_optimized_file.column-imagify_optimized_file {
1036
- width: 21em;
1037
- }
1038
- }
1039
- @media (min-width: 783px) and (max-width: 1150px) {
1040
- .column-imagify_optimized_file.column-imagify_optimized_file {
1041
- width: 13em;
1042
- }
1043
- table.media .column-title .has-media-icon ~ .row-actions.row-actions {
1044
- margin-left: 0;
1045
- }
1046
- }
1047
- @media (max-width: 782px) {
1048
- table.media .column-imagify_optimized_file.column-imagify_optimized_file {
1049
- text-align: left;
1050
- }
1051
- table.media .imagify-datas-more-action,
1052
- table.media .imagify-datas-actions-links {
1053
- text-align: center;
1054
- }
1055
- table.media .column-imagify_optimized_file > *,
1056
- table.media .column-imagify_optimized_file .imagify-datas-actions-links a {
1057
- max-width: 100%;
1058
- margin-left: 0;
1059
- }
1060
- }
1061
- @media (min-width: 783px) and (max-width: 1150px), (max-width: 360px) {
1062
- table.media .imagify-hide-if-small {
1063
- position: absolute;
1064
- margin: -1px;
1065
- padding: 0;
1066
- height: 1px;
1067
- width: 1px;
1068
- overflow: hidden;
1069
- clip: rect(0 0 0 0);
1070
- border: 0;
1071
- word-wrap: normal !important; /* Many screen reader and browser combinations announce broken words as they would appear visually. */
1072
- }
1073
- }
1074
- .compat-field-imagify .label {
1075
- vertical-align: top;
1076
- }
1077
- .compat-field-imagify ul.imagify-datas-list {
1078
- margin-top: 7px;
1079
- font-size: 11px;
1080
- }
1081
- ul.imagify-datas-list.imagify-datas-list {
1082
- margin: 0 auto;
1083
- color: #555;
1084
- font-size: 10px;
1085
- }
1086
- ul.imagify-datas-list .big {
1087
- font-size: 12px;
1088
- color: #40B1D0;
1089
- }
1090
- .imagify-data-item {
1091
- overflow: hidden;
1092
- }
1093
- li.imagify-data-item {
1094
- clear: both;
1095
- margin-bottom: 2px;
1096
- }
1097
- ul.imagify-datas-list .imagify-data-item span.data,
1098
- ul.imagify-datas-list .imagify-data-item strong {
1099
- float: left;
1100
- width: 38%;
1101
- -webkit-box-sizing: border-box;
1102
- -moz-box-sizing: border-box;
1103
- box-sizing: border-box;
1104
- }
1105
- ul.imagify-datas-list .imagify-data-item span.data {
1106
- width: 62%;
1107
- padding-right: 5px;
1108
- text-align: left;
1109
- }
1110
- .compat-field-imagify .imagify-datas-list .imagify-data-item .data {
1111
- width: 130px;
1112
- text-align: left;
1113
- font-weight: bold;
1114
- }
1115
- ul.imagify-datas-list .imagify-data-item strong {
1116
- text-align: left;
1117
- padding-left: 5px;
1118
- }
1119
- .media-sidebar .imagify-datas-list .imagify-data-item .data {
1120
- width: auto;
1121
- float: none;
1122
- }
1123
- .media-sidebar .imagify-datas-list .imagify-data-item strong {
1124
- display: inline-block;
1125
- width: auto;
1126
- float: none;
1127
- }
1128
- .media-sidebar .imagify-datas-list .imagify-data-item .imagify-chart {
1129
- float: left;
1130
- }
1131
- .imagify-datas-more-action.imagify-datas-more-action {
1132
- margin: .4em auto;
1133
- background: linear-gradient(to bottom, transparent, transparent 49%, rgba(0,0,0,.075) 50%, rgba(0,0,0,.075) 58%, transparent 58%, transparent);
1134
- }
1135
- .imagify-datas-more-action a {
1136
- display: inline-block;
1137
- padding: 0 5px;
1138
- background: #40B1D0;
1139
- color: #FFF;
1140
- text-transform: uppercase;
1141
- font-size: 9px;
1142
- font-weight: bold;
1143
- line-height: 1.9;
1144
- text-decoration: none;
1145
- }
1146
- .imagify-datas-more-action a.is-open {
1147
- background: #555;
1148
- }
1149
- .imagify-datas-more-action a.is-open .dashicons {
1150
- transform: rotate(180deg);
1151
- }
1152
- .imagify-datas-more-action a .dashicons {
1153
- font-size: 14px;
1154
- vertical-align: middle;
1155
- line-height: .8;
1156
- }
1157
- .imagify-datas-more-action a .dashicons:before {
1158
- vertical-align: middle;
1159
- line-height: 20px;
1160
- }
1161
- .imagify-datas-more-action .the-text {
1162
- display: inline-block;
1163
- vertical-align: middle;
1164
- height: auto;
1165
- line-height: inherit;
1166
- }
1167
-
1168
- ul.imagify-datas-details.imagify-datas-details {
1169
- margin: .7em auto;
1170
- }
1171
- .imagify-datas-details strong {
1172
- color: #40B1D0;
1173
- }
1174
- .imagify-datas-details .original {
1175
- color: #555;
1176
- }
1177
-
1178
- .imagify-datas-actions-links {
1179
- overflow: hidden;
1180
- border-top: 2px solid transparent;
1181
- padding-top: 5px;
1182
- font-size: 8px;
1183
- }
1184
- .nggform .imagify-datas-actions-links {
1185
- position: relative;
1186
- z-index: 2;
1187
- }
1188
- .nggform .row-actions {
1189
- z-index: 1;
1190
- }
1191
- .imagify-datas-actions-links a {
1192
- position: relative;
1193
- display: inline-block;
1194
- padding-left: 17px;
1195
- text-decoration: none;
1196
- font-weight: 600;
1197
- }
1198
- .compat-field-imagify .imagify-datas-actions-links {
1199
- max-width: 300px;
1200
- }
1201
- .misc-pub-imagify .imagify-datas-actions-links {
1202
- border-top: 2px solid #f2f2f2;
1203
- padding-bottom: 5px;
1204
- }
1205
- /* Library */
1206
- .column-imagify_optimized_file .imagify-datas-actions-links a {
1207
- margin: 0 .7em;
1208
- padding-left: 15px;
1209
- }
1210
-
1211
- /* Media edition */
1212
- .compat-field-imagify .imagify-datas-actions-links a,
1213
- .misc-pub-imagify .imagify-datas-actions-links a {
1214
- font-size: 10px;
1215
- float: left;
1216
- width: 50%;
1217
- }
1218
- .media-sidebar .compat-field-imagify .imagify-datas-actions-links a,
1219
- .submitbox .misc-pub-imagify .imagify-datas-actions-links a {
1220
- display: block;
1221
- width: auto;
1222
- float: none;
1223
- }
1224
- .imagify-datas-actions-links a:only-child {
1225
- float: none;
1226
- width: auto;
1227
- }
1228
- .imagify-datas-details.is-open + .imagify-datas-actions-links {
1229
- border-top-color: rgba(0,0,0,.075);
1230
- }
1231
- .imagify-datas-actions-links .dashicons {
1232
- position: absolute;
1233
- left: 0; top: 4px;
1234
- width: 12px;
1235
- margin-right: 2px;
1236
- font-size: 11px;
1237
- }
1238
-
1239
- /**
1240
- * == Bulk page
1241
- */
1242
-
1243
- .imagify-account,
1244
- .imagify-account-link {
1245
- padding-right: 15px;
1246
- }
1247
- .imagify-meteo-icon {
1248
- display: inline-block;
1249
- height: 38px;
1250
- vertical-align: middle;
1251
- margin-right: 10px;
1252
- }
1253
- .imagify-user-plan {
1254
- color: #40b1d0;
1255
- }
1256
-
1257
- .imagify-meteo-title.imagify-meteo-title {
1258
- color: #FFF;
1259
- font-size: 17px;
1260
- }
1261
- .imagify-space-left > p {
1262
- color: #FFF;
1263
- }
1264
- [class^="imagify-bar-"] {
1265
- position: relative;
1266
- height: 8px;
1267
- width: 100%;
1268
- background: #60758D;
1269
- color: #FFF;
1270
- font-size: 10px;
1271
- }
1272
-
1273
- .imagify-progress {
1274
- height: 8px;
1275
- }
1276
- .imagify-progress {
1277
- transition: width .3s;
1278
- }
1279
- .imagify-bar-positive .imagify-progress {
1280
- background: #8CC152;
1281
- }
1282
- .imagify-bar-positive .imagify-barnb {
1283
- color: #8CC152;
1284
- }
1285
- .imagify-bar-primary .imagify-progress {
1286
- background: #40B1D0;
1287
- }
1288
- .imagify-bar-primary .imagify-barnb {
1289
- color: #40B1D0;
1290
- }
1291
- .imagify-bar-negative .imagify-progress {
1292
- background: #D2D3D6;
1293
- }
1294
- .imagify-bar-negative .imagify-barnb {
1295
- color: #7A8996;
1296
- }
1297
- .imagify-bar-neutral .imagify-progress {
1298
- background: #F5A623;
1299
- }
1300
- .imagify-space-left .imagify-bar-negative .imagify-progress {
1301
- background: #C51162;
1302
- }
1303
-
1304
- .imagify-btn-ghost {
1305
- display: inline-block;
1306
- height: auto;
1307
- padding: 7px 10px;
1308
- border: 1px solid #FFF;
1309
- text-align: center;
1310
- background: transparent;
1311
- color: #FFF;
1312
- border-radius: 3px;
1313
- transition: all .275s;
1314
- }
1315
-
1316
- .imagify-btn-ghost:hover,
1317
- .imagify-btn-ghost:focus {
1318
- background: #FFF;
1319
- color: #888;
1320
- }
1321
-
1322
- /* Some Errors */
1323
- .imagify-error {
1324
- background: #D0021B;
1325
- color: #FFF;
1326
- }
1327
- .imagify-settings-section .imagify-error {
1328
- display: inline-block;
1329
- padding: 7px 10px;
1330
- margin: 10px 0 0 45px;
1331
- border-radius: 3px;
1332
- }
1333
- .imagify-settings-section .imagify-error code {
1334
- font-weight: normal;
1335
- }
1336
- .imagify-settings-section .imagify-error.hidden {
1337
- display: none;
1338
- }
1339
- .imagify-warning {
1340
- background: #f5a623;
1341
- color: #FFF;
1342
- text-shadow: 0 0 2px rgba(0, 0, 0, 0.2);
1343
- }
1344
-
1345
- /* Imagify Modal (is everywhere) */
1346
- .imagify-modal {
1347
- display: -webkit-box;
1348
- display: -ms-flexbox;
1349
- display: flex;
1350
- -webkit-box-orient: vertical;
1351
- -webkit-box-direction: normal;
1352
- -ms-flex-direction: column;
1353
- flex-direction: column;
1354
- -webkit-box-align: center;
1355
- -ms-flex-align: center;
1356
- align-items: center;
1357
- -webkit-box-pack: center;
1358
- -ms-flex-pack: center;
1359
- justify-content: center;
1360
- }
1361
- .js .imagify-modal {
1362
- display: none;
1363
- position: fixed;
1364
- top: 0; right: 0; bottom: 0; left: 0;
1365
- background-color: #1F2332;
1366
- background-color: rgba(31,35,50,.95);
1367
- z-index: 99999;
1368
- }
1369
- .imagify-modal-content {
1370
- -webkit-box-sizing: border-box;
1371
- -moz-box-sizing: border-box;
1372
- box-sizing: border-box;
1373
- position: relative;
1374
- width: 800px;
1375
- max-width: 95%;
1376
- max-height: 90vw;
1377
- overflow: auto;
1378
- padding: 20px 25px;
1379
- margin: 1em auto;
1380
- background: #FFF;
1381
- box-shadow: 1px 1px 4px rgba(0,0,0,.7);
1382
- border-radius: 3px;
1383
- }
1384
- #imagify-visual-comparison .imagify-modal-content,
1385
- .imagify-visual-comparison .imagify-modal-content {
1386
- max-width: 1400px;
1387
- background: transparent;
1388
- padding: 5px;
1389
- box-shadow: none;
1390
- border-radius: 0;
1391
- }
1392
- .imagify-modal .h2 {
1393
- margin: .5em 0;
1394
- color: #8ba6b4;
1395
- font-weight: normal;
1396
- font-size: 24px;
1397
- letter-spacing: 0.075em;
1398
- text-align: center;
1399
- }
1400
- .imagify-modal .h3 {
1401
- color: #40b1d0;
1402
- font-weight: normal;
1403
- font-size: 18px;
1404
- letter-spacing: 0.075em;
1405
- text-align: center;
1406
- }
1407
- .imagify-modal .close-btn {
1408
- display: none;
1409
- visibility: hidden;
1410
- position: absolute;
1411
- right: 20px; top: 20px;
1412
- font-size: 1.2em;
1413
- border: 0;
1414
- background: transparent none;
1415
- border-radius: 0;
1416
- cursor: pointer;
1417
- }
1418
- .imagify-modal .close-btn i {
1419
- margin-left: -2px;
1420
- }
1421
- .imagify-modal .close-btn:hover,
1422
- .imagify-modal .close-btn:focus {
1423
- color: #40b1d0;
1424
- }
1425
- .js .imagify-modal .close-btn {
1426
- display: block;
1427
- visibility: visible;
1428
- }
1429
-
1430
- /* Attachments specifics */
1431
- .wp_attachment_image #imagify-visual-comparison .close-btn,
1432
- .imagify-visual-comparison .close-btn {
1433
- top: 0;
1434
- }
1435
-
1436
- .wp_attachment_image #imagify-visual-comparison .imagify-modal-content,
1437
- .imagify-visual-comparison .imagify-modal-content {
1438
- padding-top: 40px;
1439
- }
1440
-
1441
- /* Col, behavior depending on parent */
1442
- .imagify-col {
1443
- float: left;
1444
- width: 50%;
1445
- box-sizing: border-box;
1446
- -webkit-flex-basis: 50%;
1447
- -ms-flex-preferred-size: 50%;
1448
- flex-basis: 50%;
1449
- }
1450
- .imagify-col {
1451
- padding-right: 20px;
1452
- }
1453
- .imagify-col + .imagify-col {
1454
- padding-right: 0;
1455
- padding-left: 20px;
1456
- }
1457
-
1458
- .imagify-col:target {
1459
- animation: hello 1s 3 linear backwards;
1460
- }
1461
-
1462
- @keyframes hello {
1463
- 0%, 100% {
1464
- background: #FFF;
1465
- }
1466
- 50% {
1467
- background: #F4F7F9;
1468
- }
1469
- }
1
+ .imagify-count-list li,.imagify-flex{display:-webkit-box;display:-ms-flexbox}.imagify-oh,body.imagify-modal-is-open{overflow:hidden}.imagify-flex{display:flex}.imagify-vcenter{-webkit-box-align:center;-ms-flex-align:center;align-items:center}.imagify-noshrink{-ms-flex-negative:0;flex-shrink:0}.imagify-nogrow{-webkit-box-flex:0;-ms-flex-positive:0;flex-grow:0}.imagify-wauto{width:auto}.imagify-hauto{height:auto}.imagify-full-width{width:100%}.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-mt0.imagify-mt0{margin-top:0}.imagify-mt1.imagify-mt1{margin-top:1em}.imagify-mt2.imagify-mt2{margin-top:2em}.imagify-mt3.imagify-mt3{margin-top:3em}.imagify-mb0.imagify-mb0{margin-bottom:0}.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-pb0.imagify-pb0{padding-bottom:0}.imagify-pr1.imagify-pr1{padding-right:1em}.imagify-pr2.imagify-pr2{padding-right:2em}.imagify-clear{clear:both}.imagify-clearfix:after,.imagify-inline-options:after,.imagify-settings-main-content:after,.imagify-settings-section:after{content:"";display:table;width:100%;clear:both}.imagify-setting-optim-level .imagify-inline-options:after{display:none}.imagify-divider{height:1px;margin:20px 0;background:#D2D3D6}.imagify-pipe{display:inline-block;margin:0 .75em;vertical-align:middle;height:15px;width:1px;background:#979797}.imagify-cell,.imagify-cell.va-top,.va-top .imagify-cell{vertical-align:top}.imagify-h3-like.imagify-h3-like.imagify-h3-like{margin-bottom:0;font-size:19px;font-weight:500;color:#1F2332}.imagify-h4-like.imagify-h4-like.imagify-h4-like{font-size:14px;font-weight:700;color:#2E3243}.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-count-list{counter-reset:listcount}.imagify-count-list li{display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.imagify-count-list li+li{margin-top:.5em}.imagify-count-list li:before{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-preferred-size:24px;flex-basis:24px;-ms-flex-negative:0;flex-shrink:0;-webkit-box-flex:0;-ms-flex-positive:0;flex-grow:0;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;margin-right:16px;border:2px solid #40b1d0;width:24px;height:24px;counter-increment:listcount 1;content:counter(listcount);color:#40b1d0;border-radius:50%}.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{position:relative;top:1px;display:inline-block;vertical-align:middle}.imagify-chart-container{position:relative;display:inline-block;margin-right:5px}.imagify-chart-container canvas{display:block}.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:11px 22px;border:0;font-size:14px;font-weight:600;text-transform:uppercase;letter-spacing:.01em;word-spacing:.01em;-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-block-secondary .imagify-button-light.imagify-button-light{color:#6F9C3B}.imagify-button-light.imagify-button-light:focus,.imagify-button-light.imagify-button-light:hover{color:#FFF;background:rgba(0,0,0,.2)}.button.imagify-button-clean,.imagify-button-clean{padding:0;background:0 0;-webkit-box-shadow:none;box-shadow:none}.imagify-button-clean .dashicons-plus{width:32px;height:25px}.imagify-button-clean .dashicons-plus:before{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;width:25px;height:22px;margin-left:2px;padding-top:3px;font-size:17px;background:#40B1D0;color:#FFF;-webkit-transition:all .275s;-o-transition:all .275s;transition:all .275s}.button.imagify-button-clean:active,.button.imagify-button-clean:focus,.button.imagify-button-clean:hover,.button.imagify-button-clean[disabled]{background:0 0!important;color:#343A49;-webkit-box-shadow:none;box-shadow:none}.button.imagify-button-clean:focus .dashicons-plus:before,.button.imagify-button-clean:hover .dashicons-plus:before{background:#343A49}button.imagify-link-like{border:0;padding:0;color:inherit;text-decoration:underline;font-size:13px;-webkit-box-shadow:none;box-shadow:none;background:0 0;cursor:pointer}.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:10px 30px;font-size:23px;background:#1F2332;color:#FFF}.imagify-welcome .imagify-logo{opacity:1}.imagify-welcome .imagify-title{display:-webkit-box;display:-ms-flexbox;display:flex;padding:20px 30px}.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{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-ms-flex-negative:0;flex-shrink:0;-webkit-box-flex:0;-ms-flex-positive:0;flex-grow:0;padding:0;margin-right:35px;color:inherit}.imagify-logo-block sup{color:#1F2332}.imagify-settings .imagify-title+.imagify-notice{margin:0;border-right:1px solid #D9D9D9;padding-top:15px;padding-bottom:15px}.imagify-title .title-text{font-size:28px;font-weight:700;color:#FFF}.imagify-lb-icon{padding-right:18px}.imagify-lb-text img{margin-bottom:.15em}.imagify-lb-text{font-size:23px;font-weight:700;color:#FFF}.imagify-logo{display:block;vertical-align:top;opacity:.4}.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}.imagify-settings .imagify-documentation-link-box{display:-webkit-box;display:-ms-flexbox;display:flex;padding:12px 13px 14px;border:1px solid #40b1d0;color:#E5EBEF;border-radius:3px}.imagify-documentation-link-icon{width:23px;height:31px;font-size:2.6em;margin-right:15px;line-height:1.3}.imagify-documentation-link-box span{font-size:12px}.imagify-documentation-link-box a{font-weight:700}@media (max-width:1120px){.imagify-settings .imagify-title{-ms-flex-wrap:wrap;flex-wrap:wrap}}.imagify-settings-section{padding:10px 20px}.imagify-account-info-col .imagify-settings-section{padding-right:0}.imagify-settings-main-content,.imagify-welcome .imagify-settings-section{border:1px solid #D9D9D9;border-top-width:0;background:#FFF}.imagify-settings-main-content{padding-bottom:20px}.imagify-settings-main-content p{font-size:14px}.imagify-settings-main-content+.imagify-settings-main-content{margin-top:20px;border-top-width:1px}.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-settings .imagify-success,.imagify-success{color:#8BC34A}.imagify-info,.imagify-info a{color:#7A8996;font-size:12px}.imagify-info{position:relative;display:inline-block;padding-left:25px}.imagify-info .dashicons{position:absolute;left:0;top:0;color:#40B1D0}.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){position:absolute;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;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;min-height:24px;padding-left:40px;cursor:pointer;font-size:14px;font-weight:700;color:#2E3243}.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:22px;height:22px;border:2px solid #8BA6B4;background:#FFF;border-radius:3px}.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:-2px;left:4.5px;color:#8BA6B4;font-weight:400;-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-check-group{padding-left:2px;margin-bottom:0}.imagify-check-group.imagify-is-scrollable{max-height:15em;overflow-y:auto;padding:8px;margin:1.5em 0 0 -8px;background:#F4F7F9;border:1px solid #D2D3D6;border-radius:3px}.imagify-is-scrollable legend+p{margin-top:0}.imagify-is-scrollable [type=checkbox]:checked+label:before,.imagify-is-scrollable [type=checkbox]:not(:checked)+label:before{background:#F4F7F9}.imagify-settings .imagify-check-group.imagify-check-group label{color:#338EA6;font-weight:500}.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;-webkit-box-shadow:0 -3px 0 rgba(0,0,0,.1) inset;box-shadow:0 -3px 0 rgba(0,0,0,.1) inset;z-index:2;-webkit-transition:all .275s;-o-transition:all .275s;transition:all .275s}.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-account-info-col,.imagify-col.imagify-col.imagify-account-info-col{width:380px;max-width:100%;padding:0 20px 0 0}.imagify-col.imagify-col.imagify-shared-with-account-col,.imagify-shared-with-account-col{width:calc(100% - 380px);padding:0}.imagify-account-info-col .imagify-options-title{padding:24px 26px;color:#FFF;background:#1F2332}.imagify-block-secondary{padding:26px 26px 35px;border:1px solid #75A345;background:#8BC34A;border-radius:3px;color:#FFF}.imagify-account-info-col .imagify-block-secondary.imagify-block-secondary h3,.imagify-block-secondary.imagify-block-secondary p{color:inherit}.imagify-account-info-col .imagify-col-content h3:first-child{margin-top:0}.imagify-account-info-col .imagify-col-content h3{font-size:19px}.imagify-account-info-col .imagify-col-content p{margin:1.5em 0}.imagify-account-info-col .imagify-col-content p:first-child{margin-top:0}.imagify-user-plan-label{float:right;margin-top:-4px;padding:2px 10px;border:2px solid #40B1D0;font-size:14px;text-transform:uppercase;letter-spacing:.02em;color:#40B1D0;border-radius:3px}.imagify-modal .h2,.imagify-modal .h3{letter-spacing:.075em;text-align:center;font-weight:400}.imagify-user-plan-label:empty{display: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}@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:21em;margin:0 auto}@media (min-width:1151px) and (max-width:1800px){.column-imagify_optimized_file.column-imagify_optimized_file{width:21em}}@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}ul.imagify-datas-list .big{font-size:12px;color:#40B1D0}.imagify-data-item{overflow:hidden}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:38%;-webkit-box-sizing:border-box;box-sizing:border-box}ul.imagify-datas-list .imagify-data-item span.data{width:62%;padding-right:5px;text-align:left}.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{width:auto;float:none}.media-sidebar .imagify-datas-list .imagify-data-item strong{display:inline-block;width:auto;float:none}.media-sidebar .imagify-datas-list .imagify-data-item .imagify-chart{float:left}.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:11px}.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{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>p{color:#FFF}[class^=imagify-bar-]{position:relative;height:8px;width:100%;background:#60758D;color:#FFF;font-size:10px}.imagify-progress{height:8px;-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-primary .imagify-progress{background:#40B1D0}.imagify-bar-primary .imagify-barnb{color:#40B1D0}.imagify-bar-negative .imagify-progress{background:#D2D3D6}.imagify-bar-negative .imagify-barnb{color:#7A8996}.imagify-bar-neutral .imagify-progress{background:#F5A623}.imagify-space-left .imagify-bar-negative .imagify-progress{background:#C51162}.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%;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-flex-preferred-size:50%;flex-basis:50%;padding-right:20px}.imagify-col+.imagify-col{padding-right:0;padding-left:20px}.imagify-col:target{-webkit-animation:hello 1s 3 linear backwards;animation:hello 1s 3 linear backwards}@-webkit-keyframes hello{0%,100%{background:#FFF}50%{background:#F4F7F9}}@keyframes hello{0%,100%{background:#FFF}50%{background:#F4F7F9}}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
assets/css/options.css CHANGED
@@ -288,6 +288,7 @@ label[for="imagify_sizes_full"] + .imagify-info {
288
  }
289
 
290
  .imagify-menu-bar-img {
 
291
  max-width: 100%;
292
  height: auto;
293
  margin-top: 0;
@@ -440,7 +441,8 @@ a.btn-rocket:focus {
440
  }
441
 
442
  /* Menu in admin bar label exception */
443
- label[for="imagify_admin_bar_menu"] {
 
444
  font-weight: normal !important;
445
  color: #626E7B !important;
446
  }
@@ -638,6 +640,23 @@ p.imagify-custom-folder-line {
638
  .imagify-folders-tree .imagify-is-open ~ label {
639
  color: #7A8996;
640
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
641
 
642
  .imagify-folders-tree button.imagify-folder:hover,
643
  .imagify-folders-tree button.imagify-folder:focus,
288
  }
289
 
290
  .imagify-menu-bar-img {
291
+ box-sizing: border-box;
292
  max-width: 100%;
293
  height: auto;
294
  margin-top: 0;
441
  }
442
 
443
  /* Menu in admin bar label exception */
444
+ label[for="imagify_admin_bar_menu"],
445
+ label[for="imagify_partner_links"] {
446
  font-weight: normal !important;
447
  color: #626E7B !important;
448
  }
640
  .imagify-folders-tree .imagify-is-open ~ label {
641
  color: #7A8996;
642
  }
643
+ .imagify-folders-tree .imagify-folder.imagify-loading:before,
644
+ .imagify-folders-tree .imagify-folder .imagify-loader {
645
+ display: none;
646
+ }
647
+ .imagify-folders-tree .imagify-folder.imagify-loading .imagify-loader {
648
+ display: inline-block;
649
+ width: 13px;
650
+ height: 21px;
651
+ font-size: 1.5em;
652
+ vertical-align: .15em;
653
+ }
654
+ .imagify-folders-tree .imagify-folder.imagify-loading .imagify-loader img {
655
+ display: inline-block;
656
+ width: 100%;
657
+ height: auto;
658
+ vertical-align: middle;
659
+ }
660
 
661
  .imagify-folders-tree button.imagify-folder:hover,
662
  .imagify-folders-tree button.imagify-folder:focus,
assets/css/options.min.css CHANGED
@@ -1 +1 @@
1
- .wrap.imagify-settings{margin-right:0}.imagify-settings.imagify-have-rocket{margin-right:20px}#imagify-check-api-container{display:block;margin-top:6px;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 .imagify-icon{font-size:1.8em;margin-right:3px;margin-left:1px;color:#8BC34A;vertical-align:-2px}.imagify-account-info-col .imagify-api-line{padding:22px 26px;background:#343A49}.imagify-api-line label,p.imagify-api-key-invite-title{display:block;margin-bottom:6px;font-size:14px;text-transform:uppercase;letter-spacing:.02em;font-weight:700;color:#343A49}.imagify-account-info-col .imagify-api-line label{color:#E5EBEF;display:inline-block}.imagify-api-line.imagify-api-line input[type=text]{width:100%;padding:6px 10px;border:1px solid #40B1D0;font-family:"PT Mono",Consolas,monospace;font-size:14px;letter-spacing:.01em;font-weight:700;color:#40B1D0;background:0 0;-webkit-box-shadow:none;box-shadow:none}.imagify-no-api-key .imagify-api-line{margin:3em 0 0;padding:2em 0 0;border-top:1px solid #D5D6D9}.imagify-no-api-key .imagify-api-line input[type=text]{margin-top:5px;width:400px;max-width:100%}.imagify-settings .imagify-no-api-key div.submit.submit{border:0;padding:0 16px;margin-top:0;background:#FFF}.imagify-settings .imagify-no-api-key div.submit.submit p{padding-bottom:0}.imagify-options-title{margin:.75em 0 0;font-size:24px;letter-spacing:.02em;font-weight:700;color:#343A49}.imagify-options-subtitle{padding-bottom:.3em;margin-bottom:20px;border-bottom:1px solid #D2D3D6;font-size:14px;letter-spacing:.01em;font-weight:700;text-transform:uppercase;color:#626E7B}.imagify-options-subtitle a{font-size:12px;color:#338EA6;text-transform:none;letter-spacing:0}.imagify-options-subtitle .imagify-info{margin-left:15px}.imagify-setting-line{border-top:1px solid #D2D3D6;padding:25px 0 13px}.imagify-options-subtitle+.imagify-setting-line{border-top:0;padding-top:8px}.imagify-setting-optim-level{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-box-align:center;-ms-flex-align:center;align-items:center;padding:8px 0 18px}.imagify-setting-optim-level>p{margin:0}.imagify-setting-optim-level .imagify-inline-options{-ms-flex-preferred-size:60%;flex-basis:60%;-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;width:auto;display:-webkit-box;display:-ms-flexbox;display:flex;background:#2E3243;border-radius:3px}.imagify-setting-optim-level .imagify-inline-options label{display:block!important;width:100%;font-size:14px!important;border-radius:3px!important}.imagify-setting-optim-level .imagify-visual-comparison-text{-ms-flex-preferred-size:40%;flex-basis:40%;-ms-flex-negative:1;flex-shrink:1;padding-left:20px;color:#626E7B;-webkit-box-sizing:border-box;box-sizing:border-box}.imagify-setting-optim-level.imagify-setting-optim-level .imagify-visual-comparison-btn{padding-top:5px;margin-top:2px;border-radius:2px;text-transform:none;letter-spacing:0;text-shadow:none!important}@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-settings div.submit.submit{border-top:1px solid #D9D9D9;margin-top:2em;padding:18px 0 7px 30px}.imagify-settings .hidden+div.submit.submit{margin-top:-1px}.imagify-settings p.submit{float:left;margin-top:0}.imagify-settings p.submit .button{margin:0 5px}.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-settings .imagify-rate-us{margin-right:25px;margin-left:auto}.imagify-visual-label,label+.imagify-info{display:inline-block;width:550px;max-width:calc(100% - 38px);margin-left:38px;padding-right:25px}label+.imagify-options-line{display:block;margin:8px 0 20px 40px;font-size:14px;-webkit-transition:opacity .3s;-o-transition:opacity .3s;transition:opacity .3s}.imagify-options-line+.imagify-info{margin-left:38px}label+.imagify-info{margin-top:10px}.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_resize_larger_w{width:5em;height:auto;padding:6px;margin:0 6px;border:1px solid #8BA6B4;-webkit-box-shadow:none;box-shadow:none;border-radius:2px;color:#338EA6;font-weight:700}.imagify-menu-bar-img{max-width:100%;height:auto;margin-top:0;border:1px solid #8BA6B4}.imagify-col.imagify-main{float:left;width:calc(100% - 320px);padding-left:0;padding-right:0}.imagify-have-rocket .imagify-main{float:none;width:1265px;max-width:100%}.imagify-sidebar{float:left;width:300px;max-width:100%}.imagify-sidebar-section{border:1px solid #BBB;background:#1F2332;position:relative;padding:10px 20px;text-align:center;color:#F2F2F2}.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-close{position:absolute;top:8px;right:12px;text-decoration:none}.imagify-sidebar-close i{font-size:2em;color:rgba(255,255,255,.5)}p.imagify-sidebar-title{margin:1.2em 0 1.5em;text-align:left;color:#F56640;text-transform:uppercase;letter-spacing:.015em;word-spacing:.015em;font-weight:700}p.imagify-sidebar-description{margin:1.5em 0;text-align:left;font-weight:500;color:#F2F2F2}.imagify-sidebar-description strong{color:#39CE9A}.imagify-rocket-cta-promo{display:block;padding:8px 10px;margin:1.3em 0 .5em;border:2px dashed #F56640;border-radius:3px;font-size:18px;font-weight:700;color:#F56640}.imagify-rocket-cta-promo strong,a.btn-rocket{color:#F2F2F2}a.btn-rocket{display:block;font-size:15px;padding:10px 12px;margin:0 0 1.5em;background:#F56640;border-radius:3px;text-transform:uppercase;font-weight:700;text-decoration:none}a.btn-rocket:focus,a.btn-rocket:hover{background:#AC2B15}.imagify-sidebar-section ul{margin-top:20px}.imagify-sidebar-section li{position:relative;margin:1.2em 0;padding-left:25px;text-align:left}.imagify-sidebar-section li:before{content:"✓";position:absolute;left:0;top:0;color:#39CE9A;font-size:18px}label[for=imagify_admin_bar_menu]{font-weight:400!important;color:#626E7B!important}.imagify-select-all-buttons{margin-top:8px}.imagify-link-like.imagify-select-all{font-weight:700;font-size:12px;color:#3694AE}.imagify-select-all.imagify-is-inactive{color:inherit;text-decoration:none;cursor:default}.imagify-fts-header{padding:10px 16px;background:#343A49;color:#FFF}.imagify-fts-header i{font-size:1.8em;margin-right:12px}.imagify-fts-header p{margin:0;color:#FFF}#imagify-add-themes-to-custom-folder strong,.imagify-fts-header strong{color:#40B1D0;font-weight:700}.imagify-fts-content{padding:16px;background:#F4F7F9;border:1px solid #CDD0D4;border-top:0}.imagify-fts-content p{margin-top:0}.imagify-kindof-title{margin-top:2em;padding:0 0 10px;border-bottom:1px solid #D2D3D6;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;font-weight:700}.imagify-kindof-title .imagify-button-primary{padding:4px 13px 4px 10px}.imagify-kindof-title .imagify-button-primary .dashicons{vertical-align:-7.5px}.imagify-kindof-title .imagify-button-primary:focus,.imagify-kindof-title .imagify-button-primary:hover{color:#FFF}p.imagify-custom-folder-line{position:relative;margin:0;padding:12px 15px;color:#4A5362;font-weight:500;-webkit-transition:all .75s;-o-transition:all .75s;transition:all .75s}.imagify-custom-folder-line.imagify-will-remove{background:#C51162;color:#FFF;-webkit-transform:translateX(-120px);-ms-transform:translateX(-120px);transform:translateX(-120px);opacity:0}.imagify-custom-folder-line:first-child{margin-top:-.5em}.imagify-custom-folder-line+.imagify-custom-folder-line{border-top:1px solid #E9EFF2}.imagify-custom-folders-remove{position:absolute;right:0;top:6px;border:0;padding:5px 10px 4px;-webkit-box-shadow:none;box-shadow:none;color:#7A8996;border-radius:16px;font-size:13px;line-height:18px;background:#FFF;-webkit-transition:all .275s;-o-transition:all .275s;transition:all .275s;cursor:pointer}.imagify-custom-folders-remove-text{max-width:0;overflow:hidden;white-space:nowrap;display:inline-block;-webkit-transform:scale(0);-ms-transform:scale(0);transform:scale(0);opacity:0;-webkit-transition:all .275s;-o-transition:all .275s;transition:all .275s}.imagify-custom-folders-remove:focus,.imagify-custom-folders-remove:hover{background:#D9EFF6;color:#225E6E}.imagify-custom-folders-remove:focus .imagify-custom-folders-remove-text,.imagify-custom-folders-remove:hover .imagify-custom-folders-remove-text{max-width:6em;-webkit-transform:scale(1);-ms-transform:scale(1);transform:scale(1);opacity:1}.imagify-add-custom-folder+.imagify-loader{display:none;vertical-align:middle}.imagify-add-custom-folder[disabled]+.imagify-loader{display:inline-block}.imagify-folders-information{position:relative;margin:-5px 0 20px;padding:10px 10px 10px 40px;text-align:left;background:#F2F2F2}.imagify-folders-information i{position:absolute;left:10px;top:50%;margin-top:-10px}.imagify-folders-tree{margin:0;text-align:left}.imagify-folders-tree li{clear:left}.imagify-folders-tree .imagify-folder{-webkit-box-sizing:border-box;box-sizing:border-box;position:relative;width:48px;z-index:2;float:left;margin-top:-3px;padding:0 8px 0 0;border:0;background:0 0!important;-webkit-box-shadow:none;box-shadow:none;cursor:pointer;-webkit-transition:all .275s;-o-transition:all .275s;transition:all .275s}.imagify-folders-tree span.imagify-folder{padding-left:1.5px}.imagify-folders-tree .imagify-folder:before{content:"+";display:inline-block;width:13px;height:21px;font-size:1.5em;vertical-align:.15em}.imagify-folders-tree span.imagify-folder:before{content:''}.imagify-folders-tree .imagify-folder-icon path{-webkit-transition:all .275s;-o-transition:all .275s;transition:all .275s}.imagify-folders-tree .imagify-is-open .imagify-folder-icon path{stroke:#7A8996}.imagify-folders-tree .imagify-is-open.imagify-folder:before{content:"-";color:#7A8996}.imagify-folders-tree .imagify-is-open~label{color:#7A8996}.imagify-folders-tree button.imagify-folder:focus,.imagify-folders-tree button.imagify-folder:focus path,.imagify-folders-tree button.imagify-folder:hover,.imagify-folders-tree button.imagify-folder:hover path{color:#3694AE;stroke:#3694AE}.imagify-folders-tree .imagify-folder.disabled,.imagify-folders-tree .imagify-folder:disabled{color:#7f7f7f}.imagify-swal-content .imagify-folders-tree label{position:relative;display:block;width:100%;padding:3px 0;font-size:15px;font-weight:500;vertical-align:top;-webkit-transition:all .475s;-o-transition:all .475s;transition:all .475s}.imagify-folders-tree input:focus+label,.imagify-swal-content .imagify-folders-tree label:hover{background:#F4F7F9}.imagify-folders-tree .imagify-folder-already-selected input:focus+label,.imagify-folders-tree .imagify-folder-already-selected label,.imagify-folders-tree .imagify-folder-already-selected label:hover{background:#40B1D0;color:#FFF;border-radius:3px;cursor:default}.imagify-folders-tree .imagify-folder-already-selected button,.imagify-folders-tree .imagify-folder-already-selected button path{color:#FFF;stroke:#FFF;cursor:default}.imagify-folders-tree .imagify-folder-already-selected button:focus path,.imagify-folders-tree .imagify-folder-already-selected button:hover path{stroke:#FFF}.imagify-folders-tree .imagify-folder-already-selected button:before{content:''}.imagify-add-ed-folder{position:absolute;top:0;bottom:0;right:0;font-size:11px;text-transform:uppercase;letter-spacing:.02em;word-spacing:.02em;color:#3694AE;background:#F4F7F9;opacity:0;-webkit-transform:translateX(15px);-ms-transform:translateX(15px);transform:translateX(15px);-webkit-transition:all .275s;-o-transition:all .275s;transition:all .275s}.imagify-folder-already-selected .imagify-add-ed-folder,input:checked+label .imagify-add-ed-folder,input:focus+label .imagify-add-ed-folder,label:hover .imagify-add-ed-folder{opacity:1;-webkit-transform:translateX(0);-ms-transform:translateX(0);transform:translateX(0)}input:checked+label .imagify-add-ed-folder{background:#FFF}input:checked+label:hover .imagify-add-ed-folder,input:checked:focus+label .imagify-add-ed-folder{background:#F4F7F9}.imagify-folder-already-selected .imagify-add-ed-folder{background:#40B1D0;color:#FFF}.imagify-fake-checkbox{position:relative;display:inline-block;width:14px;height:14px;margin:3.5px 15px 0 5px;border:1.5px solid #3694AE;border-radius:3px;vertical-align:-4px}.imagify-fake-checkbox:after{position:absolute;left:1px;top:0;content:"✓";color:#3694AE;font-size:14px;line-height:.9;font-style:normal;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;opacity:0;-webkit-transform:scale(0);-ms-transform:scale(0);transform:scale(0);-webkit-transition:all .475s;-o-transition:all .475s;transition:all .475s}.imagify-folder-already-selected .imagify-fake-checkbox:after,input:checked+label .imagify-fake-checkbox:after{opacity:1;-webkit-transform:scale(1);-ms-transform:scale(1);transform:scale(1)}.imagify-folder-already-selected .imagify-fake-checkbox{border-color:#40B1D0}.imagify-folder-already-selected .imagify-fake-checkbox:after{color:#FFF}.imagify-folders-sub-tree{position:relative;margin-left:.75em;padding-top:.6em;padding-left:1em;border-left:1px dotted rgba(98,110,123,.3)}.imagify-folders-sub-tree li{position:relative;margin-bottom:4px}.imagify-folders-sub-tree li:before{content:"";position:absolute;top:12px;left:-1em;height:1px;width:.9em;border-top:1px dotted rgba(98,110,123,.3)}.imagify-folders-sub-tree li:last-child:after{content:"";position:absolute;left:-1.1em;bottom:0;height:11px;width:3px;background:#FFF}.imagify-empty-folder{margin-top:-.5em}.imagify-empty-folder em{font-size:12px;font-weight:500;color:#A2AFBC}
1
+ .wrap.imagify-settings{margin-right:0}.imagify-settings.imagify-have-rocket{margin-right:20px}#imagify-check-api-container{display:block;margin-top:6px;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 .imagify-icon{font-size:1.8em;margin-right:3px;margin-left:1px;color:#8BC34A;vertical-align:-2px}.imagify-account-info-col .imagify-api-line{padding:22px 26px;background:#343A49}.imagify-api-line label,p.imagify-api-key-invite-title{display:block;margin-bottom:6px;font-size:14px;text-transform:uppercase;letter-spacing:.02em;font-weight:700;color:#343A49}.imagify-account-info-col .imagify-api-line label{color:#E5EBEF;display:inline-block}.imagify-api-line.imagify-api-line input[type=text]{width:100%;padding:6px 10px;border:1px solid #40B1D0;font-family:"PT Mono",Consolas,monospace;font-size:14px;letter-spacing:.01em;font-weight:700;color:#40B1D0;background:0 0;-webkit-box-shadow:none;box-shadow:none}.imagify-no-api-key .imagify-api-line{margin:3em 0 0;padding:2em 0 0;border-top:1px solid #D5D6D9}.imagify-no-api-key .imagify-api-line input[type=text]{margin-top:5px;width:400px;max-width:100%}.imagify-settings .imagify-no-api-key div.submit.submit{border:0;padding:0 16px;margin-top:0;background:#FFF}.imagify-settings .imagify-no-api-key div.submit.submit p{padding-bottom:0}.imagify-options-title{margin:.75em 0 0;font-size:24px;letter-spacing:.02em;font-weight:700;color:#343A49}.imagify-options-subtitle{padding-bottom:.3em;margin-bottom:20px;border-bottom:1px solid #D2D3D6;font-size:14px;letter-spacing:.01em;font-weight:700;text-transform:uppercase;color:#626E7B}.imagify-options-subtitle a{font-size:12px;color:#338EA6;text-transform:none;letter-spacing:0}.imagify-options-subtitle .imagify-info{margin-left:15px}.imagify-setting-line{border-top:1px solid #D2D3D6;padding:25px 0 13px}.imagify-options-subtitle+.imagify-setting-line{border-top:0;padding-top:8px}.imagify-setting-optim-level{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-box-align:center;-ms-flex-align:center;align-items:center;padding:8px 0 18px}.imagify-setting-optim-level>p{margin:0}.imagify-setting-optim-level .imagify-inline-options{-ms-flex-preferred-size:60%;flex-basis:60%;-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;width:auto;display:-webkit-box;display:-ms-flexbox;display:flex;background:#2E3243;border-radius:3px}.imagify-setting-optim-level .imagify-inline-options label{display:block!important;width:100%;font-size:14px!important;border-radius:3px!important}.imagify-setting-optim-level .imagify-visual-comparison-text{-ms-flex-preferred-size:40%;flex-basis:40%;-ms-flex-negative:1;flex-shrink:1;padding-left:20px;color:#626E7B;-webkit-box-sizing:border-box;box-sizing:border-box}.imagify-setting-optim-level.imagify-setting-optim-level .imagify-visual-comparison-btn{padding-top:5px;margin-top:2px;border-radius:2px;text-transform:none;letter-spacing:0;text-shadow:none!important}@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-settings div.submit.submit{border-top:1px solid #D9D9D9;margin-top:2em;padding:18px 0 7px 30px}.imagify-settings .hidden+div.submit.submit{margin-top:-1px}.imagify-settings p.submit{float:left;margin-top:0}.imagify-settings p.submit .button{margin:0 5px}.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-settings .imagify-rate-us{margin-right:25px;margin-left:auto}.imagify-visual-label,label+.imagify-info{display:inline-block;width:550px;max-width:calc(100% - 38px);margin-left:38px;padding-right:25px}label+.imagify-options-line{display:block;margin:8px 0 20px 40px;font-size:14px;-webkit-transition:opacity .3s;-o-transition:opacity .3s;transition:opacity .3s}.imagify-options-line+.imagify-info{margin-left:38px}label+.imagify-info{margin-top:10px}.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_resize_larger_w{width:5em;height:auto;padding:6px;margin:0 6px;border:1px solid #8BA6B4;-webkit-box-shadow:none;box-shadow:none;border-radius:2px;color:#338EA6;font-weight:700}.imagify-menu-bar-img{-webkit-box-sizing:border-box;box-sizing:border-box;max-width:100%;height:auto;margin-top:0;border:1px solid #8BA6B4}.imagify-col.imagify-main{float:left;width:calc(100% - 320px);padding-left:0;padding-right:0}.imagify-have-rocket .imagify-main{float:none;width:1265px;max-width:100%}.imagify-sidebar{float:left;width:300px;max-width:100%}.imagify-sidebar-section{border:1px solid #BBB;background:#1F2332;position:relative;padding:10px 20px;text-align:center;color:#F2F2F2}.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-close{position:absolute;top:8px;right:12px;text-decoration:none}.imagify-sidebar-close i{font-size:2em;color:rgba(255,255,255,.5)}p.imagify-sidebar-title{margin:1.2em 0 1.5em;text-align:left;color:#F56640;text-transform:uppercase;letter-spacing:.015em;word-spacing:.015em;font-weight:700}p.imagify-sidebar-description{margin:1.5em 0;text-align:left;font-weight:500;color:#F2F2F2}.imagify-sidebar-description strong{color:#39CE9A}.imagify-rocket-cta-promo{display:block;padding:8px 10px;margin:1.3em 0 .5em;border:2px dashed #F56640;border-radius:3px;font-size:18px;font-weight:700;color:#F56640}.imagify-rocket-cta-promo strong,a.btn-rocket{color:#F2F2F2}a.btn-rocket{display:block;font-size:15px;padding:10px 12px;margin:0 0 1.5em;background:#F56640;border-radius:3px;text-transform:uppercase;font-weight:700;text-decoration:none}a.btn-rocket:focus,a.btn-rocket:hover{background:#AC2B15}.imagify-sidebar-section ul{margin-top:20px}.imagify-sidebar-section li{position:relative;margin:1.2em 0;padding-left:25px;text-align:left}.imagify-sidebar-section li:before{content:"✓";position:absolute;left:0;top:0;color:#39CE9A;font-size:18px}label[for=imagify_admin_bar_menu],label[for=imagify_partner_links]{font-weight:400!important;color:#626E7B!important}.imagify-select-all-buttons{margin-top:8px}.imagify-link-like.imagify-select-all{font-weight:700;font-size:12px;color:#3694AE}.imagify-select-all.imagify-is-inactive{color:inherit;text-decoration:none;cursor:default}.imagify-fts-header{padding:10px 16px;background:#343A49;color:#FFF}.imagify-fts-header i{font-size:1.8em;margin-right:12px}.imagify-fts-header p{margin:0;color:#FFF}#imagify-add-themes-to-custom-folder strong,.imagify-fts-header strong{color:#40B1D0;font-weight:700}.imagify-fts-content{padding:16px;background:#F4F7F9;border:1px solid #CDD0D4;border-top:0}.imagify-fts-content p{margin-top:0}.imagify-kindof-title{margin-top:2em;padding:0 0 10px;border-bottom:1px solid #D2D3D6;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;font-weight:700}.imagify-kindof-title .imagify-button-primary{padding:4px 13px 4px 10px}.imagify-kindof-title .imagify-button-primary .dashicons{vertical-align:-7.5px}.imagify-kindof-title .imagify-button-primary:focus,.imagify-kindof-title .imagify-button-primary:hover{color:#FFF}p.imagify-custom-folder-line{position:relative;margin:0;padding:12px 15px;color:#4A5362;font-weight:500;-webkit-transition:all .75s;-o-transition:all .75s;transition:all .75s}.imagify-custom-folder-line.imagify-will-remove{background:#C51162;color:#FFF;-webkit-transform:translateX(-120px);-ms-transform:translateX(-120px);transform:translateX(-120px);opacity:0}.imagify-custom-folder-line:first-child{margin-top:-.5em}.imagify-custom-folder-line+.imagify-custom-folder-line{border-top:1px solid #E9EFF2}.imagify-custom-folders-remove{position:absolute;right:0;top:6px;border:0;padding:5px 10px 4px;-webkit-box-shadow:none;box-shadow:none;color:#7A8996;border-radius:16px;font-size:13px;line-height:18px;background:#FFF;-webkit-transition:all .275s;-o-transition:all .275s;transition:all .275s;cursor:pointer}.imagify-custom-folders-remove-text{max-width:0;overflow:hidden;white-space:nowrap;display:inline-block;-webkit-transform:scale(0);-ms-transform:scale(0);transform:scale(0);opacity:0;-webkit-transition:all .275s;-o-transition:all .275s;transition:all .275s}.imagify-custom-folders-remove:focus,.imagify-custom-folders-remove:hover{background:#D9EFF6;color:#225E6E}.imagify-custom-folders-remove:focus .imagify-custom-folders-remove-text,.imagify-custom-folders-remove:hover .imagify-custom-folders-remove-text{max-width:6em;-webkit-transform:scale(1);-ms-transform:scale(1);transform:scale(1);opacity:1}.imagify-add-custom-folder+.imagify-loader{display:none;vertical-align:middle}.imagify-add-custom-folder[disabled]+.imagify-loader{display:inline-block}.imagify-folders-information{position:relative;margin:-5px 0 20px;padding:10px 10px 10px 40px;text-align:left;background:#F2F2F2}.imagify-folders-information i{position:absolute;left:10px;top:50%;margin-top:-10px}.imagify-folders-tree{margin:0;text-align:left}.imagify-folders-tree li{clear:left}.imagify-folders-tree .imagify-folder{-webkit-box-sizing:border-box;box-sizing:border-box;position:relative;width:48px;z-index:2;float:left;margin-top:-3px;padding:0 8px 0 0;border:0;background:0 0!important;-webkit-box-shadow:none;box-shadow:none;cursor:pointer;-webkit-transition:all .275s;-o-transition:all .275s;transition:all .275s}.imagify-folders-tree span.imagify-folder{padding-left:1.5px}.imagify-folders-tree .imagify-folder:before{content:"+";display:inline-block;width:13px;height:21px;font-size:1.5em;vertical-align:.15em}.imagify-folders-tree span.imagify-folder:before{content:''}.imagify-folders-tree .imagify-folder-icon path{-webkit-transition:all .275s;-o-transition:all .275s;transition:all .275s}.imagify-folders-tree .imagify-is-open .imagify-folder-icon path{stroke:#7A8996}.imagify-folders-tree .imagify-is-open.imagify-folder:before{content:"-";color:#7A8996}.imagify-folders-tree .imagify-is-open~label{color:#7A8996}.imagify-folders-tree .imagify-folder .imagify-loader,.imagify-folders-tree .imagify-folder.imagify-loading:before{display:none}.imagify-folders-tree .imagify-folder.imagify-loading .imagify-loader{display:inline-block;width:13px;height:21px;font-size:1.5em;vertical-align:.15em}.imagify-folders-tree .imagify-folder.imagify-loading .imagify-loader img{display:inline-block;width:100%;height:auto;vertical-align:middle}.imagify-folders-tree button.imagify-folder:focus,.imagify-folders-tree button.imagify-folder:focus path,.imagify-folders-tree button.imagify-folder:hover,.imagify-folders-tree button.imagify-folder:hover path{color:#3694AE;stroke:#3694AE}.imagify-folders-tree .imagify-folder.disabled,.imagify-folders-tree .imagify-folder:disabled{color:#7f7f7f}.imagify-swal-content .imagify-folders-tree label{position:relative;display:block;width:100%;padding:3px 0;font-size:15px;font-weight:500;vertical-align:top;-webkit-transition:all .475s;-o-transition:all .475s;transition:all .475s}.imagify-folders-tree input:focus+label,.imagify-swal-content .imagify-folders-tree label:hover{background:#F4F7F9}.imagify-folders-tree .imagify-folder-already-selected input:focus+label,.imagify-folders-tree .imagify-folder-already-selected label,.imagify-folders-tree .imagify-folder-already-selected label:hover{background:#40B1D0;color:#FFF;border-radius:3px;cursor:default}.imagify-folders-tree .imagify-folder-already-selected button,.imagify-folders-tree .imagify-folder-already-selected button path{color:#FFF;stroke:#FFF;cursor:default}.imagify-folders-tree .imagify-folder-already-selected button:focus path,.imagify-folders-tree .imagify-folder-already-selected button:hover path{stroke:#FFF}.imagify-folders-tree .imagify-folder-already-selected button:before{content:''}.imagify-add-ed-folder{position:absolute;top:0;bottom:0;right:0;font-size:11px;text-transform:uppercase;letter-spacing:.02em;word-spacing:.02em;color:#3694AE;background:#F4F7F9;opacity:0;-webkit-transform:translateX(15px);-ms-transform:translateX(15px);transform:translateX(15px);-webkit-transition:all .275s;-o-transition:all .275s;transition:all .275s}.imagify-folder-already-selected .imagify-add-ed-folder,input:checked+label .imagify-add-ed-folder,input:focus+label .imagify-add-ed-folder,label:hover .imagify-add-ed-folder{opacity:1;-webkit-transform:translateX(0);-ms-transform:translateX(0);transform:translateX(0)}input:checked+label .imagify-add-ed-folder{background:#FFF}input:checked+label:hover .imagify-add-ed-folder,input:checked:focus+label .imagify-add-ed-folder{background:#F4F7F9}.imagify-folder-already-selected .imagify-add-ed-folder{background:#40B1D0;color:#FFF}.imagify-fake-checkbox{position:relative;display:inline-block;width:14px;height:14px;margin:3.5px 15px 0 5px;border:1.5px solid #3694AE;border-radius:3px;vertical-align:-4px}.imagify-fake-checkbox:after{position:absolute;left:1px;top:0;content:"✓";color:#3694AE;font-size:14px;line-height:.9;font-style:normal;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;opacity:0;-webkit-transform:scale(0);-ms-transform:scale(0);transform:scale(0);-webkit-transition:all .475s;-o-transition:all .475s;transition:all .475s}.imagify-folder-already-selected .imagify-fake-checkbox:after,input:checked+label .imagify-fake-checkbox:after{opacity:1;-webkit-transform:scale(1);-ms-transform:scale(1);transform:scale(1)}.imagify-folder-already-selected .imagify-fake-checkbox{border-color:#40B1D0}.imagify-folder-already-selected .imagify-fake-checkbox:after{color:#FFF}.imagify-folders-sub-tree{position:relative;margin-left:.75em;padding-top:.6em;padding-left:1em;border-left:1px dotted rgba(98,110,123,.3)}.imagify-folders-sub-tree li{position:relative;margin-bottom:4px}.imagify-folders-sub-tree li:before{content:"";position:absolute;top:12px;left:-1em;height:1px;width:.9em;border-top:1px dotted rgba(98,110,123,.3)}.imagify-folders-sub-tree li:last-child:after{content:"";position:absolute;left:-1.1em;bottom:0;height:11px;width:3px;background:#FFF}.imagify-empty-folder{margin-top:-.5em}.imagify-empty-folder em{font-size:12px;font-weight:500;color:#A2AFBC}
assets/css/pricing-modal.min.css CHANGED
@@ -1,1150 +1 @@
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-checkbox.imagify-checkbox:not(:checked) + label:after,
529
- .imagify-offer-selected .imagify-checkbox.imagify-checkbox:checked + label:after {
530
- color: #FFF;
531
- }
532
- .imagify-offer-selected .imagify-offer-by {
533
- color: #2E3243;
534
- }
535
-
536
- .imagify-enough-title {
537
- display: none;
538
- }
539
- .imagify-enough-free .imagify-not-enough-title {
540
- display: none;
541
- }
542
- .imagify-enough-free .imagify-enough-title {
543
- display: block;
544
- }
545
-
546
- .imagify-submit-line {
547
- display: -webkit-box;
548
- display: -ms-flexbox;
549
- display: flex;
550
- -webkit-box-pack: justify;
551
- -ms-flex-pack: justify;
552
- justify-content: space-between;
553
- -webkit-box-align: center;
554
- -ms-flex-align: center;
555
- align-items: center;
556
- margin: 2em 0;
557
- text-align: left;
558
- }
559
- .imagify-coupon-section {
560
- display: -webkit-box;
561
- display: -ms-flexbox;
562
- display: flex;
563
- -webkit-box-align: center;
564
- -ms-flex-align: center;
565
- align-items: center;
566
- }
567
- .imagify-coupon-section p {
568
- margin: 0;
569
- line-height: 1.3;
570
- }
571
- .imagify-coupon-text {
572
- width: 200px;
573
- max-width: 100%;
574
- padding-right: 15px;
575
- }
576
- .imagify-coupon-loader {
577
- display: none;
578
- }
579
- .imagify-coupon-text.checking {
580
- text-align: right;
581
- }
582
- .imagify-coupon-text.checking .imagify-coupon-loader {
583
- display: inline;
584
- }
585
- .imagify-coupon-text.checking label {
586
- display: none;
587
- }
588
- .imagify-coupon-input {
589
- position: relative;
590
- }
591
- .imagify-coupon-input input {
592
- position: relative;
593
- z-index: 1;
594
- }
595
- [id="imagify-coupon-validate"].button-secondary {
596
- position: absolute;
597
- top: 1px;
598
- right: 3px;
599
- bottom: 2px;
600
- box-shadow: none;
601
- padding: 4px 10px;
602
- z-index: 0;
603
- transition: transform .275s;
604
- }
605
- .imagify-canbe-validate [id="imagify-coupon-validate"] {
606
- transform: translateX(45px);
607
- }
608
-
609
- /* Promotion/Discount section */
610
- .imagify-modal-section + .imagify-modal-promotion {
611
- margin-top: -1em;
612
- }
613
- .imagify-modal-promotion {
614
- position: relative;
615
- overflow: hidden;
616
- display: none;
617
- align-items: center;
618
- padding: 15px 25px;
619
- background: #604D90;
620
- text-shadow: 0 0 3px rgba(0, 0, 0, 0.3);
621
- }
622
- .imagify-modal-promotion.active {
623
- display: -webkit-box;
624
- display: -ms-flexbox;
625
- display: flex;
626
- }
627
- [id="imagify-pricing-tab-onetime"] .imagify-modal-promotion {
628
- margin-bottom: 4em;
629
- }
630
- .imagify-modal-promotion:before {
631
- content: "\f488";
632
- position: absolute;
633
- top: 28px;
634
- left: 8%;
635
- font-family: "dashicons";
636
- font-size: 90px;
637
- color: #8476A9;
638
- text-shadow: none;
639
- }
640
- .imagify-modal-promotion p {
641
- position: relative;
642
- margin: .2em 0;
643
- color: #FFF;
644
- }
645
- .imagify-promo-title {
646
- -ms-flex-preferred-size: 100%;
647
- flex-basis: 100%;
648
- text-transform: uppercase;
649
- font-size: 20px;
650
- font-weight: bold;
651
- letter-spacing: 0.125em;
652
- }
653
- .imagify-until-date {
654
- -ms-flex-preferred-size: 200px;
655
- flex-basis: 200px;
656
- text-align: right;
657
- }
658
- .imagify-until-date strong {
659
- color: #FFF;
660
- }
661
-
662
-
663
- .imagify-submit-line button {
664
- font-size: 16px;
665
- }
666
- input.imagify-coupon-code {
667
- padding: 10px;
668
- border: 2px solid #7A8996;
669
- font-size: 0.875em;
670
- font-weight: bold;
671
- border-radius: 3px;
672
- }
673
- .validated.imagify-coupon-section .imagify-coupon-text,
674
- .validated.imagify-coupon-section strong {
675
- color: #8BC34A;
676
- }
677
- .validated.imagify-coupon-section .imagify-coupon-code {
678
- color: #8BC34A;
679
- border-color: #8BC34A;
680
- }
681
- .invalid.imagify-coupon-section .imagify-coupon-text,
682
- .invalid.imagify-coupon-section strong {
683
- color: #d0021b;
684
- }
685
- .invalid.imagify-coupon-section .imagify-coupon-code {
686
- color: #d0021b;
687
- border-color: #d0021b;
688
- }
689
- .imagify-footer-lines {
690
- width: 500px;
691
- max-width: 100%;
692
- margin: 2em auto 2.5em;
693
- font-size: 0.85em;
694
- line-height: 1.5;
695
- }
696
-
697
- /* Year selected */
698
- .imagify-year-selected .imagify-switch-my .imagify-yearly {
699
- display: block;
700
- }
701
- .imagify-year-selected .imagify-switch-my .imagify-monthly {
702
- display: none;
703
- }
704
- /* Month selected */
705
- .imagify-month-selected .imagify-switch-my .imagify-yearly {
706
- display: none;
707
- }
708
- .imagify-month-selected .imagify-switch-my .imagify-monthly {
709
- display: block;
710
- }
711
-
712
- /* Flexbox table */
713
- .imagify-flex-table {
714
- -webkit-box-align: center;
715
- -webkit-align-items: center;
716
- -ms-flex-align: center;
717
- align-items: center;
718
- }
719
- .imagify-flex-table > * {
720
- -webkit-box-flex: 1;
721
- -webkit-flex-grow: 1;
722
- -ms-flex-positive: 1;
723
- flex-grow: 1;
724
- padding: 7px 15px;
725
- }
726
-
727
- /* Pricing table */
728
- div.imagify-col-details {
729
- width: 22%;
730
- padding-left: 25px;
731
- }
732
- .imagify-col-details p {
733
- margin: 0;
734
- }
735
- .imagify-pricing-table {
736
- margin: 0 20px;
737
- }
738
- .imagify-pricing-table .imagify-offer-line {
739
- padding: .6em 0;
740
- border: 2px solid #E8EEF0;
741
- text-align: left;
742
- border-radius: 3px;
743
- }
744
- .imagify-pricing-table .imagify-offer-line:first-child {
745
- margin-top: .75em;
746
- }
747
- .imagify-pricing-table .imagify-offer-line.imagify-offer-selected:first-child {
748
- margin-top: 1.75em;
749
- }
750
- .imagify-pricing-table .imagify-offer-line + .imagify-offer-line {
751
- margin-top: -2px;
752
- }
753
- .imagify-pricing-table .imagify-col-other-actions {
754
- width: 20.5%;
755
- }
756
- .imagify-pricing-table .imagify-approx {
757
- margin-left: 0;
758
- line-height: 0.5;
759
- margin-bottom: 1em;
760
- }
761
- .imagify-pricing-table .imagify-offer-selected {
762
- -webkit-transform: scale(1.03);
763
- transform: scale(1.03);
764
- background: #40B1D0;
765
- border-width: 0;
766
- }
767
- .imagify-pricing-table .imagify-offer-selected .imagify-approx {
768
- color: #FFF;
769
- }
770
- .imagify-pricing-table .imagify-button-secondary {
771
- padding: 3px 20px;
772
- box-shadow: none;
773
- text-transform: uppercase;
774
- font-size: 12px;
775
- letter-spacing: 0.025em;
776
- }
777
- .imagify-offer-selected.imagify-offer-selected .imagify-button-secondary {
778
- border: 2px solid #FFF;
779
- background: #40B1D0;
780
- box-shadow: none;
781
- text-shadow: none!important;
782
- }
783
- .imagify-offer-selected.imagify-offer-selected .imagify-button-secondary:hover,
784
- .imagify-offer-selected.imagify-offer-selected .imagify-button-secondary:focus {
785
- background: #FFF;
786
- color: #40B1D0;
787
- }
788
-
789
- .imagify-col .imagify-special-needs {
790
- margin-left: 25px;
791
- }
792
- .imagify-special-needs strong {
793
- font-size: 25px;
794
- font-weight: bold;
795
- color: #40B1D0;
796
- }
797
- .imagify-special-needs span {
798
- display: block;
799
- font-size: 12px;
800
- margin-top: -.5em;
801
- }
802
- div.imagify-col-price {
803
- position: relative;
804
- }
805
-
806
- /* we recommend line */
807
- .imagify-recommend {
808
- display: none;
809
- position: absolute;
810
- left: -20px; bottom: 100%;
811
- padding: 0;
812
- margin-bottom: 8px;
813
- color: #1F2332;
814
- font-weight: bold;
815
- font-style: italic;
816
- }
817
- .imagify-offer-selected .imagify-recommend {
818
- display: block;
819
- }
820
- [class*="imagify-onetime-"] .imagify-recommend {
821
- left: 65px;
822
- margin-bottom: 20px;
823
- }
824
- .imagify-recommend:before {
825
- content: "";
826
- position: absolute;
827
- top: 7px; left: -35px;
828
- width: 29px; height: 30px;
829
- background: url("../images/icon-arrow-choice.png") scroll 0 no-repeat;
830
- background-size: contain;
831
- }
832
- @media only screen and (min-resolution: 192dpi), only screen and (min-resolution: 2dppx) {
833
- .imagify-recommend:before {
834
- background-image: url("../images/icon-arrow-choice.svg");
835
- }
836
- }
837
-
838
- /* One Time Adjustments */
839
- .imagify-offer-line[class*="imagify-onetime-"] {
840
- padding: 0;
841
- margin: .3em 0 0;
842
- }
843
- .imagify-offer-line.imagify-offer-line[class*="imagify-onetime-"]:first-child {
844
- margin-top: 2em;
845
- }
846
- .imagify-offer-line[class*="imagify-onetime-"] + .imagify-offer-line {
847
- margin-top: .5em;
848
- }
849
- .imagify-offer-selected.imagify-offer-line[class*="imagify-onetime-"] {
850
- -webkit-transform: scale(1);
851
- transform: scale(1);
852
- border-width: 2px;
853
- }
854
-
855
- /* cols */
856
- .imagify-offer-line[class*="imagify-onetime-"] .imagify-col-details {
857
- position: relative;
858
- overflow: hidden;
859
- width: 21%;
860
- background: #1F2332;
861
- color: #FFF;
862
- }
863
- .imagify-offer-selected.imagify-offer-line[class*="imagify-onetime-"] .imagify-col-details {
864
- background: #338EA6;
865
- }
866
- .imagify-offer-line[class*="imagify-onetime-"] .imagify-col-details:before {
867
- content: "";
868
- position: absolute;
869
- bottom: 0; right: 25px;
870
- width: 75px; height: 54px;
871
- background: url("../images/icon-pack.png");
872
- }
873
- .imagify-offer-line[class*="imagify-onetime-"] .imagify-col-other-actions {
874
- width: 30%;
875
- }
876
-
877
- .imagify-offer-line[class*="imagify-onetime-"] .imagify-offer-size,
878
- .imagify-offer-line[class*="imagify-onetime-"] .imagify-approx {
879
- color: #FFF;
880
- }
881
- .imagify-offer-line[class*="imagify-onetime-"] .imagify-offer-size {
882
- font-size: 24px;
883
- }
884
- .imagify-offer-line[class*="imagify-onetime-"] .imagify-approx {
885
- font-size: 12px;
886
- }
887
- .imagify-offer-line[class*="imagify-onetime-"] .imagify-price-block {
888
- padding-left: 10px;
889
- }
890
- .imagify-offer-line[class*="imagify-onetime-"] .imagify-dollars {
891
- vertical-align: middle;
892
- }
893
- .imagify-offer-line[class*="imagify-onetime-"] .imagify-price-big {
894
- vertical-align: -5px;
895
- }
896
- .imagify-offer-line[class*="imagify-onetime-"] .imagify-price-mini {
897
- vertical-align: 7px;
898
- }
899
-
900
- /* Simple Tabs */
901
- .imagify-tabs {
902
- margin-bottom: 0;
903
- list-style: none;
904
- background: #E5EBEF;
905
- }
906
- .imagify-modal-content .imagify-tabs {
907
- margin: 1em 0 0;
908
- }
909
- .imagify-tab {
910
- -webkit-box-flex: 1;
911
- -webkit-flex-grow: 1;
912
- -ms-flex-positive: 1;
913
- flex-grow: 1;
914
- width: 50%;
915
- margin: 0;
916
- font-size: 23px;
917
- }
918
- .imagify-tab a {
919
- display: block;
920
- padding: 15px 10px;
921
- color: inherit;
922
- text-decoration: none;
923
- }
924
- .imagify-tab a:focus {
925
- box-shadow: none;
926
- outline: none;
927
- color: #40B1D8;
928
- }
929
- .imagify-tab.imagify-current a {
930
- background: #F6F7FB;
931
- }
932
- .imagify-tab-content.imagify-current {
933
- display: block;
934
- }
935
- .imagify-tab-content {
936
- display: none;
937
- }
938
- .imagify-tab-content .imagify-modal-section:first-child {
939
- margin-top: 0;
940
- }
941
-
942
- /* Modal sidebar */
943
- .imagify-modal-sidebar-content,
944
- .imagify-payment-modal .imagify-modal-sidebar {
945
- display: -webkit-box;
946
- display: -webkit-flex;
947
- display: -ms-flexbox;
948
- display: flex;
949
- -webkit-box-orient: vertical;
950
- -webkit-box-direction: normal;
951
- -webkit-flex-direction: column;
952
- -ms-flex-direction: column;
953
- flex-direction: column;
954
- }
955
- .imagify-modal-sidebar-content {
956
- -webkit-box-flex: 1;
957
- -webkit-flex-grow: 1;
958
- -ms-flex-positive: 1;
959
- flex-grow: 1;
960
- }
961
- p.imagify-modal-sidebar-title.imagify-modal-sidebar-title {
962
- margin-top: 5px;
963
- padding-right: 40px;
964
- font-size: 18px;
965
- color: #FFF;
966
- }
967
- .imagify-modal-testimony {
968
- margin-top: 1em;
969
- }
970
- .imagify-modal-testimony + .imagify-modal-testimony {
971
- margin-top: 2em;
972
- }
973
- @media (max-height:620px) {
974
- .imagify-modal-testimony + .imagify-modal-testimony {
975
- display: none;
976
- }
977
- }
978
- .imagify-modal-testimony-person {
979
- display: table;
980
- width: 100%;
981
- }
982
- .imagify-modal-testimony-person > * {
983
- display: table-cell;
984
- vertical-align: middle;
985
- }
986
- .imagify-modal-avatar {
987
- width: 114px;
988
- line-height: 0;
989
- }
990
- .imagify-modal-avatar img {
991
- border: 2px solid #FFF;
992
- border-radius: 50%;
993
- width: 96px; height: 96px;
994
- }
995
- .imagify-modal-identity a {
996
- text-decoration: none;
997
- font-weight: bold;
998
- }
999
- .imagify-modal-identity a:first-child {
1000
- font-size: 13px;
1001
- }
1002
- .imagify-modal-identity a:first-child + a {
1003
- display: block;
1004
- font-size: 10px;
1005
- color: #7A8996;
1006
- }
1007
- .imagify-modal-testimony-content.imagify-modal-testimony-content p {
1008
- font-size: 13px;
1009
- font-style: italic;
1010
- line-height: 1.7;
1011
- color: #7A8996;
1012
- }
1013
- .imagify-modal-sidebar-trust {
1014
- margin-top: auto;
1015
- padding-top: 1.5em;
1016
- }
1017
- .imagify-modal-sidebar-trust p {
1018
- margin: 0;
1019
- font-weight: bold;
1020
- font-size: 12px;
1021
- line-height: 1.7;
1022
- }
1023
- .imagify-modal-sidebar-trust p img {
1024
- margin-right: 3px;
1025
- vertical-align: -2px;
1026
- }
1027
- .imagify-modal-sidebar-trust p + p {
1028
- font-size: 11px;
1029
- }
1030
-
1031
- /* Cart */
1032
- .imagify-cart {
1033
- text-align: left;
1034
- }
1035
- .imagify-cart .imagify-cart-list {
1036
- border-top: 1px solid rgba(122, 137, 150, .2);
1037
- border-bottom: 1px solid rgba(122, 137, 150, .2);
1038
- }
1039
- .imagify-cart .imagify-cart-label {
1040
- margin-bottom: 0.5em;
1041
- font-size: 10px;
1042
- color: #2E3243;
1043
- }
1044
- .imagify-cart-list p {
1045
- margin: 0;
1046
- font-weight: bold;
1047
- }
1048
- .imagify-cart-item {
1049
- margin: .4em 0;
1050
- }
1051
- .imagify-cart .imagify-cart-suggestion {
1052
- margin-top: -.3em;
1053
- }
1054
- .imagify-cart-suggestion a,
1055
- .imagify-cl-description p {
1056
- font-size: 10px;
1057
- }
1058
- .imagify-remove-from-cart {
1059
- border: 0;
1060
- padding: 0;
1061
- width: 14px;
1062
- height: 14px;
1063
- line-height: 13px;
1064
- border-radius: 50%;
1065
- background: #40B1D0;
1066
- cursor: pointer;
1067
- transition: background .3s;
1068
- }
1069
- .imagify-remove-from-cart i:before {
1070
- position: relative;
1071
- top: -6px; left: -3px;
1072
- font-size: 13px;
1073
- color: #FFF;
1074
- }
1075
- .imagify-remove-from-cart:hover,
1076
- .imagify-remove-from-cart:focus {
1077
- background: #D0021B;
1078
- }
1079
-
1080
- /* col sizes */
1081
- .imagify-cart .imagify-cl-remove {
1082
- -webkit-box-flex: 0;
1083
- -webkit-flex-grow: 0;
1084
- -ms-flex-positive: 0;
1085
- flex-grow: 0;
1086
- width: 45px;
1087
- }
1088
- .imagify-cart .imagify-cl-name {
1089
- -webkit-box-flex: 0;
1090
- -webkit-flex-grow: 0;
1091
- -ms-flex-positive: 0;
1092
- flex-grow: 0;
1093
- width: 200px;
1094
- }
1095
- .imagify-cart .imagify-cl-description {
1096
- -webkit-align-self: flex-start;
1097
- -ms-flex-item-align: start;
1098
- align-self: flex-start;
1099
- padding-top: 10px;
1100
- }
1101
- .imagify-cart .imagify-cl-price {
1102
- text-align: right;
1103
- }
1104
-
1105
- #imagify-payment-iframe {
1106
- width: 980px;
1107
- height: 672px;
1108
- background: #f6f7fb url(../images/loader-balls.svg) 50% 50% no-repeat;
1109
- }
1110
-
1111
- .imagify-success-view {
1112
- display: -webkit-box;
1113
- display: -webkit-flex;
1114
- display: -ms-flexbox;
1115
- display: flex;
1116
- -webkit-box-align: center;
1117
- -webkit-align-items: center;
1118
- -ms-flex-align: center;
1119
- align-items: center;
1120
- -webkit-box-orient: vertical;
1121
- -webkit-box-direction: normal;
1122
- -webkit-flex-direction: column;
1123
- -ms-flex-direction: column;
1124
- flex-direction: column;
1125
- -webkit-box-pack: center;
1126
- -webkit-justify-content: center;
1127
- -ms-flex-pack: center;
1128
- justify-content: center;
1129
- height: 100%;
1130
- }
1131
- .imagify-success-view p {
1132
- font-weight: bold;
1133
- font-size: 16px;
1134
- }
1135
-
1136
- /* Imagify cart item removing */
1137
- .imagify-cart-emptied-item {
1138
- margin: .3em auto;
1139
- padding: 6px 20px;
1140
- background: #E6EBEF;
1141
- border-radius: 20px;
1142
- }
1143
- .imagify-cart-emptied-item.imagify-cart-emptied-item p {
1144
- font-weight: bold;
1145
- }
1146
- .imagify-cart-emptied-item a {
1147
- color: #40b1d0;
1148
- float: right;
1149
- font-weight: bold;
1150
- }
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-offer-selected,.imagify-offer-selected .imagify-checkbox.imagify-checkbox:checked+label:after,.imagify-offer-selected .imagify-checkbox.imagify-checkbox:not(:checked)+label:after,.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-col-other-actions{width:18.5%;text-align:right}.imagify-col-other-actions a{font-size:11px}.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.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.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/images/icon-lock.svg CHANGED
@@ -1,18 +1,2 @@
1
- <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
- <svg width="16px" height="19px" viewBox="0 0 16 19" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
3
- <!-- Generator: Sketch 3.6.1 (26313) - http://www.bohemiancoding.com/sketch -->
4
- <title></title>
5
- <desc>Created with Sketch.</desc>
6
- <defs></defs>
7
- <g id="Bulk-Optimize" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" font-size="24" font-family="FontAwesome" font-weight="normal">
8
- <g id="Bulk-Optimize-Free-Account-Popup-1" transform="translate(-1047.000000, -799.000000)" fill="#8BC34A">
9
- <g id="Group-17" transform="translate(984.000000, 155.000000)">
10
- <g id="Group-15" transform="translate(32.000000, 641.000000)">
11
- <text id="">
12
- <tspan x="31" y="22"></tspan>
13
- </text>
14
- </g>
15
- </g>
16
- </g>
17
- </g>
18
- </svg>
1
+ <svg height="19" viewBox="0 0 448 512" width="16" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="m400 224h-24v-72c0-83.8-68.2-152-152-152s-152 68.2-152 152v72h-24c-26.5 0-48 21.5-48 48v192c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48v-192c0-26.5-21.5-48-48-48zm-104 0h-144v-72c0-39.7 32.3-72 72-72s72 32.3 72 72z" fill="#8bc34a" fill-rule="evenodd"/></svg>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
assets/images/imagify-menu-bar-de.jpg ADDED
Binary file
assets/images/imagify-menu-bar-en.jpg ADDED
Binary file
assets/images/imagify-menu-bar-es.jpg ADDED
Binary file
assets/images/imagify-menu-bar-fr.jpg ADDED
Binary file
assets/images/imagify-menu-bar-it.jpg ADDED
Binary file
assets/images/imagify-menu-bar.jpg DELETED
Binary file
assets/js/admin.min.js CHANGED
@@ -1,103 +1 @@
1
- window.imagify = window.imagify || {};
2
-
3
- jQuery.extend( window.imagify, {
4
- concat: ajaxurl.indexOf( '?' ) > 0 ? '&' : '?',
5
- log: function( content ) {
6
- if ( undefined !== console ) {
7
- console.log( content ); // eslint-disable-line no-console
8
- }
9
- },
10
- info: function( content ) {
11
- if ( undefined !== console ) {
12
- console.info( content ); // eslint-disable-line no-console
13
- }
14
- },
15
- openModal: function( $link ) {
16
- var target = $link.data( 'target' ) || $link.attr( 'href' );
17
-
18
- jQuery( target ).css( 'display', 'flex' ).hide().fadeIn( 400 ).attr( {
19
- 'aria-hidden': 'false',
20
- 'tabindex': '0'
21
- } ).focus().removeAttr( 'tabindex' ).addClass( 'modal-is-open' );
22
-
23
- jQuery( 'body' ).addClass( 'imagify-modal-is-open' );
24
- },
25
- template: function( id ) {
26
- if ( undefined === _ ) {
27
- // No need to load underscore everywhere if we don't use it.
28
- return '';
29
- }
30
-
31
- return _.memoize( function( data ) {
32
- var compiled,
33
- options = {
34
- evaluate: /<#([\s\S]+?)#>/g,
35
- interpolate: /\{\{\{([\s\S]+?)\}\}\}/g,
36
- escape: /\{\{([^}]+?)\}\}(?!\})/g,
37
- variable: 'data'
38
- };
39
-
40
- return function() {
41
- compiled = compiled || _.template( jQuery( '#tmpl-' + id ).html(), null, options );
42
- data = data || {};
43
- return compiled( data );
44
- };
45
- } );
46
- },
47
- humanSize: function( bytes ) {
48
- var sizes = ['B', 'kB', 'MB'],
49
- i;
50
-
51
- if ( 0 === bytes ) {
52
- return '0\xA0kB';
53
- }
54
-
55
- i = parseInt( Math.floor( Math.log( bytes ) / Math.log( 1024 ) ), 10 );
56
-
57
- return ( bytes / Math.pow( 1024, i ) ).toFixed( 2 ) + '\xA0' + sizes[ i ];
58
- }
59
- } );
60
-
61
-
62
- // Imagify light modal =============================================================================
63
- (function($, d, w, undefined) { // eslint-disable-line no-unused-vars, no-shadow, no-shadow-restricted-names
64
-
65
- // Accessibility.
66
- $( '.imagify-modal' ).attr( 'aria-hidden', 'true' );
67
-
68
- $( d )
69
- // On click on modal trigger, open modal.
70
- .on( 'click.imagify', '.imagify-modal-trigger', function( e ) {
71
- e.preventDefault();
72
- w.imagify.openModal( $( this ) );
73
- } )
74
- // On click on close button, close modal.
75
- .on( 'click.imagify', '.imagify-modal .close-btn', function() {
76
- var $modal = $( this ).closest( '.imagify-modal' );
77
-
78
- $modal.fadeOut( 400 ).attr( 'aria-hidden', 'true' ).removeClass( 'modal-is-open' ).trigger( 'modalClosed.imagify' );
79
-
80
- $( 'body' ).removeClass( 'imagify-modal-is-open' );
81
- } )
82
- // On close button blur, improve accessibility.
83
- .on( 'blur.imagify', '.imagify-modal .close-btn', function() {
84
- var $modal = $( this ).closest( '.imagify-modal' );
85
-
86
- if ( $modal.attr( 'aria-hidden' ) === 'false' ) {
87
- $modal.attr( 'tabindex', '0' ).focus().removeAttr( 'tabindex' );
88
- }
89
- } )
90
- // On click on dropped layer of modal, close modal.
91
- .on( 'click.imagify', '.imagify-modal', function( e ) {
92
- $( e.target ).filter( '.modal-is-open' ).find( '.close-btn' ).trigger( 'click.imagify' );
93
- } )
94
- // `Esc` key binding, close modal.
95
- .on( 'keydown.imagify', function( e ) {
96
- if ( 27 === e.keyCode && $( '.imagify-modal.modal-is-open' ).length > 0 ) {
97
- e.preventDefault();
98
- // Trigger the event.
99
- $( '.imagify-modal.modal-is-open' ).find( '.close-btn' ).trigger( 'click.imagify' );
100
- }
101
- } );
102
-
103
- } )(jQuery, document, window);
1
+ window.imagify=window.imagify||{},jQuery.extend(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")},template:function(a){return void 0===_?"":_.memoize(function(b){var c,d={evaluate:/<#([\s\S]+?)#>/g,interpolate:/\{\{\{([\s\S]+?)\}\}\}/g,escape:/\{\{([^}]+?)\}\}(?!\})/g,variable:"data"};return function(){return c=c||_.template(jQuery("#tmpl-"+a).html(),null,d),b=b||{},c(b)}})},humanSize:function(a){var b,c=["B","kB","MB"];return 0===a?"0 kB":(b=parseInt(Math.floor(Math.log(a)/Math.log(1024)),10),(a/Math.pow(1024,b)).toFixed(2)+" "+c[b])}}),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.min.js CHANGED
@@ -1,1384 +1 @@
1
- (function( $, undefined ) { // eslint-disable-line no-shadow, no-shadow-restricted-names
2
-
3
- var jqPropHookChecked = $.propHooks.checked;
4
-
5
- // Force `.prop()` to trigger a `change` event.
6
- $.propHooks.checked = {
7
- set: function( elem, value, name ) {
8
- var ret;
9
-
10
- if ( undefined === jqPropHookChecked ) {
11
- ret = ( elem[ name ] = value );
12
- } else {
13
- ret = jqPropHookChecked( elem, value, name );
14
- }
15
-
16
- $( elem ).trigger( 'change.imagify' );
17
-
18
- return ret;
19
- }
20
- };
21
-
22
- // Custom jQuery functions =====================================================================
23
- /**
24
- * Hide element(s).
25
- *
26
- * @param {int} duration A duration in ms.
27
- * @param {function} callback A callback to execute once the element is hidden.
28
- * @return {element} The jQuery element(s).
29
- */
30
- $.fn.imagifyHide = function( duration, callback ) {
31
- if ( duration && duration > 0 ) {
32
- this.hide( duration, function() {
33
- $( this ).addClass( 'hidden' ).css( 'display', '' );
34
-
35
- if ( undefined !== callback ) {
36
- callback();
37
- }
38
- } );
39
- } else {
40
- this.addClass( 'hidden' );
41
-
42
- if ( undefined !== callback ) {
43
- callback();
44
- }
45
- }
46
-
47
- return this.attr( 'aria-hidden', 'true' );
48
- };
49
-
50
- /**
51
- * Show element(s).
52
- *
53
- * @param {int} duration A duration in ms.
54
- * @param {function} callback A callback to execute before starting to display the element.
55
- * @return {element} The jQuery element(s).
56
- */
57
- $.fn.imagifyShow = function( duration, callback ) {
58
- if ( undefined !== callback ) {
59
- callback();
60
- }
61
-
62
- if ( duration && duration > 0 ) {
63
- this.show( duration, function() {
64
- $( this ).removeClass( 'hidden' ).css( 'display', '' );
65
- } );
66
- } else {
67
- this.removeClass( 'hidden' );
68
- }
69
-
70
- return this.attr( 'aria-hidden', 'false' );
71
- };
72
-
73
- }( jQuery ));
74
-
75
-
76
- (function($, d, w, undefined) { // eslint-disable-line no-unused-vars, no-shadow, no-shadow-restricted-names
77
-
78
- w.imagify.bulk = {
79
-
80
- // Properties ==============================================================================
81
- charts: {
82
- overview: {
83
- canvas: false,
84
- donut: false,
85
- data: {
86
- // Order: unoptimized, optimized, error.
87
- labels: [
88
- imagifyBulk.labels.overviewChartLabels.unoptimized,
89
- imagifyBulk.labels.overviewChartLabels.optimized,
90
- imagifyBulk.labels.overviewChartLabels.error
91
- ],
92
- datasets: [ {
93
- data: [],
94
- backgroundColor: [ '#10121A', '#46B1CE', '#C51162' ],
95
- borderWidth: 0
96
- } ]
97
- }
98
- },
99
- files: {
100
- donuts: {}
101
- },
102
- share: {
103
- canvas: false,
104
- donut: false
105
- }
106
- },
107
- // Folder types in queue.
108
- queue: [],
109
- // Status of each folder type.
110
- status: {},
111
- // Tell if the message displayed when retrieving the image IDs has been shown once.
112
- displayedWaitMessage: false,
113
- // Tell how many rows are available.
114
- hasMultipleRows: true,
115
- // Set to true to stop the whole thing.
116
- processIsStopped: false,
117
- // Global stats.
118
- globalGain: 0,
119
- globalOriginalSize: 0,
120
- globalOptimizedSize: 0,
121
- // Heartbeat.
122
- folderTypes: [],
123
-
124
- // Methods =================================================================================
125
-
126
- /*
127
- * Init.
128
- */
129
- init: function () {
130
- // Overview chart.
131
- this.drawOverviewChart();
132
-
133
- this.hasMultipleRows = $( '.imagify-bulk-table [name="group[]"]' ).length > 1;
134
-
135
- // Optimization level selector.
136
- $( '.imagify-level-selector-button' )
137
- .on( 'click.imagify', this.openLevelSelectorFromButton );
138
-
139
- $( '.imagify-level-selector-list input' )
140
- .on( 'change.imagify init.imagify', this.syncLevelSelectorFromRadio )
141
- .filter( ':checked' )
142
- .trigger( 'init.imagify' );
143
-
144
- $( d )
145
- .on( 'keypress.imagify click.imagify', this.closeLevelSelectors );
146
-
147
- // Other buttons/UI.
148
- $( '.imagify-bulk-table [name="group[]"]' ).on( 'change.imagify init.imagify', this.toggleOptimizationButton ).trigger( 'init.imagify' );
149
- $( '.imagify-show-table-details' ).on( 'click.imagify open.imagify close.imagify', this.toggleOptimizationDetails );
150
- $( '#imagify-bulk-action' ).on( 'click.imagify', this.maybeLaunchAllProcesses );
151
- $( '.imagify-share-networks a' ).on( 'click.imagify', this.share );
152
-
153
- // Optimization events.
154
- $( w )
155
- .on( 'processQueue.imagify', this.processQueue )
156
- .on( 'optimizeFiles.imagify', this.optimizeFiles )
157
- .on( 'queueEmpty.imagify', this.queueEmpty );
158
-
159
- if ( imagifyBulk.ajaxActions.getStats && $( '.imagify-bulk-table [data-group-id="library"][data-context="wp"]' ).length ) {
160
- // If large library.
161
- imagifyBulk.heartbeatId = false;
162
- }
163
-
164
- if ( imagifyBulk.heartbeatId ) {
165
- $( d )
166
- .on( 'heartbeat-send', this.addHeartbeat )
167
- .on( 'heartbeat-tick', this.processHeartbeat );
168
- }
169
-
170
- // Heartbeat for requirements.
171
- $( d )
172
- .on( 'heartbeat-send', this.addRequirementsHeartbeat )
173
- .on( 'heartbeat-tick', this.processRequirementsHeartbeat );
174
- },
175
-
176
- /**
177
- * Overview chart.
178
- * Used for the big overview chart.
179
- */
180
- drawOverviewChart: function ( data ) {
181
- var initData, legend;
182
-
183
- if ( ! this.charts.overview.canvas ) {
184
- this.charts.overview.canvas = d.getElementById( 'imagify-overview-chart' );
185
-
186
- if ( ! this.charts.overview.canvas ) {
187
- return;
188
- }
189
- }
190
-
191
- data = data && $.isArray( data ) ? data : [];
192
-
193
- if ( this.charts.overview.donut ) {
194
- // Update existing donut.
195
- if ( data.length ) {
196
- if ( data.reduce( function( a, b ) { return a + b; }, 0 ) === 0 ) {
197
- data[0] = 1;
198
- }
199
-
200
- this.charts.overview.donut.data.datasets[0].data = data;
201
- this.charts.overview.donut.update();
202
- }
203
- return;
204
- }
205
-
206
- // Create new donut.
207
- this.charts.overview.data.datasets[0].data = [
208
- parseInt( this.charts.overview.canvas.getAttribute( 'data-unoptimized' ), 10 ),
209
- parseInt( this.charts.overview.canvas.getAttribute( 'data-optimized' ), 10 ),
210
- parseInt( this.charts.overview.canvas.getAttribute( 'data-errors' ), 10 )
211
- ];
212
- initData = $.extend( {}, this.charts.overview.data );
213
-
214
- if ( data.length ) {
215
- initData.datasets[0].data = data;
216
- }
217
-
218
- if ( initData.datasets[0].data.reduce( function( a, b ) { return a + b; }, 0 ) === 0 ) {
219
- initData.datasets[0].data[0] = 1;
220
- }
221
-
222
- this.charts.overview.donut = new w.imagify.Chart( this.charts.overview.canvas, {
223
- type: 'doughnut',
224
- data: initData,
225
- options: {
226
- legend: {
227
- display: false
228
- },
229
- events: [],
230
- animation: {
231
- easing: 'easeOutBounce'
232
- },
233
- tooltips: {
234
- displayColors: false,
235
- callbacks: {
236
- label: function( tooltipItem, localData ) {
237
- return localData.datasets[ tooltipItem.datasetIndex ].data[ tooltipItem.index ];
238
- }
239
- }
240
- },
241
- responsive: false,
242
- cutoutPercentage: 85
243
- }
244
- } );
245
-
246
- // Then generate the legend and insert it to your page somewhere.
247
- legend = '<ul class="imagify-doughnut-legend">';
248
-
249
- $.each( initData.labels, function( i, label ) {
250
- legend += '<li><span style="background-color:' + initData.datasets[0].backgroundColor[ i ] + '"></span>' + label + '</li>';
251
- } );
252
-
253
- legend += '</ul>';
254
-
255
- d.getElementById( 'imagify-overview-chart-legend' ).innerHTML = legend;
256
- },
257
-
258
- /**
259
- * Mini chart.
260
- * Used for the charts on each file row.
261
- *
262
- * @param {element} canvas A jQuery canvas element.
263
- */
264
- drawFileChart: function ( canvas ) {
265
- var donuts = this.charts.files.donuts;
266
-
267
- canvas.each( function() {
268
- var value = parseInt( $( this ).closest( '.imagify-chart' ).next( '.imagipercent' ).text().replace( '%', '' ), 10 );
269
-
270
- if ( undefined !== donuts[ this.id ] ) {
271
- // Update existing donut.
272
- donuts[ this.id ].data.datasets[0].data[0] = value;
273
- donuts[ this.id ].data.datasets[0].data[1] = 100 - value;
274
- donuts[ this.id ].update();
275
- return;
276
- }
277
-
278
- // Create new donut.
279
- donuts[ this.id ] = new w.imagify.Chart( this, {
280
- type: 'doughnut',
281
- data: {
282
- datasets: [{
283
- data: [ value, 100 - value ],
284
- backgroundColor: [ '#00B3D3', '#D8D8D8' ],
285
- borderColor: '#fff',
286
- borderWidth: 1
287
- }]
288
- },
289
- options: {
290
- legend: {
291
- display: false
292
- },
293
- events: [],
294
- animation: {
295
- easing: 'easeOutBounce'
296
- },
297
- tooltips: {
298
- enabled: false
299
- },
300
- responsive: false
301
- }
302
- } );
303
- } );
304
-
305
- this.charts.files.donuts = donuts;
306
- },
307
-
308
- /*
309
- * Share Chart.
310
- * Used for the chart in the share box.
311
- */
312
- drawShareChart: function () {
313
- var value;
314
-
315
- if ( ! this.charts.share.canvas ) {
316
- this.charts.share.canvas = d.getElementById( 'imagify-ac-chart' );
317
-
318
- if ( ! this.charts.share.canvas ) {
319
- return;
320
- }
321
- }
322
-
323
- value = parseInt( $( this.charts.share.canvas ).closest( '.imagify-ac-chart' ).attr( 'data-percent' ), 10 );
324
-
325
- if ( this.charts.share.donut ) {
326
- // Update existing donut.
327
- this.charts.share.donut.data.datasets[0].data[0] = value;
328
- this.charts.share.donut.data.datasets[0].data[1] = 100 - value;
329
- this.charts.share.donut.update();
330
- return;
331
- }
332
-
333
- // Create new donut.
334
- this.charts.share.donut = new w.imagify.Chart( this.charts.share.canvas, {
335
- type: 'doughnut',
336
- data: {
337
- datasets: [{
338
- data: [ value, 100 - value ],
339
- backgroundColor: [ '#40B1D0', '#FFFFFF' ],
340
- borderWidth: 0
341
- }]
342
- },
343
- options: {
344
- legend: {
345
- display: false
346
- },
347
- events: [],
348
- animation: {
349
- easing: 'easeOutBounce'
350
- },
351
- tooltips: {
352
- enabled: false
353
- },
354
- responsive: false,
355
- cutoutPercentage: 70
356
- }
357
- } );
358
- },
359
-
360
- /*
361
- * Get the URL used for ajax requests.
362
- *
363
- * @param {string} action An ajax action, or part of it.
364
- * @param {object} item The current item.
365
- * @return {string}
366
- */
367
- getAjaxUrl: function ( action, item ) {
368
- var camelGroupID = item.groupId.replace( /[\s_-](\S)/g, function( c, l ) {
369
- return l.toUpperCase();
370
- } );
371
-
372
- action = action.replace( '%GROUP_ID%', camelGroupID );
373
- action = imagifyBulk.ajaxActions[ action ];
374
-
375
- return ajaxurl + w.imagify.concat + '_wpnonce=' + imagifyBulk.ajaxNonce + '&optimization_level=' + item.level + '&action=' + action + '&folder_type=' + item.groupId;
376
- },
377
-
378
- /**
379
- * Get folder types used in the page.
380
- *
381
- * @return {array}
382
- */
383
- getFolderTypes: function () {
384
- if ( ! w.imagify.bulk.folderTypes.length ) {
385
- $( '.imagify-row-folder-type' ).each( function() {
386
- var $this = $( this ),
387
- groupID = $this.data( 'group-id' );
388
-
389
- if ( 'library' === groupID ) {
390
- groupID += '|' + $this.data( 'context' );
391
- }
392
-
393
- w.imagify.bulk.folderTypes.push( groupID );
394
- } );
395
- }
396
-
397
- return w.imagify.bulk.folderTypes;
398
- },
399
-
400
- /*
401
- * Get the message displayed to the user when (s)he leaves the page.
402
- *
403
- * @return {string}
404
- */
405
- getConfirmMessage: function () {
406
- return imagifyBulk.labels.processing;
407
- },
408
-
409
- /*
410
- * Close the given optimization level selector.
411
- *
412
- * @param {object} $lists A jQuery object.
413
- * @param {int} timer Timer in ms to close the selector.
414
- */
415
- closeLevelSelector: function ( $lists, timer ) {
416
- if ( ! $lists || ! $lists.length ) {
417
- return;
418
- }
419
-
420
- if ( undefined !== timer && timer > 0 ) {
421
- w.setTimeout( function() {
422
- w.imagify.bulk.closeLevelSelector( $lists );
423
- }, timer );
424
- return;
425
- }
426
-
427
- $lists.attr( 'aria-hidden', 'true' );
428
- },
429
-
430
- /*
431
- * Stop everything and update the current item status as an error.
432
- *
433
- * @param {string} errorId An error ID.
434
- * @param {object} item The current item.
435
- */
436
- stopProcess: function ( errorId, item ) {
437
- this.processIsStopped = true;
438
-
439
- w.imagify.bulk.status[ item.groupId ] = {
440
- isError: true,
441
- id: errorId
442
- };
443
-
444
- $( w ).trigger( 'queueEmpty.imagify' );
445
- },
446
-
447
- /*
448
- * Tell if we have a blocking error. Can also display an error message in a swal.
449
- *
450
- * @param {bool} displayErrorMessage False to not display any error message.
451
- * @return {bool}
452
- */
453
- hasBlockingError: function ( displayErrorMessage ) {
454
- displayErrorMessage = undefined !== displayErrorMessage && displayErrorMessage;
455
-
456
- if ( imagifyBulk.curlMissing ) {
457
- if ( displayErrorMessage ) {
458
- w.imagify.bulk.displayError( {
459
- html: imagifyBulk.labels.curlMissing
460
- } );
461
- }
462
- return true;
463
- }
464
-
465
- if ( imagifyBulk.editorMissing ) {
466
- if ( displayErrorMessage ) {
467
- w.imagify.bulk.displayError( {
468
- html: imagifyBulk.labels.editorMissing
469
- } );
470
- }
471
- return true;
472
- }
473
-
474
- if ( imagifyBulk.extHttpBlocked ) {
475
- if ( displayErrorMessage ) {
476
- w.imagify.bulk.displayError( {
477
- html: imagifyBulk.labels.extHttpBlocked
478
- } );
479
- }
480
- return true;
481
- }
482
-
483
- if ( imagifyBulk.apiDown ) {
484
- if ( displayErrorMessage ) {
485
- w.imagify.bulk.displayError( {
486
- html: imagifyBulk.labels.apiDown
487
- } );
488
- }
489
- return true;
490
- }
491
-
492
- if ( ! imagifyBulk.keyIsValid ) {
493
- if ( displayErrorMessage ) {
494
- w.imagify.bulk.displayError( {
495
- title: imagifyBulk.labels.invalidAPIKeyTitle,
496
- type: 'info'
497
- } );
498
- }
499
- return true;
500
- }
501
-
502
- if ( imagifyBulk.isOverQuota ) {
503
- if ( displayErrorMessage ) {
504
- w.imagify.bulk.displayError( {
505
- title: imagifyBulk.labels.overQuotaTitle,
506
- html: $( '#tmpl-imagify-overquota-alert' ).html(),
507
- type: 'info',
508
- customClass: 'imagify-swal-has-subtitle imagify-swal-error-header',
509
- showConfirmButton: false
510
- } );
511
- }
512
- return true;
513
- }
514
-
515
- return false;
516
- },
517
-
518
- /*
519
- * Display an error message in a modal.
520
- *
521
- * @param {string} title The modal title.
522
- * @param {string} text The modal text.
523
- * @param {object} args Other less common args.
524
- */
525
- displayError: function ( title, text, args ) {
526
- var def = {
527
- title: '',
528
- html: '',
529
- type: 'error',
530
- customClass: '',
531
- width: 620,
532
- padding: 0,
533
- showCloseButton: true,
534
- showConfirmButton: true
535
- };
536
-
537
- if ( $.isPlainObject( title ) ) {
538
- args = $.extend( {}, def, title );
539
- } else {
540
- args = args || {};
541
- args = $.extend( {}, def, {
542
- title: title || '',
543
- html: text || ''
544
- }, args );
545
- }
546
-
547
- args.title = args.title || imagifyBulk.labels.error;
548
- args.customClass += ' imagify-sweet-alert';
549
-
550
- swal( args ).catch( swal.noop );
551
- },
552
-
553
- /*
554
- * Display an error message in a file row.
555
- *
556
- * @param {function} $row The row template.
557
- * @param {string} text The error text.
558
- * @return {element} The row jQuery element.
559
- */
560
- displayErrorInRow: function ( $row, text ) {
561
- var $toReplace, colspan;
562
-
563
- $row = $( $row() );
564
- $toReplace = $row.find( '.imagify-cell-status ~ td' );
565
- colspan = $toReplace.length;
566
- text = text || '';
567
-
568
- $toReplace.remove();
569
- $row.find( '.imagify-cell-status' ).after( '<td colspan="' + colspan + '">' + text + '</td>' );
570
-
571
- return $row;
572
- },
573
-
574
- /*
575
- * Display one of the 3 "folder" rows.
576
- *
577
- * @param {string} state One of the 3 states: 'resting' (it's the "normal" row), 'waiting' (waiting for other optimizations to finish), and 'working'.
578
- * @param {element} $row jQuery element of the "normal" row.
579
- */
580
- displayFolderRow: function ( state, $row ) {
581
- var $newRow, spinnerTemplate, spinnerColor, text;
582
-
583
- if ( 'resting' === state ) {
584
- $row.next( '.imagify-row-waiting, .imagify-row-working' ).remove();
585
- $row.imagifyShow();
586
- return;
587
- }
588
-
589
- // This part won't work to display multiple $newRow.
590
- $newRow = $row.next( '.imagify-row-waiting, .imagify-row-working' );
591
-
592
- if ( 'waiting' === state ) {
593
- spinnerColor = '#d2d3d6';
594
- text = imagifyBulk.labels.waitingOtimizationsText;
595
- } else {
596
- spinnerColor = '#40b1d0';
597
- text = imagifyBulk.labels.imagesOptimizedText.replace( '%s', '<span>0</span>' );
598
- }
599
-
600
- if ( $newRow.length ) {
601
- if ( ! $newRow.hasClass( 'imagify-row-' + state ) ) {
602
- // Should happen when switching from 'waiting' to 'working'.
603
- $newRow.attr( 'class', 'imagify-row-' + state );
604
- $newRow.find( '.imagify-cell-checkbox svg' ).attr( 'fill', spinnerColor );
605
- $newRow.children( '.imagify-cell-images-optimized' ).html( text );
606
- }
607
-
608
- $row.imagifyHide();
609
- $newRow.imagifyShow();
610
- return;
611
- }
612
-
613
- // Build the new row, based on a clone of the original one.
614
- $newRow = $row.clone().attr( {
615
- 'class': 'imagify-row-' + state,
616
- 'aria-hidden': 'false'
617
- } );
618
-
619
- spinnerTemplate = w.imagify.template( 'imagify-spinner' );
620
- $newRow.children( '.imagify-cell-checkbox' ).html( spinnerTemplate() ).find( 'svg' ).attr( 'fill', spinnerColor );
621
- $newRow.children( '.imagify-cell-title' ).html( '<span class="imagify-cell-label">' + $newRow.children( '.imagify-cell-title' ).text() + '</span>' );
622
- $newRow.children( '.imagify-cell-images-optimized' ).html( text );
623
- $newRow.children( '.imagify-cell-errors, .imagify-cell-optimized, .imagify-cell-original, .imagify-cell-level' ).text( '' );
624
-
625
- $row.imagifyHide().after( $newRow );
626
- },
627
-
628
- /*
629
- * Display the share box.
630
- */
631
- displayShareBox: function () {
632
- var text2share = imagifyBulk.labels.textToShare,
633
- percent, gainHuman, originalSizeHuman,
634
- $complete;
635
-
636
- if ( ! this.globalGain || this.queue.length ) {
637
- this.globalGain = 0;
638
- this.globalOriginalSize = 0;
639
- this.globalOptimizedSize = 0;
640
- return;
641
- }
642
-
643
- percent = ( 100 - 100 * ( this.globalOptimizedSize / this.globalOriginalSize ) ).toFixed( 2 );
644
- gainHuman = w.imagify.humanSize( this.globalGain, 1 );
645
- originalSizeHuman = w.imagify.humanSize( this.globalOriginalSize, 1 );
646
-
647
- text2share = text2share.replace( '%1$s', gainHuman );
648
- text2share = text2share.replace( '%2$s', originalSizeHuman );
649
- text2share = encodeURIComponent( text2share );
650
-
651
- $complete = $( '.imagify-row-complete' );
652
- $complete.find( '.imagify-ac-rt-total-gain' ).html( gainHuman );
653
- $complete.find( '.imagify-ac-rt-total-original' ).html( originalSizeHuman );
654
- $complete.find( '.imagify-ac-chart' ).attr( 'data-percent', percent );
655
- $complete.find( '.imagify-sn-twitter' ).attr( 'href', imagifyBulk.labels.twitterShareURL + '&amp;text=' + text2share );
656
-
657
- // Chart.
658
- this.drawShareChart();
659
-
660
- $complete.addClass( 'done' ).imagifyShow();
661
-
662
- $( 'html, body' ).animate( {
663
- scrollTop: $complete.offset().top
664
- }, 200 );
665
-
666
- // Reset the stats.
667
- this.globalGain = 0;
668
- this.globalOriginalSize = 0;
669
- this.globalOptimizedSize = 0;
670
- },
671
-
672
- /**
673
- * Print optimization stats.
674
- *
675
- * @param {object} data Object containing all Heartbeat IDs.
676
- */
677
- updateStats: function ( data ) {
678
- var donutData;
679
-
680
- if ( ! data || ! $.isPlainObject( data ) ) {
681
- return;
682
- }
683
-
684
- if ( w.imagify.bulk.charts.overview.donut.data ) {
685
- donutData = w.imagify.bulk.charts.overview.donut.data.datasets[0].data;
686
-
687
- if ( data.unoptimized_attachments === donutData[0] && data.optimized_attachments === donutData[1] && data.errors_attachments === donutData[2] ) {
688
- return;
689
- }
690
- }
691
-
692
- /**
693
- * User account.
694
- */
695
- data.unconsumed_quota = data.unconsumed_quota.toFixed( 1 ); // A mystery where a float rounded on php side is not rounded here anymore. JavaScript is fun, it always surprises you in a manner you didn't expect.
696
- $( '.imagify-meteo-icon' ).html( data.quota_icon );
697
- $( '.imagify-unconsumed-percent' ).html( data.unconsumed_quota + '%' );
698
- $( '.imagify-unconsumed-bar' ).css( 'width', data.unconsumed_quota + '%' ).parent().attr( 'class', data.quota_class );
699
-
700
- /**
701
- * Global chart.
702
- */
703
- $( '#imagify-overview-chart-percent' ).html( data.optimized_attachments_percent + '<span>%</span>' );
704
- $( '.imagify-total-percent' ).html( data.optimized_attachments_percent + '%' );
705
-
706
- w.imagify.bulk.drawOverviewChart( [
707
- data.unoptimized_attachments,
708
- data.optimized_attachments,
709
- data.errors_attachments
710
- ] );
711
-
712
- /**
713
- * Stats block.
714
- */
715
- // The total optimized images.
716
- $( '#imagify-total-optimized-attachments' ).html( data.already_optimized_attachments );
717
-
718
- // The original bar.
719
- $( '#imagify-original-bar' ).find( '.imagify-barnb' ).html( data.original_human );
720
-
721
- // The optimized bar.
722
- $( '#imagify-optimized-bar' ).css( 'width', ( 100 - data.optimized_percent ) + '%' ).find( '.imagify-barnb' ).html( data.optimized_human );
723
-
724
- // The Percent data.
725
- $( '#imagify-total-optimized-attachments-pct' ).html( data.optimized_percent + '%' );
726
- },
727
-
728
- // Event callbacks =========================================================================
729
-
730
- /*
731
- * Optimization level selector: on button click, open the dropdown and focus the current radio input.
732
- * The dropdown must be open or the focus event won't be triggered.
733
- *
734
- * @param {object} e jQuery's Event object.
735
- */
736
- openLevelSelectorFromButton: function ( e ) {
737
- var $list = $( '#' + $( this ).attr( 'aria-controls' ) );
738
- // Stop click event from bubbling: this will allow to close the selector list if anything else id clicked.
739
- e.stopPropagation();
740
- // Close other lists.
741
- $( '.imagify-level-selector-list' ).not( $list ).attr( 'aria-hidden', 'true' );
742
- // Open the corresponding list and focus the radio.
743
- $list.attr( 'aria-hidden', 'false' ).find( ':checked' ).trigger( 'focus.imagify' );
744
- },
745
-
746
- /*
747
- * Optimization level selector: on radio change, make the row "current" and update the button text.
748
- */
749
- syncLevelSelectorFromRadio: function () {
750
- var $row = $( this ).closest( '.imagify-level-choice' );
751
- // Update rows attributes.
752
- $row.addClass( 'imagify-current-level' ).attr( 'aria-current', 'true' ).siblings( '.imagify-level-choice' ).removeClass( 'imagify-current-level' ).attr( 'aria-current', 'false' );
753
- // Change the button text.
754
- $row.closest( '.imagify-level-selector' ).find( '.imagify-current-level-info' ).html( $row.find( 'label' ).html() );
755
- },
756
-
757
- /*
758
- * Optimization level selector: on Escape or Enter kaystroke, close the dropdown.
759
- *
760
- * @param {object} e jQuery's Event object.
761
- */
762
- closeLevelSelectors: function ( e ) {
763
- if ( 'keypress' === e.type && 27 !== e.keyCode && 13 !== e.keyCode ) {
764
- return;
765
- }
766
- w.imagify.bulk.closeLevelSelector( $( '.imagify-level-selector-list[aria-hidden="false"]' ) );
767
- },
768
-
769
- /*
770
- * Enable or disable the Optimization button depending on the checked checkboxes.
771
- * Also, if there is only 1 checkbox in the page, don't allow it to be unchecked.
772
- */
773
- toggleOptimizationButton: function () {
774
- // Prevent uncheck if there is only one checkbox.
775
- if ( ! w.imagify.bulk.hasMultipleRows && ! this.checked ) {
776
- $( this ).prop( 'checked', true );
777
- return;
778
- }
779
-
780
- // Enable or disable the Optimization button.
781
- if ( $( '.imagify-bulk-table [name="group[]"]:checked' ).length ) {
782
- $( '#imagify-bulk-action' ).removeAttr( 'disabled' );
783
- } else {
784
- $( '#imagify-bulk-action' ).attr( 'disabled', 'disabled' );
785
- }
786
- },
787
-
788
- /*
789
- * Display/Hide optimization details.
790
- *
791
- * @param {object} e jQuery's Event object.
792
- */
793
- toggleOptimizationDetails: function ( e ) {
794
- var $button = $( this ),
795
- $details = $button.closest( '.imagify-bulk-table' ).find( '.imagify-bulk-table-details' ),
796
- openDetails;
797
-
798
- if ( 'open' === e.type ) {
799
- openDetails = true;
800
- } else if ( 'close' === e.type ) {
801
- openDetails = false;
802
- } else {
803
- openDetails = $details.hasClass( 'hidden' );
804
- }
805
-
806
- if ( openDetails ) {
807
- $button.html( $button.data( 'label-hide' ) + '<span class="dashicons dashicons-no-alt"></span>' );
808
- $details.imagifyShow();
809
- } else {
810
- $button.html( $button.data( 'label-show' ) + '<span class="dashicons dashicons-menu"></span>' );
811
- $details.imagifyHide();
812
- }
813
- },
814
-
815
- /*
816
- * Maybe display a modal, then launch all processes.
817
- */
818
- maybeLaunchAllProcesses: function () {
819
- var $infosModal;
820
-
821
- if ( $( this ).attr( 'disabled' ) ) {
822
- return;
823
- }
824
-
825
- if ( ! $( '.imagify-bulk-table [name="group[]"]:checked' ).length ) {
826
- return;
827
- }
828
-
829
- if ( w.imagify.bulk.hasBlockingError( true ) ) {
830
- return;
831
- }
832
-
833
- $infosModal = $( '#tmpl-imagify-bulk-infos' );
834
-
835
- if ( $infosModal.length ) {
836
- // Swal Information before loading the optimize process.
837
- swal( {
838
- title: imagifyBulk.labels.bulkInfoTitle,
839
- html: $infosModal.html(),
840
- type: '',
841
- customClass: 'imagify-sweet-alert imagify-swal-has-subtitle imagify-before-bulk-infos',
842
- showCancelButton: true,
843
- padding: 0,
844
- width: 554,
845
- confirmButtonText: imagifyBulk.labels.confirmBulk,
846
- cancelButtonText: imagifySwal.labels.cancelButtonText,
847
- reverseButtons: true
848
- } ).then( function() {
849
- var $row = $( '.imagify-bulk-table [name="group[]"]:checked' ).first().closest( '.imagify-row-folder-type' ),
850
- groupId = $row.data( 'group-id' ),
851
- context = $row.data( 'context' );
852
-
853
- $.get( ajaxurl + w.imagify.concat + '_wpnonce=' + imagifyBulk.ajaxNonce + '&action=' + imagifyBulk.ajaxActions.bulkInfoSeen + '&folder_type=' + groupId + '&context=' + context );
854
- $infosModal.remove();
855
-
856
- w.imagify.bulk.launchAllProcesses();
857
- } ).catch( swal.noop );
858
- } else {
859
- w.imagify.bulk.launchAllProcesses();
860
- }
861
- },
862
-
863
- /*
864
- * Build the queue and launch all processes.
865
- */
866
- launchAllProcesses: function () {
867
- var $w = $( w ),
868
- $button = $( '#imagify-bulk-action' ),
869
- skip = true;
870
-
871
- // Disable the button.
872
- $button.attr( 'disabled', 'disabled' ).find( '.dashicons' ).addClass( 'rotate' );
873
-
874
- // Add a message to be displayed when the user wants to quit the page.
875
- $w.on( 'beforeunload', this.getConfirmMessage );
876
-
877
- // Hide the "Complete" message.
878
- $( '.imagify-row-complete' ).imagifyHide( 200, function() {
879
- $( this ).removeClass( 'done' );
880
- } );
881
-
882
- // Close the optimization details.
883
- $( '.imagify-show-table-details' ).trigger( 'close.imagify' );
884
-
885
- // Make sure to reset properties.
886
- this.queue = [];
887
- this.status = {};
888
- this.displayedWaitMessage = false;
889
- this.processIsStopped = false;
890
- this.globalGain = 0;
891
- this.globalOriginalSize = 0;
892
- this.globalOptimizedSize = 0;
893
-
894
- $( '.imagify-bulk-table [name="group[]"]:checked' ).each( function() {
895
- var $checkbox = $( this ),
896
- $row = $checkbox.closest( '.imagify-row-folder-type' ),
897
- groupId = $row.data( 'group-id' ),
898
- context = $row.data( 'context' ),
899
- level = $row.find( '.imagify-cell-level [name="level[' + groupId + ']"]:checked' ).val();
900
-
901
- // Build the queue.
902
- w.imagify.bulk.queue.push( {
903
- groupId: groupId,
904
- context: context,
905
- level: undefined === level ? -1 : parseInt( level, 10 )
906
- } );
907
-
908
- // Set the status.
909
- w.imagify.bulk.status[ groupId ] = {
910
- isError: false,
911
- id: 'waiting'
912
- };
913
-
914
- // Display a "waiting" message + spinner into the folder rows.
915
- if ( skip ) {
916
- // No need to do that for the first one, we'll display a "working" row instead.
917
- skip = false;
918
- return true;
919
- }
920
-
921
- // Display the "waiting" folder row and hide the "normal" one.
922
- w.imagify.bulk.displayFolderRow( 'waiting', $row );
923
- } );
924
-
925
- // Process the queue.
926
- $w.trigger( 'processQueue.imagify' );
927
- },
928
-
929
- /*
930
- * Process the first item in the queue.
931
- */
932
- processQueue: function () {
933
- var $row, item;
934
-
935
- if ( w.imagify.bulk.processIsStopped ) {
936
- return;
937
- }
938
-
939
- if ( ! w.imagify.bulk.queue.length ) {
940
- $( w ).trigger( 'queueEmpty.imagify' );
941
- return;
942
- }
943
-
944
- if ( ! w.imagify.bulk.displayedWaitMessage ) {
945
- // Display an alert to wait.
946
- swal( {
947
- title: imagifyBulk.labels.waitTitle,
948
- html: imagifyBulk.labels.waitText,
949
- showConfirmButton: false,
950
- padding: 0,
951
- imageUrl: imagifyBulk.waitImageUrl,
952
- customClass: 'imagify-sweet-alert'
953
- } ).catch( swal.noop );
954
- w.imagify.bulk.displayedWaitMessage = true;
955
- }
956
-
957
- /**
958
- * Fetch files for the first folder type in the queue.
959
- */
960
- item = w.imagify.bulk.queue.shift();
961
- $row = $( '#cb-select-' + item.groupId ).closest( '.imagify-row-folder-type' );
962
-
963
- // Update status.
964
- w.imagify.bulk.status[ item.groupId ].id = 'fetching';
965
-
966
- // Display the "working" folder row and hide the "normal" one.
967
- w.imagify.bulk.displayFolderRow( 'working', $row );
968
-
969
- // Fetch image IDs.
970
- $.get( w.imagify.bulk.getAjaxUrl( '%GROUP_ID%Fetch', item ) )
971
- .done( function( response ) {
972
- if ( w.imagify.bulk.processIsStopped ) {
973
- return;
974
- }
975
-
976
- swal.close();
977
-
978
- // Success.
979
- if ( response.success && ( $.isArray( response.data ) || $.isPlainObject( response.data ) ) ) { // Array if empty, object otherwize.
980
- if ( ! $.isEmptyObject( response.data ) ) {
981
- // Optimize the files.
982
- $( w ).trigger( 'optimizeFiles.imagify', [ item, response.data ] );
983
- return;
984
- }
985
-
986
- // No images.
987
- w.imagify.bulk.status[ item.groupId ].id = 'no-images';
988
-
989
- if ( ! w.imagify.bulk.processIsStopped ) {
990
- if ( w.imagify.bulk.hasMultipleRows ) {
991
- $( '#cb-select-' + item.groupId ).prop( 'checked', false );
992
- }
993
-
994
- if ( ! w.imagify.bulk.queue.length ) {
995
- $( w ).trigger( 'queueEmpty.imagify' );
996
- return;
997
- }
998
-
999
- // Reset the folder row.
1000
- w.imagify.bulk.displayFolderRow( 'resting', $row );
1001
-
1002
- $( w ).trigger( 'processQueue.imagify' );
1003
- }
1004
- return;
1005
- }
1006
-
1007
- // Error.
1008
- w.imagify.bulk.stopProcess( response.data.message, item );
1009
- } )
1010
- .fail( function() {
1011
- // Error.
1012
- w.imagify.bulk.stopProcess( 'get-unoptimized-images', item );
1013
- } );
1014
- },
1015
-
1016
- /*
1017
- * Optimize files.
1018
- *
1019
- * @param {object} e jQuery's Event object.
1020
- * @param {object} item Current item (from the queue).
1021
- * @param {object} files A list of file IDs (key) and URLs (values).
1022
- */
1023
- optimizeFiles: function ( e, item, files ) {
1024
- var $row = $( '#cb-select-' + item.groupId ).closest( '.imagify-row-folder-type' ),
1025
- $workingRow = $row.next( '.imagify-row-working' ),
1026
- $optimizedCount = $workingRow.find( '.imagify-cell-images-optimized span' ),
1027
- optimizedCount = parseInt( $optimizedCount.text(), 10 ),
1028
- $errorsCount = $workingRow.find( '.imagify-cell-errors span' ),
1029
- errorsCount = parseInt( $errorsCount.text(), 10 ),
1030
- $table = $row.closest( '.imagify-bulk-table' ),
1031
- $progressBar = $table.find( '.imagify-row-progress' ),
1032
- $progress = $progressBar.find( '.bar' ),
1033
- defaultsTemplate = {
1034
- groupId: item.groupId,
1035
- id: 0,
1036
- thumbnail: '', // Image src.
1037
- filename: '',
1038
- status: '',
1039
- icon: '',
1040
- label: '',
1041
- thumbnails: '',
1042
- original_size_human: '',
1043
- new_size_human: '',
1044
- chartSuffix: '',
1045
- percent_human: '',
1046
- overall_saving_human: ''
1047
- },
1048
- Optimizer, $resultsContainer;
1049
-
1050
- if ( w.imagify.bulk.processIsStopped ) {
1051
- return;
1052
- }
1053
-
1054
- // Update folder status.
1055
- w.imagify.bulk.status[ item.groupId ].id = 'optimizing';
1056
-
1057
- // Fill in the result table header.
1058
- $table.find( '.imagify-bulk-table-details thead' ).html( $( '#tmpl-imagify-file-header-' + item.groupId ).html() );
1059
-
1060
- // Empty the result table body.
1061
- $resultsContainer = $table.find( '.imagify-bulk-table-details tbody' ).text( '' );
1062
-
1063
- // Reset and display the progress bar.
1064
- $progress.css( 'width', '0%' ).find( '.percent' ).text( '0%' );
1065
- $progressBar.slideDown().attr( 'aria-hidden', 'false' );
1066
-
1067
- // Optimize the files.
1068
- Optimizer = new ImagifyGulp( {
1069
- 'buffer_size': imagifyBulk.bufferSizes[ item.context ] || 1,
1070
- 'lib': w.imagify.bulk.getAjaxUrl( '%GROUP_ID%Optimize', item ),
1071
- 'images': files,
1072
- 'context': item.context
1073
- } );
1074
-
1075
- // Before the attachment optimization, add a file row displaying the optimization process.
1076
- Optimizer.before( function( data ) {
1077
- var template = w.imagify.template( 'imagify-file-row-' + item.groupId );
1078
-
1079
- $resultsContainer.prepend( template( $.extend( {}, defaultsTemplate, {
1080
- status: 'compressing',
1081
- icon: 'admin-generic rotate',
1082
- label: imagifyBulk.labels.optimizing,
1083
- chartSuffix: data.image_id
1084
- }, data ) ) );
1085
- } );
1086
-
1087
- // After the attachment optimization.
1088
- Optimizer.each( function( data ) {
1089
- var template = w.imagify.template( 'imagify-file-row-' + item.groupId ),
1090
- $fileRow = $( '#' + item.groupId + '-' + data.image );
1091
-
1092
- // Update the progress bar.
1093
- $progress.css( 'width', data.progress + '%' ).find( '.percent' ).html( data.progress + '%' );
1094
-
1095
- if ( data.success ) {
1096
- // Image successfully optimized.
1097
- $fileRow.replaceWith( template( $.extend( {}, defaultsTemplate, {
1098
- status: 'complete',
1099
- icon: 'yes',
1100
- label: imagifyBulk.labels.complete,
1101
- chartSuffix: data.image
1102
- }, data ) ) );
1103
-
1104
- w.imagify.bulk.drawFileChart( $( '#' + item.groupId + '-' + data.image ).find( '.imagify-cell-percentage canvas' ) ); // Don't use $fileRow, its DOM is not refreshed with the new values.
1105
-
1106
- // Update the optimized images counter.
1107
- optimizedCount += 1;
1108
- $optimizedCount.text( optimizedCount );
1109
- return;
1110
- }
1111
-
1112
- if ( 'already-optimized' === data.error_code ) {
1113
- // The image was already optimized.
1114
- $fileRow.replaceWith( w.imagify.bulk.displayErrorInRow( template( $.extend( {}, defaultsTemplate, {
1115
- status: 'complete',
1116
- icon: 'yes',
1117
- label: imagifyBulk.labels.alreadyOptimized,
1118
- chartSuffix: data.image
1119
- }, data ) ), data.error ) );
1120
-
1121
- // Update the optimized images counter.
1122
- optimizedCount += 1;
1123
- $optimizedCount.text( optimizedCount );
1124
- return;
1125
- }
1126
-
1127
- // Display the error in the file row.
1128
- $fileRow.replaceWith( w.imagify.bulk.displayErrorInRow( template( $.extend( {}, defaultsTemplate, {
1129
- status: 'error',
1130
- icon: 'dismiss',
1131
- label: imagifyBulk.labels.error,
1132
- chartSuffix: data.image
1133
- }, data ) ), data.error || data ) );
1134
-
1135
- // Update the "working" folder row.
1136
- if ( ! $errorsCount.length ) {
1137
- errorsCount = 1;
1138
- $errorsCount = $workingRow.find( '.imagify-cell-errors' ).html( imagifyBulk.labels.imagesErrorText.replace( '%s', '<span>1</span>' ) ).find( 'span' );
1139
- } else {
1140
- errorsCount += 1;
1141
- $errorsCount.text( errorsCount );
1142
- }
1143
-
1144
- if ( 'over-quota' === data.error_code ) {
1145
- // No more data, stop everything.
1146
- Optimizer.stopProcess();
1147
- w.imagify.bulk.stopProcess( data.error_code, item );
1148
- }
1149
- } );
1150
-
1151
- // After all image optimizations.
1152
- Optimizer.done( function( data ) {
1153
- // Uncheck the checkbox.
1154
- if ( w.imagify.bulk.hasMultipleRows ) {
1155
- $( '#cb-select-' + item.groupId ).prop( 'checked', false );
1156
- }
1157
-
1158
- if ( data.global_original_size ) {
1159
- w.imagify.bulk.globalGain += parseInt( data.global_gain, 10 );
1160
- w.imagify.bulk.globalOriginalSize += parseInt( data.global_original_size, 10 );
1161
- w.imagify.bulk.globalOptimizedSize += parseInt( data.global_optimized_size, 10 );
1162
- }
1163
-
1164
- if ( w.imagify.bulk.processIsStopped ) {
1165
- return;
1166
- }
1167
-
1168
- // Update folder type status.
1169
- if ( ! w.imagify.bulk.status[ item.groupId ].isError ) {
1170
- w.imagify.bulk.status[ item.groupId ].id = 'done';
1171
- }
1172
-
1173
- // Update the folder row.
1174
- $row.addClass( 'updating' );
1175
-
1176
- $.get( w.imagify.bulk.getAjaxUrl( 'getFolderData', item ) )
1177
- .done( function( response ) {
1178
- if ( response.success ) {
1179
- $.each( response.data, function( dataName, dataHtml ) {
1180
- $row.children( '.imagify-cell-' + dataName ).html( dataHtml );
1181
- } );
1182
- }
1183
- w.imagify.bulk.displayFolderRow( 'resting', $row );
1184
- } )
1185
- .always( function() {
1186
- $row.removeClass( 'updating' );
1187
-
1188
- if ( ! w.imagify.bulk.queue.length ) {
1189
- $( w ).trigger( 'queueEmpty.imagify' );
1190
- } else {
1191
- $( w ).trigger( 'processQueue.imagify' );
1192
- }
1193
- } );
1194
- } );
1195
-
1196
- // Run.
1197
- Optimizer.run();
1198
- },
1199
-
1200
- /*
1201
- * End.
1202
- */
1203
- queueEmpty: function () {
1204
- var $tables = $( '.imagify-bulk-table' ),
1205
- errorArgs = {},
1206
- hasError = false,
1207
- noImages = true;
1208
-
1209
- // Display the share box.
1210
- w.imagify.bulk.displayShareBox();
1211
-
1212
- // Reset the queue.
1213
- w.imagify.bulk.queue = [];
1214
-
1215
- // Fetch and display generic stats if heartbeat is disabled.
1216
- if ( ! imagifyBulk.heartbeatId ) {
1217
- $.get( ajaxurl, {
1218
- _wpnonce: imagifyBulk.ajaxNonce,
1219
- action: imagifyBulk.ajaxActions.getStats,
1220
- types: w.imagify.bulk.getFolderTypes()
1221
- } )
1222
- .done( function( response ) {
1223
- if ( response.success ) {
1224
- w.imagify.bulk.updateStats( response.data );
1225
- }
1226
- } );
1227
- }
1228
-
1229
- // Maybe display error.
1230
- if ( ! $.isEmptyObject( w.imagify.bulk.status ) ) {
1231
- $.each( w.imagify.bulk.status, function( groupId, typeStatus ) {
1232
- if ( typeStatus.isError ) {
1233
- // One error is enough to display a message.
1234
- hasError = typeStatus.id;
1235
- noImages = false;
1236
- return false;
1237
- }
1238
- if ( 'no-images' !== typeStatus.id ) {
1239
- // All groups must have this ID.
1240
- noImages = false;
1241
- return false;
1242
- }
1243
- } );
1244
-
1245
- if ( hasError ) {
1246
- if ( 'invalid-api-key' === hasError ) {
1247
- errorArgs = {
1248
- title: imagifyBulk.labels.invalidAPIKeyTitle,
1249
- type: 'info'
1250
- };
1251
- }
1252
- else if ( 'over-quota' === hasError ) {
1253
- errorArgs = {
1254
- title: imagifyBulk.labels.overQuotaTitle,
1255
- html: $( '#tmpl-imagify-overquota-alert' ).html(),
1256
- type: 'info',
1257
- customClass: 'imagify-swal-has-subtitle imagify-swal-error-header',
1258
- showConfirmButton: false
1259
- };
1260
- }
1261
- else if ( 'get-unoptimized-images' === hasError || 'consumed-all-data' === hasError ) {
1262
- errorArgs = {
1263
- title: imagifyBulk.labels.getUnoptimizedImagesErrorTitle,
1264
- html: imagifyBulk.labels.getUnoptimizedImagesErrorText,
1265
- type: 'info'
1266
- };
1267
- }
1268
- w.imagify.bulk.displayError( errorArgs );
1269
- }
1270
- else if ( noImages ) {
1271
- w.imagify.bulk.displayError( {
1272
- title: imagifyBulk.labels.noAttachmentToOptimizeTitle,
1273
- html: imagifyBulk.labels.noAttachmentToOptimizeText,
1274
- type: 'info'
1275
- } );
1276
- }
1277
- }
1278
-
1279
- // Reset status.
1280
- w.imagify.bulk.status = {};
1281
-
1282
- // Unlink the message displayed when the user wants to quit the page.
1283
- $( w ).off( 'beforeunload', w.imagify.bulk.getConfirmMessage );
1284
-
1285
- // Display the "normal" folder rows (the values of the last one should being updated via ajax, don't display it for now).
1286
- w.imagify.bulk.displayFolderRow( 'resting', $tables.find( '.imagify-row-folder-type' ).not( '.updating' ) );
1287
-
1288
- // Reset the progress bars.
1289
- $tables.find( '.imagify-row-progress' ).slideUp().attr( 'aria-hidden', 'true' ).find( '.bar' ).removeAttr( 'style' ).find( '.percent' ).text( '0%' );
1290
-
1291
- // Enable (or not) the main button.
1292
- if ( $( '.imagify-bulk-table [name="group[]"]:checked' ).length ) {
1293
- $( '#imagify-bulk-action' ).removeAttr( 'disabled' ).find( '.dashicons' ).removeClass( 'rotate' );
1294
- } else {
1295
- $( '#imagify-bulk-action' ).find( '.dashicons' ).removeClass( 'rotate' );
1296
- }
1297
- },
1298
-
1299
- /**
1300
- * Add our Heartbeat ID on "heartbeat-send" event.
1301
- *
1302
- * @param {object} e Event object.
1303
- * @param {object} data Object containing all Heartbeat IDs.
1304
- */
1305
- addHeartbeat: function ( e, data ) {
1306
- data.imagify_ids = data.imagify_ids || {};
1307
- data.imagify_ids[ imagifyBulk.heartbeatId ] = 1;
1308
-
1309
- data.imagify_types = w.imagify.bulk.getFolderTypes();
1310
- },
1311
-
1312
- /**
1313
- * Listen for the custom event "heartbeat-tick" on $(document).
1314
- * It allows to update various data periodically.
1315
- *
1316
- * @param {object} e Event object.
1317
- * @param {object} data Object containing all Heartbeat IDs.
1318
- */
1319
- processHeartbeat: function ( e, data ) {
1320
- if ( data.imagify_bulk_data ) {
1321
- w.imagify.bulk.updateStats( data.imagify_bulk_data );
1322
- }
1323
- },
1324
-
1325
- /**
1326
- * Add our Heartbeat ID for requirements on "heartbeat-send" event.
1327
- *
1328
- * @param {object} e Event object.
1329
- * @param {object} data Object containing all Heartbeat IDs.
1330
- */
1331
- addRequirementsHeartbeat: function ( e, data ) {
1332
- data.imagify_ids = data.imagify_ids || {};
1333
- data.imagify_ids[ imagifyBulk.reqsHeartbeatId ] = 1;
1334
- },
1335
-
1336
- /**
1337
- * Listen for the custom event "heartbeat-tick" on $(document).
1338
- * It allows to update requirements status periodically.
1339
- *
1340
- * @param {object} e Event object.
1341
- * @param {object} data Object containing all Heartbeat IDs.
1342
- */
1343
- processRequirementsHeartbeat: function ( e, data ) {
1344
- if ( ! data.imagify_bulk_requirements ) {
1345
- return;
1346
- }
1347
-
1348
- data = data.imagify_bulk_requirements;
1349
-
1350
- imagifyBulk.curlMissing = data.curl_missing;
1351
- imagifyBulk.editorMissing = data.editor_missing;
1352
- imagifyBulk.extHttpBlocked = data.external_http_blocked;
1353
- imagifyBulk.apiDown = data.api_down;
1354
- imagifyBulk.keyIsValid = data.key_is_valid;
1355
- imagifyBulk.isOverQuota = data.is_over_quota;
1356
- },
1357
-
1358
- /**
1359
- * Open a popup window when the user clicks on a share link.
1360
- *
1361
- * @param {object} e jQuery Event object.
1362
- */
1363
- share: function ( e ) {
1364
- var width = 700,
1365
- height = 290,
1366
- clientLeft, clientTop;
1367
-
1368
- e.preventDefault();
1369
-
1370
- if ( w.innerWidth ) {
1371
- clientLeft = ( w.innerWidth - width ) / 2;
1372
- clientTop = ( w.innerHeight - height ) / 2;
1373
- } else {
1374
- clientLeft = ( d.body.clientWidth - width ) / 2;
1375
- clientTop = ( d.body.clientHeight - height ) / 2;
1376
- }
1377
-
1378
- w.open( this.href, '', 'status=no, scrollbars=no, menubar=no, top=' + clientTop + ', left=' + clientLeft + ', width=' + width + ', height=' + height );
1379
- }
1380
- };
1381
-
1382
- w.imagify.bulk.init();
1383
-
1384
- } )(jQuery, document, window);
1
+ !function(a,b){var c=a.propHooks.checked;a.propHooks.checked={set:function(b,d,e){var f;return f=void 0===c?b[e]=d:c(b,d,e),a(b).trigger("change.imagify"),f}},a.fn.imagifyHide=function(b,c){return b&&b>0?this.hide(b,function(){a(this).addClass("hidden").css("display",""),void 0!==c&&c()}):(this.addClass("hidden"),void 0!==c&&c()),this.attr("aria-hidden","true")},a.fn.imagifyShow=function(b,c){return void 0!==c&&c(),b&&b>0?this.show(b,function(){a(this).removeClass("hidden").css("display","")}):this.removeClass("hidden"),this.attr("aria-hidden","false")}}(jQuery),function(a,b,c,d){c.imagify.bulk={charts:{overview:{canvas:!1,donut:!1,data:{labels:[imagifyBulk.labels.overviewChartLabels.unoptimized,imagifyBulk.labels.overviewChartLabels.optimized,imagifyBulk.labels.overviewChartLabels.error],datasets:[{data:[],backgroundColor:["#10121A","#46B1CE","#C51162"],borderWidth:0}]}},files:{donuts:{}},share:{canvas:!1,donut:!1}},queue:[],status:{},displayedWaitMessage:!1,hasMultipleRows:!0,processIsStopped:!1,globalGain:0,globalOriginalSize:0,globalOptimizedSize:0,folderTypes:[],init:function(){this.drawOverviewChart(),this.hasMultipleRows=a('.imagify-bulk-table [name="group[]"]').length>1,a(".imagify-level-selector-button").on("click.imagify",this.openLevelSelectorFromButton),a(".imagify-level-selector-list input").on("change.imagify init.imagify",this.syncLevelSelectorFromRadio).filter(":checked").trigger("init.imagify"),a(b).on("keypress.imagify click.imagify",this.closeLevelSelectors),a('.imagify-bulk-table [name="group[]"]').on("change.imagify init.imagify",this.toggleOptimizationButton).trigger("init.imagify"),a(".imagify-show-table-details").on("click.imagify open.imagify close.imagify",this.toggleOptimizationDetails),a("#imagify-bulk-action").on("click.imagify",this.maybeLaunchAllProcesses),a(".imagify-share-networks a").on("click.imagify",this.share),a(c).on("processQueue.imagify",this.processQueue).on("optimizeFiles.imagify",this.optimizeFiles).on("queueEmpty.imagify",this.queueEmpty),imagifyBulk.ajaxActions.getStats&&a('.imagify-bulk-table [data-group-id="library"][data-context="wp"]').length&&(imagifyBulk.heartbeatId=!1),imagifyBulk.heartbeatId&&a(b).on("heartbeat-send",this.addHeartbeat).on("heartbeat-tick",this.processHeartbeat),a(b).on("heartbeat-send",this.addRequirementsHeartbeat).on("heartbeat-tick",this.processRequirementsHeartbeat)},drawOverviewChart:function(d){var e,f;if(this.charts.overview.canvas||(this.charts.overview.canvas=b.getElementById("imagify-overview-chart"),this.charts.overview.canvas)){if(d=d&&a.isArray(d)?d:[],this.charts.overview.donut)return void(d.length&&(0===d.reduce(function(a,b){return a+b},0)&&(d[0]=1),this.charts.overview.donut.data.datasets[0].data=d,this.charts.overview.donut.update()));this.charts.overview.data.datasets[0].data=[parseInt(this.charts.overview.canvas.getAttribute("data-unoptimized"),10),parseInt(this.charts.overview.canvas.getAttribute("data-optimized"),10),parseInt(this.charts.overview.canvas.getAttribute("data-errors"),10)],e=a.extend({},this.charts.overview.data),d.length&&(e.datasets[0].data=d),0===e.datasets[0].data.reduce(function(a,b){return a+b},0)&&(e.datasets[0].data[0]=1),this.charts.overview.donut=new c.imagify.Chart(this.charts.overview.canvas,{type:"doughnut",data:e,options:{legend:{display:!1},events:[],animation:{easing:"easeOutBounce"},tooltips:{displayColors:!1,callbacks:{label:function(a,b){return b.datasets[a.datasetIndex].data[a.index]}}},responsive:!1,cutoutPercentage:85}}),f='<ul class="imagify-doughnut-legend">',a.each(e.labels,function(a,b){f+='<li><span style="background-color:'+e.datasets[0].backgroundColor[a]+'"></span>'+b+"</li>"}),f+="</ul>",b.getElementById("imagify-overview-chart-legend").innerHTML=f}},drawFileChart:function(b){var d=this.charts.files.donuts;b.each(function(){var b=parseInt(a(this).closest(".imagify-chart").next(".imagipercent").text().replace("%",""),10);if(void 0!==d[this.id])return d[this.id].data.datasets[0].data[0]=b,d[this.id].data.datasets[0].data[1]=100-b,void d[this.id].update();d[this.id]=new c.imagify.Chart(this,{type:"doughnut",data:{datasets:[{data:[b,100-b],backgroundColor:["#00B3D3","#D8D8D8"],borderColor:"#fff",borderWidth:1}]},options:{legend:{display:!1},events:[],animation:{easing:"easeOutBounce"},tooltips:{enabled:!1},responsive:!1}})}),this.charts.files.donuts=d},drawShareChart:function(){var d;if(this.charts.share.canvas||(this.charts.share.canvas=b.getElementById("imagify-ac-chart"),this.charts.share.canvas)){if(d=parseInt(a(this.charts.share.canvas).closest(".imagify-ac-chart").attr("data-percent"),10),this.charts.share.donut)return this.charts.share.donut.data.datasets[0].data[0]=d,this.charts.share.donut.data.datasets[0].data[1]=100-d,void this.charts.share.donut.update();this.charts.share.donut=new c.imagify.Chart(this.charts.share.canvas,{type:"doughnut",data:{datasets:[{data:[d,100-d],backgroundColor:["#40B1D0","#FFFFFF"],borderWidth:0}]},options:{legend:{display:!1},events:[],animation:{easing:"easeOutBounce"},tooltips:{enabled:!1},responsive:!1,cutoutPercentage:70}})}},getAjaxUrl:function(a,b){var d=b.groupId.replace(/[\s_-](\S)/g,function(a,b){return b.toUpperCase()});return a=a.replace("%GROUP_ID%",d),a=imagifyBulk.ajaxActions[a],ajaxurl+c.imagify.concat+"_wpnonce="+imagifyBulk.ajaxNonce+"&optimization_level="+b.level+"&action="+a+"&folder_type="+b.groupId},getFolderTypes:function(){return c.imagify.bulk.folderTypes.length||a(".imagify-row-folder-type").each(function(){var b=a(this),d=b.data("group-id");"library"===d&&(d+="|"+b.data("context")),c.imagify.bulk.folderTypes.push(d)}),c.imagify.bulk.folderTypes},getConfirmMessage:function(){return imagifyBulk.labels.processing},closeLevelSelector:function(a,b){if(a&&a.length)return void 0!==b&&b>0?void c.setTimeout(function(){c.imagify.bulk.closeLevelSelector(a)},b):void a.attr("aria-hidden","true")},stopProcess:function(b,d){this.processIsStopped=!0,c.imagify.bulk.status[d.groupId]={isError:!0,id:b},a(c).trigger("queueEmpty.imagify")},hasBlockingError:function(b){return b=void 0!==b&&b,imagifyBulk.curlMissing?(b&&c.imagify.bulk.displayError({html:imagifyBulk.labels.curlMissing}),!0):imagifyBulk.editorMissing?(b&&c.imagify.bulk.displayError({html:imagifyBulk.labels.editorMissing}),!0):imagifyBulk.extHttpBlocked?(b&&c.imagify.bulk.displayError({html:imagifyBulk.labels.extHttpBlocked}),!0):imagifyBulk.apiDown?(b&&c.imagify.bulk.displayError({html:imagifyBulk.labels.apiDown}),!0):imagifyBulk.keyIsValid?!!imagifyBulk.isOverQuota&&(b&&c.imagify.bulk.displayError({title:imagifyBulk.labels.overQuotaTitle,html:a("#tmpl-imagify-overquota-alert").html(),type:"info",customClass:"imagify-swal-has-subtitle imagify-swal-error-header",showConfirmButton:!1}),!0):(b&&c.imagify.bulk.displayError({title:imagifyBulk.labels.invalidAPIKeyTitle,type:"info"}),!0)},displayError:function(b,c,d){var e={title:"",html:"",type:"error",customClass:"",width:620,padding:0,showCloseButton:!0,showConfirmButton:!0};a.isPlainObject(b)?d=a.extend({},e,b):(d=d||{},d=a.extend({},e,{title:b||"",html:c||""},d)),d.title=d.title||imagifyBulk.labels.error,d.customClass+=" imagify-sweet-alert",swal(d).catch(swal.noop)},displayErrorInRow:function(b,c){var d,e;return b=a(b()),d=b.find(".imagify-cell-status ~ td"),e=d.length,c=c||"",d.remove(),b.find(".imagify-cell-status").after('<td colspan="'+e+'">'+c+"</td>"),b},displayFolderRow:function(a,b){var d,e,f,g;return"resting"===a?(b.next(".imagify-row-waiting, .imagify-row-working").remove(),void b.imagifyShow()):(d=b.next(".imagify-row-waiting, .imagify-row-working"),"waiting"===a?(f="#d2d3d6",g=imagifyBulk.labels.waitingOtimizationsText):(f="#40b1d0",g=imagifyBulk.labels.imagesOptimizedText.replace("%s","<span>0</span>")),d.length?(d.hasClass("imagify-row-"+a)||(d.attr("class","imagify-row-"+a),d.find(".imagify-cell-checkbox svg").attr("fill",f),d.children(".imagify-cell-images-optimized").html(g)),b.imagifyHide(),void d.imagifyShow()):(d=b.clone().attr({class:"imagify-row-"+a,"aria-hidden":"false"}),e=c.imagify.template("imagify-spinner"),d.children(".imagify-cell-checkbox").html(e()).find("svg").attr("fill",f),d.children(".imagify-cell-title").html('<span class="imagify-cell-label">'+d.children(".imagify-cell-title").text()+"</span>"),d.children(".imagify-cell-images-optimized").html(g),d.children(".imagify-cell-errors, .imagify-cell-optimized, .imagify-cell-original, .imagify-cell-level").text(""),void b.imagifyHide().after(d)))},displayShareBox:function(){var b,d,e,f,g=imagifyBulk.labels.textToShare;if(!this.globalGain||this.queue.length)return this.globalGain=0,this.globalOriginalSize=0,void(this.globalOptimizedSize=0);b=(100-this.globalOptimizedSize/this.globalOriginalSize*100).toFixed(2),d=c.imagify.humanSize(this.globalGain,1),e=c.imagify.humanSize(this.globalOriginalSize,1),g=g.replace("%1$s",d),g=g.replace("%2$s",e),g=encodeURIComponent(g),f=a(".imagify-row-complete"),f.find(".imagify-ac-rt-total-gain").html(d),f.find(".imagify-ac-rt-total-original").html(e),f.find(".imagify-ac-chart").attr("data-percent",b),f.find(".imagify-sn-twitter").attr("href",imagifyBulk.labels.twitterShareURL+"&amp;text="+g),this.drawShareChart(),f.addClass("done").imagifyShow(),a("html, body").animate({scrollTop:f.offset().top},200),this.globalGain=0,this.globalOriginalSize=0,this.globalOptimizedSize=0},updateStats:function(b){var d;b&&a.isPlainObject(b)&&(c.imagify.bulk.charts.overview.donut.data&&(d=c.imagify.bulk.charts.overview.donut.data.datasets[0].data,b.unoptimized_attachments===d[0]&&b.optimized_attachments===d[1]&&b.errors_attachments===d[2])||(b.unconsumed_quota=b.unconsumed_quota.toFixed(1),a(".imagify-meteo-icon").html(b.quota_icon),a(".imagify-unconsumed-percent").html(b.unconsumed_quota+"%"),a(".imagify-unconsumed-bar").css("width",b.unconsumed_quota+"%").parent().attr("class",b.quota_class),a("#imagify-overview-chart-percent").html(b.optimized_attachments_percent+"<span>%</span>"),a(".imagify-total-percent").html(b.optimized_attachments_percent+"%"),c.imagify.bulk.drawOverviewChart([b.unoptimized_attachments,b.optimized_attachments,b.errors_attachments]),a("#imagify-total-optimized-attachments").html(b.already_optimized_attachments),a("#imagify-original-bar").find(".imagify-barnb").html(b.original_human),a("#imagify-optimized-bar").css("width",100-b.optimized_percent+"%").find(".imagify-barnb").html(b.optimized_human),a("#imagify-total-optimized-attachments-pct").html(b.optimized_percent+"%")))},openLevelSelectorFromButton:function(b){var c=a("#"+a(this).attr("aria-controls"));b.stopPropagation(),a(".imagify-level-selector-list").not(c).attr("aria-hidden","true"),c.attr("aria-hidden","false").find(":checked").trigger("focus.imagify")},syncLevelSelectorFromRadio:function(){var b=a(this).closest(".imagify-level-choice");b.addClass("imagify-current-level").attr("aria-current","true").siblings(".imagify-level-choice").removeClass("imagify-current-level").attr("aria-current","false"),b.closest(".imagify-level-selector").find(".imagify-current-level-info").html(b.find("label").html())},closeLevelSelectors:function(b){"keypress"===b.type&&27!==b.keyCode&&13!==b.keyCode||c.imagify.bulk.closeLevelSelector(a('.imagify-level-selector-list[aria-hidden="false"]'))},toggleOptimizationButton:function(){if(!c.imagify.bulk.hasMultipleRows&&!this.checked)return void a(this).prop("checked",!0);a('.imagify-bulk-table [name="group[]"]:checked').length?a("#imagify-bulk-action").removeAttr("disabled"):a("#imagify-bulk-action").attr("disabled","disabled")},toggleOptimizationDetails:function(b){var c,d=a(this),e=d.closest(".imagify-bulk-table").find(".imagify-bulk-table-details");c="open"===b.type||"close"!==b.type&&e.hasClass("hidden"),c?(d.html(d.data("label-hide")+'<span class="dashicons dashicons-no-alt"></span>'),e.imagifyShow()):(d.html(d.data("label-show")+'<span class="dashicons dashicons-menu"></span>'),e.imagifyHide())},maybeLaunchAllProcesses:function(){var b;a(this).attr("disabled")||a('.imagify-bulk-table [name="group[]"]:checked').length&&(c.imagify.bulk.hasBlockingError(!0)||(b=a("#tmpl-imagify-bulk-infos"),b.length?swal({title:imagifyBulk.labels.bulkInfoTitle,html:b.html(),type:"",customClass:"imagify-sweet-alert imagify-swal-has-subtitle imagify-before-bulk-infos",showCancelButton:!0,padding:0,width:554,confirmButtonText:imagifyBulk.labels.confirmBulk,cancelButtonText:imagifySwal.labels.cancelButtonText,reverseButtons:!0}).then(function(){var d=a('.imagify-bulk-table [name="group[]"]:checked').first().closest(".imagify-row-folder-type"),e=d.data("group-id"),f=d.data("context");a.get(ajaxurl+c.imagify.concat+"_wpnonce="+imagifyBulk.ajaxNonce+"&action="+imagifyBulk.ajaxActions.bulkInfoSeen+"&folder_type="+e+"&context="+f),b.remove(),c.imagify.bulk.launchAllProcesses()}).catch(swal.noop):c.imagify.bulk.launchAllProcesses()))},launchAllProcesses:function(){var b=a(c),d=a("#imagify-bulk-action"),e=!0;d.attr("disabled","disabled").find(".dashicons").addClass("rotate"),b.on("beforeunload",this.getConfirmMessage),a(".imagify-row-complete").imagifyHide(200,function(){a(this).removeClass("done")}),a(".imagify-show-table-details").trigger("close.imagify"),this.queue=[],this.status={},this.displayedWaitMessage=!1,this.processIsStopped=!1,this.globalGain=0,this.globalOriginalSize=0,this.globalOptimizedSize=0,a('.imagify-bulk-table [name="group[]"]:checked').each(function(){var b=a(this),d=b.closest(".imagify-row-folder-type"),f=d.data("group-id"),g=d.data("context"),h=d.find('.imagify-cell-level [name="level['+f+']"]:checked').val();if(c.imagify.bulk.queue.push({groupId:f,context:g,level:void 0===h?-1:parseInt(h,10)}),c.imagify.bulk.status[f]={isError:!1,id:"waiting"},e)return e=!1,!0;c.imagify.bulk.displayFolderRow("waiting",d)}),b.trigger("processQueue.imagify")},processQueue:function(){var b,d;if(!c.imagify.bulk.processIsStopped){if(!c.imagify.bulk.queue.length)return void a(c).trigger("queueEmpty.imagify");c.imagify.bulk.displayedWaitMessage||(swal({title:imagifyBulk.labels.waitTitle,html:imagifyBulk.labels.waitText,showConfirmButton:!1,padding:0,imageUrl:imagifyBulk.waitImageUrl,customClass:"imagify-sweet-alert"}).catch(swal.noop),c.imagify.bulk.displayedWaitMessage=!0),d=c.imagify.bulk.queue.shift(),b=a("#cb-select-"+d.groupId).closest(".imagify-row-folder-type"),c.imagify.bulk.status[d.groupId].id="fetching",c.imagify.bulk.displayFolderRow("working",b),a.get(c.imagify.bulk.getAjaxUrl("%GROUP_ID%Fetch",d)).done(function(e){if(!c.imagify.bulk.processIsStopped)if(swal.close(),e.success&&(a.isArray(e.data)||a.isPlainObject(e.data))){if(!a.isEmptyObject(e.data))return void a(c).trigger("optimizeFiles.imagify",[d,e.data]);if(c.imagify.bulk.status[d.groupId].id="no-images",!c.imagify.bulk.processIsStopped){if(c.imagify.bulk.hasMultipleRows&&a("#cb-select-"+d.groupId).prop("checked",!1),!c.imagify.bulk.queue.length)return void a(c).trigger("queueEmpty.imagify");c.imagify.bulk.displayFolderRow("resting",b),a(c).trigger("processQueue.imagify")}}else c.imagify.bulk.stopProcess(e.data.message,d)}).fail(function(){c.imagify.bulk.stopProcess("get-unoptimized-images",d)})}},optimizeFiles:function(b,d,e){var f,g,h=a("#cb-select-"+d.groupId).closest(".imagify-row-folder-type"),i=h.next(".imagify-row-working"),j=i.find(".imagify-cell-images-optimized span"),k=parseInt(j.text(),10),l=i.find(".imagify-cell-errors span"),m=parseInt(l.text(),10),n=h.closest(".imagify-bulk-table"),o=n.find(".imagify-row-progress"),p=o.find(".bar"),q={groupId:d.groupId,id:0,thumbnail:"",filename:"",status:"",icon:"",label:"",thumbnails:"",original_size_human:"",new_size_human:"",chartSuffix:"",percent_human:"",overall_saving_human:""};c.imagify.bulk.processIsStopped||(c.imagify.bulk.status[d.groupId].id="optimizing",n.find(".imagify-bulk-table-details thead").html(a("#tmpl-imagify-file-header-"+d.groupId).html()),g=n.find(".imagify-bulk-table-details tbody").text(""),p.css("width","0%").find(".percent").text("0%"),o.slideDown().attr("aria-hidden","false"),f=new ImagifyGulp({buffer_size:imagifyBulk.bufferSizes[d.context]||1,lib:c.imagify.bulk.getAjaxUrl("%GROUP_ID%Optimize",d),images:e,context:d.context}),f.before(function(b){var e=c.imagify.template("imagify-file-row-"+d.groupId);g.prepend(e(a.extend({},q,{status:"compressing",icon:"admin-generic rotate",label:imagifyBulk.labels.optimizing,chartSuffix:b.image_id},b)))}),f.each(function(b){var e=c.imagify.template("imagify-file-row-"+d.groupId),g=a("#"+d.groupId+"-"+b.image);return p.css("width",b.progress+"%").find(".percent").html(b.progress+"%"),b.success?(g.replaceWith(e(a.extend({},q,{status:"complete",icon:"yes",label:imagifyBulk.labels.complete,chartSuffix:b.image},b))),c.imagify.bulk.drawFileChart(a("#"+d.groupId+"-"+b.image).find(".imagify-cell-percentage canvas")),k+=1,void j.text(k)):"already-optimized"===b.error_code?(g.replaceWith(c.imagify.bulk.displayErrorInRow(e(a.extend({},q,{status:"complete",icon:"yes",label:imagifyBulk.labels.alreadyOptimized,chartSuffix:b.image},b)),b.error)),k+=1,void j.text(k)):(g.replaceWith(c.imagify.bulk.displayErrorInRow(e(a.extend({},q,{status:"error",icon:"dismiss",label:imagifyBulk.labels.error,chartSuffix:b.image},b)),b.error||b)),l.length?(m+=1,l.text(m)):(m=1,l=i.find(".imagify-cell-errors").html(imagifyBulk.labels.imagesErrorText.replace("%s","<span>1</span>")).find("span")),void("over-quota"===b.error_code&&(f.stopProcess(),c.imagify.bulk.stopProcess(b.error_code,d))))}),f.done(function(b){c.imagify.bulk.hasMultipleRows&&a("#cb-select-"+d.groupId).prop("checked",!1),b.global_original_size&&(c.imagify.bulk.globalGain+=parseInt(b.global_gain,10),c.imagify.bulk.globalOriginalSize+=parseInt(b.global_original_size,10),c.imagify.bulk.globalOptimizedSize+=parseInt(b.global_optimized_size,10)),c.imagify.bulk.processIsStopped||(c.imagify.bulk.status[d.groupId].isError||(c.imagify.bulk.status[d.groupId].id="done"),h.addClass("updating"),a.get(c.imagify.bulk.getAjaxUrl("getFolderData",d)).done(function(b){b.success&&a.each(b.data,function(a,b){h.children(".imagify-cell-"+a).html(b)}),c.imagify.bulk.displayFolderRow("resting",h)}).always(function(){h.removeClass("updating"),c.imagify.bulk.queue.length?a(c).trigger("processQueue.imagify"):a(c).trigger("queueEmpty.imagify")}))}),f.run())},queueEmpty:function(){var b=a(".imagify-bulk-table"),d={},e=!1,f=!0;c.imagify.bulk.displayShareBox(),c.imagify.bulk.queue=[],imagifyBulk.heartbeatId||a.get(ajaxurl,{_wpnonce:imagifyBulk.ajaxNonce,action:imagifyBulk.ajaxActions.getStats,types:c.imagify.bulk.getFolderTypes()}).done(function(a){a.success&&c.imagify.bulk.updateStats(a.data)}),a.isEmptyObject(c.imagify.bulk.status)||(a.each(c.imagify.bulk.status,function(a,b){return b.isError?(e=b.id,f=!1,!1):"no-images"!==b.id?(f=!1,!1):void 0}),e?("invalid-api-key"===e?d={title:imagifyBulk.labels.invalidAPIKeyTitle,type:"info"}:"over-quota"===e?d={title:imagifyBulk.labels.overQuotaTitle,html:a("#tmpl-imagify-overquota-alert").html(),type:"info",customClass:"imagify-swal-has-subtitle imagify-swal-error-header",showConfirmButton:!1}:"get-unoptimized-images"!==e&&"consumed-all-data"!==e||(d={title:imagifyBulk.labels.getUnoptimizedImagesErrorTitle,html:imagifyBulk.labels.getUnoptimizedImagesErrorText,type:"info"}),c.imagify.bulk.displayError(d)):f&&c.imagify.bulk.displayError({title:imagifyBulk.labels.noAttachmentToOptimizeTitle,html:imagifyBulk.labels.noAttachmentToOptimizeText,type:"info"})),c.imagify.bulk.status={},a(c).off("beforeunload",c.imagify.bulk.getConfirmMessage),c.imagify.bulk.displayFolderRow("resting",b.find(".imagify-row-folder-type").not(".updating")),b.find(".imagify-row-progress").slideUp().attr("aria-hidden","true").find(".bar").removeAttr("style").find(".percent").text("0%"),a('.imagify-bulk-table [name="group[]"]:checked').length?a("#imagify-bulk-action").removeAttr("disabled").find(".dashicons").removeClass("rotate"):a("#imagify-bulk-action").find(".dashicons").removeClass("rotate")},addHeartbeat:function(a,b){b.imagify_ids=b.imagify_ids||{},b.imagify_ids[imagifyBulk.heartbeatId]=1,b.imagify_types=c.imagify.bulk.getFolderTypes()},processHeartbeat:function(a,b){b.imagify_bulk_data&&c.imagify.bulk.updateStats(b.imagify_bulk_data)},addRequirementsHeartbeat:function(a,b){b.imagify_ids=b.imagify_ids||{},b.imagify_ids[imagifyBulk.reqsHeartbeatId]=1},processRequirementsHeartbeat:function(a,b){b.imagify_bulk_requirements&&(b=b.imagify_bulk_requirements,imagifyBulk.curlMissing=b.curl_missing,imagifyBulk.editorMissing=b.editor_missing,imagifyBulk.extHttpBlocked=b.external_http_blocked,imagifyBulk.apiDown=b.api_down,imagifyBulk.keyIsValid=b.key_is_valid,imagifyBulk.isOverQuota=b.is_over_quota)},share:function(a){var d,e;a.preventDefault(),c.innerWidth?(d=(c.innerWidth-700)/2,e=(c.innerHeight-290)/2):(d=(b.body.clientWidth-700)/2,e=(b.body.clientHeight-290)/2),c.open(this.href,"","status=no, scrollbars=no, menubar=no, top="+e+", left="+d+", width=700, height=290")}},c.imagify.bulk.init()}(jQuery,document,window);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
assets/js/options.js CHANGED
@@ -320,7 +320,7 @@
320
  return;
321
  }
322
 
323
- $button.attr( 'disabled', 'disabled' );
324
 
325
  if ( $tree.length ) {
326
  if ( $button.hasClass( 'imagify-is-open' ) ) {
@@ -328,9 +328,9 @@
328
  $button.removeClass(' imagify-is-open' );
329
  } else {
330
  $tree.removeClass( 'hidden' );
331
- $button.addClass(' imagify-is-open' );
332
  }
333
- $button.removeAttr( 'disabled' );
334
  return;
335
  }
336
 
@@ -365,7 +365,7 @@
365
  } );
366
  } )
367
  .always( function(){
368
- $button.removeAttr( 'disabled' );
369
  } );
370
  } );
371
 
320
  return;
321
  }
322
 
323
+ $button.attr( 'disabled', 'disabled' ).addClass( 'imagify-loading' );
324
 
325
  if ( $tree.length ) {
326
  if ( $button.hasClass( 'imagify-is-open' ) ) {
328
  $button.removeClass(' imagify-is-open' );
329
  } else {
330
  $tree.removeClass( 'hidden' );
331
+ $button.addClass( 'imagify-is-open' );
332
  }
333
+ $button.removeAttr( 'disabled' ).removeClass( 'imagify-loading' );
334
  return;
335
  }
336
 
365
  } );
366
  } )
367
  .always( function(){
368
+ $button.removeAttr( 'disabled' ).removeClass( 'imagify-loading' );
369
  } );
370
  } );
371
 
assets/js/options.min.js CHANGED
@@ -1,472 +1 @@
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.
4
- */
5
- var busy = false,
6
- xhr = false;
7
-
8
- $( '#imagify-settings #api_key' ).on( 'blur', function() {
9
- var obj = $( this ),
10
- value = obj.val();
11
-
12
- if ( $.trim( value ) === '' ) {
13
- return false;
14
- }
15
-
16
- if ( $( '#check_api_key' ).val() === value ) {
17
- $( '#imagify-check-api-container' ).html( '<span class="dashicons dashicons-yes"></span> ' + imagifyOptions.labels.ValidApiKeyText );
18
- return false;
19
- }
20
-
21
- if ( true === busy ) {
22
- xhr.abort();
23
- } else {
24
- $( '#imagify-check-api-container' ).remove();
25
- obj.after( '<span id="imagify-check-api-container"><span class="imagify-spinner"></span>' + 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 );
34
- } else {
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
- padding: 0,
42
- customClass: 'imagify-sweet-alert'
43
- } ).then( function() {
44
- location.reload();
45
- } );
46
- }
47
-
48
- busy = false;
49
- } );
50
- } );
51
-
52
- /**
53
- * Check the boxes by clicking "labels" (aria-describedby items).
54
- */
55
- $( '.imagify-options-line' ).css( 'cursor', 'pointer' ).on( 'click', function( e ) {
56
- if ( 'INPUT' === e.target.nodeName ) {
57
- return;
58
- }
59
- $( 'input[aria-describedby="' + $( this ).attr( 'id' ) + '"]' ).trigger( 'click' );
60
- return false;
61
- } );
62
-
63
- $( '.imagify-settings th span' ).on( 'click', function() {
64
- var $input = $( this ).parent().next( 'td' ).find( 'input:checkbox' );
65
-
66
- if ( 1 === $input.length ) {
67
- $input.trigger( 'click' );
68
- }
69
- } );
70
-
71
- /**
72
- * Auto check on options-line input value change.
73
- */
74
- $( '.imagify-options-line' ).find( 'input' ).on( 'change focus', function() {
75
- var $checkbox = $( this ).closest( '.imagify-options-line' ).prev( 'label' ).prev( 'input' );
76
-
77
- if ( ! $checkbox[0].checked ) {
78
- $checkbox.prop( 'checked', true );
79
- }
80
- } );
81
-
82
- /**
83
- * Imagify Backup alert.
84
- */
85
- $( '.imagify-settings-section' ).find( '#imagify_backup' ).on( 'change', function() {
86
- var $_this = $( this ),
87
- $backupMessage = $_this.siblings( '#backup-dir-is-writable' ),
88
- params = {
89
- 'action': 'imagify_check_backup_dir_is_writable',
90
- '_wpnonce': $backupMessage.data( 'nonce' )
91
- };
92
-
93
- if ( $_this.is( ':checked' ) ) {
94
- $.getJSON( ajaxurl, params )
95
- .done( function( r ) {
96
- if ( $.isPlainObject( r ) && r.success ) {
97
- if ( r.data.is_writable ) {
98
- // Hide the error message.
99
- $backupMessage.addClass( 'hidden' );
100
- } else {
101
- // Show the error message.
102
- $backupMessage.removeClass( 'hidden' );
103
- }
104
- }
105
- } );
106
- return;
107
- }
108
-
109
- // Are you sure? No backup?
110
- swal( {
111
- title: imagifyOptions.labels.noBackupTitle,
112
- html: imagifyOptions.labels.noBackupText,
113
- type: 'warning',
114
- customClass: 'imagify-sweet-alert',
115
- padding: 0,
116
- showCancelButton: true,
117
- cancelButtonText: imagifySwal.labels.cancelButtonText,
118
- reverseButtons: true
119
- } ).then(
120
- function() {
121
- // Leave it unchecked, hide the error message.
122
- $backupMessage.addClass( 'hidden' );
123
- },
124
- function() {
125
- // Re-check.
126
- $_this.prop( 'checked', true );
127
- }
128
- );
129
- } );
130
-
131
- } )(jQuery, document, window);
132
-
133
-
134
- // Display Imagify User data =======================================================================
135
- (function(w, d, $, undefined) { // eslint-disable-line no-unused-vars, no-shadow, no-shadow-restricted-names
136
-
137
- if ( ! w.imagifyUser ) {
138
- return;
139
- }
140
-
141
- $.getJSON( ajaxurl, w.imagifyUser )
142
- .done( function( r ) {
143
- if ( $.isPlainObject( r ) && r.success ) {
144
- r.data.id = null;
145
- r.data.plan_id = null;
146
- r.data.is = [];
147
-
148
- $.each( r.data, function( k, v ) {
149
- var htmlClass = '.imagify-user-' + k.replace( /_/g, '-' );
150
-
151
- if ( k.indexOf( 'is_' ) === 0 ) {
152
- if ( v ) {
153
- r.data.is.push( htmlClass );
154
- }
155
- } else if ( 'is' !== k ) {
156
- $( htmlClass ).text( v );
157
- }
158
- } );
159
-
160
- r.data.is.push( 'best-plan' );
161
-
162
- $( r.data.is.join( ',' ) ).removeClass( 'hidden' );
163
- }
164
- } );
165
-
166
- } )(window, document, jQuery);
167
-
168
-
169
- // Files tree for "custom folders" =================================================================
170
- (function(w, d, $, undefined) { // eslint-disable-line no-unused-vars, no-shadow, no-shadow-restricted-names
171
-
172
- if ( ! imagifyOptions.getFilesTree ) {
173
- return;
174
- }
175
-
176
- function imagifyInsertFolderRow( value ) {
177
- var added = false,
178
- prevPath = null,
179
- valueTest, template, $wrap, $rows, $field;
180
-
181
- if ( ! value ) {
182
- return;
183
- }
184
-
185
- $wrap = $( '#imagify-custom-folders-selected' );
186
- $rows = $wrap.find( '.imagify-custom-folder-line' );
187
- $field = $rows.find( '[value="' + value + '"]' );
188
-
189
- if ( $field.length ) {
190
- // Shouldn't happen.
191
- return;
192
- }
193
-
194
- // Path #///# Label.
195
- value = value.split( '#///#' );
196
- valueTest = value[1].replace( /\/+$/,'' ).toLowerCase();
197
- template = w.imagify.template( 'imagify-custom-folder' );
198
-
199
- $rows.each( function() {
200
- var $this = $( this ),
201
- thisValueTest = $this.data( 'path' ).replace( /\/+$/,'' ).toLowerCase();
202
-
203
- if ( '' !== thisValueTest && valueTest.indexOf( thisValueTest ) === 0 ) {
204
- // We try to add a sub-folder of an already selected folder. It shouldn't happen though, since it can't be selected.
205
- added = true;
206
- return false;
207
- } else if ( valueTest < thisValueTest ) {
208
- $this.before( template( {
209
- value: value[0],
210
- label: value[1]
211
- } ) );
212
- $rows = $wrap.find( '.imagify-custom-folder-line' );
213
- added = true;
214
- return false;
215
- }
216
- } );
217
-
218
- if ( ! added ) {
219
- $wrap.append( template( {
220
- value: value[0],
221
- label: value[1]
222
- } ) );
223
- $rows = $wrap.find( '.imagify-custom-folder-line' );
224
- }
225
-
226
- // Remove sub-paths: if 'a/b/' and 'a/b/c/' are in the array, we keep only the "parent" 'a/b/'.
227
- if ( '' !== valueTest ) {
228
- $rows.each( function() {
229
- var $this = $( this ),
230
- thisPath = $this.data( 'path' ).toLowerCase();
231
-
232
- if ( null !== prevPath && thisPath.indexOf( prevPath ) === 0 ) {
233
- $this.find( '.imagify-custom-folders-remove' ).trigger( 'click.imagify' );
234
- } else {
235
- prevPath = thisPath;
236
- }
237
- } );
238
- }
239
-
240
- // Display a message.
241
- $wrap.next( '.hidden' ).removeClass( 'hidden' );
242
- }
243
-
244
- // Clicking the main button: fetch site's root folders and files, then display them in a modal.
245
- $( '#imagify-add-custom-folder' ).on( 'click.imagify', function() {
246
- var $button = $( this ),
247
- selected = [],
248
- $folders;
249
-
250
- if ( $button.attr( 'disabled' ) ) {
251
- return;
252
- }
253
-
254
- $button.attr( 'disabled', 'disabled' ).next( 'img' ).attr( 'aria-hidden', 'false' );
255
-
256
- $folders = $( '#imagify-custom-folders-selected' );
257
-
258
- $folders.find( 'input' ).each( function() {
259
- selected.push( this.value );
260
- } );
261
-
262
- $.post( imagifyOptions.getFilesTree, {
263
- folder: '/',
264
- selected: selected
265
- }, null, 'json' )
266
- .done( function( response ) {
267
- if ( ! response.success ) {
268
- swal( {
269
- title: imagifyOptions.labels.error,
270
- html: response.data || '',
271
- type: 'error',
272
- padding: 0,
273
- customClass: 'imagify-sweet-alert'
274
- } );
275
- return;
276
- }
277
-
278
- swal( {
279
- title: imagifyOptions.labels.filesTreeTitle,
280
- html: '<div class="imagify-swal-subtitle">' + imagifyOptions.labels.filesTreeSubTitle + '</div><div class="imagify-swal-content"><p class="imagify-folders-information"><i class="dashicons dashicons-info" aria-hidden="true"></i>' + imagifyOptions.labels.cleaningInfo + '</p><ul id="imagify-folders-tree" class="imagify-folders-tree">' + response.data + '</ul></div>',
281
- type: '',
282
- customClass: 'imagify-sweet-alert imagify-swal-has-subtitle imagify-folders-selection',
283
- showCancelButton: true,
284
- padding: 0,
285
- confirmButtonText: imagifyOptions.labels.confirmFilesTreeBtn,
286
- cancelButtonText: imagifySwal.labels.cancelButtonText,
287
- reverseButtons: true
288
- } ).then( function() {
289
- var values = $( '#imagify-folders-tree input' ).serializeArray(); // Don't do `$( '#imagify-folders-tree' ).find( 'input' )`, it won't work.
290
-
291
- if ( ! values.length ) {
292
- return;
293
- }
294
-
295
- $.each( values, function( i, v ) {
296
- imagifyInsertFolderRow( v.value );
297
- } );
298
- } ).catch( swal.noop );
299
- } )
300
- .fail( function() {
301
- swal( {
302
- title: imagifyOptions.labels.error,
303
- type: 'error',
304
- customClass: 'imagify-sweet-alert',
305
- padding: 0
306
- } );
307
- } )
308
- .always( function(){
309
- $button.removeAttr( 'disabled' ).next( 'img' ).attr( 'aria-hidden', 'true' );
310
- } );
311
- } );
312
-
313
- // Clicking a folder icon in the modal: fetch the folder's sub-folders and files, then display them.
314
- $( d ).on( 'click.imagify', '#imagify-folders-tree [data-folder]', function() {
315
- var $button = $( this ),
316
- $tree = $button.nextAll( '.imagify-folders-sub-tree' ),
317
- selected = [];
318
-
319
- if ( $button.attr( 'disabled' ) || $button.siblings( ':checkbox' ).is( ':checked' ) ) {
320
- return;
321
- }
322
-
323
- $button.attr( 'disabled', 'disabled' );
324
-
325
- if ( $tree.length ) {
326
- if ( $button.hasClass( 'imagify-is-open' ) ) {
327
- $tree.addClass( 'hidden' );
328
- $button.removeClass(' imagify-is-open' );
329
- } else {
330
- $tree.removeClass( 'hidden' );
331
- $button.addClass(' imagify-is-open' );
332
- }
333
- $button.removeAttr( 'disabled' );
334
- return;
335
- }
336
-
337
- $( '#imagify-custom-folders-selected' ).find( 'input' ).each( function() {
338
- selected.push( this.value );
339
- } );
340
-
341
- $.post( imagifyOptions.getFilesTree, {
342
- folder: $button.data( 'folder' ),
343
- selected: selected
344
- }, null, 'json' )
345
- .done( function( response ) {
346
- if ( ! response.success ) {
347
- swal( {
348
- title: imagifyOptions.labels.error,
349
- html: response.data || '',
350
- type: 'error',
351
- padding: 0,
352
- customClass: 'imagify-sweet-alert'
353
- } );
354
- return;
355
- }
356
-
357
- $button.addClass( 'imagify-is-open' ).parent().append( '<ul class="imagify-folders-sub-tree">' + response.data + '</ul>' );
358
- } )
359
- .fail( function(){
360
- swal( {
361
- title: imagifyOptions.labels.error,
362
- type: 'error',
363
- padding: 0,
364
- customClass: 'imagify-sweet-alert'
365
- } );
366
- } )
367
- .always( function(){
368
- $button.removeAttr( 'disabled' );
369
- } );
370
- } );
371
-
372
- // Clicking a Remove folder button make it disappear.
373
- $( '#imagify-custom-folders' ).on( 'click.imagify', '.imagify-custom-folders-remove', function() {
374
- var $row = $( this ).closest( '.imagify-custom-folder-line' ).addClass( 'imagify-will-remove' );
375
-
376
- w.setTimeout( function() {
377
- $row.remove();
378
- // Display a message.
379
- $( '#imagify-custom-folders-selected' ).siblings( '.imagify-success.hidden' ).removeClass( 'hidden' );
380
- }, 750 );
381
- } );
382
-
383
- // Clicking the "add themes to folders" button.
384
- $( '#imagify-add-themes-to-custom-folder' ).on( 'click.imagify', function() {
385
- var $this = $( this );
386
-
387
- imagifyInsertFolderRow( $this.data( 'theme' ) );
388
- imagifyInsertFolderRow( $this.data( 'theme-parent' ) );
389
-
390
- // Remove clicked button.
391
- $this.replaceWith( '<p>' + imagifyOptions.labels.themesAdded + '</p>' );
392
- } );
393
-
394
- } )(window, document, jQuery);
395
-
396
-
397
- // "Select all" checkboxes =========================================================================
398
- (function(w, d, $, undefined) { // eslint-disable-line no-unused-vars, no-shadow, no-shadow-restricted-names
399
-
400
- var jqPropHookChecked = $.propHooks.checked;
401
-
402
- // Force `.prop()` to trigger a `change` event.
403
- $.propHooks.checked = {
404
- set: function( elem, value, name ) {
405
- var ret;
406
-
407
- if ( undefined === jqPropHookChecked ) {
408
- ret = ( elem[ name ] = value );
409
- } else {
410
- ret = jqPropHookChecked( elem, value, name );
411
- }
412
-
413
- $( elem ).trigger( 'change.imagify' );
414
-
415
- return ret;
416
- }
417
- };
418
-
419
- // Check all checkboxes.
420
- $( '.imagify-select-all' ).on( 'click.imagify', function() {
421
- var $_this = $(this),
422
- action = $_this.data( 'action' ),
423
- $btns = $_this.closest( '.imagify-select-all-buttons' ),
424
- $group = $btns.prev( '.imagify-check-group' ),
425
- inactive = 'imagify-is-inactive';
426
-
427
- if ( $_this.hasClass( inactive ) ) {
428
- return false;
429
- }
430
-
431
- $btns.find( '.imagify-select-all' ).removeClass( inactive ).attr( 'aria-disabled', 'false' );
432
- $_this.addClass( inactive ).attr( 'aria-disabled', 'true' );
433
-
434
- $group.find( '.imagify-row-check' )
435
- .prop( 'checked', function() {
436
- var $this = $( this );
437
-
438
- if ( $this.is( ':hidden,:disabled' ) ) {
439
- return false;
440
- }
441
-
442
- if ( action === 'select' ) {
443
- return true;
444
- }
445
-
446
- return false;
447
- } );
448
-
449
- } );
450
-
451
- // Change buttons status on checkboxes interation.
452
- $( '.imagify-check-group .imagify-row-check' ).on( 'change.imagify', function() {
453
- var $group = $( this ).closest( '.imagify-check-group' ),
454
- $checks = $group.find( '.imagify-row-check' ),
455
- could_be = $checks.filter( ':visible:enabled' ).length,
456
- are_checked = $checks.filter( ':visible:enabled:checked' ).length,
457
- $btns = $group.next( '.imagify-select-all-buttons' ),
458
- inactive = 'imagify-is-inactive';
459
-
460
- // Toggle status of "check all" buttons.
461
- if ( are_checked === 0 ) {
462
- $btns.find( '[data-action="unselect"]' ).addClass( inactive ).attr( 'aria-disabled', 'true' );
463
- }
464
- if ( are_checked === could_be ) {
465
- $btns.find( '[data-action="select"]' ).addClass( inactive ).attr( 'aria-disabled', 'true' );
466
- }
467
- if ( are_checked !== could_be && are_checked > 0 ) {
468
- $btns.find( '.imagify-select-all' ).removeClass( inactive ).attr( 'aria-disabled', 'false' );
469
- }
470
- } );
471
-
472
- } )(window, document, jQuery);
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",padding:0,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("#imagify_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",padding:0,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){a.imagifyUser&&c.getJSON(ajaxurl,a.imagifyUser).done(function(a){c.isPlainObject(a)&&a.success&&(a.data.id=null,a.data.plan_id=null,a.data.is=[],c.each(a.data,function(b,d){var e=".imagify-user-"+b.replace(/_/g,"-");0===b.indexOf("is_")?d&&a.data.is.push(e):"is"!==b&&c(e).text(d)}),a.data.is.push("best-plan"),c(a.data.is.join(",")).removeClass("hidden"))})}(window,document,jQuery),function(a,b,c,d){function e(b){var d,e,f,g,h,i=!1,j=null;b&&(f=c("#imagify-custom-folders-selected"),g=f.find(".imagify-custom-folder-line"),h=g.find('[value="'+b+'"]'),h.length||(b=b.split("#///#"),d=b[1].replace(/\/+$/,"").toLowerCase(),e=a.imagify.template("imagify-custom-folder"),g.each(function(){var a=c(this),h=a.data("path").replace(/\/+$/,"").toLowerCase();return""!==h&&0===d.indexOf(h)?(i=!0,!1):d<h?(a.before(e({value:b[0],label:b[1]})),g=f.find(".imagify-custom-folder-line"),i=!0,!1):void 0}),i||(f.append(e({value:b[0],label:b[1]})),g=f.find(".imagify-custom-folder-line")),""!==d&&g.each(function(){var a=c(this),b=a.data("path").toLowerCase();null!==j&&0===b.indexOf(j)?a.find(".imagify-custom-folders-remove").trigger("click.imagify"):j=b}),f.next(".hidden").removeClass("hidden")))}imagifyOptions.getFilesTree&&(c("#imagify-add-custom-folder").on("click.imagify",function(){var a,b=c(this),d=[];b.attr("disabled")||(b.attr("disabled","disabled").next("img").attr("aria-hidden","false"),a=c("#imagify-custom-folders-selected"),a.find("input").each(function(){d.push(this.value)}),c.post(imagifyOptions.getFilesTree,{folder:"/",selected:d},null,"json").done(function(a){if(!a.success)return void swal({title:imagifyOptions.labels.error,html:a.data||"",type:"error",padding:0,customClass:"imagify-sweet-alert"});swal({title:imagifyOptions.labels.filesTreeTitle,html:'<div class="imagify-swal-subtitle">'+imagifyOptions.labels.filesTreeSubTitle+'</div><div class="imagify-swal-content"><p class="imagify-folders-information"><i class="dashicons dashicons-info" aria-hidden="true"></i>'+imagifyOptions.labels.cleaningInfo+'</p><ul id="imagify-folders-tree" class="imagify-folders-tree">'+a.data+"</ul></div>",type:"",customClass:"imagify-sweet-alert imagify-swal-has-subtitle imagify-folders-selection",showCancelButton:!0,padding:0,confirmButtonText:imagifyOptions.labels.confirmFilesTreeBtn,cancelButtonText:imagifySwal.labels.cancelButtonText,reverseButtons:!0}).then(function(){var a=c("#imagify-folders-tree input").serializeArray();a.length&&c.each(a,function(a,b){e(b.value)})}).catch(swal.noop)}).fail(function(){swal({title:imagifyOptions.labels.error,type:"error",customClass:"imagify-sweet-alert",padding:0})}).always(function(){b.removeAttr("disabled").next("img").attr("aria-hidden","true")}))}),c(b).on("click.imagify","#imagify-folders-tree [data-folder]",function(){var a=c(this),b=a.nextAll(".imagify-folders-sub-tree"),d=[];if(!a.attr("disabled")&&!a.siblings(":checkbox").is(":checked")){if(a.attr("disabled","disabled").addClass("imagify-loading"),b.length)return a.hasClass("imagify-is-open")?(b.addClass("hidden"),a.removeClass(" imagify-is-open")):(b.removeClass("hidden"),a.addClass("imagify-is-open")),void a.removeAttr("disabled").removeClass("imagify-loading");c("#imagify-custom-folders-selected").find("input").each(function(){d.push(this.value)}),c.post(imagifyOptions.getFilesTree,{folder:a.data("folder"),selected:d},null,"json").done(function(b){if(!b.success)return void swal({title:imagifyOptions.labels.error,html:b.data||"",type:"error",padding:0,customClass:"imagify-sweet-alert"});a.addClass("imagify-is-open").parent().append('<ul class="imagify-folders-sub-tree">'+b.data+"</ul>")}).fail(function(){swal({title:imagifyOptions.labels.error,type:"error",padding:0,customClass:"imagify-sweet-alert"})}).always(function(){a.removeAttr("disabled").removeClass("imagify-loading")})}}),c("#imagify-custom-folders").on("click.imagify",".imagify-custom-folders-remove",function(){var b=c(this).closest(".imagify-custom-folder-line").addClass("imagify-will-remove");a.setTimeout(function(){b.remove(),c("#imagify-custom-folders-selected").siblings(".imagify-success.hidden").removeClass("hidden")},750)}),c("#imagify-add-themes-to-custom-folder").on("click.imagify",function(){var a=c(this);e(a.data("theme")),e(a.data("theme-parent")),a.replaceWith("<p>"+imagifyOptions.labels.themesAdded+"</p>")}))}(window,document,jQuery),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-select-all").on("click.imagify",function(){var a=c(this),b=a.data("action"),d=a.closest(".imagify-select-all-buttons"),e=d.prev(".imagify-check-group"),f="imagify-is-inactive";if(a.hasClass(f))return!1;d.find(".imagify-select-all").removeClass(f).attr("aria-disabled","false"),a.addClass(f).attr("aria-disabled","true"),e.find(".imagify-row-check").prop("checked",function(){return!c(this).is(":hidden,:disabled")&&"select"===b})}),c(".imagify-check-group .imagify-row-check").on("change.imagify",function(){var a=c(this).closest(".imagify-check-group"),b=a.find(".imagify-row-check"),d=b.filter(":visible:enabled").length,e=b.filter(":visible:enabled:checked").length,f=a.next(".imagify-select-all-buttons"),g="imagify-is-inactive";0===e&&f.find('[data-action="unselect"]').addClass(g).attr("aria-disabled","true"),e===d&&f.find('[data-action="select"]').addClass(g).attr("aria-disabled","true"),e!==d&&e>0&&f.find(".imagify-select-all").removeClass(g).attr("aria-disabled","false")})}(window,document,jQuery);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
assets/js/pricing-modal.min.js CHANGED
@@ -1,1136 +1 @@
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 = 'monthly' === type ? { 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,
327
- offers, consumption, suggested,
328
- freeQuota = 25,
329
- ot_html = '',
330
- mo_html = '',
331
- $mo_tpl, $ot_tpl,
332
- ot_clone, mo_clone,
333
- $estim_block, $offers_block,
334
- $banners, date_end, promo, discount;
335
-
336
- if ( ! discount_response.success ) {
337
- // TODO: replace modal content by any information.
338
- // An error occurred.
339
- return;
340
- }
341
-
342
- images_datas = imgs_response.data;
343
- prices_datas = prices_response.data;
344
- promo_datas = discount_response.data;
345
- offers = {
346
- mo: prices_datas.monthlies,
347
- ot: prices_datas.onetimes
348
- };
349
- consumption = {
350
- month: images_datas.average_month_size.raw / Math.pow( 1024, 2 ), // Bytes to MB.
351
- total: images_datas.total_library_size.raw / Math.pow( 1024, 2 ) // Bytes to MB.
352
- };
353
- $mo_tpl = $( '#imagify-offer-monthly-template' );
354
- $ot_tpl = $( '#imagify-offer-onetime-template' );
355
- ot_clone = $ot_tpl.html();
356
- mo_clone = $mo_tpl.html();
357
- $estim_block = $( '.imagify-estimation-block' );
358
-
359
- // Remove the monthly free plan from the offers.
360
- $.each( offers.mo, function( index, value ) {
361
- if ( 'free' === value.label ) {
362
- freeQuota = value.quota;
363
- offers.mo.splice( index, 1 );
364
- return false;
365
- }
366
- } );
367
-
368
- // Refresh Analyzing block.
369
- $estim_block.removeClass( 'imagify-analyzing' );
370
- $estim_block.find( '.average-month-size' ).text( images_datas.average_month_size.human );
371
- $estim_block.find( '.total-library-size' ).text( images_datas.total_library_size.human );
372
-
373
- // Switch offers title if < 25mb.
374
- if ( consumption.total + consumption.month < freeQuota ) {
375
- $( '.imagify-pre-checkout-offers .imagify-modal-title' ).addClass( 'imagify-enough-free' );
376
- } else {
377
- $( '.imagify-enough-free' ).removeClass( 'imagify-enough-free' );
378
- }
379
-
380
- // Reset offer selection.
381
- $( '.imagify-offer-selected' ).removeClass( 'imagify-offer-selected' ).find( '.imagify-checkbox' ).prop( 'checked', false );
382
-
383
- // Don't create prices table if something went wrong during request.
384
- if ( null === offers.mo || null === offers.ot ) {
385
- $offers_block = $( '.imagify-pre-checkout-offers' );
386
-
387
- // Hide main content.
388
- $offers_block.hide().attr( 'aria-hidden', true );
389
-
390
- // Show error message.
391
- $offers_block.closest( '.imagify-modal-views' ).find( '.imagify-popin-message' ).remove();
392
- $offers_block.after( '<div class="imagify-popin-message imagify-error"><p>' + imagifyPricingModal.labels.errorPriceAPI + '</p></div>' );
393
-
394
- // Show the modal content.
395
- imagifyModal.$modal.find( '.imagify-modal-loader' ).fadeOut( 300 );
396
- return;
397
- }
398
-
399
- // Autofill coupon code & Show banner if discount is active.
400
- w.imagify_discount_datas = promo_datas;
401
-
402
- if ( promo_datas.is_active ) {
403
- $banners = $( '.imagify-modal-promotion' );
404
- date_end = promo_datas.date_end.split( 'T' )[0];
405
- promo = promo_datas.coupon_value;
406
- discount = 'percentage' === promo_datas.coupon_type ? promo + '%' : '$' + promo;
407
-
408
- // Fill coupon code.
409
- $( '#imagify-coupon-code' ).val( promo_datas.label ).attr( 'readonly', true );
410
-
411
- // Show banners.
412
- $banners.addClass( 'active' ).attr( 'aria-hidden', 'false' );
413
-
414
- // Populate banners.
415
- $banners.find( '.imagify-promotion-number' ).text( discount );
416
- $banners.find( '.imagify-promotion-date' ).text( date_end );
417
-
418
- // Auto validate coupon.
419
- imagifyModal.checkCoupon();
420
- }
421
-
422
- /**
423
- * Find which plan(s) should be pre-selected.
424
- */
425
- suggested = imagifyModal.getSuggestedOffers( offers, consumption, freeQuota );
426
-
427
- /**
428
- * Below lines will build Plan and Onetime offers lists.
429
- * It will also pre-select a Plan and/or Onetime in both of views: pre-checkout and pricing tables.
430
- */
431
-
432
- // Now, do the MONTHLIES Markup.
433
- $.each( offers.mo, function( index, value ) {
434
- var $tpl, $offer,
435
- classes = '';
436
-
437
- // If offer is too big (far) than estimated needs, don't show the offer.
438
- if ( ( index - suggested.mo.index ) > 2 ) {
439
- return true;
440
- }
441
-
442
- if ( index === suggested.mo.index ) {
443
- // It's the one to display.
444
- $offer = $( '.imagify-pre-checkout-offers .imagify-offer-monthly' );
445
-
446
- if ( suggested.mo.selected ) {
447
- classes = ' imagify-offer-selected';
448
-
449
- // Add this offer as pre-selected item in pre-checkout view.
450
- $offer.addClass( 'imagify-offer-selected' ).find( '.imagify-checkbox' ).prop( 'checked', true );
451
- }
452
-
453
- // Populate the Pre-checkout view depending on user_cons.
454
- imagifyModal.populateOffer( $offer, value, 'monthly' );
455
- }
456
-
457
- // Populate each offer.
458
- $tpl = $( mo_clone ).clone();
459
- $tpl = imagifyModal.populateOffer( $tpl, value, 'monthly', classes );
460
-
461
- // Complete Monthlies HTML.
462
- mo_html += $tpl[0].outerHTML;
463
- } );
464
-
465
- // Do the ONETIMES Markup.
466
- $.each( offers.ot, function( index, value ) {
467
- var $tpl, $offer,
468
- classes = '';
469
-
470
- // Parent classes.
471
- if ( index === suggested.ot.index ) {
472
- $offer = $( '.imagify-pre-checkout-offers .imagify-offer-onetime' );
473
-
474
- if ( suggested.ot.selected ) {
475
- classes = ' imagify-offer-selected';
476
-
477
- // Add this offer as pre-selected item in pre-checkout view.
478
- $offer.addClass( 'imagify-offer-selected' ).find( '.imagify-checkbox' ).prop( 'checked', true );
479
- }
480
-
481
- // Populate the Pre-checkout view depending on user_cons.
482
- imagifyModal.populateOffer( $offer, value, 'onetime' );
483
- }
484
-
485
- // Populate each offer.
486
- $tpl = $( ot_clone ).clone();
487
- $tpl = imagifyModal.populateOffer( $tpl, value, 'onetime', classes );
488
-
489
- // complete Onetimes HTML
490
- ot_html += $tpl[0].outerHTML;
491
- } );
492
-
493
- // Fill pricing tables.
494
- if ( $mo_tpl.parent().find( '.imagify-offer-line' ) ) {
495
- $mo_tpl.parent().find( '.imagify-offer-line' ).remove();
496
- }
497
-
498
- $mo_tpl.before( mo_html );
499
-
500
- if ( $ot_tpl.parent().find( '.imagify-offer-line' ) ) {
501
- $ot_tpl.parent().find( '.imagify-offer-line' ).remove();
502
- }
503
-
504
- $ot_tpl.before( ot_html );
505
-
506
- // Show the content.
507
- imagifyModal.$modal.find( '.imagify-modal-loader' ).fadeOut( 300 );
508
-
509
- } ); // Third AJAX request to get discount information.
510
-
511
- } ); // Second AJAX request for image estimation sizes.
512
-
513
- // Populate Pay button.
514
- imagifyModal.populatePayBtn();
515
- } ); // End $.post.
516
- },
517
-
518
- /**
519
- * Tell which offer(s) should be pre-selected.
520
- *
521
- * @param object offers {
522
- * An object build like this:
523
- *
524
- * @type array mo Monthly offers. The most important data being 'quota' (MBytes).
525
- * @type array ot One-Time offers. The most important data being 'quota' (MBytes).
526
- * }
527
- * @param object consumption {
528
- * An object build like this:
529
- *
530
- * @type array month Average image size uploaded each month on the site (MBytes).
531
- * @type array total Total image size in the library (MBytes).
532
- * }
533
- * @param int freeQuota Quota of the free monthly offer (MBytes). Currently 25.
534
- * @return object {
535
- * An object build like this:
536
- *
537
- * @type object mo An object containing the index of the suggested monthly offer, and if it should be selected.
538
- * @type object ot An object containing the index of the suggested one-time offer, and if it should be selected.
539
- * }
540
- */
541
- getSuggestedOffers: function( offers, consumption, freeQuota ) {
542
- var tmpMB = consumption.total + consumption.month,
543
- suggested = {
544
- mo: false,
545
- ot: false
546
- };
547
-
548
- if ( consumption.month <= freeQuota ) {
549
- /**
550
- * The free plan is enough (but we still may need a One-Time plan).
551
- */
552
- suggested.mo = {
553
- index: 0,
554
- selected: 0
555
- };
556
-
557
- tmpMB -= freeQuota;
558
- } else {
559
- /**
560
- * Paid monthly plan.
561
- */
562
- $.each( offers.mo, function( index, value ) {
563
- if ( value.quota < consumption.month ) {
564
- // This plan is not big enough for the user needs.
565
- return true;
566
- }
567
-
568
- // Suggested monthly plan.
569
- suggested.mo = {
570
- index: index,
571
- selected: 1
572
- };
573
- return false;
574
- } );
575
-
576
- if ( false === suggested.mo ) {
577
- /**
578
- * If nothing is selected, that means no plan is big enough for the user's monthly consumption.
579
- * In that case we fallback to the biggest available.
580
- */
581
- suggested.mo = {
582
- index: offers.mo.length - 1,
583
- selected: 1
584
- };
585
- }
586
-
587
- // Remaining MB.
588
- tmpMB -= offers.mo[ suggested.mo.index ].quota;
589
- }
590
-
591
- if ( tmpMB <= 0 ) {
592
- /**
593
- * The monthly plan is big enough to optimize all the images that already are in the library.
594
- * We'll display a One-Time plan that is able to optimize the whole library, in case the user doesn't want a monthly plan, but it won't be pre-selected.
595
- */
596
- $.each( offers.ot, function( index, value ) {
597
- if ( value.quota < consumption.total ) {
598
- // This plan is not big enough for the user needs.
599
- return true;
600
- }
601
-
602
- // Suggested monthly plan.
603
- suggested.ot = {
604
- index: index,
605
- selected: 0
606
- };
607
- return false;
608
- } );
609
-
610
- if ( false === suggested.ot ) {
611
- suggested.ot = {
612
- index: offers.ot.length - 1,
613
- selected: 0
614
- };
615
- }
616
-
617
- return suggested;
618
- }
619
-
620
- /**
621
- * The monthly plan is not big enough to optimize all the images that already are in the library.
622
- * We need to select a One-Time plan.
623
- */
624
- $.each( offers.ot, function( index, value ) {
625
- if ( value.quota < tmpMB ) {
626
- // This plan is not big enough for the user needs.
627
- return true;
628
- }
629
-
630
- // Suggested one-time plan.
631
- suggested.ot = {
632
- index: index,
633
- selected: 1
634
- };
635
- return false;
636
- } );
637
-
638
- if ( false !== suggested.ot ) {
639
- // OK, we have all we need.
640
- return suggested;
641
- }
642
-
643
- /**
644
- * If nothing is selected, that means no OT plan is big enough for the user.
645
- * In that case we fallback to the biggest available, and we need to increase the monthly plan.
646
- */
647
- suggested.ot = {
648
- index: offers.ot.length - 1,
649
- selected: 1
650
- };
651
-
652
- // Reset monthly plan.
653
- suggested.mo = false;
654
-
655
- // Reset the remaining MB and substract the OT plan quota.
656
- tmpMB = consumption.total + consumption.month - offers.ot[ suggested.ot.index ].quota;
657
-
658
- // Search for a new monthly plan.
659
- $.each( offers.mo, function( index, value ) {
660
- if ( value.quota < tmpMB ) {
661
- // This plan is not big enough for the user needs.
662
- return true;
663
- }
664
-
665
- // Suggested monthly plan.
666
- suggested.mo = {
667
- index: index,
668
- selected: 1
669
- };
670
- return false;
671
- } );
672
-
673
- if ( false === suggested.mo ) {
674
- /**
675
- * If nothing is selected, that means no monthly plan is big enough for the user's monthly consumption.
676
- * In that case we fallback to the biggest available.
677
- */
678
- suggested.mo = {
679
- index: offers.mo.length - 1,
680
- selected: 1
681
- };
682
- }
683
-
684
- return suggested;
685
- },
686
-
687
- /**
688
- * @uses imagifyModal.populatePayBtn()
689
- */
690
- checkCheckbox: function( $checkbox ) {
691
- var sel_class = 'imagify-offer-selected';
692
-
693
- $checkbox.each( function() {
694
- var $this = $( this );
695
-
696
- if ( $this.is( ':checked' ) ) {
697
- $this.closest( '.imagify-offer-line' ).addClass( sel_class );
698
- } else {
699
- $this.closest( '.imagify-offer-line' ).removeClass( sel_class );
700
- }
701
- } );
702
-
703
- // Update pay button.
704
- imagifyModal.populatePayBtn();
705
- },
706
-
707
- /**
708
- * @uses imagifyModal.populatePayBtn()
709
- */
710
- checkRadio: function( $radio ) {
711
- var year_class = 'imagify-year-selected',
712
- month_class = 'imagify-month-selected';
713
-
714
- $radio.each( function() {
715
- // To handle modal pricing & modal suggestion.
716
- var $_this = $( this ),
717
- $parent, $to_switch;
718
-
719
- if ( $_this.parent( '.imagify-cart-list-switcher' ).length ) {
720
- $parent = $_this.closest( '.imagify-cart' );
721
- } else if ( $_this.parent( '.imagify-small-options' ).length ) {
722
- $parent = $_this.parent( '.imagify-small-options' ).next( '.imagify-pricing-table' );
723
- } else {
724
- $parent = $_this.closest( '.imagify-offer-line' );
725
- }
726
-
727
- $to_switch = $parent.find( '.imagify-switch-my' );
728
-
729
- if ( $_this.val() === 'yearly' ) {
730
- $parent.addClass( year_class ).removeClass( month_class );
731
- $to_switch.find( '.imagify-monthly' ).attr( 'aria-hidden', 'true' );
732
- $to_switch.find( '.imagify-yearly' ).attr( 'aria-hidden', 'false' );
733
- } else {
734
- $parent.addClass( month_class ).removeClass( year_class );
735
- $to_switch.find( '.imagify-monthly' ).attr( 'aria-hidden', 'false' );
736
- $to_switch.find( '.imagify-yearly' ).attr( 'aria-hidden', 'true' );
737
- }
738
- } );
739
-
740
- // Update Pay button information.
741
- imagifyModal.populatePayBtn();
742
-
743
- return $radio;
744
- },
745
-
746
- /**
747
- * Currently not used.
748
- * @uses imagifyModal.populatePayBtn()
749
- */
750
- populateBtnPrice: setInterval( function() {
751
- imagifyModal.populatePayBtn();
752
- }, 1000 ),
753
-
754
- /**
755
- * 1) Modal Payment change/select plan
756
- * 2) Checkout selection(s)
757
- * 3) Payment process
758
- */
759
-
760
- getPeriod: function() {
761
- return $( '.imagify-offer-monthly' ).hasClass( 'imagify-month-selected' ) ? 'monthly' : 'yearly';
762
- },
763
-
764
- getApiKey: function() {
765
- return $( '#imagify-payment-iframe' ).data( 'imagify-api' );
766
- },
767
-
768
- switchToView: function( $view, data ) {
769
- var viewId = $view.attr( 'id' ),
770
- $modalContent = imagifyModal.$modal.children( '.imagify-modal-content' );
771
-
772
- $view.siblings( '.imagify-modal-views' ).hide().attr( 'aria-hidden', 'true' );
773
-
774
- // Plans view has tabs: display the right one.
775
- if ( data && data.tab ) {
776
- $view.find( 'a[href="#' + data.tab + '"]' ).trigger( 'click.imagify' );
777
- }
778
-
779
- // Payment view: it's an iframe.
780
- if ( 'imagify-payment-process-view' === viewId ) {
781
- $modalContent.addClass( 'imagify-iframe-viewing' );
782
- } else {
783
- $modalContent.removeClass( 'imagify-iframe-viewing' );
784
- }
785
-
786
- // Success view: some tweaks.
787
- if ( 'imagify-success-view' === viewId ) {
788
- $modalContent.addClass( 'imagify-success-viewing' );
789
- imagifyModal.$modal.attr( 'aria-labelledby', 'imagify-success-view' );
790
- } else {
791
- $modalContent.removeClass( 'imagify-success-viewing' );
792
- imagifyModal.$modal.removeAttr( 'aria-labelledby' );
793
- }
794
-
795
- $view.fadeIn( imagifyModal.speedFadeIn ).attr( 'aria-hidden', 'false' );
796
- },
797
-
798
- /**
799
- * @uses imagifyModal.getApiKey()
800
- */
801
- iframeSetSrc: function( params ) {
802
- /**
803
- * params = {
804
- * 'monthly': {
805
- * 'lite': {
806
- * name: 'something',
807
- * id: ''
808
- * }
809
- * },
810
- * 'onetime': {
811
- * 'recommended': {
812
- * name: 'Recommend',
813
- * id: ''
814
- * }
815
- * },
816
- * 'period': 'monthly'|'yearly'
817
- * }
818
- */
819
-
820
- var $iframe = $( '#imagify-payment-iframe' ),
821
- iframe_src = $iframe.attr( 'src' ),
822
- pay_src = $iframe.data( 'src' ),
823
- monthly_id = 0,
824
- onetime_id = 0,
825
- // Stop it ESLint, you're drunk.
826
- key, amount, // eslint-disable-line no-unused-vars
827
- rt_onetime, rt_yearly, rt_monthly, coupon, rt_coupon, $iframeClone, tofind;
828
-
829
- // If we only change monthly/yearly payment mode.
830
- if ( typeof params === 'string' && '' !== iframe_src ) {
831
- tofind = 'monthly' === params ? 'yearly' : 'monthly';
832
- iframe_src = iframe_src.replace( tofind, params );
833
- $iframe.attr( 'src', iframe_src );
834
- return;
835
- }
836
-
837
- // If we get new informations about products.
838
- if ( typeof params !== 'object' ) {
839
- return;
840
- }
841
-
842
- if ( params.monthly ) {
843
- monthly_id = params.monthly[ Object.keys( params.monthly )[0] ].id;
844
- }
845
-
846
- if ( params.onetime ) {
847
- onetime_id = params.onetime[ Object.keys( params.onetime )[0] ].id;
848
- // If onetime ID === 999 it's a custom plan, send datas instead.
849
- onetime_id = ( onetime_id + '' === '999' ? params.onetime[ Object.keys( params.onetime )[0] ].data : onetime_id );
850
- }
851
-
852
- if ( ! params.period ) {
853
- w.imagify.info( 'No period defined' );
854
- return;
855
- }
856
-
857
- key = imagifyModal.getApiKey();
858
- rt_onetime = onetime_id;
859
- rt_yearly = 'yearly' === params.period ? monthly_id : 0;
860
- rt_monthly = 'monthly' === params.period ? monthly_id : 0;
861
- coupon = $( '#imagify-coupon-code' ).val();
862
- rt_coupon = '' === coupon ? 'none' : coupon;
863
- // Not used but...
864
- amount = parseFloat( $( '.imagify-global-amount' ).text() ).toFixed( 2 );
865
-
866
- // Compose route.
867
- // pay_src + :ontimeplan(0)/:monthlyplan(0)/:yearlyplan(0)/:coupon(none)/
868
- pay_src = pay_src + rt_onetime + '/' + rt_monthly + '/' + rt_yearly + '/' + rt_coupon + '/';
869
-
870
- // iFrame sort of cache fix.
871
- $iframeClone = $iframe.remove().attr( 'src', pay_src );
872
-
873
- imagifyModal.$paymentView.html( $iframeClone );
874
- },
875
-
876
- /**
877
- * Public function triggered by payement iframe.
878
- */
879
- paymentClose: function() {
880
- $( '.imagify-iframe-viewing .close-btn' ).trigger( 'click.imagify' );
881
- $( '.imagify-iframe-viewing' ).removeClass( 'imagify-iframe-viewing' );
882
- },
883
-
884
- /**
885
- * @uses imagifyModal.switchToView()
886
- */
887
- paymentBack: function() {
888
- imagifyModal.switchToView( imagifyModal.$preView );
889
- },
890
-
891
- /**
892
- * @uses imagifyModal.switchToView()
893
- */
894
- paymentSuccess: function() {
895
- imagifyModal.switchToView( imagifyModal.$successView );
896
- },
897
-
898
- /**
899
- * @uses imagifyModal.paymentClose()
900
- * @uses imagifyModal.paymentBack()
901
- * @uses imagifyModal.paymentSuccess()
902
- */
903
- checkPluginMessage: function( e ) {
904
- var origin = e.origin || e.originalEvent.origin;
905
-
906
- if ( 'https://app.imagify.io' !== origin && 'http://dapp.imagify.io' !== origin ) {
907
- return;
908
- }
909
-
910
- switch ( e.data ) {
911
- case 'cancel':
912
- imagifyModal.paymentClose();
913
- break;
914
- case 'back':
915
- imagifyModal.paymentBack();
916
- break;
917
- case 'success':
918
- imagifyModal.paymentSuccess();
919
- break;
920
- }
921
- }
922
- };
923
-
924
- /**
925
- * INIT.
926
- */
927
-
928
- // Check all boxes on load.
929
- imagifyModal.checkCheckbox( imagifyModal.$checkboxes );
930
- imagifyModal.checkRadio( imagifyModal.$radios.filter( ':checked' ) );
931
-
932
- // Check coupon onload.
933
- imagifyModal.checkCoupon();
934
-
935
- // Check the changed box.
936
- imagifyModal.$checkboxes.on( 'change.imagify', function() {
937
- imagifyModal.checkCheckbox( $( this ) );
938
- } );
939
-
940
- // Check the radio box.
941
- imagifyModal.$radios.on( 'change.imagify', function() {
942
- imagifyModal.checkRadio( $( this ) );
943
- } );
944
-
945
- /**
946
- * Get pricings on modal opening.
947
- * Build the pricing tables inside modal.
948
- */
949
- $( '#imagify-get-pricing-modal' ).on( 'click.imagify-ajax', function() {
950
- imagifyModal.getPricing( $( this ) );
951
- } );
952
-
953
- /**
954
- * Reset the modal on close.
955
- */
956
- $( d ).on( 'modalClosed.imagify', '.imagify-payment-modal', function() {
957
- // Reset viewing class & aria-labelledby.
958
- $( this ).find( '.imagify-modal-content' ).removeClass( 'imagify-success-viewing imagify-iframe-viewing' );
959
-
960
- // Reset first view after fadeout ~= 300 ms.
961
- setTimeout( function() {
962
- $( '.imagify-modal-views' ).hide();
963
- $( '#imagify-pre-checkout-view' ).show();
964
- }, 300 );
965
- } );
966
-
967
- /**
968
- * Get validation for Coupon Code
969
- * - On blur
970
- * - On Enter or Spacebar press
971
- * - On click OK button
972
- *
973
- * @since 1.6.3 Only if field hasn't readonly attribute (discount auto-applied).
974
- */
975
- $( '#imagify-coupon-code' ).on( 'blur.imagify', function() {
976
- if ( ! $( this ).attr('readonly') ) {
977
- imagifyModal.checkCoupon();
978
- }
979
- } ).on( 'keydown.imagify', function( e ) {
980
- var $this = $( this );
981
-
982
- if ( $this.attr( 'readonly' ) ) {
983
- return;
984
- }
985
- if ( 13 === e.keyCode || 32 === e.keyCode ) {
986
- imagifyModal.checkCoupon();
987
- return false;
988
- }
989
- if ( $this.val().length >= 3 ) {
990
- $this.closest( '.imagify-coupon-input' ).addClass( 'imagify-canbe-validate' );
991
- } else {
992
- $this.closest( '.imagify-coupon-input' ).removeClass( 'imagify-canbe-validate' );
993
- }
994
- } );
995
-
996
- $( '#imagify-coupon-validate' ).on( 'click.imagify', function() {
997
- imagifyModal.checkCoupon();
998
- $( this ).closest( '.imagify-canbe-validate' ).removeClass( 'imagify-canbe-validate' );
999
- } );
1000
-
1001
- /**
1002
- * View game, step by step.
1003
- */
1004
-
1005
- // 1) when you decide to choose another plan.
1006
-
1007
- /**
1008
- * 1.a) on click, display choices.
1009
- *
1010
- * @uses imagifyModal.switchToView()
1011
- */
1012
- imagifyModal.$anotherBtn.on( 'click.imagify', function( e ) {
1013
- var type = $( this ).data( 'imagify-choose' ),
1014
- tab = 'imagify-pricing-tab-' + ( 'plan' === type ? 'monthly' : 'onetime' );
1015
-
1016
- e.preventDefault();
1017
-
1018
- imagifyModal.switchToView( imagifyModal.$plansView, { tab: tab } );
1019
- } );
1020
-
1021
- /**
1022
- * 1.b) on click in a choice, return to pre-checkout step.
1023
- *
1024
- * @uses imagifyModal.getHtmlPrice()
1025
- * @uses imagifyModal.switchToView()
1026
- * @uses imagifyModal.populatePayBtn()
1027
- */
1028
- imagifyModal.$modal.on( 'click.imagify', '.imagify-payment-btn-select-plan', function( e ) {
1029
- var $_this = $( this ),
1030
- $offer_line = $_this.closest( '.imagify-offer-line' ),
1031
- datas = $_this.data( 'offer' ),
1032
- datas_str = $_this.attr( 'data-offer' ),
1033
- is_onetime = $_this.closest( '.imagify-tab-content' ).attr( 'id' ) !== 'imagify-pricing-tab-monthly',
1034
- $target_line = is_onetime ? imagifyModal.$preView.find( '.imagify-offer-onetime' ) : imagifyModal.$preView.find( '.imagify-offer-monthly' ),
1035
- period = is_onetime ? null : ( $_this.closest( '.imagify-pricing-table' ).hasClass( 'imagify-month-selected' ) ? 'monthly' : 'yearly' ),
1036
- price = is_onetime ? imagifyModal.getHtmlPrice( datas[ Object.keys( datas )[0] ].price ) : imagifyModal.getHtmlPrice( datas[ Object.keys( datas )[0] ].prices, period ),
1037
- monthly_txt = is_onetime ? '' : '<span class="imagify-price-by">' + $offer_line.find( '.imagify-price-by' ).text() + '</span>',
1038
- discount = $offer_line.find( '.imagify-price-discount' ).html(),
1039
- imgs = $offer_line.find( '.imagify-approx-nb' ).text(),
1040
- offer_size = $offer_line.find( '.imagify-offer-size' ).text();
1041
-
1042
- e.preventDefault();
1043
-
1044
- // Change views to go back pre-checkout.
1045
- imagifyModal.switchToView( imagifyModal.$preView );
1046
-
1047
- // Change price (+ "/month" if found in monthly plans).
1048
- $target_line.find( '.imagify-number-block' ).html( price + monthly_txt );
1049
-
1050
- // Change discount.
1051
- $target_line.find( '.imagify-price-discount' ).html( discount );
1052
-
1053
- // Change approx images nb.
1054
- $target_line.find( '.imagify-approx-nb' ).text( imgs );
1055
-
1056
- // Change offer size name.
1057
- $target_line.find( '.imagify-offer-size' ).text( offer_size );
1058
-
1059
- // Change datas (json).
1060
- $target_line.attr( 'data-offer', datas_str );
1061
-
1062
- if ( ! is_onetime ) {
1063
- $target_line.find( '.imagify-price-add-data' ).text( $offer_line.find( '.imagify-price-add-data' ).text() );
1064
-
1065
- // Trigger period selected from offer selection view to pre-checkout view.
1066
- if ( 'monthly' === period ) {
1067
- $target_line.find( '#imagify-subscription-monthly' ).trigger( 'click.imagify' );
1068
- } else {
1069
- $target_line.find( '#imagify-subscription-yearly' ).trigger( 'click.imagify' );
1070
- }
1071
- $target_line.find( '.imagify-inline-options' ).find( 'input:radio:checked' ).trigger( 'change.imagify' );
1072
- }
1073
-
1074
- // Update price information in button.
1075
- imagifyModal.populatePayBtn();
1076
- } );
1077
-
1078
- /**
1079
- * 2) when you checkout.
1080
- *
1081
- * @uses imagifyModal.switchToView()
1082
- * @uses imagifyModal.getPeriod()
1083
- * @uses imagifyModal.iframeSetSrc()
1084
- */
1085
- $( '#imagify-modal-checkout-btn' ).on( 'click.imagify', function( e ) {
1086
- var $monthly_offer, $onetime_offer, checkout_datas;
1087
-
1088
- e.preventDefault();
1089
-
1090
- // Do nothing if button disabled.
1091
- if ( $( this ).hasClass( 'imagify-button-disabled' ) ) {
1092
- return;
1093
- }
1094
-
1095
- $monthly_offer = $( '.imagify-offer-monthly' );
1096
- $onetime_offer = $( '.imagify-offer-onetime' );
1097
- checkout_datas = {};
1098
-
1099
- // If user choose a monthly plan.
1100
- if ( $monthly_offer.hasClass( 'imagify-offer-selected' ) ) {
1101
- checkout_datas.monthly = JSON.parse( $monthly_offer.attr( 'data-offer' ) );
1102
- }
1103
-
1104
- // If user choose a One Time plan.
1105
- if ( $onetime_offer.hasClass( 'imagify-offer-selected' ) ) {
1106
- checkout_datas.onetime = JSON.parse( $onetime_offer.attr( 'data-offer' ) );
1107
- }
1108
-
1109
- // Change views to go to checkout/payment view.
1110
- imagifyModal.switchToView( imagifyModal.$paymentView );
1111
-
1112
- checkout_datas.period = imagifyModal.getPeriod();
1113
-
1114
- imagifyModal.iframeSetSrc( checkout_datas );
1115
- } );
1116
-
1117
- /**
1118
- * Go back to previous step ("Choose Another Plan" links).
1119
- */
1120
- $( '.imagify-back-to-plans' ).on( 'click.imagify', function( e ) {
1121
- var $_this = $( this ),
1122
- is_onetime = $_this.closest( '.imagify-cart-item' ).hasClass( 'imagify-cart-item-onetime' );
1123
-
1124
- e.preventDefault();
1125
-
1126
- if ( is_onetime ) {
1127
- $( '.imagify-offer-onetime' ).find( '.imagify-choose-another-plan' ).trigger( 'click.imagify' );
1128
- } else {
1129
- $( '.imagify-offer-monthly' ).find( '.imagify-choose-another-plan' ).trigger( 'click.imagify' );
1130
- }
1131
- } );
1132
-
1133
- // Message/communication API.
1134
- w.addEventListener( 'message', imagifyModal.checkPluginMessage, true );
1135
-
1136
- } )(jQuery, document, window);
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=25,x="",y="";if(f.success){if(g=d.data,h=b.data,i=f.data,j={mo:h.monthlies,ot:h.onetimes},k={month:g.average_month_size.raw/Math.pow(1024,2),total:g.total_library_size.raw/Math.pow(1024,2)},m=a("#imagify-offer-monthly-template"),n=a("#imagify-offer-onetime-template"),o=n.html(),p=m.html(),q=a(".imagify-estimation-block"),a.each(j.mo,function(a,b){if("free"===b.label)return w=b.quota,j.mo.splice(a,1),!1}),q.removeClass("imagify-analyzing"),q.find(".average-month-size").text(g.average_month_size.human),q.find(".total-library-size").text(g.total_library_size.human),k.total+k.month<w?a(".imagify-pre-checkout-offers .imagify-modal-title").addClass("imagify-enough-free"):a(".imagify-enough-free").removeClass("imagify-enough-free"),a(".imagify-offer-selected").removeClass("imagify-offer-selected").find(".imagify-checkbox").prop("checked",!1),null===j.mo||null===j.ot)return r=a(".imagify-pre-checkout-offers"),r.hide().attr("aria-hidden",!0),r.closest(".imagify-modal-views").find(".imagify-popin-message").remove(),r.after('<div class="imagify-popin-message imagify-error"><p>'+imagifyPricingModal.labels.errorPriceAPI+"</p></div>"),void e.$modal.find(".imagify-modal-loader").fadeOut(300);c.imagify_discount_datas=i,i.is_active&&(s=a(".imagify-modal-promotion"),t=i.date_end.split("T")[0],u=i.coupon_value,v="percentage"===i.coupon_type?u+"%":"$"+u,a("#imagify-coupon-code").val(i.label).attr("readonly",!0),s.addClass("active").attr("aria-hidden","false"),s.find(".imagify-promotion-number").text(v),s.find(".imagify-promotion-date").text(t),e.checkCoupon()),l=e.getSuggestedOffers(j,k,w),a.each(j.mo,function(b,c){var d,f,g="";if(b-l.mo.index>2)return!0;b===l.mo.index&&(f=a(".imagify-pre-checkout-offers .imagify-offer-monthly"),l.mo.selected&&(g=" imagify-offer-selected",f.addClass("imagify-offer-selected").find(".imagify-checkbox").prop("checked",!0)),e.populateOffer(f,c,"monthly")),d=a(p).clone(),d=e.populateOffer(d,c,"monthly",g),y+=d[0].outerHTML}),a.each(j.ot,function(b,c){var d,f,g="";b===l.ot.index&&(f=a(".imagify-pre-checkout-offers .imagify-offer-onetime"),l.ot.selected&&(g=" imagify-offer-selected",f.addClass("imagify-offer-selected").find(".imagify-checkbox").prop("checked",!0)),e.populateOffer(f,c,"onetime")),d=a(o).clone(),d=e.populateOffer(d,c,"onetime",g),x+=d[0].outerHTML}),m.parent().find(".imagify-offer-line")&&m.parent().find(".imagify-offer-line").remove(),m.before(y),n.parent().find(".imagify-offer-line")&&n.parent().find(".imagify-offer-line").remove(),n.before(x),e.$modal.find(".imagify-modal-loader").fadeOut(300)}})}),e.populatePayBtn()})},getSuggestedOffers:function(b,c,d){var e=c.total+c.month,f={mo:!1,ot:!1};return c.month<=d?(f.mo={index:0,selected:0},e-=d):(a.each(b.mo,function(a,b){return b.quota<c.month||(f.mo={index:a,selected:1},!1)}),!1===f.mo&&(f.mo={index:b.mo.length-1,selected:1}),e-=b.mo[f.mo.index].quota),e<=0?(a.each(b.ot,function(a,b){return b.quota<c.total||(f.ot={index:a,selected:0},!1)}),!1===f.ot&&(f.ot={index:b.ot.length-1,selected:0}),f):(a.each(b.ot,function(a,b){return b.quota<e||(f.ot={index:a,selected:1},!1)}),!1!==f.ot?f:(f.ot={index:b.ot.length-1,selected:1},f.mo=!1,e=c.total+c.month-b.ot[f.ot.index].quota,a.each(b.mo,function(a,b){return b.quota<e||(f.mo={index:a,selected:1},!1)}),!1===f.mo&&(f.mo={index:b.mo.length-1,selected:1}),f))},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);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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.8.1
7
  * Author: WP Media
8
  * Author URI: https://wp-media.me/
9
  * Licence: GPLv2
@@ -14,30 +14,29 @@
14
  * Copyright 2018 WP Media
15
  */
16
 
17
- defined( 'ABSPATH' ) || die( 'Cheatin\' uh?' );
18
-
19
 
20
  // Imagify defines.
21
- define( 'IMAGIFY_VERSION' , '1.8.1' );
22
- define( 'IMAGIFY_WP_MIN' , '4.0' );
23
- define( 'IMAGIFY_SLUG' , 'imagify' );
24
- define( 'IMAGIFY_FILE' , __FILE__ );
25
- define( 'IMAGIFY_PATH' , realpath( plugin_dir_path( IMAGIFY_FILE ) ) . '/' );
26
- define( 'IMAGIFY_INC_PATH' , realpath( IMAGIFY_PATH . 'inc/' ) . '/' );
27
- define( 'IMAGIFY_ADMIN_PATH' , realpath( IMAGIFY_INC_PATH . 'admin' ) . '/' );
28
- define( 'IMAGIFY_COMMON_PATH' , realpath( IMAGIFY_INC_PATH . 'common' ) . '/' );
29
  define( 'IMAGIFY_FUNCTIONS_PATH', realpath( IMAGIFY_INC_PATH . 'functions' ) . '/' );
30
- define( 'IMAGIFY_CLASSES_PATH' , realpath( IMAGIFY_INC_PATH . 'classes' ) . '/' );
31
  define( 'IMAGIFY_3RD_PARTY_PATH', realpath( IMAGIFY_INC_PATH . '3rd-party' ) . '/' );
32
- define( 'IMAGIFY_URL' , plugin_dir_url( IMAGIFY_FILE ) );
33
- define( 'IMAGIFY_INC_URL' , IMAGIFY_URL . 'inc/' );
34
- define( 'IMAGIFY_ADMIN_URL' , IMAGIFY_INC_URL . 'admin/' );
35
- define( 'IMAGIFY_ASSETS_URL' , IMAGIFY_URL . 'assets/' );
36
- define( 'IMAGIFY_ASSETS_JS_URL' , IMAGIFY_ASSETS_URL . 'js/' );
37
  define( 'IMAGIFY_ASSETS_CSS_URL', IMAGIFY_ASSETS_URL . 'css/' );
38
  define( 'IMAGIFY_ASSETS_IMG_URL', IMAGIFY_ASSETS_URL . 'images/' );
39
- define( 'IMAGIFY_MAX_BYTES' , 5242880 );
40
- define( 'IMAGIFY_INT_MAX' , PHP_INT_MAX - 30 );
41
 
42
  add_action( 'plugins_loaded', '_imagify_init' );
43
  /**
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.8.3
7
  * Author: WP Media
8
  * Author URI: https://wp-media.me/
9
  * Licence: GPLv2
14
  * Copyright 2018 WP Media
15
  */
16
 
17
+ defined( 'ABSPATH' ) || die( 'Cheatin uh?' );
 
18
 
19
  // Imagify defines.
20
+ define( 'IMAGIFY_VERSION', '1.8.3' );
21
+ define( 'IMAGIFY_WP_MIN', '4.0' );
22
+ define( 'IMAGIFY_SLUG', 'imagify' );
23
+ define( 'IMAGIFY_FILE', __FILE__ );
24
+ define( 'IMAGIFY_PATH', realpath( plugin_dir_path( IMAGIFY_FILE ) ) . '/' );
25
+ define( 'IMAGIFY_INC_PATH', realpath( IMAGIFY_PATH . 'inc/' ) . '/' );
26
+ define( 'IMAGIFY_ADMIN_PATH', realpath( IMAGIFY_INC_PATH . 'admin' ) . '/' );
27
+ define( 'IMAGIFY_COMMON_PATH', realpath( IMAGIFY_INC_PATH . 'common' ) . '/' );
28
  define( 'IMAGIFY_FUNCTIONS_PATH', realpath( IMAGIFY_INC_PATH . 'functions' ) . '/' );
29
+ define( 'IMAGIFY_CLASSES_PATH', realpath( IMAGIFY_INC_PATH . 'classes' ) . '/' );
30
  define( 'IMAGIFY_3RD_PARTY_PATH', realpath( IMAGIFY_INC_PATH . '3rd-party' ) . '/' );
31
+ define( 'IMAGIFY_URL', plugin_dir_url( IMAGIFY_FILE ) );
32
+ define( 'IMAGIFY_INC_URL', IMAGIFY_URL . 'inc/' );
33
+ define( 'IMAGIFY_ADMIN_URL', IMAGIFY_INC_URL . 'admin/' );
34
+ define( 'IMAGIFY_ASSETS_URL', IMAGIFY_URL . 'assets/' );
35
+ define( 'IMAGIFY_ASSETS_JS_URL', IMAGIFY_ASSETS_URL . 'js/' );
36
  define( 'IMAGIFY_ASSETS_CSS_URL', IMAGIFY_ASSETS_URL . 'css/' );
37
  define( 'IMAGIFY_ASSETS_IMG_URL', IMAGIFY_ASSETS_URL . 'images/' );
38
+ define( 'IMAGIFY_MAX_BYTES', 5242880 );
39
+ define( 'IMAGIFY_INT_MAX', PHP_INT_MAX - 30 );
40
 
41
  add_action( 'plugins_loaded', '_imagify_init' );
42
  /**
inc/3rd-party/3rd-party.php CHANGED
@@ -1,5 +1,5 @@
1
  <?php
2
- defined( 'ABSPATH' ) || die( 'Cheatin\' uh?' );
3
 
4
  /**
5
  * Plugins.
@@ -10,6 +10,7 @@ require IMAGIFY_3RD_PARTY_PATH . 'formidable-pro/formidable-pro.php';
10
  require IMAGIFY_3RD_PARTY_PATH . 'nextgen-gallery/nextgen-gallery.php';
11
  require IMAGIFY_3RD_PARTY_PATH . 'regenerate-thumbnails/regenerate-thumbnails.php';
12
  require IMAGIFY_3RD_PARTY_PATH . 'wp-retina-2x/wp-retina-2x.php';
 
13
  require IMAGIFY_3RD_PARTY_PATH . 'screets-lc.php';
14
  require IMAGIFY_3RD_PARTY_PATH . 'wp-real-media-library.php';
15
  require IMAGIFY_3RD_PARTY_PATH . 'wp-rocket.php';
1
  <?php
2
+ defined( 'ABSPATH' ) || die( 'Cheatin uh?' );
3
 
4
  /**
5
  * Plugins.
10
  require IMAGIFY_3RD_PARTY_PATH . 'nextgen-gallery/nextgen-gallery.php';
11
  require IMAGIFY_3RD_PARTY_PATH . 'regenerate-thumbnails/regenerate-thumbnails.php';
12
  require IMAGIFY_3RD_PARTY_PATH . 'wp-retina-2x/wp-retina-2x.php';
13
+ require IMAGIFY_3RD_PARTY_PATH . 'wp-time-capsule/wp-time-capsule.php';
14
  require IMAGIFY_3RD_PARTY_PATH . 'screets-lc.php';
15
  require IMAGIFY_3RD_PARTY_PATH . 'wp-real-media-library.php';
16
  require IMAGIFY_3RD_PARTY_PATH . 'wp-rocket.php';
inc/3rd-party/amazon-s3-and-cloudfront/amazon-s3-and-cloudfront.php CHANGED
@@ -1,5 +1,5 @@
1
  <?php
2
- defined( 'ABSPATH' ) || die( 'Cheatin\' uh?' );
3
 
4
  /**
5
  * Tell if WP Offload S3 compatibility is loaded.
1
  <?php
2
+ defined( 'ABSPATH' ) || die( 'Cheatin uh?' );
3
 
4
  /**
5
  * Tell if WP Offload S3 compatibility is loaded.
inc/3rd-party/amazon-s3-and-cloudfront/inc/classes/class-imagify-as3cf-attachment.php CHANGED
@@ -1,5 +1,5 @@
1
  <?php
2
- defined( 'ABSPATH' ) || die( 'Cheatin\' uh?' );
3
 
4
  /**
5
  * Imagify WP Offload S3 attachment class.
@@ -788,7 +788,16 @@ class Imagify_AS3CF_Attachment extends Imagify_Attachment {
788
  */
789
  public function get_s3_info() {
790
  global $as3cf;
791
- return $as3cf ? $as3cf->get_attachment_s3_info( $this->id ) : false;
 
 
 
 
 
 
 
 
 
792
  }
793
 
794
  /**
@@ -823,7 +832,11 @@ class Imagify_AS3CF_Attachment extends Imagify_Attachment {
823
  $s3_object['key'] = $directory . $this->filesystem->file_name( $file_path );
824
 
825
  // Retrieve file from S3.
826
- $as3cf->plugin_compat->copy_s3_file_to_server( $s3_object, $file_path );
 
 
 
 
827
 
828
  return $this->filesystem->exists( $file_path ) ? $file_path : false;
829
  }
@@ -859,7 +872,11 @@ class Imagify_AS3CF_Attachment extends Imagify_Attachment {
859
  return false;
860
  }
861
 
862
- $s3_data = $as3cf->upload_attachment_to_s3( $this->id, $metadata, $attachment_path, false, $remove_local_files );
 
 
 
 
863
 
864
  return ! is_wp_error( $s3_data );
865
  }
1
  <?php
2
+ defined( 'ABSPATH' ) || die( 'Cheatin uh?' );
3
 
4
  /**
5
  * Imagify WP Offload S3 attachment class.
788
  */
789
  public function get_s3_info() {
790
  global $as3cf;
791
+
792
+ if ( ! $as3cf ) {
793
+ return false;
794
+ }
795
+
796
+ if ( method_exists( $as3cf, 'get_attachment_s3_info' ) ) {
797
+ return $as3cf->get_attachment_s3_info( $this->id );
798
+ }
799
+
800
+ return $as3cf->get_attachment_provider_info( $this->id );
801
  }
802
 
803
  /**
832
  $s3_object['key'] = $directory . $this->filesystem->file_name( $file_path );
833
 
834
  // Retrieve file from S3.
835
+ if ( method_exists( $as3cf->plugin_compat, 'copy_s3_file_to_server' ) ) {
836
+ $as3cf->plugin_compat->copy_s3_file_to_server( $s3_object, $file_path );
837
+ } else {
838
+ $as3cf->plugin_compat->copy_provider_file_to_server( $s3_object, $file_path );
839
+ }
840
 
841
  return $this->filesystem->exists( $file_path ) ? $file_path : false;
842
  }
872
  return false;
873
  }
874
 
875
+ if ( method_exists( $as3cf, 'upload_attachment_to_s3' ) ) {
876
+ $s3_data = $as3cf->upload_attachment_to_s3( $this->id, $metadata, $attachment_path, false, $remove_local_files );
877
+ } else {
878
+ $s3_data = $as3cf->upload_attachment( $this->id, $metadata, $attachment_path, false, $remove_local_files );
879
+ }
880
 
881
  return ! is_wp_error( $s3_data );
882
  }
inc/3rd-party/amazon-s3-and-cloudfront/inc/classes/class-imagify-as3cf.php CHANGED
@@ -1,5 +1,5 @@
1
  <?php
2
- defined( 'ABSPATH' ) || die( 'Cheatin\' uh?' );
3
 
4
  /**
5
  * Imagify WP Offload S3 class.
@@ -253,7 +253,11 @@ class Imagify_AS3CF extends Imagify_AS3CF_Deprecated {
253
  $s3_object['key'] = $directory . $this->filesystem->file_name( $file_path );
254
 
255
  // Retrieve file from S3.
256
- $as3cf->plugin_compat->copy_s3_file_to_server( $s3_object, $file_path );
 
 
 
 
257
 
258
  unset( $s3_data[ $id ], $ids[ $id ] );
259
  }
1
  <?php
2
+ defined( 'ABSPATH' ) || die( 'Cheatin uh?' );
3
 
4
  /**
5
  * Imagify WP Offload S3 class.
253
  $s3_object['key'] = $directory . $this->filesystem->file_name( $file_path );
254
 
255
  // Retrieve file from S3.
256
+ if ( method_exists( $as3cf->plugin_compat, 'copy_s3_file_to_server' ) ) {
257
+ $as3cf->plugin_compat->copy_s3_file_to_server( $s3_object, $file_path );
258
+ } else {
259
+ $as3cf->plugin_compat->copy_provider_file_to_server( $s3_object, $file_path );
260
+ }
261
 
262
  unset( $s3_data[ $id ], $ids[ $id ] );
263
  }
inc/3rd-party/enable-media-replace/enable-media-replace.php CHANGED
@@ -1,5 +1,5 @@
1
  <?php
2
- defined( 'ABSPATH' ) || die( 'Cheatin\' uh?' );
3
 
4
  if ( function_exists( 'enable_media_replace' ) ) :
5
 
1
  <?php
2
+ defined( 'ABSPATH' ) || die( 'Cheatin uh?' );
3
 
4
  if ( function_exists( 'enable_media_replace' ) ) :
5
 
inc/3rd-party/enable-media-replace/inc/classes/class-imagify-enable-media-replace.php CHANGED
@@ -1,5 +1,5 @@
1
  <?php
2
- defined( 'ABSPATH' ) || die( 'Cheatin\' uh?' );
3
 
4
  /**
5
  * Compat class for Enable Media Replace plugin.
1
  <?php
2
+ defined( 'ABSPATH' ) || die( 'Cheatin uh?' );
3
 
4
  /**
5
  * Compat class for Enable Media Replace plugin.
inc/3rd-party/formidable-pro/formidable-pro.php CHANGED
@@ -1,5 +1,5 @@
1
  <?php
2
- defined( 'ABSPATH' ) || die( 'Cheatin\' uh?' );
3
 
4
  if ( class_exists( 'FrmProEddController' ) ) :
5
 
1
  <?php
2
+ defined( 'ABSPATH' ) || die( 'Cheatin uh?' );
3
 
4
  if ( class_exists( 'FrmProEddController' ) ) :
5
 
inc/3rd-party/formidable-pro/inc/classes/class-imagify-formidable-pro.php CHANGED
@@ -1,5 +1,5 @@
1
  <?php
2
- defined( 'ABSPATH' ) || die( 'Cheatin\' uh?' );
3
 
4
  /**
5
  * Compat class for Formidable Forms Pro plugin.
1
  <?php
2
+ defined( 'ABSPATH' ) || die( 'Cheatin uh?' );
3
 
4
  /**
5
  * Compat class for Formidable Forms Pro plugin.
inc/3rd-party/hosting/siteground.php CHANGED
@@ -1,5 +1,5 @@
1
  <?php
2
- defined( 'ABSPATH' ) || die( 'Cheatin\' uh?' );
3
 
4
  add_filter( 'http_request_args', 'imagify_siteground_change_user_agent', 10, 2 );
5
  /**
1
  <?php
2
+ defined( 'ABSPATH' ) || die( 'Cheatin uh?' );
3
 
4
  add_filter( 'http_request_args', 'imagify_siteground_change_user_agent', 10, 2 );
5
  /**
inc/3rd-party/hosting/wpengine.php CHANGED
@@ -1,5 +1,5 @@
1
  <?php
2
- defined( 'ABSPATH' ) || die( 'Cheatin\' uh?' );
3
 
4
  if ( class_exists( 'WpeCommon' ) ) :
5
 
1
  <?php
2
+ defined( 'ABSPATH' ) || die( 'Cheatin uh?' );
3
 
4
  if ( class_exists( 'WpeCommon' ) ) :
5
 
inc/3rd-party/nextgen-gallery/inc/admin/ajax.php CHANGED
@@ -1,5 +1,5 @@
1
  <?php
2
- defined( 'ABSPATH' ) || die( 'Cheatin\' uh?' );
3
 
4
  add_action( 'wp_ajax_imagify_manual_upload', '_do_admin_post_imagify_ngg_user_capacity', 5 );
5
  add_action( 'admin_post_imagify_manual_upload', '_do_admin_post_imagify_ngg_user_capacity', 5 );
1
  <?php
2
+ defined( 'ABSPATH' ) || die( 'Cheatin uh?' );
3
 
4
  add_action( 'wp_ajax_imagify_manual_upload', '_do_admin_post_imagify_ngg_user_capacity', 5 );
5
  add_action( 'admin_post_imagify_manual_upload', '_do_admin_post_imagify_ngg_user_capacity', 5 );
inc/3rd-party/nextgen-gallery/inc/admin/bulk.php CHANGED
@@ -1,5 +1,5 @@
1
  <?php
2
- defined( 'ABSPATH' ) || die( 'Cheatin\' uh?' );
3
 
4
  add_filter( 'imagify_bulk_page_types', 'imagify_ngg_bulk_page_types' );
5
  /**
1
  <?php
2
+ defined( 'ABSPATH' ) || die( 'Cheatin uh?' );
3
 
4
  add_filter( 'imagify_bulk_page_types', 'imagify_ngg_bulk_page_types' );
5
  /**
inc/3rd-party/nextgen-gallery/inc/admin/enqueue.php CHANGED
@@ -1,5 +1,5 @@
1
  <?php
2
- defined( 'ABSPATH' ) || die( 'Cheatin\' uh?' );
3
 
4
  add_action( 'imagify_assets_enqueued', '_imagify_ngg_admin_print_styles' );
5
  /**
1
  <?php
2
+ defined( 'ABSPATH' ) || die( 'Cheatin uh?' );
3
 
4
  add_action( 'imagify_assets_enqueued', '_imagify_ngg_admin_print_styles' );
5
  /**
inc/3rd-party/nextgen-gallery/inc/admin/gallery.php CHANGED
@@ -1,5 +1,5 @@
1
  <?php
2
- defined( 'ABSPATH' ) || die( 'Cheatin\' uh?' );
3
 
4
  add_filter( 'ngg_manage_images_number_of_columns', '_imagify_ngg_manage_images_number_of_columns' );
5
  /**
1
  <?php
2
+ defined( 'ABSPATH' ) || die( 'Cheatin uh?' );
3
 
4
  add_filter( 'ngg_manage_images_number_of_columns', '_imagify_ngg_manage_images_number_of_columns' );
5
  /**
inc/3rd-party/nextgen-gallery/inc/admin/heartbeat.php CHANGED
@@ -1,5 +1,5 @@
1
  <?php
2
- defined( 'ABSPATH' ) || die( 'Cheatin\' uh?' );
3
 
4
  global $pagenow;
5
 
1
  <?php
2
+ defined( 'ABSPATH' ) || die( 'Cheatin uh?' );
3
 
4
  global $pagenow;
5
 
inc/3rd-party/nextgen-gallery/inc/admin/menu.php CHANGED
@@ -1,5 +1,5 @@
1
  <?php
2
- defined( 'ABSPATH' ) || die( 'Cheatin\' uh?' );
3
 
4
  add_action( 'admin_menu', '_imagify_ngg_bulk_optimization_menu' );
5
  /**
1
  <?php
2
+ defined( 'ABSPATH' ) || die( 'Cheatin uh?' );
3
 
4
  add_action( 'admin_menu', '_imagify_ngg_bulk_optimization_menu' );
5
  /**
inc/3rd-party/nextgen-gallery/inc/classes/class-imagify-ngg-attachment.php CHANGED
@@ -1,5 +1,5 @@
1
  <?php
2
- defined( 'ABSPATH' ) || die( 'Cheatin\' uh?' );
3
 
4
  /**
5
  * Imagify NextGen Gallery attachment class.
1
  <?php
2
+ defined( 'ABSPATH' ) || die( 'Cheatin uh?' );
3
 
4
  /**
5
  * Imagify NextGen Gallery attachment class.
inc/3rd-party/nextgen-gallery/inc/classes/class-imagify-ngg-db.php CHANGED
@@ -1,5 +1,5 @@
1
  <?php
2
- defined( 'ABSPATH' ) || die( 'Cheatin\' uh?' );
3
 
4
  /**
5
  * Imagify NextGen Gallery DB class.
1
  <?php
2
+ defined( 'ABSPATH' ) || die( 'Cheatin uh?' );
3
 
4
  /**
5
  * Imagify NextGen Gallery DB class.
inc/3rd-party/nextgen-gallery/inc/classes/class-imagify-ngg-dynamic-thumbnails-background-process.php CHANGED
@@ -1,5 +1,5 @@
1
  <?php
2
- defined( 'ABSPATH' ) || die( 'Cheatin\' uh?' );
3
 
4
  /**
5
  * Class that handles background processing of thumbnails dynamically generated.
1
  <?php
2
+ defined( 'ABSPATH' ) || die( 'Cheatin uh?' );
3
 
4
  /**
5
  * Class that handles background processing of thumbnails dynamically generated.
inc/3rd-party/nextgen-gallery/inc/classes/class-imagify-ngg-storage.php CHANGED
@@ -1,5 +1,5 @@
1
  <?php
2
- defined( 'ABSPATH' ) || die( 'Cheatin\' uh?' );
3
 
4
  /**
5
  * Imagify NextGen Gallery storage class.
1
  <?php
2
+ defined( 'ABSPATH' ) || die( 'Cheatin uh?' );
3
 
4
  /**
5
  * Imagify NextGen Gallery storage class.
inc/3rd-party/nextgen-gallery/inc/classes/class-imagify-ngg.php CHANGED
@@ -1,5 +1,5 @@
1
  <?php
2
- defined( 'ABSPATH' ) || die( 'Cheatin\' uh?' );
3
 
4
  /**
5
  * Imagify NextGen Gallery class.
1
  <?php
2
+ defined( 'ABSPATH' ) || die( 'Cheatin uh?' );
3
 
4
  /**
5
  * Imagify NextGen Gallery class.
inc/3rd-party/nextgen-gallery/inc/common/attachments.php CHANGED
@@ -1,5 +1,5 @@
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
  /**
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
  /**
inc/3rd-party/nextgen-gallery/inc/functions/admin-stats.php CHANGED
@@ -1,5 +1,5 @@
1
  <?php
2
- defined( 'ABSPATH' ) || die( 'Cheatin\' uh?' );
3
 
4
  /**
5
  * Count number of attachments.
1
  <?php
2
+ defined( 'ABSPATH' ) || die( 'Cheatin uh?' );
3
 
4
  /**
5
  * Count number of attachments.
inc/3rd-party/nextgen-gallery/inc/functions/attachments.php CHANGED
@@ -1,5 +1,5 @@
1
  <?php
2
- defined( 'ABSPATH' ) || die( 'Cheatin\' uh?' );
3
 
4
  /**
5
  * Get the backup path of a specific attachement.
1
  <?php
2
+ defined( 'ABSPATH' ) || die( 'Cheatin uh?' );
3
 
4
  /**
5
  * Get the backup path of a specific attachement.
inc/3rd-party/nextgen-gallery/inc/functions/common.php CHANGED
@@ -1,5 +1,5 @@
1
  <?php
2
- defined( 'ABSPATH' ) || die( 'Cheatin\' uh?' );
3
 
4
  /**
5
  * Get user capacity to operate Imagify within NGG galleries.
1
  <?php
2
+ defined( 'ABSPATH' ) || die( 'Cheatin uh?' );
3
 
4
  /**
5
  * Get user capacity to operate Imagify within NGG galleries.
inc/3rd-party/nextgen-gallery/nextgen-gallery.php CHANGED
@@ -1,5 +1,5 @@
1
  <?php
2
- defined( 'ABSPATH' ) || die( 'Cheatin\' uh?' );
3
 
4
  if ( ! class_exists( 'C_NextGEN_Bootstrap' ) || ! class_exists( 'Mixin' ) || ! get_site_option( 'ngg_options' ) ) {
5
  return;
1
  <?php
2
+ defined( 'ABSPATH' ) || die( 'Cheatin uh?' );
3
 
4
  if ( ! class_exists( 'C_NextGEN_Bootstrap' ) || ! class_exists( 'Mixin' ) || ! get_site_option( 'ngg_options' ) ) {
5
  return;
inc/3rd-party/regenerate-thumbnails/inc/classes/class-imagify-regenerate-thumbnails.php CHANGED
@@ -1,5 +1,5 @@
1
  <?php
2
- defined( 'ABSPATH' ) || die( 'Cheatin\' uh?' );
3
 
4
  /**
5
  * Class that handles compatibility with Regenerate Thumbnails plugin.
1
  <?php
2
+ defined( 'ABSPATH' ) || die( 'Cheatin uh?' );
3
 
4
  /**
5
  * Class that handles compatibility with Regenerate Thumbnails plugin.
inc/3rd-party/regenerate-thumbnails/regenerate-thumbnails.php CHANGED
@@ -1,5 +1,5 @@
1
  <?php
2
- defined( 'ABSPATH' ) || die( 'Cheatin\' uh?' );
3
 
4
  if ( ! class_exists( 'RegenerateThumbnails_Regenerator' ) || ! function_exists( 'RegenerateThumbnails' ) ) {
5
  return;
1
  <?php
2
+ defined( 'ABSPATH' ) || die( 'Cheatin uh?' );
3
 
4
  if ( ! class_exists( 'RegenerateThumbnails_Regenerator' ) || ! function_exists( 'RegenerateThumbnails' ) ) {
5
  return;
inc/3rd-party/screets-lc.php CHANGED
@@ -1,5 +1,5 @@
1
  <?php
2
- defined( 'ABSPATH' ) || die( 'Cheatin\' uh?' );
3
 
4
  if ( function_exists( 'fn_lc_fix_ssl_upload_url' ) && defined( 'SLC_VERSION' ) && version_compare( SLC_VERSION, '2.2.8' ) < 0 ) :
5
 
1
  <?php
2
+ defined( 'ABSPATH' ) || die( 'Cheatin uh?' );
3
 
4
  if ( function_exists( 'fn_lc_fix_ssl_upload_url' ) && defined( 'SLC_VERSION' ) && version_compare( SLC_VERSION, '2.2.8' ) < 0 ) :
5
 
inc/3rd-party/wp-real-media-library.php CHANGED
@@ -1,5 +1,5 @@
1
  <?php
2
- defined( 'ABSPATH' ) || die( 'Cheatin\' uh?' );
3
 
4
  if ( defined( 'RML_FILE' ) ) :
5
 
1
  <?php
2
+ defined( 'ABSPATH' ) || die( 'Cheatin uh?' );
3
 
4
  if ( defined( 'RML_FILE' ) ) :
5
 
inc/3rd-party/wp-retina-2x/inc/classes/class-imagify-wp-retina-2x-core.php CHANGED
@@ -1,5 +1,5 @@
1
  <?php
2
- defined( 'ABSPATH' ) || die( 'Cheatin\' uh?' );
3
 
4
  /**
5
  * Class that handles all the main tools for compatibility with WP Retina 2x plugin.
1
  <?php
2
+ defined( 'ABSPATH' ) || die( 'Cheatin uh?' );
3
 
4
  /**
5
  * Class that handles all the main tools for compatibility with WP Retina 2x plugin.
inc/3rd-party/wp-retina-2x/inc/classes/class-imagify-wp-retina-2x.php CHANGED
@@ -1,5 +1,5 @@
1
  <?php
2
- defined( 'ABSPATH' ) || die( 'Cheatin\' uh?' );
3
 
4
  /**
5
  * Class that handles compatibility with WP Retina 2x plugin.
1
  <?php
2
+ defined( 'ABSPATH' ) || die( 'Cheatin uh?' );
3
 
4
  /**
5
  * Class that handles compatibility with WP Retina 2x plugin.
inc/3rd-party/wp-retina-2x/wp-retina-2x.php CHANGED
@@ -1,5 +1,5 @@
1
  <?php
2
- defined( 'ABSPATH' ) || die( 'Cheatin\' uh?' );
3
 
4
  if ( ! class_exists( 'Meow_WR2X_Core' ) ) {
5
  return;
1
  <?php
2
+ defined( 'ABSPATH' ) || die( 'Cheatin uh?' );
3
 
4
  if ( ! class_exists( 'Meow_WR2X_Core' ) ) {
5
  return;
inc/3rd-party/wp-rocket.php CHANGED
@@ -1,5 +1,5 @@
1
  <?php
2
- defined( 'ABSPATH' ) || die( 'Cheatin\' uh?' );
3
 
4
  if ( defined( 'WP_ROCKET_VERSION' ) ) :
5
 
1
  <?php
2
+ defined( 'ABSPATH' ) || die( 'Cheatin uh?' );
3
 
4
  if ( defined( 'WP_ROCKET_VERSION' ) ) :
5
 
inc/3rd-party/wp-time-capsule/inc/classes/class-imagify-wp-time-capsule.php ADDED
@@ -0,0 +1,337 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ defined( 'ABSPATH' ) || die( 'Cheatin\' uh?' );
3
+
4
+ /**
5
+ * Class that handles our partnership with WP Time Capsule.
6
+ *
7
+ * @since 1.8.2
8
+ * @author Grégory Viguier
9
+ */
10
+ class Imagify_WP_Time_Capsule {
11
+
12
+ /**
13
+ * Class version.
14
+ *
15
+ * @var string
16
+ * @since 1.8.2
17
+ * @author Grégory Viguier
18
+ */
19
+ const VERSION = '1.0';
20
+
21
+ /**
22
+ * Partner ID.
23
+ *
24
+ * @var string
25
+ * @since 1.8.2
26
+ * @author Grégory Viguier
27
+ */
28
+ const PARTNER_ID = 'imagify';
29
+
30
+ /**
31
+ * Affiliate base URL.
32
+ *
33
+ * @var string
34
+ * @since 1.8.2
35
+ * @author Grégory Viguier
36
+ */
37
+ const BASE_URL = 'https://wptimecapsule.com/updates/?partner=';
38
+
39
+ /**
40
+ * The single instance of the class.
41
+ *
42
+ * @var object Imagify_WP_Time_Machine
43
+ * @since 1.8.2
44
+ * @access protected
45
+ * @author Grégory Viguier
46
+ */
47
+ protected static $_instance;
48
+
49
+ /**
50
+ * Temporary state property that tells if the button in the iframe should be added.
51
+ *
52
+ * @var bool
53
+ * @since 1.8.2
54
+ * @access protected
55
+ * @author Grégory Viguier
56
+ */
57
+ protected $add_iframe_button = false;
58
+
59
+
60
+ /** ----------------------------------------------------------------------------------------- */
61
+ /** INSTANCE ================================================================================ */
62
+ /** ----------------------------------------------------------------------------------------- */
63
+
64
+ /**
65
+ * Get the main Instance.
66
+ *
67
+ * @since 1.8.2
68
+ * @access public
69
+ * @author Grégory Viguier
70
+ *
71
+ * @return object Main instance.
72
+ */
73
+ public static function get_instance() {
74
+ if ( ! isset( self::$_instance ) ) {
75
+ self::$_instance = new self();
76
+ }
77
+
78
+ return self::$_instance;
79
+ }
80
+
81
+ /**
82
+ * The constructor.
83
+ *
84
+ * @since 1.8.2
85
+ * @access protected
86
+ * @author Grégory Viguier
87
+ */
88
+ protected function __construct() {}
89
+
90
+
91
+ /** ----------------------------------------------------------------------------------------- */
92
+ /** INIT ==================================================================================== */
93
+ /** ----------------------------------------------------------------------------------------- */
94
+
95
+ /**
96
+ * Launch the hooks.
97
+ *
98
+ * @since 1.8.2
99
+ * @access public
100
+ * @author Grégory Viguier
101
+ */
102
+ public function init() {
103
+ if ( ! is_admin() ) {
104
+ return;
105
+ }
106
+
107
+ if ( defined( 'IMAGIFY_DISPLAY_PARTNERS' ) && ! IMAGIFY_DISPLAY_PARTNERS ) {
108
+ return;
109
+ }
110
+
111
+ add_filter( 'imagify_deactivatable_partners', array( $this, 'add_self' ) );
112
+
113
+ if ( ! get_imagify_option( 'partner_links' ) ) {
114
+ return;
115
+ }
116
+
117
+ add_action( 'in_plugin_update_message-' . plugin_basename( IMAGIFY_FILE ), array( $this, 'print_link_in_plugin_update_message' ), 10, 2 );
118
+ add_action( 'admin_print_styles-update-core.php', array( $this, 'add_style_to_core_update' ) );
119
+ add_action( 'admin_footer-update-core.php', array( $this, 'add_script_to_core_update' ) );
120
+ add_filter( 'plugins_api_result', array( $this, 'maybe_print_link_in_iframe_init' ), 10, 3 );
121
+ }
122
+
123
+
124
+ /** ----------------------------------------------------------------------------------------- */
125
+ /** HOOKS =================================================================================== */
126
+ /** ----------------------------------------------------------------------------------------- */
127
+
128
+ /**
129
+ * Add this partner to the list of partners affected by the display option.
130
+ *
131
+ * @since 1.8.2
132
+ * @access public
133
+ * @author Grégory Viguier
134
+ *
135
+ * @param array $partners An array of partner names.
136
+ * @return array
137
+ */
138
+ public function add_self( $partners ) {
139
+ $partners[] = 'WP Time Capsule';
140
+ return $partners;
141
+ }
142
+
143
+ /**
144
+ * Add a link in Imagify's update message (plugins list).
145
+ *
146
+ * @since 1.8.2
147
+ * @access public
148
+ * @author Grégory Viguier
149
+ *
150
+ * @param array $plugin_data {
151
+ * An array of plugin metadata.
152
+ *
153
+ * @type string $name The human-readable name of the plugin.
154
+ * @type string $plugin_uri Plugin URI.
155
+ * @type string $version Plugin version.
156
+ * @type string $description Plugin description.
157
+ * @type string $author Plugin author.
158
+ * @type string $author_uri Plugin author URI.
159
+ * @type string $text_domain Plugin text domain.
160
+ * @type string $domain_path Relative path to the plugin's .mo file(s).
161
+ * @type bool $network Whether the plugin can only be activated network wide.
162
+ * @type string $title The human-readable title of the plugin.
163
+ * @type string $author_name Plugin author's name.
164
+ * @type bool $update Whether there's an available update. Default null.
165
+ * }
166
+ * @param array $response {
167
+ * An array of metadata about the available plugin update.
168
+ *
169
+ * @type int $id Plugin ID.
170
+ * @type string $slug Plugin slug.
171
+ * @type string $new_version New plugin version.
172
+ * @type string $url Plugin URL.
173
+ * @type string $package Plugin update package URL.
174
+ * }
175
+ */
176
+ public function print_link_in_plugin_update_message( $plugin_data, $response ) {
177
+ if ( empty( $response->package ) || ! current_user_can( 'update_plugins' ) ) {
178
+ return;
179
+ }
180
+
181
+ $link = '<a href="' . esc_url( $this->get_url() ) . '" target="_blank" class="imagify-wp-time-capsule-link">';
182
+ $zelda = '<span class="dashicons dashicons-external" aria-hidden="true"></span>';
183
+
184
+ echo ' ';
185
+ /* translators: 1 is a link opening, 2 is a "new window" icon, 3 is the link closing. */
186
+ printf( __( 'You can also %1$sbackup and update %2$s%3$s.', 'imagify' ), $link, $zelda, '</a>' );
187
+ }
188
+
189
+ /**
190
+ * Print some CSS in the Core Update page for the link into the Imagify row.
191
+ *
192
+ * @since 1.8.2
193
+ * @access public
194
+ * @author Grégory Viguier
195
+ */
196
+ public function add_style_to_core_update() {
197
+ $action = filter_input( INPUT_GET, 'action', FILTER_SANITIZE_STRING );
198
+
199
+ if ( $action && 'upgrade-core' !== $action ) {
200
+ return;
201
+ }
202
+
203
+ echo "<style type='text/css'>\n";
204
+ echo ".imagify-wp-time-capsule-link:after { content: '\\f504'; font-size: 16px; vertical-align: top; font-family: dashicons; font-style: normal; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }\n";
205
+ echo "</style>\n";
206
+ }
207
+
208
+ /**
209
+ * Print some JS in the Core Update page to add a link into the Imagify row.
210
+ *
211
+ * @since 1.8.2
212
+ * @access public
213
+ * @author Grégory Viguier
214
+ */
215
+ public function add_script_to_core_update() {
216
+ $action = filter_input( INPUT_GET, 'action', FILTER_SANITIZE_STRING );
217
+
218
+ if ( $action && 'upgrade-core' !== $action ) {
219
+ return;
220
+ }
221
+
222
+ $link = __( 'Backup and Update', 'imagify' ) . ' <span class="dashicons dashicons-external"></span>';
223
+ $link = ' <a class="imagify-wp-time-capsule-link" href="' . esc_url( $this->get_url() ) . '" target="_blank">' . __( 'Backup and Update', 'imagify' ) . ' </a>';
224
+
225
+ $output = html_entity_decode( $link, ENT_QUOTES, 'UTF-8' );
226
+ $output = wp_json_encode( $output );
227
+ $output = 'jQuery( "#update-plugins-table .plugin-title p [href*=\"&plugin=imagify&\"]").after( ' . $output . ' );';
228
+
229
+ echo "<script type='text/javascript'>\n";
230
+ echo "/* <![CDATA[ */\n";
231
+ echo "$output\n";
232
+ echo "/* ]]> */\n";
233
+ echo "</script>\n";
234
+ }
235
+
236
+ /**
237
+ * Maybe launch the hooks that will add a button in the plugin information modal.
238
+ *
239
+ * @since 1.8.2
240
+ * @access public
241
+ * @author Grégory Viguier
242
+ *
243
+ * @param false|object|array $result The result object or array. Default false.
244
+ * @param string $action The type of information being requested from the Plugin Installation API.
245
+ * @param object $args Plugin API arguments.
246
+ * @return false|object|array
247
+ */
248
+ public function maybe_print_link_in_iframe_init( $result, $action, $args ) {
249
+ if ( 'plugin_information' !== $action ) {
250
+ return $result;
251
+ }
252
+ if ( empty( $args->slug ) || 'imagify' !== $args->slug ) {
253
+ return $result;
254
+ }
255
+
256
+ $res = (object) $result;
257
+
258
+ if ( empty( $res->slug ) || 'imagify' !== $res->slug ) {
259
+ return $result;
260
+ }
261
+
262
+ if ( empty( $res->download_link ) || ( ! current_user_can( 'install_plugins' ) && ! current_user_can( 'update_plugins' ) ) ) {
263
+ return $result;
264
+ }
265
+
266
+ $status = install_plugin_install_status( $res );
267
+
268
+ if ( 'update_available' !== $status['status'] ) {
269
+ return $result;
270
+ }
271
+
272
+ // OK, it's us.
273
+ $this->add_iframe_button = true;
274
+
275
+ add_action( 'admin_head-plugin-install.php', array( $this, 'print_link_in_iframe_init' ), IMAGIFY_INT_MAX );
276
+
277
+ return $result;
278
+ }
279
+
280
+ /**
281
+ * Launch a ob_start() at the beginning of the plugin information modal.
282
+ *
283
+ * @since 1.8.2
284
+ * @access public
285
+ * @author Grégory Viguier
286
+ */
287
+ public function print_link_in_iframe_init() {
288
+ if ( ! $this->add_iframe_button ) {
289
+ return;
290
+ }
291
+
292
+ ob_start();
293
+
294
+ add_action( 'admin_footer', array( $this, 'print_link_in_iframe' ), 5 );
295
+ }
296
+
297
+ /**
298
+ * Add a button in the plugin information modal.
299
+ *
300
+ * @since 1.8.2
301
+ * @access public
302
+ * @author Grégory Viguier
303
+ */
304
+ public function print_link_in_iframe() {
305
+ global $tab;
306
+
307
+ if ( ! $this->add_iframe_button ) {
308
+ return;
309
+ }
310
+
311
+ $this->add_iframe_button = false;
312
+
313
+ $footer = preg_quote( "<div id='$tab-footer'>", '@' );
314
+ $button = __( 'Backup and Update', 'imagify' ) . ' <span class="dashicons dashicons-external" aria-hidden="true" style="margin:-2px 0 -1px"></span>';
315
+ $button = '<a class="button button-primary right imagify-wp-time-capsule-link" href="' . esc_url( $this->get_url() ) . '" target="_blank" style="margin-right:10px">' . $button . '</a>';
316
+
317
+ echo preg_replace( "@{$footer}.+</a>@s", '$0' . $button, ob_get_clean() );
318
+ }
319
+
320
+
321
+ /** ----------------------------------------------------------------------------------------- */
322
+ /** TOOLS =================================================================================== */
323
+ /** ----------------------------------------------------------------------------------------- */
324
+
325
+ /**
326
+ * Get the partnership URL.
327
+ *
328
+ * @since 1.8.2
329
+ * @access public
330
+ * @author Grégory Viguier
331
+ *
332
+ * @return string
333
+ */
334
+ public function get_url() {
335
+ return self::BASE_URL . self::PARTNER_ID;
336
+ }
337
+ }
inc/3rd-party/wp-time-capsule/wp-time-capsule.php ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
1
+ <?php
2
+ defined( 'ABSPATH' ) || die( 'Cheatin\' uh?' );
3
+
4
+ if ( defined( 'WPTC_VERSION' ) ) {
5
+ return;
6
+ }
7
+
8
+ Imagify_WP_Time_Capsule::get_instance()->init();
inc/3rd-party/yoast-seo.php CHANGED
@@ -1,5 +1,5 @@
1
  <?php
2
- defined( 'ABSPATH' ) || die( 'Cheatin\' uh?' );
3
 
4
  if ( defined( 'WPSEO_VERSION' ) && is_admin() && ! wp_doing_ajax() ) :
5
 
1
  <?php
2
+ defined( 'ABSPATH' ) || die( 'Cheatin uh?' );
3
 
4
  if ( defined( 'WPSEO_VERSION' ) && is_admin() && ! wp_doing_ajax() ) :
5
 
inc/admin/custom-folders.php CHANGED
@@ -1,5 +1,5 @@
1
  <?php
2
- defined( 'ABSPATH' ) || die( 'Cheatin\' uh?' );
3
 
4
  add_filter( 'upgrader_post_install', 'imagify_sync_theme_plugin_files_on_update', IMAGIFY_INT_MAX, 3 );
5
  /**
1
  <?php
2
+ defined( 'ABSPATH' ) || die( 'Cheatin uh?' );
3
 
4
  add_filter( 'upgrader_post_install', 'imagify_sync_theme_plugin_files_on_update', IMAGIFY_INT_MAX, 3 );
5
  /**
inc/admin/heartbeat.php CHANGED
@@ -1,5 +1,5 @@
1
  <?php
2
- defined( 'ABSPATH' ) || die( 'Cheatin\' uh?' );
3
 
4
  global $pagenow;
5
 
1
  <?php
2
+ defined( 'ABSPATH' ) || die( 'Cheatin uh?' );
3
 
4
  global $pagenow;
5
 
inc/admin/media.php CHANGED
@@ -1,5 +1,5 @@
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
  /**
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
  /**
inc/admin/meta-boxes.php CHANGED
@@ -1,5 +1,5 @@
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
  /**
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
  /**
inc/admin/upgrader.php CHANGED
@@ -285,6 +285,11 @@ function _imagify_new_upgrade( $network_version, $site_version ) {
285
  $wpdb->query( $wpdb->prepare( "UPDATE {$wpdb->base_prefix}imagify_files SET path = REPLACE( path, '{{ABSPATH}}/', %s ) WHERE path LIKE %s", $replacement, '{{ABSPATH}}/%' ) );
286
  $wpdb->query( $wpdb->prepare( "UPDATE {$wpdb->base_prefix}imagify_folders SET path = REPLACE( path, '{{ABSPATH}}/', %s ) WHERE path LIKE %s", $replacement, '{{ABSPATH}}/%' ) );
287
  }
 
 
 
 
 
288
  }
289
 
290
  add_action( 'upgrader_process_complete', 'imagify_maybe_reset_opcache', 20, 2 );
285
  $wpdb->query( $wpdb->prepare( "UPDATE {$wpdb->base_prefix}imagify_files SET path = REPLACE( path, '{{ABSPATH}}/', %s ) WHERE path LIKE %s", $replacement, '{{ABSPATH}}/%' ) );
286
  $wpdb->query( $wpdb->prepare( "UPDATE {$wpdb->base_prefix}imagify_folders SET path = REPLACE( path, '{{ABSPATH}}/', %s ) WHERE path LIKE %s", $replacement, '{{ABSPATH}}/%' ) );
287
  }
288
+
289
+ // 1.8.2
290
+ if ( version_compare( $site_version, '1.8.2' ) < 0 ) {
291
+ Imagify_Options::get_instance()->set( 'partner_links', 1 );
292
+ }
293
  }
294
 
295
  add_action( 'upgrader_process_complete', 'imagify_maybe_reset_opcache', 20, 2 );
inc/admin/upload.php CHANGED
@@ -1,5 +1,5 @@
1
  <?php
2
- defined( 'ABSPATH' ) || die( 'Cheatin\' uh?' );
3
 
4
  add_filter( 'manage_media_columns', '_imagify_manage_media_columns' );
5
  /**
1
  <?php
2
+ defined( 'ABSPATH' ) || die( 'Cheatin uh?' );
3
 
4
  add_filter( 'manage_media_columns', '_imagify_manage_media_columns' );
5
  /**
inc/classes/class-imagify-abstract-attachment.php CHANGED
@@ -1,5 +1,5 @@
1
  <?php
2
- defined( 'ABSPATH' ) || die( 'Cheatin\' uh?' );
3
 
4
  /**
5
  * Imagify Attachment base class.
1
  <?php
2
+ defined( 'ABSPATH' ) || die( 'Cheatin uh?' );
3
 
4
  /**
5
  * Imagify Attachment base class.
inc/classes/class-imagify-abstract-background-process.php CHANGED
@@ -1,5 +1,5 @@
1
  <?php
2
- defined( 'ABSPATH' ) || die( 'Cheatin\' uh?' );
3
 
4
  /**
5
  * Class handling background processes.
1
  <?php
2
+ defined( 'ABSPATH' ) || die( 'Cheatin uh?' );
3
 
4
  /**
5
  * Class handling background processes.
inc/classes/class-imagify-abstract-cron.php CHANGED
@@ -1,5 +1,5 @@
1
  <?php
2
- defined( 'ABSPATH' ) || die( 'Cheatin\' uh?' );
3
 
4
  /**
5
  * Basis class that handles events.
1
  <?php
2
+ defined( 'ABSPATH' ) || die( 'Cheatin uh?' );
3
 
4
  /**
5
  * Basis class that handles events.
inc/classes/class-imagify-abstract-db.php CHANGED
@@ -1,5 +1,5 @@
1
  <?php
2
- defined( 'ABSPATH' ) || die( 'Cheatin\' uh?' );
3
 
4
  /**
5
  * Imagify DB base class.
1
  <?php
2
+ defined( 'ABSPATH' ) || die( 'Cheatin uh?' );
3
 
4
  /**
5
  * Imagify DB base class.
inc/classes/class-imagify-abstract-options.php CHANGED
@@ -1,5 +1,5 @@
1
  <?php
2
- defined( 'ABSPATH' ) || die( 'Cheatin\' uh?' );
3
 
4
  /**
5
  * Abstract class to handle a part of the plugin options.
1
  <?php
2
+ defined( 'ABSPATH' ) || die( 'Cheatin uh?' );
3
 
4
  /**
5
  * Abstract class to handle a part of the plugin options.
inc/classes/class-imagify-admin-ajax-post.php CHANGED
@@ -1,5 +1,5 @@
1
  <?php
2
- defined( 'ABSPATH' ) || die( 'Cheatin\' uh?' );
3
 
4
  /**
5
  * Class that handles admin ajax/post callbacks.
@@ -1417,7 +1417,7 @@ class Imagify_Admin_Ajax_Post {
1417
  }
1418
 
1419
  if ( ! $output ) {
1420
- $output .= '<li class="imagify-empty-folder"><em>' . __( 'Empty folder', 'imagify' ) . '</em></li>';
1421
  }
1422
 
1423
  wp_send_json_success( $output );
1
  <?php
2
+ defined( 'ABSPATH' ) || die( 'Cheatin uh?' );
3
 
4
  /**
5
  * Class that handles admin ajax/post callbacks.
1417
  }
1418
 
1419
  if ( ! $output ) {
1420
+ $output .= '<li class="imagify-empty-folder"><em>' . __( 'No optimizable files', 'imagify' ) . '</em></li>';
1421
  }
1422
 
1423
  wp_send_json_success( $output );
inc/classes/class-imagify-assets.php CHANGED
@@ -1,5 +1,5 @@
1
  <?php
2
- defined( 'ABSPATH' ) || die( 'Cheatin\' uh?' );
3
 
4
  /**
5
  * Class that handles stylesheets and JavaScripts.
1
  <?php
2
+ defined( 'ABSPATH' ) || die( 'Cheatin uh?' );
3
 
4
  /**
5
  * Class that handles stylesheets and JavaScripts.
inc/classes/class-imagify-attachment.php CHANGED
@@ -1,5 +1,5 @@
1
  <?php
2
- defined( 'ABSPATH' ) || die( 'Cheatin\' uh?' );
3
 
4
  /**
5
  * Imagify Attachment class.
1
  <?php
2
+ defined( 'ABSPATH' ) || die( 'Cheatin uh?' );
3
 
4
  /**
5
  * Imagify Attachment class.
inc/classes/class-imagify-cron-library-size.php CHANGED
@@ -1,5 +1,5 @@
1
  <?php
2
- defined( 'ABSPATH' ) || die( 'Cheatin\' uh?' );
3
 
4
  /**
5
  * Class that handles the cron that calculate and cache the library size.
1
  <?php
2
+ defined( 'ABSPATH' ) || die( 'Cheatin uh?' );
3
 
4
  /**
5
  * Class that handles the cron that calculate and cache the library size.
inc/classes/class-imagify-cron-rating.php CHANGED
@@ -1,5 +1,5 @@
1
  <?php
2
- defined( 'ABSPATH' ) || die( 'Cheatin\' uh?' );
3
 
4
  /**
5
  * Class that handles the plugin rating cron.
1
  <?php
2
+ defined( 'ABSPATH' ) || die( 'Cheatin uh?' );
3
 
4
  /**
5
  * Class that handles the plugin rating cron.
inc/classes/class-imagify-cron-sync-files.php CHANGED
@@ -1,5 +1,5 @@
1
  <?php
2
- defined( 'ABSPATH' ) || die( 'Cheatin\' uh?' );
3
 
4
  /**
5
  * Class that scans the custom folders to keep files in sync in the database.
1
  <?php
2
+ defined( 'ABSPATH' ) || die( 'Cheatin uh?' );
3
 
4
  /**
5
  * Class that scans the custom folders to keep files in sync in the database.
inc/classes/class-imagify-custom-folders.php CHANGED
@@ -1,5 +1,5 @@
1
  <?php
2
- defined( 'ABSPATH' ) || die( 'Cheatin\' uh?' );
3
 
4
  /**
5
  * Class that regroups things about "custom folders".
1
  <?php
2
+ defined( 'ABSPATH' ) || die( 'Cheatin uh?' );
3
 
4
  /**
5
  * Class that regroups things about "custom folders".
inc/classes/class-imagify-data.php CHANGED
@@ -1,5 +1,5 @@
1
  <?php
2
- defined( 'ABSPATH' ) || die( 'Cheatin\' uh?' );
3
 
4
  /**
5
  * Class that handles the plugin data.
1
  <?php
2
+ defined( 'ABSPATH' ) || die( 'Cheatin uh?' );
3
 
4
  /**
5
  * Class that handles the plugin data.
inc/classes/class-imagify-db.php CHANGED
@@ -1,5 +1,5 @@
1
  <?php
2
- defined( 'ABSPATH' ) || die( 'Cheatin\' uh?' );
3
 
4
  /**
5
  * Imagify DB class. It reunites tools to work with the DB.
1
  <?php
2
+ defined( 'ABSPATH' ) || die( 'Cheatin uh?' );
3
 
4
  /**
5
  * Imagify DB class. It reunites tools to work with the DB.
inc/classes/class-imagify-file-attachment.php CHANGED
@@ -1,5 +1,5 @@
1
  <?php
2
- defined( 'ABSPATH' ) || die( 'Cheatin\' uh?' );
3
 
4
  /**
5
  * Imagify Attachment class for custom folders.
1
  <?php
2
+ defined( 'ABSPATH' ) || die( 'Cheatin uh?' );
3
 
4
  /**
5
  * Imagify Attachment class for custom folders.
inc/classes/class-imagify-files-db.php CHANGED
@@ -1,5 +1,5 @@
1
  <?php
2
- defined( 'ABSPATH' ) || die( 'Cheatin\' uh?' );
3
 
4
  /**
5
  * DB class that handles files in "custom folders".
1
  <?php
2
+ defined( 'ABSPATH' ) || die( 'Cheatin uh?' );
3
 
4
  /**
5
  * DB class that handles files in "custom folders".
inc/classes/class-imagify-files-iterator.php CHANGED
@@ -1,5 +1,5 @@
1
  <?php
2
- defined( 'ABSPATH' ) || die( 'Cheatin\' uh?' );
3
 
4
  /**
5
  * Class allowing to filter DirectoryIterator, to return only files that Imagify can optimize and folders.
@@ -65,10 +65,18 @@ class Imagify_Files_Iterator extends FilterIterator {
65
  public function accept() {
66
  static $extensions, $has_extension_method;
67
 
68
- // Forbidden file/folder paths and names.
69
- $is_dir = $this->isDir();
70
  $file_path = $this->current()->getPathname();
71
 
 
 
 
 
 
 
 
 
 
 
72
  if ( $is_dir ) {
73
  $file_path = trailingslashit( $file_path );
74
  }
1
  <?php
2
+ defined( 'ABSPATH' ) || die( 'Cheatin uh?' );
3
 
4
  /**
5
  * Class allowing to filter DirectoryIterator, to return only files that Imagify can optimize and folders.
65
  public function accept() {
66
  static $extensions, $has_extension_method;
67
 
 
 
68
  $file_path = $this->current()->getPathname();
69
 
70
+ // Prevent triggering an open_basedir restriction error.
71
+ $file_name = $this->filesystem->file_name( $file_path );
72
+
73
+ if ( '.' === $file_name || '..' === $file_name ) {
74
+ return false;
75
+ }
76
+
77
+ // Forbidden file/folder paths and names.
78
+ $is_dir = $this->isDir();
79
+
80
  if ( $is_dir ) {
81
  $file_path = trailingslashit( $file_path );
82
  }
inc/classes/class-imagify-files-list-table.php CHANGED
@@ -1,5 +1,5 @@
1
  <?php
2
- defined( 'ABSPATH' ) || die( 'Cheatin\' uh?' );
3
 
4
  /**
5
  * Class that display the "custom folders" files.
1
  <?php
2
+ defined( 'ABSPATH' ) || die( 'Cheatin uh?' );
3
 
4
  /**
5
  * Class that display the "custom folders" files.
inc/classes/class-imagify-files-recursive-iterator.php CHANGED
@@ -1,5 +1,5 @@
1
  <?php
2
- defined( 'ABSPATH' ) || die( 'Cheatin\' uh?' );
3
 
4
  /**
5
  * Class allowing to filter RecursiveDirectoryIterator, to return only files that Imagify can optimize.
@@ -55,9 +55,15 @@ class Imagify_Files_Recursive_Iterator extends RecursiveFilterIterator {
55
  public function accept() {
56
  static $extensions, $has_extension_method;
57
 
58
- // Forbidden file/folder paths and names.
59
  $file_path = $this->current()->getPathname();
60
 
 
 
 
 
 
 
 
61
  if ( $this->current()->isDir() ) {
62
  $file_path = trailingslashit( $file_path );
63
  }
1
  <?php
2
+ defined( 'ABSPATH' ) || die( 'Cheatin uh?' );
3
 
4
  /**
5
  * Class allowing to filter RecursiveDirectoryIterator, to return only files that Imagify can optimize.
55
  public function accept() {
56
  static $extensions, $has_extension_method;
57
 
 
58
  $file_path = $this->current()->getPathname();
59
 
60
+ // Prevent triggering an open_basedir restriction error.
61
+ $file_name = $this->filesystem->file_name( $file_path );
62
+
63
+ if ( '.' === $file_name || '..' === $file_name ) {
64
+ return false;
65
+ }
66
+
67
  if ( $this->current()->isDir() ) {
68
  $file_path = trailingslashit( $file_path );
69
  }
inc/classes/class-imagify-files-scan.php CHANGED
@@ -1,5 +1,5 @@
1
  <?php
2
- defined( 'ABSPATH' ) || die( 'Cheatin\' uh?' );
3
 
4
  /**
5
  * Class handling everything that is related to "custom folders optimization".
1
  <?php
2
+ defined( 'ABSPATH' ) || die( 'Cheatin uh?' );
3
 
4
  /**
5
  * Class handling everything that is related to "custom folders optimization".
inc/classes/class-imagify-files-stats.php CHANGED
@@ -1,5 +1,5 @@
1
  <?php
2
- defined( 'ABSPATH' ) || die( 'Cheatin\' uh?' );
3
 
4
  /**
5
  * Class handling stats related to "custom folders optimization".
1
  <?php
2
+ defined( 'ABSPATH' ) || die( 'Cheatin uh?' );
3
 
4
  /**
5
  * Class handling stats related to "custom folders optimization".
inc/classes/class-imagify-filesystem.php CHANGED
@@ -1,5 +1,5 @@
1
  <?php
2
- defined( 'ABSPATH' ) || die( 'Cheatin\' uh?' );
3
 
4
  require_once ABSPATH . 'wp-admin/includes/class-wp-filesystem-base.php';
5
  require_once ABSPATH . 'wp-admin/includes/class-wp-filesystem-direct.php';
@@ -220,21 +220,29 @@ class Imagify_Filesystem extends WP_Filesystem_Direct {
220
  $path = untrailingslashit( $site_root );
221
 
222
  foreach ( $bits as $bit ) {
223
- $path .= '/' . $bit;
 
224
 
225
- if ( ! $this->exists( $path ) ) {
226
- $this->mkdir( $path );
227
- } elseif ( ! $this->is_dir( $path ) ) {
228
- return false;
 
229
  }
230
 
231
- if ( ! $this->is_writable( $path ) ) {
232
- $this->chmod_dir( $path );
233
 
234
- if ( ! $this->is_writable( $path ) ) {
235
  return false;
236
  }
237
  }
 
 
 
 
 
 
238
  }
239
 
240
  return true;
@@ -761,26 +769,26 @@ class Imagify_Filesystem extends WP_Filesystem_Direct {
761
  $wp_path_rel_to_home = str_ireplace( $home, '', $siteurl ); /* $siteurl - $home */
762
  $pos = strripos( str_replace( '\\', '/', ABSPATH ), trailingslashit( $wp_path_rel_to_home ) );
763
  $root_path = substr( ABSPATH, 0, $pos );
764
- $root_path = trailingslashit( str_replace( '\\', '/', $root_path ) );
765
  return $root_path;
766
  }
767
 
768
  if ( ! defined( 'PATH_CURRENT_SITE' ) || ! is_multisite() || is_main_site() ) {
769
- $root_path = str_replace( '\\', '/', ABSPATH );
770
  return $root_path;
771
  }
772
 
773
- // For a multisite in its own directory, get_home_path() returns the expected path only for the main site.
774
- $script_filename = str_replace( '\\', '/', wp_unslash( $_SERVER['SCRIPT_FILENAME'] ) );
775
- $path_current_site = trailingslashit( '/' . trim( str_replace( '\\', '/', PATH_CURRENT_SITE ), '/' ) );
776
- $pos = strripos( $script_filename, $path_current_site );
777
-
778
- if ( false === $pos ) {
779
- $root_path = str_replace( '\\', '/', ABSPATH );
780
- return $root_path;
781
- }
 
782
 
783
- $root_path = substr( $script_filename, 0, $pos ) . $path_current_site;
784
  return $root_path;
785
  }
786
 
1
  <?php
2
+ defined( 'ABSPATH' ) || die( 'Cheatin uh?' );
3
 
4
  require_once ABSPATH . 'wp-admin/includes/class-wp-filesystem-base.php';
5
  require_once ABSPATH . 'wp-admin/includes/class-wp-filesystem-direct.php';
220
  $path = untrailingslashit( $site_root );
221
 
222
  foreach ( $bits as $bit ) {
223
+ $parent_path = $path;
224
+ $path .= '/' . $bit;
225
 
226
+ if ( $this->exists( $path ) ) {
227
+ if ( ! $this->is_dir( $path ) ) {
228
+ return false;
229
+ }
230
+ continue;
231
  }
232
 
233
+ if ( ! $this->is_writable( $parent_path ) ) {
234
+ $this->chmod_dir( $parent_path );
235
 
236
+ if ( ! $this->is_writable( $parent_path ) ) {
237
  return false;
238
  }
239
  }
240
+
241
+ $this->mkdir( $path );
242
+
243
+ if ( ! $this->exists( $path ) ) {
244
+ return false;
245
+ }
246
  }
247
 
248
  return true;
769
  $wp_path_rel_to_home = str_ireplace( $home, '', $siteurl ); /* $siteurl - $home */
770
  $pos = strripos( str_replace( '\\', '/', ABSPATH ), trailingslashit( $wp_path_rel_to_home ) );
771
  $root_path = substr( ABSPATH, 0, $pos );
772
+ $root_path = trailingslashit( wp_normalize_path( $root_path ) );
773
  return $root_path;
774
  }
775
 
776
  if ( ! defined( 'PATH_CURRENT_SITE' ) || ! is_multisite() || is_main_site() ) {
777
+ $root_path = $this->get_abspath();
778
  return $root_path;
779
  }
780
 
781
+ /**
782
+ * For a multisite in its own directory, get_home_path() returns the expected path only for the main site.
783
+ *
784
+ * Friend, each time an attempt is made to improve this method, and especially this part, please increment the following counter.
785
+ * Improvement attempts: 3.
786
+ */
787
+ $document_root = realpath( wp_unslash( $_SERVER['DOCUMENT_ROOT'] ) ); // `realpath()` is needed for those cases where $_SERVER['DOCUMENT_ROOT'] is totally different from ABSPATH.
788
+ $document_root = trailingslashit( str_replace( '\\', '/', $document_root ) );
789
+ $path_current_site = trim( str_replace( '\\', '/', PATH_CURRENT_SITE ), '/' );
790
+ $root_path = trailingslashit( wp_normalize_path( $document_root . $path_current_site ) );
791
 
 
792
  return $root_path;
793
  }
794
 
inc/classes/class-imagify-folders-db.php CHANGED
@@ -1,5 +1,5 @@
1
  <?php
2
- defined( 'ABSPATH' ) || die( 'Cheatin\' uh?' );
3
 
4
  /**
5
  * DB class that handles files in "custom folders".
1
  <?php
2
+ defined( 'ABSPATH' ) || die( 'Cheatin uh?' );
3
 
4
  /**
5
  * DB class that handles files in "custom folders".
inc/classes/class-imagify-notices.php CHANGED
@@ -1,5 +1,5 @@
1
  <?php
2
- defined( 'ABSPATH' ) || die( 'Cheatin\' uh?' );
3
 
4
  /**
5
  * Class that handles the admin notices.
1
  <?php
2
+ defined( 'ABSPATH' ) || die( 'Cheatin uh?' );
3
 
4
  /**
5
  * Class that handles the admin notices.
inc/classes/class-imagify-options.php CHANGED
@@ -1,5 +1,5 @@
1
  <?php
2
- defined( 'ABSPATH' ) || die( 'Cheatin\' uh?' );
3
 
4
  /**
5
  * Class that handles the plugin options.
@@ -44,6 +44,7 @@ class Imagify_Options extends Imagify_Abstract_Options {
44
  'exif' => 0,
45
  'disallowed-sizes' => array(),
46
  'admin_bar_menu' => 0,
 
47
  );
48
 
49
  /**
@@ -59,6 +60,7 @@ class Imagify_Options extends Imagify_Abstract_Options {
59
  'auto_optimize' => 1,
60
  'backup' => 1,
61
  'admin_bar_menu' => 1,
 
62
  );
63
 
64
  /**
@@ -145,6 +147,7 @@ class Imagify_Options extends Imagify_Abstract_Options {
145
  case 'resize_larger':
146
  case 'exif':
147
  case 'admin_bar_menu':
 
148
  return 1;
149
 
150
  case 'resize_larger_w':
1
  <?php
2
+ defined( 'ABSPATH' ) || die( 'Cheatin uh?' );
3
 
4
  /**
5
  * Class that handles the plugin options.
44
  'exif' => 0,
45
  'disallowed-sizes' => array(),
46
  'admin_bar_menu' => 0,
47
+ 'partner_links' => 0,
48
  );
49
 
50
  /**
60
  'auto_optimize' => 1,
61
  'backup' => 1,
62
  'admin_bar_menu' => 1,
63
+ 'partner_links' => 1,
64
  );
65
 
66
  /**
147
  case 'resize_larger':
148
  case 'exif':
149
  case 'admin_bar_menu':
150
+ case 'partner_links':
151
  return 1;
152
 
153
  case 'resize_larger_w':
inc/classes/class-imagify-requirements.php CHANGED
@@ -1,5 +1,5 @@
1
  <?php
2
- defined( 'ABSPATH' ) || die( 'Cheatin\' uh?' );
3
 
4
  /**
5
  * Class used to check that Imagify has everything it needs.
1
  <?php
2
+ defined( 'ABSPATH' ) || die( 'Cheatin uh?' );
3
 
4
  /**
5
  * Class used to check that Imagify has everything it needs.
inc/classes/class-imagify-settings.php CHANGED
@@ -1,5 +1,5 @@
1
  <?php
2
- defined( 'ABSPATH' ) || die( 'Cheatin\' uh?' );
3
 
4
  /**
5
  * Class that handles the plugin settings.
1
  <?php
2
+ defined( 'ABSPATH' ) || die( 'Cheatin uh?' );
3
 
4
  /**
5
  * Class that handles the plugin settings.
inc/classes/class-imagify-user.php CHANGED
@@ -1,5 +1,5 @@
1
  <?php
2
- defined( 'ABSPATH' ) || die( 'Cheatin\' uh?' );
3
 
4
  /**
5
  * Imagify User class.
1
  <?php
2
+ defined( 'ABSPATH' ) || die( 'Cheatin uh?' );
3
 
4
  /**
5
  * Imagify User class.
inc/classes/class-imagify-views.php CHANGED
@@ -1,5 +1,5 @@
1
  <?php
2
- defined( 'ABSPATH' ) || die( 'Cheatin\' uh?' );
3
 
4
  /**
5
  * Class that handles templates and menus.
1
  <?php
2
+ defined( 'ABSPATH' ) || die( 'Cheatin uh?' );
3
 
4
  /**
5
  * Class that handles templates and menus.
inc/classes/class-imagify.php CHANGED
@@ -1,5 +1,5 @@
1
  <?php
2
- defined( 'ABSPATH' ) || die( 'Cheatin\' uh?' );
3
 
4
  /**
5
  * Imagify.io API for WordPress.
1
  <?php
2
+ defined( 'ABSPATH' ) || die( 'Cheatin uh?' );
3
 
4
  /**
5
  * Imagify.io API for WordPress.
inc/classes/class-wp-async-request.php CHANGED
@@ -1,5 +1,5 @@
1
  <?php
2
- defined( 'ABSPATH' ) || die( 'Cheatin\' uh?' );
3
 
4
  /**
5
  * WP Async Request
1
  <?php
2
+ defined( 'ABSPATH' ) || die( 'Cheatin uh?' );
3
 
4
  /**
5
  * WP Async Request
inc/classes/class-wp-background-process.php CHANGED
@@ -1,5 +1,5 @@
1
  <?php
2
- defined( 'ABSPATH' ) || die( 'Cheatin\' uh?' );
3
 
4
  /**
5
  * WP Background Process
1
  <?php
2
+ defined( 'ABSPATH' ) || die( 'Cheatin uh?' );
3
 
4
  /**
5
  * WP Background Process
inc/common/admin-bar.php CHANGED
@@ -1,5 +1,5 @@
1
  <?php
2
- defined( 'ABSPATH' ) || die( 'Cheatin\' uh?' );
3
 
4
  add_action( 'admin_bar_menu', '_imagify_admin_bar', IMAGIFY_INT_MAX );
5
  /**
1
  <?php
2
+ defined( 'ABSPATH' ) || die( 'Cheatin uh?' );
3
 
4
  add_action( 'admin_bar_menu', '_imagify_admin_bar', IMAGIFY_INT_MAX );
5
  /**
inc/common/attachments.php CHANGED
@@ -1,5 +1,5 @@
1
  <?php
2
- defined( 'ABSPATH' ) || die( 'Cheatin\' uh?' );
3
 
4
  add_filter( 'wp_generate_attachment_metadata', '_imagify_optimize_attachment', IMAGIFY_INT_MAX, 2 );
5
  /**
1
  <?php
2
+ defined( 'ABSPATH' ) || die( 'Cheatin uh?' );
3
 
4
  add_filter( 'wp_generate_attachment_metadata', '_imagify_optimize_attachment', IMAGIFY_INT_MAX, 2 );
5
  /**
inc/common/partners.php CHANGED
@@ -1,5 +1,5 @@
1
  <?php
2
- defined( 'ABSPATH' ) || die( 'Cheatin\' uh?' );
3
 
4
  add_action( 'update_option_' . Imagify_Options::get_instance()->get_option_name(), 'imagify_maybe_delete_partner_on_option_update', 10, 2 );
5
  /**
1
  <?php
2
+ defined( 'ABSPATH' ) || die( 'Cheatin uh?' );
3
 
4
  add_action( 'update_option_' . Imagify_Options::get_instance()->get_option_name(), 'imagify_maybe_delete_partner_on_option_update', 10, 2 );
5
  /**
inc/functions/admin-stats.php CHANGED
@@ -1,5 +1,5 @@
1
  <?php
2
- defined( 'ABSPATH' ) || die( 'Cheatin\' uh?' );
3
 
4
  /**
5
  * Count number of attachments.
1
  <?php
2
+ defined( 'ABSPATH' ) || die( 'Cheatin uh?' );
3
 
4
  /**
5
  * Count number of attachments.
inc/functions/admin-ui.php CHANGED
@@ -1,5 +1,5 @@
1
  <?php
2
- defined( 'ABSPATH' ) || die( 'Cheatin\' uh?' );
3
 
4
  /**
5
  * Get the optimization data list for a specific attachment.
1
  <?php
2
+ defined( 'ABSPATH' ) || die( 'Cheatin uh?' );
3
 
4
  /**
5
  * Get the optimization data list for a specific attachment.
inc/functions/admin.php CHANGED
@@ -1,5 +1,5 @@
1
  <?php
2
- defined( 'ABSPATH' ) || die( 'Cheatin\' uh?' );
3
 
4
  /**
5
  * Check if Imagify is activated on the network.
1
  <?php
2
+ defined( 'ABSPATH' ) || die( 'Cheatin uh?' );
3
 
4
  /**
5
  * Check if Imagify is activated on the network.
inc/functions/api.php CHANGED
@@ -1,5 +1,5 @@
1
  <?php
2
- defined( 'ABSPATH' ) || die( 'Cheatin\' uh?' );
3
 
4
  /**
5
  * Returns the main instance of the Imagify class.
1
  <?php
2
+ defined( 'ABSPATH' ) || die( 'Cheatin uh?' );
3
 
4
  /**
5
  * Returns the main instance of the Imagify class.
inc/functions/attachments.php CHANGED
@@ -1,5 +1,5 @@
1
  <?php
2
- defined( 'ABSPATH' ) || die( 'Cheatin\' uh?' );
3
 
4
  /**
5
  * Get all mime types which could be optimized by Imagify.
1
  <?php
2
+ defined( 'ABSPATH' ) || die( 'Cheatin uh?' );
3
 
4
  /**
5
  * Get all mime types which could be optimized by Imagify.
inc/functions/common.php CHANGED
@@ -1,5 +1,5 @@
1
  <?php
2
- defined( 'ABSPATH' ) || die( 'Cheatin\' uh?' );
3
 
4
  /**
5
  * Get user capacity to operate Imagify.
@@ -181,6 +181,12 @@ function imagify_sanitize_context( $context ) {
181
  * @param string $class Name of the class to include.
182
  */
183
  function imagify_autoload( $class ) {
 
 
 
 
 
 
184
  // Generic classes.
185
  $classes = array(
186
  'Imagify_Abstract_Attachment' => 1,
@@ -218,7 +224,7 @@ function imagify_autoload( $class ) {
218
  );
219
 
220
  if ( isset( $classes[ $class ] ) ) {
221
- $class = str_replace( '_', '-', strtolower( $class ) );
222
  include IMAGIFY_CLASSES_PATH . 'class-' . $class . '.php';
223
  return;
224
  }
@@ -237,11 +243,12 @@ function imagify_autoload( $class ) {
237
  'Imagify_Regenerate_Thumbnails' => 'regenerate-thumbnails',
238
  'Imagify_WP_Retina_2x' => 'wp-retina-2x',
239
  'Imagify_WP_Retina_2x_Core' => 'wp-retina-2x',
 
240
  );
241
 
242
  if ( isset( $classes[ $class ] ) ) {
243
  $folder = $classes[ $class ];
244
- $class = str_replace( '_', '-', strtolower( $class ) );
245
  include IMAGIFY_3RD_PARTY_PATH . $folder . '/inc/classes/class-' . $class . '.php';
246
  }
247
  }
1
  <?php
2
+ defined( 'ABSPATH' ) || die( 'Cheatin uh?' );
3
 
4
  /**
5
  * Get user capacity to operate Imagify.
181
  * @param string $class Name of the class to include.
182
  */
183
  function imagify_autoload( $class ) {
184
+ static $strtolower;
185
+
186
+ if ( ! isset( $strtolower ) ) {
187
+ $strtolower = function_exists( 'mb_strtolower' ) ? 'mb_strtolower' : 'strtolower';
188
+ }
189
+
190
  // Generic classes.
191
  $classes = array(
192
  'Imagify_Abstract_Attachment' => 1,
224
  );
225
 
226
  if ( isset( $classes[ $class ] ) ) {
227
+ $class = str_replace( '_', '-', call_user_func( $strtolower, $class ) );
228
  include IMAGIFY_CLASSES_PATH . 'class-' . $class . '.php';
229
  return;
230
  }
243
  'Imagify_Regenerate_Thumbnails' => 'regenerate-thumbnails',
244
  'Imagify_WP_Retina_2x' => 'wp-retina-2x',
245
  'Imagify_WP_Retina_2x_Core' => 'wp-retina-2x',
246
+ 'Imagify_WP_Time_Capsule' => 'wp-time-capsule',
247
  );
248
 
249
  if ( isset( $classes[ $class ] ) ) {
250
  $folder = $classes[ $class ];
251
+ $class = str_replace( '_', '-', call_user_func( $strtolower, $class ) );
252
  include IMAGIFY_3RD_PARTY_PATH . $folder . '/inc/classes/class-' . $class . '.php';
253
  }
254
  }
inc/functions/compat-spl-autoload.php CHANGED
@@ -6,7 +6,7 @@
6
  * See https://core.trac.wordpress.org/ticket/41134
7
  */
8
 
9
- defined( 'ABSPATH' ) || die( 'Cheatin\' uh?' );
10
 
11
  if ( ! function_exists( 'spl_autoload_register' ) ) :
12
  $_wp_spl_autoloaders = array();
6
  * See https://core.trac.wordpress.org/ticket/41134
7
  */
8
 
9
+ defined( 'ABSPATH' ) || die( 'Cheatin uh?' );
10
 
11
  if ( ! function_exists( 'spl_autoload_register' ) ) :
12
  $_wp_spl_autoloaders = array();
inc/functions/compat.php CHANGED
@@ -1,5 +1,5 @@
1
  <?php
2
- defined( 'ABSPATH' ) || die( 'Cheatin\' uh?' );
3
 
4
  /** --------------------------------------------------------------------------------------------- */
5
  /** PHP ========================================================================================= */
1
  <?php
2
+ defined( 'ABSPATH' ) || die( 'Cheatin uh?' );
3
 
4
  /** --------------------------------------------------------------------------------------------- */
5
  /** PHP ========================================================================================= */
inc/functions/deprecated.php CHANGED
@@ -1,5 +1,5 @@
1
  <?php
2
- defined( 'ABSPATH' ) || die( 'Cheatin\' uh?' );
3
 
4
  /**
5
  * Class for deprecated methods from Imagify.
1
  <?php
2
+ defined( 'ABSPATH' ) || die( 'Cheatin uh?' );
3
 
4
  /**
5
  * Class for deprecated methods from Imagify.
inc/functions/formatting.php CHANGED
@@ -1,5 +1,5 @@
1
  <?php
2
- defined( 'ABSPATH' ) || die( 'Cheatin\' uh?' );
3
 
4
  /**
5
  * Round UP to nearest half integer.
1
  <?php
2
+ defined( 'ABSPATH' ) || die( 'Cheatin uh?' );
3
 
4
  /**
5
  * Round UP to nearest half integer.
inc/functions/i18n.php CHANGED
@@ -1,5 +1,5 @@
1
  <?php
2
- defined( 'ABSPATH' ) || die( 'Cheatin\' uh?' );
3
 
4
  /**
5
  * Get all translations we can use with wp_localize_script().
1
  <?php
2
+ defined( 'ABSPATH' ) || die( 'Cheatin uh?' );
3
 
4
  /**
5
  * Get all translations we can use with wp_localize_script().
inc/functions/options.php CHANGED
@@ -1,5 +1,5 @@
1
  <?php
2
- defined( 'ABSPATH' ) || die( 'Cheatin\' uh?' );
3
 
4
  /**
5
  * A wrapper to easily get imagify option.
1
  <?php
2
+ defined( 'ABSPATH' ) || die( 'Cheatin uh?' );
3
 
4
  /**
5
  * A wrapper to easily get imagify option.
inc/functions/partners.php CHANGED
@@ -1,5 +1,5 @@
1
  <?php
2
- defined( 'ABSPATH' ) || die( 'Cheatin\' uh?' );
3
 
4
  /**
5
  * Get the partner ID stored in the database.
1
  <?php
2
+ defined( 'ABSPATH' ) || die( 'Cheatin uh?' );
3
 
4
  /**
5
  * Get the partner ID stored in the database.
inc/functions/process.php CHANGED
@@ -1,5 +1,5 @@
1
  <?php
2
- defined( 'ABSPATH' ) || die( 'Cheatin\' uh?' );
3
 
4
  /**
5
  * Process an image with Imagify.
1
  <?php
2
+ defined( 'ABSPATH' ) || die( 'Cheatin uh?' );
3
 
4
  /**
5
  * Process an image with Imagify.
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: 4.0.0
5
- Tested up to: 4.9.7
6
- Stable tag: 1.8.1
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
 
@@ -138,6 +138,23 @@ When the plugin is disabled, your existing images remain optimized. Backups of t
138
  4. Other Media Page
139
 
140
  == Changelog ==
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
141
  = 1.8.1 - 2018/07/18 =
142
  * Imagify now requires WordPress 4.0 at least! This value may increase in the future, like required php version.
143
  * Bug Fix: improved support of sites having the "wp-content" folder outside WordPress folder.
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: 4.0.0
5
+ Tested up to: 4.9.8
6
+ Stable tag: 1.8.3
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
 
138
  4. Other Media Page
139
 
140
  == Changelog ==
141
+ = 1.8.3 - 2018/11/24 =
142
+ * Improvement: compatibility with new version of WP Offload Media plugin.
143
+ * Improvement: some wording about EXIF Data and the 2MB limit.
144
+ * Bug Fix: the lock icon now displays correctly.
145
+ * Bug Fix: a text encoding issue with some server configurations.
146
+
147
+ = 1.8.2 - 2018/09/12 =
148
+ * New: display partnership links (can be removed).
149
+ * Improvement: display a small spinner when opening a folder in the custom folders selector.
150
+ * Improvement: visual for the admin toolbar option has been updated and localized for some languages.
151
+ * Bug Fix: two errors that prevented to create the backup folder (and other things).
152
+ * Bug Fix: improved uninstall cleanup.
153
+
154
+ = 1.8.1.1 - 2018/07/31 =
155
+ * Bug Fix: an open_basedir error that prevented some users to use the custom folders browser.
156
+ * Bug Fix: an error that prevented to create the backup folder (and other things) on multisite.
157
+
158
  = 1.8.1 - 2018/07/18 =
159
  * Imagify now requires WordPress 4.0 at least! This value may increase in the future, like required php version.
160
  * Bug Fix: improved support of sites having the "wp-content" folder outside WordPress folder.
uninstall.php CHANGED
@@ -8,9 +8,6 @@ delete_site_option( 'imagify_settings' );
8
  delete_site_option( 'imagify_old_version' );
9
  delete_site_option( 'imagify_files_db_version' );
10
  delete_site_option( 'imagify_folders_db_version' );
11
- delete_site_option( 'do_imagify_rating_cron' );
12
- delete_site_option( 'imagify_seen_rating_notice' );
13
- delete_site_option( 'imagify_user_images_count' );
14
  delete_option( 'imagify_data' );
15
  delete_option( 'ngg_imagify_data_db_version' );
16
  delete_option( $wpdb->prefix . 'ngg_imagify_data_db_version' );
@@ -19,6 +16,9 @@ delete_option( $wpdb->prefix . 'ngg_imagify_data_db_version' );
19
  delete_site_transient( 'imagify_check_licence_1' );
20
  delete_site_transient( 'imagify_user' );
21
  delete_site_transient( 'imagify_themes_plugins_to_sync' );
 
 
 
22
  delete_transient( 'imagify_bulk_optimization_level' );
23
  delete_transient( 'imagify_bulk_optimization_infos' );
24
  delete_transient( 'imagify_large_library' );
8
  delete_site_option( 'imagify_old_version' );
9
  delete_site_option( 'imagify_files_db_version' );
10
  delete_site_option( 'imagify_folders_db_version' );
 
 
 
11
  delete_option( 'imagify_data' );
12
  delete_option( 'ngg_imagify_data_db_version' );
13
  delete_option( $wpdb->prefix . 'ngg_imagify_data_db_version' );
16
  delete_site_transient( 'imagify_check_licence_1' );
17
  delete_site_transient( 'imagify_user' );
18
  delete_site_transient( 'imagify_themes_plugins_to_sync' );
19
+ delete_site_transient( 'do_imagify_rating_cron' );
20
+ delete_site_transient( 'imagify_seen_rating_notice' );
21
+ delete_site_transient( 'imagify_user_images_count' );
22
  delete_transient( 'imagify_bulk_optimization_level' );
23
  delete_transient( 'imagify_bulk_optimization_infos' );
24
  delete_transient( 'imagify_large_library' );
views/modal-payment.php CHANGED
@@ -1,5 +1,5 @@
1
  <?php
2
- defined( 'ABSPATH' ) || die( 'Cheatin\' uh?' );
3
  ?>
4
  <div id="imagify-pricing-modal" class="imagify-modal imagify-payment-modal hide-if-no-js" aria-hidden="false" role="dialog">
5
  <div class="imagify-modal-content">
1
  <?php
2
+ defined( 'ABSPATH' ) || die( 'Cheatin uh?' );
3
  ?>
4
  <div id="imagify-pricing-modal" class="imagify-modal imagify-payment-modal hide-if-no-js" aria-hidden="false" role="dialog">
5
  <div class="imagify-modal-content">
views/modal-settings-infos.php CHANGED
@@ -1,5 +1,5 @@
1
  <?php
2
- defined( 'ABSPATH' ) || die( 'Cheatin\' uh?' );
3
 
4
  ?>
5
 
1
  <?php
2
+ defined( 'ABSPATH' ) || die( 'Cheatin uh?' );
3
 
4
  ?>
5
 
views/modal-settings-partners-infos.php ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ defined( 'ABSPATH' ) || die( 'Cheatin’ uh?' );
3
+ ?>
4
+
5
+ <div class="imagify-modal" id="imagify-partners-info">
6
+ <div class="imagify-modal-content">
7
+ <p>
8
+ <?php esc_html_e( 'Partner links are links to products we trust which might be displayed in the Imagify plugin or the plugin modal page. We may earn an affiliate commission if you make a purchase via these links.', 'imagify' ); ?>
9
+ </p>
10
+
11
+ <button type="button" class="close-btn">
12
+ <i class="dashicons dashicons-no-alt" aria-hidden="true"></i>
13
+ <span class="screen-reader-text"><?php esc_html_e( 'Close' ); ?></span>
14
+ </button>
15
+ </div>
16
+ </div>
17
+
18
+ <?php
views/modal-settings-visual-comparison.php CHANGED
@@ -1,5 +1,5 @@
1
  <?php
2
- defined( 'ABSPATH' ) || die( 'Cheatin\' uh?' );
3
 
4
  ?>
5
 
1
  <?php
2
+ defined( 'ABSPATH' ) || die( 'Cheatin uh?' );
3
 
4
  ?>
5
 
views/notice-almost-over-quota.php CHANGED
@@ -1,5 +1,5 @@
1
  <?php
2
- defined( 'ABSPATH' ) || die( 'Cheatin\' uh?' );
3
 
4
  $this->print_template( 'notice-header', array(
5
  'classes' => array( 'imagify-flex-notice-content', 'error' ),
1
  <?php
2
+ defined( 'ABSPATH' ) || die( 'Cheatin uh?' );
3
 
4
  $this->print_template( 'notice-header', array(
5
  'classes' => array( 'imagify-flex-notice-content', 'error' ),
views/notice-backup-folder-not-writable.php CHANGED
@@ -1,5 +1,5 @@
1
  <?php
2
- defined( 'ABSPATH' ) || die( 'Cheatin\' uh?' );
3
 
4
  $this->print_template( 'notice-header', array(
5
  'classes' => array( 'error' ),
1
  <?php
2
+ defined( 'ABSPATH' ) || die( 'Cheatin uh?' );
3
 
4
  $this->print_template( 'notice-header', array(
5
  'classes' => array( 'error' ),
views/notice-footer.php CHANGED
@@ -1,5 +1,5 @@
1
  <?php
2
- defined( 'ABSPATH' ) || die( 'Cheatin\' uh?' );
3
  ?>
4
  </div>
5
  <?php if ( ! empty( $data['dismissible'] ) ) : ?>
1
  <?php
2
+ defined( 'ABSPATH' ) || die( 'Cheatin uh?' );
3
  ?>
4
  </div>
5
  <?php if ( ! empty( $data['dismissible'] ) ) : ?>
views/notice-grid-view.php CHANGED
@@ -1,5 +1,5 @@
1
  <?php
2
- defined( 'ABSPATH' ) || die( 'Cheatin\' uh?' );
3
 
4
  $this->print_template( 'notice-header', array(
5
  'title' => __( 'You\'re missing out!', 'imagify' ),
1
  <?php
2
+ defined( 'ABSPATH' ) || die( 'Cheatin uh?' );
3
 
4
  $this->print_template( 'notice-header', array(
5
  'title' => __( 'You\'re missing out!', 'imagify' ),
views/notice-header.php CHANGED
@@ -1,5 +1,5 @@
1
  <?php
2
- defined( 'ABSPATH' ) || die( 'Cheatin\' uh?' );
3
  ?>
4
  <div class="clear"></div>
5
  <div class="imagify-notice below-h2<?php echo ( ! empty( $data['classes'] ) ? ' ' . implode( ' ', $data['classes'] ) : '' ); ?>">
1
  <?php
2
+ defined( 'ABSPATH' ) || die( 'Cheatin uh?' );
3
  ?>
4
  <div class="clear"></div>
5
  <div class="imagify-notice below-h2<?php echo ( ! empty( $data['classes'] ) ? ' ' . implode( ' ', $data['classes'] ) : '' ); ?>">
views/notice-http-block-external.php CHANGED
@@ -1,5 +1,5 @@
1
  <?php
2
- defined( 'ABSPATH' ) || die( 'Cheatin\' uh?' );
3
 
4
  $this->print_template( 'notice-header', array(
5
  'title' => __( 'The external HTTP requests are blocked!', 'imagify' ),
1
  <?php
2
+ defined( 'ABSPATH' ) || die( 'Cheatin uh?' );
3
 
4
  $this->print_template( 'notice-header', array(
5
  'title' => __( 'The external HTTP requests are blocked!', 'imagify' ),
views/notice-plugins-to-deactivate.php CHANGED
@@ -1,5 +1,5 @@
1
  <?php
2
- defined( 'ABSPATH' ) || die( 'Cheatin\' uh?' );
3
 
4
  $this->print_template( 'notice-header', array(
5
  'classes' => array( 'error' ),
1
  <?php
2
+ defined( 'ABSPATH' ) || die( 'Cheatin uh?' );
3
 
4
  $this->print_template( 'notice-header', array(
5
  'classes' => array( 'error' ),
views/notice-rating.php CHANGED
@@ -1,5 +1,5 @@
1
  <?php
2
- defined( 'ABSPATH' ) || die( 'Cheatin\' uh?' );
3
 
4
  $this->print_template( 'notice-header', array(
5
  'classes' => array( 'updated' ),
1
  <?php
2
+ defined( 'ABSPATH' ) || die( 'Cheatin uh?' );
3
 
4
  $this->print_template( 'notice-header', array(
5
  'classes' => array( 'updated' ),
views/notice-temporary.php CHANGED
@@ -1,5 +1,5 @@
1
  <?php
2
- defined( 'ABSPATH' ) || die( 'Cheatin\' uh?' );
3
 
4
  $notices = array();
5
 
1
  <?php
2
+ defined( 'ABSPATH' ) || die( 'Cheatin uh?' );
3
 
4
  $notices = array();
5
 
views/notice-welcome-steps.php CHANGED
@@ -1,5 +1,5 @@
1
  <?php
2
- defined( 'ABSPATH' ) || die( 'Cheatin\' uh?' );
3
  ?>
4
  <div class="imagify-welcome">
5
  <div class="imagify-title">
1
  <?php
2
+ defined( 'ABSPATH' ) || die( 'Cheatin uh?' );
3
  ?>
4
  <div class="imagify-welcome">
5
  <div class="imagify-title">
views/notice-wp-rocket.php CHANGED
@@ -1,5 +1,5 @@
1
  <?php
2
- defined( 'ABSPATH' ) || die( 'Cheatin\' uh?' );
3
 
4
  $dismiss_url = get_imagify_admin_url( 'dismiss-notice', 'wp-rocket' );
5
  $coupon_code = 'IMAGIFY20';
1
  <?php
2
+ defined( 'ABSPATH' ) || die( 'Cheatin uh?' );
3
 
4
  $dismiss_url = get_imagify_admin_url( 'dismiss-notice', 'wp-rocket' );
5
  $coupon_code = 'IMAGIFY20';
views/notice-wrong-api-key.php CHANGED
@@ -1,5 +1,5 @@
1
  <?php
2
- defined( 'ABSPATH' ) || die( 'Cheatin\' uh?' );
3
 
4
  $this->print_template( 'notice-header', array(
5
  'title' => __( 'Your API key isn\'t valid!', 'imagify' ),
1
  <?php
2
+ defined( 'ABSPATH' ) || die( 'Cheatin uh?' );
3
 
4
  $this->print_template( 'notice-header', array(
5
  'title' => __( 'Your API key isn\'t valid!', 'imagify' ),
views/page-bulk.php CHANGED
@@ -1,5 +1,5 @@
1
  <?php
2
- defined( 'ABSPATH' ) || die( 'Cheatin\' uh?' );
3
  ?>
4
  <div class="wrap imagify-settings imagify-bulk">
5
 
@@ -187,7 +187,7 @@ defined( 'ABSPATH' ) || die( 'Cheatin\' uh?' );
187
  <?php
188
  printf(
189
  /* translators: %s is a file size. */
190
- esc_html__( 'All images greater than %s will be optimized when using a paid plan.', 'imagify' ),
191
  esc_html( imagify_size_format( get_imagify_max_image_size() ) )
192
  );
193
  ?>
1
  <?php
2
+ defined( 'ABSPATH' ) || die( 'Cheatin uh?' );
3
  ?>
4
  <div class="wrap imagify-settings imagify-bulk">
5
 
187
  <?php
188
  printf(
189
  /* translators: %s is a file size. */
190
+ esc_html__( 'All images greater than %s (after resizing, if any) will be optimized when using a paid plan.', 'imagify' ),
191
  esc_html( imagify_size_format( get_imagify_max_image_size() ) )
192
  );
193
  ?>
views/page-files-list.php CHANGED
@@ -1,5 +1,5 @@
1
  <?php
2
- defined( 'ABSPATH' ) || die( 'Cheatin\' uh?' );
3
  ?>
4
  <div class="wrap imagify-files-list">
5
 
1
  <?php
2
+ defined( 'ABSPATH' ) || die( 'Cheatin uh?' );
3
  ?>
4
  <div class="wrap imagify-files-list">
5
 
views/page-settings.php CHANGED
@@ -1,10 +1,11 @@
1
  <?php
2
- defined( 'ABSPATH' ) || die( 'Cheatin\' uh?' );
3
 
4
  $settings = Imagify_Settings::get_instance();
5
  $options = Imagify_Options::get_instance();
6
  $option_name = $options->get_option_name();
7
  $hidden_class = Imagify_Requirements::is_api_key_valid() ? '' : ' hidden';
 
8
 
9
  /* Ads notice */
10
  $notice = 'wp-rocket';
@@ -109,13 +110,13 @@ $wrapper_class = isset( $notices[ $notice ] ) || defined( 'WP_ROCKET_VERSION' )
109
 
110
  <p class="imagify-setting-line">
111
  <?php
112
- $info = __( 'Keep all EXIF data from your images. EXIF are informations stored in your pictures like shutter speed, exposure compensation, ISO, etc...', 'imagify' );
113
- $info .= '<a href="' . esc_url( imagify_get_external_url( 'exif' ) ) . '" target="_blank">' . __( 'Learn more', 'imagify' ) . '</a><br/><br/>';
114
- $info .= __( 'If you are a photographer, you may be interested in this option if you are displaying on your pages some info like the model of your camera.', 'imagify' );
115
 
116
  $settings->field_checkbox( array(
117
  'option_name' => 'exif',
118
- 'label' => __( 'EXIF Data', 'imagify' ),
119
  'info' => $info,
120
  ) );
121
  ?>
@@ -160,9 +161,45 @@ $wrapper_class = isset( $notices[ $notice ] ) || defined( 'WP_ROCKET_VERSION' )
160
  </div>
161
  <div class="imagify-col">
162
  <p>
163
- <img class="imagify-menu-bar-img" src="<?php echo IMAGIFY_ASSETS_IMG_URL . 'imagify-menu-bar.jpg'; ?>" width="300" height="225" alt="">
164
  </p>
165
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
166
  </div>
167
  </div>
168
 
@@ -178,6 +215,7 @@ $wrapper_class = isset( $notices[ $notice ] ) || defined( 'WP_ROCKET_VERSION' )
178
  <?php
179
  $this->print_template( 'part-rocket-ad' );
180
  $this->print_template( 'modal-settings-infos' );
 
181
  $this->print_template( 'modal-settings-visual-comparison' );
182
  $this->print_template( 'modal-payment' );
183
  ?>
1
  <?php
2
+ defined( 'ABSPATH' ) || die( 'Cheatin uh?' );
3
 
4
  $settings = Imagify_Settings::get_instance();
5
  $options = Imagify_Options::get_instance();
6
  $option_name = $options->get_option_name();
7
  $hidden_class = Imagify_Requirements::is_api_key_valid() ? '' : ' hidden';
8
+ $lang = imagify_get_current_lang_in( array( 'de', 'es', 'fr', 'it' ) );
9
 
10
  /* Ads notice */
11
  $notice = 'wp-rocket';
110
 
111
  <p class="imagify-setting-line">
112
  <?php
113
+ $info = __( 'EXIF data is information stored in your pictures like shutter speed, exposure compensation, ISO, etc...', 'imagify' );
114
+ $info .= ' <a href="' . esc_url( imagify_get_external_url( 'exif' ) ) . '" target="_blank">' . __( 'Learn more', 'imagify' ) . '</a><br/><br/>';
115
+ $info .= __( 'If you are a photographer, you may be interested in this option if you are displaying info like the model of your camera on your pages. Also, keeping EXIF data can fix some colorimetric problems.', 'imagify' );
116
 
117
  $settings->field_checkbox( array(
118
  'option_name' => 'exif',
119
+ 'label' => __( 'Keep all EXIF data from your images', 'imagify' ),
120
  'info' => $info,
121
  ) );
122
  ?>
161
  </div>
162
  <div class="imagify-col">
163
  <p>
164
+ <img class="imagify-menu-bar-img" src="<?php echo esc_url( IMAGIFY_ASSETS_IMG_URL . 'imagify-menu-bar-' . $lang . '.jpg' ); ?>" width="273" height="239" alt="">
165
  </p>
166
  </div>
167
+
168
+ <?php
169
+ /**
170
+ * List of partners affected by this option.
171
+ * For internal use only.
172
+ *
173
+ * @since 1.8.2
174
+ * @author Grégory Viguier
175
+ *
176
+ * @param array $partners An array of partner names.
177
+ * @return array
178
+ */
179
+ $partners = apply_filters( 'imagify_deactivatable_partners', array() );
180
+
181
+ if ( $partners ) {
182
+ ?>
183
+ <p class="imagify-options-subtitle" id="imagify-partners-label">
184
+ <?php esc_html_e( 'Partners', 'imagify' ); ?>
185
+
186
+ <span class="imagify-info">
187
+ <span class="dashicons dashicons-info"></span>
188
+ <a href="#imagify-partners-info" class="imagify-modal-trigger"><?php _e( 'More info?', 'imagify' ); ?></a>
189
+ </span>
190
+ </p>
191
+
192
+ <p>
193
+ <?php
194
+ $settings->field_checkbox( array(
195
+ 'option_name' => 'partner_links',
196
+ 'label' => __( 'Display Partner Links', 'imagify' ),
197
+ ) );
198
+ ?>
199
+ </p>
200
+ <?php
201
+ }
202
+ ?>
203
  </div>
204
  </div>
205
 
215
  <?php
216
  $this->print_template( 'part-rocket-ad' );
217
  $this->print_template( 'modal-settings-infos' );
218
+ $this->print_template( 'modal-settings-partners-infos' );
219
  $this->print_template( 'modal-settings-visual-comparison' );
220
  $this->print_template( 'modal-payment' );
221
  ?>
views/part-bulk-optimization-header-row-custom-folders.php CHANGED
@@ -1,5 +1,5 @@
1
  <?php
2
- defined( 'ABSPATH' ) || die( 'Cheatin\' uh?' );
3
  ?>
4
  <th class="imagify-cell-filename"><?php esc_html_e( 'Filename', 'imagify' ); ?></th>
5
  <th class="imagify-cell-status"><?php esc_html_e( 'Status', 'imagify' ); ?></th>
1
  <?php
2
+ defined( 'ABSPATH' ) || die( 'Cheatin uh?' );
3
  ?>
4
  <th class="imagify-cell-filename"><?php esc_html_e( 'Filename', 'imagify' ); ?></th>
5
  <th class="imagify-cell-status"><?php esc_html_e( 'Status', 'imagify' ); ?></th>
views/part-bulk-optimization-header-row-library.php CHANGED
@@ -1,5 +1,5 @@
1
  <?php
2
- defined( 'ABSPATH' ) || die( 'Cheatin\' uh?' );
3
  ?>
4
  <th class="imagify-cell-filename"><?php esc_html_e( 'Filename', 'imagify' ); ?></th>
5
  <th class="imagify-cell-status"><?php esc_html_e( 'Status', 'imagify' ); ?></th>
1
  <?php
2
+ defined( 'ABSPATH' ) || die( 'Cheatin uh?' );
3
  ?>
4
  <th class="imagify-cell-filename"><?php esc_html_e( 'Filename', 'imagify' ); ?></th>
5
  <th class="imagify-cell-status"><?php esc_html_e( 'Status', 'imagify' ); ?></th>
views/part-bulk-optimization-header.php CHANGED
@@ -1,4 +1,4 @@
1
- <?php defined( 'ABSPATH' ) || die( 'Cheatin\' uh?' ); ?>
2
 
3
  <h1 class="screen-reader-text"><?php _e( 'Bulk Optimization', 'imagify' ); ?> – Imagify <?php echo IMAGIFY_VERSION; ?></h1>
4
 
1
+ <?php defined( 'ABSPATH' ) || die( 'Cheatin uh?' ); ?>
2
 
3
  <h1 class="screen-reader-text"><?php _e( 'Bulk Optimization', 'imagify' ); ?> – Imagify <?php echo IMAGIFY_VERSION; ?></h1>
4
 
views/part-bulk-optimization-infos.php CHANGED
@@ -1,5 +1,5 @@
1
  <?php
2
- defined( 'ABSPATH' ) || die( 'Cheatin\' uh?' );
3
  ?>
4
  <div class="imagify-swal-subtitle"><?php esc_html_e( 'Some information to know before launching the optimization.', 'imagify' ); ?></div>
5
  <div class="imagify-swal-quota">
1
  <?php
2
+ defined( 'ABSPATH' ) || die( 'Cheatin uh?' );
3
  ?>
4
  <div class="imagify-swal-subtitle"><?php esc_html_e( 'Some information to know before launching the optimization.', 'imagify' ); ?></div>
5
  <div class="imagify-swal-quota">
views/part-bulk-optimization-newbie.php CHANGED
@@ -1,5 +1,5 @@
1
  <?php
2
- defined( 'ABSPATH' ) || die( 'Cheatin\' uh?' );
3
  ?>
4
 
5
  <div class="imagify-bulk-table imagify-newbie">
1
  <?php
2
+ defined( 'ABSPATH' ) || die( 'Cheatin uh?' );
3
  ?>
4
 
5
  <div class="imagify-bulk-table imagify-newbie">
views/part-bulk-optimization-overquota-alert.php CHANGED
@@ -1,5 +1,5 @@
1
  <?php
2
- defined( 'ABSPATH' ) || die( 'Cheatin\' uh?' );
3
 
4
  $overquota_url = imagify_get_external_url( 'subscription', array(
5
  'utm_source' => 'plugin',
1
  <?php
2
+ defined( 'ABSPATH' ) || die( 'Cheatin uh?' );
3
 
4
  $overquota_url = imagify_get_external_url( 'subscription', array(
5
  'utm_source' => 'plugin',
views/part-bulk-optimization-spinner.php CHANGED
@@ -1,5 +1,5 @@
1
  <?php
2
- defined( 'ABSPATH' ) || die( 'Cheatin\' uh?' );
3
  ?>
4
  <span class="imagify-cell-checkbox-loader">
5
  <svg width="27" height="28" viewBox="0 0 27 28" xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="evenodd"><path d="m13.3.254c-.773 0-1.4.627-1.4 1.4l0 4.2c0 .773.627 1.4 1.4 1.4.773 0 1.4-.627 1.4-1.4l0-4.2c0-.773-.627-1.4-1.4-1.4m-8.422 3.478c-.358 0-.711.142-.984.416-.547.547-.547 1.444 0 1.991l2.975 2.953c.547.547 1.422.547 1.969 0 .547-.547.547-1.422 0-1.969l-2.953-2.975c-.273-.273-.648-.416-1.01-.416m16.844 0c-.358 0-.733.142-1.01.416l-2.953 2.975c-.547.547-.547 1.422 0 1.969.547.547 1.422.547 1.969 0l2.975-2.953c.547-.547.547-1.444 0-1.991-.273-.273-.626-.416-.984-.416m-20.322 8.422c-.773 0-1.4.627-1.4 1.4 0 .773.627 1.4 1.4 1.4l4.2 0c.773 0 1.4-.627 1.4-1.4 0-.773-.627-1.4-1.4-1.4l-4.2 0m19.6 0c-.773 0-1.4.627-1.4 1.4 0 .773.627 1.4 1.4 1.4l4.2 0c.773 0 1.4-.627 1.4-1.4 0-.773-.627-1.4-1.4-1.4l-4.2 0m-13.147 5.447c-.358 0-.711.142-.984.416l-2.975 2.953c-.547.547-.547 1.444 0 1.991.547.547 1.444.547 1.991 0l2.953-2.975c.547-.547.547-1.422 0-1.969-.273-.273-.626-.416-.984-.416m10.894 0c-.358 0-.711.142-.984.416-.547.547-.547 1.422 0 1.969l2.953 2.975c.547.547 1.444.547 1.991 0 .547-.547.547-1.444 0-1.991l-2.975-2.953c-.273-.273-.626-.416-.984-.416m-5.447 2.253c-.773 0-1.4.627-1.4 1.4l0 4.2c0 .773.627 1.4 1.4 1.4.773 0 1.4-.627 1.4-1.4l0-4.2c0-.773-.627-1.4-1.4-1.4" fill="#40b1d0" fill-rule="nonzero"/></g></svg>
1
  <?php
2
+ defined( 'ABSPATH' ) || die( 'Cheatin uh?' );
3
  ?>
4
  <span class="imagify-cell-checkbox-loader">
5
  <svg width="27" height="28" viewBox="0 0 27 28" xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="evenodd"><path d="m13.3.254c-.773 0-1.4.627-1.4 1.4l0 4.2c0 .773.627 1.4 1.4 1.4.773 0 1.4-.627 1.4-1.4l0-4.2c0-.773-.627-1.4-1.4-1.4m-8.422 3.478c-.358 0-.711.142-.984.416-.547.547-.547 1.444 0 1.991l2.975 2.953c.547.547 1.422.547 1.969 0 .547-.547.547-1.422 0-1.969l-2.953-2.975c-.273-.273-.648-.416-1.01-.416m16.844 0c-.358 0-.733.142-1.01.416l-2.953 2.975c-.547.547-.547 1.422 0 1.969.547.547 1.422.547 1.969 0l2.975-2.953c.547-.547.547-1.444 0-1.991-.273-.273-.626-.416-.984-.416m-20.322 8.422c-.773 0-1.4.627-1.4 1.4 0 .773.627 1.4 1.4 1.4l4.2 0c.773 0 1.4-.627 1.4-1.4 0-.773-.627-1.4-1.4-1.4l-4.2 0m19.6 0c-.773 0-1.4.627-1.4 1.4 0 .773.627 1.4 1.4 1.4l4.2 0c.773 0 1.4-.627 1.4-1.4 0-.773-.627-1.4-1.4-1.4l-4.2 0m-13.147 5.447c-.358 0-.711.142-.984.416l-2.975 2.953c-.547.547-.547 1.444 0 1.991.547.547 1.444.547 1.991 0l2.953-2.975c.547-.547.547-1.422 0-1.969-.273-.273-.626-.416-.984-.416m10.894 0c-.358 0-.711.142-.984.416-.547.547-.547 1.422 0 1.969l2.953 2.975c.547.547 1.444.547 1.991 0 .547-.547.547-1.444 0-1.991l-2.975-2.953c-.273-.273-.626-.416-.984-.416m-5.447 2.253c-.773 0-1.4.627-1.4 1.4l0 4.2c0 .773.627 1.4 1.4 1.4.773 0 1.4-.627 1.4-1.4l0-4.2c0-.773-.627-1.4-1.4-1.4" fill="#40b1d0" fill-rule="nonzero"/></g></svg>
views/part-bulk-optimization-success.php CHANGED
@@ -1,5 +1,5 @@
1
  <?php
2
- defined( 'ABSPATH' ) || die( 'Cheatin\' uh?' );
3
 
4
  ?>
5
  <!-- The Success/Complete bar -->
1
  <?php
2
+ defined( 'ABSPATH' ) || die( 'Cheatin uh?' );
3
 
4
  ?>
5
  <!-- The Success/Complete bar -->
views/part-bulk-optimization-table-row-folder-type.php CHANGED
@@ -1,5 +1,5 @@
1
  <?php
2
- defined( 'ABSPATH' ) || die( 'Cheatin\' uh?' );
3
 
4
  $default_level = Imagify_Options::get_instance()->get( 'optimization_level' );
5
  ?>
1
  <?php
2
+ defined( 'ABSPATH' ) || die( 'Cheatin uh?' );
3
 
4
  $default_level = Imagify_Options::get_instance()->get( 'optimization_level' );
5
  ?>
views/part-bulk-optimization-table.php CHANGED
@@ -1,5 +1,5 @@
1
  <?php
2
- defined( 'ABSPATH' ) || die( 'Cheatin\' uh?' );
3
  ?>
4
 
5
  <div class="imagify-bulk-table">
1
  <?php
2
+ defined( 'ABSPATH' ) || die( 'Cheatin uh?' );
3
  ?>
4
 
5
  <div class="imagify-bulk-table">
views/part-bulk-optimization-underscore-file-row-custom-folders.php CHANGED
@@ -1,5 +1,5 @@
1
  <?php
2
- defined( 'ABSPATH' ) || die( 'Cheatin\' uh?' );
3
  ?>
4
  <tr id="{{ data.groupId }}-{{ data.id }}">
5
  <td class="imagify-cell-filename">
1
  <?php
2
+ defined( 'ABSPATH' ) || die( 'Cheatin uh?' );
3
  ?>
4
  <tr id="{{ data.groupId }}-{{ data.id }}">
5
  <td class="imagify-cell-filename">
views/part-bulk-optimization-underscore-file-row-library.php CHANGED
@@ -1,5 +1,5 @@
1
  <?php
2
- defined( 'ABSPATH' ) || die( 'Cheatin\' uh?' );
3
  ?>
4
  <tr id="{{ data.groupId }}-{{ data.id }}">
5
  <td class="imagify-cell-filename">
1
  <?php
2
+ defined( 'ABSPATH' ) || die( 'Cheatin uh?' );
3
  ?>
4
  <tr id="{{ data.groupId }}-{{ data.id }}">
5
  <td class="imagify-cell-filename">
views/part-discount-banner.php CHANGED
@@ -1,5 +1,5 @@
1
  <?php
2
- defined( 'ABSPATH' ) || die( 'Cheatin\' uh?' );
3
 
4
  ?>
5
  <div class="imagify-modal-promotion" aria-hidden="true">
1
  <?php
2
+ defined( 'ABSPATH' ) || die( 'Cheatin uh?' );
3
 
4
  ?>
5
  <div class="imagify-modal-promotion" aria-hidden="true">
views/part-documentation-link.php CHANGED
@@ -1,5 +1,5 @@
1
  <?php
2
- defined( 'ABSPATH' ) || die( 'Cheatin\' uh?' );
3
 
4
  ?>
5
  <p class="imagify-documentation-link-box">
1
  <?php
2
+ defined( 'ABSPATH' ) || die( 'Cheatin uh?' );
3
 
4
  ?>
5
  <p class="imagify-documentation-link-box">
views/part-files-list-header.php CHANGED
@@ -1,5 +1,5 @@
1
  <?php
2
- defined( 'ABSPATH' ) || die( 'Cheatin\' uh?' );
3
 
4
  ?>
5
  <h1><?php esc_html_e( 'Other Media optimized by Imagify', 'imagify' ); ?></h1>
1
  <?php
2
+ defined( 'ABSPATH' ) || die( 'Cheatin uh?' );
3
 
4
  ?>
5
  <h1><?php esc_html_e( 'Other Media optimized by Imagify', 'imagify' ); ?></h1>
views/part-rocket-ad.php CHANGED
@@ -1,5 +1,5 @@
1
  <?php
2
- defined( 'ABSPATH' ) || die( 'Cheatin\' uh?' );
3
 
4
  if ( defined( 'WP_ROCKET_VERSION' ) ) {
5
  return '';
1
  <?php
2
+ defined( 'ABSPATH' ) || die( 'Cheatin uh?' );
3
 
4
  if ( defined( 'WP_ROCKET_VERSION' ) ) {
5
  return '';
views/part-settings-account.php CHANGED
@@ -1,5 +1,5 @@
1
  <?php
2
- defined( 'ABSPATH' ) || die( 'Cheatin\' uh?' );
3
 
4
  if ( defined( 'IMAGIFY_HIDDEN_ACCOUNT' ) && IMAGIFY_HIDDEN_ACCOUNT ) {
5
  if ( ! defined( 'IMAGIFY_API_KEY' ) || ! IMAGIFY_API_KEY ) {
1
  <?php
2
+ defined( 'ABSPATH' ) || die( 'Cheatin uh?' );
3
 
4
  if ( defined( 'IMAGIFY_HIDDEN_ACCOUNT' ) && IMAGIFY_HIDDEN_ACCOUNT ) {
5
  if ( ! defined( 'IMAGIFY_API_KEY' ) || ! IMAGIFY_API_KEY ) {
views/part-settings-custom-folders.php CHANGED
@@ -1,5 +1,5 @@
1
  <?php
2
- defined( 'ABSPATH' ) || die( 'Cheatin\' uh?' );
3
 
4
  if ( ! imagify_can_optimize_custom_folders() ) {
5
  return;
1
  <?php
2
+ defined( 'ABSPATH' ) || die( 'Cheatin uh?' );
3
 
4
  if ( ! imagify_can_optimize_custom_folders() ) {
5
  return;
views/part-settings-files-tree-row.php CHANGED
@@ -1,5 +1,5 @@
1
  <?php
2
- defined( 'ABSPATH' ) || die( 'Cheatin\' uh?' );
3
 
4
  $disabled_attr = disabled( true, $data['checkbox_selected'], false );
5
  $disabled_class = $data['checkbox_selected'] ? ' disabled' : '';
@@ -8,16 +8,18 @@ $folder_icon = '<svg width="20px" height="17px" viewBox="0 0 20 17" version="
8
 
9
  <li<?php echo $data['checkbox_selected'] ? ' class="imagify-folder-already-selected"' : ''; ?>>
10
  <?php if ( empty( $data['no_button'] ) ) : ?>
11
- <button type="button" class="imagify-folder" data-folder="<?php echo $data['relative_path']; ?>"<?php echo $disabled_attr; ?> title="
12
- <?php
13
- if ( $data['checkbox_selected'] ) {
14
- /* translators: %s is a folder path. */
15
- printf( esc_attr__( 'The folder "%s" is already selected.', 'imagify' ), $data['relative_path'] );
16
- } else {
17
- /* translators: %s is a folder path. */
18
- printf( esc_attr__( 'Open/Close the folder "%s".', 'imagify' ), $data['relative_path'] );
19
- }
20
- ?>">
 
 
21
  <span class="imagify-folder-icon"><?php echo $folder_icon; ?></span>
22
  </button>
23
  <?php else : ?>
@@ -28,16 +30,15 @@ $folder_icon = '<svg width="20px" height="17px" viewBox="0 0 20 17" version="
28
 
29
  <input type="checkbox" name="imagify-custom-files[]" value="<?php echo $data['checkbox_value']; ?>" id="imagify-custom-folder-<?php echo $data['checkbox_id']; ?>" class="screen-reader-text"<?php echo $disabled_attr; ?>/>
30
 
31
- <label for="imagify-custom-folder-<?php echo $data['checkbox_id']; ?>" title="
32
- <?php
33
- if ( $data['checkbox_selected'] ) {
34
- /* translators: %s is a folder path. */
35
- printf( esc_attr__( 'The folder "%s" is already selected.', 'imagify' ), $data['relative_path'] );
36
- } else {
37
- /* translators: %s is a folder path. */
38
- printf( esc_attr__( 'Select the folder "%s".', 'imagify' ), $data['relative_path'] );
39
- }
40
- ?>">
41
  <?php echo esc_html( $data['label'] ); ?>
42
 
43
  <span class="imagify-add-ed-folder">
1
  <?php
2
+ defined( 'ABSPATH' ) || die( 'Cheatin uh?' );
3
 
4
  $disabled_attr = disabled( true, $data['checkbox_selected'], false );
5
  $disabled_class = $data['checkbox_selected'] ? ' disabled' : '';
8
 
9
  <li<?php echo $data['checkbox_selected'] ? ' class="imagify-folder-already-selected"' : ''; ?>>
10
  <?php if ( empty( $data['no_button'] ) ) : ?>
11
+ <button type="button" class="imagify-folder" data-folder="<?php echo $data['relative_path']; ?>"<?php echo $disabled_attr; ?> title="<?php
12
+ if ( $data['checkbox_selected'] ) {
13
+ /* translators: %s is a folder path. */
14
+ printf( esc_attr__( 'The folder "%s" is already selected.', 'imagify' ), $data['relative_path'] );
15
+ } else {
16
+ /* translators: %s is a folder path. */
17
+ printf( esc_attr__( 'Open/Close the folder "%s".', 'imagify' ), $data['relative_path'] );
18
+ }
19
+ ?>">
20
+ <?php if ( ! $data['checkbox_selected'] ) { ?>
21
+ <span class="imagify-loader"><img alt="<?php esc_attr_e( 'Loading...', 'imagify' ); ?>" src="<?php echo esc_url( IMAGIFY_ASSETS_IMG_URL . 'spinner.gif' ); ?>" width="20" height="20"/></span>
22
+ <?php } ?>
23
  <span class="imagify-folder-icon"><?php echo $folder_icon; ?></span>
24
  </button>
25
  <?php else : ?>
30
 
31
  <input type="checkbox" name="imagify-custom-files[]" value="<?php echo $data['checkbox_value']; ?>" id="imagify-custom-folder-<?php echo $data['checkbox_id']; ?>" class="screen-reader-text"<?php echo $disabled_attr; ?>/>
32
 
33
+ <label for="imagify-custom-folder-<?php echo $data['checkbox_id']; ?>" title="<?php
34
+ if ( $data['checkbox_selected'] ) {
35
+ /* translators: %s is a folder path. */
36
+ printf( esc_attr__( 'The folder "%s" is already selected.', 'imagify' ), $data['relative_path'] );
37
+ } else {
38
+ /* translators: %s is a folder path. */
39
+ printf( esc_attr__( 'Select the folder "%s".', 'imagify' ), $data['relative_path'] );
40
+ }
41
+ ?>">
 
42
  <?php echo esc_html( $data['label'] ); ?>
43
 
44
  <span class="imagify-add-ed-folder">
views/part-settings-footer.php CHANGED
@@ -1,5 +1,5 @@
1
  <?php
2
- defined( 'ABSPATH' ) || die( 'Cheatin\' uh?' );
3
 
4
  ?>
5
 
1
  <?php
2
+ defined( 'ABSPATH' ) || die( 'Cheatin uh?' );
3
 
4
  ?>
5
 
views/part-settings-header.php CHANGED
@@ -1,5 +1,5 @@
1
  <?php
2
- defined( 'ABSPATH' ) || die( 'Cheatin\' uh?' );
3
 
4
  ?>
5
  <h1 class="screen-reader-text"><?php esc_html_e( 'Settings', 'imagify' ); ?> — Imagify <?php echo IMAGIFY_VERSION; ?></h1>
1
  <?php
2
+ defined( 'ABSPATH' ) || die( 'Cheatin uh?' );
3
 
4
  ?>
5
  <h1 class="screen-reader-text"><?php esc_html_e( 'Settings', 'imagify' ); ?> — Imagify <?php echo IMAGIFY_VERSION; ?></h1>
views/part-settings-library.php CHANGED
@@ -1,5 +1,5 @@
1
  <?php
2
- defined( 'ABSPATH' ) || die( 'Cheatin\' uh?' );
3
 
4
  $settings = Imagify_Settings::get_instance();
5
  $options = Imagify_Options::get_instance();
1
  <?php
2
+ defined( 'ABSPATH' ) || die( 'Cheatin uh?' );
3
 
4
  $settings = Imagify_Settings::get_instance();
5
  $options = Imagify_Options::get_instance();
views/part-settings-row-custom-folder.php CHANGED
@@ -1,5 +1,5 @@
1
  <?php
2
- defined( 'ABSPATH' ) || die( 'Cheatin\' uh?' );
3
  ?>
4
  <p class="imagify-custom-folder-line" data-path="<?php echo '{{ROOT}}/' === $data['value'] ? '/' : esc_attr( $data['label'] ); ?>">
5
  <input type="hidden" name="imagify_settings[custom_folders][]" value="<?php echo esc_attr( $data['value'] ); ?>" />
1
  <?php
2
+ defined( 'ABSPATH' ) || die( 'Cheatin uh?' );
3
  ?>
4
  <p class="imagify-custom-folder-line" data-path="<?php echo '{{ROOT}}/' === $data['value'] ? '/' : esc_attr( $data['label'] ); ?>">
5
  <input type="hidden" name="imagify_settings[custom_folders][]" value="<?php echo esc_attr( $data['value'] ); ?>" />